pinia-orm-edge 1.10.0-28876945.d400e21 → 1.10.0-28877306.a5a2c93

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/dist/helpers.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const Utils = require('./shared/pinia-orm.bf89f043.cjs');
3
+ const Utils = require('./shared/pinia-orm.a661fdf8.cjs');
4
4
 
5
5
  function useSum(models, field) {
6
6
  return models.reduce((sum, item) => {
package/dist/helpers.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { l as getValue, o as orderBy } from './shared/pinia-orm.3022ad6a.mjs';
1
+ import { l as getValue, o as orderBy } from './shared/pinia-orm.7ddc00a8.mjs';
2
2
 
3
3
  function useSum(models, field) {
4
4
  return models.reduce((sum, item) => {
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const Utils = require('./shared/pinia-orm.bf89f043.cjs');
3
+ const Utils = require('./shared/pinia-orm.a661fdf8.cjs');
4
4
  const pinia = require('pinia');
5
5
  const normalizr = require('@pinia-orm/normalizr');
6
6
  const vueDemi = require('vue-demi');
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as isArray, t as throwError, a as assert, g as generateId, b as isNullish, c as compareWithOperator, d as generateKey, e as isEmpty, f as isFunction, h as groupBy, o as orderBy, j as equals, k as isDate } from './shared/pinia-orm.3022ad6a.mjs';
1
+ import { i as isArray, t as throwError, a as assert, g as generateId, b as isNullish, c as compareWithOperator, d as generateKey, e as isEmpty, f as isFunction, h as groupBy, o as orderBy, j as equals, k as isDate } from './shared/pinia-orm.7ddc00a8.mjs';
2
2
  import { defineStore, acceptHMRUpdate } from 'pinia';
3
3
  import { schema, normalize } from '@pinia-orm/normalizr';
4
4
  import { ref } from 'vue-demi';
@@ -41,6 +41,9 @@ function orderBy(collection, iteratees, directions, flags = "SORT_REGULAR") {
41
41
  if (typeof iteratee === "function") {
42
42
  return iteratee(value);
43
43
  }
44
+ if (!iteratee.includes(".") && !isDate(value[iteratee])) {
45
+ return value[iteratee];
46
+ }
44
47
  const newValue = getValue(value, iteratee, false);
45
48
  return isDate(newValue) ? new Date(newValue).getTime() : newValue;
46
49
  });
@@ -43,6 +43,9 @@ function orderBy(collection, iteratees, directions, flags = "SORT_REGULAR") {
43
43
  if (typeof iteratee === "function") {
44
44
  return iteratee(value);
45
45
  }
46
+ if (!iteratee.includes(".") && !isDate(value[iteratee])) {
47
+ return value[iteratee];
48
+ }
46
49
  const newValue = getValue(value, iteratee, false);
47
50
  return isDate(newValue) ? new Date(newValue).getTime() : newValue;
48
51
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinia-orm-edge",
3
- "version": "1.10.0-28876945.d400e21",
3
+ "version": "1.10.0-28877306.a5a2c93",
4
4
  "description": "The Pinia plugin to enable Object-Relational Mapping access to the Pinia Store.",
5
5
  "keywords": [
6
6
  "vue",
@@ -46,7 +46,7 @@
46
46
  "pinia": "^2.1.7"
47
47
  },
48
48
  "dependencies": {
49
- "@pinia-orm/normalizr": "npm:@pinia-orm/normalizr-edge@1.10.0-28876945.d400e21"
49
+ "@pinia-orm/normalizr": "npm:@pinia-orm/normalizr-edge@1.10.0-28877306.a5a2c93"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@nuxt/eslint-config": "^0.3.13",