@sd-angular/core 1.1.32 → 1.1.35
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/sd-angular-core-grid-material.umd.js +36 -10
- package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
- package/esm2015/grid-material/src/lib/pipes/editor-handler-column.pipe.js +3 -7
- package/esm2015/grid-material/src/lib/pipes/editor-handler-row.pipe.js +23 -2
- package/fesm2015/sd-angular-core-grid-material.js +27 -10
- package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
- package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
- package/grid-material/src/lib/pipes/editor-handler-row.pipe.d.ts +1 -0
- package/package.json +1 -1
- package/{sd-angular-core-1.1.32.tgz → sd-angular-core-1.1.35.tgz} +0 -0
|
@@ -3980,10 +3980,25 @@
|
|
|
3980
3980
|
item: [{ type: core.Input }]
|
|
3981
3981
|
};
|
|
3982
3982
|
|
|
3983
|
+
var _visible;
|
|
3983
3984
|
var SdEditorHandlerRowPipe = /** @class */ (function () {
|
|
3984
3985
|
function SdEditorHandlerRowPipe() {
|
|
3986
|
+
_visible.set(this, function (col, item) {
|
|
3987
|
+
if (col.type === 'children' || col.type === 'children-col') {
|
|
3988
|
+
return false;
|
|
3989
|
+
}
|
|
3990
|
+
// Kiểm tra xem có bị disabled hay không?
|
|
3991
|
+
if (col.editor) {
|
|
3992
|
+
var isDisabled = typeof (col.editor.disabled) === 'function' ? col.editor.disabled(item) : col.editor.disabled;
|
|
3993
|
+
if (isDisabled) {
|
|
3994
|
+
return false;
|
|
3995
|
+
}
|
|
3996
|
+
}
|
|
3997
|
+
return true;
|
|
3998
|
+
});
|
|
3985
3999
|
}
|
|
3986
4000
|
SdEditorHandlerRowPipe.prototype.transform = function (status, item, gridOption) {
|
|
4001
|
+
var e_1, _a;
|
|
3987
4002
|
var editor = gridOption.editor;
|
|
3988
4003
|
if (!editor) {
|
|
3989
4004
|
return null;
|
|
@@ -4014,20 +4029,35 @@
|
|
|
4014
4029
|
// const { sdId, editorHandlerColumn, ...remain } = item;
|
|
4015
4030
|
var sdId = item.sdId, editorHandlerColumn = item.editorHandlerColumn, expandDetail = item.expandDetail, isExpanded = item.isExpanded, isExpanding = item.isExpanding, isSelected = item.isSelected, sdGroup = item.sdGroup, selectable = item.selectable, actions = item.actions, editorHandlerRow = item.editorHandlerRow, groupedActions = item.groupedActions, originItem = item.originItem, editorErrorMessage = item.editorErrorMessage, remain = __rest(item, ["sdId", "editorHandlerColumn", "expandDetail", "isExpanded", "isExpanding", "isSelected", "sdGroup", "selectable", "actions", "editorHandlerRow", "groupedActions", "originItem", "editorErrorMessage"]);
|
|
4016
4031
|
item.sdId = hash__default['default'](remain);
|
|
4032
|
+
var columns = gridOption.columns;
|
|
4033
|
+
try {
|
|
4034
|
+
for (var columns_1 = __values(columns), columns_1_1 = columns_1.next(); !columns_1_1.done; columns_1_1 = columns_1.next()) {
|
|
4035
|
+
var col = columns_1_1.value;
|
|
4036
|
+
item.editorHandlerColumn[col.field] = Object.assign(Object.assign({}, item.editorHandlerColumn[col.field]), { visible: __classPrivateFieldGet(this, _visible).call(this, col, item) });
|
|
4037
|
+
}
|
|
4038
|
+
}
|
|
4039
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
4040
|
+
finally {
|
|
4041
|
+
try {
|
|
4042
|
+
if (columns_1_1 && !columns_1_1.done && (_a = columns_1.return)) _a.call(columns_1);
|
|
4043
|
+
}
|
|
4044
|
+
finally { if (e_1) throw e_1.error; }
|
|
4045
|
+
}
|
|
4017
4046
|
return item.editorHandlerRow;
|
|
4018
4047
|
};
|
|
4019
4048
|
return SdEditorHandlerRowPipe;
|
|
4020
4049
|
}());
|
|
4050
|
+
_visible = new WeakMap();
|
|
4021
4051
|
SdEditorHandlerRowPipe.decorators = [
|
|
4022
4052
|
{ type: core.Pipe, args: [{
|
|
4023
4053
|
name: 'sdEditorHandlerRow'
|
|
4024
4054
|
},] }
|
|
4025
4055
|
];
|
|
4026
4056
|
|
|
4027
|
-
var _visible;
|
|
4057
|
+
var _visible$1;
|
|
4028
4058
|
var SdEditorHandlerColumnPipe = /** @class */ (function () {
|
|
4029
4059
|
function SdEditorHandlerColumnPipe() {
|
|
4030
|
-
_visible.set(this, function (col, item) {
|
|
4060
|
+
_visible$1.set(this, function (col, item) {
|
|
4031
4061
|
if (col.type === 'children' || col.type === 'children-col') {
|
|
4032
4062
|
return false;
|
|
4033
4063
|
}
|
|
@@ -4048,19 +4078,15 @@
|
|
|
4048
4078
|
}
|
|
4049
4079
|
var sdId = item.sdId, editorHandlerColumn = item.editorHandlerColumn, expandDetail = item.expandDetail, isExpanded = item.isExpanded, isExpanding = item.isExpanding, isSelected = item.isSelected, sdGroup = item.sdGroup, selectable = item.selectable, actions = item.actions, editorHandlerRow = item.editorHandlerRow, groupedActions = item.groupedActions, originItem = item.originItem, editorErrorMessage = item.editorErrorMessage, remain = __rest(item, ["sdId", "editorHandlerColumn", "expandDetail", "isExpanded", "isExpanding", "isSelected", "sdGroup", "selectable", "actions", "editorHandlerRow", "groupedActions", "originItem", "editorErrorMessage"]);
|
|
4050
4080
|
var key = hash__default['default'](remain);
|
|
4051
|
-
if (item.sdId ===
|
|
4081
|
+
if (item.sdId === key && item.editorHandlerColumn) {
|
|
4052
4082
|
return;
|
|
4053
4083
|
}
|
|
4054
4084
|
item.editorHandlerColumn = item.editorHandlerColumn || {};
|
|
4055
|
-
// item.editorHandlerColumn[column.field] = {
|
|
4056
|
-
// ...item.editorHandlerColumn[column.field],
|
|
4057
|
-
// visible: this.#visible(column, item)
|
|
4058
|
-
// }
|
|
4059
4085
|
var columns = gridOption.columns;
|
|
4060
4086
|
try {
|
|
4061
4087
|
for (var columns_1 = __values(columns), columns_1_1 = columns_1.next(); !columns_1_1.done; columns_1_1 = columns_1.next()) {
|
|
4062
4088
|
var col = columns_1_1.value;
|
|
4063
|
-
item.editorHandlerColumn[col.field] = Object.assign(Object.assign({}, item.editorHandlerColumn[col.field]), { visible: __classPrivateFieldGet(this, _visible).call(this, col, item) });
|
|
4089
|
+
item.editorHandlerColumn[col.field] = Object.assign(Object.assign({}, item.editorHandlerColumn[col.field]), { visible: __classPrivateFieldGet(this, _visible$1).call(this, col, item) });
|
|
4064
4090
|
}
|
|
4065
4091
|
}
|
|
4066
4092
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -4086,12 +4112,12 @@
|
|
|
4086
4112
|
// originItem,
|
|
4087
4113
|
// editorErrorMessage,
|
|
4088
4114
|
// ...remain } = item;
|
|
4089
|
-
item.sdId =
|
|
4115
|
+
item.sdId = key;
|
|
4090
4116
|
return true;
|
|
4091
4117
|
};
|
|
4092
4118
|
return SdEditorHandlerColumnPipe;
|
|
4093
4119
|
}());
|
|
4094
|
-
_visible = new WeakMap();
|
|
4120
|
+
_visible$1 = new WeakMap();
|
|
4095
4121
|
SdEditorHandlerColumnPipe.decorators = [
|
|
4096
4122
|
{ type: core.Pipe, args: [{
|
|
4097
4123
|
name: 'sdEditorHandlerColumn'
|