@churchillliving/se-ui-toolkit 6.53.360 → 6.53.362
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/bundles/churchillliving-se-ui-toolkit.umd.js +23 -19
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/churchillliving-se-ui-toolkit.metadata.json +1 -1
- package/esm2015/lib/components/base/grid/grid.component.js +3 -2
- package/esm2015/lib/services/grid.service.js +22 -19
- package/fesm2015/churchillliving-se-ui-toolkit.js +23 -19
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/components/base/grid/grid.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2664,9 +2664,10 @@
|
|
|
2664
2664
|
if (rowsData === void 0) { rowsData = []; }
|
|
2665
2665
|
rowsData = this.setDataFields(rowsData);
|
|
2666
2666
|
columns.forEach(function (column) {
|
|
2667
|
+
var _a;
|
|
2668
|
+
var field = (_a = column === null || column === void 0 ? void 0 : column.field) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
2667
2669
|
if (column.allowSave === false) {
|
|
2668
2670
|
rowsData.forEach(function (row) {
|
|
2669
|
-
var _a;
|
|
2670
2671
|
var obj = Object.keys(row);
|
|
2671
2672
|
if ((obj === null || obj === void 0 ? void 0 : obj.length) > 0) {
|
|
2672
2673
|
obj.forEach(function (x) {
|
|
@@ -2675,21 +2676,21 @@
|
|
|
2675
2676
|
}
|
|
2676
2677
|
});
|
|
2677
2678
|
}
|
|
2678
|
-
delete row[
|
|
2679
|
+
delete row[field];
|
|
2679
2680
|
row = _this.setRowValue(row);
|
|
2680
2681
|
});
|
|
2681
2682
|
}
|
|
2682
2683
|
else if (column.formatter && column.type === exports.EGridColumnType.BOOLEAN) {
|
|
2683
2684
|
rowsData.forEach(function (row) {
|
|
2684
|
-
var value = row[
|
|
2685
|
+
var value = row[field];
|
|
2685
2686
|
if (column.formatter === exports.EGridFormatter.CHAR) {
|
|
2686
|
-
row[
|
|
2687
|
+
row[field] = value === true || (value === null || value === void 0 ? void 0 : value.toString()) === 'Y' || (value === null || value === void 0 ? void 0 : value.toString()) === '1' ? 'Y' : 'N';
|
|
2687
2688
|
}
|
|
2688
2689
|
else if (column.formatter === exports.EGridFormatter.NUMERIC) {
|
|
2689
|
-
row[
|
|
2690
|
+
row[field] = value === true || (value === null || value === void 0 ? void 0 : value.toString()) === 'Y' || (value === null || value === void 0 ? void 0 : value.toString()) === '1' ? '1' : '0';
|
|
2690
2691
|
}
|
|
2691
2692
|
else if (column.formatter === exports.EGridFormatter.BOOLEAN) {
|
|
2692
|
-
row[
|
|
2693
|
+
row[field] = value === true || (value === null || value === void 0 ? void 0 : value.toString()) === 'Y' || (value === null || value === void 0 ? void 0 : value.toString()) === '1' ? true : false;
|
|
2693
2694
|
}
|
|
2694
2695
|
});
|
|
2695
2696
|
}
|
|
@@ -2697,13 +2698,13 @@
|
|
|
2697
2698
|
//convert date into time format
|
|
2698
2699
|
rowsData.forEach(function (row) {
|
|
2699
2700
|
if (column.timeOnly && column.saveAsString) {
|
|
2700
|
-
row[
|
|
2701
|
+
row[field] = _this.datepipe.transform(row[field], 'hh:mm a');
|
|
2701
2702
|
}
|
|
2702
2703
|
else if (!column.timeOnly && column.showTime) {
|
|
2703
|
-
row[
|
|
2704
|
+
row[field] = _this.datepipe.transform(row[field], 'yyyy-MM-dd HH:mm:ss');
|
|
2704
2705
|
}
|
|
2705
|
-
else if (row[
|
|
2706
|
-
row[
|
|
2706
|
+
else if (row[field] && !column.timeOnly && column.saveAsString) {
|
|
2707
|
+
row[field] = row[field].toLocaleDateString();
|
|
2707
2708
|
}
|
|
2708
2709
|
});
|
|
2709
2710
|
}
|
|
@@ -2718,6 +2719,8 @@
|
|
|
2718
2719
|
row = objConvertToLower(row);
|
|
2719
2720
|
row = this.setRowValue(row);
|
|
2720
2721
|
columns.forEach(function (column) {
|
|
2722
|
+
var _a;
|
|
2723
|
+
var field = (_a = column === null || column === void 0 ? void 0 : column.field) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
2721
2724
|
if (column.allowSave == false) {
|
|
2722
2725
|
var keys = Object.keys(row);
|
|
2723
2726
|
keys.forEach(function (x) {
|
|
@@ -2731,27 +2734,27 @@
|
|
|
2731
2734
|
}
|
|
2732
2735
|
}
|
|
2733
2736
|
else if (column.formatter && column.type === exports.EGridColumnType.BOOLEAN) {
|
|
2734
|
-
var value = row[
|
|
2737
|
+
var value = row[field];
|
|
2735
2738
|
if (column.formatter === exports.EGridFormatter.CHAR) {
|
|
2736
|
-
row[
|
|
2739
|
+
row[field] = value === true || (value === null || value === void 0 ? void 0 : value.toString()) === 'Y' || (value === null || value === void 0 ? void 0 : value.toString()) === '1' ? 'Y' : 'N';
|
|
2737
2740
|
}
|
|
2738
2741
|
else if (column.formatter === exports.EGridFormatter.NUMERIC) {
|
|
2739
|
-
row[
|
|
2742
|
+
row[field] = value === true || (value === null || value === void 0 ? void 0 : value.toString()) === 'Y' || (value === null || value === void 0 ? void 0 : value.toString()) === '1' ? '1' : '0';
|
|
2740
2743
|
}
|
|
2741
2744
|
else if (column.formatter === exports.EGridFormatter.BOOLEAN) {
|
|
2742
|
-
row[
|
|
2745
|
+
row[field] = value === true || (value === null || value === void 0 ? void 0 : value.toString()) === 'Y' || (value === null || value === void 0 ? void 0 : value.toString()) === '1' ? true : false;
|
|
2743
2746
|
}
|
|
2744
2747
|
}
|
|
2745
2748
|
else if (column.type === exports.EGridColumnType.DATE) {
|
|
2746
2749
|
//convert date into time format
|
|
2747
2750
|
if (column.timeOnly && column.saveAsString) {
|
|
2748
|
-
row[
|
|
2751
|
+
row[field] = _this.datepipe.transform(row[field], 'hh:mm a');
|
|
2749
2752
|
}
|
|
2750
2753
|
else if (!column.timeOnly && column.showTime) {
|
|
2751
|
-
row[
|
|
2754
|
+
row[field] = _this.datepipe.transform(row[field], 'yyyy-MM-dd HH:mm:ss');
|
|
2752
2755
|
}
|
|
2753
|
-
else if (row[
|
|
2754
|
-
row[
|
|
2756
|
+
else if (row[field] && !column.timeOnly && column.saveAsString) {
|
|
2757
|
+
row[field] = row[field].toLocaleDateString();
|
|
2755
2758
|
}
|
|
2756
2759
|
}
|
|
2757
2760
|
});
|
|
@@ -3762,7 +3765,7 @@
|
|
|
3762
3765
|
// Boolean prop to check where selected is allowed or not.
|
|
3763
3766
|
this.allowSelection = false;
|
|
3764
3767
|
// Set column width of selected row.
|
|
3765
|
-
|
|
3768
|
+
this.selectionColumnWidth = '80px';
|
|
3766
3769
|
// set selection checkBox header
|
|
3767
3770
|
this.allowSelectionHeader = '';
|
|
3768
3771
|
// Boolean prop to hide the save button on top of grid.
|
|
@@ -6274,6 +6277,7 @@
|
|
|
6274
6277
|
loading: [{ type: i0.Input }],
|
|
6275
6278
|
autoLoadData: [{ type: i0.Input }],
|
|
6276
6279
|
allowSelection: [{ type: i0.Input }],
|
|
6280
|
+
selectionColumnWidth: [{ type: i0.Input }],
|
|
6277
6281
|
allowSelectionHeader: [{ type: i0.Input }],
|
|
6278
6282
|
hideGridSaveButton: [{ type: i0.Input }],
|
|
6279
6283
|
hideGridCancelButton: [{ type: i0.Input }],
|