qidian-shared 1.0.77 → 1.1.1

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.
Files changed (94) hide show
  1. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_DataView.mjs +6 -0
  2. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.mjs +21 -0
  3. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.mjs +21 -0
  4. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.mjs +6 -0
  5. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.mjs +21 -0
  6. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Promise.mjs +6 -0
  7. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.mjs +6 -0
  8. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.mjs +15 -0
  9. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Stack.mjs +18 -0
  10. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.mjs +5 -0
  11. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Uint8Array.mjs +5 -0
  12. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_WeakMap.mjs +6 -0
  13. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayFilter.mjs +13 -0
  14. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayLikeKeys.mjs +24 -0
  15. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayPush.mjs +10 -0
  16. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arraySome.mjs +12 -0
  17. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.mjs +13 -0
  18. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetAllKeys.mjs +9 -0
  19. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.mjs +14 -0
  20. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsArguments.mjs +9 -0
  21. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsEqual.mjs +14 -0
  22. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsEqualDeep.mjs +45 -0
  23. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.mjs +22 -0
  24. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsTypedArray.mjs +14 -0
  25. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseKeys.mjs +19 -0
  26. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTimes.mjs +10 -0
  27. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUnary.mjs +8 -0
  28. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.mjs +6 -0
  29. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.mjs +5 -0
  30. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalArrays.mjs +50 -0
  31. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalByTag.mjs +59 -0
  32. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalObjects.mjs +50 -0
  33. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.mjs +4 -0
  34. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getAllKeys.mjs +9 -0
  35. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.mjs +8 -0
  36. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.mjs +9 -0
  37. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.mjs +25 -0
  38. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getSymbols.mjs +17 -0
  39. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getTag.mjs +34 -0
  40. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.mjs +6 -0
  41. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.mjs +8 -0
  42. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.mjs +8 -0
  43. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.mjs +15 -0
  44. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.mjs +10 -0
  45. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.mjs +11 -0
  46. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isIndex.mjs +10 -0
  47. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.mjs +7 -0
  48. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.mjs +11 -0
  49. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isPrototype.mjs +8 -0
  50. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.mjs +7 -0
  51. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.mjs +20 -0
  52. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.mjs +8 -0
  53. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.mjs +7 -0
  54. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.mjs +14 -0
  55. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.mjs +14 -0
  56. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.mjs +9 -0
  57. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.mjs +7 -0
  58. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.mjs +7 -0
  59. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.mjs +10 -0
  60. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapToArray.mjs +10 -0
  61. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.mjs +5 -0
  62. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeKeys.mjs +5 -0
  63. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nodeUtil.mjs +18 -0
  64. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.mjs +8 -0
  65. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overArg.mjs +8 -0
  66. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.mjs +6 -0
  67. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.mjs +8 -0
  68. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.mjs +6 -0
  69. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.mjs +10 -0
  70. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackClear.mjs +8 -0
  71. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackDelete.mjs +8 -0
  72. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackGet.mjs +6 -0
  73. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackHas.mjs +6 -0
  74. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackSet.mjs +22 -0
  75. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.mjs +18 -0
  76. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.mjs +6 -0
  77. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArguments.mjs +13 -0
  78. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArray.mjs +4 -0
  79. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArrayLike.mjs +8 -0
  80. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isBuffer.mjs +11 -0
  81. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isEqual.mjs +7 -0
  82. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isEqualWith.mjs +9 -0
  83. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.mjs +13 -0
  84. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isLength.mjs +7 -0
  85. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.mjs +7 -0
  86. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.mjs +6 -0
  87. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isTypedArray.mjs +8 -0
  88. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keys.mjs +9 -0
  89. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/stubArray.mjs +6 -0
  90. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/stubFalse.mjs +6 -0
  91. package/dist/utils/common.d.ts +3 -1
  92. package/dist/utils/common.mjs +8 -5
  93. package/dist/utils/conversion.mjs +2 -2
  94. package/package.json +4 -2
@@ -37,7 +37,9 @@ export declare function extractSlotsWithPrefix(slots: SetupContext['slots'], pre
37
37
  export declare function extractSlotsWithoutPrefix(slots: SetupContext['slots'], prefix: string): string[];
38
38
  export declare function filterSlots(slots: SetupContext['slots'], filterName: string[]): string[];
39
39
  export declare function easyCopy<T>(data: T, reviver?: (key: string, value: any) => any): T;
40
- export declare function checkSameObject(newData: unknown, oldData: unknown): boolean;
40
+ export declare function checkSameObject(newData: unknown, oldData: unknown, options?: {
41
+ strict?: boolean;
42
+ }): boolean;
41
43
  export declare function valueFillter(val: string, keys: string, data: Record<string, string | number>): string;
42
44
  type Simplify<T> = T extends any ? {
43
45
  [K in keyof T]: T[K];
@@ -1,4 +1,6 @@
1
1
  import { identifyType } from "./type.mjs";
2
+ import isEqual from "../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isEqual.mjs";
3
+ import isEqualWith from "../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isEqualWith.mjs";
2
4
  function noop() {
3
5
  }
4
6
  function isEmpty(val) {
@@ -86,11 +88,12 @@ function easyCopy(data, reviver) {
86
88
  return value;
87
89
  }
88
90
  }
89
- function checkSameObject(newData, oldData) {
90
- if (newData && !oldData || !newData && oldData || typeof newData !== typeof oldData) {
91
- return false;
92
- }
93
- return JSON.stringify(newData) === JSON.stringify(oldData);
91
+ function checkSameObject(newData, oldData, options = {}) {
92
+ if (options.strict) return isEqual(newData, oldData);
93
+ return isEqualWith(newData, oldData, (x, y) => {
94
+ if (isEmpty(x) && isEmpty(y)) return true;
95
+ return void 0;
96
+ });
94
97
  }
95
98
  function valueFillter(val, keys, data) {
96
99
  if (!val) return val;
@@ -15,12 +15,12 @@ function buildTree(data, options = {}) {
15
15
  childrenListMap[pid] = [];
16
16
  }
17
17
  nodeIds[d[id]] = d;
18
- childrenListMap[pid].push(d);
18
+ childrenListMap[pid].push({ ...d });
19
19
  }
20
20
  for (const d of data) {
21
21
  const pid = d[parentId];
22
22
  if (!nodeIds[pid]) {
23
- tree.push(d);
23
+ tree.push({ ...d });
24
24
  }
25
25
  }
26
26
  for (const t of tree) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qidian-shared",
3
- "version": "1.0.77",
3
+ "version": "1.1.1",
4
4
  "description": "QiDian 共享工具函数和钩子",
5
5
  "type": "module",
6
6
  "author": "qidian",
@@ -34,6 +34,7 @@
34
34
  "crypto-js": "^4.2.0",
35
35
  "dayjs": "^1.11.19",
36
36
  "jsencrypt": "^3.5.4",
37
+ "lodash-es": "^4.17.21",
37
38
  "vue-request": "^2.0.4",
38
39
  "jsonrepair": "^3.12.0"
39
40
  },
@@ -41,7 +42,8 @@
41
42
  "@vitejs/plugin-vue": "^6.0.1",
42
43
  "vite": "^7.3.1",
43
44
  "typescript": "~5.9.0",
44
- "@types/crypto-js": "^4.2.2"
45
+ "@types/crypto-js": "^4.2.2",
46
+ "@types/lodash-es": "^4.17.12"
45
47
  },
46
48
  "peerDependencies": {
47
49
  "vue": "~3.5.26"