zcw-shared 2.4.0 → 2.8.0

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 (428) hide show
  1. package/dist/functions/android/integrateThirdPartyModule.d.ts +5 -0
  2. package/dist/functions/android/integrateThirdPartyModule.js +70 -0
  3. package/dist/functions/android/integrateThirdPartyModule.js.map +1 -1
  4. package/dist/functions/android/integrateUniPushAndroid.d.ts +23 -0
  5. package/dist/functions/android/integrateUniPushAndroid.js +266 -0
  6. package/dist/functions/android/integrateUniPushAndroid.js.map +1 -0
  7. package/dist/functions/api/auth.d.ts +14 -0
  8. package/dist/functions/api/auth.js +109 -0
  9. package/dist/functions/api/auth.js.map +1 -0
  10. package/dist/functions/api/schemas/auth.schema.d.ts +363 -0
  11. package/dist/functions/api/schemas/auth.schema.js +39 -0
  12. package/dist/functions/api/schemas/auth.schema.js.map +1 -0
  13. package/dist/functions/api/schemas/video.schema.d.ts +391 -0
  14. package/dist/functions/api/schemas/video.schema.js +55 -0
  15. package/dist/functions/api/schemas/video.schema.js.map +1 -0
  16. package/dist/functions/api/video.d.ts +62 -0
  17. package/dist/functions/api/video.js +243 -0
  18. package/dist/functions/api/video.js.map +1 -0
  19. package/dist/functions/browser/isElectron.d.ts +5 -0
  20. package/dist/functions/browser/isElectron.js +4 -0
  21. package/dist/functions/browser/isElectron.js.map +1 -0
  22. package/dist/functions/dom/isTextTruncated.d.ts +4 -0
  23. package/dist/functions/dom/isTextTruncated.js +16 -0
  24. package/dist/functions/dom/isTextTruncated.js.map +1 -0
  25. package/dist/functions/dom/localFileInput.d.ts +14 -0
  26. package/dist/functions/dom/localFileInput.js +27 -0
  27. package/dist/functions/dom/localFileInput.js.map +1 -0
  28. package/dist/functions/file/getIconfontNameByExtension.js +53 -56
  29. package/dist/functions/file/getIconfontNameByExtension.js.map +1 -1
  30. package/dist/functions/im/parseImMentionSegments.d.ts +15 -0
  31. package/dist/functions/im/parseImMentionSegments.js +56 -0
  32. package/dist/functions/im/parseImMentionSegments.js.map +1 -0
  33. package/dist/functions/ios/integrateThirdPartyModule.d.ts +9 -1
  34. package/dist/functions/ios/integrateThirdPartyModule.js +112 -2
  35. package/dist/functions/ios/integrateThirdPartyModule.js.map +1 -1
  36. package/dist/functions/ios/integrateUniPushIOS.d.ts +18 -0
  37. package/dist/functions/ios/integrateUniPushIOS.js +200 -0
  38. package/dist/functions/ios/integrateUniPushIOS.js.map +1 -0
  39. package/dist/functions/oss/uploadViaSignedPut.d.ts +35 -0
  40. package/dist/functions/oss/uploadViaSignedPut.js +86 -0
  41. package/dist/functions/oss/uploadViaSignedPut.js.map +1 -0
  42. package/dist/functions/uniapp/app-plus/buildAndroidApp.js +38 -0
  43. package/dist/functions/uniapp/app-plus/buildAndroidApp.js.map +1 -1
  44. package/dist/functions/uniapp/app-plus/buildIOSApp.js +38 -0
  45. package/dist/functions/uniapp/app-plus/buildIOSApp.js.map +1 -1
  46. package/dist/vue-hooks/dom/useAppendToBody.d.ts +25 -0
  47. package/dist/vue-hooks/dom/useAppendToBody.js +31 -0
  48. package/dist/vue-hooks/dom/useAppendToBody.js.map +1 -0
  49. package/dist/vue-hooks/dom/useDraggable.d.ts +8 -3
  50. package/dist/vue-hooks/dom/useDraggable.js +57 -19
  51. package/dist/vue-hooks/dom/useDraggable.js.map +1 -1
  52. package/package.json +11 -1
  53. package/references/dom.d.ts +8 -3
  54. package/types/im-api.d.ts +26 -2
  55. package/types/im-chat.d.ts +42 -1
  56. package/types/im-message-display.d.ts +89 -0
  57. package/types/uniapp-android-build.d.ts +31 -0
  58. package/types/uniapp-ios-build.d.ts +26 -0
  59. package/types/user.d.ts +2 -1
  60. package/dist/functions/async/sleep.d.ts +0 -5
  61. package/dist/functions/async/sleep.js +0 -6
  62. package/dist/functions/async/sleep.js.map +0 -1
  63. package/dist/functions/async/timeout.d.ts +0 -6
  64. package/dist/functions/async/timeout.js +0 -12
  65. package/dist/functions/async/timeout.js.map +0 -1
  66. package/dist/functions/browser/computePosition.d.ts +0 -6
  67. package/dist/functions/browser/computePosition.js +0 -49
  68. package/dist/functions/browser/computePosition.js.map +0 -1
  69. package/dist/functions/browser/createSharedKeyboardCenter.d.ts +0 -18
  70. package/dist/functions/browser/createSharedKeyboardCenter.js +0 -58
  71. package/dist/functions/browser/createSharedKeyboardCenter.js.map +0 -1
  72. package/dist/functions/browser/createThrottledEventListener.d.ts +0 -11
  73. package/dist/functions/browser/createThrottledEventListener.js +0 -51
  74. package/dist/functions/browser/createThrottledEventListener.js.map +0 -1
  75. package/dist/functions/browser/demonstrateResourceLoading.d.ts +0 -32
  76. package/dist/functions/browser/demonstrateResourceLoading.js +0 -169
  77. package/dist/functions/browser/demonstrateResourceLoading.js.map +0 -1
  78. package/dist/functions/browser/detectOverflow.d.ts +0 -12
  79. package/dist/functions/browser/detectOverflow.js +0 -17
  80. package/dist/functions/browser/detectOverflow.js.map +0 -1
  81. package/dist/functions/browser/getAlignment.d.ts +0 -2
  82. package/dist/functions/browser/getAlignment.js +0 -5
  83. package/dist/functions/browser/getAlignment.js.map +0 -1
  84. package/dist/functions/browser/getBasePlacement.d.ts +0 -2
  85. package/dist/functions/browser/getBasePlacement.js +0 -4
  86. package/dist/functions/browser/getBasePlacement.js.map +0 -1
  87. package/dist/functions/browser/getCrossAxisFlip.d.ts +0 -2
  88. package/dist/functions/browser/getCrossAxisFlip.js +0 -11
  89. package/dist/functions/browser/getCrossAxisFlip.js.map +0 -1
  90. package/dist/functions/browser/getElementRect.d.ts +0 -3
  91. package/dist/functions/browser/getElementRect.js +0 -14
  92. package/dist/functions/browser/getElementRect.js.map +0 -1
  93. package/dist/functions/browser/getFlipPlacements.d.ts +0 -2
  94. package/dist/functions/browser/getFlipPlacements.js +0 -13
  95. package/dist/functions/browser/getFlipPlacements.js.map +0 -1
  96. package/dist/functions/browser/getMainAxisFlip.d.ts +0 -2
  97. package/dist/functions/browser/getMainAxisFlip.js +0 -17
  98. package/dist/functions/browser/getMainAxisFlip.js.map +0 -1
  99. package/dist/functions/browser/getRelativePosition.d.ts +0 -3
  100. package/dist/functions/browser/getRelativePosition.js +0 -14
  101. package/dist/functions/browser/getRelativePosition.js.map +0 -1
  102. package/dist/functions/browser/getViewportRect.d.ts +0 -7
  103. package/dist/functions/browser/getViewportRect.js +0 -15
  104. package/dist/functions/browser/getViewportRect.js.map +0 -1
  105. package/dist/functions/browser/isValidPlacement.d.ts +0 -2
  106. package/dist/functions/browser/isValidPlacement.js +0 -16
  107. package/dist/functions/browser/isValidPlacement.js.map +0 -1
  108. package/dist/functions/browser/pickFile.d.ts +0 -15
  109. package/dist/functions/browser/pickFile.js +0 -48
  110. package/dist/functions/browser/pickFile.js.map +0 -1
  111. package/dist/functions/build/generateExports.d.ts +0 -26
  112. package/dist/functions/build/generateExports.js +0 -34
  113. package/dist/functions/build/generateExports.js.map +0 -1
  114. package/dist/functions/core/diff/diff.d.ts +0 -25
  115. package/dist/functions/core/diff/diff.js +0 -316
  116. package/dist/functions/core/diff/diff.js.map +0 -1
  117. package/dist/functions/core/diff/vueDiff.d.ts +0 -38
  118. package/dist/functions/core/diff/vueDiff.js +0 -333
  119. package/dist/functions/core/diff/vueDiff.js.map +0 -1
  120. package/dist/functions/core/generator/generatorUtils.d.ts +0 -16
  121. package/dist/functions/core/generator/generatorUtils.js +0 -139
  122. package/dist/functions/core/generator/generatorUtils.js.map +0 -1
  123. package/dist/functions/core/type/isType.d.ts +0 -11
  124. package/dist/functions/core/type/isType.js +0 -30
  125. package/dist/functions/core/type/isType.js.map +0 -1
  126. package/dist/functions/data/array-object/chunk.d.ts +0 -1
  127. package/dist/functions/data/array-object/chunk.js +0 -11
  128. package/dist/functions/data/array-object/chunk.js.map +0 -1
  129. package/dist/functions/data/array-object/deepClone.d.ts +0 -12
  130. package/dist/functions/data/array-object/deepClone.js +0 -131
  131. package/dist/functions/data/array-object/deepClone.js.map +0 -1
  132. package/dist/functions/data/array-object/evolve.d.ts +0 -3
  133. package/dist/functions/data/array-object/evolve.js +0 -15
  134. package/dist/functions/data/array-object/evolve.js.map +0 -1
  135. package/dist/functions/data/array-object/flatten.d.ts +0 -7
  136. package/dist/functions/data/array-object/flatten.js +0 -60
  137. package/dist/functions/data/array-object/flatten.js.map +0 -1
  138. package/dist/functions/data/array-object/flattenObject.d.ts +0 -5
  139. package/dist/functions/data/array-object/flattenObject.js +0 -102
  140. package/dist/functions/data/array-object/flattenObject.js.map +0 -1
  141. package/dist/functions/data/array-object/groupBy.d.ts +0 -1
  142. package/dist/functions/data/array-object/groupBy.js +0 -14
  143. package/dist/functions/data/array-object/groupBy.js.map +0 -1
  144. package/dist/functions/data/array-object/omit.d.ts +0 -1
  145. package/dist/functions/data/array-object/omit.js +0 -8
  146. package/dist/functions/data/array-object/omit.js.map +0 -1
  147. package/dist/functions/data/array-object/pick.d.ts +0 -1
  148. package/dist/functions/data/array-object/pick.js +0 -10
  149. package/dist/functions/data/array-object/pick.js.map +0 -1
  150. package/dist/functions/data/array-object/shuffle.d.ts +0 -1
  151. package/dist/functions/data/array-object/shuffle.js +0 -9
  152. package/dist/functions/data/array-object/shuffle.js.map +0 -1
  153. package/dist/functions/data/array-object/sortBy.d.ts +0 -1
  154. package/dist/functions/data/array-object/sortBy.js +0 -13
  155. package/dist/functions/data/array-object/sortBy.js.map +0 -1
  156. package/dist/functions/data/array-object/unique.d.ts +0 -10
  157. package/dist/functions/data/array-object/unique.js +0 -85
  158. package/dist/functions/data/array-object/unique.js.map +0 -1
  159. package/dist/functions/data/date/dateRange.d.ts +0 -1
  160. package/dist/functions/data/date/dateRange.js +0 -18
  161. package/dist/functions/data/date/dateRange.js.map +0 -1
  162. package/dist/functions/data/date/formatDate.d.ts +0 -1
  163. package/dist/functions/data/date/formatDate.js +0 -21
  164. package/dist/functions/data/date/formatDate.js.map +0 -1
  165. package/dist/functions/data/date/timeAgo.d.ts +0 -1
  166. package/dist/functions/data/date/timeAgo.js +0 -49
  167. package/dist/functions/data/date/timeAgo.js.map +0 -1
  168. package/dist/functions/data/number/average.d.ts +0 -1
  169. package/dist/functions/data/number/average.js +0 -8
  170. package/dist/functions/data/number/average.js.map +0 -1
  171. package/dist/functions/data/number/clamp.d.ts +0 -1
  172. package/dist/functions/data/number/clamp.js +0 -7
  173. package/dist/functions/data/number/clamp.js.map +0 -1
  174. package/dist/functions/data/number/formatNumber.d.ts +0 -8
  175. package/dist/functions/data/number/formatNumber.js +0 -16
  176. package/dist/functions/data/number/formatNumber.js.map +0 -1
  177. package/dist/functions/data/number/median.d.ts +0 -1
  178. package/dist/functions/data/number/median.js +0 -14
  179. package/dist/functions/data/number/median.js.map +0 -1
  180. package/dist/functions/data/number/percentile.d.ts +0 -1
  181. package/dist/functions/data/number/percentile.js +0 -18
  182. package/dist/functions/data/number/percentile.js.map +0 -1
  183. package/dist/functions/data/number/random.d.ts +0 -4
  184. package/dist/functions/data/number/random.js +0 -9
  185. package/dist/functions/data/number/random.js.map +0 -1
  186. package/dist/functions/data/number/range.d.ts +0 -1
  187. package/dist/functions/data/number/range.js +0 -18
  188. package/dist/functions/data/number/range.js.map +0 -1
  189. package/dist/functions/data/number/sum.d.ts +0 -1
  190. package/dist/functions/data/number/sum.js +0 -4
  191. package/dist/functions/data/number/sum.js.map +0 -1
  192. package/dist/functions/data/randomRegion.d.ts +0 -24
  193. package/dist/functions/data/randomRegion.js +0 -74
  194. package/dist/functions/data/randomRegion.js.map +0 -1
  195. package/dist/functions/data/string/base64.d.ts +0 -5
  196. package/dist/functions/data/string/base64.js +0 -6
  197. package/dist/functions/data/string/base64.js.map +0 -1
  198. package/dist/functions/data/string/capitalize.d.ts +0 -1
  199. package/dist/functions/data/string/capitalize.js +0 -6
  200. package/dist/functions/data/string/capitalize.js.map +0 -1
  201. package/dist/functions/data/string/caseConverter.d.ts +0 -19
  202. package/dist/functions/data/string/caseConverter.js +0 -94
  203. package/dist/functions/data/string/caseConverter.js.map +0 -1
  204. package/dist/functions/data/string/desensitize.d.ts +0 -13
  205. package/dist/functions/data/string/desensitize.js +0 -107
  206. package/dist/functions/data/string/desensitize.js.map +0 -1
  207. package/dist/functions/data/string/htmlEscape.d.ts +0 -20
  208. package/dist/functions/data/string/htmlEscape.js +0 -80
  209. package/dist/functions/data/string/htmlEscape.js.map +0 -1
  210. package/dist/functions/data/string/levenshtein.d.ts +0 -1
  211. package/dist/functions/data/string/levenshtein.js +0 -27
  212. package/dist/functions/data/string/levenshtein.js.map +0 -1
  213. package/dist/functions/data/string/normalize.d.ts +0 -8
  214. package/dist/functions/data/string/normalize.js +0 -37
  215. package/dist/functions/data/string/normalize.js.map +0 -1
  216. package/dist/functions/data/string/pad.d.ts +0 -13
  217. package/dist/functions/data/string/pad.js +0 -50
  218. package/dist/functions/data/string/pad.js.map +0 -1
  219. package/dist/functions/data/string/palindrome.d.ts +0 -3
  220. package/dist/functions/data/string/palindrome.js +0 -15
  221. package/dist/functions/data/string/palindrome.js.map +0 -1
  222. package/dist/functions/data/string/similarity.d.ts +0 -1
  223. package/dist/functions/data/string/similarity.js +0 -13
  224. package/dist/functions/data/string/similarity.js.map +0 -1
  225. package/dist/functions/data/string/template.d.ts +0 -4
  226. package/dist/functions/data/string/template.js +0 -21
  227. package/dist/functions/data/string/template.js.map +0 -1
  228. package/dist/functions/data/string/testRegex.d.ts +0 -20
  229. package/dist/functions/data/string/testRegex.js +0 -300
  230. package/dist/functions/data/string/testRegex.js.map +0 -1
  231. package/dist/functions/data/string/wordCount.d.ts +0 -5
  232. package/dist/functions/data/string/wordCount.js +0 -11
  233. package/dist/functions/data/string/wordCount.js.map +0 -1
  234. package/dist/functions/data/tree/buildTree.d.ts +0 -7
  235. package/dist/functions/data/tree/buildTree.js +0 -27
  236. package/dist/functions/data/tree/buildTree.js.map +0 -1
  237. package/dist/functions/data/tree/filterTree.d.ts +0 -4
  238. package/dist/functions/data/tree/filterTree.js +0 -21
  239. package/dist/functions/data/tree/filterTree.js.map +0 -1
  240. package/dist/functions/data/tree/findNode.d.ts +0 -4
  241. package/dist/functions/data/tree/findNode.js +0 -21
  242. package/dist/functions/data/tree/findNode.js.map +0 -1
  243. package/dist/functions/data/tree/flattenTree.d.ts +0 -6
  244. package/dist/functions/data/tree/flattenTree.js +0 -21
  245. package/dist/functions/data/tree/flattenTree.js.map +0 -1
  246. package/dist/functions/file/walk.d.ts +0 -18
  247. package/dist/functions/file/walk.js +0 -58
  248. package/dist/functions/file/walk.js.map +0 -1
  249. package/dist/functions/hybrid/detectBridgeEnvironment.d.ts +0 -11
  250. package/dist/functions/hybrid/detectBridgeEnvironment.js +0 -26
  251. package/dist/functions/hybrid/detectBridgeEnvironment.js.map +0 -1
  252. package/dist/functions/integrations/ag-grid/generateLicense.d.ts +0 -7
  253. package/dist/functions/integrations/ag-grid/generateLicense.js +0 -12
  254. package/dist/functions/integrations/ag-grid/generateLicense.js.map +0 -1
  255. package/dist/functions/integrations/uniapp/app-plus/buildAndroidApp.d.ts +0 -30
  256. package/dist/functions/integrations/uniapp/app-plus/buildAndroidApp.js +0 -884
  257. package/dist/functions/integrations/uniapp/app-plus/buildAndroidApp.js.map +0 -1
  258. package/dist/functions/integrations/uniapp/app-plus/buildIOSApp.d.ts +0 -31
  259. package/dist/functions/integrations/uniapp/app-plus/buildIOSApp.js +0 -900
  260. package/dist/functions/integrations/uniapp/app-plus/buildIOSApp.js.map +0 -1
  261. package/dist/functions/integrations/uniapp/build.d.ts +0 -21
  262. package/dist/functions/integrations/uniapp/build.js +0 -83
  263. package/dist/functions/integrations/uniapp/build.js.map +0 -1
  264. package/dist/functions/integrations/uniapp/detectAndroidProjectStructure.d.ts +0 -11
  265. package/dist/functions/integrations/uniapp/detectAndroidProjectStructure.js +0 -30
  266. package/dist/functions/integrations/uniapp/detectAndroidProjectStructure.js.map +0 -1
  267. package/dist/functions/integrations/uniapp/detectProjectType.d.ts +0 -20
  268. package/dist/functions/integrations/uniapp/detectProjectType.js +0 -68
  269. package/dist/functions/integrations/uniapp/detectProjectType.js.map +0 -1
  270. package/dist/functions/integrations/uniapp/parseManifest.d.ts +0 -20
  271. package/dist/functions/integrations/uniapp/parseManifest.js +0 -51
  272. package/dist/functions/integrations/uniapp/parseManifest.js.map +0 -1
  273. package/dist/functions/integrations/uniapp/waitForPages.d.ts +0 -7
  274. package/dist/functions/integrations/uniapp/waitForPages.js +0 -20
  275. package/dist/functions/integrations/uniapp/waitForPages.js.map +0 -1
  276. package/dist/functions/integrations/vue/dynamicMount.d.ts +0 -18
  277. package/dist/functions/integrations/vue/dynamicMount.js +0 -25
  278. package/dist/functions/integrations/vue/dynamicMount.js.map +0 -1
  279. package/dist/functions/integrations/vue/extractColorsFromVueFile.d.ts +0 -3
  280. package/dist/functions/integrations/vue/extractColorsFromVueFile.js +0 -18
  281. package/dist/functions/integrations/vue/extractColorsFromVueFile.js.map +0 -1
  282. package/dist/functions/integrations/vue/extractColorsFromVueSection.d.ts +0 -3
  283. package/dist/functions/integrations/vue/extractColorsFromVueSection.js +0 -53
  284. package/dist/functions/integrations/vue/extractColorsFromVueSection.js.map +0 -1
  285. package/dist/functions/integrations/vue/filterSections.d.ts +0 -2
  286. package/dist/functions/integrations/vue/filterSections.js +0 -11
  287. package/dist/functions/integrations/vue/filterSections.js.map +0 -1
  288. package/dist/functions/integrations/vue/isVNode.d.ts +0 -2
  289. package/dist/functions/integrations/vue/isVNode.js +0 -6
  290. package/dist/functions/integrations/vue/isVNode.js.map +0 -1
  291. package/dist/functions/integrations/vue/isVueComponent.d.ts +0 -2
  292. package/dist/functions/integrations/vue/isVueComponent.js +0 -6
  293. package/dist/functions/integrations/vue/isVueComponent.js.map +0 -1
  294. package/dist/functions/integrations/vue/parseVueFile.d.ts +0 -2
  295. package/dist/functions/integrations/vue/parseVueFile.js +0 -53
  296. package/dist/functions/integrations/vue/parseVueFile.js.map +0 -1
  297. package/dist/functions/integrations/wechat/miniapp/downloadFile.d.ts +0 -6
  298. package/dist/functions/integrations/wechat/miniapp/downloadFile.js +0 -39
  299. package/dist/functions/integrations/wechat/miniapp/downloadFile.js.map +0 -1
  300. package/dist/functions/patterns/MyPromise.d.ts +0 -32
  301. package/dist/functions/patterns/MyPromise.js +0 -254
  302. package/dist/functions/patterns/MyPromise.js.map +0 -1
  303. package/dist/functions/patterns/functionBind.d.ts +0 -4
  304. package/dist/functions/patterns/functionBind.js +0 -33
  305. package/dist/functions/patterns/functionBind.js.map +0 -1
  306. package/dist/functions/patterns/myInstanceof.d.ts +0 -5
  307. package/dist/functions/patterns/myInstanceof.js +0 -56
  308. package/dist/functions/patterns/myInstanceof.js.map +0 -1
  309. package/dist/functions/patterns/myNew.d.ts +0 -3
  310. package/dist/functions/patterns/myNew.js +0 -19
  311. package/dist/functions/patterns/myNew.js.map +0 -1
  312. package/dist/functions/platform/android/buildProject.d.ts +0 -13
  313. package/dist/functions/platform/android/buildProject.js +0 -122
  314. package/dist/functions/platform/android/buildProject.js.map +0 -1
  315. package/dist/functions/platform/android/configureAppIcon.d.ts +0 -17
  316. package/dist/functions/platform/android/configureAppIcon.js +0 -106
  317. package/dist/functions/platform/android/configureAppIcon.js.map +0 -1
  318. package/dist/functions/platform/android/configureLaunchScreen.d.ts +0 -21
  319. package/dist/functions/platform/android/configureLaunchScreen.js +0 -328
  320. package/dist/functions/platform/android/configureLaunchScreen.js.map +0 -1
  321. package/dist/functions/platform/android/detectAndroidModules.d.ts +0 -8
  322. package/dist/functions/platform/android/detectAndroidModules.js +0 -21
  323. package/dist/functions/platform/android/detectAndroidModules.js.map +0 -1
  324. package/dist/functions/platform/android/integrateFacebookLogin.d.ts +0 -12
  325. package/dist/functions/platform/android/integrateFacebookLogin.js +0 -91
  326. package/dist/functions/platform/android/integrateFacebookLogin.js.map +0 -1
  327. package/dist/functions/platform/android/integrateGoogleLogin.d.ts +0 -10
  328. package/dist/functions/platform/android/integrateGoogleLogin.js +0 -199
  329. package/dist/functions/platform/android/integrateGoogleLogin.js.map +0 -1
  330. package/dist/functions/platform/android/integrateMiuiLogin.d.ts +0 -13
  331. package/dist/functions/platform/android/integrateMiuiLogin.js +0 -115
  332. package/dist/functions/platform/android/integrateMiuiLogin.js.map +0 -1
  333. package/dist/functions/platform/android/integrateQQLogin.d.ts +0 -12
  334. package/dist/functions/platform/android/integrateQQLogin.js +0 -130
  335. package/dist/functions/platform/android/integrateQQLogin.js.map +0 -1
  336. package/dist/functions/platform/android/integrateShareTrace.d.ts +0 -10
  337. package/dist/functions/platform/android/integrateShareTrace.js +0 -181
  338. package/dist/functions/platform/android/integrateShareTrace.js.map +0 -1
  339. package/dist/functions/platform/android/integrateSinaLogin.d.ts +0 -13
  340. package/dist/functions/platform/android/integrateSinaLogin.js +0 -85
  341. package/dist/functions/platform/android/integrateSinaLogin.js.map +0 -1
  342. package/dist/functions/platform/android/integrateThirdPartyModule.d.ts +0 -46
  343. package/dist/functions/platform/android/integrateThirdPartyModule.js +0 -251
  344. package/dist/functions/platform/android/integrateThirdPartyModule.js.map +0 -1
  345. package/dist/functions/platform/android/integrateUniAppNativePlugin.d.ts +0 -22
  346. package/dist/functions/platform/android/integrateUniAppNativePlugin.js +0 -631
  347. package/dist/functions/platform/android/integrateUniAppNativePlugin.js.map +0 -1
  348. package/dist/functions/platform/android/integrateUniverifyLogin.d.ts +0 -11
  349. package/dist/functions/platform/android/integrateUniverifyLogin.js +0 -314
  350. package/dist/functions/platform/android/integrateUniverifyLogin.js.map +0 -1
  351. package/dist/functions/platform/android/integrateWechatLogin.d.ts +0 -13
  352. package/dist/functions/platform/android/integrateWechatLogin.js +0 -154
  353. package/dist/functions/platform/android/integrateWechatLogin.js.map +0 -1
  354. package/dist/functions/platform/android/integrateWechatShare.d.ts +0 -13
  355. package/dist/functions/platform/android/integrateWechatShare.js +0 -154
  356. package/dist/functions/platform/android/integrateWechatShare.js.map +0 -1
  357. package/dist/functions/platform/android/modifyGradle.d.ts +0 -28
  358. package/dist/functions/platform/android/modifyGradle.js +0 -119
  359. package/dist/functions/platform/android/modifyGradle.js.map +0 -1
  360. package/dist/functions/platform/android/modifyManifest.d.ts +0 -39
  361. package/dist/functions/platform/android/modifyManifest.js +0 -225
  362. package/dist/functions/platform/android/modifyManifest.js.map +0 -1
  363. package/dist/functions/platform/android/permission.d.ts +0 -54
  364. package/dist/functions/platform/android/permission.js +0 -85
  365. package/dist/functions/platform/android/permission.js.map +0 -1
  366. package/dist/functions/platform/ios/configureAppIcon.d.ts +0 -17
  367. package/dist/functions/platform/ios/configureAppIcon.js +0 -149
  368. package/dist/functions/platform/ios/configureAppIcon.js.map +0 -1
  369. package/dist/functions/platform/ios/configureLaunchScreen.d.ts +0 -17
  370. package/dist/functions/platform/ios/configureLaunchScreen.js +0 -150
  371. package/dist/functions/platform/ios/configureLaunchScreen.js.map +0 -1
  372. package/dist/functions/platform/ios/configurePermissions.d.ts +0 -19
  373. package/dist/functions/platform/ios/configurePermissions.js +0 -120
  374. package/dist/functions/platform/ios/configurePermissions.js.map +0 -1
  375. package/dist/functions/platform/ios/integrateNativePlugin.d.ts +0 -35
  376. package/dist/functions/platform/ios/integrateNativePlugin.js +0 -994
  377. package/dist/functions/platform/ios/integrateNativePlugin.js.map +0 -1
  378. package/dist/functions/platform/ios/integrateQQShare.d.ts +0 -14
  379. package/dist/functions/platform/ios/integrateQQShare.js +0 -132
  380. package/dist/functions/platform/ios/integrateQQShare.js.map +0 -1
  381. package/dist/functions/platform/ios/integrateSinaShare.d.ts +0 -16
  382. package/dist/functions/platform/ios/integrateSinaShare.js +0 -108
  383. package/dist/functions/platform/ios/integrateSinaShare.js.map +0 -1
  384. package/dist/functions/platform/ios/integrateThirdPartyModule.d.ts +0 -62
  385. package/dist/functions/platform/ios/integrateThirdPartyModule.js +0 -883
  386. package/dist/functions/platform/ios/integrateThirdPartyModule.js.map +0 -1
  387. package/dist/functions/platform/ios/integrateWechatOauth.d.ts +0 -14
  388. package/dist/functions/platform/ios/integrateWechatOauth.js +0 -107
  389. package/dist/functions/platform/ios/integrateWechatOauth.js.map +0 -1
  390. package/dist/functions/platform/ios/integrateWechatShare.d.ts +0 -14
  391. package/dist/functions/platform/ios/integrateWechatShare.js +0 -101
  392. package/dist/functions/platform/ios/integrateWechatShare.js.map +0 -1
  393. package/dist/functions/platform/ios/modifyInfoPlistKeyValue.d.ts +0 -2
  394. package/dist/functions/platform/ios/modifyInfoPlistKeyValue.js +0 -45
  395. package/dist/functions/platform/ios/modifyInfoPlistKeyValue.js.map +0 -1
  396. package/dist/functions/platform/ios/safelyModifyProjectPbxproj.d.ts +0 -16
  397. package/dist/functions/platform/ios/safelyModifyProjectPbxproj.js +0 -136
  398. package/dist/functions/platform/ios/safelyModifyProjectPbxproj.js.map +0 -1
  399. package/dist/functions/platform/ios/useAltool.d.ts +0 -39
  400. package/dist/functions/platform/ios/useAltool.js +0 -350
  401. package/dist/functions/platform/ios/useAltool.js.map +0 -1
  402. package/dist/functions/style/buildTokens.d.ts +0 -76
  403. package/dist/functions/style/buildTokens.js +0 -183
  404. package/dist/functions/style/buildTokens.js.map +0 -1
  405. package/dist/functions/style/extractCssVariables.d.ts +0 -16
  406. package/dist/functions/style/extractCssVariables.js +0 -256
  407. package/dist/functions/style/extractCssVariables.js.map +0 -1
  408. package/dist/functions/style/generateVariables.d.ts +0 -7
  409. package/dist/functions/style/generateVariables.js +0 -135
  410. package/dist/functions/style/generateVariables.js.map +0 -1
  411. package/dist/functions/style/mixColors.d.ts +0 -1
  412. package/dist/functions/style/mixColors.js +0 -38
  413. package/dist/functions/style/mixColors.js.map +0 -1
  414. package/dist/functions/style/parseDesignTokens.d.ts +0 -10
  415. package/dist/functions/style/parseDesignTokens.js +0 -216
  416. package/dist/functions/style/parseDesignTokens.js.map +0 -1
  417. package/dist/functions/uniapp/app-plus/buildAndroidPlugin.d.ts +0 -3
  418. package/dist/functions/uniapp/app-plus/buildAndroidPlugin.js +0 -509
  419. package/dist/functions/uniapp/app-plus/buildAndroidPlugin.js.map +0 -1
  420. package/dist/functions/uniapp/app-plus/buildIOSPlugin.d.ts +0 -3
  421. package/dist/functions/uniapp/app-plus/buildIOSPlugin.js +0 -406
  422. package/dist/functions/uniapp/app-plus/buildIOSPlugin.js.map +0 -1
  423. package/dist/functions/validation/parseJwtPayload.d.ts +0 -7
  424. package/dist/functions/validation/parseJwtPayload.js +0 -33
  425. package/dist/functions/validation/parseJwtPayload.js.map +0 -1
  426. package/dist/functions/validation/validate.d.ts +0 -11
  427. package/dist/functions/validation/validate.js +0 -44
  428. package/dist/functions/validation/validate.js.map +0 -1
@@ -1,131 +0,0 @@
1
- export function deepClone(value, options = {}) {
2
- const cache = new WeakMap();
3
- function clone(val) {
4
- if (val === null || typeof val !== 'object') {
5
- return val;
6
- }
7
- if (cache.has(val)) {
8
- return cache.get(val);
9
- }
10
- if (options.customClone) {
11
- const customResult = options.customClone(val, clone);
12
- if (customResult !== undefined) {
13
- return customResult;
14
- }
15
- }
16
- const type = Object.prototype.toString.call(val);
17
- if (type === '[object Date]') {
18
- return new Date(val.getTime());
19
- }
20
- if (type === '[object RegExp]') {
21
- const pattern = val.source;
22
- const flags = val.flags;
23
- return new RegExp(pattern, flags);
24
- }
25
- if (val instanceof Error) {
26
- const errorCopy = new val.constructor(val.message);
27
- errorCopy.stack = val.stack;
28
- errorCopy.name = val.name;
29
- return errorCopy;
30
- }
31
- if (type === '[object Map]') {
32
- const mapCopy = new Map();
33
- cache.set(val, mapCopy);
34
- val.forEach((value, key) => {
35
- mapCopy.set(clone(key), clone(value));
36
- });
37
- return mapCopy;
38
- }
39
- if (type === '[object Set]') {
40
- const setCopy = new Set();
41
- cache.set(val, setCopy);
42
- val.forEach(value => {
43
- setCopy.add(clone(value));
44
- });
45
- return setCopy;
46
- }
47
- if (type === '[object WeakMap]') {
48
- return new WeakMap();
49
- }
50
- if (type === '[object WeakSet]') {
51
- return new WeakSet();
52
- }
53
- if (type === '[object ArrayBuffer]') {
54
- const buffer = val;
55
- const copy = new ArrayBuffer(buffer.byteLength);
56
- new Uint8Array(copy).set(new Uint8Array(buffer));
57
- return copy;
58
- }
59
- if (ArrayBuffer.isView(val) && !(val instanceof DataView)) {
60
- const typedArray = val;
61
- const TypedArrayConstructor = typedArray.constructor;
62
- const copy = new TypedArrayConstructor(typedArray.length);
63
- copy.set(typedArray);
64
- return copy;
65
- }
66
- if (type === '[object DataView]') {
67
- const dataView = val;
68
- const bufferCopy = clone(dataView.buffer);
69
- return new DataView(bufferCopy, dataView.byteOffset, dataView.byteLength);
70
- }
71
- if (Array.isArray(val)) {
72
- const arrCopy = [];
73
- cache.set(val, arrCopy);
74
- for (let i = 0; i < val.length; i++) {
75
- arrCopy[i] = clone(val[i]);
76
- }
77
- return arrCopy;
78
- }
79
- let objCopy;
80
- if (options.includePrototype) {
81
- objCopy = Object.create(Object.getPrototypeOf(val));
82
- }
83
- else {
84
- objCopy = {};
85
- }
86
- cache.set(val, objCopy);
87
- for (const key in val) {
88
- if (Object.prototype.hasOwnProperty.call(val, key)) {
89
- objCopy[key] = clone(val[key]);
90
- }
91
- }
92
- if (options.includeNonEnumerable) {
93
- const propertyNames = Object.getOwnPropertyNames(val);
94
- for (const key of propertyNames) {
95
- if (!objCopy.hasOwnProperty(key)) {
96
- const descriptor = Object.getOwnPropertyDescriptor(val, key);
97
- if (descriptor) {
98
- Object.defineProperty(objCopy, key, {
99
- ...descriptor,
100
- value: clone(descriptor.value)
101
- });
102
- }
103
- }
104
- }
105
- }
106
- if (options.includeSymbol) {
107
- const symbols = Object.getOwnPropertySymbols(val);
108
- for (const symbol of symbols) {
109
- const descriptor = Object.getOwnPropertyDescriptor(val, symbol);
110
- if (descriptor) {
111
- Object.defineProperty(objCopy, symbol, {
112
- ...descriptor,
113
- value: clone(descriptor.value)
114
- });
115
- }
116
- }
117
- }
118
- return objCopy;
119
- }
120
- return clone(value);
121
- }
122
- export function deepCloneJSON(value) {
123
- return JSON.parse(JSON.stringify(value));
124
- }
125
- export function deepCloneStructured(value, deps) {
126
- if (deps.structuredClone) {
127
- return deps.structuredClone(value);
128
- }
129
- return deepClone(value);
130
- }
131
- //# sourceMappingURL=deepClone.js.map
@@ -1 +0,0 @@
1
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AAC,OAAO,EAAE,MAAM,EAAE;wBACrC,GAAG,UAAU;wBACb,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC;qBAC/B,CAAC,CAAA;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,OAAO,KAAK,CAAC,KAAK,CAAC,CAAA;AACrB,CAAC;AAiBD,MAAM,UAAU,aAAa,CAAI,KAAQ;IACvC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAA;AAC1C,CAAC;AAsBD,MAAM,UAAU,mBAAmB,CAAI,KAAQ,EAAE,IAA6B;IAE5E,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAA;IACpC,CAAC;IAGD,OAAO,SAAS,CAAC,KAAK,CAAC,CAAA;AACzB,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare function evolve<T extends Record<string, any>>(transformations: {
2
- [K in keyof T]?: T[K] extends (infer U)[] ? (value: T[K]) => U[] : T[K] extends Record<string, any> ? (value: T[K]) => any : (value: T[K]) => any;
3
- }): (obj: T) => any;
@@ -1,15 +0,0 @@
1
- export function evolve(transformations) {
2
- return (obj) => {
3
- if (!obj || typeof obj !== 'object')
4
- return obj;
5
- const result = { ...obj };
6
- for (const key in transformations) {
7
- if (obj.hasOwnProperty(key) && transformations[key]) {
8
- const transform = transformations[key];
9
- result[key] = transform(obj[key]);
10
- }
11
- }
12
- return result;
13
- };
14
- }
15
- //# sourceMappingURL=evolve.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"evolve.js","sourceRoot":"","sources":["../../../../src/functions/data/array-object/evolve.ts"],"names":[],"mappings":"AAaA,MAAM,UAAU,MAAM,CACpB,eAMC;IAED,OAAO,CAAC,GAAM,EAAO,EAAE;QACrB,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,OAAO,GAAG,CAAA;QAE/C,MAAM,MAAM,GAAQ,EAAE,GAAG,GAAG,EAAE,CAAA;QAE9B,KAAK,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YAClC,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;gBACpD,MAAM,SAAS,GAAG,eAAe,CAAC,GAAG,CAAa,CAAA;gBAClD,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;YACnC,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC,CAAA;AACH,CAAC"}
@@ -1,7 +0,0 @@
1
- export declare function flatten<T>(arr: any[], depth?: number): T[];
2
- export declare function flattenReduce<T>(arr: any[], depth?: number): T[];
3
- export declare function flattenIterative<T>(arr: any[]): T[];
4
- export declare function flattenGenerator(arr: any[]): Generator<any>;
5
- export declare function flattenWithGenerator<T>(arr: any[]): T[];
6
- export declare function flattenToString(arr: any[]): number[];
7
- export declare function flattenNative<T>(arr: any[], depth?: number): T[];
@@ -1,60 +0,0 @@
1
- export function flatten(arr, depth = Infinity) {
2
- const result = [];
3
- function flattenHelper(items, currentDepth) {
4
- for (const item of items) {
5
- if (Array.isArray(item) && currentDepth > 0) {
6
- flattenHelper(item, currentDepth - 1);
7
- }
8
- else {
9
- result.push(item);
10
- }
11
- }
12
- }
13
- flattenHelper(arr, depth);
14
- return result;
15
- }
16
- export function flattenReduce(arr, depth = Infinity) {
17
- if (depth <= 0) {
18
- return arr.slice();
19
- }
20
- return arr.reduce((acc, item) => {
21
- if (Array.isArray(item)) {
22
- return acc.concat(flattenReduce(item, depth - 1));
23
- }
24
- return acc.concat(item);
25
- }, []);
26
- }
27
- export function flattenIterative(arr) {
28
- const stack = [...arr];
29
- const result = [];
30
- while (stack.length) {
31
- const item = stack.pop();
32
- if (Array.isArray(item)) {
33
- stack.push(...item);
34
- }
35
- else {
36
- result.unshift(item);
37
- }
38
- }
39
- return result;
40
- }
41
- export function* flattenGenerator(arr) {
42
- for (const item of arr) {
43
- if (Array.isArray(item)) {
44
- yield* flattenGenerator(item);
45
- }
46
- else {
47
- yield item;
48
- }
49
- }
50
- }
51
- export function flattenWithGenerator(arr) {
52
- return [...flattenGenerator(arr)];
53
- }
54
- export function flattenToString(arr) {
55
- return arr.toString().split(',').map(Number);
56
- }
57
- export function flattenNative(arr, depth = Infinity) {
58
- return arr.flat(depth);
59
- }
60
- //# sourceMappingURL=flatten.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten.js","sourceRoot":"","sources":["../../../../src/functions/data/array-object/flatten.ts"],"names":[],"mappings":"AAeA,MAAM,UAAU,OAAO,CAAI,GAAU,EAAE,QAAgB,QAAQ;IAC7D,MAAM,MAAM,GAAQ,EAAE,CAAA;IAEtB,SAAS,aAAa,CAAC,KAAY,EAAE,YAAoB;QACvD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;gBAC5C,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,CAAC,CAAC,CAAA;YACvC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACnB,CAAC;QACH,CAAC;IACH,CAAC;IAED,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACzB,OAAO,MAAM,CAAA;AACf,CAAC;AAKD,MAAM,UAAU,aAAa,CAAI,GAAU,EAAE,QAAgB,QAAQ;IACnE,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QACf,OAAO,GAAG,CAAC,KAAK,EAAE,CAAA;IACpB,CAAC;IAED,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;QAC9B,IAAI,KAAK,CAAC,OAA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,GAAG,CAAC,MAAM,CAAC,CAAA;AAC9C,CAAC;AAKD,MAAM,UAAU,aAAa,CAAI,GAAU,EAAE,QAAgB,QAAQ;IACnE,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACxB,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare function flattenObject(obj: Record<string, any>, prefix?: string): Record<string, any>;
2
- export declare function flattenObjectWithArray(obj: Record<string, any>, prefix?: string): Record<string, any>;
3
- export declare function unflattenObject(obj: Record<string, any>): Record<string, any>;
4
- export declare function flattenObjectKeepArray(obj: Record<string, any>, prefix?: string): Record<string, any>;
5
- export declare function flattenObjectDeep(obj: any, prefix?: string): Record<string, any>;
@@ -1,102 +0,0 @@
1
- export function flattenObject(obj, prefix = '') {
2
- const result = {};
3
- for (const key in obj) {
4
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
5
- const newKey = prefix ? `${prefix}.${key}` : key;
6
- const value = obj[key];
7
- if (value !== null && typeof value === 'object' && !Array.isArray(value)) {
8
- Object.assign(result, flattenObject(value, newKey));
9
- }
10
- else {
11
- result[newKey] = value;
12
- }
13
- }
14
- }
15
- return result;
16
- }
17
- export function flattenObjectWithArray(obj, prefix = '') {
18
- const result = {};
19
- for (const key in obj) {
20
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
21
- const newKey = prefix ? `${prefix}[${key}]` : key;
22
- const value = obj[key];
23
- if (value !== null && typeof value === 'object' && !Array.isArray(value)) {
24
- Object.assign(result, flattenObjectWithArray(value, newKey));
25
- }
26
- else {
27
- result[newKey] = value;
28
- }
29
- }
30
- }
31
- return result;
32
- }
33
- export function unflattenObject(obj) {
34
- const result = {};
35
- for (const key in obj) {
36
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
37
- const keys = key.split('.');
38
- let current = result;
39
- for (let i = 0; i < keys.length - 1; i++) {
40
- const k = keys[i];
41
- if (!(k in current)) {
42
- current[k] = {};
43
- }
44
- current = current[k];
45
- }
46
- current[keys[keys.length - 1]] = obj[key];
47
- }
48
- }
49
- return result;
50
- }
51
- export function flattenObjectKeepArray(obj, prefix = '') {
52
- const result = {};
53
- for (const key in obj) {
54
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
55
- const newKey = prefix ? `${prefix}.${key}` : key;
56
- const value = obj[key];
57
- if (Array.isArray(value)) {
58
- result[newKey] = value;
59
- }
60
- else if (value !== null && typeof value === 'object') {
61
- Object.assign(result, flattenObjectKeepArray(value, newKey));
62
- }
63
- else {
64
- result[newKey] = value;
65
- }
66
- }
67
- }
68
- return result;
69
- }
70
- export function flattenObjectDeep(obj, prefix = '') {
71
- const result = {};
72
- if (Array.isArray(obj)) {
73
- obj.forEach((item, index) => {
74
- const newKey = prefix ? `${prefix}.${index}` : String(index);
75
- if (item !== null && typeof item === 'object') {
76
- Object.assign(result, flattenObjectDeep(item, newKey));
77
- }
78
- else {
79
- result[newKey] = item;
80
- }
81
- });
82
- }
83
- else if (obj !== null && typeof obj === 'object') {
84
- for (const key in obj) {
85
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
86
- const newKey = prefix ? `${prefix}.${key}` : key;
87
- const value = obj[key];
88
- if (value !== null && typeof value === 'object') {
89
- Object.assign(result, flattenObjectDeep(value, newKey));
90
- }
91
- else {
92
- result[newKey] = value;
93
- }
94
- }
95
- }
96
- }
97
- else {
98
- result[prefix] = obj;
99
- }
100
- return result;
101
- }
102
- //# sourceMappingURL=flattenObject.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flattenObject.js","sourceRoot":"","sources":["../../../../src/functions/data/array-object/flattenObject.ts"],"names":[],"mappings":"AAqBA,MAAM,UAAU,aAAa,CAC3B,GAAwB,EACxB,SAAiB,EAAE;IAEnB,MAAM,MAAM,GAAwB,EAAE,CAAA;IAEtC,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAA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K,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;YACtB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;gBACnD,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;gBAChD,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAA;gBAEtB,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;oBAChD,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAA;gBACzD,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAA;gBACxB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;IACtB,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -1 +0,0 @@
1
- export declare function groupBy<T>(array: T[], keyOrFn: keyof T | ((item: T) => string | number)): Record<string, T[]>;
@@ -1,14 +0,0 @@
1
- export function groupBy(array, keyOrFn) {
2
- const result = {};
3
- for (const item of array) {
4
- const key = typeof keyOrFn === 'function'
5
- ? String(keyOrFn(item))
6
- : String(item[keyOrFn]);
7
- if (!result[key]) {
8
- result[key] = [];
9
- }
10
- result[key].push(item);
11
- }
12
- return result;
13
- }
14
- //# sourceMappingURL=groupBy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"groupBy.js","sourceRoot":"","sources":["../../../../src/functions/data/array-object/groupBy.ts"],"names":[],"mappings":"AAwBA,MAAM,UAAU,OAAO,CACrB,KAAU,EACV,OAAiD;IAEjD,MAAM,MAAM,GAAwB,EAAE,CAAA;IAEtC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,OAAO,OAAO,KAAK,UAAU;YACvC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACvB,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAA;QAEzB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;YACjB,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAA;QAClB,CAAC;QAED,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACxB,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -1 +0,0 @@
1
- export declare function omit<T extends object, K extends keyof T>(obj: T, keys: K[]): Omit<T, K>;
@@ -1,8 +0,0 @@
1
- export function omit(obj, keys) {
2
- const result = { ...obj };
3
- for (const key of keys) {
4
- delete result[key];
5
- }
6
- return result;
7
- }
8
- //# sourceMappingURL=omit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"omit.js","sourceRoot":"","sources":["../../../../src/functions/data/array-object/omit.ts"],"names":[],"mappings":"AAoBA,MAAM,UAAU,IAAI,CAClB,GAAM,EACN,IAAS;IAET,MAAM,MAAM,GAAG,EAAE,GAAG,GAAG,EAAS,CAAA;IAEhC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,OAAO,MAAM,CAAC,GAAG,CAAC,CAAA;IACpB,CAAC;IAED,OAAO,MAAoB,CAAA;AAC7B,CAAC"}
@@ -1 +0,0 @@
1
- export declare function pick<T extends object, K extends keyof T>(obj: T, keys: K[]): Pick<T, K>;
@@ -1,10 +0,0 @@
1
- export function pick(obj, keys) {
2
- const result = {};
3
- for (const key of keys) {
4
- if (key in obj) {
5
- result[key] = obj[key];
6
- }
7
- }
8
- return result;
9
- }
10
- //# sourceMappingURL=pick.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pick.js","sourceRoot":"","sources":["../../../../src/functions/data/array-object/pick.ts"],"names":[],"mappings":"AAoBA,MAAM,UAAU,IAAI,CAClB,GAAM,EACN,IAAS;IAET,MAAM,MAAM,GAAG,EAAgB,CAAA;IAE/B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;YACf,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAA;QACxB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -1 +0,0 @@
1
- export declare function shuffle<T>(array: T[]): T[];
@@ -1,9 +0,0 @@
1
- export function shuffle(array) {
2
- const result = [...array];
3
- for (let i = result.length - 1; i > 0; i--) {
4
- const j = Math.floor(Math.random() * (i + 1));
5
- [result[i], result[j]] = [result[j], result[i]];
6
- }
7
- return result;
8
- }
9
- //# sourceMappingURL=shuffle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shuffle.js","sourceRoot":"","sources":["../../../../src/functions/data/array-object/shuffle.ts"],"names":[],"mappings":"AAaA,MAAM,UAAU,OAAO,CAAI,KAAU;IACnC,MAAM,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,CAAA;IAEzB,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3C,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAC5C;QAAA,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IAClD,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -1 +0,0 @@
1
- export declare function sortBy<T>(array: T[], keyOrFn: keyof T | ((item: T) => any), order?: 'asc' | 'desc'): T[];
@@ -1,13 +0,0 @@
1
- export function sortBy(array, keyOrFn, order = 'asc') {
2
- const sorted = [...array].sort((a, b) => {
3
- const aValue = typeof keyOrFn === 'function' ? keyOrFn(a) : a[keyOrFn];
4
- const bValue = typeof keyOrFn === 'function' ? keyOrFn(b) : b[keyOrFn];
5
- if (aValue < bValue)
6
- return order === 'asc' ? -1 : 1;
7
- if (aValue > bValue)
8
- return order === 'asc' ? 1 : -1;
9
- return 0;
10
- });
11
- return sorted;
12
- }
13
- //# sourceMappingURL=sortBy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sortBy.js","sourceRoot":"","sources":["../../../../src/functions/data/array-object/sortBy.ts"],"names":[],"mappings":"AAyBA,MAAM,UAAU,MAAM,CACpB,KAAU,EACV,OAAqC,EACrC,QAAwB,KAAK;IAE7B,MAAM,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACtC,MAAM,MAAM,GAAG,OAAO,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;QACtE,MAAM,MAAM,GAAG,OAAO,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;QAEtE,IAAI,MAAM,GAAG,MAAM;YAAE,OAAO,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACpD,IAAI,MAAM,GAAG,MAAM;YAAE,OAAO,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACpD,OAAO,CAAC,CAAA;IACV,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -1,10 +0,0 @@
1
- export declare function unique<T>(arr: T[]): T[];
2
- export declare function uniqueLoop<T>(arr: T[]): T[];
3
- export declare function uniqueIndexOf<T>(arr: T[]): T[];
4
- export declare function uniqueIncludes<T>(arr: T[]): T[];
5
- export declare function uniqueFilter<T>(arr: T[]): T[];
6
- export declare function uniqueReduce<T>(arr: T[]): T[];
7
- export declare function uniqueMap<T>(arr: T[]): T[];
8
- export declare function uniqueBy<T extends Record<string, any>>(arr: T[], key: keyof T): T[];
9
- export declare function uniqueWith<T, K>(arr: T[], fn: (item: T) => K): T[];
10
- export declare function uniqueAndSort(arr: number[]): number[];
@@ -1,85 +0,0 @@
1
- export function unique(arr) {
2
- return [...new Set(arr)];
3
- }
4
- export function uniqueLoop(arr) {
5
- const result = [];
6
- for (let i = 0; i < arr.length; i++) {
7
- let isDuplicate = false;
8
- for (let j = 0; j < result.length; j++) {
9
- if (arr[i] === result[j]) {
10
- isDuplicate = true;
11
- break;
12
- }
13
- }
14
- if (!isDuplicate) {
15
- result.push(arr[i]);
16
- }
17
- }
18
- return result;
19
- }
20
- export function uniqueIndexOf(arr) {
21
- const result = [];
22
- for (let i = 0; i < arr.length; i++) {
23
- if (result.indexOf(arr[i]) === -1) {
24
- result.push(arr[i]);
25
- }
26
- }
27
- return result;
28
- }
29
- export function uniqueIncludes(arr) {
30
- const result = [];
31
- for (const item of arr) {
32
- if (!result.includes(item)) {
33
- result.push(item);
34
- }
35
- }
36
- return result;
37
- }
38
- export function uniqueFilter(arr) {
39
- return arr.filter((item, index) => arr.indexOf(item) === index);
40
- }
41
- export function uniqueReduce(arr) {
42
- return arr.reduce((acc, item) => {
43
- if (!acc.includes(item)) {
44
- acc.push(item);
45
- }
46
- return acc;
47
- }, []);
48
- }
49
- export function uniqueMap(arr) {
50
- const map = new Map();
51
- const result = [];
52
- for (const item of arr) {
53
- if (!map.has(item)) {
54
- map.set(item, true);
55
- result.push(item);
56
- }
57
- }
58
- return result;
59
- }
60
- export function uniqueBy(arr, key) {
61
- const seen = new Set();
62
- return arr.filter(item => {
63
- const value = item[key];
64
- if (seen.has(value)) {
65
- return false;
66
- }
67
- seen.add(value);
68
- return true;
69
- });
70
- }
71
- export function uniqueWith(arr, fn) {
72
- const seen = new Set();
73
- return arr.filter(item => {
74
- const key = fn(item);
75
- if (seen.has(key)) {
76
- return false;
77
- }
78
- seen.add(key);
79
- return true;
80
- });
81
- }
82
- export function uniqueAndSort(arr) {
83
- return [...new Set(arr)].sort((a, b) => a - b);
84
- }
85
- //# sourceMappingURL=unique.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unique.js","sourceRoot":"","sources":["../../../../src/functions/data/array-object/unique.ts"],"names":[],"mappings":"AAcA,MAAM,UAAU,MAAM,CAAI,GAAQ;IAChC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;AAC1B,CAAC;AAQD,MAAM,UAAU,UAAU,CAAI,GAAQ;IACpC,MAAM,MAAM,GAAQ,EAAE,CAAA;IAEtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACpC,IAAI,WAAW,GAAG,KAAK,CAAA;QACvB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;gBACzB,WAAW,GAAG,IAAI,CAAA;gBAClB,MAAK;YACP,CAAC;QACH,CAAC;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACrB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAOD,MAAM,UAAU,aAAa,CAAI,GAA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C,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;AAChD,CAAC"}
@@ -1 +0,0 @@
1
- export declare function dateRange(start: Date | string | number, end: Date | string | number, step?: number): Date[];
@@ -1,18 +0,0 @@
1
- export function dateRange(start, end, step = 1) {
2
- const startDate = typeof start === 'object' ? start : new Date(start);
3
- const endDate = typeof end === 'object' ? end : new Date(end);
4
- if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
5
- throw new Error('Invalid date');
6
- }
7
- if (step <= 0) {
8
- throw new Error('Step must be greater than 0');
9
- }
10
- const result = [];
11
- const current = new Date(startDate);
12
- while (current <= endDate) {
13
- result.push(new Date(current));
14
- current.setDate(current.getDate() + step);
15
- }
16
- return result;
17
- }
18
- //# sourceMappingURL=dateRange.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dateRange.js","sourceRoot":"","sources":["../../../../src/functions/data/date/dateRange.ts"],"names":[],"mappings":"AAoBA,MAAM,UAAU,SAAS,CACvB,KAA6B,EAC7B,GAA2B,EAC3B,OAAe,CAAC;IAEhB,MAAM,SAAS,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAA;IACrE,MAAM,OAAO,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;IAE7D,IAAI,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,CAAA;IACjC,CAAC;IAED,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAA;IAChD,CAAC;IAED,MAAM,MAAM,GAAW,EAAE,CAAA;IACzB,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAA;IAEnC,OAAO,OAAO,IAAI,OAAO,EAAE,CAAC;QAC1B,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAA;QAC9B,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAA;IAC3C,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -1 +0,0 @@
1
- export declare function formatDate(date: Date | number | string, format?: string): string;
@@ -1,21 +0,0 @@
1
- export function formatDate(date, format = 'YYYY-MM-DD HH:mm:ss') {
2
- const d = typeof date === 'object' ? date : new Date(date);
3
- if (isNaN(d.getTime())) {
4
- throw new Error('Invalid date');
5
- }
6
- const pad = (num) => String(num).padStart(2, '0');
7
- const replacements = {
8
- 'YYYY': String(d.getFullYear()),
9
- 'MM': pad(d.getMonth() + 1),
10
- 'DD': pad(d.getDate()),
11
- 'HH': pad(d.getHours()),
12
- 'mm': pad(d.getMinutes()),
13
- 'ss': pad(d.getSeconds())
14
- };
15
- let result = format;
16
- for (const [key, value] of Object.entries(replacements)) {
17
- result = result.replace(key, value);
18
- }
19
- return result;
20
- }
21
- //# sourceMappingURL=formatDate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatDate.js","sourceRoot":"","sources":["../../../../src/functions/data/date/formatDate.ts"],"names":[],"mappings":"AA2BA,MAAM,UAAU,UAAU,CACxB,IAA4B,EAC5B,SAAiB,qBAAqB;IAEtC,MAAM,CAAC,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAA;IAE1D,IAAI,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,CAAA;IACjC,CAAC;IAED,MAAM,GAAG,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;IAEjE,MAAM,YAAY,GAA2B;QAC3C,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QAC/B,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAC3B,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QACtB,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;QACvB,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;QACzB,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;KAC1B,CAAA;IAED,IAAI,MAAM,GAAG,MAAM,CAAA;IACnB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QACxD,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACrC,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -1 +0,0 @@
1
- export declare function timeAgo(date: Date | number | string, locale?: 'zh' | 'en'): string;