@onehat/data 1.22.12 → 1.22.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/data",
3
- "version": "1.22.12",
3
+ "version": "1.22.15",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -37,20 +37,20 @@
37
37
  "homepage": "https://github.com/OneHatRepo/data#readme",
38
38
  "dependencies": {
39
39
  "@onehat/events": "^1.6.6",
40
- "accounting-js": "^1.1.1",
41
- "async-wait-until": "^2.0.12",
42
- "axios": "^1.6.2",
43
- "chrono-node": "^2.7.3",
40
+ "accounting-js": "^2.0.3",
41
+ "async-wait-until": "^2.0.27",
42
+ "axios": "^1.11.0",
43
+ "chrono-node": "^2.8.3",
44
44
  "he": "^1.2.0",
45
- "js-base64": "^3.7.5",
45
+ "js-base64": "^3.7.7",
46
46
  "lodash": "^4.17.21",
47
- "moment": "^2.29.4",
47
+ "moment": "^2.30.1",
48
48
  "natsort": "^2.0.3",
49
49
  "numeral": "^2.0.6",
50
50
  "object-hash": "^3.0.0",
51
- "qs": "^6.11.2",
51
+ "qs": "^6.14.0",
52
52
  "relative-time-parser": "^1.0.15",
53
- "uuid": "^9.0.1"
53
+ "uuid": "^11.1.0"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "fast-xml-parser": "^4.4.1",
@@ -1,7 +1,7 @@
1
1
  /** @module Property */
2
2
 
3
3
  import Property from './Property.js';
4
- import accounting from 'accounting-js';
4
+ import * as accounting from 'accounting-js';
5
5
  import _ from 'lodash';
6
6
 
7
7
  /**
@@ -316,7 +316,23 @@ class AjaxRepository extends Repository {
316
316
  if (!this.hasBaseParam(name)) {
317
317
  return null;
318
318
  }
319
- return this._baseParams[name];
319
+
320
+ // Handle simple property access
321
+ if (this._baseParams.hasOwnProperty(name)) {
322
+ return this._baseParams[name];
323
+ }
324
+
325
+ // Handle array notation like "conditions[fleets__enterprise_id]"
326
+ const keys = name.split(/[\[\].]+/).filter(Boolean);
327
+ let current = this._baseParams;
328
+
329
+ for(const key of keys) {
330
+ if (!current || !current.hasOwnProperty(key)) {
331
+ return null;
332
+ }
333
+ current = current[key];
334
+ }
335
+ return current;
320
336
  }
321
337
 
322
338
  /**
@@ -332,7 +348,22 @@ class AjaxRepository extends Repository {
332
348
  * @param {string} name - Param name
333
349
  */
334
350
  hasParam(name) {
335
- return this._params.hasOwnProperty(name);
351
+ if (this._params.hasOwnProperty(name)) {
352
+ return true;
353
+ }
354
+
355
+ // Check for array notation
356
+ const keys = name.split(/[\[\].]+/).filter(Boolean);
357
+ let current = this._params,
358
+ key;
359
+
360
+ for(key of keys) {
361
+ if (!current || !current.hasOwnProperty(key)) {
362
+ return false;
363
+ }
364
+ current = current[key];
365
+ }
366
+ return true;
336
367
  }
337
368
 
338
369
  /**