handsontable 0.0.0-next-b66c79f-20230713 → 0.0.0-next-85c3085-20230713
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/cell/coords.js +37 -22
- package/3rdparty/walkontable/src/cell/coords.mjs +37 -22
- package/3rdparty/walkontable/src/cell/range.js +54 -39
- package/3rdparty/walkontable/src/cell/range.mjs +54 -39
- package/3rdparty/walkontable/src/core/_base.js +33 -31
- package/3rdparty/walkontable/src/core/_base.mjs +33 -31
- package/3rdparty/walkontable/src/core/clone.js +6 -3
- package/3rdparty/walkontable/src/core/clone.mjs +6 -3
- package/3rdparty/walkontable/src/event.js +2 -1
- package/3rdparty/walkontable/src/event.mjs +2 -1
- package/3rdparty/walkontable/src/overlay/_base.js +10 -8
- package/3rdparty/walkontable/src/overlay/_base.mjs +10 -8
- package/3rdparty/walkontable/src/overlay/bottom.js +10 -8
- package/3rdparty/walkontable/src/overlay/bottom.mjs +10 -8
- package/3rdparty/walkontable/src/overlay/inlineStart.js +1 -1
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/top.js +11 -9
- package/3rdparty/walkontable/src/overlay/top.mjs +11 -9
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +16 -13
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +16 -13
- package/3rdparty/walkontable/src/overlays.js +75 -80
- package/3rdparty/walkontable/src/overlays.mjs +75 -80
- package/3rdparty/walkontable/src/scroll.js +27 -24
- package/3rdparty/walkontable/src/scroll.mjs +27 -24
- package/3rdparty/walkontable/src/settings.js +18 -17
- package/3rdparty/walkontable/src/settings.mjs +18 -17
- package/3rdparty/walkontable/src/table.js +42 -37
- package/3rdparty/walkontable/src/table.mjs +42 -37
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.js +8 -8
- package/core.mjs +8 -8
- package/dataMap/metaManager/metaLayers/cellMeta.js +2 -1
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -1
- package/dataMap/metaManager/metaLayers/globalMeta.js +1 -1
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +1 -1
- package/dataMap/metaManager/mods/dynamicCellMeta.js +3 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +3 -2
- package/dataMap/metaManager/utils.js +4 -2
- package/dataMap/metaManager/utils.mjs +4 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +3247 -2847
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +17 -17
- package/dist/handsontable.js +3249 -2849
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +17 -17
- package/editors/autocompleteEditor/autocompleteEditor.js +70 -67
- package/editors/autocompleteEditor/autocompleteEditor.mjs +70 -67
- package/editors/baseEditor/baseEditor.js +1 -1
- package/editors/baseEditor/baseEditor.mjs +1 -1
- package/editors/dateEditor/dateEditor.js +2 -1
- package/editors/dateEditor/dateEditor.mjs +2 -1
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/object.js +1 -0
- package/helpers/object.mjs +1 -0
- package/index.js +5 -5
- package/index.mjs +5 -5
- package/package.json +1 -1
- package/plugins/autoColumnSize/autoColumnSize.js +4 -1
- package/plugins/autoColumnSize/autoColumnSize.mjs +4 -1
- package/plugins/collapsibleColumns/collapsibleColumns.js +54 -38
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +54 -38
- package/plugins/columnSorting/columnSorting.js +2 -1
- package/plugins/columnSorting/columnSorting.mjs +2 -1
- package/plugins/columnSorting/columnStatesManager.js +2 -1
- package/plugins/columnSorting/columnStatesManager.mjs +2 -1
- package/plugins/comments/comments.js +2 -2
- package/plugins/comments/comments.mjs +2 -2
- package/plugins/copyPaste/copyPaste.js +6 -4
- package/plugins/copyPaste/copyPaste.mjs +6 -4
- package/plugins/customBorders/customBorders.js +13 -9
- package/plugins/customBorders/customBorders.mjs +13 -9
- package/plugins/customBorders/utils.js +3 -3
- package/plugins/customBorders/utils.mjs +3 -3
- package/plugins/filters/conditionCollection.js +6 -5
- package/plugins/filters/conditionCollection.mjs +6 -5
- package/plugins/filters/filters.js +13 -7
- package/plugins/filters/filters.mjs +13 -7
- package/plugins/formulas/engine/register.js +3 -3
- package/plugins/formulas/engine/register.mjs +3 -3
- package/plugins/formulas/engine/settings.js +6 -3
- package/plugins/formulas/engine/settings.mjs +6 -3
- package/plugins/formulas/formulas.js +151 -143
- package/plugins/formulas/formulas.mjs +151 -143
- package/plugins/formulas/indexSyncer/axisSyncer.js +115 -79
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +115 -79
- package/plugins/formulas/indexSyncer/index.js +100 -64
- package/plugins/formulas/indexSyncer/index.mjs +100 -64
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +2 -2
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +2 -2
- package/plugins/hiddenColumns/hiddenColumns.js +51 -34
- package/plugins/hiddenColumns/hiddenColumns.mjs +51 -34
- package/plugins/hiddenRows/contextMenuItem/showRow.js +2 -2
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +2 -2
- package/plugins/hiddenRows/hiddenRows.js +50 -33
- package/plugins/hiddenRows/hiddenRows.mjs +50 -33
- package/plugins/manualRowResize/manualRowResize.js +2 -1
- package/plugins/manualRowResize/manualRowResize.mjs +2 -1
- package/plugins/mergeCells/mergeCells.js +1 -1
- package/plugins/mergeCells/mergeCells.mjs +1 -1
- package/plugins/nestedHeaders/nestedHeaders.js +88 -67
- package/plugins/nestedHeaders/nestedHeaders.mjs +87 -66
- package/plugins/nestedHeaders/stateManager/headersTree.js +58 -38
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +58 -38
- package/plugins/nestedHeaders/stateManager/index.js +70 -49
- package/plugins/nestedHeaders/stateManager/index.mjs +68 -47
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.js +1 -1
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +1 -1
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +57 -37
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +57 -37
- package/plugins/nestedHeaders/utils/ghostTable.js +39 -35
- package/plugins/nestedHeaders/utils/ghostTable.mjs +39 -35
- package/plugins/nestedRows/data/dataManager.js +4 -2
- package/plugins/nestedRows/data/dataManager.mjs +4 -2
- package/plugins/persistentState/storage.js +1 -0
- package/plugins/persistentState/storage.mjs +1 -0
- package/plugins/undoRedo/undoRedo.js +2 -1
- package/plugins/undoRedo/undoRedo.mjs +2 -1
- package/selection/highlight/visualSelection.js +10 -6
- package/selection/highlight/visualSelection.mjs +10 -6
- package/tableView.js +98 -80
- package/tableView.mjs +98 -80
- package/translations/changesObservable/observable.js +82 -54
- package/translations/changesObservable/observable.mjs +82 -54
- package/translations/changesObservable/observer.js +24 -11
- package/translations/changesObservable/observer.mjs +24 -11
- package/translations/maps/linkedPhysicalIndexToValueMap.js +14 -8
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +14 -8
- package/utils/dataStructures/tree.js +21 -18
- package/utils/dataStructures/tree.mjs +21 -18
@@ -11,6 +11,16 @@ var _element = require("../../helpers/dom/element");
|
|
11
11
|
var _eventManager = _interopRequireDefault(require("../../eventManager"));
|
12
12
|
var _event = require("../../helpers/dom/event");
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
15
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
16
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
18
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
19
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
20
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
21
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
22
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
23
|
+
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
14
24
|
const PLUGIN_KEY = 'collapsibleColumns';
|
15
25
|
exports.PLUGIN_KEY = PLUGIN_KEY;
|
16
26
|
const PLUGIN_PRIORITY = 290;
|
@@ -98,7 +108,42 @@ const actionDictionary = new Map([['collapse', {
|
|
98
108
|
* ```
|
99
109
|
* :::
|
100
110
|
*/
|
111
|
+
var _collapsedColumnsMap = /*#__PURE__*/new WeakMap();
|
101
112
|
class CollapsibleColumns extends _base.BasePlugin {
|
113
|
+
constructor() {
|
114
|
+
super(...arguments);
|
115
|
+
/**
|
116
|
+
* Cached reference to the NestedHeaders plugin.
|
117
|
+
*
|
118
|
+
* @private
|
119
|
+
* @type {NestedHeaders}
|
120
|
+
*/
|
121
|
+
_defineProperty(this, "nestedHeadersPlugin", null);
|
122
|
+
/**
|
123
|
+
* Event manager instance reference.
|
124
|
+
*
|
125
|
+
* @private
|
126
|
+
* @type {EventManager}
|
127
|
+
*/
|
128
|
+
_defineProperty(this, "eventManager", new _eventManager.default(this));
|
129
|
+
/**
|
130
|
+
* The NestedHeaders plugin StateManager instance.
|
131
|
+
*
|
132
|
+
* @private
|
133
|
+
* @type {StateManager}
|
134
|
+
*/
|
135
|
+
_defineProperty(this, "headerStateManager", null);
|
136
|
+
/**
|
137
|
+
* Map of collapsed columns by the plugin.
|
138
|
+
*
|
139
|
+
* @private
|
140
|
+
* @type {HidingMap|null}
|
141
|
+
*/
|
142
|
+
_classPrivateFieldInitSpec(this, _collapsedColumnsMap, {
|
143
|
+
writable: true,
|
144
|
+
value: null
|
145
|
+
});
|
146
|
+
}
|
102
147
|
static get PLUGIN_KEY() {
|
103
148
|
return PLUGIN_KEY;
|
104
149
|
}
|
@@ -111,36 +156,6 @@ class CollapsibleColumns extends _base.BasePlugin {
|
|
111
156
|
static get SETTING_KEYS() {
|
112
157
|
return [PLUGIN_KEY, ...SETTING_KEYS];
|
113
158
|
}
|
114
|
-
|
115
|
-
/**
|
116
|
-
* Cached reference to the NestedHeaders plugin.
|
117
|
-
*
|
118
|
-
* @private
|
119
|
-
* @type {NestedHeaders}
|
120
|
-
*/
|
121
|
-
nestedHeadersPlugin = null;
|
122
|
-
/**
|
123
|
-
* Event manager instance reference.
|
124
|
-
*
|
125
|
-
* @private
|
126
|
-
* @type {EventManager}
|
127
|
-
*/
|
128
|
-
eventManager = new _eventManager.default(this);
|
129
|
-
/**
|
130
|
-
* The NestedHeaders plugin StateManager instance.
|
131
|
-
*
|
132
|
-
* @private
|
133
|
-
* @type {StateManager}
|
134
|
-
*/
|
135
|
-
headerStateManager = null;
|
136
|
-
/**
|
137
|
-
* Map of collapsed columns by the plugin.
|
138
|
-
*
|
139
|
-
* @private
|
140
|
-
* @type {HidingMap|null}
|
141
|
-
*/
|
142
|
-
#collapsedColumnsMap = null;
|
143
|
-
|
144
159
|
/**
|
145
160
|
* Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}
|
146
161
|
* hook and if it returns `true` then the {@link CollapsibleColumns#enablePlugin} method is called.
|
@@ -165,7 +180,7 @@ class CollapsibleColumns extends _base.BasePlugin {
|
|
165
180
|
if (!nestedHeaders) {
|
166
181
|
(0, _console.warn)('You need to configure the Nested Headers plugin in order to use collapsible headers.');
|
167
182
|
}
|
168
|
-
this
|
183
|
+
_classPrivateFieldSet(this, _collapsedColumnsMap, this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName, 'hiding'));
|
169
184
|
this.nestedHeadersPlugin = this.hot.getPlugin('nestedHeaders');
|
170
185
|
this.headerStateManager = this.nestedHeadersPlugin.getStateManager();
|
171
186
|
this.addHook('init', () => this.onInit());
|
@@ -221,7 +236,7 @@ class CollapsibleColumns extends _base.BasePlugin {
|
|
221
236
|
*/
|
222
237
|
disablePlugin() {
|
223
238
|
this.hot.columnIndexMapper.unregisterMap(this.pluginName);
|
224
|
-
this
|
239
|
+
_classPrivateFieldSet(this, _collapsedColumnsMap, null);
|
225
240
|
this.nestedHeadersPlugin = null;
|
226
241
|
this.clearButtons();
|
227
242
|
super.disablePlugin();
|
@@ -355,7 +370,7 @@ class CollapsibleColumns extends _base.BasePlugin {
|
|
355
370
|
const {
|
356
371
|
collapsible,
|
357
372
|
isCollapsed
|
358
|
-
} = (_this$headerStateMana = this.headerStateManager.getHeaderSettings(row, column))
|
373
|
+
} = (_this$headerStateMana = this.headerStateManager.getHeaderSettings(row, column)) !== null && _this$headerStateMana !== void 0 ? _this$headerStateMana : {};
|
359
374
|
if (!collapsible || isCollapsed && action === 'collapse' || !isCollapsed && action === 'expand') {
|
360
375
|
isActionPossible = false;
|
361
376
|
return false;
|
@@ -398,7 +413,7 @@ class CollapsibleColumns extends _base.BasePlugin {
|
|
398
413
|
}
|
399
414
|
this.hot.batchExecution(() => {
|
400
415
|
(0, _array.arrayEach)(affectedColumnsIndexes, visualColumn => {
|
401
|
-
this
|
416
|
+
_classPrivateFieldGet(this, _collapsedColumnsMap).setValueAtIndex(this.hot.toPhysicalColumn(visualColumn), actionTranslator.hideColumn);
|
402
417
|
});
|
403
418
|
}, true);
|
404
419
|
const isActionPerformed = this.getCollapsedColumns().length !== currentCollapsedColumns.length;
|
@@ -414,7 +429,7 @@ class CollapsibleColumns extends _base.BasePlugin {
|
|
414
429
|
* @returns {number[]}
|
415
430
|
*/
|
416
431
|
getCollapsedColumns() {
|
417
|
-
return this
|
432
|
+
return _classPrivateFieldGet(this, _collapsedColumnsMap).getHiddenIndexes();
|
418
433
|
}
|
419
434
|
|
420
435
|
/**
|
@@ -432,7 +447,7 @@ class CollapsibleColumns extends _base.BasePlugin {
|
|
432
447
|
collapsible,
|
433
448
|
origColspan,
|
434
449
|
isCollapsed
|
435
|
-
} = (_this$headerStateMana2 = this.headerStateManager.getHeaderSettings(headerLevel, column))
|
450
|
+
} = (_this$headerStateMana2 = this.headerStateManager.getHeaderSettings(headerLevel, column)) !== null && _this$headerStateMana2 !== void 0 ? _this$headerStateMana2 : {};
|
436
451
|
const isNodeCollapsible = collapsible && origColspan > 1 && column >= this.hot.getSettings().fixedColumnsStart;
|
437
452
|
let collapsibleElement = TH.querySelector(`.${COLLAPSIBLE_ELEMENT_CLASS}`);
|
438
453
|
if (isNodeCollapsible) {
|
@@ -450,7 +465,8 @@ class CollapsibleColumns extends _base.BasePlugin {
|
|
450
465
|
(0, _element.fastInnerText)(collapsibleElement, '-');
|
451
466
|
}
|
452
467
|
} else {
|
453
|
-
|
468
|
+
var _collapsibleElement;
|
469
|
+
(_collapsibleElement = collapsibleElement) === null || _collapsibleElement === void 0 ? void 0 : _collapsibleElement.remove();
|
454
470
|
}
|
455
471
|
}
|
456
472
|
|
@@ -502,7 +518,7 @@ class CollapsibleColumns extends _base.BasePlugin {
|
|
502
518
|
* Destroys the plugin instance.
|
503
519
|
*/
|
504
520
|
destroy() {
|
505
|
-
this
|
521
|
+
_classPrivateFieldSet(this, _collapsedColumnsMap, null);
|
506
522
|
super.destroy();
|
507
523
|
}
|
508
524
|
}
|
@@ -1,5 +1,15 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
2
|
import "core-js/modules/es.array.push.js";
|
3
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
4
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
7
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
8
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
9
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
10
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
11
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
12
|
+
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
3
13
|
import { BasePlugin } from "../base/index.mjs";
|
4
14
|
import { arrayEach, arrayFilter, arrayUnique } from "../../helpers/array.mjs";
|
5
15
|
import { rangeEach } from "../../helpers/number.mjs";
|
@@ -92,7 +102,42 @@ const actionDictionary = new Map([['collapse', {
|
|
92
102
|
* ```
|
93
103
|
* :::
|
94
104
|
*/
|
105
|
+
var _collapsedColumnsMap = /*#__PURE__*/new WeakMap();
|
95
106
|
export class CollapsibleColumns extends BasePlugin {
|
107
|
+
constructor() {
|
108
|
+
super(...arguments);
|
109
|
+
/**
|
110
|
+
* Cached reference to the NestedHeaders plugin.
|
111
|
+
*
|
112
|
+
* @private
|
113
|
+
* @type {NestedHeaders}
|
114
|
+
*/
|
115
|
+
_defineProperty(this, "nestedHeadersPlugin", null);
|
116
|
+
/**
|
117
|
+
* Event manager instance reference.
|
118
|
+
*
|
119
|
+
* @private
|
120
|
+
* @type {EventManager}
|
121
|
+
*/
|
122
|
+
_defineProperty(this, "eventManager", new EventManager(this));
|
123
|
+
/**
|
124
|
+
* The NestedHeaders plugin StateManager instance.
|
125
|
+
*
|
126
|
+
* @private
|
127
|
+
* @type {StateManager}
|
128
|
+
*/
|
129
|
+
_defineProperty(this, "headerStateManager", null);
|
130
|
+
/**
|
131
|
+
* Map of collapsed columns by the plugin.
|
132
|
+
*
|
133
|
+
* @private
|
134
|
+
* @type {HidingMap|null}
|
135
|
+
*/
|
136
|
+
_classPrivateFieldInitSpec(this, _collapsedColumnsMap, {
|
137
|
+
writable: true,
|
138
|
+
value: null
|
139
|
+
});
|
140
|
+
}
|
96
141
|
static get PLUGIN_KEY() {
|
97
142
|
return PLUGIN_KEY;
|
98
143
|
}
|
@@ -105,36 +150,6 @@ export class CollapsibleColumns extends BasePlugin {
|
|
105
150
|
static get SETTING_KEYS() {
|
106
151
|
return [PLUGIN_KEY, ...SETTING_KEYS];
|
107
152
|
}
|
108
|
-
|
109
|
-
/**
|
110
|
-
* Cached reference to the NestedHeaders plugin.
|
111
|
-
*
|
112
|
-
* @private
|
113
|
-
* @type {NestedHeaders}
|
114
|
-
*/
|
115
|
-
nestedHeadersPlugin = null;
|
116
|
-
/**
|
117
|
-
* Event manager instance reference.
|
118
|
-
*
|
119
|
-
* @private
|
120
|
-
* @type {EventManager}
|
121
|
-
*/
|
122
|
-
eventManager = new EventManager(this);
|
123
|
-
/**
|
124
|
-
* The NestedHeaders plugin StateManager instance.
|
125
|
-
*
|
126
|
-
* @private
|
127
|
-
* @type {StateManager}
|
128
|
-
*/
|
129
|
-
headerStateManager = null;
|
130
|
-
/**
|
131
|
-
* Map of collapsed columns by the plugin.
|
132
|
-
*
|
133
|
-
* @private
|
134
|
-
* @type {HidingMap|null}
|
135
|
-
*/
|
136
|
-
#collapsedColumnsMap = null;
|
137
|
-
|
138
153
|
/**
|
139
154
|
* Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}
|
140
155
|
* hook and if it returns `true` then the {@link CollapsibleColumns#enablePlugin} method is called.
|
@@ -159,7 +174,7 @@ export class CollapsibleColumns extends BasePlugin {
|
|
159
174
|
if (!nestedHeaders) {
|
160
175
|
warn('You need to configure the Nested Headers plugin in order to use collapsible headers.');
|
161
176
|
}
|
162
|
-
this
|
177
|
+
_classPrivateFieldSet(this, _collapsedColumnsMap, this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName, 'hiding'));
|
163
178
|
this.nestedHeadersPlugin = this.hot.getPlugin('nestedHeaders');
|
164
179
|
this.headerStateManager = this.nestedHeadersPlugin.getStateManager();
|
165
180
|
this.addHook('init', () => this.onInit());
|
@@ -215,7 +230,7 @@ export class CollapsibleColumns extends BasePlugin {
|
|
215
230
|
*/
|
216
231
|
disablePlugin() {
|
217
232
|
this.hot.columnIndexMapper.unregisterMap(this.pluginName);
|
218
|
-
this
|
233
|
+
_classPrivateFieldSet(this, _collapsedColumnsMap, null);
|
219
234
|
this.nestedHeadersPlugin = null;
|
220
235
|
this.clearButtons();
|
221
236
|
super.disablePlugin();
|
@@ -349,7 +364,7 @@ export class CollapsibleColumns extends BasePlugin {
|
|
349
364
|
const {
|
350
365
|
collapsible,
|
351
366
|
isCollapsed
|
352
|
-
} = (_this$headerStateMana = this.headerStateManager.getHeaderSettings(row, column))
|
367
|
+
} = (_this$headerStateMana = this.headerStateManager.getHeaderSettings(row, column)) !== null && _this$headerStateMana !== void 0 ? _this$headerStateMana : {};
|
353
368
|
if (!collapsible || isCollapsed && action === 'collapse' || !isCollapsed && action === 'expand') {
|
354
369
|
isActionPossible = false;
|
355
370
|
return false;
|
@@ -392,7 +407,7 @@ export class CollapsibleColumns extends BasePlugin {
|
|
392
407
|
}
|
393
408
|
this.hot.batchExecution(() => {
|
394
409
|
arrayEach(affectedColumnsIndexes, visualColumn => {
|
395
|
-
this
|
410
|
+
_classPrivateFieldGet(this, _collapsedColumnsMap).setValueAtIndex(this.hot.toPhysicalColumn(visualColumn), actionTranslator.hideColumn);
|
396
411
|
});
|
397
412
|
}, true);
|
398
413
|
const isActionPerformed = this.getCollapsedColumns().length !== currentCollapsedColumns.length;
|
@@ -408,7 +423,7 @@ export class CollapsibleColumns extends BasePlugin {
|
|
408
423
|
* @returns {number[]}
|
409
424
|
*/
|
410
425
|
getCollapsedColumns() {
|
411
|
-
return this
|
426
|
+
return _classPrivateFieldGet(this, _collapsedColumnsMap).getHiddenIndexes();
|
412
427
|
}
|
413
428
|
|
414
429
|
/**
|
@@ -426,7 +441,7 @@ export class CollapsibleColumns extends BasePlugin {
|
|
426
441
|
collapsible,
|
427
442
|
origColspan,
|
428
443
|
isCollapsed
|
429
|
-
} = (_this$headerStateMana2 = this.headerStateManager.getHeaderSettings(headerLevel, column))
|
444
|
+
} = (_this$headerStateMana2 = this.headerStateManager.getHeaderSettings(headerLevel, column)) !== null && _this$headerStateMana2 !== void 0 ? _this$headerStateMana2 : {};
|
430
445
|
const isNodeCollapsible = collapsible && origColspan > 1 && column >= this.hot.getSettings().fixedColumnsStart;
|
431
446
|
let collapsibleElement = TH.querySelector(`.${COLLAPSIBLE_ELEMENT_CLASS}`);
|
432
447
|
if (isNodeCollapsible) {
|
@@ -444,7 +459,8 @@ export class CollapsibleColumns extends BasePlugin {
|
|
444
459
|
fastInnerText(collapsibleElement, '-');
|
445
460
|
}
|
446
461
|
} else {
|
447
|
-
|
462
|
+
var _collapsibleElement;
|
463
|
+
(_collapsibleElement = collapsibleElement) === null || _collapsibleElement === void 0 ? void 0 : _collapsibleElement.remove();
|
448
464
|
}
|
449
465
|
}
|
450
466
|
|
@@ -496,7 +512,7 @@ export class CollapsibleColumns extends BasePlugin {
|
|
496
512
|
* Destroys the plugin instance.
|
497
513
|
*/
|
498
514
|
destroy() {
|
499
|
-
this
|
515
|
+
_classPrivateFieldSet(this, _collapsedColumnsMap, null);
|
500
516
|
super.destroy();
|
501
517
|
}
|
502
518
|
}
|
@@ -717,9 +717,10 @@ class ColumnSorting extends _base.BasePlugin {
|
|
717
717
|
* Destroys the plugin instance.
|
718
718
|
*/
|
719
719
|
destroy() {
|
720
|
+
var _this$columnStatesMan;
|
720
721
|
// TODO: Probably not supported yet by ESLint: https://github.com/eslint/eslint/issues/11045
|
721
722
|
// eslint-disable-next-line no-unused-expressions
|
722
|
-
this.columnStatesManager
|
723
|
+
(_this$columnStatesMan = this.columnStatesManager) === null || _this$columnStatesMan === void 0 ? void 0 : _this$columnStatesMan.destroy();
|
723
724
|
super.destroy();
|
724
725
|
}
|
725
726
|
}
|
@@ -711,9 +711,10 @@ export class ColumnSorting extends BasePlugin {
|
|
711
711
|
* Destroys the plugin instance.
|
712
712
|
*/
|
713
713
|
destroy() {
|
714
|
+
var _this$columnStatesMan;
|
714
715
|
// TODO: Probably not supported yet by ESLint: https://github.com/eslint/eslint/issues/11045
|
715
716
|
// eslint-disable-next-line no-unused-expressions
|
716
|
-
this.columnStatesManager
|
717
|
+
(_this$columnStatesMan = this.columnStatesManager) === null || _this$columnStatesMan === void 0 ? void 0 : _this$columnStatesMan.destroy();
|
717
718
|
super.destroy();
|
718
719
|
}
|
719
720
|
}
|
@@ -102,7 +102,8 @@ class ColumnStatesManager {
|
|
102
102
|
* @returns {string|undefined} Sort order (`asc` for ascending, `desc` for descending and undefined for not sorted).
|
103
103
|
*/
|
104
104
|
getSortOrderOfColumn(searchedColumn) {
|
105
|
-
|
105
|
+
var _this$sortingStates$g;
|
106
|
+
return (_this$sortingStates$g = this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(searchedColumn))) === null || _this$sortingStates$g === void 0 ? void 0 : _this$sortingStates$g.sortOrder;
|
106
107
|
}
|
107
108
|
|
108
109
|
/**
|
@@ -99,7 +99,8 @@ export class ColumnStatesManager {
|
|
99
99
|
* @returns {string|undefined} Sort order (`asc` for ascending, `desc` for descending and undefined for not sorted).
|
100
100
|
*/
|
101
101
|
getSortOrderOfColumn(searchedColumn) {
|
102
|
-
|
102
|
+
var _this$sortingStates$g;
|
103
|
+
return (_this$sortingStates$g = this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(searchedColumn))) === null || _this$sortingStates$g === void 0 ? void 0 : _this$sortingStates$g.sortOrder;
|
103
104
|
}
|
104
105
|
|
105
106
|
/**
|
@@ -449,8 +449,8 @@ class Comments extends _base.BasePlugin {
|
|
449
449
|
}
|
450
450
|
const isBeforeRenderedRows = renderableRow === null;
|
451
451
|
const isBeforeRenderedColumns = renderableColumn === null;
|
452
|
-
renderableRow = (_renderableRow = renderableRow)
|
453
|
-
renderableColumn = (_renderableColumn = renderableColumn)
|
452
|
+
renderableRow = (_renderableRow = renderableRow) !== null && _renderableRow !== void 0 ? _renderableRow : 0;
|
453
|
+
renderableColumn = (_renderableColumn = renderableColumn) !== null && _renderableColumn !== void 0 ? _renderableColumn : 0;
|
454
454
|
const {
|
455
455
|
rootWindow,
|
456
456
|
view: {
|
@@ -441,8 +441,8 @@ export class Comments extends BasePlugin {
|
|
441
441
|
}
|
442
442
|
const isBeforeRenderedRows = renderableRow === null;
|
443
443
|
const isBeforeRenderedColumns = renderableColumn === null;
|
444
|
-
renderableRow = (_renderableRow = renderableRow)
|
445
|
-
renderableColumn = (_renderableColumn = renderableColumn)
|
444
|
+
renderableRow = (_renderableRow = renderableRow) !== null && _renderableRow !== void 0 ? _renderableRow : 0;
|
445
|
+
renderableColumn = (_renderableColumn = renderableColumn) !== null && _renderableColumn !== void 0 ? _renderableColumn : 0;
|
446
446
|
const {
|
447
447
|
rootWindow,
|
448
448
|
view: {
|
@@ -259,13 +259,13 @@ class CopyPaste extends _base.BasePlugin {
|
|
259
259
|
} = this.hot.getSettings();
|
260
260
|
if (typeof settings === 'object') {
|
261
261
|
var _settings$pasteMode, _settings$uiContainer;
|
262
|
-
this.pasteMode = (_settings$pasteMode = settings.pasteMode)
|
262
|
+
this.pasteMode = (_settings$pasteMode = settings.pasteMode) !== null && _settings$pasteMode !== void 0 ? _settings$pasteMode : this.pasteMode;
|
263
263
|
this.rowsLimit = isNaN(settings.rowsLimit) ? this.rowsLimit : settings.rowsLimit;
|
264
264
|
this.columnsLimit = isNaN(settings.columnsLimit) ? this.columnsLimit : settings.columnsLimit;
|
265
265
|
_classPrivateFieldSet(this, _enableCopyColumnHeaders, !!settings.copyColumnHeaders);
|
266
266
|
_classPrivateFieldSet(this, _enableCopyColumnGroupHeaders, !!settings.copyColumnGroupHeaders);
|
267
267
|
_classPrivateFieldSet(this, _enableCopyColumnHeadersOnly, !!settings.copyColumnHeadersOnly);
|
268
|
-
this.uiContainer = (_settings$uiContainer = settings.uiContainer)
|
268
|
+
this.uiContainer = (_settings$uiContainer = settings.uiContainer) !== null && _settings$uiContainer !== void 0 ? _settings$uiContainer : this.uiContainer;
|
269
269
|
}
|
270
270
|
this.addHook('afterContextMenuDefaultOptions', options => this.onAfterContextMenuDefaultOptions(options));
|
271
271
|
this.addHook('afterOnCellMouseUp', () => this.onAfterOnCellMouseUp());
|
@@ -476,7 +476,8 @@ class CopyPaste extends _base.BasePlugin {
|
|
476
476
|
* @private
|
477
477
|
*/
|
478
478
|
getOrCreateFocusableElement() {
|
479
|
-
|
479
|
+
var _this$hot$getActiveEd;
|
480
|
+
const editableElement = (_this$hot$getActiveEd = this.hot.getActiveEditor()) === null || _this$hot$getActiveEd === void 0 ? void 0 : _this$hot$getActiveEd.TEXTAREA;
|
480
481
|
if (editableElement) {
|
481
482
|
this.focusableElement.setFocusableElement(editableElement);
|
482
483
|
} else {
|
@@ -491,7 +492,8 @@ class CopyPaste extends _base.BasePlugin {
|
|
491
492
|
* @returns {boolean}
|
492
493
|
*/
|
493
494
|
isEditorOpened() {
|
494
|
-
|
495
|
+
var _this$hot$getActiveEd2;
|
496
|
+
return (_this$hot$getActiveEd2 = this.hot.getActiveEditor()) === null || _this$hot$getActiveEd2 === void 0 ? void 0 : _this$hot$getActiveEd2.isOpened();
|
495
497
|
}
|
496
498
|
/**
|
497
499
|
* Prepares new values to populate them into datasource.
|
@@ -253,13 +253,13 @@ export class CopyPaste extends BasePlugin {
|
|
253
253
|
} = this.hot.getSettings();
|
254
254
|
if (typeof settings === 'object') {
|
255
255
|
var _settings$pasteMode, _settings$uiContainer;
|
256
|
-
this.pasteMode = (_settings$pasteMode = settings.pasteMode)
|
256
|
+
this.pasteMode = (_settings$pasteMode = settings.pasteMode) !== null && _settings$pasteMode !== void 0 ? _settings$pasteMode : this.pasteMode;
|
257
257
|
this.rowsLimit = isNaN(settings.rowsLimit) ? this.rowsLimit : settings.rowsLimit;
|
258
258
|
this.columnsLimit = isNaN(settings.columnsLimit) ? this.columnsLimit : settings.columnsLimit;
|
259
259
|
_classPrivateFieldSet(this, _enableCopyColumnHeaders, !!settings.copyColumnHeaders);
|
260
260
|
_classPrivateFieldSet(this, _enableCopyColumnGroupHeaders, !!settings.copyColumnGroupHeaders);
|
261
261
|
_classPrivateFieldSet(this, _enableCopyColumnHeadersOnly, !!settings.copyColumnHeadersOnly);
|
262
|
-
this.uiContainer = (_settings$uiContainer = settings.uiContainer)
|
262
|
+
this.uiContainer = (_settings$uiContainer = settings.uiContainer) !== null && _settings$uiContainer !== void 0 ? _settings$uiContainer : this.uiContainer;
|
263
263
|
}
|
264
264
|
this.addHook('afterContextMenuDefaultOptions', options => this.onAfterContextMenuDefaultOptions(options));
|
265
265
|
this.addHook('afterOnCellMouseUp', () => this.onAfterOnCellMouseUp());
|
@@ -470,7 +470,8 @@ export class CopyPaste extends BasePlugin {
|
|
470
470
|
* @private
|
471
471
|
*/
|
472
472
|
getOrCreateFocusableElement() {
|
473
|
-
|
473
|
+
var _this$hot$getActiveEd;
|
474
|
+
const editableElement = (_this$hot$getActiveEd = this.hot.getActiveEditor()) === null || _this$hot$getActiveEd === void 0 ? void 0 : _this$hot$getActiveEd.TEXTAREA;
|
474
475
|
if (editableElement) {
|
475
476
|
this.focusableElement.setFocusableElement(editableElement);
|
476
477
|
} else {
|
@@ -485,7 +486,8 @@ export class CopyPaste extends BasePlugin {
|
|
485
486
|
* @returns {boolean}
|
486
487
|
*/
|
487
488
|
isEditorOpened() {
|
488
|
-
|
489
|
+
var _this$hot$getActiveEd2;
|
490
|
+
return (_this$hot$getActiveEd2 = this.hot.getActiveEditor()) === null || _this$hot$getActiveEd2 === void 0 ? void 0 : _this$hot$getActiveEd2.isOpened();
|
489
491
|
}
|
490
492
|
/**
|
491
493
|
* Prepares new values to populate them into datasource.
|
@@ -13,6 +13,9 @@ var _utils = require("./utils");
|
|
13
13
|
var _selection = require("../../selection");
|
14
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
15
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
16
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
18
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
16
19
|
const PLUGIN_KEY = 'customBorders';
|
17
20
|
exports.PLUGIN_KEY = PLUGIN_KEY;
|
18
21
|
const PLUGIN_PRIORITY = 90;
|
@@ -74,21 +77,22 @@ const PLUGIN_PRIORITY = 90;
|
|
74
77
|
*/
|
75
78
|
exports.PLUGIN_PRIORITY = PLUGIN_PRIORITY;
|
76
79
|
class CustomBorders extends _base.BasePlugin {
|
80
|
+
constructor() {
|
81
|
+
super(...arguments);
|
82
|
+
/**
|
83
|
+
* Saved borders.
|
84
|
+
*
|
85
|
+
* @private
|
86
|
+
* @type {Array}
|
87
|
+
*/
|
88
|
+
_defineProperty(this, "savedBorders", []);
|
89
|
+
}
|
77
90
|
static get PLUGIN_KEY() {
|
78
91
|
return PLUGIN_KEY;
|
79
92
|
}
|
80
93
|
static get PLUGIN_PRIORITY() {
|
81
94
|
return PLUGIN_PRIORITY;
|
82
95
|
}
|
83
|
-
|
84
|
-
/**
|
85
|
-
* Saved borders.
|
86
|
-
*
|
87
|
-
* @private
|
88
|
-
* @type {Array}
|
89
|
-
*/
|
90
|
-
savedBorders = [];
|
91
|
-
|
92
96
|
/**
|
93
97
|
* Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}
|
94
98
|
* hook and if it returns `true` then the {@link CustomBorders#enablePlugin} method is called.
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import "core-js/modules/es.array.push.js";
|
2
2
|
import "core-js/modules/es.error.cause.js";
|
3
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
4
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
5
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
3
6
|
import { BasePlugin } from "../base/index.mjs";
|
4
7
|
import { hasOwnProperty, objectEach, deepClone } from "../../helpers/object.mjs";
|
5
8
|
import { rangeEach } from "../../helpers/number.mjs";
|
@@ -67,21 +70,22 @@ export const PLUGIN_PRIORITY = 90;
|
|
67
70
|
* ```
|
68
71
|
*/
|
69
72
|
export class CustomBorders extends BasePlugin {
|
73
|
+
constructor() {
|
74
|
+
super(...arguments);
|
75
|
+
/**
|
76
|
+
* Saved borders.
|
77
|
+
*
|
78
|
+
* @private
|
79
|
+
* @type {Array}
|
80
|
+
*/
|
81
|
+
_defineProperty(this, "savedBorders", []);
|
82
|
+
}
|
70
83
|
static get PLUGIN_KEY() {
|
71
84
|
return PLUGIN_KEY;
|
72
85
|
}
|
73
86
|
static get PLUGIN_PRIORITY() {
|
74
87
|
return PLUGIN_PRIORITY;
|
75
88
|
}
|
76
|
-
|
77
|
-
/**
|
78
|
-
* Saved borders.
|
79
|
-
*
|
80
|
-
* @private
|
81
|
-
* @type {Array}
|
82
|
-
*/
|
83
|
-
savedBorders = [];
|
84
|
-
|
85
89
|
/**
|
86
90
|
* Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}
|
87
91
|
* hook and if it returns `true` then the {@link CustomBorders#enablePlugin} method is called.
|
@@ -74,11 +74,11 @@ function createDefaultHtBorder() {
|
|
74
74
|
function normalizeBorder(border) {
|
75
75
|
if ((0, _mixed.isDefined)(border.start) || (0, _mixed.isDefined)(border.left)) {
|
76
76
|
var _border$start;
|
77
|
-
border.start = (_border$start = border.start)
|
77
|
+
border.start = (_border$start = border.start) !== null && _border$start !== void 0 ? _border$start : border.left;
|
78
78
|
}
|
79
79
|
if ((0, _mixed.isDefined)(border.end) || (0, _mixed.isDefined)(border.right)) {
|
80
80
|
var _border$end;
|
81
|
-
border.end = (_border$end = border.end)
|
81
|
+
border.end = (_border$end = border.end) !== null && _border$end !== void 0 ? _border$end : border.right;
|
82
82
|
}
|
83
83
|
delete border.left;
|
84
84
|
delete border.right;
|
@@ -251,5 +251,5 @@ const physicalToInlinePropNames = new Map([['left', 'start'], ['right', 'end']])
|
|
251
251
|
*/
|
252
252
|
function toInlinePropName(propName) {
|
253
253
|
var _physicalToInlineProp;
|
254
|
-
return (_physicalToInlineProp = physicalToInlinePropNames.get(propName))
|
254
|
+
return (_physicalToInlineProp = physicalToInlinePropNames.get(propName)) !== null && _physicalToInlineProp !== void 0 ? _physicalToInlineProp : propName;
|
255
255
|
}
|
@@ -58,11 +58,11 @@ export function createDefaultHtBorder() {
|
|
58
58
|
export function normalizeBorder(border) {
|
59
59
|
if (isDefined(border.start) || isDefined(border.left)) {
|
60
60
|
var _border$start;
|
61
|
-
border.start = (_border$start = border.start)
|
61
|
+
border.start = (_border$start = border.start) !== null && _border$start !== void 0 ? _border$start : border.left;
|
62
62
|
}
|
63
63
|
if (isDefined(border.end) || isDefined(border.right)) {
|
64
64
|
var _border$end;
|
65
|
-
border.end = (_border$end = border.end)
|
65
|
+
border.end = (_border$end = border.end) !== null && _border$end !== void 0 ? _border$end : border.right;
|
66
66
|
}
|
67
67
|
delete border.left;
|
68
68
|
delete border.right;
|
@@ -235,5 +235,5 @@ const physicalToInlinePropNames = new Map([['left', 'start'], ['right', 'end']])
|
|
235
235
|
*/
|
236
236
|
export function toInlinePropName(propName) {
|
237
237
|
var _physicalToInlineProp;
|
238
|
-
return (_physicalToInlineProp = physicalToInlinePropNames.get(propName))
|
238
|
+
return (_physicalToInlineProp = physicalToInlinePropNames.get(propName)) !== null && _physicalToInlineProp !== void 0 ? _physicalToInlineProp : propName;
|
239
239
|
}
|
@@ -68,8 +68,8 @@ class ConditionCollection {
|
|
68
68
|
isMatch(value, column) {
|
69
69
|
var _stateForColumn$condi;
|
70
70
|
const stateForColumn = this.filteringStates.getValueAtIndex(column);
|
71
|
-
const conditions = (_stateForColumn$condi = stateForColumn
|
72
|
-
const operation = stateForColumn
|
71
|
+
const conditions = (_stateForColumn$condi = stateForColumn === null || stateForColumn === void 0 ? void 0 : stateForColumn.conditions) !== null && _stateForColumn$condi !== void 0 ? _stateForColumn$condi : [];
|
72
|
+
const operation = stateForColumn === null || stateForColumn === void 0 ? void 0 : stateForColumn.operation;
|
73
73
|
return this.isMatchInConditions(conditions, value, operation);
|
74
74
|
}
|
75
75
|
|
@@ -150,8 +150,8 @@ class ConditionCollection {
|
|
150
150
|
* @returns {Array} Returns conditions collection as an array.
|
151
151
|
*/
|
152
152
|
getConditions(column) {
|
153
|
-
var _this$filteringStates;
|
154
|
-
return (_this$filteringStates = this.filteringStates.getValueAtIndex(column)
|
153
|
+
var _this$filteringStates, _this$filteringStates2;
|
154
|
+
return (_this$filteringStates = (_this$filteringStates2 = this.filteringStates.getValueAtIndex(column)) === null || _this$filteringStates2 === void 0 ? void 0 : _this$filteringStates2.conditions) !== null && _this$filteringStates !== void 0 ? _this$filteringStates : [];
|
155
155
|
}
|
156
156
|
|
157
157
|
/**
|
@@ -161,7 +161,8 @@ class ConditionCollection {
|
|
161
161
|
* @returns {string|undefined}
|
162
162
|
*/
|
163
163
|
getOperation(column) {
|
164
|
-
|
164
|
+
var _this$filteringStates3;
|
165
|
+
return (_this$filteringStates3 = this.filteringStates.getValueAtIndex(column)) === null || _this$filteringStates3 === void 0 ? void 0 : _this$filteringStates3.operation;
|
165
166
|
}
|
166
167
|
|
167
168
|
/**
|