@arrai-innovations/reactive-helpers 18.0.0 → 18.0.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.
Files changed (216) hide show
  1. package/package.json +20 -6
  2. package/types/config/listCrud.d.ts +153 -0
  3. package/types/config/listCrud.d.ts.map +1 -0
  4. package/types/config/objectCrud.d.ts +171 -0
  5. package/types/config/objectCrud.d.ts.map +1 -0
  6. package/types/index.d.ts +37 -0
  7. package/types/index.d.ts.map +1 -0
  8. package/types/tests/unit/config/listCrud.spec.d.ts +2 -0
  9. package/types/tests/unit/config/listCrud.spec.d.ts.map +1 -0
  10. package/types/tests/unit/config/objectCrud.spec.d.ts +2 -0
  11. package/types/tests/unit/config/objectCrud.spec.d.ts.map +1 -0
  12. package/types/tests/unit/crudPromise.d.ts +25 -0
  13. package/types/tests/unit/crudPromise.d.ts.map +1 -0
  14. package/types/tests/unit/expectHelpers.d.ts +2 -0
  15. package/types/tests/unit/expectHelpers.d.ts.map +1 -0
  16. package/types/tests/unit/mockOnUnmounted.d.ts +2 -0
  17. package/types/tests/unit/mockOnUnmounted.d.ts.map +1 -0
  18. package/types/tests/unit/poll.d.ts +2 -0
  19. package/types/tests/unit/poll.d.ts.map +1 -0
  20. package/types/tests/unit/use/cancellableIntent.spec.d.ts +2 -0
  21. package/types/tests/unit/use/cancellableIntent.spec.d.ts.map +1 -0
  22. package/types/tests/unit/use/listCalculated.spec.d.ts +2 -0
  23. package/types/tests/unit/use/listCalculated.spec.d.ts.map +1 -0
  24. package/types/tests/unit/use/listFilter.spec.d.ts +2 -0
  25. package/types/tests/unit/use/listFilter.spec.d.ts.map +1 -0
  26. package/types/tests/unit/use/listInstance.spec.d.ts +2 -0
  27. package/types/tests/unit/use/listInstance.spec.d.ts.map +1 -0
  28. package/types/tests/unit/use/listRelated.spec.d.ts +2 -0
  29. package/types/tests/unit/use/listRelated.spec.d.ts.map +1 -0
  30. package/types/tests/unit/use/listSearch.spec.d.ts +2 -0
  31. package/types/tests/unit/use/listSearch.spec.d.ts.map +1 -0
  32. package/types/tests/unit/use/listSort.spec.d.ts +2 -0
  33. package/types/tests/unit/use/listSort.spec.d.ts.map +1 -0
  34. package/types/tests/unit/use/listSubscription.spec.d.ts +2 -0
  35. package/types/tests/unit/use/listSubscription.spec.d.ts.map +1 -0
  36. package/types/tests/unit/use/loadingError.spec.d.ts +2 -0
  37. package/types/tests/unit/use/loadingError.spec.d.ts.map +1 -0
  38. package/types/tests/unit/use/objectInstance.spec.d.ts +2 -0
  39. package/types/tests/unit/use/objectInstance.spec.d.ts.map +1 -0
  40. package/types/tests/unit/use/objectSubscription.spec.d.ts +2 -0
  41. package/types/tests/unit/use/objectSubscription.spec.d.ts.map +1 -0
  42. package/types/tests/unit/use/proxyLoadingError.spec.d.ts +2 -0
  43. package/types/tests/unit/use/proxyLoadingError.spec.d.ts.map +1 -0
  44. package/types/tests/unit/use/search.spec.d.ts +2 -0
  45. package/types/tests/unit/use/search.spec.d.ts.map +1 -0
  46. package/types/tests/unit/utils/assignReactiveObject.spec.d.ts +2 -0
  47. package/types/tests/unit/utils/assignReactiveObject.spec.d.ts.map +1 -0
  48. package/types/tests/unit/utils/classes.spec.d.ts +2 -0
  49. package/types/tests/unit/utils/classes.spec.d.ts.map +1 -0
  50. package/types/tests/unit/utils/deleteKey.spec.d.ts +2 -0
  51. package/types/tests/unit/utils/deleteKey.spec.d.ts.map +1 -0
  52. package/types/tests/unit/utils/flattenPaths.spec.d.ts +2 -0
  53. package/types/tests/unit/utils/flattenPaths.spec.d.ts.map +1 -0
  54. package/types/tests/unit/utils/keyDiff.spec.d.ts +2 -0
  55. package/types/tests/unit/utils/keyDiff.spec.d.ts.map +1 -0
  56. package/types/tests/unit/utils/set.spec.d.ts +2 -0
  57. package/types/tests/unit/utils/set.spec.d.ts.map +1 -0
  58. package/types/tests/unit/utils/watches.spec.d.ts +2 -0
  59. package/types/tests/unit/utils/watches.spec.d.ts.map +1 -0
  60. package/types/use/cancellableIntent.d.ts +129 -0
  61. package/types/use/cancellableIntent.d.ts.map +1 -0
  62. package/types/use/combineClasses.d.ts +43 -0
  63. package/types/use/combineClasses.d.ts.map +1 -0
  64. package/types/use/list.d.ts +176 -0
  65. package/types/use/list.d.ts.map +1 -0
  66. package/types/use/listCalculated.d.ts +192 -0
  67. package/types/use/listCalculated.d.ts.map +1 -0
  68. package/types/use/listFilter.d.ts +203 -0
  69. package/types/use/listFilter.d.ts.map +1 -0
  70. package/types/use/listInstance.d.ts +357 -0
  71. package/types/use/listInstance.d.ts.map +1 -0
  72. package/types/use/listKeys.d.ts +15 -0
  73. package/types/use/listKeys.d.ts.map +1 -0
  74. package/types/use/listRelated.d.ts +239 -0
  75. package/types/use/listRelated.d.ts.map +1 -0
  76. package/types/use/listSearch.d.ts +298 -0
  77. package/types/use/listSearch.d.ts.map +1 -0
  78. package/types/use/listSort.d.ts +235 -0
  79. package/types/use/listSort.d.ts.map +1 -0
  80. package/types/use/listSubscription.d.ts +218 -0
  81. package/types/use/listSubscription.d.ts.map +1 -0
  82. package/types/use/loadingError.d.ts +81 -0
  83. package/types/use/loadingError.d.ts.map +1 -0
  84. package/types/use/object.d.ts +67 -0
  85. package/types/use/object.d.ts.map +1 -0
  86. package/types/use/objectCalculated.d.ts +215 -0
  87. package/types/use/objectCalculated.d.ts.map +1 -0
  88. package/types/use/objectInstance.d.ts +289 -0
  89. package/types/use/objectInstance.d.ts.map +1 -0
  90. package/types/use/objectRelated.d.ts +264 -0
  91. package/types/use/objectRelated.d.ts.map +1 -0
  92. package/types/use/objectSubscription.d.ts +249 -0
  93. package/types/use/objectSubscription.d.ts.map +1 -0
  94. package/types/use/paginatedListInstance.d.ts +51 -0
  95. package/types/use/paginatedListInstance.d.ts.map +1 -0
  96. package/types/use/proxyLoadingError.d.ts +36 -0
  97. package/types/use/proxyLoadingError.d.ts.map +1 -0
  98. package/types/use/search.d.ts +144 -0
  99. package/types/use/search.d.ts.map +1 -0
  100. package/types/use/watchesRunning.d.ts +63 -0
  101. package/types/use/watchesRunning.d.ts.map +1 -0
  102. package/types/utils/assignReactiveObject.d.ts +115 -0
  103. package/types/utils/assignReactiveObject.d.ts.map +1 -0
  104. package/types/utils/classes.d.ts +22 -0
  105. package/types/utils/classes.d.ts.map +1 -0
  106. package/types/utils/compact.d.ts +4 -0
  107. package/types/utils/compact.d.ts.map +1 -0
  108. package/types/utils/deleteKey.d.ts +16 -0
  109. package/types/utils/deleteKey.d.ts.map +1 -0
  110. package/types/utils/flattenPaths.d.ts +23 -0
  111. package/types/utils/flattenPaths.d.ts.map +1 -0
  112. package/types/utils/getFakePk.d.ts +13 -0
  113. package/types/utils/getFakePk.d.ts.map +1 -0
  114. package/types/utils/keepAliveTry.d.ts +15 -0
  115. package/types/utils/keepAliveTry.d.ts.map +1 -0
  116. package/types/utils/keyDiff.d.ts +63 -0
  117. package/types/utils/keyDiff.d.ts.map +1 -0
  118. package/types/utils/loadingCombine.d.ts +9 -0
  119. package/types/utils/loadingCombine.d.ts.map +1 -0
  120. package/types/utils/proxyRunning.d.ts +9 -0
  121. package/types/utils/proxyRunning.d.ts.map +1 -0
  122. package/types/utils/relatedCalculatedHelpers.d.ts +5 -0
  123. package/types/utils/relatedCalculatedHelpers.d.ts.map +1 -0
  124. package/types/utils/set.d.ts +7 -0
  125. package/types/utils/set.d.ts.map +1 -0
  126. package/types/utils/transformWalk.d.ts +2 -0
  127. package/types/utils/transformWalk.d.ts.map +1 -0
  128. package/types/utils/watches.d.ts +155 -0
  129. package/types/utils/watches.d.ts.map +1 -0
  130. package/use/loadingError.js +1 -1
  131. package/.circleci/config.yml +0 -88
  132. package/.commitlintrc.json +0 -25
  133. package/.editorconfig +0 -5
  134. package/.husky/commit-msg +0 -3
  135. package/.husky/pre-commit +0 -3
  136. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  137. package/.idea/encodings.xml +0 -6
  138. package/.idea/inspectionProfiles/Project_Default.xml +0 -7
  139. package/.idea/modules.xml +0 -8
  140. package/.idea/prettier.xml +0 -8
  141. package/.idea/reactive-helpers.iml +0 -15
  142. package/.prettierignore +0 -5
  143. package/.prettierrc.cjs +0 -5
  144. package/.vscode/extensions.json +0 -3
  145. package/docs/README.md +0 -45
  146. package/docs/config/listCrud.md +0 -422
  147. package/docs/config/objectCrud.md +0 -427
  148. package/docs/use/cancellableIntent.md +0 -165
  149. package/docs/use/combineClasses.md +0 -62
  150. package/docs/use/list.md +0 -361
  151. package/docs/use/listCalculated.md +0 -794
  152. package/docs/use/listFilter.md +0 -897
  153. package/docs/use/listInstance.md +0 -559
  154. package/docs/use/listKeys.md +0 -91
  155. package/docs/use/listRelated.md +0 -706
  156. package/docs/use/listSearch.md +0 -903
  157. package/docs/use/listSort.md +0 -1171
  158. package/docs/use/listSubscription.md +0 -393
  159. package/docs/use/loadingError.md +0 -115
  160. package/docs/use/object.md +0 -668
  161. package/docs/use/objectCalculated.md +0 -741
  162. package/docs/use/objectInstance.md +0 -685
  163. package/docs/use/objectRelated.md +0 -723
  164. package/docs/use/objectSubscription.md +0 -538
  165. package/docs/use/paginatedListInstance.md +0 -155
  166. package/docs/use/proxyLoadingError.md +0 -51
  167. package/docs/use/search.md +0 -321
  168. package/docs/use/watchesRunning.md +0 -84
  169. package/docs/utils/assignReactiveObject.md +0 -413
  170. package/docs/utils/classes.md +0 -139
  171. package/docs/utils/compact.md +0 -67
  172. package/docs/utils/deleteKey.md +0 -61
  173. package/docs/utils/flattenPaths.md +0 -53
  174. package/docs/utils/getFakePk.md +0 -39
  175. package/docs/utils/keepAliveTry.md +0 -59
  176. package/docs/utils/keyDiff.md +0 -117
  177. package/docs/utils/loadingCombine.md +0 -30
  178. package/docs/utils/proxyRunning.md +0 -39
  179. package/docs/utils/relatedCalculatedHelpers.md +0 -93
  180. package/docs/utils/set.md +0 -223
  181. package/docs/utils/transformWalk.md +0 -68
  182. package/docs/utils/watches.md +0 -489
  183. package/eslint.config.js +0 -125
  184. package/lint-staged.config.js +0 -10
  185. package/makeTypeDoc.sh +0 -25
  186. package/make_type_doc.js +0 -59
  187. package/tests/unit/config/listCrud.spec.js +0 -114
  188. package/tests/unit/config/objectCrud.spec.js +0 -160
  189. package/tests/unit/crudPromise.js +0 -40
  190. package/tests/unit/expectHelpers.js +0 -6
  191. package/tests/unit/mockOnUnmounted.js +0 -9
  192. package/tests/unit/poll.js +0 -50
  193. package/tests/unit/use/cancellableIntent.spec.js +0 -152
  194. package/tests/unit/use/listCalculated.spec.js +0 -135
  195. package/tests/unit/use/listFilter.spec.js +0 -484
  196. package/tests/unit/use/listInstance.spec.js +0 -1166
  197. package/tests/unit/use/listRelated.spec.js +0 -260
  198. package/tests/unit/use/listSearch.spec.js +0 -586
  199. package/tests/unit/use/listSort.spec.js +0 -418
  200. package/tests/unit/use/listSubscription.spec.js +0 -845
  201. package/tests/unit/use/loadingError.spec.js +0 -43
  202. package/tests/unit/use/objectInstance.spec.js +0 -1525
  203. package/tests/unit/use/objectSubscription.spec.js +0 -849
  204. package/tests/unit/use/proxyLoadingError.spec.js +0 -64
  205. package/tests/unit/use/search.spec.js +0 -248
  206. package/tests/unit/utils/assignReactiveObject.spec.js +0 -593
  207. package/tests/unit/utils/classes.spec.js +0 -427
  208. package/tests/unit/utils/deleteKey.spec.js +0 -265
  209. package/tests/unit/utils/flattenPaths.spec.js +0 -126
  210. package/tests/unit/utils/keyDiff.spec.js +0 -110
  211. package/tests/unit/utils/set.spec.js +0 -81
  212. package/tests/unit/utils/watches.spec.js +0 -276
  213. package/tsconfig.json +0 -19
  214. package/typedoc-local-plugins/customize-output.js +0 -13
  215. package/typedoc.json +0 -11
  216. package/vitest.config.js +0 -11
package/package.json CHANGED
@@ -1,21 +1,36 @@
1
1
  {
2
2
  "name": "@arrai-innovations/reactive-helpers",
3
- "version": "18.0.0",
3
+ "version": "18.0.2",
4
4
  "description": "VueJS 3 utility composition functions to help manipulate objects and lists.",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
+ "types": "types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./index.js",
11
+ "types": "./types/index.d.ts"
12
+ }
13
+ },
14
+ "files": [
15
+ "index.js",
16
+ "README.md",
17
+ "use/",
18
+ "utils/",
19
+ "config/",
20
+ "types/"
21
+ ],
7
22
  "directories": {
8
23
  "use": "use",
9
24
  "utils": "utils",
10
25
  "tests": "tests"
11
26
  },
12
27
  "scripts": {
13
- "test": "npx vitest",
28
+ "test": "npx --no-install vitest",
14
29
  "eslint": "npx --no-install eslint --fix index.js config/**/*.js tests/**/*.js use/**/*.js utils/**/*.js",
15
30
  "prettier": "npx --no-install prettier --write .",
16
- "coverage": "npm test -- --run --coverage=true",
31
+ "coverage": "npm test -- run --coverage=true",
17
32
  "prepare": "npx --no-install husky",
18
- "docs": "node make_type_doc.js"
33
+ "docs": "npx --no-install tsc && node make_type_doc.js"
19
34
  },
20
35
  "repository": {
21
36
  "type": "git",
@@ -28,9 +43,8 @@
28
43
  },
29
44
  "homepage": "https://github.com/arrai-innovations/reactive-helpers#readme",
30
45
  "devDependencies": {
31
- "@arrai-innovations/commitlint-config": "^1.1.0",
46
+ "@arrai-innovations/commitlint-config": "^2.0.0",
32
47
  "@commitlint/cli": "^19.4.0",
33
- "@commitlint/config-conventional": "^19.8.0",
34
48
  "@godaddy/dmd": "^1.0.4",
35
49
  "@trivago/prettier-plugin-sort-imports": "^5.2.1",
36
50
  "@types/browser-util-inspect": "^0.2.4",
@@ -0,0 +1,153 @@
1
+ export function setListCrud({ list, bulkDelete, subscribe, executeAction, args, ...rest }: ListCrudFunctions & Partial<ListCrudArgs>): void;
2
+ export function getListCrud(reactiveCrud: import("vue").UnwrapNestedRefs<ListCrudFunctions & ListCrudArgs>, { props, functions }?: {
3
+ props?: import("vue").UnwrapNestedRefs<{
4
+ crudArgs: object | undefined;
5
+ }>;
6
+ functions?: ListCrudFunctions & ListCrudArgs;
7
+ }): void;
8
+ export type PaginateInfo = {
9
+ /**
10
+ * - The total records.
11
+ */
12
+ totalRecords: number;
13
+ /**
14
+ * - The total pages.
15
+ */
16
+ totalPages: number;
17
+ /**
18
+ * - The per page.
19
+ */
20
+ perPage: number;
21
+ };
22
+ export type PageCallback = (newObjects: import("../use/listInstance.js").ListObject, paginationInfo: PaginateInfo | undefined) => void;
23
+ export type ListFnArgs = {
24
+ /**
25
+ * - The arguments to be passed to the crud functions.
26
+ */
27
+ crudArgs: object;
28
+ /**
29
+ * - The key name of the primary key.
30
+ */
31
+ pkKey: string;
32
+ /**
33
+ * - The arguments to be passed to the retrieve function.
34
+ */
35
+ retrieveArgs: object;
36
+ /**
37
+ * - The arguments to be passed for list crud functions.
38
+ */
39
+ listArgs: object;
40
+ /**
41
+ * - The method to call with new page(s) of data received.
42
+ */
43
+ pageCallback: PageCallback;
44
+ /**
45
+ * - A ref to a boolean indicating whether the request has
46
+ * been cancelled.
47
+ */
48
+ isCancelled: Readonly<import("vue").Ref<boolean>>;
49
+ };
50
+ export type DeleteFnArgs = {
51
+ /**
52
+ * - The arguments to be passed to the crud functions.
53
+ */
54
+ crudArgs: object;
55
+ /**
56
+ * - The ids of the objects to be deleted.
57
+ */
58
+ pks: string[];
59
+ /**
60
+ * - The key name of the primary key.
61
+ */
62
+ pkKey: string;
63
+ };
64
+ export type SubscriptionEventCallback = (newOrUpdatedOrDeleteObject: import("../use/listInstance.js").ListObject | string, action: "create" | "update" | "delete") => void;
65
+ export type SubscribeFnArgs = {
66
+ /**
67
+ * - The arguments to be passed to the crud functions.
68
+ */
69
+ crudArgs: object;
70
+ /**
71
+ * - The key name of the primary key.
72
+ */
73
+ pkKey: string;
74
+ /**
75
+ * - The arguments to be passed to the retrieve function.
76
+ */
77
+ retrieveArgs: object;
78
+ /**
79
+ * - The arguments to be passed for list crud functions.
80
+ */
81
+ listArgs: object;
82
+ /**
83
+ * - The method to call when new data is received.
84
+ */
85
+ subscriptionEventCallback: SubscriptionEventCallback;
86
+ };
87
+ export type ExecuteActionFnArgs = {
88
+ /**
89
+ * - The arguments to be passed to the crud functions.
90
+ */
91
+ crudArgs: object;
92
+ /**
93
+ * - The ids of the objects to be acted upon.
94
+ */
95
+ pks: string[];
96
+ /**
97
+ * - The key name of the primary key.
98
+ */
99
+ pkKey: string;
100
+ /**
101
+ * - The action to execute.
102
+ */
103
+ action: string;
104
+ };
105
+ /**
106
+ * - The list function to get a list of items, returning a boolean indicating success.
107
+ */
108
+ export type ListFn = (ListFnArgs: any) => Promise<boolean> & {
109
+ cancel: () => Promise<void> | void;
110
+ };
111
+ /**
112
+ * - The delete function to bulk delete a list of items.
113
+ */
114
+ export type BulkDeleteFn = (DeleteFnArgs: any) => Promise<boolean> & {
115
+ cancel: () => Promise<void> | void;
116
+ };
117
+ /**
118
+ * - The subscribe function to set up a subscription to a list of items.
119
+ */
120
+ export type SubscribeFn = (SubscribeFnArgs: any) => Promise<boolean> & {
121
+ cancel: () => Promise<void> | void;
122
+ };
123
+ /**
124
+ * - The function to execute a certain action on a list of items, returning the response data or false.
125
+ */
126
+ export type ExecuteActionFn = (ExecuteActionFnArgs: any) => Promise<import("./objectCrud.js").ResponseData | false> & {
127
+ cancel: () => Promise<void> | void;
128
+ };
129
+ export type ListCrudFunctions = {
130
+ /**
131
+ * - The list function to get a list of items.
132
+ */
133
+ list?: ListFn;
134
+ /**
135
+ * - The delete function to bulk delete a list of items.
136
+ */
137
+ bulkDelete?: BulkDeleteFn;
138
+ /**
139
+ * - The function to execute a certain action on a list of items.
140
+ */
141
+ executeAction?: ExecuteActionFn;
142
+ /**
143
+ * - The subscribe function to get a subscription to a list of items.
144
+ */
145
+ subscribe?: SubscribeFn;
146
+ };
147
+ export type ListCrudArgs = {
148
+ /**
149
+ * - The default arguments for the crud functions.
150
+ */
151
+ args?: object;
152
+ };
153
+ //# sourceMappingURL=listCrud.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listCrud.d.ts","sourceRoot":"","sources":["../../config/listCrud.js"],"names":[],"mappings":"AA+GO,2FAJI,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,GAEvC,IAAI,CAWhB;AAYM,0CAPI,OAAO,KAAK,EAAE,gBAAgB,CAAC,iBAAiB,GAAG,YAAY,CAAC,yBAExE;IAEa,KAAK,GAFV,OAAO,KAAK,EAAE,gBAAgB,CAAC;QACnC,QAAQ,EAAE,MAAM,GAAC,SAAS,CAAC;KAC9B,CAAC;IACiD,SAAS,GAApD,iBAAiB,GAAG,YAAY;CAC1C,QAmBA;;;;;kBAjIa,MAAM;;;;gBACN,MAAM;;;;aACN,MAAM;;2BAIP,CACN,UAAU,EAAC,OAAO,wBAAwB,EAAE,UAAU,EACtD,cAAc,EAAE,YAAY,GAAC,SAAS,KACvC,IAAI;;;;;cAKI,MAAM;;;;WACN,MAAM;;;;kBACN,MAAM;;;;cACN,MAAM;;;;kBACN,YAAY;;;;;iBACZ,QAAQ,CAAC,OAAO,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;;;;;;cAMpC,MAAM;;;;SACN,MAAM,EAAE;;;;WACR,MAAM;;wCAIP,CACN,0BAA0B,EAAC,OAAO,wBAAwB,EAAE,UAAU,GAAC,MAAM,EAC7E,MAAM,EAAE,QAAQ,GAAC,QAAQ,GAAC,QAAQ,KACnC,IAAI;;;;;cAKI,MAAM;;;;WACN,MAAM;;;;kBACN,MAAM;;;;cACN,MAAM;;;;+BACN,yBAAyB;;;;;;cAKzB,MAAM;;;;SACN,MAAM,EAAE;;;;WACR,MAAM;;;;YACN,MAAM;;;;;qBAIP,CAAC,UAAU,KAAA,KAAG,OAAO,CAAC,OAAO,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAC,IAAI,CAAA;CAAE;;;;2BAIrE,CAAC,YAAY,KAAA,KAAG,OAAO,CAAC,OAAO,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAC,IAAI,CAAA;CAAE;;;;0BAIvE,CAAC,eAAe,KAAA,KAAG,OAAO,CAAC,OAAO,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAC,IAAI,CAAA;CAAE;;;;8BAI1E,CAAC,mBAAmB,KAAA,KAAG,OAAO,CAAC,OAAO,iBAAiB,EAAE,YAAY,GAAC,KAAK,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAC,IAAI,CAAA;CAAE;;;;;WAKlH,MAAM;;;;iBACN,YAAY;;;;oBACZ,eAAe;;;;gBACf,WAAW;;;;;;WAKX,MAAM"}
@@ -0,0 +1,171 @@
1
+ export function setObjectCrud({ retrieve, create, update, patch, delete: deleteFn, subscribe, args, ...rest }: ObjectCrudArgs): void;
2
+ export function getObjectCrud(reactiveCrud: import("vue").UnwrapNestedRefs<object>, { props, functions }?: {
3
+ props?: import("vue").UnwrapNestedRefs<{
4
+ crudArgs: ObjectCrudArgsProperties | undefined;
5
+ }>;
6
+ functions?: ObjectCrudFunctions;
7
+ }): void;
8
+ /**
9
+ * Defines the CRUD-related functions and additional utilities provided by the object instance.
10
+ */
11
+ export type ObjectCrudArgsProperties = {
12
+ /**
13
+ * - The arguments to be passed to the crud functions.
14
+ */
15
+ args?: object;
16
+ };
17
+ export type CreateDetailArgs = {
18
+ /**
19
+ * - The arguments to be passed to the crud functions.
20
+ */
21
+ crudArgs: object;
22
+ /**
23
+ * - The data to be acted upon.
24
+ */
25
+ object: object;
26
+ /**
27
+ * - The arguments to be passed to the retrieve function.
28
+ */
29
+ retrieveArgs: object;
30
+ /**
31
+ * - The key name of the primary key.
32
+ */
33
+ pkKey: string;
34
+ };
35
+ export type RetrieveDetailArgs = {
36
+ /**
37
+ * - The arguments to be passed to the crud functions.
38
+ */
39
+ crudArgs: object;
40
+ /**
41
+ * - The pk of the object to be acted upon.
42
+ */
43
+ pk: string;
44
+ /**
45
+ * - The key name of the primary key.
46
+ */
47
+ pkKey: string;
48
+ /**
49
+ * - The arguments to be passed to the retrieve function.
50
+ */
51
+ retrieveArgs: object;
52
+ };
53
+ export type UpdateDetailArgs = {
54
+ /**
55
+ * - The arguments to be passed to the crud functions.
56
+ */
57
+ crudArgs: object;
58
+ /**
59
+ * - The data to be acted upon.
60
+ */
61
+ object: import("../use/objectInstance.js").CrudObject;
62
+ /**
63
+ * - The arguments to be passed to the retrieve function.
64
+ */
65
+ retrieveArgs: object;
66
+ /**
67
+ * - The key name of the primary key.
68
+ */
69
+ pkKey: string;
70
+ };
71
+ export type DeleteDetailArgs = {
72
+ /**
73
+ * - The arguments to be passed to the crud functions.
74
+ */
75
+ crudArgs: object;
76
+ /**
77
+ * - The pk of the object to be acted upon.
78
+ */
79
+ pk: string;
80
+ /**
81
+ * - The key name of the primary key.
82
+ */
83
+ pkKey: string;
84
+ /**
85
+ * - The arguments to be passed to the retrieve function.
86
+ */
87
+ retrieveArgs: object;
88
+ };
89
+ export type PartialDetailArgs = {
90
+ /**
91
+ * - The arguments to be passed to the crud functions.
92
+ */
93
+ crudArgs: object;
94
+ /**
95
+ * - The pk of the object to be acted upon.
96
+ */
97
+ pk: string;
98
+ /**
99
+ * - The key name of the primary key.
100
+ */
101
+ pkKey: string;
102
+ /**
103
+ * - The data to be acted upon.
104
+ */
105
+ partialObject: object;
106
+ /**
107
+ * - The arguments to be passed to the retrieve function.
108
+ */
109
+ retrieveArgs: object;
110
+ };
111
+ export type SubscribeArgs = {
112
+ /**
113
+ * - The arguments to be passed to the crud functions.
114
+ */
115
+ crudArgs: object;
116
+ /**
117
+ * - The pk of the object to be acted upon.
118
+ */
119
+ pk: string;
120
+ /**
121
+ * - The key name of the primary key.
122
+ */
123
+ pkKey: string;
124
+ /**
125
+ * - The arguments to be passed to the retrieve function.
126
+ */
127
+ retrieveArgs: object;
128
+ /**
129
+ * - The callback to be called when the object is updated.
130
+ */
131
+ callback: (data: import("../use/objectInstance.js").CrudObject, action: string) => void;
132
+ };
133
+ export type ResponseData = Promise<object | string> & {
134
+ cancel: () => Promise<void> | void;
135
+ };
136
+ /**
137
+ * Defines the CRUD-related functions and additional utilities provided by the object instance.
138
+ */
139
+ export type ObjectCrudFunctions = {
140
+ /**
141
+ * - A function to be used instead of the default crud create function.
142
+ */
143
+ create?: (CreateDetailArgs: any) => ResponseData;
144
+ /**
145
+ * - A function to be used instead of the default crud retrieve function.
146
+ */
147
+ retrieve?: (RetrieveDetailArgs: any) => ResponseData;
148
+ /**
149
+ * - A function to be used instead of the default crud update function.
150
+ */
151
+ update?: (UpdateDetailArgs: any) => ResponseData;
152
+ /**
153
+ * - A function to be used instead of the default crud delete function.
154
+ */
155
+ delete?: (DeleteDetailArgs: any) => ResponseData;
156
+ /**
157
+ * - A function to be used instead of the default crud patch function.
158
+ */
159
+ patch?: (PartialDetailArgs: any) => ResponseData;
160
+ /**
161
+ * - A function to be used instead of the default crud subscribe function.
162
+ */
163
+ subscribe?: (SubscribeArgs: any) => void & {
164
+ cancel: () => Promise<void> | void;
165
+ };
166
+ };
167
+ /**
168
+ * The CRUD arguments.
169
+ */
170
+ export type ObjectCrudArgs = ObjectCrudArgsProperties & ObjectCrudFunctions;
171
+ //# sourceMappingURL=objectCrud.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectCrud.d.ts","sourceRoot":"","sources":["../../config/objectCrud.js"],"names":[],"mappings":"AA6GO,+GAHI,cAAc,QAexB;AAaM,4CARI,OAAO,KAAK,EAAE,gBAAgB,CAAC,MAAM,CAAC,yBAE9C;IAEa,KAAK,GAFV,OAAO,KAAK,EAAE,gBAAgB,CAAC;QACnC,QAAQ,EAAE,wBAAwB,GAAC,SAAS,CAAC;KAChD,CAAC;IACoC,SAAS,GAAvC,mBAAmB;CAC3B,QAoBF;;;;;;;;WA/Ha,MAAM;;;;;;cAKN,MAAM;;;;YACN,MAAM;;;;kBACN,MAAM;;;;WACN,MAAM;;;;;;cAKN,MAAM;;;;QACN,MAAM;;;;WACN,MAAM;;;;kBACN,MAAM;;;;;;cAKN,MAAM;;;;YACN,OAAO,0BAA0B,EAAE,UAAU;;;;kBAC7C,MAAM;;;;WACN,MAAM;;;;;;cAKN,MAAM;;;;QACN,MAAM;;;;WACN,MAAM;;;;kBACN,MAAM;;;;;;cAKN,MAAM;;;;QACN,MAAM;;;;WACN,MAAM;;;;mBACN,MAAM;;;;kBACN,MAAM;;;;;;cAKN,MAAM;;;;QACN,MAAM;;;;WACN,MAAM;;;;kBACN,MAAM;;;;cACN,CACP,IAAI,EAAC,OAAO,0BAA0B,EAAE,UAAU,EAAE,MAAM,EAAC,MAAM,KAChE,IAAI;;2BAIC,OAAO,CAAC,MAAM,GAAC,MAAM,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAC,IAAI,CAAA;CAAE;;;;;;;;aAO5D,CAAC,gBAAgB,KAAA,KAAG,YAAY;;;;eAChC,CAAC,kBAAkB,KAAA,KAAG,YAAY;;;;aAClC,CAAC,gBAAgB,KAAA,KAAG,YAAY;;;;aAChC,CAAC,gBAAgB,KAAA,KAAG,YAAY;;;;YAChC,CAAC,iBAAiB,KAAA,KAAG,YAAY;;;;gBACjC,CAAC,aAAa,KAAA,KAAG,IAAI,GAAG;QAAE,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAC,IAAI,CAAA;KAAE;;;;;6BAM7D,wBAAwB,GAAG,mBAAmB"}
@@ -0,0 +1,37 @@
1
+ export * from "./config/listCrud.js";
2
+ export * from "./config/objectCrud.js";
3
+ export * from "./use/cancellableIntent.js";
4
+ export * from "./use/combineClasses.js";
5
+ export * from "./use/list.js";
6
+ export * from "./use/listCalculated.js";
7
+ export * from "./use/listKeys.js";
8
+ export * from "./use/listFilter.js";
9
+ export * from "./use/listInstance.js";
10
+ export * from "./use/listRelated.js";
11
+ export * from "./use/listSearch.js";
12
+ export * from "./use/listSort.js";
13
+ export * from "./use/listSubscription.js";
14
+ export * from "./use/loadingError.js";
15
+ export * from "./use/object.js";
16
+ export * from "./use/objectCalculated.js";
17
+ export * from "./use/objectInstance.js";
18
+ export * from "./use/objectRelated.js";
19
+ export * from "./use/objectSubscription.js";
20
+ export * from "./use/paginatedListInstance.js";
21
+ export * from "./use/proxyLoadingError.js";
22
+ export * from "./use/search.js";
23
+ export * from "./use/watchesRunning.js";
24
+ export * from "./utils/assignReactiveObject.js";
25
+ export * from "./utils/classes.js";
26
+ export * from "./utils/compact.js";
27
+ export * from "./utils/deleteKey.js";
28
+ export * from "./utils/flattenPaths.js";
29
+ export * from "./utils/getFakePk.js";
30
+ export * from "./utils/keepAliveTry.js";
31
+ export * from "./utils/keyDiff.js";
32
+ export * from "./utils/loadingCombine.js";
33
+ export * from "./utils/relatedCalculatedHelpers.js";
34
+ export * from "./utils/set.js";
35
+ export * from "./utils/transformWalk.js";
36
+ export * from "./utils/watches.js";
37
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=listCrud.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listCrud.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/config/listCrud.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=objectCrud.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectCrud.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/config/objectCrud.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * A class that wraps a promise and its resolve and reject functions
3
+ */
4
+ export class Resolvable {
5
+ /**
6
+ * @type {Promise}
7
+ */
8
+ promise: Promise<any>;
9
+ /** @type {Function} */
10
+ resolve: Function;
11
+ /** @type {Function} */
12
+ reject: Function;
13
+ }
14
+ /**
15
+ * A Resolvable with a cancel function.
16
+ */
17
+ export class CancellableResolvable {
18
+ promise: Promise<any>;
19
+ /** @type {Function} */
20
+ resolve: Function;
21
+ /** @type {Function} */
22
+ reject: Function;
23
+ cancel: Resolvable;
24
+ }
25
+ //# sourceMappingURL=crudPromise.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crudPromise.d.ts","sourceRoot":"","sources":["../../../tests/unit/crudPromise.js"],"names":[],"mappings":"AAAA;;GAEG;AACH;IAKQ;;OAEG;IACH,sBAKE;IAJE,uBAAuB;IACvB,kBAAsB;IACtB,uBAAuB;IACvB,iBAAoB;CAG/B;AAED;;GAEG;AACH;IAEQ,sBAKE;IAJE,uBAAuB;IACvB,kBAAsB;IACtB,uBAAuB;IACvB,iBAAoB;IAQxB,mBAA8B;CAErC"}
@@ -0,0 +1,2 @@
1
+ export function expectErrorToBeNull(error: any): void;
2
+ //# sourceMappingURL=expectHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expectHelpers.d.ts","sourceRoot":"","sources":["../../../tests/unit/expectHelpers.js"],"names":[],"mappings":"AAAA,sDAKC"}
@@ -0,0 +1,2 @@
1
+ export function getMockOnUnmounted(): {};
2
+ //# sourceMappingURL=mockOnUnmounted.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mockOnUnmounted.d.ts","sourceRoot":"","sources":["../../../tests/unit/mockOnUnmounted.js"],"names":[],"mappings":"AAAA,yCAQC"}
@@ -0,0 +1,2 @@
1
+ export function poll(condition: any, interval?: number, timeout?: number): Promise<any>;
2
+ //# sourceMappingURL=poll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"poll.d.ts","sourceRoot":"","sources":["../../../tests/unit/poll.js"],"names":[],"mappings":"AAEA,wFA+CC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cancellableIntent.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancellableIntent.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/use/cancellableIntent.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=listCalculated.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listCalculated.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/use/listCalculated.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=listFilter.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listFilter.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/use/listFilter.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=listInstance.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listInstance.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/use/listInstance.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=listRelated.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listRelated.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/use/listRelated.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=listSearch.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listSearch.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/use/listSearch.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=listSort.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listSort.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/use/listSort.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=listSubscription.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listSubscription.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/use/listSubscription.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=loadingError.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadingError.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/use/loadingError.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=objectInstance.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectInstance.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/use/objectInstance.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=objectSubscription.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectSubscription.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/use/objectSubscription.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=proxyLoadingError.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxyLoadingError.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/use/proxyLoadingError.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=search.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/use/search.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=assignReactiveObject.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assignReactiveObject.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/utils/assignReactiveObject.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=classes.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classes.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/utils/classes.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=deleteKey.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteKey.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/utils/deleteKey.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=flattenPaths.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flattenPaths.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/utils/flattenPaths.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=keyDiff.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyDiff.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/utils/keyDiff.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=set.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set.spec.d.ts","sourceRoot":"","sources":["../../../../tests/unit/utils/set.spec.js"],"names":[],"mappings":""}