neo.mjs 10.5.1 → 10.5.2

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.
@@ -0,0 +1,17 @@
1
+ # Neo.mjs v10.5.2 Release Notes
2
+
3
+ ## Features
4
+
5
+ - **grid.Container**: Added the `aria-colcount` attribute to the grid's wrapper element to enhance accessibility.
6
+ - This attribute dynamically updates with the number of columns, ensuring screen readers can accurately announce the grid's structure.
7
+
8
+ ## Enhancements
9
+
10
+ - **grid.Container**: The `updateColCount()` method now includes a `silent` parameter. This allows for updating the column count without triggering an immediate DOM update, optimizing performance in scenarios where multiple changes occur in sequence.
11
+ - **examples.grid.bigData.ControlsContainer**: To improve user feedback, a loading mask is now displayed during the initial data filtering process in the Big Data grid example.
12
+
13
+ ## Bug Fixes
14
+
15
+ - **data.Store**: Fixed an issue where the `isLoaded` flag was not set to `true` when records were added to the store via
16
+ the `add()` method. This ensures that the `load` event is fired correctly, even when the store is populated manually
17
+ instead of through assigning `data` or `autoLoad`.
package/ServiceWorker.mjs CHANGED
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='10.5.1'
23
+ * @member {String} version='10.5.2'
24
24
  */
25
- version: '10.5.1'
25
+ version: '10.5.2'
26
26
  }
27
27
 
28
28
  /**
@@ -16,7 +16,7 @@
16
16
  "@type": "Organization",
17
17
  "name": "Neo.mjs"
18
18
  },
19
- "datePublished": "2025-08-13",
19
+ "datePublished": "2025-08-14",
20
20
  "publisher": {
21
21
  "@type": "Organization",
22
22
  "name": "Neo.mjs"
@@ -108,7 +108,7 @@ class FooterContainer extends Container {
108
108
  }, {
109
109
  module: Component,
110
110
  cls : ['neo-version'],
111
- text : 'v10.5.1'
111
+ text : 'v10.5.2'
112
112
  }]
113
113
  }],
114
114
  /**
@@ -195,6 +195,11 @@ class ControlsContainer extends Container {
195
195
  tag: 'aside'
196
196
  }
197
197
 
198
+ /**
199
+ * @member {Boolean} firstFiltering=true
200
+ */
201
+ firstFiltering = true
202
+
198
203
  get grid() {
199
204
  return this.parent.getItem('grid')
200
205
  }
@@ -271,7 +276,15 @@ class ControlsContainer extends Container {
271
276
  * @param {Object} data
272
277
  */
273
278
  onFilterFieldChange(data) {
274
- this.grid.store.getFilter(data.component.name).value = data.value
279
+ let me = this;
280
+
281
+ if (me.firstFiltering) {
282
+ me.firstFiltering = false;
283
+ me.grid.isLoading = 'Is Loading'
284
+ }
285
+
286
+ me.grid.store.getFilter(data.component.name).value = data.value;
287
+ me.grid.isLoading = false
275
288
  }
276
289
 
277
290
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "10.5.1",
3
+ "version": "10.5.2",
4
4
  "description": "Neo.mjs: The multi-threaded UI framework for building ultra-fast, desktop-like web applications with uncompromised responsiveness, inherent security, and a transpilation-free dev mode.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -88,11 +88,11 @@
88
88
  "commander": "^14.0.0",
89
89
  "cssnano": "^7.1.0",
90
90
  "envinfo": "^7.14.0",
91
- "esbuild": "^0.25.8",
91
+ "esbuild": "^0.25.9",
92
92
  "fs-extra": "^11.3.1",
93
93
  "highlightjs-line-numbers.js": "^2.9.0",
94
94
  "html-minifier-terser": "^7.2.0",
95
- "inquirer": "^12.9.1",
95
+ "inquirer": "^12.9.2",
96
96
  "marked": "^16.1.2",
97
97
  "monaco-editor": "0.50.0",
98
98
  "neo-jsdoc": "1.0.1",
@@ -103,7 +103,7 @@
103
103
  "siesta-lite": "5.5.2",
104
104
  "terser": "^5.43.1",
105
105
  "url": "^0.11.4",
106
- "webpack": "^5.101.0",
106
+ "webpack": "^5.101.1",
107
107
  "webpack-cli": "^6.0.1",
108
108
  "webpack-dev-server": "^5.2.2",
109
109
  "webpack-hook-plugin": "^1.0.7",
@@ -299,12 +299,12 @@ const DefaultConfig = {
299
299
  useVdomWorker: true,
300
300
  /**
301
301
  * buildScripts/injectPackageVersion.mjs will update this value
302
- * @default '10.5.1'
302
+ * @default '10.5.2'
303
303
  * @memberOf! module:Neo
304
304
  * @name config.version
305
305
  * @type String
306
306
  */
307
- version: '10.5.1'
307
+ version: '10.5.2'
308
308
  };
309
309
 
310
310
  Object.assign(DefaultConfig, {
@@ -144,12 +144,12 @@ class Store extends Base {
144
144
  * @returns {Number} the collection count
145
145
  */
146
146
  add(item) {
147
- let items = Array.isArray(item) ? item : [item];
148
- const threshold = this.initialChunkSize;
147
+ let me = this,
148
+ items = Array.isArray(item) ? item : [item],
149
+ threshold = me.initialChunkSize;
149
150
 
150
151
  if (threshold > 0 && items.length > threshold) {
151
- const me = this,
152
- total = me.count + items.length,
152
+ const total = me.count + items.length,
153
153
  chunk = items.splice(0, threshold);
154
154
 
155
155
  me.chunkingTotal = total;
@@ -175,7 +175,12 @@ class Store extends Base {
175
175
  return me.count;
176
176
  }
177
177
 
178
- return super.add(item); // Pass raw item directly
178
+ const returnValue = super.add(items);
179
+
180
+ // If we use add() initially instead of setting `data`, we need to set the loaded flag here.
181
+ me.isLoaded = true;
182
+
183
+ return returnValue; // Pass raw item directly
179
184
  }
180
185
 
181
186
  /**
@@ -206,9 +211,7 @@ class Store extends Base {
206
211
 
207
212
  me.isLoading = false;
208
213
 
209
- me.add(value);
210
-
211
- me.isLoaded = true
214
+ me.add(value)
212
215
  }
213
216
  }
214
217
  }
@@ -134,7 +134,7 @@ class GridContainer extends BaseContainer {
134
134
  */
135
135
  _vdom:
136
136
  {cls: ['neo-grid-wrapper'], cn: [
137
- {'aria-rowcount': 1, cn: []} // aria-rowcount includes the column headers
137
+ {'aria-colcount': 0, 'aria-rowcount': 1, cn: []} // aria-rowcount includes the column headers
138
138
  ]}
139
139
  }
140
140
 
@@ -175,6 +175,7 @@ class GridContainer extends BaseContainer {
175
175
  me.vdom.id = me.getWrapperId();
176
176
 
177
177
  me._columns = me.createColumns(me.columns);
178
+ me.updateColCount();
178
179
 
179
180
  me.addDomListeners({
180
181
  resize: me.onResize,
@@ -245,6 +246,8 @@ class GridContainer extends BaseContainer {
245
246
 
246
247
  me.body?.createViewData()
247
248
  }
249
+
250
+ me.configsApplied && me.updateColCount()
248
251
  }
249
252
 
250
253
  /**
@@ -466,7 +469,8 @@ class GridContainer extends BaseContainer {
466
469
 
467
470
  return Neo.create(Collection, {
468
471
  keyProperty: 'dataField',
469
- items : columns
472
+ items : columns,
473
+ listeners : {mutate: me.onColumnsMutate, scope: me}
470
474
  })
471
475
  }
472
476
 
@@ -511,6 +515,13 @@ class GridContainer extends BaseContainer {
511
515
  return `${this.id}__wrapper`
512
516
  }
513
517
 
518
+ /**
519
+ * @param {Object} data
520
+ */
521
+ onColumnsMutate(data) {
522
+ this.updateColCount()
523
+ }
524
+
514
525
  /**
515
526
  *
516
527
  */
@@ -528,6 +539,7 @@ class GridContainer extends BaseContainer {
528
539
 
529
540
  /**
530
541
  * @param {Object} data
542
+ * @returns {Promise<void>}
531
543
  */
532
544
  async onResize(data) {
533
545
  let me = this;
@@ -666,6 +678,16 @@ class GridContainer extends BaseContainer {
666
678
  }
667
679
  }
668
680
 
681
+ /**
682
+ * @param {Boolean} [silent=false]
683
+ */
684
+ updateColCount(silent=false) {
685
+ let me = this;
686
+
687
+ me.getVdomRoot()['aria-colcount'] = me.columns.count;
688
+ !silent && me.update()
689
+ }
690
+
669
691
  /**
670
692
  * @param {Number} [count] The total number of rows in the store. Optional, will use store.count if not provided.
671
693
  * @param {Boolean} [silent=false]