@sd-angular/core 1.1.33 → 1.1.36
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 +38 -11
- package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js +2 -2
- 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 +25 -3
- package/fesm2015/sd-angular-core-grid-material.js +29 -11
- 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.33.tgz → sd-angular-core-1.1.36.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;
|
|
@@ -4012,22 +4027,38 @@
|
|
|
4012
4027
|
item.editorHandlerRow = Object.assign(Object.assign({}, item.editorHandlerRow), { visible: false, editable: !status, removable: false, savable: false, cancelable: false });
|
|
4013
4028
|
}
|
|
4014
4029
|
// const { sdId, editorHandlerColumn, ...remain } = item;
|
|
4015
|
-
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,
|
|
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, groupedActions = item.groupedActions, originItem = item.originItem, editorErrorMessage = item.editorErrorMessage, remain = __rest(item, ["sdId", "editorHandlerColumn", "expandDetail", "isExpanded", "isExpanding", "isSelected", "sdGroup", "selectable", "actions", "groupedActions", "originItem", "editorErrorMessage"]);
|
|
4016
4031
|
item.sdId = hash__default['default'](remain);
|
|
4032
|
+
item.editorHandlerColumn = item.editorHandlerColumn || {};
|
|
4033
|
+
var columns = gridOption.columns;
|
|
4034
|
+
try {
|
|
4035
|
+
for (var columns_1 = __values(columns), columns_1_1 = columns_1.next(); !columns_1_1.done; columns_1_1 = columns_1.next()) {
|
|
4036
|
+
var col = columns_1_1.value;
|
|
4037
|
+
item.editorHandlerColumn[col.field] = Object.assign(Object.assign({}, item.editorHandlerColumn[col.field]), { visible: __classPrivateFieldGet(this, _visible).call(this, col, item) });
|
|
4038
|
+
}
|
|
4039
|
+
}
|
|
4040
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
4041
|
+
finally {
|
|
4042
|
+
try {
|
|
4043
|
+
if (columns_1_1 && !columns_1_1.done && (_a = columns_1.return)) _a.call(columns_1);
|
|
4044
|
+
}
|
|
4045
|
+
finally { if (e_1) throw e_1.error; }
|
|
4046
|
+
}
|
|
4017
4047
|
return item.editorHandlerRow;
|
|
4018
4048
|
};
|
|
4019
4049
|
return SdEditorHandlerRowPipe;
|
|
4020
4050
|
}());
|
|
4051
|
+
_visible = new WeakMap();
|
|
4021
4052
|
SdEditorHandlerRowPipe.decorators = [
|
|
4022
4053
|
{ type: core.Pipe, args: [{
|
|
4023
4054
|
name: 'sdEditorHandlerRow'
|
|
4024
4055
|
},] }
|
|
4025
4056
|
];
|
|
4026
4057
|
|
|
4027
|
-
var _visible;
|
|
4058
|
+
var _visible$1;
|
|
4028
4059
|
var SdEditorHandlerColumnPipe = /** @class */ (function () {
|
|
4029
4060
|
function SdEditorHandlerColumnPipe() {
|
|
4030
|
-
_visible.set(this, function (col, item) {
|
|
4061
|
+
_visible$1.set(this, function (col, item) {
|
|
4031
4062
|
if (col.type === 'children' || col.type === 'children-col') {
|
|
4032
4063
|
return false;
|
|
4033
4064
|
}
|
|
@@ -4046,21 +4077,17 @@
|
|
|
4046
4077
|
if (column.type === 'children' || column.type === 'children-col') {
|
|
4047
4078
|
return;
|
|
4048
4079
|
}
|
|
4049
|
-
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,
|
|
4080
|
+
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, groupedActions = item.groupedActions, originItem = item.originItem, editorErrorMessage = item.editorErrorMessage, remain = __rest(item, ["sdId", "editorHandlerColumn", "expandDetail", "isExpanded", "isExpanding", "isSelected", "sdGroup", "selectable", "actions", "groupedActions", "originItem", "editorErrorMessage"]);
|
|
4050
4081
|
var key = hash__default['default'](remain);
|
|
4051
|
-
if (item.sdId === key) {
|
|
4082
|
+
if (item.sdId === key && item.editorHandlerColumn) {
|
|
4052
4083
|
return;
|
|
4053
4084
|
}
|
|
4054
4085
|
item.editorHandlerColumn = item.editorHandlerColumn || {};
|
|
4055
|
-
// item.editorHandlerColumn[column.field] = {
|
|
4056
|
-
// ...item.editorHandlerColumn[column.field],
|
|
4057
|
-
// visible: this.#visible(column, item)
|
|
4058
|
-
// }
|
|
4059
4086
|
var columns = gridOption.columns;
|
|
4060
4087
|
try {
|
|
4061
4088
|
for (var columns_1 = __values(columns), columns_1_1 = columns_1.next(); !columns_1_1.done; columns_1_1 = columns_1.next()) {
|
|
4062
4089
|
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) });
|
|
4090
|
+
item.editorHandlerColumn[col.field] = Object.assign(Object.assign({}, item.editorHandlerColumn[col.field]), { visible: __classPrivateFieldGet(this, _visible$1).call(this, col, item) });
|
|
4064
4091
|
}
|
|
4065
4092
|
}
|
|
4066
4093
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -4091,7 +4118,7 @@
|
|
|
4091
4118
|
};
|
|
4092
4119
|
return SdEditorHandlerColumnPipe;
|
|
4093
4120
|
}());
|
|
4094
|
-
_visible = new WeakMap();
|
|
4121
|
+
_visible$1 = new WeakMap();
|
|
4095
4122
|
SdEditorHandlerColumnPipe.decorators = [
|
|
4096
4123
|
{ type: core.Pipe, args: [{
|
|
4097
4124
|
name: 'sdEditorHandlerColumn'
|