@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
|
@@ -4676,6 +4676,12 @@
|
|
|
4676
4676
|
OnChange: [{ type: i0.Output }]
|
|
4677
4677
|
};
|
|
4678
4678
|
|
|
4679
|
+
exports.LanguageValidation = void 0;
|
|
4680
|
+
(function (LanguageValidation) {
|
|
4681
|
+
LanguageValidation[LanguageValidation["English"] = 1] = "English";
|
|
4682
|
+
LanguageValidation[LanguageValidation["Arabic"] = 2] = "Arabic";
|
|
4683
|
+
})(exports.LanguageValidation || (exports.LanguageValidation = {}));
|
|
4684
|
+
|
|
4679
4685
|
var TextboxComponent = /** @class */ (function () {
|
|
4680
4686
|
// tslint:disable-next-line: max-line-length
|
|
4681
4687
|
function TextboxComponent(controlUtility, controlContainer, TextControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
@@ -4777,18 +4783,18 @@
|
|
|
4777
4783
|
}
|
|
4778
4784
|
break;
|
|
4779
4785
|
}
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4786
|
+
if (this.options.LanguageValidation) {
|
|
4787
|
+
if (this.options.LanguageValidation == exports.LanguageValidation.Arabic) {
|
|
4788
|
+
this.validationRules.push(forms.Validators.compose([
|
|
4789
|
+
this.controlUtility.patternValidator(/^[^A-Za-z]*$/, { ArabicLetterOnly: this.ArabicLetterOnly }),
|
|
4790
|
+
]));
|
|
4791
|
+
}
|
|
4792
|
+
else if (this.options.LanguageValidation == exports.LanguageValidation.English) {
|
|
4793
|
+
this.validationRules.push(forms.Validators.compose([
|
|
4794
|
+
this.controlUtility.patternValidator(/^[\x00-\x7F]*$/, { EnglishLetterOnly: this.EnglishLetterOnly }),
|
|
4795
|
+
]));
|
|
4796
|
+
}
|
|
4797
|
+
}
|
|
4792
4798
|
if (this.options.CustomValidation.length > 0) {
|
|
4793
4799
|
var Validations = this.options.CustomValidation;
|
|
4794
4800
|
for (var index = 0; index < Validations.length; index++) {
|
|
@@ -5638,6 +5644,7 @@
|
|
|
5638
5644
|
function RepeaterComponent() {
|
|
5639
5645
|
this.templateRefs = [];
|
|
5640
5646
|
this.items = [];
|
|
5647
|
+
this.originalItems = [];
|
|
5641
5648
|
this.repeaterContext = { index: 0, delete: null, elements: null };
|
|
5642
5649
|
}
|
|
5643
5650
|
RepeaterComponent.prototype.ngOnInit = function () {
|
|
@@ -5645,10 +5652,16 @@
|
|
|
5645
5652
|
this.currentTemplate = this.initialTemplate;
|
|
5646
5653
|
this.repeaterGroup = new forms.FormGroup({});
|
|
5647
5654
|
this.group.addControl(this.options.Name, this.repeaterGroup);
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
this.
|
|
5655
|
+
if (this.options.RepeaterValue.length > 0) {
|
|
5656
|
+
this.originalItems = this.options.RepeaterValue;
|
|
5657
|
+
for (var index = 0; index < this.options.RepeaterValue.length; index++) {
|
|
5658
|
+
this.items.push(index + 1);
|
|
5659
|
+
}
|
|
5651
5660
|
}
|
|
5661
|
+
else
|
|
5662
|
+
for (var index = 0; index < this.options.MinRequiredItems; index++) {
|
|
5663
|
+
this.items.push(index);
|
|
5664
|
+
}
|
|
5652
5665
|
this.repeaterGroup.valueChanges.subscribe(function (res) {
|
|
5653
5666
|
var _a, _b;
|
|
5654
5667
|
var result = [];
|
|
@@ -5693,6 +5706,7 @@
|
|
|
5693
5706
|
};
|
|
5694
5707
|
RepeaterComponent.prototype.deleteItem = function (Index) {
|
|
5695
5708
|
var _a;
|
|
5709
|
+
var _this = this;
|
|
5696
5710
|
if (this.items.length == this.options.MinRequiredItems && this.options.IsRequired)
|
|
5697
5711
|
return;
|
|
5698
5712
|
var deletedControls = [];
|
|
@@ -5717,11 +5731,10 @@
|
|
|
5717
5731
|
}
|
|
5718
5732
|
}
|
|
5719
5733
|
}
|
|
5720
|
-
|
|
5721
|
-
this.items = this.items.filter(function (res) { return res != item; });
|
|
5734
|
+
this.items = this.items.filter(function (res) { return res != _this.items[Index]; });
|
|
5722
5735
|
};
|
|
5723
|
-
RepeaterComponent.prototype.
|
|
5724
|
-
this.items.push(this.items.length + 1);
|
|
5736
|
+
RepeaterComponent.prototype.addItem = function () {
|
|
5737
|
+
this.items.push(this.items[this.items.length - 1] + 1);
|
|
5725
5738
|
};
|
|
5726
5739
|
RepeaterComponent.prototype.ngAfterViewInit = function () {
|
|
5727
5740
|
var templateRefs = this._templates["_results"].map(function (item) { return item["template"]; });
|
|
@@ -5737,7 +5750,7 @@
|
|
|
5737
5750
|
RepeaterComponent.decorators = [
|
|
5738
5751
|
{ type: i0.Component, args: [{
|
|
5739
5752
|
selector: 'BBSF-repeater',
|
|
5740
|
-
template: "<
|
|
5753
|
+
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",
|
|
5741
5754
|
styles: [""]
|
|
5742
5755
|
},] }
|
|
5743
5756
|
];
|
|
@@ -5962,6 +5975,8 @@
|
|
|
5962
5975
|
this.CustomValidation = [];
|
|
5963
5976
|
/** to set Direction of textbox if textbox is Arabic or English */
|
|
5964
5977
|
this.ForceDirection = null;
|
|
5978
|
+
/** to set Language of textbox if textbox language is Arabic or English */
|
|
5979
|
+
this.LanguageValidation = null;
|
|
5965
5980
|
/** Set Type of TextBox ("text","password","email","number") */
|
|
5966
5981
|
this.Type = exports.InputType.Text;
|
|
5967
5982
|
this.IconPosition = exports.IconPosition.left;
|
|
@@ -6002,12 +6017,24 @@
|
|
|
6002
6017
|
function RepeaterFieldBuilderComponent(renderComponentService, TextControlHost) {
|
|
6003
6018
|
this.renderComponentService = renderComponentService;
|
|
6004
6019
|
this.TextControlHost = TextControlHost;
|
|
6020
|
+
this.itemsValue = [];
|
|
6021
|
+
this.itemValue = null;
|
|
6005
6022
|
}
|
|
6006
6023
|
RepeaterFieldBuilderComponent.prototype.ngOnInit = function () {
|
|
6007
6024
|
};
|
|
6008
6025
|
RepeaterFieldBuilderComponent.prototype.ngAfterViewInit = function () {
|
|
6009
6026
|
var _this = this;
|
|
6010
6027
|
setTimeout(function () {
|
|
6028
|
+
if (_this.itemsValue.length > 0)
|
|
6029
|
+
_this.itemValue = _this.itemsValue[_this.itemNumber];
|
|
6030
|
+
if (_this.itemValue) {
|
|
6031
|
+
for (var key in _this.itemValue) {
|
|
6032
|
+
if (Object.prototype.hasOwnProperty.call(_this.itemValue, key) && key == _this.RepeaterField.ControlOptions.Name) {
|
|
6033
|
+
var element = _this.itemValue[key];
|
|
6034
|
+
_this.value = element;
|
|
6035
|
+
}
|
|
6036
|
+
}
|
|
6037
|
+
}
|
|
6011
6038
|
_this.Item.clear();
|
|
6012
6039
|
switch (_this.RepeaterField.ControlType) {
|
|
6013
6040
|
///TextBox
|
|
@@ -6020,10 +6047,12 @@
|
|
|
6020
6047
|
Text.ViewType = _this.RepeaterField.ControlOptions.ViewType;
|
|
6021
6048
|
Text.LabelDescription = _this.RepeaterField.ControlOptions.LabelDescription ? _this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6022
6049
|
Text.Type = exports.InputType.Text;
|
|
6050
|
+
Text.LanguageValidation = _this.RepeaterField.ControlOptions.LanguageValidation;
|
|
6023
6051
|
if (_this.RepeaterField.ControlOptions.maxLength)
|
|
6024
6052
|
Text.MaxLength = _this.RepeaterField.ControlOptions.maxLength;
|
|
6025
6053
|
if (_this.RepeaterField.ControlOptions.minLength)
|
|
6026
6054
|
Text.MinLength = _this.RepeaterField.ControlOptions.minLength;
|
|
6055
|
+
Text.Value = _this.value;
|
|
6027
6056
|
_this.renderComponentService.renderDynamicComponent(_this.Item, TextboxComponent, _this.group, Text);
|
|
6028
6057
|
break;
|
|
6029
6058
|
case exports.DataType.Name:
|
|
@@ -6033,12 +6062,14 @@
|
|
|
6033
6062
|
Name.LabelKey = _this.RepeaterField.ControlOptions.LabelKey;
|
|
6034
6063
|
Name.IsRequired = _this.RepeaterField.ControlOptions.IsRequired;
|
|
6035
6064
|
Name.ViewType = _this.RepeaterField.ControlOptions.ViewType;
|
|
6065
|
+
Name.LanguageValidation = _this.RepeaterField.ControlOptions.LanguageValidation;
|
|
6036
6066
|
Name.LabelDescription = _this.RepeaterField.ControlOptions.LabelDescription ? _this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6037
6067
|
if (_this.RepeaterField.ControlOptions.maxLength)
|
|
6038
6068
|
Name.MaxLength = _this.RepeaterField.ControlOptions.maxLength;
|
|
6039
6069
|
if (_this.RepeaterField.ControlOptions.minLength)
|
|
6040
6070
|
Name.MinLength = _this.RepeaterField.ControlOptions.minLength;
|
|
6041
6071
|
Name.Type = exports.InputType.Text;
|
|
6072
|
+
Name.Value = _this.value;
|
|
6042
6073
|
_this.renderComponentService.renderDynamicComponent(_this.Item, TextboxComponent, _this.group, Name);
|
|
6043
6074
|
break;
|
|
6044
6075
|
case exports.DataType.Email:
|
|
@@ -6048,8 +6079,10 @@
|
|
|
6048
6079
|
Email.LabelKey = _this.RepeaterField.ControlOptions.LabelKey;
|
|
6049
6080
|
Email.IsRequired = _this.RepeaterField.ControlOptions.IsRequired;
|
|
6050
6081
|
Email.ViewType = _this.RepeaterField.ControlOptions.ViewType;
|
|
6082
|
+
Email.LanguageValidation = _this.RepeaterField.ControlOptions.LanguageValidation;
|
|
6051
6083
|
Email.LabelDescription = _this.RepeaterField.ControlOptions.LabelDescription ? _this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6052
6084
|
Email.Type = exports.InputType.Email;
|
|
6085
|
+
Email.Value = _this.value;
|
|
6053
6086
|
_this.renderComponentService.renderDynamicComponent(_this.Item, TextboxComponent, _this.group, Email);
|
|
6054
6087
|
break;
|
|
6055
6088
|
case exports.DataType.Number:
|
|
@@ -6059,12 +6092,14 @@
|
|
|
6059
6092
|
Number.LabelKey = _this.RepeaterField.ControlOptions.LabelKey;
|
|
6060
6093
|
Number.IsRequired = _this.RepeaterField.ControlOptions.IsRequired;
|
|
6061
6094
|
Number.ViewType = _this.RepeaterField.ControlOptions.ViewType;
|
|
6095
|
+
Number.LanguageValidation = _this.RepeaterField.ControlOptions.LanguageValidation;
|
|
6062
6096
|
Number.LabelDescription = _this.RepeaterField.ControlOptions.LabelDescription ? _this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6063
6097
|
Number.Type = exports.InputType.Number;
|
|
6064
6098
|
var rangeNumber = new RangeNumber();
|
|
6065
6099
|
rangeNumber.To = _this.RepeaterField.ControlOptions.maxLength;
|
|
6066
6100
|
rangeNumber.From = _this.RepeaterField.ControlOptions.minLength;
|
|
6067
6101
|
Number.NumberRange = rangeNumber;
|
|
6102
|
+
Number.Value = _this.value;
|
|
6068
6103
|
_this.renderComponentService.renderDynamicComponent(_this.Item, TextboxComponent, _this.group, Number);
|
|
6069
6104
|
break;
|
|
6070
6105
|
///DateTime
|
|
@@ -6079,6 +6114,7 @@
|
|
|
6079
6114
|
Date.PickerType = exports.PickerType.Calendar;
|
|
6080
6115
|
Date.SelectMode = exports.SelectMode.Single;
|
|
6081
6116
|
Date.StartView = exports.StartView.Month;
|
|
6117
|
+
Date.Value = _this.value;
|
|
6082
6118
|
_this.renderComponentService.renderDynamicComponent(_this.Item, DateInputComponent, _this.group, Date);
|
|
6083
6119
|
break;
|
|
6084
6120
|
case exports.DataType.DateTime:
|
|
@@ -6092,6 +6128,7 @@
|
|
|
6092
6128
|
DateTime.PickerType = exports.PickerType.Both;
|
|
6093
6129
|
DateTime.SelectMode = exports.SelectMode.Single;
|
|
6094
6130
|
DateTime.StartView = exports.StartView.Month;
|
|
6131
|
+
DateTime.Value = _this.value;
|
|
6095
6132
|
_this.renderComponentService.renderDynamicComponent(_this.Item, DateInputComponent, _this.group, DateTime);
|
|
6096
6133
|
break;
|
|
6097
6134
|
case exports.DataType.Time:
|
|
@@ -6105,6 +6142,7 @@
|
|
|
6105
6142
|
Time.PickerType = exports.PickerType.Timer;
|
|
6106
6143
|
Time.SelectMode = exports.SelectMode.Single;
|
|
6107
6144
|
Time.StartView = exports.StartView.Month;
|
|
6145
|
+
Time.Value = _this.value;
|
|
6108
6146
|
_this.renderComponentService.renderDynamicComponent(_this.Item, DateInputComponent, _this.group, Time);
|
|
6109
6147
|
break;
|
|
6110
6148
|
//Dropdown
|
|
@@ -6120,6 +6158,7 @@
|
|
|
6120
6158
|
SingleSelect.SingleSelection = true;
|
|
6121
6159
|
SingleSelect.ShowCheckbox = false;
|
|
6122
6160
|
SingleSelect.AllowSearchFilter = _this.RepeaterField.ControlOptions.hasSearch;
|
|
6161
|
+
SingleSelect.SelectedItems = _this.value;
|
|
6123
6162
|
_this.renderComponentService.renderDynamicComponent(_this.Item, DropdownListComponent, _this.group, SingleSelect);
|
|
6124
6163
|
break;
|
|
6125
6164
|
case exports.DataType.MulipleSelect:
|
|
@@ -6134,6 +6173,7 @@
|
|
|
6134
6173
|
MulipleSelect.SingleSelection = false;
|
|
6135
6174
|
MulipleSelect.ShowCheckbox = false;
|
|
6136
6175
|
MulipleSelect.AllowSearchFilter = _this.RepeaterField.ControlOptions.hasSearch;
|
|
6176
|
+
MulipleSelect.SelectedItems = _this.value;
|
|
6137
6177
|
_this.renderComponentService.renderDynamicComponent(_this.Item, DropdownListComponent, _this.group, MulipleSelect);
|
|
6138
6178
|
break;
|
|
6139
6179
|
case exports.DataType.Goal:
|
|
@@ -6148,6 +6188,7 @@
|
|
|
6148
6188
|
Goal.SingleSelection = !_this.RepeaterField.ControlOptions.isMultiple;
|
|
6149
6189
|
Goal.ShowCheckbox = false;
|
|
6150
6190
|
Goal.AllowSearchFilter = _this.RepeaterField.ControlOptions.hasSearch;
|
|
6191
|
+
Goal.SelectedItems = _this.value;
|
|
6151
6192
|
_this.renderComponentService.renderDynamicComponent(_this.Item, DropdownListComponent, _this.group, Goal);
|
|
6152
6193
|
break;
|
|
6153
6194
|
case exports.DataType.Challenge:
|
|
@@ -6163,6 +6204,7 @@
|
|
|
6163
6204
|
Challenge.SingleSelection = !_this.RepeaterField.ControlOptions.isMultiple;
|
|
6164
6205
|
Challenge.ShowCheckbox = false;
|
|
6165
6206
|
Challenge.AllowSearchFilter = _this.RepeaterField.ControlOptions.hasSearch;
|
|
6207
|
+
Challenge.SelectedItems = _this.value;
|
|
6166
6208
|
_this.renderComponentService.renderDynamicComponent(_this.Item, DropdownListComponent, _this.group, Challenge);
|
|
6167
6209
|
break;
|
|
6168
6210
|
case exports.DataType.InnovationLab:
|
|
@@ -6177,6 +6219,7 @@
|
|
|
6177
6219
|
InnovationLab.SingleSelection = !_this.RepeaterField.ControlOptions.isMultiple;
|
|
6178
6220
|
InnovationLab.ShowCheckbox = false;
|
|
6179
6221
|
InnovationLab.AllowSearchFilter = _this.RepeaterField.ControlOptions.hasSearch;
|
|
6222
|
+
InnovationLab.SelectedItems = _this.value;
|
|
6180
6223
|
_this.renderComponentService.renderDynamicComponent(_this.Item, DropdownListComponent, _this.group, InnovationLab);
|
|
6181
6224
|
break;
|
|
6182
6225
|
case exports.DataType.Country:
|
|
@@ -6191,6 +6234,7 @@
|
|
|
6191
6234
|
Country.SingleSelection = !_this.RepeaterField.ControlOptions.isMultiple;
|
|
6192
6235
|
Country.ShowCheckbox = false;
|
|
6193
6236
|
Country.AllowSearchFilter = _this.RepeaterField.ControlOptions.hasSearch;
|
|
6237
|
+
Country.SelectedItems = _this.value;
|
|
6194
6238
|
_this.renderComponentService.renderDynamicComponent(_this.Item, DropdownListComponent, _this.group, Country);
|
|
6195
6239
|
break;
|
|
6196
6240
|
//FileUpload
|
|
@@ -6203,6 +6247,7 @@
|
|
|
6203
6247
|
File.ViewType = _this.RepeaterField.ControlOptions.ViewType;
|
|
6204
6248
|
File.LabelDescription = _this.RepeaterField.ControlOptions.LabelDescription ? _this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6205
6249
|
File.FileMaxSizeInMB = _this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6250
|
+
File.Value = _this.value;
|
|
6206
6251
|
_this.renderComponentService.renderDynamicComponent(_this.Item, FileUploadComponent, _this.group, File);
|
|
6207
6252
|
break;
|
|
6208
6253
|
case exports.DataType.MultiFile:
|
|
@@ -6216,6 +6261,7 @@
|
|
|
6216
6261
|
MultiFile.MaxSizeForAllFilesInMB = _this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6217
6262
|
MultiFile.MaxNoOfFiles = _this.RepeaterField.ControlOptions.maxFileCount;
|
|
6218
6263
|
MultiFile.IsMultipleFile = true;
|
|
6264
|
+
MultiFile.Value = _this.value;
|
|
6219
6265
|
_this.renderComponentService.renderDynamicComponent(_this.Item, FileUploadComponent, _this.group, MultiFile);
|
|
6220
6266
|
break;
|
|
6221
6267
|
//ImageUpload
|
|
@@ -6229,6 +6275,7 @@
|
|
|
6229
6275
|
Image.LabelDescription = _this.RepeaterField.ControlOptions.LabelDescription ? _this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6230
6276
|
if (_this.RepeaterField.ControlOptions.maxFileSizeInMB)
|
|
6231
6277
|
Image.FileMaxSizeInMB = _this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6278
|
+
Image.Value = _this.value;
|
|
6232
6279
|
_this.renderComponentService.renderDynamicComponent(_this.Item, ImageUploaderComponent, _this.group, Image);
|
|
6233
6280
|
break;
|
|
6234
6281
|
case exports.DataType.CoverPhoto:
|
|
@@ -6241,6 +6288,7 @@
|
|
|
6241
6288
|
CoverPhoto.LabelDescription = _this.RepeaterField.ControlOptions.LabelDescription ? _this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6242
6289
|
if (_this.RepeaterField.ControlOptions.maxFileSizeInMB)
|
|
6243
6290
|
CoverPhoto.FileMaxSizeInMB = _this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6291
|
+
CoverPhoto.Value = _this.value;
|
|
6244
6292
|
_this.renderComponentService.renderDynamicComponent(_this.Item, ImageUploaderComponent, _this.group, CoverPhoto);
|
|
6245
6293
|
break;
|
|
6246
6294
|
//Mobile
|
|
@@ -6256,6 +6304,7 @@
|
|
|
6256
6304
|
Mobile.PhoneValidation = true;
|
|
6257
6305
|
Mobile.SelectFirstCountry = true;
|
|
6258
6306
|
Mobile.EnablePlaceholder = true;
|
|
6307
|
+
Mobile.Value = _this.value;
|
|
6259
6308
|
_this.renderComponentService.renderDynamicComponent(_this.Item, PhoneComponent, _this.group, Mobile);
|
|
6260
6309
|
break;
|
|
6261
6310
|
//MultilineText
|
|
@@ -6273,6 +6322,7 @@
|
|
|
6273
6322
|
MultilineText.MinLength = _this.RepeaterField.ControlOptions.minLength;
|
|
6274
6323
|
MultilineText.Rows = _this.RepeaterField.ControlOptions.rows;
|
|
6275
6324
|
MultilineText.ForceDirection = _this.RepeaterField.ControlOptions.ForceDirection;
|
|
6325
|
+
MultilineText.Value = _this.value;
|
|
6276
6326
|
_this.renderComponentService.renderDynamicComponent(_this.Item, TextAreaComponent, _this.group, MultilineText);
|
|
6277
6327
|
break;
|
|
6278
6328
|
//HTML
|
|
@@ -6290,6 +6340,7 @@
|
|
|
6290
6340
|
HTML.MinLength = _this.RepeaterField.ControlOptions.minLength;
|
|
6291
6341
|
HTML.Height = _this.RepeaterField.ControlOptions.rows;
|
|
6292
6342
|
HTML.ForceDirection = _this.RepeaterField.ControlOptions.ForceDirection;
|
|
6343
|
+
HTML.Value = _this.value;
|
|
6293
6344
|
_this.renderComponentService.renderDynamicComponent(_this.Item, HtmlEditorComponent, _this.group, HTML);
|
|
6294
6345
|
break;
|
|
6295
6346
|
//Boolean
|
|
@@ -6299,6 +6350,7 @@
|
|
|
6299
6350
|
Boolean.HideLabel = _this.RepeaterField.ControlOptions.HideLabel;
|
|
6300
6351
|
Boolean.LabelKey = _this.RepeaterField.ControlOptions.LabelKey;
|
|
6301
6352
|
Boolean.ViewType = _this.RepeaterField.ControlOptions.ViewType;
|
|
6353
|
+
Boolean.Value = _this.value;
|
|
6302
6354
|
Boolean.LabelDescription = _this.RepeaterField.ControlOptions.LabelDescription ? _this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6303
6355
|
_this.renderComponentService.renderDynamicComponent(_this.Item, ToggleslideComponent, _this.group, Boolean);
|
|
6304
6356
|
break;
|
|
@@ -6310,6 +6362,7 @@
|
|
|
6310
6362
|
Location.LabelKey = _this.RepeaterField.ControlOptions.LabelKey;
|
|
6311
6363
|
Location.IsRequired = _this.RepeaterField.ControlOptions.IsRequired;
|
|
6312
6364
|
Location.ViewType = _this.RepeaterField.ControlOptions.ViewType;
|
|
6365
|
+
Location.Value = _this.value;
|
|
6313
6366
|
Location.LabelDescription = _this.RepeaterField.ControlOptions.LabelDescription ? _this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6314
6367
|
_this.renderComponentService.renderDynamicComponent(_this.Item, MapAutoCompleteComponent, _this.group, Location);
|
|
6315
6368
|
break;
|
|
@@ -6319,341 +6372,342 @@
|
|
|
6319
6372
|
}, 0);
|
|
6320
6373
|
};
|
|
6321
6374
|
RepeaterFieldBuilderComponent.prototype.ngOnChanges = function (changes) {
|
|
6322
|
-
if (changes.itemNumber
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6375
|
+
if (changes.itemNumber)
|
|
6376
|
+
if (changes.itemNumber.previousValue) {
|
|
6377
|
+
var name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.previousValue.toString() + "." + this.controlNumber.toString();
|
|
6378
|
+
var value = this.group.controls[name].value;
|
|
6379
|
+
this.Item.clear();
|
|
6380
|
+
this.group.removeControl(name);
|
|
6381
|
+
switch (this.RepeaterField.ControlType) {
|
|
6382
|
+
///TextBox
|
|
6383
|
+
case exports.DataType.Text:
|
|
6384
|
+
var Text = new TextBoxOptions();
|
|
6385
|
+
Text.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6386
|
+
Text.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6387
|
+
Text.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6388
|
+
Text.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6389
|
+
Text.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6390
|
+
Text.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6391
|
+
Text.Type = exports.InputType.Text;
|
|
6392
|
+
if (this.RepeaterField.ControlOptions.maxLength)
|
|
6393
|
+
Text.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
6394
|
+
if (this.RepeaterField.ControlOptions.minLength)
|
|
6395
|
+
Text.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
6396
|
+
Text.Value = value;
|
|
6397
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Text);
|
|
6398
|
+
break;
|
|
6399
|
+
case exports.DataType.Name:
|
|
6400
|
+
var Name = new TextBoxOptions();
|
|
6401
|
+
Name.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6402
|
+
Name.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6403
|
+
Name.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6404
|
+
Name.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6405
|
+
Name.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6406
|
+
Name.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6407
|
+
if (this.RepeaterField.ControlOptions.maxLength)
|
|
6408
|
+
Name.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
6409
|
+
if (this.RepeaterField.ControlOptions.minLength)
|
|
6410
|
+
Name.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
6411
|
+
Name.Type = exports.InputType.Text;
|
|
6412
|
+
Name.Value = value;
|
|
6413
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Name);
|
|
6414
|
+
break;
|
|
6415
|
+
case exports.DataType.Email:
|
|
6416
|
+
var Email = new TextBoxOptions();
|
|
6417
|
+
Email.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6418
|
+
Email.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6419
|
+
Email.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6420
|
+
Email.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6421
|
+
Email.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6422
|
+
Email.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6423
|
+
Email.Type = exports.InputType.Email;
|
|
6424
|
+
Email.Value = value;
|
|
6425
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Email);
|
|
6426
|
+
break;
|
|
6427
|
+
case exports.DataType.Number:
|
|
6428
|
+
var Number = new TextBoxOptions();
|
|
6429
|
+
Number.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6430
|
+
Number.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6431
|
+
Number.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6432
|
+
Number.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6433
|
+
Number.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6434
|
+
Number.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6435
|
+
Number.Type = exports.InputType.Number;
|
|
6436
|
+
var rangeNumber = new RangeNumber();
|
|
6437
|
+
rangeNumber.To = this.RepeaterField.ControlOptions.maxLength;
|
|
6438
|
+
rangeNumber.From = this.RepeaterField.ControlOptions.minLength;
|
|
6439
|
+
Number.NumberRange = rangeNumber;
|
|
6440
|
+
Number.Value = value;
|
|
6441
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Number);
|
|
6442
|
+
break;
|
|
6443
|
+
///DateTime
|
|
6444
|
+
case exports.DataType.Date:
|
|
6445
|
+
var Date = new DatePickerOptions();
|
|
6446
|
+
Date.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6447
|
+
Date.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6448
|
+
Date.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6449
|
+
Date.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6450
|
+
Date.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6451
|
+
Date.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6452
|
+
Date.PickerType = exports.PickerType.Calendar;
|
|
6453
|
+
Date.SelectMode = exports.SelectMode.Single;
|
|
6454
|
+
Date.StartView = exports.StartView.Month;
|
|
6455
|
+
Date.Value = value;
|
|
6456
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, Date);
|
|
6457
|
+
break;
|
|
6458
|
+
case exports.DataType.DateTime:
|
|
6459
|
+
var DateTime = new DatePickerOptions();
|
|
6460
|
+
DateTime.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6461
|
+
DateTime.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6462
|
+
DateTime.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6463
|
+
DateTime.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6464
|
+
DateTime.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6465
|
+
DateTime.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6466
|
+
DateTime.PickerType = exports.PickerType.Both;
|
|
6467
|
+
DateTime.SelectMode = exports.SelectMode.Single;
|
|
6468
|
+
DateTime.StartView = exports.StartView.Month;
|
|
6469
|
+
DateTime.Value = value;
|
|
6470
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, DateTime);
|
|
6471
|
+
break;
|
|
6472
|
+
case exports.DataType.Time:
|
|
6473
|
+
var Time = new DatePickerOptions();
|
|
6474
|
+
Time.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6475
|
+
Time.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6476
|
+
Time.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6477
|
+
Time.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6478
|
+
Time.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6479
|
+
Time.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6480
|
+
Time.PickerType = exports.PickerType.Timer;
|
|
6481
|
+
Time.SelectMode = exports.SelectMode.Single;
|
|
6482
|
+
Time.StartView = exports.StartView.Month;
|
|
6483
|
+
Time.Value = value;
|
|
6484
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DateInputComponent, this.group, Time);
|
|
6485
|
+
break;
|
|
6486
|
+
//Dropdown
|
|
6487
|
+
case exports.DataType.SingleSelect:
|
|
6488
|
+
var SingleSelect = new DropdownOptions();
|
|
6489
|
+
SingleSelect.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6490
|
+
SingleSelect.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6491
|
+
SingleSelect.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6492
|
+
SingleSelect.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6493
|
+
SingleSelect.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6494
|
+
SingleSelect.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6495
|
+
SingleSelect.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6496
|
+
SingleSelect.SingleSelection = true;
|
|
6497
|
+
SingleSelect.ShowCheckbox = false;
|
|
6498
|
+
SingleSelect.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6499
|
+
SingleSelect.SelectedItems = value;
|
|
6500
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, SingleSelect);
|
|
6501
|
+
break;
|
|
6502
|
+
case exports.DataType.MulipleSelect:
|
|
6503
|
+
var MulipleSelect = new DropdownOptions();
|
|
6504
|
+
MulipleSelect.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6505
|
+
MulipleSelect.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6506
|
+
MulipleSelect.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6507
|
+
MulipleSelect.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6508
|
+
MulipleSelect.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6509
|
+
MulipleSelect.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6510
|
+
MulipleSelect.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6511
|
+
MulipleSelect.SingleSelection = false;
|
|
6512
|
+
MulipleSelect.ShowCheckbox = false;
|
|
6513
|
+
MulipleSelect.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6514
|
+
MulipleSelect.SelectedItems = value;
|
|
6515
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, MulipleSelect);
|
|
6516
|
+
break;
|
|
6517
|
+
case exports.DataType.Goal:
|
|
6518
|
+
var Goal = new DropdownOptions();
|
|
6519
|
+
Goal.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6520
|
+
Goal.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6521
|
+
Goal.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6522
|
+
Goal.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6523
|
+
Goal.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6524
|
+
Goal.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6525
|
+
Goal.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6526
|
+
Goal.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
6527
|
+
Goal.ShowCheckbox = false;
|
|
6528
|
+
Goal.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6529
|
+
Goal.SelectedItems = value;
|
|
6530
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Goal);
|
|
6531
|
+
break;
|
|
6532
|
+
case exports.DataType.Challenge:
|
|
6533
|
+
var Challenge = new DropdownOptions();
|
|
6534
|
+
Challenge.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6535
|
+
Challenge.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6536
|
+
Challenge.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6537
|
+
Challenge.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6538
|
+
Challenge.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6539
|
+
Challenge.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6540
|
+
Challenge.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6541
|
+
Challenge.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6542
|
+
Challenge.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
6543
|
+
Challenge.ShowCheckbox = false;
|
|
6544
|
+
Challenge.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6545
|
+
Challenge.SelectedItems = value;
|
|
6546
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Challenge);
|
|
6547
|
+
break;
|
|
6548
|
+
case exports.DataType.InnovationLab:
|
|
6549
|
+
var InnovationLab = new DropdownOptions();
|
|
6550
|
+
InnovationLab.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6551
|
+
InnovationLab.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6552
|
+
InnovationLab.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6553
|
+
InnovationLab.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6554
|
+
InnovationLab.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6555
|
+
InnovationLab.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6556
|
+
InnovationLab.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6557
|
+
InnovationLab.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
6558
|
+
InnovationLab.ShowCheckbox = false;
|
|
6559
|
+
InnovationLab.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6560
|
+
InnovationLab.SelectedItems = value;
|
|
6561
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, InnovationLab);
|
|
6562
|
+
break;
|
|
6563
|
+
case exports.DataType.Country:
|
|
6564
|
+
var Country = new DropdownOptions();
|
|
6565
|
+
Country.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6566
|
+
Country.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6567
|
+
Country.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6568
|
+
Country.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6569
|
+
Country.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6570
|
+
Country.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6571
|
+
Country.DataSource = this.RepeaterField.ControlOptions.dataSource;
|
|
6572
|
+
Country.SingleSelection = !this.RepeaterField.ControlOptions.isMultiple;
|
|
6573
|
+
Country.ShowCheckbox = false;
|
|
6574
|
+
Country.AllowSearchFilter = this.RepeaterField.ControlOptions.hasSearch;
|
|
6575
|
+
Country.SelectedItems = value;
|
|
6576
|
+
this.renderComponentService.renderDynamicComponent(this.Item, DropdownListComponent, this.group, Country);
|
|
6577
|
+
break;
|
|
6578
|
+
//FileUpload
|
|
6579
|
+
case exports.DataType.File:
|
|
6580
|
+
var File = new FileUploadOptions();
|
|
6581
|
+
File.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6582
|
+
File.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6583
|
+
File.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6584
|
+
File.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6585
|
+
File.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6586
|
+
File.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6587
|
+
File.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6588
|
+
File.Value = value;
|
|
6589
|
+
this.renderComponentService.renderDynamicComponent(this.Item, FileUploadComponent, this.group, File);
|
|
6590
|
+
break;
|
|
6591
|
+
case exports.DataType.MultiFile:
|
|
6592
|
+
var MultiFile = new FileUploadOptions();
|
|
6593
|
+
File.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6594
|
+
File.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6595
|
+
File.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6596
|
+
File.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6597
|
+
File.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6598
|
+
File.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6599
|
+
MultiFile.MaxSizeForAllFilesInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6600
|
+
MultiFile.MaxNoOfFiles = this.RepeaterField.ControlOptions.maxFileCount;
|
|
6601
|
+
MultiFile.IsMultipleFile = true;
|
|
6602
|
+
MultiFile.Value = value;
|
|
6603
|
+
this.renderComponentService.renderDynamicComponent(this.Item, FileUploadComponent, this.group, MultiFile);
|
|
6604
|
+
break;
|
|
6605
|
+
//ImageUpload
|
|
6606
|
+
case exports.DataType.Image:
|
|
6607
|
+
var Image = new ImageUploadOptions();
|
|
6608
|
+
Image.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6609
|
+
Image.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6610
|
+
Image.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6611
|
+
Image.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6612
|
+
Image.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6613
|
+
Image.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6614
|
+
if (this.RepeaterField.ControlOptions.maxFileSizeInMB)
|
|
6615
|
+
Image.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6616
|
+
Image.Value = value;
|
|
6617
|
+
this.renderComponentService.renderDynamicComponent(this.Item, ImageUploaderComponent, this.group, Image);
|
|
6618
|
+
break;
|
|
6619
|
+
case exports.DataType.CoverPhoto:
|
|
6620
|
+
var CoverPhoto = new ImageUploadOptions();
|
|
6621
|
+
CoverPhoto.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6622
|
+
CoverPhoto.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6623
|
+
CoverPhoto.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6624
|
+
CoverPhoto.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6625
|
+
CoverPhoto.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6626
|
+
CoverPhoto.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6627
|
+
if (this.RepeaterField.ControlOptions.maxFileSizeInMB)
|
|
6628
|
+
CoverPhoto.FileMaxSizeInMB = this.RepeaterField.ControlOptions.maxFileSizeInMB;
|
|
6629
|
+
CoverPhoto.Value = value;
|
|
6630
|
+
this.renderComponentService.renderDynamicComponent(this.Item, ImageUploaderComponent, this.group, CoverPhoto);
|
|
6631
|
+
break;
|
|
6632
|
+
//Mobile
|
|
6633
|
+
case exports.DataType.Mobile:
|
|
6634
|
+
var Mobile = new PhoneOptions();
|
|
6635
|
+
Mobile.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6636
|
+
Mobile.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6637
|
+
Mobile.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6638
|
+
Mobile.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6639
|
+
Mobile.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6640
|
+
Mobile.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6641
|
+
Mobile.AllowSearch = true;
|
|
6642
|
+
Mobile.PhoneValidation = true;
|
|
6643
|
+
Mobile.SelectFirstCountry = true;
|
|
6644
|
+
Mobile.EnablePlaceholder = true;
|
|
6645
|
+
Mobile.Value = value;
|
|
6646
|
+
this.renderComponentService.renderDynamicComponent(this.Item, PhoneComponent, this.group, Mobile);
|
|
6647
|
+
break;
|
|
6648
|
+
//MultilineText
|
|
6649
|
+
case exports.DataType.MultilineText:
|
|
6650
|
+
var MultilineText = new TextAreaOptions();
|
|
6651
|
+
MultilineText.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6652
|
+
MultilineText.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6653
|
+
MultilineText.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6654
|
+
MultilineText.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6655
|
+
MultilineText.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6656
|
+
MultilineText.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6657
|
+
if (this.RepeaterField.ControlOptions.maxLength)
|
|
6658
|
+
MultilineText.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
6659
|
+
if (this.RepeaterField.ControlOptions.minLength)
|
|
6660
|
+
MultilineText.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
6661
|
+
MultilineText.Rows = this.RepeaterField.ControlOptions.rows;
|
|
6662
|
+
MultilineText.ForceDirection = this.RepeaterField.ControlOptions.ForceDirection;
|
|
6663
|
+
MultilineText.Value = value;
|
|
6664
|
+
this.renderComponentService.renderDynamicComponent(this.Item, TextAreaComponent, this.group, MultilineText);
|
|
6665
|
+
break;
|
|
6666
|
+
//HTML
|
|
6667
|
+
case exports.DataType.HTML:
|
|
6668
|
+
var HTML = new HtmlEditorOptions();
|
|
6669
|
+
HTML.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6670
|
+
HTML.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6671
|
+
HTML.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6672
|
+
HTML.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6673
|
+
HTML.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6674
|
+
HTML.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6675
|
+
if (this.RepeaterField.ControlOptions.maxLength)
|
|
6676
|
+
HTML.MaxLength = this.RepeaterField.ControlOptions.maxLength;
|
|
6677
|
+
if (this.RepeaterField.ControlOptions.minLength)
|
|
6678
|
+
HTML.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
6679
|
+
HTML.Height = this.RepeaterField.ControlOptions.rows;
|
|
6680
|
+
HTML.ForceDirection = this.RepeaterField.ControlOptions.ForceDirection;
|
|
6681
|
+
HTML.Value = value;
|
|
6682
|
+
this.renderComponentService.renderDynamicComponent(this.Item, HtmlEditorComponent, this.group, HTML);
|
|
6683
|
+
break;
|
|
6684
|
+
//Boolean
|
|
6685
|
+
case exports.DataType.Boolean:
|
|
6686
|
+
var Boolean = new ToggleSlideOptions();
|
|
6687
|
+
Boolean.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6688
|
+
Boolean.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6689
|
+
Boolean.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6690
|
+
Boolean.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6691
|
+
Boolean.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6692
|
+
Boolean.Value = value;
|
|
6693
|
+
this.renderComponentService.renderDynamicComponent(this.Item, ToggleslideComponent, this.group, Boolean);
|
|
6694
|
+
break;
|
|
6695
|
+
//Location
|
|
6696
|
+
case exports.DataType.Location:
|
|
6697
|
+
var Location = new MapAutoCompleteOptions();
|
|
6698
|
+
Location.Name = this.RepeaterField.ControlOptions.Name + "." + changes.itemNumber.currentValue + "." + this.controlNumber.toString();
|
|
6699
|
+
Location.HideLabel = this.RepeaterField.ControlOptions.HideLabel;
|
|
6700
|
+
Location.LabelKey = this.RepeaterField.ControlOptions.LabelKey;
|
|
6701
|
+
Location.IsRequired = this.RepeaterField.ControlOptions.IsRequired;
|
|
6702
|
+
Location.ViewType = this.RepeaterField.ControlOptions.ViewType;
|
|
6703
|
+
Location.LabelDescription = this.RepeaterField.ControlOptions.LabelDescription ? this.RepeaterField.ControlOptions.LabelDescription : "";
|
|
6704
|
+
Location.Value = value;
|
|
6705
|
+
this.renderComponentService.renderDynamicComponent(this.Item, MapAutoCompleteComponent, this.group, Location);
|
|
6706
|
+
break;
|
|
6707
|
+
default:
|
|
6708
|
+
break;
|
|
6709
|
+
}
|
|
6655
6710
|
}
|
|
6656
|
-
}
|
|
6657
6711
|
};
|
|
6658
6712
|
return RepeaterFieldBuilderComponent;
|
|
6659
6713
|
}());
|
|
@@ -6672,7 +6726,8 @@
|
|
|
6672
6726
|
group: [{ type: i0.Input }],
|
|
6673
6727
|
itemNumber: [{ type: i0.Input }],
|
|
6674
6728
|
controlNumber: [{ type: i0.Input }],
|
|
6675
|
-
RepeaterField: [{ type: i0.Input }]
|
|
6729
|
+
RepeaterField: [{ type: i0.Input }],
|
|
6730
|
+
itemsValue: [{ type: i0.Input }]
|
|
6676
6731
|
};
|
|
6677
6732
|
|
|
6678
6733
|
var RepeaterItemFieldComponent = /** @class */ (function () {
|
|
@@ -6696,6 +6751,116 @@
|
|
|
6696
6751
|
itemIndex: [{ type: i0.Input }]
|
|
6697
6752
|
};
|
|
6698
6753
|
|
|
6754
|
+
var RepeaterTableComponent = /** @class */ (function () {
|
|
6755
|
+
function RepeaterTableComponent(utilityService) {
|
|
6756
|
+
this.utilityService = utilityService;
|
|
6757
|
+
this.items = [];
|
|
6758
|
+
this.originalItems = [];
|
|
6759
|
+
}
|
|
6760
|
+
RepeaterTableComponent.prototype.ngOnInit = function () {
|
|
6761
|
+
var _this = this;
|
|
6762
|
+
this.repeaterGroup = new forms.FormGroup({});
|
|
6763
|
+
this.group.addControl(this.options.Name, this.repeaterGroup);
|
|
6764
|
+
if (this.options.RepeaterValue.length > 0) {
|
|
6765
|
+
this.originalItems = this.options.RepeaterValue;
|
|
6766
|
+
for (var index = 0; index < this.options.RepeaterValue.length; index++) {
|
|
6767
|
+
this.items.push(index + 1);
|
|
6768
|
+
}
|
|
6769
|
+
}
|
|
6770
|
+
else
|
|
6771
|
+
for (var index = 0; index < this.options.MinRequiredItems; index++) {
|
|
6772
|
+
this.items.push(index);
|
|
6773
|
+
}
|
|
6774
|
+
this.repeaterGroup.valueChanges.subscribe(function (res) {
|
|
6775
|
+
var _a, _b;
|
|
6776
|
+
var result = [];
|
|
6777
|
+
var rowNumber = [];
|
|
6778
|
+
var addItems = [];
|
|
6779
|
+
for (var key in _this.repeaterGroup.controls) {
|
|
6780
|
+
if (Object.prototype.hasOwnProperty.call(_this.repeaterGroup.controls, key)) {
|
|
6781
|
+
var keySplitArr = key.split('.');
|
|
6782
|
+
var item = (_a = {},
|
|
6783
|
+
_a[keySplitArr[1]] = (_b = {}, _b[keySplitArr[0]] = _this.group.controls[_this.options.Name].value[key], _b),
|
|
6784
|
+
_a);
|
|
6785
|
+
addItems.push(item);
|
|
6786
|
+
if (!rowNumber.includes(keySplitArr[1]))
|
|
6787
|
+
rowNumber.push(keySplitArr[1]);
|
|
6788
|
+
}
|
|
6789
|
+
}
|
|
6790
|
+
var _loop_1 = function (index) {
|
|
6791
|
+
var row = rowNumber[index];
|
|
6792
|
+
var addObject = {};
|
|
6793
|
+
var filteredElements = addItems.filter(function (item) { return item[row]; });
|
|
6794
|
+
for (var index_1 = 0; index_1 < filteredElements.length; index_1++) {
|
|
6795
|
+
var filteredElement = filteredElements[index_1];
|
|
6796
|
+
for (var key in filteredElement) {
|
|
6797
|
+
if (Object.prototype.hasOwnProperty.call(filteredElement, key)) {
|
|
6798
|
+
var element = filteredElement[key];
|
|
6799
|
+
for (var key_1 in element) {
|
|
6800
|
+
if (Object.prototype.hasOwnProperty.call(element, key_1)) {
|
|
6801
|
+
var value = element[key_1];
|
|
6802
|
+
addObject[key_1] = value;
|
|
6803
|
+
}
|
|
6804
|
+
}
|
|
6805
|
+
}
|
|
6806
|
+
}
|
|
6807
|
+
}
|
|
6808
|
+
result.push(addObject);
|
|
6809
|
+
};
|
|
6810
|
+
for (var index = 0; index < rowNumber.length; index++) {
|
|
6811
|
+
_loop_1(index);
|
|
6812
|
+
}
|
|
6813
|
+
_this.options.RepeaterValue = result;
|
|
6814
|
+
});
|
|
6815
|
+
};
|
|
6816
|
+
RepeaterTableComponent.prototype.deleteItem = function (Index) {
|
|
6817
|
+
var _a;
|
|
6818
|
+
var _this = this;
|
|
6819
|
+
if (this.items.length == this.options.MinRequiredItems && this.options.IsRequired)
|
|
6820
|
+
return;
|
|
6821
|
+
var deletedControls = [];
|
|
6822
|
+
var controlNames = this.options.RepeaterStructure.map(function (e) { return e.ControlOptions.Name; });
|
|
6823
|
+
for (var key in this.repeaterGroup.controls) {
|
|
6824
|
+
if (Object.prototype.hasOwnProperty.call(this.repeaterGroup.controls, key)) {
|
|
6825
|
+
for (var index = 0; index < controlNames.length; index++) {
|
|
6826
|
+
var element = controlNames[index];
|
|
6827
|
+
var keySplitArr = key.split('.');
|
|
6828
|
+
if (keySplitArr[0] + keySplitArr[1] == "" + element + Index) {
|
|
6829
|
+
var element_1 = this.repeaterGroup.controls[key];
|
|
6830
|
+
deletedControls.push((_a = {}, _a[key] = element_1, _a));
|
|
6831
|
+
}
|
|
6832
|
+
}
|
|
6833
|
+
}
|
|
6834
|
+
}
|
|
6835
|
+
for (var index = 0; index < deletedControls.length; index++) {
|
|
6836
|
+
var element = deletedControls[index];
|
|
6837
|
+
for (var key in element) {
|
|
6838
|
+
if (Object.prototype.hasOwnProperty.call(element, key)) {
|
|
6839
|
+
this.repeaterGroup.removeControl(key);
|
|
6840
|
+
}
|
|
6841
|
+
}
|
|
6842
|
+
}
|
|
6843
|
+
this.items = this.items.filter(function (res) { return res != _this.items[Index]; });
|
|
6844
|
+
};
|
|
6845
|
+
RepeaterTableComponent.prototype.addItem = function () {
|
|
6846
|
+
this.items.push(this.items[this.items.length - 1] + 1);
|
|
6847
|
+
};
|
|
6848
|
+
return RepeaterTableComponent;
|
|
6849
|
+
}());
|
|
6850
|
+
RepeaterTableComponent.decorators = [
|
|
6851
|
+
{ type: i0.Component, args: [{
|
|
6852
|
+
selector: 'BBSF-repeater-table',
|
|
6853
|
+
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>"
|
|
6854
|
+
},] }
|
|
6855
|
+
];
|
|
6856
|
+
RepeaterTableComponent.ctorParameters = function () { return [
|
|
6857
|
+
{ type: bbsfUtilities.UtilityService }
|
|
6858
|
+
]; };
|
|
6859
|
+
RepeaterTableComponent.propDecorators = {
|
|
6860
|
+
group: [{ type: i0.Input }],
|
|
6861
|
+
options: [{ type: i0.Input }]
|
|
6862
|
+
};
|
|
6863
|
+
|
|
6699
6864
|
var options;
|
|
6700
6865
|
exports.AppInjector = void 0;
|
|
6701
6866
|
angular.FullCalendarModule.registerPlugins([
|
|
@@ -6744,6 +6909,7 @@
|
|
|
6744
6909
|
RepeaterFieldBuilderComponent,
|
|
6745
6910
|
NgTemplateNameDirective,
|
|
6746
6911
|
RepeaterItemFieldComponent,
|
|
6912
|
+
RepeaterTableComponent
|
|
6747
6913
|
],
|
|
6748
6914
|
imports: [
|
|
6749
6915
|
common.CommonModule,
|
|
@@ -6838,6 +7004,7 @@
|
|
|
6838
7004
|
RepeaterFieldBuilderComponent,
|
|
6839
7005
|
NgTemplateNameDirective,
|
|
6840
7006
|
RepeaterItemFieldComponent,
|
|
7007
|
+
RepeaterTableComponent
|
|
6841
7008
|
]
|
|
6842
7009
|
},] }
|
|
6843
7010
|
];
|
|
@@ -7243,6 +7410,7 @@
|
|
|
7243
7410
|
var RepeaterOptions = /** @class */ (function () {
|
|
7244
7411
|
function RepeaterOptions() {
|
|
7245
7412
|
this.MinRequiredItems = 1;
|
|
7413
|
+
this.ActionLabelKey = "";
|
|
7246
7414
|
this.AddButtonText = "Add";
|
|
7247
7415
|
this.DeleteButtonText = "Delete";
|
|
7248
7416
|
this.RepeaterValue = [];
|
|
@@ -7640,6 +7808,7 @@
|
|
|
7640
7808
|
exports.RepeaterFieldBuilderComponent = RepeaterFieldBuilderComponent;
|
|
7641
7809
|
exports.RepeaterItemFieldComponent = RepeaterItemFieldComponent;
|
|
7642
7810
|
exports.RepeaterOptions = RepeaterOptions;
|
|
7811
|
+
exports.RepeaterTableComponent = RepeaterTableComponent;
|
|
7643
7812
|
exports.SaveDTO = SaveDTO;
|
|
7644
7813
|
exports.TagsInputComponent = TagsInputComponent;
|
|
7645
7814
|
exports.TagsInputDTO = TagsInputDTO;
|