@bnsights/bbsf-controls 1.2.9 → 1.2.11
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/README.md +20 -2
- package/fesm2022/bnsights-bbsf-controls.mjs +405 -1165
- package/fesm2022/bnsights-bbsf-controls.mjs.map +1 -1
- package/lib/controls/Repeater/builders/field-option-builders.d.ts +39 -0
- package/lib/controls/Repeater/repeater-field-builder/repeater-field-builder.component.d.ts +17 -3
- package/lib/controls/Repeater/services/field-config-factory.service.d.ts +42 -0
- package/package.json +2 -2
|
@@ -10283,9 +10283,362 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImpo
|
|
|
10283
10283
|
type: Input
|
|
10284
10284
|
}] } });
|
|
10285
10285
|
|
|
10286
|
+
function buildTextBoxOptions(config, type, maxLength, minLength, languageValidation, isReadonly) {
|
|
10287
|
+
const options = new TextBoxOptions();
|
|
10288
|
+
options.name = config.name;
|
|
10289
|
+
options.hideLabel = config.hideLabel;
|
|
10290
|
+
options.labelKey = config.labelKey;
|
|
10291
|
+
options.isRequired = config.isRequired || false;
|
|
10292
|
+
options.viewType = config.viewType;
|
|
10293
|
+
options.labelDescription = config.labelDescription || '';
|
|
10294
|
+
options.type = type;
|
|
10295
|
+
options.languageValidation = languageValidation;
|
|
10296
|
+
if (maxLength)
|
|
10297
|
+
options.maxLength = maxLength;
|
|
10298
|
+
if (minLength)
|
|
10299
|
+
options.minLength = minLength;
|
|
10300
|
+
options.value = config.value;
|
|
10301
|
+
options.isReadonly = isReadonly;
|
|
10302
|
+
if (config.customValidation && config.customValidation.length > 0) {
|
|
10303
|
+
options.customValidation = config.customValidation;
|
|
10304
|
+
}
|
|
10305
|
+
return options;
|
|
10306
|
+
}
|
|
10307
|
+
function buildNumberTextBoxOptions(config, maxValue, minValue, languageValidation, isReadonly) {
|
|
10308
|
+
const options = new TextBoxOptions();
|
|
10309
|
+
options.name = config.name;
|
|
10310
|
+
options.hideLabel = config.hideLabel;
|
|
10311
|
+
options.labelKey = config.labelKey;
|
|
10312
|
+
options.isRequired = config.isRequired || false;
|
|
10313
|
+
options.viewType = config.viewType;
|
|
10314
|
+
options.labelDescription = config.labelDescription || '';
|
|
10315
|
+
options.type = InputType.Number;
|
|
10316
|
+
options.languageValidation = languageValidation;
|
|
10317
|
+
const rangeNumber = new RangeNumber();
|
|
10318
|
+
if (maxValue !== undefined)
|
|
10319
|
+
rangeNumber.to = maxValue;
|
|
10320
|
+
if (minValue !== undefined)
|
|
10321
|
+
rangeNumber.from = minValue;
|
|
10322
|
+
options.numberRange = rangeNumber;
|
|
10323
|
+
options.value = config.value;
|
|
10324
|
+
options.isReadonly = isReadonly;
|
|
10325
|
+
if (config.customValidation && config.customValidation.length > 0) {
|
|
10326
|
+
options.customValidation = config.customValidation;
|
|
10327
|
+
}
|
|
10328
|
+
return options;
|
|
10329
|
+
}
|
|
10330
|
+
function buildDatePickerOptions(config, pickerType, startDate, endDate) {
|
|
10331
|
+
const options = new DatePickerOptions();
|
|
10332
|
+
options.name = config.name;
|
|
10333
|
+
options.hideLabel = config.hideLabel;
|
|
10334
|
+
options.labelKey = config.labelKey;
|
|
10335
|
+
options.isRequired = config.isRequired || false;
|
|
10336
|
+
options.viewType = config.viewType;
|
|
10337
|
+
options.labelDescription = config.labelDescription || '';
|
|
10338
|
+
options.startDate = startDate;
|
|
10339
|
+
options.endDate = endDate;
|
|
10340
|
+
options.pickerType = pickerType;
|
|
10341
|
+
options.selectMode = SelectMode.Single;
|
|
10342
|
+
options.startView = StartView.Month;
|
|
10343
|
+
options.value = config.value;
|
|
10344
|
+
if (config.customValidation && config.customValidation.length > 0) {
|
|
10345
|
+
options.customValidation = config.customValidation;
|
|
10346
|
+
}
|
|
10347
|
+
return options;
|
|
10348
|
+
}
|
|
10349
|
+
function buildDropdownOptions(config, dataSource, singleSelection, hasSearch) {
|
|
10350
|
+
const options = new DropdownOptions();
|
|
10351
|
+
options.name = config.name;
|
|
10352
|
+
options.hideLabel = config.hideLabel;
|
|
10353
|
+
options.labelKey = config.labelKey;
|
|
10354
|
+
options.isRequired = config.isRequired || false;
|
|
10355
|
+
options.viewType = config.viewType;
|
|
10356
|
+
options.labelDescription = config.labelDescription || '';
|
|
10357
|
+
options.dataSource = dataSource;
|
|
10358
|
+
options.singleSelection = singleSelection;
|
|
10359
|
+
options.showCheckbox = false;
|
|
10360
|
+
options.allowSearchFilter = hasSearch;
|
|
10361
|
+
options.selectedItems = config.value;
|
|
10362
|
+
if (config.customValidation && config.customValidation.length > 0) {
|
|
10363
|
+
options.customValidation = config.customValidation;
|
|
10364
|
+
}
|
|
10365
|
+
return options;
|
|
10366
|
+
}
|
|
10367
|
+
function buildFileUploadOptions(config, fileMaxSizeInMB, isMultiple = false, maxNoOfFiles, maxSizeForAllFilesInMB) {
|
|
10368
|
+
const options = new FileUploadOptions();
|
|
10369
|
+
options.name = config.name;
|
|
10370
|
+
options.hideLabel = config.hideLabel;
|
|
10371
|
+
options.labelKey = config.labelKey;
|
|
10372
|
+
options.isRequired = config.isRequired || false;
|
|
10373
|
+
options.viewType = config.viewType;
|
|
10374
|
+
options.labelDescription = config.labelDescription || '';
|
|
10375
|
+
if (isMultiple) {
|
|
10376
|
+
options.isMultipleFile = true;
|
|
10377
|
+
if (maxSizeForAllFilesInMB)
|
|
10378
|
+
options.maxSizeForAllFilesInMB = maxSizeForAllFilesInMB;
|
|
10379
|
+
if (maxNoOfFiles)
|
|
10380
|
+
options.maxNoOfFiles = maxNoOfFiles;
|
|
10381
|
+
}
|
|
10382
|
+
else {
|
|
10383
|
+
if (fileMaxSizeInMB)
|
|
10384
|
+
options.fileMaxSizeInMB = fileMaxSizeInMB;
|
|
10385
|
+
}
|
|
10386
|
+
options.value = config.value;
|
|
10387
|
+
if (config.customValidation && config.customValidation.length > 0) {
|
|
10388
|
+
options.customValidation = config.customValidation;
|
|
10389
|
+
}
|
|
10390
|
+
return options;
|
|
10391
|
+
}
|
|
10392
|
+
function buildImageUploadOptions(config, fileMaxSizeInMB) {
|
|
10393
|
+
const options = new ImageUploadOptions();
|
|
10394
|
+
options.name = config.name;
|
|
10395
|
+
options.hideLabel = config.hideLabel;
|
|
10396
|
+
options.labelKey = config.labelKey;
|
|
10397
|
+
options.isRequired = config.isRequired || false;
|
|
10398
|
+
options.viewType = config.viewType;
|
|
10399
|
+
options.labelDescription = config.labelDescription || '';
|
|
10400
|
+
if (fileMaxSizeInMB)
|
|
10401
|
+
options.fileMaxSizeInMB = fileMaxSizeInMB;
|
|
10402
|
+
options.value = config.value;
|
|
10403
|
+
if (config.customValidation && config.customValidation.length > 0) {
|
|
10404
|
+
options.customValidation = config.customValidation;
|
|
10405
|
+
}
|
|
10406
|
+
return options;
|
|
10407
|
+
}
|
|
10408
|
+
function buildPhoneOptions(config) {
|
|
10409
|
+
const options = new PhoneOptions();
|
|
10410
|
+
options.name = config.name;
|
|
10411
|
+
options.hideLabel = config.hideLabel;
|
|
10412
|
+
options.labelKey = config.labelKey;
|
|
10413
|
+
options.isRequired = config.isRequired || false;
|
|
10414
|
+
options.viewType = config.viewType;
|
|
10415
|
+
options.labelDescription = config.labelDescription || '';
|
|
10416
|
+
options.allowSearch = true;
|
|
10417
|
+
options.phoneValidation = true;
|
|
10418
|
+
options.selectFirstCountry = true;
|
|
10419
|
+
options.enablePlaceholder = true;
|
|
10420
|
+
options.value = config.value;
|
|
10421
|
+
if (config.customValidation && config.customValidation.length > 0) {
|
|
10422
|
+
options.customValidation = config.customValidation;
|
|
10423
|
+
}
|
|
10424
|
+
return options;
|
|
10425
|
+
}
|
|
10426
|
+
function buildTextAreaOptions(config, maxLength, minLength, rows, forceDirection) {
|
|
10427
|
+
const options = new TextAreaOptions();
|
|
10428
|
+
options.name = config.name;
|
|
10429
|
+
options.hideLabel = config.hideLabel;
|
|
10430
|
+
options.labelKey = config.labelKey;
|
|
10431
|
+
options.isRequired = config.isRequired || false;
|
|
10432
|
+
options.viewType = config.viewType;
|
|
10433
|
+
options.labelDescription = config.labelDescription || '';
|
|
10434
|
+
if (maxLength)
|
|
10435
|
+
options.maxLength = maxLength;
|
|
10436
|
+
if (minLength)
|
|
10437
|
+
options.minLength = minLength;
|
|
10438
|
+
options.rows = rows;
|
|
10439
|
+
options.forceDirection = forceDirection;
|
|
10440
|
+
options.value = config.value;
|
|
10441
|
+
if (config.customValidation && config.customValidation.length > 0) {
|
|
10442
|
+
options.customValidation = config.customValidation;
|
|
10443
|
+
}
|
|
10444
|
+
return options;
|
|
10445
|
+
}
|
|
10446
|
+
function buildHtmlEditorOptions(config, maxLength, minLength, height, forceDirection) {
|
|
10447
|
+
const options = new HtmlEditorOptions();
|
|
10448
|
+
options.name = config.name;
|
|
10449
|
+
options.hideLabel = config.hideLabel;
|
|
10450
|
+
options.labelKey = config.labelKey;
|
|
10451
|
+
options.isRequired = config.isRequired || false;
|
|
10452
|
+
options.viewType = config.viewType;
|
|
10453
|
+
options.labelDescription = config.labelDescription || '';
|
|
10454
|
+
if (maxLength)
|
|
10455
|
+
options.maxLength = maxLength;
|
|
10456
|
+
if (minLength)
|
|
10457
|
+
options.minLength = minLength;
|
|
10458
|
+
options.height = height;
|
|
10459
|
+
options.forceDirection = forceDirection;
|
|
10460
|
+
options.value = config.value;
|
|
10461
|
+
if (config.customValidation && config.customValidation.length > 0) {
|
|
10462
|
+
options.customValidation = config.customValidation;
|
|
10463
|
+
}
|
|
10464
|
+
return options;
|
|
10465
|
+
}
|
|
10466
|
+
function buildToggleSlideOptions(config) {
|
|
10467
|
+
const options = new ToggleSlideOptions();
|
|
10468
|
+
options.name = config.name;
|
|
10469
|
+
options.hideLabel = config.hideLabel;
|
|
10470
|
+
options.labelKey = config.labelKey;
|
|
10471
|
+
options.viewType = config.viewType;
|
|
10472
|
+
options.labelDescription = config.labelDescription || '';
|
|
10473
|
+
options.value = config.value;
|
|
10474
|
+
if (config.customValidation && config.customValidation.length > 0) {
|
|
10475
|
+
options.customValidation = config.customValidation;
|
|
10476
|
+
}
|
|
10477
|
+
return options;
|
|
10478
|
+
}
|
|
10479
|
+
function buildMapAutoCompleteOptions(config) {
|
|
10480
|
+
const options = new MapAutoCompleteOptions();
|
|
10481
|
+
options.name = config.name;
|
|
10482
|
+
options.hideLabel = config.hideLabel;
|
|
10483
|
+
options.labelKey = config.labelKey;
|
|
10484
|
+
options.isRequired = config.isRequired || false;
|
|
10485
|
+
options.viewType = config.viewType;
|
|
10486
|
+
options.labelDescription = config.labelDescription || '';
|
|
10487
|
+
options.value = config.value;
|
|
10488
|
+
if (config.customValidation && config.customValidation.length > 0) {
|
|
10489
|
+
options.customValidation = config.customValidation;
|
|
10490
|
+
}
|
|
10491
|
+
return options;
|
|
10492
|
+
}
|
|
10493
|
+
function buildCheckBoxOptions(config, outputFunction) {
|
|
10494
|
+
const options = new CheckBoxOptions();
|
|
10495
|
+
options.name = config.name;
|
|
10496
|
+
options.hideLabel = config.hideLabel;
|
|
10497
|
+
options.labelKey = config.labelKey;
|
|
10498
|
+
options.viewType = config.viewType;
|
|
10499
|
+
options.labelDescription = config.labelDescription || '';
|
|
10500
|
+
options.outputFunction = outputFunction;
|
|
10501
|
+
options.value = config.value;
|
|
10502
|
+
if (config.customValidation && config.customValidation.length > 0) {
|
|
10503
|
+
options.customValidation = config.customValidation;
|
|
10504
|
+
}
|
|
10505
|
+
return options;
|
|
10506
|
+
}
|
|
10507
|
+
|
|
10508
|
+
class FieldConfigFactoryService {
|
|
10509
|
+
/**
|
|
10510
|
+
* Creates field options based on the data type and control configuration
|
|
10511
|
+
*/
|
|
10512
|
+
createFieldOptions(dataType, controlOptions, controlName, value) {
|
|
10513
|
+
const baseConfig = {
|
|
10514
|
+
name: controlName,
|
|
10515
|
+
hideLabel: controlOptions.hideLabel,
|
|
10516
|
+
labelKey: controlOptions.labelKey,
|
|
10517
|
+
isRequired: controlOptions.isRequired,
|
|
10518
|
+
viewType: controlOptions.viewType,
|
|
10519
|
+
labelDescription: controlOptions.labelDescription || '',
|
|
10520
|
+
customValidation: controlOptions.customValidation,
|
|
10521
|
+
value: value
|
|
10522
|
+
};
|
|
10523
|
+
switch (dataType) {
|
|
10524
|
+
// TextBox variants
|
|
10525
|
+
case DataType.Text:
|
|
10526
|
+
return buildTextBoxOptions(baseConfig, InputType.Text, controlOptions.maxLength, controlOptions.minLength, controlOptions.languageValidation, controlOptions.isReadonly);
|
|
10527
|
+
case DataType.Name:
|
|
10528
|
+
return buildTextBoxOptions(baseConfig, InputType.Text, controlOptions.maxLength, controlOptions.minLength, controlOptions.languageValidation, undefined);
|
|
10529
|
+
case DataType.Email:
|
|
10530
|
+
return buildTextBoxOptions(baseConfig, InputType.Email, undefined, undefined, controlOptions.languageValidation, undefined);
|
|
10531
|
+
case DataType.Number:
|
|
10532
|
+
return buildNumberTextBoxOptions(baseConfig, controlOptions.numberRange?.to, controlOptions.numberRange?.from, controlOptions.languageValidation, controlOptions.isReadonly);
|
|
10533
|
+
case DataType.URL:
|
|
10534
|
+
return buildTextBoxOptions(baseConfig, InputType.URL, undefined, undefined, undefined, undefined);
|
|
10535
|
+
// DateTime variants
|
|
10536
|
+
case DataType.Date:
|
|
10537
|
+
return buildDatePickerOptions(baseConfig, PickerType.Calendar, controlOptions.startDate, controlOptions.endDate);
|
|
10538
|
+
case DataType.DateTime:
|
|
10539
|
+
return buildDatePickerOptions(baseConfig, PickerType.Both, controlOptions.startDate, controlOptions.endDate);
|
|
10540
|
+
case DataType.Time:
|
|
10541
|
+
return buildDatePickerOptions(baseConfig, PickerType.Timer, undefined, undefined);
|
|
10542
|
+
// Dropdown variants
|
|
10543
|
+
case DataType.SingleSelect:
|
|
10544
|
+
return buildDropdownOptions(baseConfig, controlOptions.dataSource || [], true, controlOptions.hasSearch || false);
|
|
10545
|
+
case DataType.MulipleSelect:
|
|
10546
|
+
return buildDropdownOptions(baseConfig, controlOptions.dataSource || [], false, controlOptions.hasSearch || false);
|
|
10547
|
+
case DataType.Goal:
|
|
10548
|
+
return buildDropdownOptions(baseConfig, controlOptions.dataSource || [], !controlOptions.isMultiple, controlOptions.hasSearch || false);
|
|
10549
|
+
case DataType.Challenge:
|
|
10550
|
+
return buildDropdownOptions(baseConfig, controlOptions.dataSource || [], !controlOptions.isMultiple, controlOptions.hasSearch || false);
|
|
10551
|
+
case DataType.InnovationLab:
|
|
10552
|
+
return buildDropdownOptions(baseConfig, controlOptions.dataSource || [], !controlOptions.isMultiple, controlOptions.hasSearch || false);
|
|
10553
|
+
case DataType.Country:
|
|
10554
|
+
return buildDropdownOptions(baseConfig, controlOptions.dataSource || [], !controlOptions.isMultiple, controlOptions.hasSearch || false);
|
|
10555
|
+
// File upload variants
|
|
10556
|
+
case DataType.File:
|
|
10557
|
+
return buildFileUploadOptions(baseConfig, controlOptions.maxFileSizeInMB, false);
|
|
10558
|
+
case DataType.MultiFile:
|
|
10559
|
+
return buildFileUploadOptions(baseConfig, undefined, true, controlOptions.maxFileCount, controlOptions.maxFileSizeInMB);
|
|
10560
|
+
// Image upload variants
|
|
10561
|
+
case DataType.Image:
|
|
10562
|
+
return buildImageUploadOptions(baseConfig, controlOptions.maxFileSizeInMB);
|
|
10563
|
+
case DataType.CoverPhoto:
|
|
10564
|
+
return buildImageUploadOptions(baseConfig, controlOptions.maxFileSizeInMB);
|
|
10565
|
+
// Phone
|
|
10566
|
+
case DataType.Mobile:
|
|
10567
|
+
return buildPhoneOptions(baseConfig);
|
|
10568
|
+
// MultilineText
|
|
10569
|
+
case DataType.MultilineText:
|
|
10570
|
+
return buildTextAreaOptions(baseConfig, controlOptions.maxLength, controlOptions.minLength, controlOptions.rows, controlOptions.forceDirection);
|
|
10571
|
+
// HTML
|
|
10572
|
+
case DataType.HTML:
|
|
10573
|
+
return buildHtmlEditorOptions(baseConfig, controlOptions.maxLength, controlOptions.minLength, controlOptions.rows, controlOptions.forceDirection);
|
|
10574
|
+
// Boolean
|
|
10575
|
+
case DataType.Boolean:
|
|
10576
|
+
return buildToggleSlideOptions(baseConfig);
|
|
10577
|
+
// Location
|
|
10578
|
+
case DataType.Location:
|
|
10579
|
+
return buildMapAutoCompleteOptions(baseConfig);
|
|
10580
|
+
// CheckBox
|
|
10581
|
+
case DataType.CheckBox:
|
|
10582
|
+
return buildCheckBoxOptions(baseConfig, controlOptions.outputFunction);
|
|
10583
|
+
default:
|
|
10584
|
+
throw new Error(`Unsupported DataType: ${dataType}`);
|
|
10585
|
+
}
|
|
10586
|
+
}
|
|
10587
|
+
/**
|
|
10588
|
+
* Returns the component type for a given data type
|
|
10589
|
+
*/
|
|
10590
|
+
getComponentType(dataType) {
|
|
10591
|
+
switch (dataType) {
|
|
10592
|
+
case DataType.Text:
|
|
10593
|
+
case DataType.Name:
|
|
10594
|
+
case DataType.Email:
|
|
10595
|
+
case DataType.Number:
|
|
10596
|
+
case DataType.URL:
|
|
10597
|
+
return TextboxComponent;
|
|
10598
|
+
case DataType.Date:
|
|
10599
|
+
case DataType.DateTime:
|
|
10600
|
+
case DataType.Time:
|
|
10601
|
+
return DateInputComponent;
|
|
10602
|
+
case DataType.SingleSelect:
|
|
10603
|
+
case DataType.MulipleSelect:
|
|
10604
|
+
case DataType.Goal:
|
|
10605
|
+
case DataType.Challenge:
|
|
10606
|
+
case DataType.InnovationLab:
|
|
10607
|
+
case DataType.Country:
|
|
10608
|
+
return DropdownListComponent;
|
|
10609
|
+
case DataType.File:
|
|
10610
|
+
case DataType.MultiFile:
|
|
10611
|
+
return FileUploadComponent;
|
|
10612
|
+
case DataType.Image:
|
|
10613
|
+
case DataType.CoverPhoto:
|
|
10614
|
+
return ImageUploaderComponent;
|
|
10615
|
+
case DataType.Mobile:
|
|
10616
|
+
return PhoneComponent;
|
|
10617
|
+
case DataType.MultilineText:
|
|
10618
|
+
return TextAreaComponent;
|
|
10619
|
+
case DataType.HTML:
|
|
10620
|
+
return HtmlEditorComponent;
|
|
10621
|
+
case DataType.Boolean:
|
|
10622
|
+
return ToggleslideComponent;
|
|
10623
|
+
case DataType.Location:
|
|
10624
|
+
return MapAutoCompleteComponent;
|
|
10625
|
+
case DataType.CheckBox:
|
|
10626
|
+
return CheckBoxComponent;
|
|
10627
|
+
default:
|
|
10628
|
+
throw new Error(`Unsupported DataType: ${dataType}`);
|
|
10629
|
+
}
|
|
10630
|
+
}
|
|
10631
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: FieldConfigFactoryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
10632
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: FieldConfigFactoryService }); }
|
|
10633
|
+
}
|
|
10634
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: FieldConfigFactoryService, decorators: [{
|
|
10635
|
+
type: Injectable
|
|
10636
|
+
}] });
|
|
10637
|
+
|
|
10286
10638
|
class RepeaterFieldBuilderComponent {
|
|
10287
|
-
constructor(renderComponentService, textControlHost) {
|
|
10639
|
+
constructor(renderComponentService, fieldConfigFactory, textControlHost) {
|
|
10288
10640
|
this.renderComponentService = renderComponentService;
|
|
10641
|
+
this.fieldConfigFactory = fieldConfigFactory;
|
|
10289
10642
|
this.textControlHost = textControlHost;
|
|
10290
10643
|
this.itemsValue = [];
|
|
10291
10644
|
this.itemValue = null;
|
|
@@ -10293,1177 +10646,64 @@ class RepeaterFieldBuilderComponent {
|
|
|
10293
10646
|
ngOnInit() { }
|
|
10294
10647
|
ngAfterViewInit() {
|
|
10295
10648
|
setTimeout(() => {
|
|
10296
|
-
|
|
10297
|
-
|
|
10298
|
-
|
|
10299
|
-
for (const key in this.itemValue) {
|
|
10300
|
-
if (Object.prototype.hasOwnProperty.call(this.itemValue, key) &&
|
|
10301
|
-
key == this.repeaterField.controlOptions.name) {
|
|
10302
|
-
const element = this.itemValue[key];
|
|
10303
|
-
this.value = element;
|
|
10304
|
-
}
|
|
10305
|
-
}
|
|
10306
|
-
}
|
|
10307
|
-
this.item.clear();
|
|
10308
|
-
switch (this.repeaterField?.controlType) {
|
|
10309
|
-
//#region TextBox
|
|
10310
|
-
case DataType.Text:
|
|
10311
|
-
let Text = new TextBoxOptions();
|
|
10312
|
-
Text.name =
|
|
10313
|
-
this.repeaterField.controlOptions.name +
|
|
10314
|
-
'.' +
|
|
10315
|
-
this.itemNumber.toString() +
|
|
10316
|
-
'.' +
|
|
10317
|
-
this.controlNumber.toString();
|
|
10318
|
-
Text.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10319
|
-
Text.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10320
|
-
Text.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10321
|
-
Text.viewType = this.repeaterField.controlOptions.viewType;
|
|
10322
|
-
Text.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10323
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10324
|
-
: '';
|
|
10325
|
-
Text.type = InputType.Text;
|
|
10326
|
-
Text.languageValidation = this.repeaterField.controlOptions.languageValidation;
|
|
10327
|
-
if (this.repeaterField.controlOptions.maxLength)
|
|
10328
|
-
Text.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
10329
|
-
if (this.repeaterField.controlOptions.minLength)
|
|
10330
|
-
Text.minLength = this.repeaterField.controlOptions.minLength;
|
|
10331
|
-
Text.value = this.value;
|
|
10332
|
-
Text.isReadonly = this.repeaterField.controlOptions.isReadonly;
|
|
10333
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10334
|
-
Text.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10335
|
-
}
|
|
10336
|
-
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, Text);
|
|
10337
|
-
break;
|
|
10338
|
-
case DataType.Name:
|
|
10339
|
-
let name = new TextBoxOptions();
|
|
10340
|
-
name.name =
|
|
10341
|
-
this.repeaterField.controlOptions.name +
|
|
10342
|
-
'.' +
|
|
10343
|
-
this.itemNumber.toString() +
|
|
10344
|
-
'.' +
|
|
10345
|
-
this.controlNumber.toString();
|
|
10346
|
-
name.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10347
|
-
name.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10348
|
-
name.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10349
|
-
name.viewType = this.repeaterField.controlOptions.viewType;
|
|
10350
|
-
name.languageValidation = this.repeaterField.controlOptions.languageValidation;
|
|
10351
|
-
name.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10352
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10353
|
-
: '';
|
|
10354
|
-
if (this.repeaterField.controlOptions.maxLength)
|
|
10355
|
-
name.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
10356
|
-
if (this.repeaterField.controlOptions.minLength)
|
|
10357
|
-
name.minLength = this.repeaterField.controlOptions.minLength;
|
|
10358
|
-
name.type = InputType.Text;
|
|
10359
|
-
name.value = this.value;
|
|
10360
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10361
|
-
name.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10362
|
-
}
|
|
10363
|
-
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, name);
|
|
10364
|
-
break;
|
|
10365
|
-
case DataType.Email:
|
|
10366
|
-
let email = new TextBoxOptions();
|
|
10367
|
-
email.name =
|
|
10368
|
-
this.repeaterField.controlOptions.name +
|
|
10369
|
-
'.' +
|
|
10370
|
-
this.itemNumber.toString() +
|
|
10371
|
-
'.' +
|
|
10372
|
-
this.controlNumber.toString();
|
|
10373
|
-
email.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10374
|
-
email.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10375
|
-
email.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10376
|
-
email.viewType = this.repeaterField.controlOptions.viewType;
|
|
10377
|
-
email.languageValidation = this.repeaterField.controlOptions.languageValidation;
|
|
10378
|
-
email.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10379
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10380
|
-
: '';
|
|
10381
|
-
email.type = InputType.Email;
|
|
10382
|
-
email.value = this.value;
|
|
10383
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10384
|
-
email.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10385
|
-
}
|
|
10386
|
-
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, email);
|
|
10387
|
-
break;
|
|
10388
|
-
case DataType.Number:
|
|
10389
|
-
let number = new TextBoxOptions();
|
|
10390
|
-
number.name =
|
|
10391
|
-
this.repeaterField.controlOptions.name +
|
|
10392
|
-
'.' +
|
|
10393
|
-
this.itemNumber.toString() +
|
|
10394
|
-
'.' +
|
|
10395
|
-
this.controlNumber.toString();
|
|
10396
|
-
number.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10397
|
-
number.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10398
|
-
number.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10399
|
-
number.viewType = this.repeaterField.controlOptions.viewType;
|
|
10400
|
-
number.languageValidation = this.repeaterField.controlOptions.languageValidation;
|
|
10401
|
-
number.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10402
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10403
|
-
: '';
|
|
10404
|
-
number.type = InputType.Number;
|
|
10405
|
-
let rangeNumber = new RangeNumber();
|
|
10406
|
-
if (this.repeaterField.controlOptions.numberRange) {
|
|
10407
|
-
rangeNumber.to = this.repeaterField.controlOptions.numberRange.to;
|
|
10408
|
-
rangeNumber.from = this.repeaterField.controlOptions.numberRange.from;
|
|
10409
|
-
}
|
|
10410
|
-
number.numberRange = rangeNumber;
|
|
10411
|
-
number.value = this.value;
|
|
10412
|
-
number.isReadonly = this.repeaterField.controlOptions.isReadonly;
|
|
10413
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10414
|
-
number.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10415
|
-
}
|
|
10416
|
-
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, number);
|
|
10417
|
-
break;
|
|
10418
|
-
case DataType.URL:
|
|
10419
|
-
let url = new TextBoxOptions();
|
|
10420
|
-
url.name = `${this.repeaterField.controlOptions.name}.${this.itemNumber}.${this.controlNumber}`;
|
|
10421
|
-
url.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10422
|
-
url.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10423
|
-
url.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10424
|
-
url.viewType = this.repeaterField.controlOptions.viewType;
|
|
10425
|
-
url.labelDescription = this.repeaterField.controlOptions.labelDescription ? this.repeaterField.controlOptions.labelDescription : '';
|
|
10426
|
-
url.type = InputType.URL;
|
|
10427
|
-
url.value = this.value;
|
|
10428
|
-
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, url);
|
|
10429
|
-
break;
|
|
10430
|
-
//#endregion
|
|
10431
|
-
//#region DateTime
|
|
10432
|
-
case DataType.Date:
|
|
10433
|
-
let date = new DatePickerOptions();
|
|
10434
|
-
date.name = `${this.repeaterField.controlOptions.name}.${this.itemNumber}.${this.controlNumber}`;
|
|
10435
|
-
date.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10436
|
-
date.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10437
|
-
date.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10438
|
-
date.viewType = this.repeaterField.controlOptions.viewType;
|
|
10439
|
-
date.labelDescription = this.repeaterField.controlOptions.labelDescription ? this.repeaterField.controlOptions.labelDescription : '';
|
|
10440
|
-
date.startDate = this.repeaterField.controlOptions.startDate;
|
|
10441
|
-
date.endDate = this.repeaterField.controlOptions.endDate;
|
|
10442
|
-
date.pickerType = PickerType.Calendar;
|
|
10443
|
-
date.selectMode = SelectMode.Single;
|
|
10444
|
-
date.startView = StartView.Month;
|
|
10445
|
-
date.value = this.value;
|
|
10446
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10447
|
-
date.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10448
|
-
}
|
|
10449
|
-
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, date);
|
|
10450
|
-
break;
|
|
10451
|
-
case DataType.DateTime:
|
|
10452
|
-
let dateTime = new DatePickerOptions();
|
|
10453
|
-
dateTime.name = `${this.repeaterField.controlOptions.name}.${this.itemNumber}.${this.controlNumber}`;
|
|
10454
|
-
dateTime.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10455
|
-
dateTime.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10456
|
-
dateTime.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10457
|
-
dateTime.viewType = this.repeaterField.controlOptions.viewType;
|
|
10458
|
-
dateTime.labelDescription = this.repeaterField.controlOptions.labelDescription ? this.repeaterField.controlOptions.labelDescription : '';
|
|
10459
|
-
dateTime.startDate = this.repeaterField.controlOptions.startDate;
|
|
10460
|
-
dateTime.endDate = this.repeaterField.controlOptions.endDate;
|
|
10461
|
-
dateTime.pickerType = PickerType.Both;
|
|
10462
|
-
dateTime.selectMode = SelectMode.Single;
|
|
10463
|
-
dateTime.startView = StartView.Month;
|
|
10464
|
-
dateTime.value = this.value;
|
|
10465
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10466
|
-
dateTime.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10467
|
-
}
|
|
10468
|
-
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, dateTime);
|
|
10469
|
-
break;
|
|
10470
|
-
case DataType.Time:
|
|
10471
|
-
let time = new DatePickerOptions();
|
|
10472
|
-
time.name = `${this.repeaterField.controlOptions.name}.${this.itemNumber}.${this.controlNumber}`;
|
|
10473
|
-
time.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10474
|
-
time.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10475
|
-
time.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10476
|
-
time.viewType = this.repeaterField.controlOptions.viewType;
|
|
10477
|
-
time.labelDescription = this.repeaterField.controlOptions.labelDescription ? this.repeaterField.controlOptions.labelDescription : '';
|
|
10478
|
-
time.pickerType = PickerType.Timer;
|
|
10479
|
-
time.selectMode = SelectMode.Single;
|
|
10480
|
-
time.startView = StartView.Month;
|
|
10481
|
-
time.value = this.value;
|
|
10482
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10483
|
-
time.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10484
|
-
}
|
|
10485
|
-
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, time);
|
|
10486
|
-
break;
|
|
10487
|
-
//#endregion
|
|
10488
|
-
//#region Dropdown
|
|
10489
|
-
case DataType.SingleSelect:
|
|
10490
|
-
let singleSelect = new DropdownOptions();
|
|
10491
|
-
singleSelect.name = `${this.repeaterField.controlOptions.name}.${this.itemNumber}.${this.controlNumber}`;
|
|
10492
|
-
singleSelect.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10493
|
-
singleSelect.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10494
|
-
singleSelect.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10495
|
-
singleSelect.viewType = this.repeaterField.controlOptions.viewType;
|
|
10496
|
-
singleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription ? this.repeaterField.controlOptions.labelDescription : '';
|
|
10497
|
-
singleSelect.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
10498
|
-
singleSelect.singleSelection = true;
|
|
10499
|
-
singleSelect.showCheckbox = false;
|
|
10500
|
-
singleSelect.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
10501
|
-
singleSelect.selectedItems = this.value;
|
|
10502
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10503
|
-
singleSelect.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10504
|
-
}
|
|
10505
|
-
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, singleSelect);
|
|
10506
|
-
break;
|
|
10507
|
-
case DataType.MulipleSelect:
|
|
10508
|
-
let multipleSelect = new DropdownOptions();
|
|
10509
|
-
multipleSelect.name = `${this.repeaterField.controlOptions.name}.${this.itemNumber}.${this.controlNumber}`;
|
|
10510
|
-
multipleSelect.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10511
|
-
multipleSelect.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10512
|
-
multipleSelect.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10513
|
-
multipleSelect.viewType = this.repeaterField.controlOptions.viewType;
|
|
10514
|
-
multipleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription ? this.repeaterField.controlOptions.labelDescription : '';
|
|
10515
|
-
multipleSelect.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
10516
|
-
multipleSelect.singleSelection = false;
|
|
10517
|
-
multipleSelect.showCheckbox = false;
|
|
10518
|
-
multipleSelect.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
10519
|
-
multipleSelect.selectedItems = this.value;
|
|
10520
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10521
|
-
multipleSelect.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10522
|
-
}
|
|
10523
|
-
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, multipleSelect);
|
|
10524
|
-
break;
|
|
10525
|
-
case DataType.Goal:
|
|
10526
|
-
let goal = new DropdownOptions();
|
|
10527
|
-
goal.name = `${this.repeaterField.controlOptions.name}.${this.itemNumber}.${this.controlNumber}`;
|
|
10528
|
-
goal.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10529
|
-
goal.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10530
|
-
goal.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10531
|
-
goal.viewType = this.repeaterField.controlOptions.viewType;
|
|
10532
|
-
goal.labelDescription = this.repeaterField.controlOptions.labelDescription ? this.repeaterField.controlOptions.labelDescription : '';
|
|
10533
|
-
goal.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
10534
|
-
goal.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
10535
|
-
goal.showCheckbox = false;
|
|
10536
|
-
goal.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
10537
|
-
goal.selectedItems = this.value;
|
|
10538
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10539
|
-
goal.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10540
|
-
}
|
|
10541
|
-
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, goal);
|
|
10542
|
-
break;
|
|
10543
|
-
case DataType.Challenge:
|
|
10544
|
-
let challenge = new DropdownOptions();
|
|
10545
|
-
challenge.name = `${this.repeaterField.controlOptions.name}.${this.itemNumber}.${this.controlNumber}`;
|
|
10546
|
-
challenge.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10547
|
-
challenge.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10548
|
-
challenge.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10549
|
-
challenge.viewType = this.repeaterField.controlOptions.viewType;
|
|
10550
|
-
challenge.labelDescription = this.repeaterField.controlOptions.labelDescription ? this.repeaterField.controlOptions.labelDescription : '';
|
|
10551
|
-
challenge.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
10552
|
-
challenge.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
10553
|
-
challenge.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
10554
|
-
challenge.showCheckbox = false;
|
|
10555
|
-
challenge.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
10556
|
-
challenge.selectedItems = this.value;
|
|
10557
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10558
|
-
challenge.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10559
|
-
}
|
|
10560
|
-
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, challenge);
|
|
10561
|
-
break;
|
|
10562
|
-
case DataType.InnovationLab:
|
|
10563
|
-
let innovationLab = new DropdownOptions();
|
|
10564
|
-
innovationLab.name =
|
|
10565
|
-
this.repeaterField.controlOptions.name +
|
|
10566
|
-
'.' +
|
|
10567
|
-
this.itemNumber.toString() +
|
|
10568
|
-
'.' +
|
|
10569
|
-
this.controlNumber.toString();
|
|
10570
|
-
innovationLab.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10571
|
-
innovationLab.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10572
|
-
innovationLab.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10573
|
-
innovationLab.viewType = this.repeaterField.controlOptions.viewType;
|
|
10574
|
-
innovationLab.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10575
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10576
|
-
: '';
|
|
10577
|
-
innovationLab.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
10578
|
-
innovationLab.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
10579
|
-
innovationLab.showCheckbox = false;
|
|
10580
|
-
innovationLab.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
10581
|
-
innovationLab.selectedItems = this.value;
|
|
10582
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10583
|
-
innovationLab.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10584
|
-
}
|
|
10585
|
-
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, innovationLab);
|
|
10586
|
-
break;
|
|
10587
|
-
case DataType.Country:
|
|
10588
|
-
let country = new DropdownOptions();
|
|
10589
|
-
country.name =
|
|
10590
|
-
this.repeaterField.controlOptions.name +
|
|
10591
|
-
'.' +
|
|
10592
|
-
this.itemNumber.toString() +
|
|
10593
|
-
'.' +
|
|
10594
|
-
this.controlNumber.toString();
|
|
10595
|
-
country.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10596
|
-
country.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10597
|
-
country.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10598
|
-
country.viewType = this.repeaterField.controlOptions.viewType;
|
|
10599
|
-
country.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10600
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10601
|
-
: '';
|
|
10602
|
-
country.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
10603
|
-
country.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
10604
|
-
country.showCheckbox = false;
|
|
10605
|
-
country.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
10606
|
-
country.selectedItems = this.value;
|
|
10607
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10608
|
-
country.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10609
|
-
}
|
|
10610
|
-
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, country);
|
|
10611
|
-
break;
|
|
10612
|
-
//#endregion
|
|
10613
|
-
//#region FileUpload
|
|
10614
|
-
case DataType.File:
|
|
10615
|
-
let file = new FileUploadOptions();
|
|
10616
|
-
file.name =
|
|
10617
|
-
this.repeaterField.controlOptions.name +
|
|
10618
|
-
'.' +
|
|
10619
|
-
this.itemNumber.toString() +
|
|
10620
|
-
'.' +
|
|
10621
|
-
this.controlNumber.toString();
|
|
10622
|
-
file.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10623
|
-
file.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10624
|
-
file.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10625
|
-
file.viewType = this.repeaterField.controlOptions.viewType;
|
|
10626
|
-
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10627
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10628
|
-
: '';
|
|
10629
|
-
file.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
10630
|
-
file.value = this.value;
|
|
10631
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10632
|
-
file.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10633
|
-
}
|
|
10634
|
-
this.renderComponentService.renderDynamicComponent(this.item, FileUploadComponent, this.group, file);
|
|
10635
|
-
break;
|
|
10636
|
-
case DataType.MultiFile:
|
|
10637
|
-
let multiFile = new FileUploadOptions();
|
|
10638
|
-
file.name =
|
|
10639
|
-
this.repeaterField.controlOptions.name +
|
|
10640
|
-
'.' +
|
|
10641
|
-
this.itemNumber.toString() +
|
|
10642
|
-
'.' +
|
|
10643
|
-
this.controlNumber.toString();
|
|
10644
|
-
file.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10645
|
-
file.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10646
|
-
file.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10647
|
-
file.viewType = this.repeaterField.controlOptions.viewType;
|
|
10648
|
-
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10649
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10650
|
-
: '';
|
|
10651
|
-
multiFile.maxSizeForAllFilesInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
10652
|
-
multiFile.maxNoOfFiles = this.repeaterField.controlOptions.maxFileCount;
|
|
10653
|
-
multiFile.isMultipleFile = true;
|
|
10654
|
-
multiFile.value = this.value;
|
|
10655
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10656
|
-
multiFile.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10657
|
-
}
|
|
10658
|
-
this.renderComponentService.renderDynamicComponent(this.item, FileUploadComponent, this.group, multiFile);
|
|
10659
|
-
break;
|
|
10660
|
-
//#endregion
|
|
10661
|
-
//#region ImageUpload
|
|
10662
|
-
case DataType.Image:
|
|
10663
|
-
let image = new ImageUploadOptions();
|
|
10664
|
-
image.name =
|
|
10665
|
-
this.repeaterField.controlOptions.name +
|
|
10666
|
-
'.' +
|
|
10667
|
-
this.itemNumber.toString() +
|
|
10668
|
-
'.' +
|
|
10669
|
-
this.controlNumber.toString();
|
|
10670
|
-
image.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10671
|
-
image.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10672
|
-
image.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10673
|
-
image.viewType = this.repeaterField.controlOptions.viewType;
|
|
10674
|
-
image.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10675
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10676
|
-
: '';
|
|
10677
|
-
if (this.repeaterField.controlOptions.maxFileSizeInMB)
|
|
10678
|
-
image.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
10679
|
-
image.value = this.value;
|
|
10680
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10681
|
-
image.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10682
|
-
}
|
|
10683
|
-
this.renderComponentService.renderDynamicComponent(this.item, ImageUploaderComponent, this.group, image);
|
|
10684
|
-
break;
|
|
10685
|
-
case DataType.CoverPhoto:
|
|
10686
|
-
let coverPhoto = new ImageUploadOptions();
|
|
10687
|
-
coverPhoto.name =
|
|
10688
|
-
this.repeaterField.controlOptions.name +
|
|
10689
|
-
'.' +
|
|
10690
|
-
this.itemNumber.toString() +
|
|
10691
|
-
'.' +
|
|
10692
|
-
this.controlNumber.toString();
|
|
10693
|
-
coverPhoto.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10694
|
-
coverPhoto.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10695
|
-
coverPhoto.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10696
|
-
coverPhoto.viewType = this.repeaterField.controlOptions.viewType;
|
|
10697
|
-
coverPhoto.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10698
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10699
|
-
: '';
|
|
10700
|
-
if (this.repeaterField.controlOptions.maxFileSizeInMB)
|
|
10701
|
-
coverPhoto.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
10702
|
-
coverPhoto.value = this.value;
|
|
10703
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10704
|
-
coverPhoto.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10705
|
-
}
|
|
10706
|
-
this.renderComponentService.renderDynamicComponent(this.item, ImageUploaderComponent, this.group, coverPhoto);
|
|
10707
|
-
break;
|
|
10708
|
-
//#endregion
|
|
10709
|
-
//#region Mobile
|
|
10710
|
-
case DataType.Mobile:
|
|
10711
|
-
let mobile = new PhoneOptions();
|
|
10712
|
-
mobile.name =
|
|
10713
|
-
this.repeaterField.controlOptions.name +
|
|
10714
|
-
'.' +
|
|
10715
|
-
this.itemNumber.toString() +
|
|
10716
|
-
'.' +
|
|
10717
|
-
this.controlNumber.toString();
|
|
10718
|
-
mobile.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10719
|
-
mobile.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10720
|
-
mobile.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10721
|
-
mobile.viewType = this.repeaterField.controlOptions.viewType;
|
|
10722
|
-
mobile.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10723
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10724
|
-
: '';
|
|
10725
|
-
mobile.allowSearch = true;
|
|
10726
|
-
mobile.phoneValidation = true;
|
|
10727
|
-
mobile.selectFirstCountry = true;
|
|
10728
|
-
mobile.enablePlaceholder = true;
|
|
10729
|
-
mobile.value = this.value;
|
|
10730
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10731
|
-
mobile.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10732
|
-
}
|
|
10733
|
-
this.renderComponentService.renderDynamicComponent(this.item, PhoneComponent, this.group, mobile);
|
|
10734
|
-
break;
|
|
10735
|
-
//#endregion
|
|
10736
|
-
//#region MultilineText
|
|
10737
|
-
case DataType.MultilineText:
|
|
10738
|
-
let multilineText = new TextAreaOptions();
|
|
10739
|
-
multilineText.name =
|
|
10740
|
-
this.repeaterField.controlOptions.name +
|
|
10741
|
-
'.' +
|
|
10742
|
-
this.itemNumber.toString() +
|
|
10743
|
-
'.' +
|
|
10744
|
-
this.controlNumber.toString();
|
|
10745
|
-
multilineText.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10746
|
-
multilineText.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10747
|
-
multilineText.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10748
|
-
multilineText.viewType = this.repeaterField.controlOptions.viewType;
|
|
10749
|
-
multilineText.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10750
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10751
|
-
: '';
|
|
10752
|
-
if (this.repeaterField.controlOptions.maxLength)
|
|
10753
|
-
multilineText.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
10754
|
-
if (this.repeaterField.controlOptions.minLength)
|
|
10755
|
-
multilineText.minLength = this.repeaterField.controlOptions.minLength;
|
|
10756
|
-
multilineText.rows = this.repeaterField.controlOptions.rows;
|
|
10757
|
-
multilineText.forceDirection = this.repeaterField.controlOptions.forceDirection;
|
|
10758
|
-
multilineText.value = this.value;
|
|
10759
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10760
|
-
multilineText.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10761
|
-
}
|
|
10762
|
-
this.renderComponentService.renderDynamicComponent(this.item, TextAreaComponent, this.group, multilineText);
|
|
10763
|
-
break;
|
|
10764
|
-
//#endregion
|
|
10765
|
-
//#region HTML
|
|
10766
|
-
case DataType.HTML:
|
|
10767
|
-
let html = new HtmlEditorOptions();
|
|
10768
|
-
html.name =
|
|
10769
|
-
this.repeaterField.controlOptions.name +
|
|
10770
|
-
'.' +
|
|
10771
|
-
this.itemNumber.toString() +
|
|
10772
|
-
'.' +
|
|
10773
|
-
this.controlNumber.toString();
|
|
10774
|
-
html.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10775
|
-
html.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10776
|
-
html.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10777
|
-
html.viewType = this.repeaterField.controlOptions.viewType;
|
|
10778
|
-
html.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10779
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10780
|
-
: '';
|
|
10781
|
-
if (this.repeaterField.controlOptions.maxLength)
|
|
10782
|
-
html.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
10783
|
-
if (this.repeaterField.controlOptions.minLength)
|
|
10784
|
-
html.minLength = this.repeaterField.controlOptions.minLength;
|
|
10785
|
-
html.height = this.repeaterField.controlOptions.rows;
|
|
10786
|
-
html.forceDirection = this.repeaterField.controlOptions.forceDirection;
|
|
10787
|
-
html.value = this.value;
|
|
10788
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10789
|
-
html.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10790
|
-
}
|
|
10791
|
-
this.renderComponentService.renderDynamicComponent(this.item, HtmlEditorComponent, this.group, html);
|
|
10792
|
-
break;
|
|
10793
|
-
//#endregion
|
|
10794
|
-
//#region Boolean
|
|
10795
|
-
case DataType.Boolean:
|
|
10796
|
-
let boolean = new ToggleSlideOptions();
|
|
10797
|
-
boolean.name =
|
|
10798
|
-
this.repeaterField.controlOptions.name +
|
|
10799
|
-
'.' +
|
|
10800
|
-
this.itemNumber.toString() +
|
|
10801
|
-
'.' +
|
|
10802
|
-
this.controlNumber.toString();
|
|
10803
|
-
boolean.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10804
|
-
boolean.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10805
|
-
boolean.viewType = this.repeaterField.controlOptions.viewType;
|
|
10806
|
-
boolean.value = this.value;
|
|
10807
|
-
boolean.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10808
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10809
|
-
: '';
|
|
10810
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10811
|
-
boolean.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10812
|
-
}
|
|
10813
|
-
this.renderComponentService.renderDynamicComponent(this.item, ToggleslideComponent, this.group, boolean);
|
|
10814
|
-
break;
|
|
10815
|
-
//#endregion
|
|
10816
|
-
//#region Location
|
|
10817
|
-
case DataType.Location:
|
|
10818
|
-
let location = new MapAutoCompleteOptions();
|
|
10819
|
-
location.name =
|
|
10820
|
-
this.repeaterField.controlOptions.name +
|
|
10821
|
-
'.' +
|
|
10822
|
-
this.itemNumber.toString() +
|
|
10823
|
-
'.' +
|
|
10824
|
-
this.controlNumber.toString();
|
|
10825
|
-
location.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10826
|
-
location.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10827
|
-
location.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10828
|
-
location.viewType = this.repeaterField.controlOptions.viewType;
|
|
10829
|
-
location.value = this.value;
|
|
10830
|
-
location.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10831
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10832
|
-
: '';
|
|
10833
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10834
|
-
location.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10835
|
-
}
|
|
10836
|
-
this.renderComponentService.renderDynamicComponent(this.item, MapAutoCompleteComponent, this.group, location);
|
|
10837
|
-
break;
|
|
10838
|
-
//#endregion
|
|
10839
|
-
//#region CheckBox
|
|
10840
|
-
case DataType.CheckBox:
|
|
10841
|
-
let checkBox = new CheckBoxOptions();
|
|
10842
|
-
checkBox.name =
|
|
10843
|
-
this.repeaterField.controlOptions.name +
|
|
10844
|
-
'.' +
|
|
10845
|
-
this.itemNumber.toString() +
|
|
10846
|
-
'.' +
|
|
10847
|
-
this.controlNumber.toString();
|
|
10848
|
-
checkBox.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10849
|
-
checkBox.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10850
|
-
checkBox.viewType = this.repeaterField.controlOptions.viewType;
|
|
10851
|
-
checkBox.outputFunction = this.repeaterField.controlOptions.outputFunction;
|
|
10852
|
-
checkBox.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10853
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10854
|
-
: '';
|
|
10855
|
-
checkBox.value = this.value;
|
|
10856
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10857
|
-
checkBox.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10858
|
-
}
|
|
10859
|
-
this.renderComponentService.renderDynamicComponent(this.item, CheckBoxComponent, this.group, checkBox);
|
|
10860
|
-
break;
|
|
10861
|
-
//#endregion
|
|
10862
|
-
default:
|
|
10863
|
-
break;
|
|
10864
|
-
}
|
|
10649
|
+
const value = this.extractValueFromItemsValue();
|
|
10650
|
+
const controlName = this.buildControlName(this.itemNumber);
|
|
10651
|
+
this.renderField(controlName, value);
|
|
10865
10652
|
}, 0);
|
|
10866
10653
|
}
|
|
10867
10654
|
ngOnChanges(changes) {
|
|
10868
|
-
if (changes.itemNumber)
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
text.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10890
|
-
text.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10891
|
-
text.viewType = this.repeaterField.controlOptions.viewType;
|
|
10892
|
-
text.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10893
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10894
|
-
: '';
|
|
10895
|
-
text.type = InputType.Text;
|
|
10896
|
-
if (this.repeaterField.controlOptions.maxLength)
|
|
10897
|
-
text.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
10898
|
-
if (this.repeaterField.controlOptions.minLength)
|
|
10899
|
-
text.minLength = this.repeaterField.controlOptions.minLength;
|
|
10900
|
-
text.value = value;
|
|
10901
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10902
|
-
text.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10903
|
-
}
|
|
10904
|
-
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, text);
|
|
10905
|
-
break;
|
|
10906
|
-
case DataType.Name:
|
|
10907
|
-
let name = new TextBoxOptions();
|
|
10908
|
-
name.name =
|
|
10909
|
-
this.repeaterField.controlOptions.name +
|
|
10910
|
-
'.' +
|
|
10911
|
-
changes.itemNumber.currentValue +
|
|
10912
|
-
'.' +
|
|
10913
|
-
this.controlNumber.toString();
|
|
10914
|
-
name.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10915
|
-
name.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10916
|
-
name.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10917
|
-
name.viewType = this.repeaterField.controlOptions.viewType;
|
|
10918
|
-
name.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10919
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10920
|
-
: '';
|
|
10921
|
-
if (this.repeaterField.controlOptions.maxLength)
|
|
10922
|
-
name.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
10923
|
-
if (this.repeaterField.controlOptions.minLength)
|
|
10924
|
-
name.minLength = this.repeaterField.controlOptions.minLength;
|
|
10925
|
-
name.type = InputType.Text;
|
|
10926
|
-
name.value = value;
|
|
10927
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10928
|
-
name.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10929
|
-
}
|
|
10930
|
-
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, name);
|
|
10931
|
-
break;
|
|
10932
|
-
case DataType.Email:
|
|
10933
|
-
let email = new TextBoxOptions();
|
|
10934
|
-
email.name =
|
|
10935
|
-
this.repeaterField.controlOptions.name +
|
|
10936
|
-
'.' +
|
|
10937
|
-
changes.itemNumber.currentValue +
|
|
10938
|
-
'.' +
|
|
10939
|
-
this.controlNumber.toString();
|
|
10940
|
-
email.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10941
|
-
email.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10942
|
-
email.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10943
|
-
email.viewType = this.repeaterField.controlOptions.viewType;
|
|
10944
|
-
email.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10945
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10946
|
-
: '';
|
|
10947
|
-
email.type = InputType.Email;
|
|
10948
|
-
email.value = value;
|
|
10949
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10950
|
-
email.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10951
|
-
}
|
|
10952
|
-
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, email);
|
|
10953
|
-
break;
|
|
10954
|
-
case DataType.Number:
|
|
10955
|
-
let number = new TextBoxOptions();
|
|
10956
|
-
number.name =
|
|
10957
|
-
this.repeaterField.controlOptions.name +
|
|
10958
|
-
'.' +
|
|
10959
|
-
changes.itemNumber.currentValue +
|
|
10960
|
-
'.' +
|
|
10961
|
-
this.controlNumber.toString();
|
|
10962
|
-
number.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10963
|
-
number.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10964
|
-
number.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10965
|
-
number.viewType = this.repeaterField.controlOptions.viewType;
|
|
10966
|
-
number.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
10967
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
10968
|
-
: '';
|
|
10969
|
-
number.type = InputType.Number;
|
|
10970
|
-
let rangeNumber = new RangeNumber();
|
|
10971
|
-
rangeNumber.to = this.repeaterField.controlOptions.maxLength;
|
|
10972
|
-
rangeNumber.from = this.repeaterField.controlOptions.minLength;
|
|
10973
|
-
number.numberRange = rangeNumber;
|
|
10974
|
-
number.value = value;
|
|
10975
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10976
|
-
number.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10977
|
-
}
|
|
10978
|
-
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, number);
|
|
10979
|
-
break;
|
|
10980
|
-
case DataType.URL:
|
|
10981
|
-
let url = new TextBoxOptions();
|
|
10982
|
-
url.name = `${this.repeaterField.controlOptions.name}.${changes.itemNumber.currentValue}.${this.controlNumber}`;
|
|
10983
|
-
url.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
10984
|
-
url.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
10985
|
-
url.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
10986
|
-
url.viewType = this.repeaterField.controlOptions.viewType;
|
|
10987
|
-
url.labelDescription = this.repeaterField.controlOptions.labelDescription ? this.repeaterField.controlOptions.labelDescription : '';
|
|
10988
|
-
url.type = InputType.URL;
|
|
10989
|
-
url.value = value;
|
|
10990
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
10991
|
-
url.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
10992
|
-
}
|
|
10993
|
-
this.renderComponentService.renderDynamicComponent(this.item, TextboxComponent, this.group, url);
|
|
10994
|
-
break;
|
|
10995
|
-
//#endregion
|
|
10996
|
-
//#region DateTime
|
|
10997
|
-
case DataType.Date:
|
|
10998
|
-
let date = new DatePickerOptions();
|
|
10999
|
-
date.name = `${this.repeaterField.controlOptions.name}.${changes.itemNumber.currentValue}.${this.controlNumber}`;
|
|
11000
|
-
date.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11001
|
-
date.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11002
|
-
date.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11003
|
-
date.viewType = this.repeaterField.controlOptions.viewType;
|
|
11004
|
-
date.labelDescription = this.repeaterField.controlOptions.labelDescription ? this.repeaterField.controlOptions.labelDescription : '';
|
|
11005
|
-
date.startDate = this.repeaterField.controlOptions.startDate;
|
|
11006
|
-
date.endDate = this.repeaterField.controlOptions.endDate;
|
|
11007
|
-
date.pickerType = PickerType.Calendar;
|
|
11008
|
-
date.selectMode = SelectMode.Single;
|
|
11009
|
-
date.startView = StartView.Month;
|
|
11010
|
-
date.value = value;
|
|
11011
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11012
|
-
date.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11013
|
-
}
|
|
11014
|
-
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, date);
|
|
11015
|
-
break;
|
|
11016
|
-
case DataType.DateTime:
|
|
11017
|
-
let dateTime = new DatePickerOptions();
|
|
11018
|
-
dateTime.name = `${this.repeaterField.controlOptions.name}.${changes.itemNumber.currentValue}.${this.controlNumber}`;
|
|
11019
|
-
dateTime.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11020
|
-
dateTime.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11021
|
-
dateTime.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11022
|
-
dateTime.viewType = this.repeaterField.controlOptions.viewType;
|
|
11023
|
-
dateTime.labelDescription = this.repeaterField.controlOptions.labelDescription ? this.repeaterField.controlOptions.labelDescription : '';
|
|
11024
|
-
dateTime.startDate = this.repeaterField.controlOptions.startDate;
|
|
11025
|
-
dateTime.endDate = this.repeaterField.controlOptions.endDate;
|
|
11026
|
-
dateTime.pickerType = PickerType.Both;
|
|
11027
|
-
dateTime.selectMode = SelectMode.Single;
|
|
11028
|
-
dateTime.startView = StartView.Month;
|
|
11029
|
-
dateTime.value = value;
|
|
11030
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11031
|
-
dateTime.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11032
|
-
}
|
|
11033
|
-
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, dateTime);
|
|
11034
|
-
break;
|
|
11035
|
-
case DataType.Time:
|
|
11036
|
-
let time = new DatePickerOptions();
|
|
11037
|
-
time.name = `${this.repeaterField.controlOptions.name}.${changes.itemNumber.currentValue}.${this.controlNumber}`;
|
|
11038
|
-
time.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11039
|
-
time.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11040
|
-
time.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11041
|
-
time.viewType = this.repeaterField.controlOptions.viewType;
|
|
11042
|
-
time.labelDescription = this.repeaterField.controlOptions.labelDescription ? this.repeaterField.controlOptions.labelDescription : '';
|
|
11043
|
-
time.pickerType = PickerType.Timer;
|
|
11044
|
-
time.selectMode = SelectMode.Single;
|
|
11045
|
-
time.startView = StartView.Month;
|
|
11046
|
-
time.value = value;
|
|
11047
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11048
|
-
time.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11049
|
-
}
|
|
11050
|
-
this.renderComponentService.renderDynamicComponent(this.item, DateInputComponent, this.group, time);
|
|
11051
|
-
break;
|
|
11052
|
-
//#endregion
|
|
11053
|
-
//#region Dropdown
|
|
11054
|
-
case DataType.SingleSelect:
|
|
11055
|
-
let singleSelect = new DropdownOptions();
|
|
11056
|
-
singleSelect.name =
|
|
11057
|
-
this.repeaterField.controlOptions.name +
|
|
11058
|
-
'.' +
|
|
11059
|
-
changes.itemNumber.currentValue +
|
|
11060
|
-
'.' +
|
|
11061
|
-
this.controlNumber.toString();
|
|
11062
|
-
singleSelect.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11063
|
-
singleSelect.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11064
|
-
singleSelect.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11065
|
-
singleSelect.viewType = this.repeaterField.controlOptions.viewType;
|
|
11066
|
-
singleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11067
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11068
|
-
: '';
|
|
11069
|
-
singleSelect.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
11070
|
-
singleSelect.singleSelection = true;
|
|
11071
|
-
singleSelect.showCheckbox = false;
|
|
11072
|
-
singleSelect.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
11073
|
-
singleSelect.selectedItems = value;
|
|
11074
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11075
|
-
singleSelect.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11076
|
-
}
|
|
11077
|
-
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, singleSelect);
|
|
11078
|
-
break;
|
|
11079
|
-
case DataType.MulipleSelect:
|
|
11080
|
-
let mulipleSelect = new DropdownOptions();
|
|
11081
|
-
mulipleSelect.name =
|
|
11082
|
-
this.repeaterField.controlOptions.name +
|
|
11083
|
-
'.' +
|
|
11084
|
-
changes.itemNumber.currentValue +
|
|
11085
|
-
'.' +
|
|
11086
|
-
this.controlNumber.toString();
|
|
11087
|
-
mulipleSelect.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11088
|
-
mulipleSelect.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11089
|
-
mulipleSelect.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11090
|
-
mulipleSelect.viewType = this.repeaterField.controlOptions.viewType;
|
|
11091
|
-
mulipleSelect.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11092
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11093
|
-
: '';
|
|
11094
|
-
mulipleSelect.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
11095
|
-
mulipleSelect.singleSelection = false;
|
|
11096
|
-
mulipleSelect.showCheckbox = false;
|
|
11097
|
-
mulipleSelect.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
11098
|
-
mulipleSelect.selectedItems = value;
|
|
11099
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11100
|
-
mulipleSelect.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11101
|
-
}
|
|
11102
|
-
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, mulipleSelect);
|
|
11103
|
-
break;
|
|
11104
|
-
case DataType.Goal:
|
|
11105
|
-
let goal = new DropdownOptions();
|
|
11106
|
-
goal.name =
|
|
11107
|
-
this.repeaterField.controlOptions.name +
|
|
11108
|
-
'.' +
|
|
11109
|
-
changes.itemNumber.currentValue +
|
|
11110
|
-
'.' +
|
|
11111
|
-
this.controlNumber.toString();
|
|
11112
|
-
goal.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11113
|
-
goal.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11114
|
-
goal.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11115
|
-
goal.viewType = this.repeaterField.controlOptions.viewType;
|
|
11116
|
-
goal.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11117
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11118
|
-
: '';
|
|
11119
|
-
goal.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
11120
|
-
goal.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
11121
|
-
goal.showCheckbox = false;
|
|
11122
|
-
goal.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
11123
|
-
goal.selectedItems = value;
|
|
11124
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11125
|
-
goal.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11126
|
-
}
|
|
11127
|
-
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, goal);
|
|
11128
|
-
break;
|
|
11129
|
-
case DataType.Challenge:
|
|
11130
|
-
let challenge = new DropdownOptions();
|
|
11131
|
-
challenge.name =
|
|
11132
|
-
this.repeaterField.controlOptions.name +
|
|
11133
|
-
'.' +
|
|
11134
|
-
changes.itemNumber.currentValue +
|
|
11135
|
-
'.' +
|
|
11136
|
-
this.controlNumber.toString();
|
|
11137
|
-
challenge.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11138
|
-
challenge.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11139
|
-
challenge.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11140
|
-
challenge.viewType = this.repeaterField.controlOptions.viewType;
|
|
11141
|
-
challenge.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11142
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11143
|
-
: '';
|
|
11144
|
-
challenge.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
11145
|
-
challenge.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
11146
|
-
challenge.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
11147
|
-
challenge.showCheckbox = false;
|
|
11148
|
-
challenge.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
11149
|
-
challenge.selectedItems = value;
|
|
11150
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11151
|
-
challenge.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11152
|
-
}
|
|
11153
|
-
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, challenge);
|
|
11154
|
-
break;
|
|
11155
|
-
case DataType.InnovationLab:
|
|
11156
|
-
let innovationLab = new DropdownOptions();
|
|
11157
|
-
innovationLab.name =
|
|
11158
|
-
this.repeaterField.controlOptions.name +
|
|
11159
|
-
'.' +
|
|
11160
|
-
changes.itemNumber.currentValue +
|
|
11161
|
-
'.' +
|
|
11162
|
-
this.controlNumber.toString();
|
|
11163
|
-
innovationLab.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11164
|
-
innovationLab.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11165
|
-
innovationLab.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11166
|
-
innovationLab.viewType = this.repeaterField.controlOptions.viewType;
|
|
11167
|
-
innovationLab.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11168
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11169
|
-
: '';
|
|
11170
|
-
innovationLab.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
11171
|
-
innovationLab.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
11172
|
-
innovationLab.showCheckbox = false;
|
|
11173
|
-
innovationLab.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
11174
|
-
innovationLab.selectedItems = value;
|
|
11175
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11176
|
-
innovationLab.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11177
|
-
}
|
|
11178
|
-
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, innovationLab);
|
|
11179
|
-
break;
|
|
11180
|
-
case DataType.Country:
|
|
11181
|
-
let country = new DropdownOptions();
|
|
11182
|
-
country.name =
|
|
11183
|
-
this.repeaterField.controlOptions.name +
|
|
11184
|
-
'.' +
|
|
11185
|
-
changes.itemNumber.currentValue +
|
|
11186
|
-
'.' +
|
|
11187
|
-
this.controlNumber.toString();
|
|
11188
|
-
country.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11189
|
-
country.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11190
|
-
country.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11191
|
-
country.viewType = this.repeaterField.controlOptions.viewType;
|
|
11192
|
-
country.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11193
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11194
|
-
: '';
|
|
11195
|
-
country.dataSource = this.repeaterField.controlOptions.dataSource;
|
|
11196
|
-
country.singleSelection = !this.repeaterField.controlOptions.isMultiple;
|
|
11197
|
-
country.showCheckbox = false;
|
|
11198
|
-
country.allowSearchFilter = this.repeaterField.controlOptions.hasSearch;
|
|
11199
|
-
country.selectedItems = value;
|
|
11200
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11201
|
-
country.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11202
|
-
}
|
|
11203
|
-
this.renderComponentService.renderDynamicComponent(this.item, DropdownListComponent, this.group, country);
|
|
11204
|
-
break;
|
|
11205
|
-
//#endregion
|
|
11206
|
-
//#region FileUpload
|
|
11207
|
-
case DataType.File:
|
|
11208
|
-
let file = new FileUploadOptions();
|
|
11209
|
-
file.name =
|
|
11210
|
-
this.repeaterField.controlOptions.name +
|
|
11211
|
-
'.' +
|
|
11212
|
-
changes.itemNumber.currentValue +
|
|
11213
|
-
'.' +
|
|
11214
|
-
this.controlNumber.toString();
|
|
11215
|
-
file.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11216
|
-
file.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11217
|
-
file.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11218
|
-
file.viewType = this.repeaterField.controlOptions.viewType;
|
|
11219
|
-
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11220
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11221
|
-
: '';
|
|
11222
|
-
file.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
11223
|
-
file.value = value;
|
|
11224
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11225
|
-
file.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11226
|
-
}
|
|
11227
|
-
this.renderComponentService.renderDynamicComponent(this.item, FileUploadComponent, this.group, file);
|
|
11228
|
-
break;
|
|
11229
|
-
case DataType.MultiFile:
|
|
11230
|
-
let multiFile = new FileUploadOptions();
|
|
11231
|
-
file.name =
|
|
11232
|
-
this.repeaterField.controlOptions.name +
|
|
11233
|
-
'.' +
|
|
11234
|
-
changes.itemNumber.currentValue +
|
|
11235
|
-
'.' +
|
|
11236
|
-
this.controlNumber.toString();
|
|
11237
|
-
file.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11238
|
-
file.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11239
|
-
file.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11240
|
-
file.viewType = this.repeaterField.controlOptions.viewType;
|
|
11241
|
-
file.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11242
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11243
|
-
: '';
|
|
11244
|
-
multiFile.maxSizeForAllFilesInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
11245
|
-
multiFile.maxNoOfFiles = this.repeaterField.controlOptions.maxFileCount;
|
|
11246
|
-
multiFile.isMultipleFile = true;
|
|
11247
|
-
multiFile.value = value;
|
|
11248
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11249
|
-
multiFile.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11250
|
-
}
|
|
11251
|
-
this.renderComponentService.renderDynamicComponent(this.item, FileUploadComponent, this.group, multiFile);
|
|
11252
|
-
break;
|
|
11253
|
-
//#endregion
|
|
11254
|
-
//#region ImageUpload
|
|
11255
|
-
case DataType.Image:
|
|
11256
|
-
let image = new ImageUploadOptions();
|
|
11257
|
-
image.name =
|
|
11258
|
-
this.repeaterField.controlOptions.name +
|
|
11259
|
-
'.' +
|
|
11260
|
-
changes.itemNumber.currentValue +
|
|
11261
|
-
'.' +
|
|
11262
|
-
this.controlNumber.toString();
|
|
11263
|
-
image.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11264
|
-
image.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11265
|
-
image.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11266
|
-
image.viewType = this.repeaterField.controlOptions.viewType;
|
|
11267
|
-
image.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11268
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11269
|
-
: '';
|
|
11270
|
-
if (this.repeaterField.controlOptions.maxFileSizeInMB)
|
|
11271
|
-
image.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
11272
|
-
image.value = value;
|
|
11273
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11274
|
-
image.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11275
|
-
}
|
|
11276
|
-
this.renderComponentService.renderDynamicComponent(this.item, ImageUploaderComponent, this.group, image);
|
|
11277
|
-
break;
|
|
11278
|
-
case DataType.CoverPhoto:
|
|
11279
|
-
let coverPhoto = new ImageUploadOptions();
|
|
11280
|
-
coverPhoto.name =
|
|
11281
|
-
this.repeaterField.controlOptions.name +
|
|
11282
|
-
'.' +
|
|
11283
|
-
changes.itemNumber.currentValue +
|
|
11284
|
-
'.' +
|
|
11285
|
-
this.controlNumber.toString();
|
|
11286
|
-
coverPhoto.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11287
|
-
coverPhoto.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11288
|
-
coverPhoto.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11289
|
-
coverPhoto.viewType = this.repeaterField.controlOptions.viewType;
|
|
11290
|
-
coverPhoto.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11291
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11292
|
-
: '';
|
|
11293
|
-
if (this.repeaterField.controlOptions.maxFileSizeInMB)
|
|
11294
|
-
coverPhoto.fileMaxSizeInMB = this.repeaterField.controlOptions.maxFileSizeInMB;
|
|
11295
|
-
coverPhoto.value = value;
|
|
11296
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11297
|
-
coverPhoto.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11298
|
-
}
|
|
11299
|
-
this.renderComponentService.renderDynamicComponent(this.item, ImageUploaderComponent, this.group, coverPhoto);
|
|
11300
|
-
break;
|
|
11301
|
-
//#endregion
|
|
11302
|
-
//#region Mobile
|
|
11303
|
-
case DataType.Mobile:
|
|
11304
|
-
let mobile = new PhoneOptions();
|
|
11305
|
-
mobile.name =
|
|
11306
|
-
this.repeaterField.controlOptions.name +
|
|
11307
|
-
'.' +
|
|
11308
|
-
changes.itemNumber.currentValue +
|
|
11309
|
-
'.' +
|
|
11310
|
-
this.controlNumber.toString();
|
|
11311
|
-
mobile.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11312
|
-
mobile.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11313
|
-
mobile.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11314
|
-
mobile.viewType = this.repeaterField.controlOptions.viewType;
|
|
11315
|
-
mobile.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11316
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11317
|
-
: '';
|
|
11318
|
-
mobile.allowSearch = true;
|
|
11319
|
-
mobile.phoneValidation = true;
|
|
11320
|
-
mobile.selectFirstCountry = true;
|
|
11321
|
-
mobile.enablePlaceholder = true;
|
|
11322
|
-
mobile.value = value;
|
|
11323
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11324
|
-
mobile.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11325
|
-
}
|
|
11326
|
-
this.renderComponentService.renderDynamicComponent(this.item, PhoneComponent, this.group, mobile);
|
|
11327
|
-
break;
|
|
11328
|
-
//#endregion
|
|
11329
|
-
//#region MultilineText
|
|
11330
|
-
case DataType.MultilineText:
|
|
11331
|
-
let multilineText = new TextAreaOptions();
|
|
11332
|
-
multilineText.name =
|
|
11333
|
-
this.repeaterField.controlOptions.name +
|
|
11334
|
-
'.' +
|
|
11335
|
-
changes.itemNumber.currentValue +
|
|
11336
|
-
'.' +
|
|
11337
|
-
this.controlNumber.toString();
|
|
11338
|
-
multilineText.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11339
|
-
multilineText.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11340
|
-
multilineText.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11341
|
-
multilineText.viewType = this.repeaterField.controlOptions.viewType;
|
|
11342
|
-
multilineText.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11343
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11344
|
-
: '';
|
|
11345
|
-
if (this.repeaterField.controlOptions.maxLength)
|
|
11346
|
-
multilineText.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
11347
|
-
if (this.repeaterField.controlOptions.minLength)
|
|
11348
|
-
multilineText.minLength = this.repeaterField.controlOptions.minLength;
|
|
11349
|
-
multilineText.rows = this.repeaterField.controlOptions.rows;
|
|
11350
|
-
multilineText.forceDirection = this.repeaterField.controlOptions.forceDirection;
|
|
11351
|
-
multilineText.value = value;
|
|
11352
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11353
|
-
multilineText.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11354
|
-
}
|
|
11355
|
-
this.renderComponentService.renderDynamicComponent(this.item, TextAreaComponent, this.group, multilineText);
|
|
11356
|
-
break;
|
|
11357
|
-
//#endregion
|
|
11358
|
-
//#region HTML
|
|
11359
|
-
case DataType.HTML:
|
|
11360
|
-
let html = new HtmlEditorOptions();
|
|
11361
|
-
html.name =
|
|
11362
|
-
this.repeaterField.controlOptions.name +
|
|
11363
|
-
'.' +
|
|
11364
|
-
changes.itemNumber.currentValue +
|
|
11365
|
-
'.' +
|
|
11366
|
-
this.controlNumber.toString();
|
|
11367
|
-
html.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11368
|
-
html.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11369
|
-
html.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11370
|
-
html.viewType = this.repeaterField.controlOptions.viewType;
|
|
11371
|
-
html.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11372
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11373
|
-
: '';
|
|
11374
|
-
if (this.repeaterField.controlOptions.maxLength)
|
|
11375
|
-
html.maxLength = this.repeaterField.controlOptions.maxLength;
|
|
11376
|
-
if (this.repeaterField.controlOptions.minLength)
|
|
11377
|
-
html.minLength = this.repeaterField.controlOptions.minLength;
|
|
11378
|
-
html.height = this.repeaterField.controlOptions.rows;
|
|
11379
|
-
html.forceDirection = this.repeaterField.controlOptions.forceDirection;
|
|
11380
|
-
html.value = value;
|
|
11381
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11382
|
-
html.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11383
|
-
}
|
|
11384
|
-
this.renderComponentService.renderDynamicComponent(this.item, HtmlEditorComponent, this.group, html);
|
|
11385
|
-
break;
|
|
11386
|
-
//#endregion
|
|
11387
|
-
//#region Boolean
|
|
11388
|
-
case DataType.Boolean:
|
|
11389
|
-
let boolean = new ToggleSlideOptions();
|
|
11390
|
-
boolean.name =
|
|
11391
|
-
this.repeaterField.controlOptions.name +
|
|
11392
|
-
'.' +
|
|
11393
|
-
changes.itemNumber.currentValue +
|
|
11394
|
-
'.' +
|
|
11395
|
-
this.controlNumber.toString();
|
|
11396
|
-
boolean.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11397
|
-
boolean.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11398
|
-
boolean.viewType = this.repeaterField.controlOptions.viewType;
|
|
11399
|
-
boolean.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11400
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11401
|
-
: '';
|
|
11402
|
-
boolean.value = value;
|
|
11403
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11404
|
-
boolean.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11405
|
-
}
|
|
11406
|
-
this.renderComponentService.renderDynamicComponent(this.item, ToggleslideComponent, this.group, boolean);
|
|
11407
|
-
break;
|
|
11408
|
-
//#endregion
|
|
11409
|
-
//#region Location
|
|
11410
|
-
case DataType.Location:
|
|
11411
|
-
let location = new MapAutoCompleteOptions();
|
|
11412
|
-
location.name =
|
|
11413
|
-
this.repeaterField.controlOptions.name +
|
|
11414
|
-
'.' +
|
|
11415
|
-
changes.itemNumber.currentValue +
|
|
11416
|
-
'.' +
|
|
11417
|
-
this.controlNumber.toString();
|
|
11418
|
-
location.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11419
|
-
location.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11420
|
-
location.isRequired = this.repeaterField.controlOptions.isRequired;
|
|
11421
|
-
location.viewType = this.repeaterField.controlOptions.viewType;
|
|
11422
|
-
location.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11423
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11424
|
-
: '';
|
|
11425
|
-
location.value = value;
|
|
11426
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11427
|
-
location.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11428
|
-
}
|
|
11429
|
-
this.renderComponentService.renderDynamicComponent(this.item, MapAutoCompleteComponent, this.group, location);
|
|
11430
|
-
break;
|
|
11431
|
-
//#endregion
|
|
11432
|
-
//#region CheckBox
|
|
11433
|
-
case DataType.CheckBox:
|
|
11434
|
-
let checkBox = new CheckBoxOptions();
|
|
11435
|
-
checkBox.name =
|
|
11436
|
-
this.repeaterField.controlOptions.name +
|
|
11437
|
-
'.' +
|
|
11438
|
-
changes.itemNumber.currentValue +
|
|
11439
|
-
'.' +
|
|
11440
|
-
this.controlNumber.toString();
|
|
11441
|
-
checkBox.hideLabel = this.repeaterField.controlOptions.hideLabel;
|
|
11442
|
-
checkBox.labelKey = this.repeaterField.controlOptions.labelKey;
|
|
11443
|
-
checkBox.viewType = this.repeaterField.controlOptions.viewType;
|
|
11444
|
-
checkBox.labelDescription = this.repeaterField.controlOptions.labelDescription
|
|
11445
|
-
? this.repeaterField.controlOptions.labelDescription
|
|
11446
|
-
: '';
|
|
11447
|
-
checkBox.outputFunction = this.repeaterField.controlOptions.outputFunction;
|
|
11448
|
-
checkBox.value = value;
|
|
11449
|
-
if (this.repeaterField.controlOptions.customValidation.length > 0) {
|
|
11450
|
-
checkBox.customValidation = this.repeaterField.controlOptions.customValidation;
|
|
11451
|
-
}
|
|
11452
|
-
this.renderComponentService.renderDynamicComponent(this.item, CheckBoxComponent, this.group, checkBox);
|
|
11453
|
-
break;
|
|
11454
|
-
//#endregion
|
|
11455
|
-
default:
|
|
11456
|
-
break;
|
|
10655
|
+
if (changes.itemNumber?.previousValue) {
|
|
10656
|
+
const oldName = this.buildControlName(changes.itemNumber.previousValue);
|
|
10657
|
+
const value = this.group.controls[oldName].value;
|
|
10658
|
+
this.item.clear();
|
|
10659
|
+
this.group.removeControl(oldName);
|
|
10660
|
+
const newName = this.buildControlName(changes.itemNumber.currentValue);
|
|
10661
|
+
this.renderField(newName, value);
|
|
10662
|
+
}
|
|
10663
|
+
}
|
|
10664
|
+
/**
|
|
10665
|
+
* Extracts the value for the current item from itemsValue array
|
|
10666
|
+
*/
|
|
10667
|
+
extractValueFromItemsValue() {
|
|
10668
|
+
if (this.itemsValue.length > 0) {
|
|
10669
|
+
this.itemValue = this.itemsValue[this.itemNumber];
|
|
10670
|
+
}
|
|
10671
|
+
if (this.itemValue) {
|
|
10672
|
+
for (const key in this.itemValue) {
|
|
10673
|
+
if (Object.prototype.hasOwnProperty.call(this.itemValue, key) &&
|
|
10674
|
+
key === this.repeaterField.controlOptions.name) {
|
|
10675
|
+
return this.itemValue[key];
|
|
11457
10676
|
}
|
|
11458
10677
|
}
|
|
10678
|
+
}
|
|
10679
|
+
return null;
|
|
10680
|
+
}
|
|
10681
|
+
/**
|
|
10682
|
+
* Builds the control name based on item number
|
|
10683
|
+
*/
|
|
10684
|
+
buildControlName(itemNum) {
|
|
10685
|
+
return `${this.repeaterField.controlOptions.name}.${itemNum}.${this.controlNumber}`;
|
|
10686
|
+
}
|
|
10687
|
+
/**
|
|
10688
|
+
* Renders the field using the factory service
|
|
10689
|
+
*/
|
|
10690
|
+
renderField(controlName, value) {
|
|
10691
|
+
try {
|
|
10692
|
+
const options = this.fieldConfigFactory.createFieldOptions(this.repeaterField.controlType, this.repeaterField.controlOptions, controlName, value);
|
|
10693
|
+
const componentType = this.fieldConfigFactory.getComponentType(this.repeaterField.controlType);
|
|
10694
|
+
this.renderComponentService.renderDynamicComponent(this.item, componentType, this.group, options);
|
|
10695
|
+
}
|
|
10696
|
+
catch (error) {
|
|
10697
|
+
console.error('Error rendering field:', error);
|
|
10698
|
+
}
|
|
11459
10699
|
}
|
|
11460
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: RepeaterFieldBuilderComponent, deps: [{ token: RenderComponentService }, { token: i2.FormGroupDirective }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11461
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.16", type: RepeaterFieldBuilderComponent, isStandalone: true, selector: "repeater-field-builder", inputs: { group: "group", itemNumber: "itemNumber", controlNumber: "controlNumber", repeaterField: "repeaterField", itemsValue: "itemsValue" }, viewQueries: [{ propertyName: "item", first: true, predicate: ["Item"], descendants: true, read: ViewContainerRef }], usesOnChanges: true, ngImport: i0, template: "<ng-container #Item></ng-container>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
|
|
10700
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: RepeaterFieldBuilderComponent, deps: [{ token: RenderComponentService }, { token: FieldConfigFactoryService }, { token: i2.FormGroupDirective }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10701
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.16", type: RepeaterFieldBuilderComponent, isStandalone: true, selector: "repeater-field-builder", inputs: { group: "group", itemNumber: "itemNumber", controlNumber: "controlNumber", repeaterField: "repeaterField", itemsValue: "itemsValue" }, providers: [FieldConfigFactoryService], viewQueries: [{ propertyName: "item", first: true, predicate: ["Item"], descendants: true, read: ViewContainerRef }], usesOnChanges: true, ngImport: i0, template: "<ng-container #Item></ng-container>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
|
|
11462
10702
|
}
|
|
11463
10703
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: RepeaterFieldBuilderComponent, decorators: [{
|
|
11464
10704
|
type: Component,
|
|
11465
|
-
args: [{ selector: 'repeater-field-builder', standalone: true, imports: [CommonModule, FormsModule, ReactiveFormsModule], schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA], template: "<ng-container #Item></ng-container>\r\n" }]
|
|
11466
|
-
}], ctorParameters: () => [{ type: RenderComponentService }, { type: i2.FormGroupDirective }], propDecorators: { item: [{
|
|
10705
|
+
args: [{ selector: 'repeater-field-builder', standalone: true, imports: [CommonModule, FormsModule, ReactiveFormsModule], providers: [FieldConfigFactoryService], schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA], template: "<ng-container #Item></ng-container>\r\n" }]
|
|
10706
|
+
}], ctorParameters: () => [{ type: RenderComponentService }, { type: FieldConfigFactoryService }, { type: i2.FormGroupDirective }], propDecorators: { item: [{
|
|
11467
10707
|
type: ViewChild,
|
|
11468
10708
|
args: ['Item', { read: ViewContainerRef }]
|
|
11469
10709
|
}], group: [{
|
|
@@ -11571,8 +10811,7 @@ class RepeaterComponent {
|
|
|
11571
10811
|
}
|
|
11572
10812
|
}
|
|
11573
10813
|
this.items.splice(deletedIndex, 1);
|
|
11574
|
-
|
|
11575
|
-
//this.items.filter((res) => res != this.items[deletedIndex]);
|
|
10814
|
+
this.originalItems.splice(Number(deletedIndex), 1);
|
|
11576
10815
|
}
|
|
11577
10816
|
addItem() {
|
|
11578
10817
|
this.items.push(this.items.length);
|
|
@@ -11712,6 +10951,7 @@ class RepeaterTableComponent {
|
|
|
11712
10951
|
}
|
|
11713
10952
|
}
|
|
11714
10953
|
this.items = this.items.filter((res) => res != this.items[deletedIndex]);
|
|
10954
|
+
this.originalItems.splice(Number(deletedIndex), 1);
|
|
11715
10955
|
}
|
|
11716
10956
|
addItem() {
|
|
11717
10957
|
if (this.items.length == 0)
|