@churchillliving/se-ui-toolkit 6.53.361 → 6.53.363
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 +22 -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/cards/card.component.js +2 -2
- package/esm2015/lib/services/grid.service.js +22 -19
- package/fesm2015/churchillliving-se-ui-toolkit.js +22 -19
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- 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
|
});
|
|
@@ -8917,7 +8920,7 @@
|
|
|
8917
8920
|
CardComponent.decorators = [
|
|
8918
8921
|
{ type: i0.Component, args: [{
|
|
8919
8922
|
selector: 'se-card',
|
|
8920
|
-
template: "<!-- Display Files Card -->\n<p-confirmDialog key=\"handlecolumnActions\"></p-confirmDialog>\n<div\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n class=\"example-list\"\n (cdkDropListDropped)=\"dragAndDrop($event)\"\n>\n <div \n class=\"p-d-flex cards-wrapper\" \n [ngStyle]=\"{ width: width, height: height }\" \n *ngIf=\"data\" \n [class]=\"card && card.class ? card.class : ''\">\n <div\n cdkDrag\n class=\"example-box p-d-flex p-flex-column cards-wrapper\"\n [class]=\"\n card && card.width && card.width.length > 0\n ? 'p-col-' + card.width\n : 'p-col-3'\n \"\n *ngFor=\"let file of data; let i = index\"\n (click)=\"onClickEvent(file,i)\"\n [ngClass]=\"file.selectedCard ? file.selectedCard : ''\"\n >\n <!-- start cards image functionality -->\n <se-file\n [url]=\"file.blobfileurl\"\n [type]=\"file.fileextension\"\n [caption]=\"file?.filecaption\"\n [height]=\"card?.height\"\n [allowDownloadFile]=\"card?.allowDownload\"\n [allowEditableCaption]=\"card?.allowEditableCaption\"\n [allowDeleteFile]=\"card?.allowDelete\"\n [name]=\"file.blobfileurl\"\n [id]=\"file.fileextension\"\n (onDeleteEvent)=\"deleteImage($event)\"\n (onSaveEvent)=\"saveCaption($event)\"\n ></se-file>\n <!-- End cards image functionality -->\n\n <!-- start form functionality in card -->\n <se-form\n class=\"form-content\"\n [form]=\"file.dynamicform\"\n [hideSaveButton]=\"true\"\n [hideCancelButton]=\"true\"\n ></se-form>\n <!-- End form functionality in card -->\n </div>\n </div>\n\n <!-- in case of form and data is empty or null -->\n <div *ngIf=\"dynamicForm && (!data || data.length == 0)\">\n <se-form\n
|
|
8923
|
+
template: "<!-- Display Files Card -->\n<p-confirmDialog key=\"handlecolumnActions\"></p-confirmDialog>\n<div\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n class=\"example-list\"\n (cdkDropListDropped)=\"dragAndDrop($event)\"\n>\n <div \n class=\"p-d-flex cards-wrapper\" \n [ngStyle]=\"{ width: width, height: height }\" \n *ngIf=\"data\" \n [class]=\"card && card.class ? card.class : ''\">\n <div\n cdkDrag\n class=\"example-box p-d-flex p-flex-column cards-wrapper\"\n [class]=\"\n card && card.width && card.width.length > 0\n ? 'p-col-' + card.width\n : 'p-col-3'\n \"\n *ngFor=\"let file of data; let i = index\"\n (click)=\"onClickEvent(file,i)\"\n [ngClass]=\"file.selectedCard ? file.selectedCard : ''\"\n >\n <!-- start cards image functionality -->\n <se-file\n [url]=\"file.blobfileurl\"\n [type]=\"file.fileextension\"\n [caption]=\"file?.filecaption\"\n [height]=\"card?.height\"\n [allowDownloadFile]=\"card?.allowDownload\"\n [allowEditableCaption]=\"card?.allowEditableCaption\"\n [allowDeleteFile]=\"card?.allowDelete\"\n [name]=\"file.blobfileurl\"\n [id]=\"file.fileextension\"\n (onDeleteEvent)=\"deleteImage($event)\"\n (onSaveEvent)=\"saveCaption($event)\"\n ></se-file>\n <!-- End cards image functionality -->\n\n <!-- start form functionality in card -->\n <se-form\n class=\"form-content\"\n [form]=\"file.dynamicform\"\n [hideSaveButton]=\"true\"\n [hideCancelButton]=\"true\"\n ></se-form>\n <!-- End form functionality in card -->\n </div>\n </div>\n\n <!-- in case of form and data is empty or null -->\n <div *ngIf=\"dynamicForm && (!data || data.length == 0)\">\n <se-form\n *ngIf=\"dynamicForm\"\n [form]=\"dynamicForm\"\n [hideSaveButton]=\"true\"\n [hideCancelButton]=\"true\"\n ></se-form>\n </div>\n</div>\n",
|
|
8921
8924
|
styles: [":host ::ng-deep .custom-card .action-buttons{visibility:hidden}:host ::ng-deep .custom-card .image-wrapper:hover .action-buttons{visibility:visible}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:hover .header-icons{opacity:1}.card-active{transform:scale(1.1);transition:all .2s linear;z-index:999}\n"]
|
|
8922
8925
|
},] }
|
|
8923
8926
|
];
|