@bnsights/bbsf-controls 1.0.28 → 1.0.31
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 +2 -3
- package/bnsights-bbsf-controls-1.0.31.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +524 -355
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/Enums/LanguageValidation.js +6 -0
- package/esm2015/lib/Shared/Models/RepeaterField.js +1 -1
- package/esm2015/lib/Shared/Models/RepeaterOptions.js +2 -1
- package/esm2015/lib/Shared/Models/TextBoxOptions.js +3 -1
- package/esm2015/lib/controls/Repeater/repeater/repeater.component.js +15 -9
- package/esm2015/lib/controls/Repeater/repeater-field-builder/repeater-field-builder.component.js +376 -336
- package/esm2015/lib/controls/Repeater/repeater-table/repeater-table.component.js +105 -0
- package/esm2015/lib/controls/TextBox/TextBox.component.js +14 -13
- package/esm2015/lib/controls/bbsf-controls.module.js +4 -1
- package/esm2015/public-api.js +3 -1
- package/fesm2015/bnsights-bbsf-controls.js +515 -356
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/Enums/LanguageValidation.d.ts +4 -0
- package/lib/Shared/Models/RepeaterField.d.ts +1 -0
- package/lib/Shared/Models/RepeaterOptions.d.ts +3 -0
- package/lib/Shared/Models/TextBoxOptions.d.ts +3 -0
- package/lib/controls/Repeater/repeater/repeater.component.d.ts +2 -1
- package/lib/controls/Repeater/repeater-field-builder/repeater-field-builder.component.d.ts +3 -0
- package/lib/controls/Repeater/repeater-table/repeater-table.component.d.ts +16 -0
- package/package.json +2 -2
- package/public-api.d.ts +2 -0
- package/src/lib/assets/Style.css +5 -1
- package/bnsights-bbsf-controls-1.0.28.tgz +0 -0
|
@@ -4246,6 +4246,12 @@ RadioButtonComponent.propDecorators = {
|
|
|
4246
4246
|
OnChange: [{ type: Output }]
|
|
4247
4247
|
};
|
|
4248
4248
|
|
|
4249
|
+
var LanguageValidation;
|
|
4250
|
+
(function (LanguageValidation) {
|
|
4251
|
+
LanguageValidation[LanguageValidation["English"] = 1] = "English";
|
|
4252
|
+
LanguageValidation[LanguageValidation["Arabic"] = 2] = "Arabic";
|
|
4253
|
+
})(LanguageValidation || (LanguageValidation = {}));
|
|
4254
|
+
|
|
4249
4255
|
class TextboxComponent {
|
|
4250
4256
|
// tslint:disable-next-line: max-line-length
|
|
4251
4257
|
constructor(controlUtility, controlContainer, TextControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
@@ -4345,18 +4351,18 @@ class TextboxComponent {
|
|
|
4345
4351
|
}
|
|
4346
4352
|
break;
|
|
4347
4353
|
}
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4354
|
+
if (this.options.LanguageValidation) {
|
|
4355
|
+
if (this.options.LanguageValidation == LanguageValidation.Arabic) {
|
|
4356
|
+
this.validationRules.push(Validators.compose([
|
|
4357
|
+
this.controlUtility.patternValidator(/^[^A-Za-z]*$/, { ArabicLetterOnly: this.ArabicLetterOnly }),
|
|
4358
|
+
]));
|
|
4359
|
+
}
|
|
4360
|
+
else if (this.options.LanguageValidation == LanguageValidation.English) {
|
|
4361
|
+
this.validationRules.push(Validators.compose([
|
|
4362
|
+
this.controlUtility.patternValidator(/^[\x00-\x7F]*$/, { EnglishLetterOnly: this.EnglishLetterOnly }),
|
|
4363
|
+
]));
|
|
4364
|
+
}
|
|
4365
|
+
}
|
|
4360
4366
|
if (this.options.CustomValidation.length > 0) {
|
|
4361
4367
|
let Validations = this.options.CustomValidation;
|
|
4362
4368
|
for (let index = 0; index < Validations.length; index++) {
|
|
@@ -5176,16 +5182,23 @@ class RepeaterComponent {
|
|
|
5176
5182
|
constructor() {
|
|
5177
5183
|
this.templateRefs = [];
|
|
5178
5184
|
this.items = [];
|
|
5185
|
+
this.originalItems = [];
|
|
5179
5186
|
this.repeaterContext = { index: 0, delete: null, elements: null };
|
|
5180
5187
|
}
|
|
5181
5188
|
ngOnInit() {
|
|
5182
5189
|
this.currentTemplate = this.initialTemplate;
|
|
5183
5190
|
this.repeaterGroup = new FormGroup({});
|
|
5184
5191
|
this.group.addControl(this.options.Name, this.repeaterGroup);
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
this.
|
|
5192
|
+
if (this.options.RepeaterValue.length > 0) {
|
|
5193
|
+
this.originalItems = this.options.RepeaterValue;
|
|
5194
|
+
for (let index = 0; index < this.options.RepeaterValue.length; index++) {
|
|
5195
|
+
this.items.push(index + 1);
|
|
5196
|
+
}
|
|
5188
5197
|
}
|
|
5198
|
+
else
|
|
5199
|
+
for (let index = 0; index < this.options.MinRequiredItems; index++) {
|
|
5200
|
+
this.items.push(index);
|
|
5201
|
+
}
|
|
5189
5202
|
this.repeaterGroup.valueChanges.subscribe((res) => {
|
|
5190
5203
|
let result = [];
|
|
5191
5204
|
let rowNumber = [];
|
|
@@ -5249,11 +5262,10 @@ class RepeaterComponent {
|
|
|
5249
5262
|
}
|
|
5250
5263
|
}
|
|
5251
5264
|
}
|
|
5252
|
-
|
|
5253
|
-
this.items = this.items.filter((res) => res != item);
|
|
5265
|
+
this.items = this.items.filter((res) => res != this.items[Index]);
|
|
5254
5266
|
}
|
|
5255
|
-
|
|
5256
|
-
this.items.push(this.items.length + 1);
|
|
5267
|
+
addItem() {
|
|
5268
|
+
this.items.push(this.items[this.items.length - 1] + 1);
|
|
5257
5269
|
}
|
|
5258
5270
|
ngAfterViewInit() {
|
|
5259
5271
|
let templateRefs = this._templates["_results"].map((item) => item["template"]);
|
|
@@ -5268,7 +5280,7 @@ class RepeaterComponent {
|
|
|
5268
5280
|
RepeaterComponent.decorators = [
|
|
5269
5281
|
{ type: Component, args: [{
|
|
5270
5282
|
selector: 'BBSF-repeater',
|
|
5271
|
-
template: "<
|
|
5283
|
+
template: "<ng-container *ngFor='let item of items ; index as i'>\r\n {{setCurrentIndex(i)}}\r\n <ng-container *ngTemplateOutlet=\"currentTemplate; context: repeaterContext\">\r\n </ng-container>\r\n\r\n</ng-container>\r\n\r\n<ng-container *ngTemplateOutlet=\"add\">\r\n</ng-container>\r\n\r\n<ng-template *ngFor=\"let RepeaterField of options.RepeaterStructure ; index as i\" name=\"R{{i}}\" let-Index=\"itemIndex\"\r\n let-control=\"controlIndex\">\r\n <repeater-field-builder *ngIf=\"RepeaterField\" [RepeaterField]=\"RepeaterField\" [itemNumber]=\"Index\"\r\n [itemsValue]=\"originalItems\" [controlNumber]=\"control\" [group]=\"repeaterGroup\">\r\n </repeater-field-builder>\r\n</ng-template>\r\n\r\n<ng-template #delete let-item=\"itemIndex\">\r\n <button class=\"{{options.DeleteButtonExtraClasses}}\" type=\"button\" (click)=\"deleteItem(item)\"\r\n [disabled]=\"items.length ==options.MinRequiredItems&&options.IsRequired\"> <span\r\n [innerHTML]=\"options.DeleteButtonText\"></span></button>\r\n</ng-template>\r\n\r\n<ng-template #add>\r\n <button class=\"{{options.AddButtonExtraClasses}}\" type=\"button\" (click)=\"addItem()\"><span\r\n [innerHTML]=\"options.AddButtonText\"></span></button>\r\n</ng-template>\r\n\r\n\r\n\r\n\r\n\r\n<!-- <ng-template adHost></ng-template> -->\r\n",
|
|
5272
5284
|
styles: [""]
|
|
5273
5285
|
},] }
|
|
5274
5286
|
];
|
|
@@ -5482,6 +5494,8 @@ class TextBoxOptions {
|
|
|
5482
5494
|
this.CustomValidation = [];
|
|
5483
5495
|
/** to set Direction of textbox if textbox is Arabic or English */
|
|
5484
5496
|
this.ForceDirection = null;
|
|
5497
|
+
/** to set Language of textbox if textbox language is Arabic or English */
|
|
5498
|
+
this.LanguageValidation = null;
|
|
5485
5499
|
/** Set Type of TextBox ("text","password","email","number") */
|
|
5486
5500
|
this.Type = InputType.Text;
|
|
5487
5501
|
this.IconPosition = IconPosition.left;
|
|
@@ -5519,11 +5533,23 @@ class RepeaterFieldBuilderComponent {
|
|
|
5519
5533
|
constructor(renderComponentService, TextControlHost) {
|
|
5520
5534
|
this.renderComponentService = renderComponentService;
|
|
5521
5535
|
this.TextControlHost = TextControlHost;
|
|
5536
|
+
this.itemsValue = [];
|
|
5537
|
+
this.itemValue = null;
|
|
5522
5538
|
}
|
|
5523
5539
|
ngOnInit() {
|
|
5524
5540
|
}
|
|
5525
5541
|
ngAfterViewInit() {
|
|
5526
5542
|
setTimeout(() => {
|
|
5543
|
+
if (this.itemsValue.length > 0)
|
|
5544
|
+
this.itemValue = this.itemsValue[this.itemNumber];
|
|
5545
|
+
if (this.itemValue) {
|
|
5546
|
+
for (const key in this.itemValue) {
|
|
5547
|
+
if (Object.prototype.hasOwnProperty.call(this.itemValue, key) && key == this.RepeaterField.ControlOptions.Name) {
|
|
5548
|
+
const element = this.itemValue[key];
|
|
5549
|
+
this.value = element;
|
|
5550
|
+
}
|
|
5551
|
+
}
|
|
5552
|
+
}
|
|
5527
5553
|
this.Item.clear();
|
|
5528
5554
|
switch (this.RepeaterField.ControlType) {
|
|
5529
5555
|
///TextBox
|
|
@@ -5536,10 +5562,12 @@ class RepeaterFieldBuilderComponent {
|
|
|
5536
5562
|
Text.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5537
5563
|
Text.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5538
5564
|
Text.Type = InputType.Text;
|
|
5565
|
+
Text.LanguageValidation = this.RepeaterField.ControlOptions.LanguageValidation;
|
|
5539
5566
|
if (this.RepeaterField.ControlOptions.maxLength)
|
|
5540
5567
|
Text.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
5541
5568
|
if (this.RepeaterField.ControlOptions.minLength)
|
|
5542
5569
|
Text.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
5570
|
+
Text.Value = this.value;
|
|
5543
5571
|
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Text);
|
|
5544
5572
|
break;
|
|
5545
5573
|
case DataType.Name:
|
|
@@ -5549,12 +5577,14 @@ class RepeaterFieldBuilderComponent {
|
|
|
5549
5577
|
Name.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5550
5578
|
Name.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5551
5579
|
Name.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5580
|
+
Name.LanguageValidation = this.RepeaterField.ControlOptions.LanguageValidation;
|
|
5552
5581
|
Name.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5553
5582
|
if (this.RepeaterField.ControlOptions.maxLength)
|
|
5554
5583
|
Name.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
5555
5584
|
if (this.RepeaterField.ControlOptions.minLength)
|
|
5556
5585
|
Name.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
5557
5586
|
Name.Type = InputType.Text;
|
|
5587
|
+
Name.Value = this.value;
|
|
5558
5588
|
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Name);
|
|
5559
5589
|
break;
|
|
5560
5590
|
case DataType.Email:
|
|
@@ -5564,8 +5594,10 @@ class RepeaterFieldBuilderComponent {
|
|
|
5564
5594
|
Email.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5565
5595
|
Email.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5566
5596
|
Email.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5597
|
+
Email.LanguageValidation = this.RepeaterField.ControlOptions.LanguageValidation;
|
|
5567
5598
|
Email.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5568
5599
|
Email.Type = InputType.Email;
|
|
5600
|
+
Email.Value = this.value;
|
|
5569
5601
|
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Email);
|
|
5570
5602
|
break;
|
|
5571
5603
|
case DataType.Number:
|
|
@@ -5575,12 +5607,14 @@ class RepeaterFieldBuilderComponent {
|
|
|
5575
5607
|
Number.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5576
5608
|
Number.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5577
5609
|
Number.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5610
|
+
Number.LanguageValidation = this.RepeaterField.ControlOptions.LanguageValidation;
|
|
5578
5611
|
Number.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5579
5612
|
Number.Type = InputType.Number;
|
|
5580
5613
|
let rangeNumber = new RangeNumber();
|
|
5581
5614
|
rangeNumber.To = this.RepeaterField.ControlOptions.maxLength;
|
|
5582
5615
|
rangeNumber.From = this.RepeaterField.ControlOptions.minLength;
|
|
5583
5616
|
Number.NumberRange = rangeNumber;
|
|
5617
|
+
Number.Value = this.value;
|
|
5584
5618
|
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Number);
|
|
5585
5619
|
break;
|
|
5586
5620
|
///DateTime
|
|
@@ -5595,6 +5629,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5595
5629
|
Date.PickerType = PickerType.Calendar;
|
|
5596
5630
|
Date.SelectMode = SelectMode.Single;
|
|
5597
5631
|
Date.StartView = StartView.Month;
|
|
5632
|
+
Date.Value = this.value;
|
|
5598
5633
|
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, Date);
|
|
5599
5634
|
break;
|
|
5600
5635
|
case DataType.DateTime:
|
|
@@ -5608,6 +5643,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5608
5643
|
DateTime.PickerType = PickerType.Both;
|
|
5609
5644
|
DateTime.SelectMode = SelectMode.Single;
|
|
5610
5645
|
DateTime.StartView = StartView.Month;
|
|
5646
|
+
DateTime.Value = this.value;
|
|
5611
5647
|
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, DateTime);
|
|
5612
5648
|
break;
|
|
5613
5649
|
case DataType.Time:
|
|
@@ -5621,6 +5657,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5621
5657
|
Time.PickerType = PickerType.Timer;
|
|
5622
5658
|
Time.SelectMode = SelectMode.Single;
|
|
5623
5659
|
Time.StartView = StartView.Month;
|
|
5660
|
+
Time.Value = this.value;
|
|
5624
5661
|
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, Time);
|
|
5625
5662
|
break;
|
|
5626
5663
|
//Dropdown
|
|
@@ -5636,6 +5673,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5636
5673
|
SingleSelect.SingleSelection = true;
|
|
5637
5674
|
SingleSelect.ShowCheckbox = false;
|
|
5638
5675
|
SingleSelect.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
5676
|
+
SingleSelect.SelectedItems = this.value;
|
|
5639
5677
|
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, SingleSelect);
|
|
5640
5678
|
break;
|
|
5641
5679
|
case DataType.MulipleSelect:
|
|
@@ -5650,6 +5688,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5650
5688
|
MulipleSelect.SingleSelection = false;
|
|
5651
5689
|
MulipleSelect.ShowCheckbox = false;
|
|
5652
5690
|
MulipleSelect.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
5691
|
+
MulipleSelect.SelectedItems = this.value;
|
|
5653
5692
|
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, MulipleSelect);
|
|
5654
5693
|
break;
|
|
5655
5694
|
case DataType.Goal:
|
|
@@ -5664,6 +5703,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5664
5703
|
Goal.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
5665
5704
|
Goal.ShowCheckbox = false;
|
|
5666
5705
|
Goal.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
5706
|
+
Goal.SelectedItems = this.value;
|
|
5667
5707
|
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Goal);
|
|
5668
5708
|
break;
|
|
5669
5709
|
case DataType.Challenge:
|
|
@@ -5679,6 +5719,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5679
5719
|
Challenge.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
5680
5720
|
Challenge.ShowCheckbox = false;
|
|
5681
5721
|
Challenge.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
5722
|
+
Challenge.SelectedItems = this.value;
|
|
5682
5723
|
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Challenge);
|
|
5683
5724
|
break;
|
|
5684
5725
|
case DataType.InnovationLab:
|
|
@@ -5693,6 +5734,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5693
5734
|
InnovationLab.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
5694
5735
|
InnovationLab.ShowCheckbox = false;
|
|
5695
5736
|
InnovationLab.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
5737
|
+
InnovationLab.SelectedItems = this.value;
|
|
5696
5738
|
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, InnovationLab);
|
|
5697
5739
|
break;
|
|
5698
5740
|
case DataType.Country:
|
|
@@ -5707,6 +5749,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5707
5749
|
Country.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
5708
5750
|
Country.ShowCheckbox = false;
|
|
5709
5751
|
Country.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
5752
|
+
Country.SelectedItems = this.value;
|
|
5710
5753
|
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Country);
|
|
5711
5754
|
break;
|
|
5712
5755
|
//FileUpload
|
|
@@ -5719,6 +5762,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5719
5762
|
File.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5720
5763
|
File.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5721
5764
|
File.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
5765
|
+
File.Value = this.value;
|
|
5722
5766
|
this.renderComponentService.renderDynamicComponent(this.Item, FileUploadComponent, this.group, File);
|
|
5723
5767
|
break;
|
|
5724
5768
|
case DataType.MultiFile:
|
|
@@ -5732,6 +5776,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5732
5776
|
MultiFile.MaxSizeForAllFilesInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
5733
5777
|
MultiFile.MaxNoOfFiles = this.RepeaterField.ControlOptions.maxFileCount;
|
|
5734
5778
|
MultiFile.IsMultipleFile = true;
|
|
5779
|
+
MultiFile.Value = this.value;
|
|
5735
5780
|
this.renderComponentService.renderDynamicComponent(this.Item, FileUploadComponent, this.group, MultiFile);
|
|
5736
5781
|
break;
|
|
5737
5782
|
//ImageUpload
|
|
@@ -5745,6 +5790,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5745
5790
|
Image.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5746
5791
|
if (this.RepeaterField.ControlOptions.maxFileSizeInMB)
|
|
5747
5792
|
Image.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
5793
|
+
Image.Value = this.value;
|
|
5748
5794
|
this.renderComponentService.renderDynamicComponent(this.Item, ImageUploaderComponent, this.group, Image);
|
|
5749
5795
|
break;
|
|
5750
5796
|
case DataType.CoverPhoto:
|
|
@@ -5757,6 +5803,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5757
5803
|
CoverPhoto.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5758
5804
|
if (this.RepeaterField.ControlOptions.maxFileSizeInMB)
|
|
5759
5805
|
CoverPhoto.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
5806
|
+
CoverPhoto.Value = this.value;
|
|
5760
5807
|
this.renderComponentService.renderDynamicComponent(this.Item, ImageUploaderComponent, this.group, CoverPhoto);
|
|
5761
5808
|
break;
|
|
5762
5809
|
//Mobile
|
|
@@ -5772,6 +5819,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5772
5819
|
Mobile.PhoneValidation = true;
|
|
5773
5820
|
Mobile.SelectFirstCountry = true;
|
|
5774
5821
|
Mobile.EnablePlaceholder = true;
|
|
5822
|
+
Mobile.Value = this.value;
|
|
5775
5823
|
this.renderComponentService.renderDynamicComponent(this.Item, PhoneComponent, this.group, Mobile);
|
|
5776
5824
|
break;
|
|
5777
5825
|
//MultilineText
|
|
@@ -5789,6 +5837,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5789
5837
|
MultilineText.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
5790
5838
|
MultilineText.Rows = this.RepeaterField.ControlOptions.rows;
|
|
5791
5839
|
MultilineText.ForceDirection = this.RepeaterField.ControlOptions.ForceDirection;
|
|
5840
|
+
MultilineText.Value = this.value;
|
|
5792
5841
|
this.renderComponentService.renderDynamicComponent(this.Item, TextAreaComponent, this.group, MultilineText);
|
|
5793
5842
|
break;
|
|
5794
5843
|
//HTML
|
|
@@ -5806,6 +5855,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5806
5855
|
HTML.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
5807
5856
|
HTML.Height = this.RepeaterField.ControlOptions.rows;
|
|
5808
5857
|
HTML.ForceDirection = this.RepeaterField.ControlOptions.ForceDirection;
|
|
5858
|
+
HTML.Value = this.value;
|
|
5809
5859
|
this.renderComponentService.renderDynamicComponent(this.Item, HtmlEditorComponent, this.group, HTML);
|
|
5810
5860
|
break;
|
|
5811
5861
|
//Boolean
|
|
@@ -5815,6 +5865,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5815
5865
|
Boolean.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5816
5866
|
Boolean.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5817
5867
|
Boolean.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5868
|
+
Boolean.Value = this.value;
|
|
5818
5869
|
Boolean.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5819
5870
|
this.renderComponentService.renderDynamicComponent(this.Item, ToggleslideComponent, this.group, Boolean);
|
|
5820
5871
|
break;
|
|
@@ -5826,6 +5877,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
5826
5877
|
Location.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5827
5878
|
Location.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5828
5879
|
Location.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5880
|
+
Location.Value = this.value;
|
|
5829
5881
|
Location.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5830
5882
|
this.renderComponentService.renderDynamicComponent(this.Item, MapAutoCompleteComponent, this.group, Location);
|
|
5831
5883
|
break;
|
|
@@ -5835,341 +5887,342 @@ class RepeaterFieldBuilderComponent {
|
|
|
5835
5887
|
}, 0);
|
|
5836
5888
|
}
|
|
5837
5889
|
ngOnChanges(changes) {
|
|
5838
|
-
if (changes.itemNumber
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
5890
|
+
if (changes.itemNumber)
|
|
5891
|
+
if (changes.itemNumber.previousValue) {
|
|
5892
|
+
let name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.previousValue.toString() + "." + this.controlNumber.toString();
|
|
5893
|
+
let value = this.group.controls[name].value;
|
|
5894
|
+
this.Item.clear();
|
|
5895
|
+
this.group.removeControl(name);
|
|
5896
|
+
switch (this.RepeaterField.ControlType) {
|
|
5897
|
+
///TextBox
|
|
5898
|
+
case DataType.Text:
|
|
5899
|
+
let Text = new TextBoxOptions();
|
|
5900
|
+
Text.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5901
|
+
Text.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5902
|
+
Text.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5903
|
+
Text.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5904
|
+
Text.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5905
|
+
Text.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5906
|
+
Text.Type = InputType.Text;
|
|
5907
|
+
if (this.RepeaterField.ControlOptions.maxLength)
|
|
5908
|
+
Text.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
5909
|
+
if (this.RepeaterField.ControlOptions.minLength)
|
|
5910
|
+
Text.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
5911
|
+
Text.Value = value;
|
|
5912
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Text);
|
|
5913
|
+
break;
|
|
5914
|
+
case DataType.Name:
|
|
5915
|
+
let Name = new TextBoxOptions();
|
|
5916
|
+
Name.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5917
|
+
Name.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5918
|
+
Name.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5919
|
+
Name.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5920
|
+
Name.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5921
|
+
Name.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5922
|
+
if (this.RepeaterField.ControlOptions.maxLength)
|
|
5923
|
+
Name.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
5924
|
+
if (this.RepeaterField.ControlOptions.minLength)
|
|
5925
|
+
Name.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
5926
|
+
Name.Type = InputType.Text;
|
|
5927
|
+
Name.Value = value;
|
|
5928
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Name);
|
|
5929
|
+
break;
|
|
5930
|
+
case DataType.Email:
|
|
5931
|
+
let Email = new TextBoxOptions();
|
|
5932
|
+
Email.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5933
|
+
Email.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5934
|
+
Email.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5935
|
+
Email.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5936
|
+
Email.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5937
|
+
Email.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5938
|
+
Email.Type = InputType.Email;
|
|
5939
|
+
Email.Value = value;
|
|
5940
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Email);
|
|
5941
|
+
break;
|
|
5942
|
+
case DataType.Number:
|
|
5943
|
+
let Number = new TextBoxOptions();
|
|
5944
|
+
Number.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5945
|
+
Number.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5946
|
+
Number.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5947
|
+
Number.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5948
|
+
Number.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5949
|
+
Number.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5950
|
+
Number.Type = InputType.Number;
|
|
5951
|
+
let rangeNumber = new RangeNumber();
|
|
5952
|
+
rangeNumber.To = this.RepeaterField.ControlOptions.maxLength;
|
|
5953
|
+
rangeNumber.From = this.RepeaterField.ControlOptions.minLength;
|
|
5954
|
+
Number.NumberRange = rangeNumber;
|
|
5955
|
+
Number.Value = value;
|
|
5956
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Number);
|
|
5957
|
+
break;
|
|
5958
|
+
///DateTime
|
|
5959
|
+
case DataType.Date:
|
|
5960
|
+
let Date = new DatePickerOptions();
|
|
5961
|
+
Date.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5962
|
+
Date.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5963
|
+
Date.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5964
|
+
Date.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5965
|
+
Date.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5966
|
+
Date.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5967
|
+
Date.PickerType = PickerType.Calendar;
|
|
5968
|
+
Date.SelectMode = SelectMode.Single;
|
|
5969
|
+
Date.StartView = StartView.Month;
|
|
5970
|
+
Date.Value = value;
|
|
5971
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, Date);
|
|
5972
|
+
break;
|
|
5973
|
+
case DataType.DateTime:
|
|
5974
|
+
let DateTime = new DatePickerOptions();
|
|
5975
|
+
DateTime.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5976
|
+
DateTime.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5977
|
+
DateTime.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5978
|
+
DateTime.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5979
|
+
DateTime.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5980
|
+
DateTime.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5981
|
+
DateTime.PickerType = PickerType.Both;
|
|
5982
|
+
DateTime.SelectMode = SelectMode.Single;
|
|
5983
|
+
DateTime.StartView = StartView.Month;
|
|
5984
|
+
DateTime.Value = value;
|
|
5985
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, DateTime);
|
|
5986
|
+
break;
|
|
5987
|
+
case DataType.Time:
|
|
5988
|
+
let Time = new DatePickerOptions();
|
|
5989
|
+
Time.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
5990
|
+
Time.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
5991
|
+
Time.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
5992
|
+
Time.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
5993
|
+
Time.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
5994
|
+
Time.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
5995
|
+
Time.PickerType = PickerType.Timer;
|
|
5996
|
+
Time.SelectMode = SelectMode.Single;
|
|
5997
|
+
Time.StartView = StartView.Month;
|
|
5998
|
+
Time.Value = value;
|
|
5999
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, Time);
|
|
6000
|
+
break;
|
|
6001
|
+
//Dropdown
|
|
6002
|
+
case DataType.SingleSelect:
|
|
6003
|
+
let SingleSelect = new DropdownOptions();
|
|
6004
|
+
SingleSelect.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6005
|
+
SingleSelect.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6006
|
+
SingleSelect.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6007
|
+
SingleSelect.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6008
|
+
SingleSelect.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6009
|
+
SingleSelect.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6010
|
+
SingleSelect.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6011
|
+
SingleSelect.SingleSelection = true;
|
|
6012
|
+
SingleSelect.ShowCheckbox = false;
|
|
6013
|
+
SingleSelect.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6014
|
+
SingleSelect.SelectedItems = value;
|
|
6015
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, SingleSelect);
|
|
6016
|
+
break;
|
|
6017
|
+
case DataType.MulipleSelect:
|
|
6018
|
+
let MulipleSelect = new DropdownOptions();
|
|
6019
|
+
MulipleSelect.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6020
|
+
MulipleSelect.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6021
|
+
MulipleSelect.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6022
|
+
MulipleSelect.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6023
|
+
MulipleSelect.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6024
|
+
MulipleSelect.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6025
|
+
MulipleSelect.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6026
|
+
MulipleSelect.SingleSelection = false;
|
|
6027
|
+
MulipleSelect.ShowCheckbox = false;
|
|
6028
|
+
MulipleSelect.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6029
|
+
MulipleSelect.SelectedItems = value;
|
|
6030
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, MulipleSelect);
|
|
6031
|
+
break;
|
|
6032
|
+
case DataType.Goal:
|
|
6033
|
+
let Goal = new DropdownOptions();
|
|
6034
|
+
Goal.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6035
|
+
Goal.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6036
|
+
Goal.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6037
|
+
Goal.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6038
|
+
Goal.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6039
|
+
Goal.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6040
|
+
Goal.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6041
|
+
Goal.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
6042
|
+
Goal.ShowCheckbox = false;
|
|
6043
|
+
Goal.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6044
|
+
Goal.SelectedItems = value;
|
|
6045
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Goal);
|
|
6046
|
+
break;
|
|
6047
|
+
case DataType.Challenge:
|
|
6048
|
+
let Challenge = new DropdownOptions();
|
|
6049
|
+
Challenge.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6050
|
+
Challenge.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6051
|
+
Challenge.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6052
|
+
Challenge.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6053
|
+
Challenge.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6054
|
+
Challenge.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6055
|
+
Challenge.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6056
|
+
Challenge.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6057
|
+
Challenge.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
6058
|
+
Challenge.ShowCheckbox = false;
|
|
6059
|
+
Challenge.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6060
|
+
Challenge.SelectedItems = value;
|
|
6061
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Challenge);
|
|
6062
|
+
break;
|
|
6063
|
+
case DataType.InnovationLab:
|
|
6064
|
+
let InnovationLab = new DropdownOptions();
|
|
6065
|
+
InnovationLab.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6066
|
+
InnovationLab.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6067
|
+
InnovationLab.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6068
|
+
InnovationLab.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6069
|
+
InnovationLab.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6070
|
+
InnovationLab.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6071
|
+
InnovationLab.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6072
|
+
InnovationLab.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
6073
|
+
InnovationLab.ShowCheckbox = false;
|
|
6074
|
+
InnovationLab.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6075
|
+
InnovationLab.SelectedItems = value;
|
|
6076
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, InnovationLab);
|
|
6077
|
+
break;
|
|
6078
|
+
case DataType.Country:
|
|
6079
|
+
let Country = new DropdownOptions();
|
|
6080
|
+
Country.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6081
|
+
Country.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6082
|
+
Country.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6083
|
+
Country.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6084
|
+
Country.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6085
|
+
Country.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6086
|
+
Country.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6087
|
+
Country.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
6088
|
+
Country.ShowCheckbox = false;
|
|
6089
|
+
Country.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6090
|
+
Country.SelectedItems = value;
|
|
6091
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Country);
|
|
6092
|
+
break;
|
|
6093
|
+
//FileUpload
|
|
6094
|
+
case DataType.File:
|
|
6095
|
+
let File = new FileUploadOptions();
|
|
6096
|
+
File.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6097
|
+
File.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6098
|
+
File.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6099
|
+
File.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6100
|
+
File.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6101
|
+
File.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6102
|
+
File.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6103
|
+
File.Value = value;
|
|
6104
|
+
this.renderComponentService.renderDynamicComponent(this.Item, FileUploadComponent, this.group, File);
|
|
6105
|
+
break;
|
|
6106
|
+
case DataType.MultiFile:
|
|
6107
|
+
let MultiFile = new FileUploadOptions();
|
|
6108
|
+
File.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6109
|
+
File.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6110
|
+
File.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6111
|
+
File.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6112
|
+
File.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6113
|
+
File.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6114
|
+
MultiFile.MaxSizeForAllFilesInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6115
|
+
MultiFile.MaxNoOfFiles = this.RepeaterField.ControlOptions.maxFileCount;
|
|
6116
|
+
MultiFile.IsMultipleFile = true;
|
|
6117
|
+
MultiFile.Value = value;
|
|
6118
|
+
this.renderComponentService.renderDynamicComponent(this.Item, FileUploadComponent, this.group, MultiFile);
|
|
6119
|
+
break;
|
|
6120
|
+
//ImageUpload
|
|
6121
|
+
case DataType.Image:
|
|
6122
|
+
let Image = new ImageUploadOptions();
|
|
6123
|
+
Image.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6124
|
+
Image.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6125
|
+
Image.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6126
|
+
Image.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6127
|
+
Image.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6128
|
+
Image.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6129
|
+
if (this.RepeaterField.ControlOptions.maxFileSizeInMB)
|
|
6130
|
+
Image.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6131
|
+
Image.Value = value;
|
|
6132
|
+
this.renderComponentService.renderDynamicComponent(this.Item, ImageUploaderComponent, this.group, Image);
|
|
6133
|
+
break;
|
|
6134
|
+
case DataType.CoverPhoto:
|
|
6135
|
+
let CoverPhoto = new ImageUploadOptions();
|
|
6136
|
+
CoverPhoto.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6137
|
+
CoverPhoto.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6138
|
+
CoverPhoto.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6139
|
+
CoverPhoto.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6140
|
+
CoverPhoto.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6141
|
+
CoverPhoto.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6142
|
+
if (this.RepeaterField.ControlOptions.maxFileSizeInMB)
|
|
6143
|
+
CoverPhoto.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6144
|
+
CoverPhoto.Value = value;
|
|
6145
|
+
this.renderComponentService.renderDynamicComponent(this.Item, ImageUploaderComponent, this.group, CoverPhoto);
|
|
6146
|
+
break;
|
|
6147
|
+
//Mobile
|
|
6148
|
+
case DataType.Mobile:
|
|
6149
|
+
let Mobile = new PhoneOptions();
|
|
6150
|
+
Mobile.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6151
|
+
Mobile.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6152
|
+
Mobile.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6153
|
+
Mobile.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6154
|
+
Mobile.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6155
|
+
Mobile.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6156
|
+
Mobile.AllowSearch = true;
|
|
6157
|
+
Mobile.PhoneValidation = true;
|
|
6158
|
+
Mobile.SelectFirstCountry = true;
|
|
6159
|
+
Mobile.EnablePlaceholder = true;
|
|
6160
|
+
Mobile.Value = value;
|
|
6161
|
+
this.renderComponentService.renderDynamicComponent(this.Item, PhoneComponent, this.group, Mobile);
|
|
6162
|
+
break;
|
|
6163
|
+
//MultilineText
|
|
6164
|
+
case DataType.MultilineText:
|
|
6165
|
+
let MultilineText = new TextAreaOptions();
|
|
6166
|
+
MultilineText.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6167
|
+
MultilineText.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6168
|
+
MultilineText.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6169
|
+
MultilineText.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6170
|
+
MultilineText.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6171
|
+
MultilineText.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6172
|
+
if (this.RepeaterField.ControlOptions.maxLength)
|
|
6173
|
+
MultilineText.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
6174
|
+
if (this.RepeaterField.ControlOptions.minLength)
|
|
6175
|
+
MultilineText.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
6176
|
+
MultilineText.Rows = this.RepeaterField.ControlOptions.rows;
|
|
6177
|
+
MultilineText.ForceDirection = this.RepeaterField.ControlOptions.ForceDirection;
|
|
6178
|
+
MultilineText.Value = value;
|
|
6179
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextAreaComponent, this.group, MultilineText);
|
|
6180
|
+
break;
|
|
6181
|
+
//HTML
|
|
6182
|
+
case DataType.HTML:
|
|
6183
|
+
let HTML = new HtmlEditorOptions();
|
|
6184
|
+
HTML.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6185
|
+
HTML.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6186
|
+
HTML.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6187
|
+
HTML.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6188
|
+
HTML.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6189
|
+
HTML.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6190
|
+
if (this.RepeaterField.ControlOptions.maxLength)
|
|
6191
|
+
HTML.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
6192
|
+
if (this.RepeaterField.ControlOptions.minLength)
|
|
6193
|
+
HTML.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
6194
|
+
HTML.Height = this.RepeaterField.ControlOptions.rows;
|
|
6195
|
+
HTML.ForceDirection = this.RepeaterField.ControlOptions.ForceDirection;
|
|
6196
|
+
HTML.Value = value;
|
|
6197
|
+
this.renderComponentService.renderDynamicComponent(this.Item, HtmlEditorComponent, this.group, HTML);
|
|
6198
|
+
break;
|
|
6199
|
+
//Boolean
|
|
6200
|
+
case DataType.Boolean:
|
|
6201
|
+
let Boolean = new ToggleSlideOptions();
|
|
6202
|
+
Boolean.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6203
|
+
Boolean.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6204
|
+
Boolean.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6205
|
+
Boolean.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6206
|
+
Boolean.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6207
|
+
Boolean.Value = value;
|
|
6208
|
+
this.renderComponentService.renderDynamicComponent(this.Item, ToggleslideComponent, this.group, Boolean);
|
|
6209
|
+
break;
|
|
6210
|
+
//Location
|
|
6211
|
+
case DataType.Location:
|
|
6212
|
+
let Location = new MapAutoCompleteOptions();
|
|
6213
|
+
Location.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6214
|
+
Location.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6215
|
+
Location.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6216
|
+
Location.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6217
|
+
Location.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6218
|
+
Location.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6219
|
+
Location.Value = value;
|
|
6220
|
+
this.renderComponentService.renderDynamicComponent(this.Item, MapAutoCompleteComponent, this.group, Location);
|
|
6221
|
+
break;
|
|
6222
|
+
default:
|
|
6223
|
+
break;
|
|
6224
|
+
}
|
|
6171
6225
|
}
|
|
6172
|
-
}
|
|
6173
6226
|
}
|
|
6174
6227
|
}
|
|
6175
6228
|
RepeaterFieldBuilderComponent.decorators = [
|
|
@@ -6187,7 +6240,8 @@ RepeaterFieldBuilderComponent.propDecorators = {
|
|
|
6187
6240
|
group: [{ type: Input }],
|
|
6188
6241
|
itemNumber: [{ type: Input }],
|
|
6189
6242
|
controlNumber: [{ type: Input }],
|
|
6190
|
-
RepeaterField: [{ type: Input }]
|
|
6243
|
+
RepeaterField: [{ type: Input }],
|
|
6244
|
+
itemsValue: [{ type: Input }]
|
|
6191
6245
|
};
|
|
6192
6246
|
|
|
6193
6247
|
class RepeaterItemFieldComponent {
|
|
@@ -6209,6 +6263,108 @@ RepeaterItemFieldComponent.propDecorators = {
|
|
|
6209
6263
|
itemIndex: [{ type: Input }]
|
|
6210
6264
|
};
|
|
6211
6265
|
|
|
6266
|
+
class RepeaterTableComponent {
|
|
6267
|
+
constructor(utilityService) {
|
|
6268
|
+
this.utilityService = utilityService;
|
|
6269
|
+
this.items = [];
|
|
6270
|
+
this.originalItems = [];
|
|
6271
|
+
}
|
|
6272
|
+
ngOnInit() {
|
|
6273
|
+
this.repeaterGroup = new FormGroup({});
|
|
6274
|
+
this.group.addControl(this.options.Name, this.repeaterGroup);
|
|
6275
|
+
if (this.options.RepeaterValue.length > 0) {
|
|
6276
|
+
this.originalItems = this.options.RepeaterValue;
|
|
6277
|
+
for (let index = 0; index < this.options.RepeaterValue.length; index++) {
|
|
6278
|
+
this.items.push(index + 1);
|
|
6279
|
+
}
|
|
6280
|
+
}
|
|
6281
|
+
else
|
|
6282
|
+
for (let index = 0; index < this.options.MinRequiredItems; index++) {
|
|
6283
|
+
this.items.push(index);
|
|
6284
|
+
}
|
|
6285
|
+
this.repeaterGroup.valueChanges.subscribe((res) => {
|
|
6286
|
+
let result = [];
|
|
6287
|
+
let rowNumber = [];
|
|
6288
|
+
let addItems = [];
|
|
6289
|
+
for (const key in this.repeaterGroup.controls) {
|
|
6290
|
+
if (Object.prototype.hasOwnProperty.call(this.repeaterGroup.controls, key)) {
|
|
6291
|
+
const keySplitArr = key.split('.');
|
|
6292
|
+
let item = {
|
|
6293
|
+
[keySplitArr[1]]: { [keySplitArr[0]]: this.group.controls[this.options.Name].value[key] }
|
|
6294
|
+
};
|
|
6295
|
+
addItems.push(item);
|
|
6296
|
+
if (!rowNumber.includes(keySplitArr[1]))
|
|
6297
|
+
rowNumber.push(keySplitArr[1]);
|
|
6298
|
+
}
|
|
6299
|
+
}
|
|
6300
|
+
for (let index = 0; index < rowNumber.length; index++) {
|
|
6301
|
+
const row = rowNumber[index];
|
|
6302
|
+
let addObject = {};
|
|
6303
|
+
let filteredElements = addItems.filter(item => item[row]);
|
|
6304
|
+
for (let index = 0; index < filteredElements.length; index++) {
|
|
6305
|
+
const filteredElement = filteredElements[index];
|
|
6306
|
+
for (const key in filteredElement) {
|
|
6307
|
+
if (Object.prototype.hasOwnProperty.call(filteredElement, key)) {
|
|
6308
|
+
const element = filteredElement[key];
|
|
6309
|
+
for (const key in element) {
|
|
6310
|
+
if (Object.prototype.hasOwnProperty.call(element, key)) {
|
|
6311
|
+
const value = element[key];
|
|
6312
|
+
addObject[key] = value;
|
|
6313
|
+
}
|
|
6314
|
+
}
|
|
6315
|
+
}
|
|
6316
|
+
}
|
|
6317
|
+
}
|
|
6318
|
+
result.push(addObject);
|
|
6319
|
+
}
|
|
6320
|
+
this.options.RepeaterValue = result;
|
|
6321
|
+
});
|
|
6322
|
+
}
|
|
6323
|
+
deleteItem(Index) {
|
|
6324
|
+
if (this.items.length == this.options.MinRequiredItems && this.options.IsRequired)
|
|
6325
|
+
return;
|
|
6326
|
+
let deletedControls = [];
|
|
6327
|
+
let controlNames = this.options.RepeaterStructure.map(e => e.ControlOptions.Name);
|
|
6328
|
+
for (const key in this.repeaterGroup.controls) {
|
|
6329
|
+
if (Object.prototype.hasOwnProperty.call(this.repeaterGroup.controls, key)) {
|
|
6330
|
+
for (let index = 0; index < controlNames.length; index++) {
|
|
6331
|
+
const element = controlNames[index];
|
|
6332
|
+
const keySplitArr = key.split('.');
|
|
6333
|
+
if (keySplitArr[0] + keySplitArr[1] == `${element}${Index}`) {
|
|
6334
|
+
const element = this.repeaterGroup.controls[key];
|
|
6335
|
+
deletedControls.push({ [key]: element });
|
|
6336
|
+
}
|
|
6337
|
+
}
|
|
6338
|
+
}
|
|
6339
|
+
}
|
|
6340
|
+
for (let index = 0; index < deletedControls.length; index++) {
|
|
6341
|
+
const element = deletedControls[index];
|
|
6342
|
+
for (const key in element) {
|
|
6343
|
+
if (Object.prototype.hasOwnProperty.call(element, key)) {
|
|
6344
|
+
this.repeaterGroup.removeControl(key);
|
|
6345
|
+
}
|
|
6346
|
+
}
|
|
6347
|
+
}
|
|
6348
|
+
this.items = this.items.filter((res) => res != this.items[Index]);
|
|
6349
|
+
}
|
|
6350
|
+
addItem() {
|
|
6351
|
+
this.items.push(this.items[this.items.length - 1] + 1);
|
|
6352
|
+
}
|
|
6353
|
+
}
|
|
6354
|
+
RepeaterTableComponent.decorators = [
|
|
6355
|
+
{ type: Component, args: [{
|
|
6356
|
+
selector: 'BBSF-repeater-table',
|
|
6357
|
+
template: "<div class=\"b-control b-repeater-table\">\r\n <table class=\"{{options.RepeaterTableExtraClasses}}\">\r\n <thead>\r\n <tr class=\"{{options.RepeaterTableRowExtraClasses}}\">\r\n <th *ngFor=\"let item of options.RepeaterStructure\" class=\"min-w-150px\">{{item.HeaderTitle}}</th>\r\n <th>{{utilityService.getResourceValue(options.ActionLabelKey)}}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let item of items ; index as i\">\r\n <td *ngFor=\"let RepeaterField of options.RepeaterStructure ; index as r\">\r\n <repeater-field-builder [RepeaterField]=\"RepeaterField\" [itemNumber]=\"i\"\r\n [itemsValue]=\"originalItems\" [controlNumber]=\"r\" [group]=\"repeaterGroup\">\r\n </repeater-field-builder>\r\n </td>\r\n <td class=\"d-flex align-items-center\">\r\n <button class=\"{{options.DeleteButtonExtraClasses}}\" type=\"button\" (click)=\"deleteItem(i)\"\r\n [disabled]=\"(items.length ==options.MinRequiredItems&&options.IsRequired) ||(originalItems.length-1>=i)\">\r\n <span [innerHTML]=\"options.DeleteButtonText\"></span></button>\r\n </td>\r\n </tr>\r\n </tbody>\r\n <tfoot>\r\n <tr>\r\n <td colspan=\"4\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12 d-grid gap-2\"> \r\n <button class=\"{{options.AddButtonExtraClasses}}\" type=\"button\" (click)=\"addItem()\"><span\r\n [innerHTML]=\"options.AddButtonText\"></span></button>\r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n </tfoot>\r\n </table>\r\n</div>"
|
|
6358
|
+
},] }
|
|
6359
|
+
];
|
|
6360
|
+
RepeaterTableComponent.ctorParameters = () => [
|
|
6361
|
+
{ type: UtilityService }
|
|
6362
|
+
];
|
|
6363
|
+
RepeaterTableComponent.propDecorators = {
|
|
6364
|
+
group: [{ type: Input }],
|
|
6365
|
+
options: [{ type: Input }]
|
|
6366
|
+
};
|
|
6367
|
+
|
|
6212
6368
|
let options;
|
|
6213
6369
|
let AppInjector;
|
|
6214
6370
|
FullCalendarModule.registerPlugins([
|
|
@@ -6256,6 +6412,7 @@ BBSFControlsModule.decorators = [
|
|
|
6256
6412
|
RepeaterFieldBuilderComponent,
|
|
6257
6413
|
NgTemplateNameDirective,
|
|
6258
6414
|
RepeaterItemFieldComponent,
|
|
6415
|
+
RepeaterTableComponent
|
|
6259
6416
|
],
|
|
6260
6417
|
imports: [
|
|
6261
6418
|
CommonModule,
|
|
@@ -6350,6 +6507,7 @@ BBSFControlsModule.decorators = [
|
|
|
6350
6507
|
RepeaterFieldBuilderComponent,
|
|
6351
6508
|
NgTemplateNameDirective,
|
|
6352
6509
|
RepeaterItemFieldComponent,
|
|
6510
|
+
RepeaterTableComponent
|
|
6353
6511
|
]
|
|
6354
6512
|
},] }
|
|
6355
6513
|
];
|
|
@@ -6714,6 +6872,7 @@ class RepeaterField {
|
|
|
6714
6872
|
class RepeaterOptions {
|
|
6715
6873
|
constructor() {
|
|
6716
6874
|
this.MinRequiredItems = 1;
|
|
6875
|
+
this.ActionLabelKey = "";
|
|
6717
6876
|
this.AddButtonText = "Add";
|
|
6718
6877
|
this.DeleteButtonText = "Delete";
|
|
6719
6878
|
this.RepeaterValue = [];
|
|
@@ -7044,5 +7203,5 @@ var FileType;
|
|
|
7044
7203
|
* Generated bundle index. Do not edit.
|
|
7045
7204
|
*/
|
|
7046
7205
|
|
|
7047
|
-
export { AppInjector, Attribute, AutocompleteDTO, AutocompleteOptions, AutocompleteTextBoxComponent, BBSFControlsModule, CalendarComponent, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxComponent, CheckBoxOptions, ConfirmationModalComponent, ConfirmationModalOptions, ControlLayout, ControlUtility, Country, CustomValidation, CustomValidator, DataType, DateInputComponent, DatePickerOptions, DropdownListComponent, DropdownListItem, DropdownOptions, EditPersonalImage, EnglishArabicDTO, ErrorMassageValidation, FileType, FileUploadComponent, FileUploadModel, FileUploadOptions, FilterItem, FilterType, FontSize, ForceDirection, FormComponent, FormOptions, GlobalSettings, HtmlEditorComponent, HtmlEditorOptions, IconPosition, ImageType, ImageUploadOptions, ImageUploaderComponent, InputType, Insert, JwPaginationComponent, LanguageMode, LanguageType, MapAutoCompleteComponent, MapAutoCompleteOptions, MapAutocompleteDTO, MenuListType, Misc, MultiLingualHtmlEditorComponent, MultiLingualHtmlEditorOptions, MultiLingualTextAreaComponent, MultiLingualTextAreaOptions, MultiLingualTextBoxComponent, MultiLingualTextBoxOptions, MultipleFileUploadModel, NgTemplateNameDirective, OnPagingFiltersChangeService, PagingActionMode, PagingComponent, PagingDTO, PagingOptions, Para, PermissionSets, PhoneComponent, PhoneOptions, PickerType, ProfileImageUploadOptions, ProfileImageUploaderComponent, ProfilePictureDTO, PropertyLocation, RadioButtonComponent, RadioButtonItem, RadioButtonOptions, RangeNumber, RenderComponentService, RepeaterComponent, RepeaterField, RepeaterFieldBuilderComponent, RepeaterItemFieldComponent, RepeaterOptions, SaveDTO, SelectMode, StartView, Style, StyleConfirmationMode, TagsInputComponent, TagsInputDTO, TagsInputOptions, TextAreaComponent, TextAreaOptions, TextBoxOptions, TextboxComponent, ToggleSlideOptions, ToggleslideComponent, UploadPersonalImage, environment, options, ɵ0 };
|
|
7206
|
+
export { AppInjector, Attribute, AutocompleteDTO, AutocompleteOptions, AutocompleteTextBoxComponent, BBSFControlsModule, CalendarComponent, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxComponent, CheckBoxOptions, ConfirmationModalComponent, ConfirmationModalOptions, ControlLayout, ControlUtility, Country, CustomValidation, CustomValidator, DataType, DateInputComponent, DatePickerOptions, DropdownListComponent, DropdownListItem, DropdownOptions, EditPersonalImage, EnglishArabicDTO, ErrorMassageValidation, FileType, FileUploadComponent, FileUploadModel, FileUploadOptions, FilterItem, FilterType, FontSize, ForceDirection, FormComponent, FormOptions, GlobalSettings, HtmlEditorComponent, HtmlEditorOptions, IconPosition, ImageType, ImageUploadOptions, ImageUploaderComponent, InputType, Insert, JwPaginationComponent, LanguageMode, LanguageType, LanguageValidation, MapAutoCompleteComponent, MapAutoCompleteOptions, MapAutocompleteDTO, MenuListType, Misc, MultiLingualHtmlEditorComponent, MultiLingualHtmlEditorOptions, MultiLingualTextAreaComponent, MultiLingualTextAreaOptions, MultiLingualTextBoxComponent, MultiLingualTextBoxOptions, MultipleFileUploadModel, NgTemplateNameDirective, OnPagingFiltersChangeService, PagingActionMode, PagingComponent, PagingDTO, PagingOptions, Para, PermissionSets, PhoneComponent, PhoneOptions, PickerType, ProfileImageUploadOptions, ProfileImageUploaderComponent, ProfilePictureDTO, PropertyLocation, RadioButtonComponent, RadioButtonItem, RadioButtonOptions, RangeNumber, RenderComponentService, RepeaterComponent, RepeaterField, RepeaterFieldBuilderComponent, RepeaterItemFieldComponent, RepeaterOptions, RepeaterTableComponent, SaveDTO, SelectMode, StartView, Style, StyleConfirmationMode, TagsInputComponent, TagsInputDTO, TagsInputOptions, TextAreaComponent, TextAreaOptions, TextBoxOptions, TextboxComponent, ToggleSlideOptions, ToggleslideComponent, UploadPersonalImage, environment, options, ɵ0 };
|
|
7048
7207
|
//# sourceMappingURL=bnsights-bbsf-controls.js.map
|