handsontable 0.0.0-next-6b121ec-20240916 → 0.0.0-next-fc45597-20240917

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/helpers/mixed.js CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
134
134
  function _injectProductInfo(key, element) {
135
135
  const hasValidType = !isEmpty(key);
136
136
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
137
- const hotVersion = "0.0.0-next-6b121ec-20240916";
137
+ const hotVersion = "0.0.0-next-fc45597-20240917";
138
138
  let keyValidityDate;
139
139
  let consoleMessageState = 'invalid';
140
140
  let domMessageState = 'invalid';
package/helpers/mixed.mjs CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
124
124
  export function _injectProductInfo(key, element) {
125
125
  const hasValidType = !isEmpty(key);
126
126
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
127
- const hotVersion = "0.0.0-next-6b121ec-20240916";
127
+ const hotVersion = "0.0.0-next-fc45597-20240917";
128
128
  let keyValidityDate;
129
129
  let consoleMessageState = 'invalid';
130
130
  let domMessageState = 'invalid';
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/handsontable/handsontable/issues"
11
11
  },
12
12
  "author": "Handsoncode <hello@handsontable.com>",
13
- "version": "0.0.0-next-6b121ec-20240916",
13
+ "version": "0.0.0-next-fc45597-20240917",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
@@ -9,17 +9,6 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
9
9
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
10
  const KEY = exports.KEY = 'alignment';
11
11
 
12
- /**
13
- * @param {object} hot The current Handsontable instance.
14
- * @param {string} rawName The raw name of the menu item.
15
- * @param {string} htClassName The class name to check.
16
- * @returns {string} The value of aria-label parameter.
17
- */
18
- function ariaLabel(hot, rawName, htClassName) {
19
- const checkboxState = (0, _utils.hasSelectionAClass)(hot, htClassName) ? hot.getTranslatedPhrase(C.CHECKBOX_CHECKED) : hot.getTranslatedPhrase(C.CHECKBOX_UNCHECKED);
20
- return `${rawName} ${checkboxState.toLowerCase()}`;
21
- }
22
-
23
12
  /**
24
13
  * @returns {object}
25
14
  */
@@ -47,7 +36,7 @@ function alignmentItem() {
47
36
  key: `${KEY}:left`,
48
37
  checkable: true,
49
38
  ariaLabel() {
50
- return ariaLabel(this, this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT), 'htLeft');
39
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);
51
40
  },
52
41
  ariaChecked() {
53
42
  return (0, _utils.hasSelectionAClass)(this, 'htLeft');
@@ -73,7 +62,7 @@ function alignmentItem() {
73
62
  key: `${KEY}:center`,
74
63
  checkable: true,
75
64
  ariaLabel() {
76
- return ariaLabel(this, this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER), 'htCenter');
65
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);
77
66
  },
78
67
  ariaChecked() {
79
68
  return (0, _utils.hasSelectionAClass)(this, 'htCenter');
@@ -99,7 +88,7 @@ function alignmentItem() {
99
88
  key: `${KEY}:right`,
100
89
  checkable: true,
101
90
  ariaLabel() {
102
- return ariaLabel(this, this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT), 'htRight');
91
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);
103
92
  },
104
93
  ariaChecked() {
105
94
  return (0, _utils.hasSelectionAClass)(this, 'htRight');
@@ -125,7 +114,7 @@ function alignmentItem() {
125
114
  key: `${KEY}:justify`,
126
115
  checkable: true,
127
116
  ariaLabel() {
128
- return ariaLabel(this, this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY), 'htJustify');
117
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);
129
118
  },
130
119
  ariaChecked() {
131
120
  return (0, _utils.hasSelectionAClass)(this, 'htJustify');
@@ -153,7 +142,7 @@ function alignmentItem() {
153
142
  key: `${KEY}:top`,
154
143
  checkable: true,
155
144
  ariaLabel() {
156
- return ariaLabel(this, this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_TOP), 'htTop');
145
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);
157
146
  },
158
147
  ariaChecked() {
159
148
  return (0, _utils.hasSelectionAClass)(this, 'htTop');
@@ -179,7 +168,7 @@ function alignmentItem() {
179
168
  key: `${KEY}:middle`,
180
169
  checkable: true,
181
170
  ariaLabel() {
182
- return ariaLabel(this, this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE), 'htMiddle');
171
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);
183
172
  },
184
173
  ariaChecked() {
185
174
  return (0, _utils.hasSelectionAClass)(this, 'htMiddle');
@@ -205,7 +194,7 @@ function alignmentItem() {
205
194
  key: `${KEY}:bottom`,
206
195
  checkable: true,
207
196
  ariaLabel() {
208
- return ariaLabel(this, this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM), 'htBottom');
197
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);
209
198
  },
210
199
  ariaChecked() {
211
200
  return (0, _utils.hasSelectionAClass)(this, 'htBottom');
@@ -3,17 +3,6 @@ import { KEY as SEPARATOR } from "./separator.mjs";
3
3
  import * as C from "../../../i18n/constants.mjs";
4
4
  export const KEY = 'alignment';
5
5
 
6
- /**
7
- * @param {object} hot The current Handsontable instance.
8
- * @param {string} rawName The raw name of the menu item.
9
- * @param {string} htClassName The class name to check.
10
- * @returns {string} The value of aria-label parameter.
11
- */
12
- function ariaLabel(hot, rawName, htClassName) {
13
- const checkboxState = hasSelectionAClass(hot, htClassName) ? hot.getTranslatedPhrase(C.CHECKBOX_CHECKED) : hot.getTranslatedPhrase(C.CHECKBOX_UNCHECKED);
14
- return `${rawName} ${checkboxState.toLowerCase()}`;
15
- }
16
-
17
6
  /**
18
7
  * @returns {object}
19
8
  */
@@ -41,7 +30,7 @@ export default function alignmentItem() {
41
30
  key: `${KEY}:left`,
42
31
  checkable: true,
43
32
  ariaLabel() {
44
- return ariaLabel(this, this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT), 'htLeft');
33
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);
45
34
  },
46
35
  ariaChecked() {
47
36
  return hasSelectionAClass(this, 'htLeft');
@@ -67,7 +56,7 @@ export default function alignmentItem() {
67
56
  key: `${KEY}:center`,
68
57
  checkable: true,
69
58
  ariaLabel() {
70
- return ariaLabel(this, this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER), 'htCenter');
59
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);
71
60
  },
72
61
  ariaChecked() {
73
62
  return hasSelectionAClass(this, 'htCenter');
@@ -93,7 +82,7 @@ export default function alignmentItem() {
93
82
  key: `${KEY}:right`,
94
83
  checkable: true,
95
84
  ariaLabel() {
96
- return ariaLabel(this, this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT), 'htRight');
85
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);
97
86
  },
98
87
  ariaChecked() {
99
88
  return hasSelectionAClass(this, 'htRight');
@@ -119,7 +108,7 @@ export default function alignmentItem() {
119
108
  key: `${KEY}:justify`,
120
109
  checkable: true,
121
110
  ariaLabel() {
122
- return ariaLabel(this, this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY), 'htJustify');
111
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);
123
112
  },
124
113
  ariaChecked() {
125
114
  return hasSelectionAClass(this, 'htJustify');
@@ -147,7 +136,7 @@ export default function alignmentItem() {
147
136
  key: `${KEY}:top`,
148
137
  checkable: true,
149
138
  ariaLabel() {
150
- return ariaLabel(this, this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_TOP), 'htTop');
139
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);
151
140
  },
152
141
  ariaChecked() {
153
142
  return hasSelectionAClass(this, 'htTop');
@@ -173,7 +162,7 @@ export default function alignmentItem() {
173
162
  key: `${KEY}:middle`,
174
163
  checkable: true,
175
164
  ariaLabel() {
176
- return ariaLabel(this, this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE), 'htMiddle');
165
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);
177
166
  },
178
167
  ariaChecked() {
179
168
  return hasSelectionAClass(this, 'htMiddle');
@@ -199,7 +188,7 @@ export default function alignmentItem() {
199
188
  key: `${KEY}:bottom`,
200
189
  checkable: true,
201
190
  ariaLabel() {
202
- return ariaLabel(this, this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM), 'htBottom');
191
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);
203
192
  },
204
193
  ariaChecked() {
205
194
  return hasSelectionAClass(this, 'htBottom');
@@ -21,10 +21,7 @@ function readOnlyItem() {
21
21
  return atLeastOneReadOnly;
22
22
  },
23
23
  ariaLabel() {
24
- const rawName = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_READ_ONLY);
25
- const atLeastOneReadOnly = (0, _utils.checkSelectionConsistency)(this.getSelectedRange(), (row, col) => this.getCellMeta(row, col).readOnly);
26
- const checkboxState = atLeastOneReadOnly ? this.getTranslatedPhrase(C.CHECKBOX_CHECKED) : this.getTranslatedPhrase(C.CHECKBOX_UNCHECKED);
27
- return `${rawName} ${checkboxState.toLowerCase()}`;
24
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_READ_ONLY);
28
25
  },
29
26
  name() {
30
27
  let label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_READ_ONLY);
@@ -15,10 +15,7 @@ export default function readOnlyItem() {
15
15
  return atLeastOneReadOnly;
16
16
  },
17
17
  ariaLabel() {
18
- const rawName = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_READ_ONLY);
19
- const atLeastOneReadOnly = checkSelectionConsistency(this.getSelectedRange(), (row, col) => this.getCellMeta(row, col).readOnly);
20
- const checkboxState = atLeastOneReadOnly ? this.getTranslatedPhrase(C.CHECKBOX_CHECKED) : this.getTranslatedPhrase(C.CHECKBOX_UNCHECKED);
21
- return `${rawName} ${checkboxState.toLowerCase()}`;
18
+ return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_READ_ONLY);
22
19
  },
23
20
  name() {
24
21
  let label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_READ_ONLY);