mmhglobal-dynamicform 1.1.36 → 1.1.39
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 +11 -0
- package/bundles/mmhglobal-dynamicform.umd.js +336 -76
- package/bundles/mmhglobal-dynamicform.umd.js.map +1 -1
- package/bundles/mmhglobal-dynamicform.umd.min.js +2 -2
- package/bundles/mmhglobal-dynamicform.umd.min.js.map +1 -1
- package/esm2015/lib/mmhglobal-dynamicform.module.js +5 -1
- package/esm2015/lib/services/main.service.js +76 -47
- package/esm2015/lib/services/zcomponent.debug.service.js +3 -3
- package/esm2015/lib/services/zcomponent.service.js +3 -1
- package/esm2015/lib/zbuttons/zbuttons.component.js +5 -1
- package/esm2015/lib/zcheckbox/zcheckbox.component.js +24 -10
- package/esm2015/lib/zform/zform.component.js +6 -2
- package/esm2015/lib/zselectmultiple/zselectmultiple.component.js +23 -9
- package/esm2015/lib/ztext/ztext.component.js +25 -11
- package/esm2015/lib/zudf/zudf.component.js +166 -0
- package/esm2015/lib/zupload/zupload.component.js +18 -5
- package/esm2015/public-api.js +2 -1
- package/fesm2015/mmhglobal-dynamicform.js +335 -81
- package/fesm2015/mmhglobal-dynamicform.js.map +1 -1
- package/lib/zcheckbox/zcheckbox.component.d.ts +4 -2
- package/lib/zform/zform.component.d.ts +1 -0
- package/lib/zscheduler/zscheduler.component.d.ts +1 -1
- package/lib/zselectmultiple/zselectmultiple.component.d.ts +4 -2
- package/lib/ztext/ztext.component.d.ts +4 -2
- package/lib/zudf/zudf.component.d.ts +31 -0
- package/lib/zupload/zupload.component.d.ts +3 -1
- package/mmhglobal-dynamicform.metadata.json +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -395,11 +395,11 @@
|
|
|
395
395
|
onChangeWatchName: this.onChangeWatchName.bind(this),
|
|
396
396
|
getWatchName: this.getWatchName.bind(this),
|
|
397
397
|
fieldElementonEditorCodeChange: this.fieldElementonEditorCodeChange.bind(this),
|
|
398
|
-
gridActivityLogColumnFields: this.fieldService.getFormFieldCode('debugActivityLog', "FormField",
|
|
398
|
+
gridActivityLogColumnFields: this.fieldService.getFormFieldCode('debugActivityLog', "FormField", this.group, "debugActivityLogField"),
|
|
399
399
|
gridActivityLogOnItemClick: this.gridActivityLogOnItemClick.bind(this),
|
|
400
400
|
updateModel: this.updateModel.bind(this),
|
|
401
401
|
refreshWorkflowButtonData: this.loadWorkflowData.bind(this),
|
|
402
|
-
gridWorkflowButtonColumnFields: this.fieldService.getFormFieldCode('debugWorkflowButton', 'FormField',
|
|
402
|
+
gridWorkflowButtonColumnFields: this.fieldService.getFormFieldCode('debugWorkflowButton', 'FormField', this.group, "debugWorkflowButtonField"),
|
|
403
403
|
gridWorkflowButtonOnItemClick: this.gridWorkflowButtonOnItemClick.bind(this)
|
|
404
404
|
});
|
|
405
405
|
if (!d.zData) {
|
|
@@ -1488,10 +1488,22 @@
|
|
|
1488
1488
|
group.beforeBackNavigationPage(group).subscribe(function () {
|
|
1489
1489
|
group['isTriggered'] = false;
|
|
1490
1490
|
_this.router.navigate([group.backNavigationPage]);
|
|
1491
|
+
//if (group['reload']) {
|
|
1492
|
+
// group['isTriggered'] = false;
|
|
1493
|
+
// this.router.routeReuseStrategy.shouldReuseRoute = function () {
|
|
1494
|
+
// return false;
|
|
1495
|
+
// }
|
|
1496
|
+
// this.router.onSameUrlNavigation = 'reload';
|
|
1497
|
+
//}
|
|
1498
|
+
//this.router.navigate([group.backNavigationPage],);
|
|
1491
1499
|
});
|
|
1492
1500
|
}
|
|
1493
1501
|
else {
|
|
1494
1502
|
group['isTriggered'] = false;
|
|
1503
|
+
//this.router.routeReuseStrategy.shouldReuseRoute = function () {
|
|
1504
|
+
// return false;
|
|
1505
|
+
//}
|
|
1506
|
+
//this.router.onSameUrlNavigation = 'reload';
|
|
1495
1507
|
this.router.navigate([group.backNavigationPage]);
|
|
1496
1508
|
}
|
|
1497
1509
|
};
|
|
@@ -1538,10 +1550,14 @@
|
|
|
1538
1550
|
};
|
|
1539
1551
|
MainService.prototype.newModel = function (event, group) {
|
|
1540
1552
|
var _this = this;
|
|
1553
|
+
var _group = group;
|
|
1554
|
+
if (event.data && event.data.SubType) {
|
|
1555
|
+
_group = group['_' + event.data.SubType];
|
|
1556
|
+
}
|
|
1541
1557
|
rxjs.of([])
|
|
1542
1558
|
.pipe(operators.switchMap(function (zmodel) {
|
|
1543
1559
|
console.log("Before new, zModel:", zmodel);
|
|
1544
|
-
return _this.beforeNewModel(
|
|
1560
|
+
return _this.beforeNewModel(_group);
|
|
1545
1561
|
}), operators.tap(function () {
|
|
1546
1562
|
var referenceId = group.parentReferenceId || "0";
|
|
1547
1563
|
console.log("current url: ", _this.router.url);
|
|
@@ -1587,7 +1603,13 @@
|
|
|
1587
1603
|
};
|
|
1588
1604
|
MainService.prototype.createModel = function (event, group) {
|
|
1589
1605
|
var _this = this;
|
|
1606
|
+
var createModelres = null;
|
|
1590
1607
|
var fg = group.form;
|
|
1608
|
+
var _group = group;
|
|
1609
|
+
if (event.data && event.data.SubType) {
|
|
1610
|
+
fg = group['_' + event.data.SubType].form;
|
|
1611
|
+
_group = group['_' + event.data.SubType];
|
|
1612
|
+
}
|
|
1591
1613
|
if (!fg.dirty) {
|
|
1592
1614
|
console.warn("Form is not dirty hence record is not save.");
|
|
1593
1615
|
return;
|
|
@@ -1597,15 +1619,14 @@
|
|
|
1597
1619
|
console.warn("Form Validation got error(s):", errors);
|
|
1598
1620
|
return;
|
|
1599
1621
|
}
|
|
1600
|
-
|
|
1601
|
-
rxjs.of(group.zModel)
|
|
1622
|
+
rxjs.of(_group.zModel)
|
|
1602
1623
|
.pipe(operators.switchMap(function (zmodel) {
|
|
1603
1624
|
console.log("Before create, zModel:", zmodel);
|
|
1604
|
-
return _this.beforeCreateModel(
|
|
1625
|
+
return _this.beforeCreateModel(_group);
|
|
1605
1626
|
}), operators.tap(function () {
|
|
1606
|
-
Object.assign(
|
|
1627
|
+
Object.assign(_group.zModel, fg.value);
|
|
1607
1628
|
}), operators.switchMap(function () {
|
|
1608
|
-
var newModel = Object.assign({},
|
|
1629
|
+
var newModel = Object.assign({}, _group.zModel);
|
|
1609
1630
|
i3.ZComponentHelper.removeNullFields(newModel);
|
|
1610
1631
|
// Object.keys(newModel).forEach((key) => {
|
|
1611
1632
|
// if (newModel[key] === null) {
|
|
@@ -1616,7 +1637,7 @@
|
|
|
1616
1637
|
// newModel.Id = 0;
|
|
1617
1638
|
// }
|
|
1618
1639
|
return _this.webApiService
|
|
1619
|
-
.httpPost$(
|
|
1640
|
+
.httpPost$(_group.resourceURL, // + "/" + group.zModel.Id,
|
|
1620
1641
|
newModel)
|
|
1621
1642
|
.pipe(operators.tap(function (resp) {
|
|
1622
1643
|
createModelres = resp;
|
|
@@ -1627,25 +1648,25 @@
|
|
|
1627
1648
|
if (zmodel) {
|
|
1628
1649
|
//support old and new webapi method
|
|
1629
1650
|
if (zmodel.Data) {
|
|
1630
|
-
Object.assign(
|
|
1651
|
+
Object.assign(_group.zModel, zmodel.Data);
|
|
1631
1652
|
fg.patchValue(zmodel.Data);
|
|
1632
1653
|
}
|
|
1633
1654
|
else if (zmodel["Id"]) {
|
|
1634
|
-
Object.assign(
|
|
1655
|
+
Object.assign(_group.zModel, zmodel);
|
|
1635
1656
|
fg.patchValue(zmodel);
|
|
1636
1657
|
}
|
|
1637
|
-
|
|
1658
|
+
_group.referenceId = _group.zModel.Id;
|
|
1638
1659
|
fg.markAsPristine();
|
|
1639
1660
|
}
|
|
1640
|
-
return _this.afterCreateModel(
|
|
1661
|
+
return _this.afterCreateModel(_group);
|
|
1641
1662
|
}), operators.tap(function (resp) {
|
|
1642
1663
|
if (createModelres.ProcessingStatus == null || createModelres.ProcessingStatus == true) {
|
|
1643
|
-
if (resp &&
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
Object.assign(
|
|
1664
|
+
if (resp && _group.zModel.Id !== 0) {
|
|
1665
|
+
_group.isNew = false;
|
|
1666
|
+
_group.isEdit = true;
|
|
1667
|
+
_group.isTriggered = false;
|
|
1668
|
+
_group.cancelButtonName = "Close";
|
|
1669
|
+
Object.assign(_group.zModel, resp);
|
|
1649
1670
|
fg.patchValue(resp);
|
|
1650
1671
|
}
|
|
1651
1672
|
fg.markAsPristine();
|
|
@@ -1661,6 +1682,11 @@
|
|
|
1661
1682
|
MainService.prototype.updateModel = function (event, group) {
|
|
1662
1683
|
var _this = this;
|
|
1663
1684
|
var fg = group.form;
|
|
1685
|
+
var _group = group;
|
|
1686
|
+
if (event.data && event.data.SubType) {
|
|
1687
|
+
fg = group['_' + event.data.SubType].form;
|
|
1688
|
+
_group = group['_' + event.data.SubType];
|
|
1689
|
+
}
|
|
1664
1690
|
if (!fg.dirty) {
|
|
1665
1691
|
console.warn("Form is not dirty hence record is not save.");
|
|
1666
1692
|
return;
|
|
@@ -1670,31 +1696,32 @@
|
|
|
1670
1696
|
console.warn("Form Validation got error(s):", errors);
|
|
1671
1697
|
return;
|
|
1672
1698
|
}
|
|
1673
|
-
rxjs.of(
|
|
1699
|
+
rxjs.of(_group.zModel)
|
|
1674
1700
|
.pipe(operators.switchMap(function (zmodel) {
|
|
1675
1701
|
console.log("Before update, zModel:", zmodel);
|
|
1676
|
-
return _this.beforeUpdateModel(
|
|
1702
|
+
return _this.beforeUpdateModel(_group);
|
|
1677
1703
|
}), operators.tap(function () {
|
|
1678
|
-
Object.assign(
|
|
1704
|
+
Object.assign(_group.zModel, fg.value);
|
|
1679
1705
|
}), operators.switchMap(function () {
|
|
1680
1706
|
return _this.webApiService
|
|
1681
|
-
.httpPut$(
|
|
1707
|
+
.httpPut$(_group.resourceURL + "/" + _group.zModel.Id, _group.zModel)
|
|
1682
1708
|
.pipe(operators.map(function (res) { return _this.handleSuccess(res, "Record is updated successfully."); }));
|
|
1683
1709
|
}), operators.switchMap(function (zmodel) {
|
|
1684
1710
|
console.log("After updated, zModel:", zmodel);
|
|
1685
1711
|
if (zmodel && zmodel.Data) {
|
|
1686
|
-
Object.assign(
|
|
1712
|
+
Object.assign(_group.zModel, zmodel.Data);
|
|
1687
1713
|
fg.patchValue(zmodel.Data);
|
|
1688
1714
|
// console.log("Done updateModel updated zModel:", fg.value);
|
|
1689
1715
|
}
|
|
1690
1716
|
else if (zmodel && zmodel["Id"]) {
|
|
1691
|
-
Object.assign(
|
|
1717
|
+
Object.assign(_group.zModel, zmodel);
|
|
1692
1718
|
fg.patchValue(zmodel);
|
|
1693
1719
|
// console.log("Done updateModel updated zModel:", fg.value);
|
|
1694
1720
|
}
|
|
1695
1721
|
group.isTriggered = false;
|
|
1722
|
+
_group.isTriggered = false;
|
|
1696
1723
|
fg.markAsPristine();
|
|
1697
|
-
return _this.afterUpdateModel(
|
|
1724
|
+
return _this.afterUpdateModel(_group);
|
|
1698
1725
|
}))
|
|
1699
1726
|
.subscribe();
|
|
1700
1727
|
// Object.assign(group.zModel, fg.value);
|
|
@@ -1708,49 +1735,51 @@
|
|
|
1708
1735
|
// });
|
|
1709
1736
|
};
|
|
1710
1737
|
MainService.prototype.cloneNewModel = function (event, group) {
|
|
1711
|
-
|
|
1712
|
-
|
|
1738
|
+
var _group = group;
|
|
1739
|
+
if (event.data && event.data.SubType) {
|
|
1740
|
+
_group = group['_' + event.data.SubType];
|
|
1741
|
+
}
|
|
1742
|
+
Object.assign(_group.zModel, _group.form.value);
|
|
1743
|
+
_group.zModel.Id = 0;
|
|
1713
1744
|
var clearFields = ["WFS_DocumentId", "WFS_StatusCode", "WFS_StatusName"];
|
|
1714
1745
|
clearFields.forEach(function (field) {
|
|
1715
|
-
if (
|
|
1716
|
-
|
|
1746
|
+
if (_group.zModel.hasOwnProperty(field)) {
|
|
1747
|
+
_group.zModel[field] = null;
|
|
1717
1748
|
}
|
|
1718
1749
|
});
|
|
1719
1750
|
this.cacheService.setCache("cloneNewModel", group.zModel);
|
|
1720
1751
|
this.newModel(null, group);
|
|
1721
1752
|
group.isTriggered = false;
|
|
1753
|
+
_group.isTriggered = false;
|
|
1722
1754
|
};
|
|
1723
1755
|
MainService.prototype.deleteModel = function (event, group) {
|
|
1724
1756
|
var _this = this;
|
|
1725
1757
|
var fg = group.form;
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
// console.warn("Form Validation got error(s):", errors);
|
|
1733
|
-
// return;
|
|
1734
|
-
// }
|
|
1735
|
-
rxjs.of(group.zModel)
|
|
1758
|
+
var _group = group;
|
|
1759
|
+
if (event.data && event.data.SubType) {
|
|
1760
|
+
fg = group['_' + event.data.SubType].form;
|
|
1761
|
+
_group = group['_' + event.data.SubType];
|
|
1762
|
+
}
|
|
1763
|
+
rxjs.of(_group.zModel)
|
|
1736
1764
|
.pipe(operators.switchMap(function (zmodel) {
|
|
1737
1765
|
console.log("Before delete, zModel:", zmodel);
|
|
1738
|
-
return _this.beforeDeleteModel(
|
|
1766
|
+
return _this.beforeDeleteModel(_group);
|
|
1739
1767
|
}), operators.switchMap(function () {
|
|
1740
1768
|
group.isTriggered = false;
|
|
1769
|
+
_group.isTriggered = false;
|
|
1741
1770
|
return _this.alertService.show("Delete Record", "Are you sure?", [
|
|
1742
1771
|
{ text: "No", cssClass: "secondary" },
|
|
1743
1772
|
{ text: "Yes", cssClass: "primary" }
|
|
1744
1773
|
]);
|
|
1745
1774
|
}), operators.switchMap(function (reply) {
|
|
1746
1775
|
if (reply === "Yes") {
|
|
1747
|
-
Object.assign(
|
|
1748
|
-
|
|
1776
|
+
Object.assign(_group.zModel, fg.value);
|
|
1777
|
+
_group.zModel.Disabled = true;
|
|
1749
1778
|
return _this.webApiService
|
|
1750
|
-
.httpPut$(
|
|
1779
|
+
.httpPut$(_group.resourceURL + "/" + _group.zModel.Id, _group.zModel)
|
|
1751
1780
|
.pipe(operators.map(function (res) { return _this.handleSuccess(res, "Record is deleted successfully."); }), operators.switchMap(function (zmodel) {
|
|
1752
1781
|
console.log("After deleted, zModel:", zmodel);
|
|
1753
|
-
return _this.afterDeleteModel(
|
|
1782
|
+
return _this.afterDeleteModel(_group);
|
|
1754
1783
|
}), operators.tap(function (resp) {
|
|
1755
1784
|
_this.historyBack();
|
|
1756
1785
|
}));
|
|
@@ -4022,6 +4051,9 @@
|
|
|
4022
4051
|
field$.subscribe(function (data) {
|
|
4023
4052
|
// this.items = data;
|
|
4024
4053
|
data.forEach(function (button) {
|
|
4054
|
+
if (_this.data.SubType) {
|
|
4055
|
+
button.Name = _this.data.SubType + '_' + button.Name;
|
|
4056
|
+
}
|
|
4025
4057
|
var label = _this.getButtonLabel(button);
|
|
4026
4058
|
var buttonDisabled = null;
|
|
4027
4059
|
if (button.Disabled != "" && button.Disabled) {
|
|
@@ -4037,6 +4069,7 @@
|
|
|
4037
4069
|
iconName: button.Icon,
|
|
4038
4070
|
dismissType: button.DismissType,
|
|
4039
4071
|
disableTriggerTimer: button.DisableTriggerTimer,
|
|
4072
|
+
SubType: _this.data.SubType,
|
|
4040
4073
|
click: function (y) {
|
|
4041
4074
|
_this.buttonClick(button);
|
|
4042
4075
|
}
|
|
@@ -4404,6 +4437,7 @@
|
|
|
4404
4437
|
this.showTooltipsInfoIcon = false;
|
|
4405
4438
|
this.showTooltipsInfoBySide = false;
|
|
4406
4439
|
this.tooltipsInfo = null;
|
|
4440
|
+
this.tooltipsDisplayText = null;
|
|
4407
4441
|
this.useKendoSwitch = false;
|
|
4408
4442
|
this.setEnable = function (status) {
|
|
4409
4443
|
var fc = _this.group.form.controls[_this.data.Value];
|
|
@@ -4426,10 +4460,12 @@
|
|
|
4426
4460
|
if (this.tooltipsInfo) {
|
|
4427
4461
|
if ((this.tooltipsInfo['Icon'] != null || this.tooltipsInfo['Icon'] != undefined) && !this.isMobileScreen()) {
|
|
4428
4462
|
this.showTooltipsInfoIcon = true;
|
|
4463
|
+
this.setTooltipsInfoIcon();
|
|
4429
4464
|
}
|
|
4430
4465
|
if (this.tooltipsInfo['SideBySide']) {
|
|
4431
4466
|
this.showTooltipsInfoBySide = true;
|
|
4432
4467
|
}
|
|
4468
|
+
this.setTooltipsDisplayText();
|
|
4433
4469
|
}
|
|
4434
4470
|
this.useKendoSwitch = this.data.UseKendoSwitch ? this.data.UseKendoSwitch : false;
|
|
4435
4471
|
};
|
|
@@ -4492,22 +4528,33 @@
|
|
|
4492
4528
|
}
|
|
4493
4529
|
return "#acacac"; // default grey
|
|
4494
4530
|
};
|
|
4495
|
-
ZcheckboxComponent.prototype.setTooltipsInfoIcon = function () {
|
|
4531
|
+
ZcheckboxComponent.prototype.setTooltipsInfoIcon = function (displayIcon) {
|
|
4496
4532
|
if (this.showTooltipsInfoIcon) {
|
|
4497
|
-
if (this.tooltipsInfo
|
|
4498
|
-
|
|
4533
|
+
if (this.tooltipsInfo.Icon != '') {
|
|
4534
|
+
if (displayIcon) {
|
|
4535
|
+
this.tooltipsDisplayIcon = displayIcon;
|
|
4536
|
+
}
|
|
4537
|
+
else {
|
|
4538
|
+
this.tooltipsDisplayIcon = this.tooltipsInfo.Icon;
|
|
4539
|
+
}
|
|
4499
4540
|
}
|
|
4500
4541
|
else {
|
|
4501
|
-
|
|
4542
|
+
this.tooltipsDisplayIcon = 'question-circle';
|
|
4502
4543
|
}
|
|
4503
|
-
return false;
|
|
4504
4544
|
}
|
|
4505
4545
|
};
|
|
4506
|
-
ZcheckboxComponent.prototype.setTooltipsDisplayText = function () {
|
|
4546
|
+
ZcheckboxComponent.prototype.setTooltipsDisplayText = function (displayText) {
|
|
4507
4547
|
if (this.tooltipsInfo) {
|
|
4508
|
-
|
|
4548
|
+
if (displayText) {
|
|
4549
|
+
this.tooltipsDisplayText = displayText;
|
|
4550
|
+
}
|
|
4551
|
+
else {
|
|
4552
|
+
this.tooltipsDisplayText = this.tooltipsInfo.DisplayText;
|
|
4553
|
+
}
|
|
4554
|
+
}
|
|
4555
|
+
else {
|
|
4556
|
+
this.tooltipsDisplayText = '<Display text error>';
|
|
4509
4557
|
}
|
|
4510
|
-
return '<Display text error>';
|
|
4511
4558
|
};
|
|
4512
4559
|
ZcheckboxComponent.prototype.setTooltipsInfoSideBySide = function () {
|
|
4513
4560
|
if (this.tooltipsInfo) {
|
|
@@ -4525,7 +4572,7 @@
|
|
|
4525
4572
|
ZcheckboxComponent.decorators = [
|
|
4526
4573
|
{ type: i0.Component, args: [{
|
|
4527
4574
|
selector: "app-zcheckbox",
|
|
4528
|
-
template: "<ion-item [ngClass]=\"getClass(form, data)\" [formGroup]=\"form\" *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\">\r\n <ion-label *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\"\r\n [attr.for]=\"data.Value\"\r\n [position]=\"data.LabelPosition ? data.LabelPosition : 'stacked'\"\r\n [ngStyle]=\"getLabelStyle()\"\r\n [ngClass]=\"data.LabelDivClass\">\r\n {{data.Label}}\r\n <ion-text *ngIf=\"(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)\"\r\n color=\"danger\">\r\n *\r\n </ion-text>\r\n <span kendoTooltip\r\n *ngIf=\"!isMobileScreen() && tooltipsInfo && showTooltipsInfoIcon\"\r\n [title]=\"
|
|
4575
|
+
template: "<ion-item [ngClass]=\"getClass(form, data)\" [formGroup]=\"form\" *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\">\r\n <ion-label *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\"\r\n [attr.for]=\"data.Value\"\r\n [position]=\"data.LabelPosition ? data.LabelPosition : 'stacked'\"\r\n [ngStyle]=\"getLabelStyle()\"\r\n [ngClass]=\"data.LabelDivClass\">\r\n {{data.Label}}\r\n <ion-text *ngIf=\"(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)\"\r\n color=\"danger\">\r\n *\r\n </ion-text>\r\n <span kendoTooltip\r\n *ngIf=\"!isMobileScreen() && tooltipsInfo && showTooltipsInfoIcon\"\r\n [title]=\"tooltipsDisplayText\">\r\n <fa-icon [icon]=\"tooltipsDisplayIcon\"\r\n class=\"tooltipsinfo-icon\">\r\n </fa-icon>\r\n </span>\r\n </ion-label>\r\n <div class=\"ion-row divcheckbox\" [ngClass]=\"getCheckboxClass()\">\r\n <div *ngIf=\"useKendoSwitch\">\r\n <span>\r\n <kendo-switch [id]=\"data.Value\"\r\n [formControlName]=\"data.Value\"\r\n [readonly]=\"(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n (valueChange)=\"onSwitchChange($event)\"\r\n style=\"margin: 7px 0 0 0; width: 100%\"></kendo-switch>\r\n </span>\r\n </div>\r\n <div *ngIf=\"!useKendoSwitch\" [class]=\"setTooltipsInfoSideBySide()\">\r\n <!--<input kendoCheckBox\r\n type=\"checkbox\"\r\n [id]=\"data.Value\"\r\n [formControlName]=\"data.Value\"\r\n [disabled]=\"(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n (valueChange)=\"onChange($event)\" />-->\r\n <ion-checkbox style=\"margin: 8px 0;\"\r\n [id]=\"data.Value\"\r\n [formControlName]=\"data.Value\"\r\n color=\"primary\"\r\n [attr.disabled]=\"(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n (ionChange)=\"onChange($event)\"></ion-checkbox>\r\n <kendo-label *ngIf=\"tooltipsInfo && !showTooltipsInfoIcon\"\r\n [text]=\"tooltipsDisplayText\"\r\n class=\"tooltipsinfo-text\"\r\n [style.color]=\"setTooltipsInfoColor()\">\r\n </kendo-label>\r\n <app-uivalidationmessage [group]=\"group\" [data]=\"data\" [form]=\"form\"></app-uivalidationmessage>\r\n </div>\r\n </div>\r\n</ion-item>\r\n",
|
|
4529
4576
|
styles: [".ionItem{display:flex;flex-flow:row wrap}.gridInlineEdit{--background:transparent}.item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}:host ::ng-deep ion-item .k-checkbox{margin:6px 0 0 1.5px;height:22px;width:22px}:host ::ng-deep ion-item .k-checkbox.k-checked,:host ::ng-deep ion-item .k-checkbox:checked{margin:6px 0 0 1.5px;height:22px;width:22px;background-color:#3880ff;border:0;outline:0}:host ::ng-deep ion-item .divcheckbox{justify-content:space-between;order:1}:host ::ng-deep ion-item .notooltipsinfo-adjustment{display:grid;grid-template-columns:.1fr;grid-gap:0;padding-top:1px}:host ::ng-deep ion-item .tooltipsinfo-text{text-align:justify;text-justify:inter-word;word-wrap:break-word;font-size:10px;margin:6px 0;float:right}:host ::ng-deep ion-item .tooltipsinfo-right{display:grid;grid-template-columns:.1fr .9fr;grid-gap:5px}:host ::ng-deep ion-item .tooltipsinfo-icon{padding-left:10px;color:#3880ff}"]
|
|
4530
4577
|
},] }
|
|
4531
4578
|
];
|
|
@@ -5320,12 +5367,16 @@
|
|
|
5320
5367
|
}
|
|
5321
5368
|
return readOnlyValue;
|
|
5322
5369
|
};
|
|
5370
|
+
ZformComponent.prototype.trackByFn = function (index, item) {
|
|
5371
|
+
//return item['Type'] + '-' + item['Name'];
|
|
5372
|
+
return index;
|
|
5373
|
+
};
|
|
5323
5374
|
return ZformComponent;
|
|
5324
5375
|
}());
|
|
5325
5376
|
ZformComponent.decorators = [
|
|
5326
5377
|
{ type: i0.Component, args: [{
|
|
5327
5378
|
selector: "app-zform",
|
|
5328
|
-
template: "<div class=\"e1-form\">\r\n <!--<div class=\"k-overlay\" *ngIf=\"isLoading\"></div>-->\r\n <form [formGroup]=\"form\" autocomplete=\"off\" *ngIf=\"!isLoading\">\r\n <ion-grid>\r\n <ion-row id=\"dynamic-form-host\" class=\"ion-align-items-start\">\r\n <app-zformcontrol *ngFor=\"let field of fields\"\r\n [ngClass]=\"group[field['isVisibleField']] ? field.DivClass :\r\n ((field.Visible === true) ? field.DivClass : 'flex-hide')\"\r\n [field]=\"field\"\r\n [group]=\"getGroup()\"\r\n [form]=\"form\"\r\n id=\"{{field.Type}}-{{field.Name}}\"></app-zformcontrol>\r\n </ion-row>\r\n </ion-grid>\r\n </form>\r\n</div
|
|
5379
|
+
template: "<div class=\"e1-form\">\r\n <!--<div class=\"k-overlay\" *ngIf=\"isLoading\"></div>-->\r\n <form [formGroup]=\"form\" autocomplete=\"off\" *ngIf=\"!isLoading\">\r\n <ion-grid>\r\n <ion-row id=\"dynamic-form-host\" class=\"ion-align-items-start\">\r\n <app-zformcontrol *ngFor=\"let field of fields; trackBy: trackByFn\"\r\n [ngClass]=\"group[field['isVisibleField']] ? field.DivClass :\r\n ((field.Visible === true) ? field.DivClass : 'flex-hide')\"\r\n [field]=\"field\"\r\n [group]=\"getGroup()\"\r\n [form]=\"form\"\r\n id=\"{{field.Type}}-{{field.Name}}\"></app-zformcontrol>\r\n </ion-row>\r\n </ion-grid>\r\n </form>\r\n</div>\r\n",
|
|
5329
5380
|
styles: ["#dynamic-form-host app-zformcontrol{overflow-x:auto;overflow-y:hidden}"]
|
|
5330
5381
|
},] }
|
|
5331
5382
|
];
|
|
@@ -8580,6 +8631,7 @@
|
|
|
8580
8631
|
this.showTooltipsInfoIcon = false;
|
|
8581
8632
|
this.showTooltipsInfoBySide = false;
|
|
8582
8633
|
this.tooltipsInfo = null;
|
|
8634
|
+
this.tooltipsDisplayText = null;
|
|
8583
8635
|
this.items = [];
|
|
8584
8636
|
this.infinitezData = [];
|
|
8585
8637
|
this.infiniteSearchText = null;
|
|
@@ -8636,10 +8688,12 @@
|
|
|
8636
8688
|
if (this.tooltipsInfo) {
|
|
8637
8689
|
if ((this.tooltipsInfo.Icon != null || this.tooltipsInfo.Icon != undefined) && !this.isMobileScreen()) {
|
|
8638
8690
|
this.showTooltipsInfoIcon = true;
|
|
8691
|
+
this.setTooltipsInfoIcon();
|
|
8639
8692
|
}
|
|
8640
8693
|
if (this.tooltipsInfo.SideBySide) {
|
|
8641
8694
|
this.showTooltipsInfoBySide = true;
|
|
8642
8695
|
}
|
|
8696
|
+
this.setTooltipsDisplayText();
|
|
8643
8697
|
}
|
|
8644
8698
|
// [Dropdownlist Multiple] - auto close menu when lose focus.
|
|
8645
8699
|
if (this.data.AutoClose === false)
|
|
@@ -9052,22 +9106,33 @@
|
|
|
9052
9106
|
}
|
|
9053
9107
|
return "#acacac"; // default grey
|
|
9054
9108
|
};
|
|
9055
|
-
ZselectmultipleComponent.prototype.setTooltipsInfoIcon = function () {
|
|
9109
|
+
ZselectmultipleComponent.prototype.setTooltipsInfoIcon = function (displayIcon) {
|
|
9056
9110
|
if (this.showTooltipsInfoIcon) {
|
|
9057
9111
|
if (this.tooltipsInfo.Icon != '') {
|
|
9058
|
-
|
|
9112
|
+
if (displayIcon) {
|
|
9113
|
+
this.tooltipsDisplayIcon = displayIcon;
|
|
9114
|
+
}
|
|
9115
|
+
else {
|
|
9116
|
+
this.tooltipsDisplayIcon = this.tooltipsInfo.Icon;
|
|
9117
|
+
}
|
|
9059
9118
|
}
|
|
9060
9119
|
else {
|
|
9061
|
-
|
|
9120
|
+
this.tooltipsDisplayIcon = 'question-circle';
|
|
9062
9121
|
}
|
|
9063
9122
|
}
|
|
9064
|
-
return false;
|
|
9065
9123
|
};
|
|
9066
|
-
ZselectmultipleComponent.prototype.setTooltipsDisplayText = function () {
|
|
9124
|
+
ZselectmultipleComponent.prototype.setTooltipsDisplayText = function (displayText) {
|
|
9067
9125
|
if (this.tooltipsInfo) {
|
|
9068
|
-
|
|
9126
|
+
if (displayText) {
|
|
9127
|
+
this.tooltipsDisplayText = displayText;
|
|
9128
|
+
}
|
|
9129
|
+
else {
|
|
9130
|
+
this.tooltipsDisplayText = this.tooltipsInfo.DisplayText;
|
|
9131
|
+
}
|
|
9132
|
+
}
|
|
9133
|
+
else {
|
|
9134
|
+
this.tooltipsDisplayText = '<Display text error>';
|
|
9069
9135
|
}
|
|
9070
|
-
return '<Display text error>';
|
|
9071
9136
|
};
|
|
9072
9137
|
ZselectmultipleComponent.prototype.setTooltipsInfoSideBySide = function () {
|
|
9073
9138
|
if (this.tooltipsInfo) {
|
|
@@ -9082,7 +9147,7 @@
|
|
|
9082
9147
|
ZselectmultipleComponent.decorators = [
|
|
9083
9148
|
{ type: i0.Component, args: [{
|
|
9084
9149
|
selector: "app-zselectmultiple",
|
|
9085
|
-
template: "<ion-item [ngClass]=\"getClass(form, data)\" *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && isMobileScreen()\">\r\n\r\n <ion-label *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\" position=\"stacked\">\r\n {{data.Label}}\r\n <ion-text *ngIf=\"componentProperties.isRequired\" color=\"danger\">*</ion-text>\r\n </ion-label>\r\n\r\n <kendo-label *ngIf=\"data.TooltipsInfo && !showTooltipsInfoIcon && !showTooltipsInfoBySide\"\r\n [text]=\"setTooltipsDisplayText()\"\r\n [class]=\"setTooltipsInfoClass()\"\r\n [style.color]=\"setTooltipsInfoColor()\"></kendo-label>\r\n <div [class]=\"setTooltipsInfoSideBySide()\" *ngIf=\"!isLoading\">\r\n <div style=\"flex-grow: 1;\">\r\n <ionic-selectable #selectComponent item-content\r\n searchFailText=\"Nothing found :(\"\r\n headerColor=\"primary\"\r\n clearButtonText=\"Clear\"\r\n [(ngModel)]=\"group.zModel[data.Value]\"\r\n [id]=\"data.Value\"\r\n [items]=\"getItemsData()\"\r\n [itemValueField]=\"itemValueField\"\r\n [itemTextField]=\"itemTextField\"\r\n [canAddItem]=\"!!data.OnAddItem\"\r\n [canClear]=\"true\"\r\n [placeholder]=\"data.PlaceHolder\"\r\n [canSearch]=\"!data['disable-search']\"\r\n [shouldFocusSearchbar]=\"!data['disable-search']\"\r\n [hasInfiniteScroll]=\"!!data.HasInfiniteScroll\"\r\n [isMultiple]=\"data.Multiple\"\r\n [isEnabled]=\"!(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n [shouldStoreItemValue]=\"true\"\r\n (onSearch)=\"onSearch($event)\"\r\n (onInfiniteScroll)=\"getInfiniteData($event)\"\r\n (onAddItem)=\"onAddItem($event)\"\r\n (onChange)=\"onChange($event)\">\r\n\r\n <ng-template ionicSelectableItemIconTemplate\r\n let-item=\"item\"\r\n let-isItemSelected=\"isItemSelected\">\r\n <fa-icon slot=\"start\"\r\n class=\"isItemSelected\"\r\n size=\"sm\"\r\n [icon]=\"['far', isItemSelected ? 'check-circle': 'circle']\"\r\n [styles]=\"{'color': isItemSelected ? 'dodgerBlue' : 'lightGray'}\"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableCloseButtonTemplate>\r\n <!-- <ion-icon name=\"close-circle\"></ion-icon> -->\r\n <fa-icon [icon]=\"'times-circle'\" size=\"md\"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableTitleTemplate>\r\n {{data.Label}}\r\n <ion-text *ngIf=\"getIsRequiredValue()\" color=\"danger\">*</ion-text>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableItemTemplate let-item=\"item\">\r\n {{ getItemTemplate(item, data, group, itemValueField, itemTextField) }}\r\n <!-- <ng-template zselectitemelement [item]=\"item\"></ng-template> -->\r\n </ng-template>\r\n\r\n <!--<ng-template ionicSelectableFooterTemplate>\r\n <ion-toolbar>\r\n <ion-row>\r\n <ion-col>\r\n <ion-button expand=\"full\" ng-reflect-disabled=\"false\" ng-reflect-expand=\"full\" class=\"button button-full button-solid ion-activatable ion-focusable hydrated\" (click)=\"clearItems()\">\r\n Clear\r\n </ion-button>\r\n </ion-col>\r\n <ion-col>\r\n <ion-button expand=\"full\" ng-reflect-disabled=\"false\" ng-reflect-expand=\"full\" class=\"button button-full button-solid ion-activatable ion-focusable hydrated\" (click)=\"confirmItems()\">\r\n OK\r\n </ion-button>\r\n </ion-col>\r\n </ion-row>\r\n </ion-toolbar>\r\n </ng-template>-->\r\n </ionic-selectable>\r\n </div>\r\n <app-uivalidationmessage [group]=\"group\" [data]=\"data\" [form]=\"form\"></app-uivalidationmessage>\r\n <!-- side by side and desktop tooltipsinfo -->\r\n <kendo-label *ngIf=\"tooltipsInfo && !showTooltipsInfoIcon && showTooltipsInfoBySide\"\r\n [text]=\"setTooltipsDisplayText()\"\r\n [class]=\"setTooltipsInfoClass()\"\r\n [style.color]=\"setTooltipsInfoColor()\"></kendo-label>\r\n </div>\r\n</ion-item>\r\n\r\n\r\n\r\n<ion-item [ngClass]=\"getClass(form, data)\" [formGroup]=\"form\" *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && !isMobileScreen()\" [ngClass]=\"getIon_InvalidClass(form, data)\">\r\n <ion-label [attr.for]=\"data.Value\" *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\" position=\"stacked\">\r\n {{data.Label}}\r\n <ion-text *ngIf=\"(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)\" color=\"danger\">*</ion-text>\r\n <span kendoTooltip\r\n *ngIf=\"data.TooltipsInfo && showTooltipsInfoIcon\"\r\n [title]=\"setTooltipsDisplayText()\">\r\n <fa-icon [icon]=\"setTooltipsInfoIcon()\"\r\n class=\"tooltipsinfo-icon\">\r\n </fa-icon>\r\n </span>\r\n </ion-label>\r\n <!-- mobile tooltipsinfo below label-->\r\n <div [class]=\"setTooltipsInfoSideBySide()\">\r\n <div style=\"flex: 1;\">\r\n <kendo-combobox *ngIf=\"!data.Multiple\"\r\n #comboboxComponent\r\n [data]=\"getItemsData()\"\r\n [valueField]=\"itemValueField\"\r\n [textField]=\"itemTextField\"\r\n [formControlName]=\"data.Value\"\r\n [valuePrimitive]=\"true\"\r\n [placeholder]=\"data.PlaceHolder\"\r\n [allowCustom]=\"allowCustomValue\"\r\n [suggest]=\"true\"\r\n [filterable]=\"!!data.HasInfiniteScroll\"\r\n [openOnFocus]=\"disableOpenOnFocus(comboboxComponent)\"\r\n [readonly]=\"(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n [ngClass]=\"{'disabled' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}\"\r\n [loading]=\"isLoading\"\r\n (valueChange)=\"onValueChange($event)\"\r\n (filterChange)=\"handleFilter($event)\"\r\n [virtual]=\"virtual\"\r\n (open)=\"handleOpen()\"\r\n (close)=\"handleClose()\"\r\n (blur)=\"handleBlur()\"\r\n style=\"margin-top: 7px; width: 100%;\">\r\n <ng-template kendoComboBoxItemTemplate let-dataItem>\r\n {{ getItemTemplate(dataItem, data, group, itemValueField, itemTextField) }}\r\n <!-- <span class=\"template\">{{ dataItem.value }}</span> {{ dataItem.text }} -->\r\n </ng-template>\r\n <ng-template kendoTextBoxSuffixTemplate>\r\n\r\n <!-- For Validation feature -->\r\n <app-uivalidationmessage [group]=\"group\"\r\n [data]=\"data\"\r\n [form]=\"form\"\r\n class=\"validation-icon\"></app-uivalidationmessage>\r\n </ng-template>\r\n </kendo-combobox>\r\n <kendo-multiselect *ngIf=\"data.Multiple\"\r\n [data]=\"getItemsData()\"\r\n [valueField]=\"itemValueField\"\r\n [textField]=\"itemTextField\"\r\n [formControlName]=\"data.Value\"\r\n [valuePrimitive]=\"true\"\r\n [placeholder]=\"data.PlaceHolder\"\r\n [allowCustom]=\"allowCustomValue\"\r\n [filterable]=\"!!data.HasInfiniteScroll\"\r\n [checkboxes]=\"data.EnableCheckbox\"\r\n [loading]=\"isLoading\"\r\n [autoClose]=\"autoClose\"\r\n [readonly]=\"(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n [ngClass]=\"{'disabled' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}\"\r\n (valueChange)=\"onValueChange($event)\"\r\n (filterChange)=\"handleFilter($event)\"\r\n (open)=\"handleOpen()\"\r\n (close)=\"handleClose()\"\r\n (blur)=\"handleBlur()\"\r\n style=\"margin-top: 7px; width: 100%;\">\r\n <ng-template kendoMultiSelectItemTemplate let-dataItem>\r\n {{ getItemTemplate(dataItem, data, group, itemValueField, itemTextField) }}\r\n <!-- <span class=\"template\">{{ dataItem.value }}</span> {{ dataItem.text }} -->\r\n </ng-template>\r\n </kendo-multiselect>\r\n </div>\r\n\r\n <div *ngFor=\"let item of iconList\">\r\n <div kendoTooltip style=\"text-align: center; padding-top: 10px;\"\r\n showOn=\"hover\"\r\n [tooltipWidth]=\"item.Width\"\r\n [position]=\"item.Position\">\r\n <span *ngIf=\"!!item && item.Color\"\r\n (click)=\"onIconClick(item.Click)\"\r\n [title]=\"item.Tooltip\"\r\n style=\"margin-top: 10px;\">\r\n <fa-icon [icon]=\"item.Icon\"\r\n [ngStyle]=\"{'padding': '4px 6px', 'color': (item.Color ? item.Color : 'black')}\"></fa-icon>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <app-uivalidationmessage [group]=\"group\"\r\n [data]=\"data\"\r\n [form]=\"form\"></app-uivalidationmessage>\r\n\r\n <!-- side by side and desktop tooltipsinfo -->\r\n <kendo-label *ngIf=\"tooltipsInfo && !showTooltipsInfoIcon && ((showTooltipsInfoBySide && isMobileScreen()) || !isMobileScreen())\"\r\n [text]=\"setTooltipsDisplayText()\"\r\n [class]=\"setTooltipsInfoClass()\"\r\n [style.color]=\"setTooltipsInfoColor()\"></kendo-label>\r\n\r\n </div>\r\n</ion-item>\r\n",
|
|
9150
|
+
template: "<ion-item [ngClass]=\"getClass(form, data)\" *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && isMobileScreen()\">\r\n\r\n <ion-label *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\" position=\"stacked\">\r\n {{data.Label}}\r\n <ion-text *ngIf=\"componentProperties.isRequired\" color=\"danger\">*</ion-text>\r\n </ion-label>\r\n\r\n <kendo-label *ngIf=\"data.TooltipsInfo && !showTooltipsInfoIcon && !showTooltipsInfoBySide\"\r\n [text]=\"tooltipsDisplayText\"\r\n [class]=\"setTooltipsInfoClass()\"\r\n [style.color]=\"setTooltipsInfoColor()\"></kendo-label>\r\n <div [class]=\"setTooltipsInfoSideBySide()\" *ngIf=\"!isLoading\">\r\n <div style=\"flex-grow: 1;\">\r\n <ionic-selectable #selectComponent item-content\r\n searchFailText=\"Nothing found :(\"\r\n headerColor=\"primary\"\r\n clearButtonText=\"Clear\"\r\n [(ngModel)]=\"group.zModel[data.Value]\"\r\n [id]=\"data.Value\"\r\n [items]=\"getItemsData()\"\r\n [itemValueField]=\"itemValueField\"\r\n [itemTextField]=\"itemTextField\"\r\n [canAddItem]=\"!!data.OnAddItem\"\r\n [canClear]=\"true\"\r\n [placeholder]=\"data.PlaceHolder\"\r\n [canSearch]=\"!data['disable-search']\"\r\n [shouldFocusSearchbar]=\"!data['disable-search']\"\r\n [hasInfiniteScroll]=\"!!data.HasInfiniteScroll\"\r\n [isMultiple]=\"data.Multiple\"\r\n [isEnabled]=\"!(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n [shouldStoreItemValue]=\"true\"\r\n (onSearch)=\"onSearch($event)\"\r\n (onInfiniteScroll)=\"getInfiniteData($event)\"\r\n (onAddItem)=\"onAddItem($event)\"\r\n (onChange)=\"onChange($event)\">\r\n\r\n <ng-template ionicSelectableItemIconTemplate\r\n let-item=\"item\"\r\n let-isItemSelected=\"isItemSelected\">\r\n <fa-icon slot=\"start\"\r\n class=\"isItemSelected\"\r\n size=\"sm\"\r\n [icon]=\"['far', isItemSelected ? 'check-circle': 'circle']\"\r\n [styles]=\"{'color': isItemSelected ? 'dodgerBlue' : 'lightGray'}\"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableCloseButtonTemplate>\r\n <!-- <ion-icon name=\"close-circle\"></ion-icon> -->\r\n <fa-icon [icon]=\"'times-circle'\" size=\"md\"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableTitleTemplate>\r\n {{data.Label}}\r\n <ion-text *ngIf=\"getIsRequiredValue()\" color=\"danger\">*</ion-text>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableItemTemplate let-item=\"item\">\r\n {{ getItemTemplate(item, data, group, itemValueField, itemTextField) }}\r\n <!-- <ng-template zselectitemelement [item]=\"item\"></ng-template> -->\r\n </ng-template>\r\n\r\n <!--<ng-template ionicSelectableFooterTemplate>\r\n <ion-toolbar>\r\n <ion-row>\r\n <ion-col>\r\n <ion-button expand=\"full\" ng-reflect-disabled=\"false\" ng-reflect-expand=\"full\" class=\"button button-full button-solid ion-activatable ion-focusable hydrated\" (click)=\"clearItems()\">\r\n Clear\r\n </ion-button>\r\n </ion-col>\r\n <ion-col>\r\n <ion-button expand=\"full\" ng-reflect-disabled=\"false\" ng-reflect-expand=\"full\" class=\"button button-full button-solid ion-activatable ion-focusable hydrated\" (click)=\"confirmItems()\">\r\n OK\r\n </ion-button>\r\n </ion-col>\r\n </ion-row>\r\n </ion-toolbar>\r\n </ng-template>-->\r\n </ionic-selectable>\r\n </div>\r\n <app-uivalidationmessage [group]=\"group\" [data]=\"data\" [form]=\"form\"></app-uivalidationmessage>\r\n <!-- side by side and desktop tooltipsinfo -->\r\n <kendo-label *ngIf=\"tooltipsInfo && !showTooltipsInfoIcon && showTooltipsInfoBySide\"\r\n [text]=\"tooltipsDisplayText\"\r\n [class]=\"setTooltipsInfoClass()\"\r\n [style.color]=\"setTooltipsInfoColor()\"></kendo-label>\r\n </div>\r\n</ion-item>\r\n\r\n\r\n\r\n<ion-item [ngClass]=\"getClass(form, data)\" [formGroup]=\"form\" *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && !isMobileScreen()\" [ngClass]=\"getIon_InvalidClass(form, data)\">\r\n <ion-label [attr.for]=\"data.Value\" *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\" position=\"stacked\">\r\n {{data.Label}}\r\n <ion-text *ngIf=\"(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)\" color=\"danger\">*</ion-text>\r\n <span kendoTooltip\r\n *ngIf=\"data.TooltipsInfo && showTooltipsInfoIcon\"\r\n [title]=\"tooltipsDisplayText\">\r\n <fa-icon [icon]=\"tooltipsDisplayIcon\"\r\n class=\"tooltipsinfo-icon\">\r\n </fa-icon>\r\n </span>\r\n </ion-label>\r\n <!-- mobile tooltipsinfo below label-->\r\n <div [class]=\"setTooltipsInfoSideBySide()\">\r\n <div style=\"flex: 1;\">\r\n <kendo-combobox *ngIf=\"!data.Multiple\"\r\n #comboboxComponent\r\n [data]=\"getItemsData()\"\r\n [valueField]=\"itemValueField\"\r\n [textField]=\"itemTextField\"\r\n [formControlName]=\"data.Value\"\r\n [valuePrimitive]=\"true\"\r\n [placeholder]=\"data.PlaceHolder\"\r\n [allowCustom]=\"allowCustomValue\"\r\n [suggest]=\"true\"\r\n [filterable]=\"!!data.HasInfiniteScroll\"\r\n [openOnFocus]=\"disableOpenOnFocus(comboboxComponent)\"\r\n [readonly]=\"(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n [ngClass]=\"{'disabled' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}\"\r\n [loading]=\"isLoading\"\r\n (valueChange)=\"onValueChange($event)\"\r\n (filterChange)=\"handleFilter($event)\"\r\n [virtual]=\"virtual\"\r\n (open)=\"handleOpen()\"\r\n (close)=\"handleClose()\"\r\n (blur)=\"handleBlur()\"\r\n style=\"margin-top: 7px; width: 100%;\">\r\n <ng-template kendoComboBoxItemTemplate let-dataItem>\r\n {{ getItemTemplate(dataItem, data, group, itemValueField, itemTextField) }}\r\n <!-- <span class=\"template\">{{ dataItem.value }}</span> {{ dataItem.text }} -->\r\n </ng-template>\r\n <ng-template kendoTextBoxSuffixTemplate>\r\n\r\n <!-- For Validation feature -->\r\n <app-uivalidationmessage [group]=\"group\"\r\n [data]=\"data\"\r\n [form]=\"form\"\r\n class=\"validation-icon\"></app-uivalidationmessage>\r\n </ng-template>\r\n </kendo-combobox>\r\n <kendo-multiselect *ngIf=\"data.Multiple\"\r\n [data]=\"getItemsData()\"\r\n [valueField]=\"itemValueField\"\r\n [textField]=\"itemTextField\"\r\n [formControlName]=\"data.Value\"\r\n [valuePrimitive]=\"true\"\r\n [placeholder]=\"data.PlaceHolder\"\r\n [allowCustom]=\"allowCustomValue\"\r\n [filterable]=\"!!data.HasInfiniteScroll\"\r\n [checkboxes]=\"data.EnableCheckbox\"\r\n [loading]=\"isLoading\"\r\n [autoClose]=\"autoClose\"\r\n [readonly]=\"(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n [ngClass]=\"{'disabled' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}\"\r\n (valueChange)=\"onValueChange($event)\"\r\n (filterChange)=\"handleFilter($event)\"\r\n (open)=\"handleOpen()\"\r\n (close)=\"handleClose()\"\r\n (blur)=\"handleBlur()\"\r\n style=\"margin-top: 7px; width: 100%;\">\r\n <ng-template kendoMultiSelectItemTemplate let-dataItem>\r\n {{ getItemTemplate(dataItem, data, group, itemValueField, itemTextField) }}\r\n <!-- <span class=\"template\">{{ dataItem.value }}</span> {{ dataItem.text }} -->\r\n </ng-template>\r\n </kendo-multiselect>\r\n </div>\r\n\r\n <div *ngFor=\"let item of iconList\">\r\n <div kendoTooltip style=\"text-align: center; padding-top: 10px;\"\r\n showOn=\"hover\"\r\n [tooltipWidth]=\"item.Width\"\r\n [position]=\"item.Position\">\r\n <span *ngIf=\"!!item && item.Color\"\r\n (click)=\"onIconClick(item.Click)\"\r\n [title]=\"item.Tooltip\"\r\n style=\"margin-top: 10px;\">\r\n <fa-icon [icon]=\"item.Icon\"\r\n [ngStyle]=\"{'padding': '4px 6px', 'color': (item.Color ? item.Color : 'black')}\"></fa-icon>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <app-uivalidationmessage [group]=\"group\"\r\n [data]=\"data\"\r\n [form]=\"form\"></app-uivalidationmessage>\r\n\r\n <!-- side by side and desktop tooltipsinfo -->\r\n <kendo-label *ngIf=\"tooltipsInfo && !showTooltipsInfoIcon && ((showTooltipsInfoBySide && isMobileScreen()) || !isMobileScreen())\"\r\n [text]=\"tooltipsDisplayText\"\r\n [class]=\"setTooltipsInfoClass()\"\r\n [style.color]=\"setTooltipsInfoColor()\"></kendo-label>\r\n\r\n </div>\r\n</ion-item>\r\n",
|
|
9086
9151
|
styles: ["fa-icon.isItemSelected{display:inline-block;width:1em;height:1em;contain:strict;fill:currentcolor;box-sizing:initial!important;font-size:20px;margin-top:10px;margin-bottom:14px;margin-right:unset;margin-inline-end:20px}.gridInlineEdit{--background:transparent}.item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.divselectmultiple{justify-content:space-between;width:100%;color:#000}.tooltipsinfo-text{margin-left:5px}.tooltipsinfo-text,.tooltipsinfo-text-wide{text-align:justify;text-justify:inter-word;word-wrap:break-word;font-size:10px;margin-top:6px}.tooltipsinfo-text-wide{width:100%;padding-bottom:5px}.tooltipsinfo-right{display:grid;grid-template-columns:1.2fr .05fr 1fr;grid-gap:0}.tooltipsinfo-icon{padding-left:10px;color:#3880ff}"]
|
|
9087
9152
|
},] }
|
|
9088
9153
|
];
|
|
@@ -9300,6 +9365,7 @@
|
|
|
9300
9365
|
this.showTooltipsInfoIcon = false;
|
|
9301
9366
|
this.showTooltipsInfoBySide = false;
|
|
9302
9367
|
this.tooltipsInfo = null;
|
|
9368
|
+
this.tooltipsDisplayText = null;
|
|
9303
9369
|
this.clearButtonIcon = "time-circle";
|
|
9304
9370
|
this.setEnable = function (status) {
|
|
9305
9371
|
var fc = _this.group.form.controls[_this.data.Value];
|
|
@@ -9332,10 +9398,12 @@
|
|
|
9332
9398
|
if (this.tooltipsInfo) {
|
|
9333
9399
|
if ((this.tooltipsInfo.Icon != null || this.tooltipsInfo.Icon != undefined) && !this.isMobileScreen()) {
|
|
9334
9400
|
this.showTooltipsInfoIcon = true;
|
|
9401
|
+
this.setTooltipsInfoIcon();
|
|
9335
9402
|
}
|
|
9336
9403
|
if (this.tooltipsInfo.SideBySide) {
|
|
9337
9404
|
this.showTooltipsInfoBySide = true;
|
|
9338
9405
|
}
|
|
9406
|
+
this.setTooltipsDisplayText();
|
|
9339
9407
|
}
|
|
9340
9408
|
// Handle Clickable Icons
|
|
9341
9409
|
this.iconList = this.data.ClickableIcons;
|
|
@@ -9455,8 +9523,8 @@
|
|
|
9455
9523
|
});
|
|
9456
9524
|
};
|
|
9457
9525
|
ZtextComponent.prototype.onChange = function (event) {
|
|
9458
|
-
// console.log('ztext.component - onChange: ', event.target.value);
|
|
9459
|
-
i3.ZComponentHelper.
|
|
9526
|
+
// console.log('ztext.component - onChange: ', event.target.value);
|
|
9527
|
+
i3.ZComponentHelper.setComponentModelValue(this.data, event.target.value, this.group);
|
|
9460
9528
|
this.group.subject.next({
|
|
9461
9529
|
type: "onChange",
|
|
9462
9530
|
target: this.data.OnChange,
|
|
@@ -9518,22 +9586,33 @@
|
|
|
9518
9586
|
}
|
|
9519
9587
|
return "#acacac"; // default grey
|
|
9520
9588
|
};
|
|
9521
|
-
ZtextComponent.prototype.setTooltipsInfoIcon = function () {
|
|
9589
|
+
ZtextComponent.prototype.setTooltipsInfoIcon = function (displayIcon) {
|
|
9522
9590
|
if (this.showTooltipsInfoIcon) {
|
|
9523
9591
|
if (this.tooltipsInfo.Icon != '') {
|
|
9524
|
-
|
|
9592
|
+
if (displayIcon) {
|
|
9593
|
+
this.tooltipsDisplayIcon = displayIcon;
|
|
9594
|
+
}
|
|
9595
|
+
else {
|
|
9596
|
+
this.tooltipsDisplayIcon = this.tooltipsInfo.Icon;
|
|
9597
|
+
}
|
|
9525
9598
|
}
|
|
9526
9599
|
else {
|
|
9527
|
-
|
|
9600
|
+
this.tooltipsDisplayIcon = 'question-circle';
|
|
9528
9601
|
}
|
|
9529
9602
|
}
|
|
9530
|
-
return false;
|
|
9531
9603
|
};
|
|
9532
|
-
ZtextComponent.prototype.setTooltipsDisplayText = function () {
|
|
9604
|
+
ZtextComponent.prototype.setTooltipsDisplayText = function (displayText) {
|
|
9533
9605
|
if (this.tooltipsInfo) {
|
|
9534
|
-
|
|
9606
|
+
if (displayText) {
|
|
9607
|
+
this.tooltipsDisplayText = displayText;
|
|
9608
|
+
}
|
|
9609
|
+
else {
|
|
9610
|
+
this.tooltipsDisplayText = this.tooltipsInfo.DisplayText;
|
|
9611
|
+
}
|
|
9612
|
+
}
|
|
9613
|
+
else {
|
|
9614
|
+
this.tooltipsDisplayText = '<Display text error>';
|
|
9535
9615
|
}
|
|
9536
|
-
return '<Display text error>';
|
|
9537
9616
|
};
|
|
9538
9617
|
ZtextComponent.prototype.setTooltipsInfoSideBySide = function () {
|
|
9539
9618
|
if (this.tooltipsInfo) {
|
|
@@ -9548,7 +9627,7 @@
|
|
|
9548
9627
|
ZtextComponent.decorators = [
|
|
9549
9628
|
{ type: i0.Component, args: [{
|
|
9550
9629
|
selector: "app-ztext",
|
|
9551
|
-
template: "<ion-item [formGroup]=\"form\"\r\n *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\"\r\n [ngClass]=\"getIon_InvalidClass(form, data)\">\r\n <ion-label [attr.for]=\"data.Value\"\r\n *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\"\r\n [position]=\"data.LabelPosition ? data.LabelPosition : 'stacked'\">\r\n {{data.Label}}\r\n <ion-text *ngIf=\"(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)\" color=\"danger\">*</ion-text>\r\n <!-- add icon for tooltips -->\r\n <span kendoTooltip\r\n *ngIf=\"data.TooltipsInfo && showTooltipsInfoIcon\"\r\n [title]=\"
|
|
9630
|
+
template: "<ion-item [formGroup]=\"form\"\r\n *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\"\r\n [ngClass]=\"getIon_InvalidClass(form, data)\">\r\n <ion-label [attr.for]=\"data.Value\"\r\n *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\"\r\n [position]=\"data.LabelPosition ? data.LabelPosition : 'stacked'\">\r\n {{data.Label}}\r\n <ion-text *ngIf=\"(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)\" color=\"danger\">*</ion-text>\r\n <!-- add icon for tooltips -->\r\n <span kendoTooltip\r\n *ngIf=\"data.TooltipsInfo && showTooltipsInfoIcon\"\r\n [title]=\"tooltipsDisplayText\">\r\n <fa-icon [icon]=\"tooltipsDisplayIcon\"\r\n class=\"tooltipsinfo-icon\">\r\n </fa-icon>\r\n </span>\r\n </ion-label>\r\n <!-- mobile tooltipsinfo below label-->\r\n <kendo-label *ngIf=\"data.TooltipsInfo && !showTooltipsInfoIcon && !showTooltipsInfoBySide && isMobileScreen()\"\r\n [text]=\"tooltipsDisplayText\"\r\n [class]=\"setTooltipsInfoClass()\"\r\n [style.color]=\"setTooltipsInfoColor()\"></kendo-label>\r\n <!-- <ion-input [name]=\"data.Name\" [required]=\"data.IsRequired\" [placeholder]=\"data.PlaceHolder\" [type]=\"mapInputType(data.Type)\"\r\n [(ngModel)]=\"group.zModel[data.Value]\" [minlength]=\"data.MinLength\" [maxlength]=\"data.MaxLength\"\r\n [readonly]=\"data.ReadOnly\" [inputmode]=\"mapInputMode(data.Type)\"></ion-input> -->\r\n <div [class]=\"setTooltipsInfoSideBySide()\">\r\n <div style=\"flex: 1;\">\r\n <ion-input *ngIf=\"isMobileScreen()\"\r\n [id]=\"data.Value\"\r\n [formControlName]=\"data.Value\"\r\n [type]=\"mapInputType(data.Type)\"\r\n [placeholder]=\"data.PlaceHolder\"\r\n clearOnEdit\r\n [minlength]=\"data.MinLength\"\r\n [maxlength]=\"data.MaxLength\"\r\n [attr.disabled]=\"(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n [ngStyle]=\"{'text-align': getStyle(data.RightAlign ? true : false)}\"\r\n [inputmode]=\"mapInputMode(data.Type)\"\r\n (click)='textboxOnClick()'\r\n (ionChange)=\"onChange($event)\">\r\n </ion-input>\r\n <kendo-textbox *ngIf=\"!isMobileScreen()\"\r\n [id]=\"data.Value\"\r\n [formControlName]=\"data.Value\"\r\n [type]=\"mapInputType(data.Type)\"\r\n [placeholder]=\"data.PlaceHolder\"\r\n [clearButton]=\"showClearButton\"\r\n [minlength]=\"data.MinLength\"\r\n [maxlength]=\"data.MaxLength\"\r\n [readonly]=\"(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n [ngClass]=\"{'disabled' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}\"\r\n [ngStyle]=\"{'text-align': getStyle(data.RightAlign ? true : false)}\"\r\n (input)=\"onChange($event)\"\r\n (click)=\"textboxOnClick()\"\r\n [class]=\"setTextboxClass()\">\r\n\r\n <ng-template kendoTextBoxSuffixTemplate\r\n *ngIf=\"adornmentList\">\r\n <!-- For Validation feature -->\r\n <!--<app-uivalidationmessage [group]=\"group\"\r\n [data]=\"data\"\r\n [form]=\"form\"\r\n class=\"validation-icon\"></app-uivalidationmessage>-->\r\n <button kendoButton\r\n *ngIf=\"data.OnClick\"\r\n look=\"clear\"\r\n icon=\"close-circle\"\r\n class=\"textbox-clearbutton\"\r\n (click)=\"readOnlyOnClear()\"></button>\r\n <!-- For Adornments feature -->\r\n <div *ngFor=\"let adornment of adornmentList\">\r\n <kendo-textbox-separator *ngIf=\"!adornment.HideSeperator\"\r\n class=\"textbox-separator\"></kendo-textbox-separator>\r\n <button kendoButton\r\n [look]=\"adornmentLook(adornment)\"\r\n [icon]=\"adornment.Icon\"\r\n (click)=\"onAdornmentClick(adornment)\"\r\n [style.background-color]=\"getAdornmentBackgroundColor(adornment)\"></button>\r\n </div>\r\n </ng-template>\r\n </kendo-textbox>\r\n </div>\r\n <!-- For Validation feature pending change to inner textbox -->\r\n <app-uivalidationmessage *ngIf=\"!isMobileScreen()\"\r\n [group]=\"group\"\r\n [data]=\"data\"\r\n [form]=\"form\" ></app-uivalidationmessage>\r\n\r\n <!-- For Mobile Validation feature -->\r\n <app-uivalidationmessage *ngIf=\"isMobileScreen()\"\r\n [group]=\"group\"\r\n [data]=\"data\"\r\n [form]=\"form\"\r\n class=\"validation-icon-mobile\"></app-uivalidationmessage>\r\n\r\n <!-- mobile section for Adornments feature -->\r\n <div *ngFor=\"let adornment of adornmentList\">\r\n <button kendoButton\r\n *ngIf=\"isMobileScreen()\"\r\n [look]=\"adornmentLook(adornment)\"\r\n [icon]=\"adornment.Icon\"\r\n (click)=\"onAdornmentClick(adornment)\"\r\n [style.background-color]=\"getAdornmentBackgroundColor(adornment)\"\r\n class=\"adornments-icon-mobile\"></button>\r\n </div>\r\n\r\n <!-- Icon button feature -->\r\n <div *ngFor=\"let item of iconList\">\r\n <div kendoTooltip\r\n class=\"icon-button\"\r\n showOn=\"hover\"\r\n [tooltipWidth]=\"item.Width\"\r\n [position]=\"item.Position\">\r\n\r\n <span *ngIf=\"!!item \"\r\n (click)=\"onIconClick(item.Click)\"\r\n [title]=\"item.Tooltip\"\r\n style=\"margin-top: 10px;\">\r\n\r\n <fa-icon [icon]=\"item.Icon\"\r\n [ngStyle]=\"{'padding': '4px 6px', 'color': (item.Color ? item.Color : 'black')}\"></fa-icon>\r\n </span>\r\n </div>\r\n </div>\r\n <!-- side by side and desktop tooltipsinfo -->\r\n <kendo-label *ngIf=\"tooltipsInfo && !showTooltipsInfoIcon && ((showTooltipsInfoBySide && isMobileScreen()) || !isMobileScreen())\"\r\n [text]=\"tooltipsDisplayText\"\r\n [class]=\"setTooltipsInfoClass()\"\r\n [style.color]=\"setTooltipsInfoColor()\"></kendo-label>\r\n </div>\r\n</ion-item>\r\n",
|
|
9552
9631
|
styles: [".item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.divtextbox{justify-content:space-between;width:100%}.k-textbox{color:var(--z-text-color)}.notmobile-textbox{margin:7px 0 0;width:100%}.notmobile-textbox-onfocus{margin:7px 0 0;width:100%;color:var(--z-text-color)!important;background-color:#fff!important}.validation-icon{margin-top:0;margin-right:5px}.validation-icon-mobile{margin-top:5px;margin-right:5px}.textbox-separator{margin-top:0}.textbox-clearbutton{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;outline:0;cursor:pointer;opacity:.5}.textbox-clearbutton:hover{opacity:1!important}.icon-button{text-align:center;padding-top:10px}.adornments-icon-mobile{margin-bottom:0;margin-left:5px;width:28px;height:28px}.tooltipsinfo-text{margin-left:5px;width:50%}.tooltipsinfo-text,.tooltipsinfo-text-wide{text-align:justify;text-justify:inter-word;word-wrap:break-word;font-size:10px;margin-top:6px}.tooltipsinfo-text-wide{width:100%;padding-bottom:5px}.tooltipsinfo-right{display:grid;grid-template-columns:3fr 1fr 2fr;grid-gap:0}.tooltipsinfo-icon{padding-left:10px;color:#3880ff}"]
|
|
9553
9632
|
},] }
|
|
9554
9633
|
];
|
|
@@ -10639,6 +10718,169 @@
|
|
|
10639
10718
|
form: [{ type: i0.Input }]
|
|
10640
10719
|
};
|
|
10641
10720
|
|
|
10721
|
+
/********** Angular **********/
|
|
10722
|
+
var ZudfComponent = /** @class */ (function () {
|
|
10723
|
+
function ZudfComponent(alertService, authService, fieldService, resourceApiService, toastService, webApiService) {
|
|
10724
|
+
var _this = this;
|
|
10725
|
+
this.alertService = alertService;
|
|
10726
|
+
this.authService = authService;
|
|
10727
|
+
this.fieldService = fieldService;
|
|
10728
|
+
this.resourceApiService = resourceApiService;
|
|
10729
|
+
this.toastService = toastService;
|
|
10730
|
+
this.webApiService = webApiService;
|
|
10731
|
+
this.componentProperties = new i3.ZComponentProperties();
|
|
10732
|
+
this.setEnable = function (status) {
|
|
10733
|
+
_this.componentProperties.isReadOnly = !status;
|
|
10734
|
+
};
|
|
10735
|
+
this.setVisible = function (status) {
|
|
10736
|
+
_this.componentProperties.isVisible = status;
|
|
10737
|
+
_this.data.Visible = status;
|
|
10738
|
+
};
|
|
10739
|
+
this.setRequire = function (status) {
|
|
10740
|
+
_this.componentProperties.isRequired = status;
|
|
10741
|
+
i3.ZComponentHelper.changeValidator(status, _this.group, _this.data.Value, _this.componentProperties, forms.Validators.required);
|
|
10742
|
+
};
|
|
10743
|
+
}
|
|
10744
|
+
ZudfComponent.prototype.ngOnInit = function () {
|
|
10745
|
+
var _this = this;
|
|
10746
|
+
i3.ZComponentHelper.setComponentProperties(this);
|
|
10747
|
+
i3.ZComponentHelper.registerComponent(this);
|
|
10748
|
+
rxjs.of(true).pipe(operators.concatMap(function (fieldElements) {
|
|
10749
|
+
var asyncSubject = new rxjs.AsyncSubject();
|
|
10750
|
+
_this.fieldService.getFormFieldCode(_this.data.Value, 'FormField', _this, 'fields').pipe(operators.map(function (formFieldResult) {
|
|
10751
|
+
// rename add prefix to all udf field to prevent duplicate from main form
|
|
10752
|
+
_this.appendPrefix(formFieldResult, 'zudf');
|
|
10753
|
+
// change the value to the result field form
|
|
10754
|
+
_this.data.Value = formFieldResult;
|
|
10755
|
+
// change zudf to zdiv
|
|
10756
|
+
_this.data.Type = 'zdiv';
|
|
10757
|
+
// end subject
|
|
10758
|
+
asyncSubject.next(true);
|
|
10759
|
+
asyncSubject.complete();
|
|
10760
|
+
})).subscribe();
|
|
10761
|
+
return asyncSubject.asObservable();
|
|
10762
|
+
}), operators.tap(function () {
|
|
10763
|
+
if (!_this.group._zudf) {
|
|
10764
|
+
_this.group._zudf = new i3.ZGroup;
|
|
10765
|
+
}
|
|
10766
|
+
_this.group._zudf.zModel = {};
|
|
10767
|
+
// create as new Form Group
|
|
10768
|
+
_this.form = _this.toFormGroup(_this.data.Value);
|
|
10769
|
+
// set to zGroup scope
|
|
10770
|
+
_this.group._zudf.form = _this.form;
|
|
10771
|
+
}), operators.tap(function () {
|
|
10772
|
+
// set to formField for display
|
|
10773
|
+
_this.formField = _this.data.Value;
|
|
10774
|
+
})).subscribe(function () {
|
|
10775
|
+
// set Field div class
|
|
10776
|
+
i3.ZComponentHelper.setFieldsDivClass(_this.group._projectName, _this.group.fieldName, _this.data, _this.authService);
|
|
10777
|
+
// get saved record
|
|
10778
|
+
_this.getFormFieldzModel();
|
|
10779
|
+
});
|
|
10780
|
+
};
|
|
10781
|
+
ZudfComponent.prototype.getFormFieldzModel = function () {
|
|
10782
|
+
var form = this.group._zudf.form;
|
|
10783
|
+
var zModel = this.group._zudf.zModel;
|
|
10784
|
+
var url = this.resourceApiService.getURL('field');
|
|
10785
|
+
var respData = { 'parentFormId': 5722, 'zudf_Name': 'test' };
|
|
10786
|
+
Object.assign(zModel, respData);
|
|
10787
|
+
form.patchValue(zModel);
|
|
10788
|
+
form.markAsPristine();
|
|
10789
|
+
//return this.webApiService.httpGet$(url, { name: this.group.fieldName, type: 'FormField' }).pipe(
|
|
10790
|
+
// tap((respData: any) => {
|
|
10791
|
+
// debugger;
|
|
10792
|
+
// Object.assign(zModel, respData);
|
|
10793
|
+
// form.patchValue(zModel);
|
|
10794
|
+
// form.markAsPristine();
|
|
10795
|
+
// })
|
|
10796
|
+
//);
|
|
10797
|
+
};
|
|
10798
|
+
ZudfComponent.prototype.toFormGroup = function (fieldElements) {
|
|
10799
|
+
var formControls = {};
|
|
10800
|
+
this.getFormControls(fieldElements, formControls);
|
|
10801
|
+
var newFormGroup = new forms.FormGroup(formControls);
|
|
10802
|
+
return newFormGroup;
|
|
10803
|
+
};
|
|
10804
|
+
ZudfComponent.prototype.getFormControls = function (fieldArray, formControls) {
|
|
10805
|
+
var _this = this;
|
|
10806
|
+
fieldArray.forEach(function (field) {
|
|
10807
|
+
if (typeof field.Value === "string" && field.Value.indexOf(".") !== -1) {
|
|
10808
|
+
if (['zgrid', 'ztree', 'zimg', 'textareajson'].indexOf(field.Type) === -1) {
|
|
10809
|
+
console.warn("FormControl - invalid field value", field.Value);
|
|
10810
|
+
}
|
|
10811
|
+
}
|
|
10812
|
+
else {
|
|
10813
|
+
if (Array.isArray(field.Value)) {
|
|
10814
|
+
_this.getFormControls(field.Value, formControls);
|
|
10815
|
+
}
|
|
10816
|
+
else {
|
|
10817
|
+
var isFormControl = i3.ZComponentHelper.isFormControl(field);
|
|
10818
|
+
var isVisible = i3.ZComponentHelper.isVisibleFormControl(_this, field);
|
|
10819
|
+
var isRequired = i3.ZComponentHelper.isRequiredFormControl(_this, field);
|
|
10820
|
+
if (isFormControl === true) {
|
|
10821
|
+
var validators = i3.ZComponentHelper.getValidators(field, isVisible, isRequired);
|
|
10822
|
+
formControls[field.Value] = new forms.FormControl(_this.group._zudf.zModel[field.Value], validators);
|
|
10823
|
+
if (i3.ZComponentHelper.hasCCField(field.Type)) {
|
|
10824
|
+
var ccValidators = i3.ZComponentHelper.getCCValidators(field, isVisible, isRequired);
|
|
10825
|
+
formControls[field.CCValue] = new forms.FormControl(_this.group._zudf.zModel[field.CCValue], ccValidators);
|
|
10826
|
+
}
|
|
10827
|
+
}
|
|
10828
|
+
}
|
|
10829
|
+
}
|
|
10830
|
+
});
|
|
10831
|
+
};
|
|
10832
|
+
ZudfComponent.prototype.appendPrefix = function (fields, prefix) {
|
|
10833
|
+
var _this = this;
|
|
10834
|
+
fields.forEach(function (field) {
|
|
10835
|
+
if (Array.isArray(field.Value)) {
|
|
10836
|
+
_this.appendPrefix(field.Value, prefix);
|
|
10837
|
+
}
|
|
10838
|
+
else {
|
|
10839
|
+
field.Name = prefix + '_' + field.Name;
|
|
10840
|
+
if (field.Type != 'zbuttons') {
|
|
10841
|
+
field.Value = prefix + '_' + field.Value;
|
|
10842
|
+
}
|
|
10843
|
+
field.SubType = prefix;
|
|
10844
|
+
}
|
|
10845
|
+
});
|
|
10846
|
+
};
|
|
10847
|
+
ZudfComponent.prototype.ComponentIsVisible = function (field) {
|
|
10848
|
+
return i3.ZComponentHelper.ComponentIsVisible(field, this.group);
|
|
10849
|
+
};
|
|
10850
|
+
ZudfComponent.prototype.allowDrop = function (ev) {
|
|
10851
|
+
ev.preventDefault();
|
|
10852
|
+
};
|
|
10853
|
+
ZudfComponent.prototype.drag = function (ev) {
|
|
10854
|
+
ev.dataTransfer.setData("text", ev.target.id);
|
|
10855
|
+
};
|
|
10856
|
+
ZudfComponent.prototype.drop = function (ev) {
|
|
10857
|
+
ev.preventDefault();
|
|
10858
|
+
var data = ev.dataTransfer.getData("text");
|
|
10859
|
+
ev.target.appendChild(document.getElementById(data));
|
|
10860
|
+
};
|
|
10861
|
+
return ZudfComponent;
|
|
10862
|
+
}());
|
|
10863
|
+
ZudfComponent.decorators = [
|
|
10864
|
+
{ type: i0.Component, args: [{
|
|
10865
|
+
selector: 'app-zudf',
|
|
10866
|
+
template: "<div *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\" class=\"ion-row\">\r\n\r\n <app-zformcontrol [ngClass]=\"group[field.isVisibleField] ? field.DivClass : ((field.Visible === true) ? field.DivClass : 'flex-hide')\"\r\n *ngFor=\"let field of formField | divzlayout: data.zlayout\"\r\n [field]=\"field\"\r\n [group]=\"group\"\r\n [form]=\"form\"\r\n id=\"zudf-{{field.Type}}-{{field.Name}}\">\r\n </app-zformcontrol>\r\n\r\n <h2>Drag and Drop</h2>\r\n <div id=\"div1\"\r\n (drop)=\"drop($event)\"\r\n (dragover)=\"allowDrop($event)\">\r\n\r\n <img src=\"https://images.pexels.com/photos/658687/pexels-photo-658687.jpeg?auto=compress&cs=tinysrgb&h=350\"\r\n draggable=\"true\"\r\n (dragstart)=\"drag($event)\"\r\n id=\"drag1\"\r\n width=\"88\"\r\n height=\"31\">\r\n </div>\r\n\r\n <div id=\"div2\"\r\n (drop)=\"drop($event)\"\r\n (dragover)=\"allowDrop($event)\">\r\n </div>\r\n\r\n</div>\r\n",
|
|
10867
|
+
styles: ["#div1,#div2{float:left;width:100px;height:35px;margin:10px;padding:10px;border:1px solid #000}"]
|
|
10868
|
+
},] }
|
|
10869
|
+
];
|
|
10870
|
+
ZudfComponent.ctorParameters = function () { return [
|
|
10871
|
+
{ type: i3.AlertService },
|
|
10872
|
+
{ type: i3.AuthService },
|
|
10873
|
+
{ type: i3.FieldService },
|
|
10874
|
+
{ type: i3.ResourceApiService },
|
|
10875
|
+
{ type: i3.ToastService },
|
|
10876
|
+
{ type: i3.WebApiService }
|
|
10877
|
+
]; };
|
|
10878
|
+
ZudfComponent.propDecorators = {
|
|
10879
|
+
data: [{ type: i0.Input }],
|
|
10880
|
+
group: [{ type: i0.Input }],
|
|
10881
|
+
form: [{ type: i0.Input }]
|
|
10882
|
+
};
|
|
10883
|
+
|
|
10642
10884
|
/********** Angular **********/
|
|
10643
10885
|
var ZunknownComponent = /** @class */ (function () {
|
|
10644
10886
|
function ZunknownComponent() {
|
|
@@ -10703,6 +10945,8 @@
|
|
|
10703
10945
|
this.showFileList = true;
|
|
10704
10946
|
this.fileList = [];
|
|
10705
10947
|
this.restrictions = {
|
|
10948
|
+
minFileSize: 1,
|
|
10949
|
+
maxFileSize: 4194304,
|
|
10706
10950
|
allowedExtensions: [
|
|
10707
10951
|
"jpg",
|
|
10708
10952
|
"jpeg",
|
|
@@ -10750,6 +10994,12 @@
|
|
|
10750
10994
|
this.restrictions.allowedExtensions = this.data
|
|
10751
10995
|
.SelectOptions;
|
|
10752
10996
|
}
|
|
10997
|
+
if (this.data.MinFileSize) {
|
|
10998
|
+
this.restrictions.minFileSize = this.data.MinFileSize;
|
|
10999
|
+
}
|
|
11000
|
+
if (this.data.MaxFileSize) {
|
|
11001
|
+
this.restrictions.maxFileSize = this.data.MaxFileSize;
|
|
11002
|
+
}
|
|
10753
11003
|
this.isAutoUpload = this.data.AutoUpload || false;
|
|
10754
11004
|
if (!this.data.AllowRemove) {
|
|
10755
11005
|
this.uploadRemoveUrl = "";
|
|
@@ -10984,17 +11234,21 @@
|
|
|
10984
11234
|
} // file type check
|
|
10985
11235
|
}); // loop each file
|
|
10986
11236
|
} // imagecompression check
|
|
10987
|
-
// add to group scope
|
|
11237
|
+
// add to group scope
|
|
10988
11238
|
me.group['zupload_' + me.data.Value] = e.files;
|
|
10989
11239
|
}
|
|
10990
11240
|
}
|
|
10991
11241
|
};
|
|
11242
|
+
ZuploadComponent.prototype.clearFiles = function () {
|
|
11243
|
+
this.uploadComponent.clearFiles();
|
|
11244
|
+
this.group['zupload_' + this.data.Value] = this.fileList;
|
|
11245
|
+
};
|
|
10992
11246
|
return ZuploadComponent;
|
|
10993
11247
|
}());
|
|
10994
11248
|
ZuploadComponent.decorators = [
|
|
10995
11249
|
{ type: i0.Component, args: [{
|
|
10996
11250
|
selector: "app-zupload",
|
|
10997
|
-
template: "<ion-item [formGroup]=\"form\" *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\" [ngClass]=\"getIon_InvalidClass(form, data)\" style=\"margin-left: -15px;\">\r\n <ion-label [attr.for]=\"data.Value\" *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\" position=\"stacked\" style=\"margin-bottom: 10px;\">\r\n {{data.Label}} <ion-text *ngIf=\"(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)\" color=\"danger\">*</ion-text>\r\n </ion-label>\r\n <div class=\"ion-row\" style=\"justify-content: space-between; width: 100%\">\r\n <span style=\"flex: 1;\">\r\n <kendo-upload *ngIf=\"!data.SelectFileOnly\"\r\n [autoUpload]=\"isAutoUpload\"\r\n [saveUrl]=\"uploadSaveUrl\"\r\n [removeUrl]=\"uploadRemoveUrl\"\r\n [restrictions]=\"restrictions\"\r\n [formControlName]=\"data.Value\"\r\n [multiple]=\"isMultiple\"\r\n [chunkable]=\"chunkSettings\"\r\n [showFileList]=\"showFileList\"\r\n (select)=\"selectEventHandler($event)\"\r\n (remove)=\"onRemove($event)\"\r\n (success)=\"onSuccess($event)\"\r\n (upload)=\"uploadEventHandler($event)\">\r\n </kendo-upload>\r\n\r\n <kendo-fileselect *ngIf=\"data.SelectFileOnly\"\r\n (select)=\"selectEventHandler($event)\"\r\n (remove)=\"onRemove($event)\"\r\n (valueChange)=\"onChange($event)\"\r\n [restrictions]=\"restrictions\" >\r\n </kendo-fileselect>\r\n </span>\r\n </div>\r\n</ion-item>\r\n<br />\r\n<!--<div class=\"wrap\" *ngIf=\"data.EnableCompression\">\r\n <ion-label>Enable Compression: </ion-label>\r\n <ion-checkbox style=\"margin: -5px 0;\" color=\"primary\" (ionChange)=\"toogleEnableCompression($event)\"></ion-checkbox>\r\n</div>-->\r\n<ion-label *ngIf=\"imagePreviews.length\" position=\"stacked\">\r\n Image Preview:\r\n</ion-label>\r\n<div *ngIf=\"imagePreviews.length\" >\r\n <img *ngFor=\"let image of imagePreviews\"\r\n [src]=\"image.src\"\r\n alt=\"image preview\"\r\n height=\"100\"\r\n style=\"margin: 5px; border: 1px solid gray;\"/>\r\n</div>\r\n",
|
|
11251
|
+
template: "<ion-item [formGroup]=\"form\" *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\" [ngClass]=\"getIon_InvalidClass(form, data)\" style=\"margin-left: -15px;\">\r\n <ion-label [attr.for]=\"data.Value\" *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\" position=\"stacked\" style=\"margin-bottom: 10px;\">\r\n {{data.Label}} <ion-text *ngIf=\"(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)\" color=\"danger\">*</ion-text>\r\n </ion-label>\r\n <div class=\"ion-row\" style=\"justify-content: space-between; width: 100%\">\r\n <span style=\"flex: 1;\">\r\n <kendo-upload #uploadComponent\r\n *ngIf=\"!data.SelectFileOnly\"\r\n [id]=\"data.Value\"\r\n [autoUpload]=\"isAutoUpload\"\r\n [saveUrl]=\"uploadSaveUrl\"\r\n [removeUrl]=\"uploadRemoveUrl\"\r\n [restrictions]=\"restrictions\"\r\n [formControlName]=\"data.Value\"\r\n [multiple]=\"isMultiple\"\r\n [chunkable]=\"chunkSettings\"\r\n [showFileList]=\"showFileList\"\r\n (select)=\"selectEventHandler($event)\"\r\n (remove)=\"onRemove($event)\" \r\n (success)=\"onSuccess($event)\"\r\n (upload)=\"uploadEventHandler($event)\">\r\n </kendo-upload>\r\n\r\n <kendo-fileselect #uploadComponent\r\n *ngIf=\"data.SelectFileOnly\"\r\n [id]=\"data.Value\"\r\n (select)=\"selectEventHandler($event)\"\r\n (remove)=\"onRemove($event)\" \r\n (valueChange)=\"onChange($event)\"\r\n [restrictions]=\"restrictions\" >\r\n </kendo-fileselect>\r\n </span>\r\n </div>\r\n</ion-item>\r\n<br />\r\n<!--<div class=\"wrap\" *ngIf=\"data.EnableCompression\">\r\n <ion-label>Enable Compression: </ion-label>\r\n <ion-checkbox style=\"margin: -5px 0;\" color=\"primary\" (ionChange)=\"toogleEnableCompression($event)\"></ion-checkbox>\r\n</div>-->\r\n<ion-label *ngIf=\"imagePreviews.length\" position=\"stacked\">\r\n Image Preview:\r\n</ion-label>\r\n<div *ngIf=\"imagePreviews.length\" >\r\n <img *ngFor=\"let image of imagePreviews\"\r\n [src]=\"image.src\"\r\n alt=\"image preview\"\r\n height=\"100\"\r\n style=\"margin: 5px; border: 1px solid gray;\"/>\r\n</div>\r\n",
|
|
10998
11252
|
styles: [""]
|
|
10999
11253
|
},] }
|
|
11000
11254
|
];
|
|
@@ -11007,7 +11261,8 @@
|
|
|
11007
11261
|
ZuploadComponent.propDecorators = {
|
|
11008
11262
|
data: [{ type: i0.Input }],
|
|
11009
11263
|
group: [{ type: i0.Input }],
|
|
11010
|
-
form: [{ type: i0.Input }]
|
|
11264
|
+
form: [{ type: i0.Input }],
|
|
11265
|
+
uploadComponent: [{ type: i0.ViewChild, args: ["uploadComponent",] }]
|
|
11011
11266
|
};
|
|
11012
11267
|
|
|
11013
11268
|
/********** Angular **********/
|
|
@@ -11278,6 +11533,7 @@
|
|
|
11278
11533
|
ktree_list: ZtreelistComponent,
|
|
11279
11534
|
ztrendcard: ZtrendcardComponent,
|
|
11280
11535
|
unknown: ZunknownComponent,
|
|
11536
|
+
zudf: ZudfComponent,
|
|
11281
11537
|
zupload: ZuploadComponent,
|
|
11282
11538
|
zworkflowbuttons: ZworkflowbuttonsComponent
|
|
11283
11539
|
// kdate_rangepicker: ZdaterangeComponent
|
|
@@ -11461,6 +11717,7 @@
|
|
|
11461
11717
|
ZtreelistComponent,
|
|
11462
11718
|
ZtrendcardComponent,
|
|
11463
11719
|
ZunknownComponent,
|
|
11720
|
+
ZudfComponent,
|
|
11464
11721
|
ZuploadComponent,
|
|
11465
11722
|
ZworkflowbuttonsComponent
|
|
11466
11723
|
],
|
|
@@ -11560,6 +11817,7 @@
|
|
|
11560
11817
|
ZtreelistComponent,
|
|
11561
11818
|
ZtrendcardComponent,
|
|
11562
11819
|
ZunknownComponent,
|
|
11820
|
+
ZudfComponent,
|
|
11563
11821
|
ZuploadComponent,
|
|
11564
11822
|
ZworkflowbuttonsComponent
|
|
11565
11823
|
],
|
|
@@ -11609,6 +11867,7 @@
|
|
|
11609
11867
|
ZtreelistComponent,
|
|
11610
11868
|
ZtrendcardComponent,
|
|
11611
11869
|
ZunknownComponent,
|
|
11870
|
+
ZudfComponent,
|
|
11612
11871
|
ZuploadComponent,
|
|
11613
11872
|
ZworkflowbuttonsComponent
|
|
11614
11873
|
],
|
|
@@ -11684,6 +11943,7 @@
|
|
|
11684
11943
|
exports.ZtreeComponent = ZtreeComponent;
|
|
11685
11944
|
exports.ZtreelistComponent = ZtreelistComponent;
|
|
11686
11945
|
exports.ZtrendcardComponent = ZtrendcardComponent;
|
|
11946
|
+
exports.ZudfComponent = ZudfComponent;
|
|
11687
11947
|
exports.ZunknownComponent = ZunknownComponent;
|
|
11688
11948
|
exports.ZuploadComponent = ZuploadComponent;
|
|
11689
11949
|
exports.ZworkflowbuttonsComponent = ZworkflowbuttonsComponent;
|