@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.
- package/package.json +20 -6
- package/types/config/listCrud.d.ts +153 -0
- package/types/config/listCrud.d.ts.map +1 -0
- package/types/config/objectCrud.d.ts +171 -0
- package/types/config/objectCrud.d.ts.map +1 -0
- package/types/index.d.ts +37 -0
- package/types/index.d.ts.map +1 -0
- package/types/tests/unit/config/listCrud.spec.d.ts +2 -0
- package/types/tests/unit/config/listCrud.spec.d.ts.map +1 -0
- package/types/tests/unit/config/objectCrud.spec.d.ts +2 -0
- package/types/tests/unit/config/objectCrud.spec.d.ts.map +1 -0
- package/types/tests/unit/crudPromise.d.ts +25 -0
- package/types/tests/unit/crudPromise.d.ts.map +1 -0
- package/types/tests/unit/expectHelpers.d.ts +2 -0
- package/types/tests/unit/expectHelpers.d.ts.map +1 -0
- package/types/tests/unit/mockOnUnmounted.d.ts +2 -0
- package/types/tests/unit/mockOnUnmounted.d.ts.map +1 -0
- package/types/tests/unit/poll.d.ts +2 -0
- package/types/tests/unit/poll.d.ts.map +1 -0
- package/types/tests/unit/use/cancellableIntent.spec.d.ts +2 -0
- package/types/tests/unit/use/cancellableIntent.spec.d.ts.map +1 -0
- package/types/tests/unit/use/listCalculated.spec.d.ts +2 -0
- package/types/tests/unit/use/listCalculated.spec.d.ts.map +1 -0
- package/types/tests/unit/use/listFilter.spec.d.ts +2 -0
- package/types/tests/unit/use/listFilter.spec.d.ts.map +1 -0
- package/types/tests/unit/use/listInstance.spec.d.ts +2 -0
- package/types/tests/unit/use/listInstance.spec.d.ts.map +1 -0
- package/types/tests/unit/use/listRelated.spec.d.ts +2 -0
- package/types/tests/unit/use/listRelated.spec.d.ts.map +1 -0
- package/types/tests/unit/use/listSearch.spec.d.ts +2 -0
- package/types/tests/unit/use/listSearch.spec.d.ts.map +1 -0
- package/types/tests/unit/use/listSort.spec.d.ts +2 -0
- package/types/tests/unit/use/listSort.spec.d.ts.map +1 -0
- package/types/tests/unit/use/listSubscription.spec.d.ts +2 -0
- package/types/tests/unit/use/listSubscription.spec.d.ts.map +1 -0
- package/types/tests/unit/use/loadingError.spec.d.ts +2 -0
- package/types/tests/unit/use/loadingError.spec.d.ts.map +1 -0
- package/types/tests/unit/use/objectInstance.spec.d.ts +2 -0
- package/types/tests/unit/use/objectInstance.spec.d.ts.map +1 -0
- package/types/tests/unit/use/objectSubscription.spec.d.ts +2 -0
- package/types/tests/unit/use/objectSubscription.spec.d.ts.map +1 -0
- package/types/tests/unit/use/proxyLoadingError.spec.d.ts +2 -0
- package/types/tests/unit/use/proxyLoadingError.spec.d.ts.map +1 -0
- package/types/tests/unit/use/search.spec.d.ts +2 -0
- package/types/tests/unit/use/search.spec.d.ts.map +1 -0
- package/types/tests/unit/utils/assignReactiveObject.spec.d.ts +2 -0
- package/types/tests/unit/utils/assignReactiveObject.spec.d.ts.map +1 -0
- package/types/tests/unit/utils/classes.spec.d.ts +2 -0
- package/types/tests/unit/utils/classes.spec.d.ts.map +1 -0
- package/types/tests/unit/utils/deleteKey.spec.d.ts +2 -0
- package/types/tests/unit/utils/deleteKey.spec.d.ts.map +1 -0
- package/types/tests/unit/utils/flattenPaths.spec.d.ts +2 -0
- package/types/tests/unit/utils/flattenPaths.spec.d.ts.map +1 -0
- package/types/tests/unit/utils/keyDiff.spec.d.ts +2 -0
- package/types/tests/unit/utils/keyDiff.spec.d.ts.map +1 -0
- package/types/tests/unit/utils/set.spec.d.ts +2 -0
- package/types/tests/unit/utils/set.spec.d.ts.map +1 -0
- package/types/tests/unit/utils/watches.spec.d.ts +2 -0
- package/types/tests/unit/utils/watches.spec.d.ts.map +1 -0
- package/types/use/cancellableIntent.d.ts +129 -0
- package/types/use/cancellableIntent.d.ts.map +1 -0
- package/types/use/combineClasses.d.ts +43 -0
- package/types/use/combineClasses.d.ts.map +1 -0
- package/types/use/list.d.ts +176 -0
- package/types/use/list.d.ts.map +1 -0
- package/types/use/listCalculated.d.ts +192 -0
- package/types/use/listCalculated.d.ts.map +1 -0
- package/types/use/listFilter.d.ts +203 -0
- package/types/use/listFilter.d.ts.map +1 -0
- package/types/use/listInstance.d.ts +357 -0
- package/types/use/listInstance.d.ts.map +1 -0
- package/types/use/listKeys.d.ts +15 -0
- package/types/use/listKeys.d.ts.map +1 -0
- package/types/use/listRelated.d.ts +239 -0
- package/types/use/listRelated.d.ts.map +1 -0
- package/types/use/listSearch.d.ts +298 -0
- package/types/use/listSearch.d.ts.map +1 -0
- package/types/use/listSort.d.ts +235 -0
- package/types/use/listSort.d.ts.map +1 -0
- package/types/use/listSubscription.d.ts +218 -0
- package/types/use/listSubscription.d.ts.map +1 -0
- package/types/use/loadingError.d.ts +81 -0
- package/types/use/loadingError.d.ts.map +1 -0
- package/types/use/object.d.ts +67 -0
- package/types/use/object.d.ts.map +1 -0
- package/types/use/objectCalculated.d.ts +215 -0
- package/types/use/objectCalculated.d.ts.map +1 -0
- package/types/use/objectInstance.d.ts +289 -0
- package/types/use/objectInstance.d.ts.map +1 -0
- package/types/use/objectRelated.d.ts +264 -0
- package/types/use/objectRelated.d.ts.map +1 -0
- package/types/use/objectSubscription.d.ts +249 -0
- package/types/use/objectSubscription.d.ts.map +1 -0
- package/types/use/paginatedListInstance.d.ts +51 -0
- package/types/use/paginatedListInstance.d.ts.map +1 -0
- package/types/use/proxyLoadingError.d.ts +36 -0
- package/types/use/proxyLoadingError.d.ts.map +1 -0
- package/types/use/search.d.ts +144 -0
- package/types/use/search.d.ts.map +1 -0
- package/types/use/watchesRunning.d.ts +63 -0
- package/types/use/watchesRunning.d.ts.map +1 -0
- package/types/utils/assignReactiveObject.d.ts +115 -0
- package/types/utils/assignReactiveObject.d.ts.map +1 -0
- package/types/utils/classes.d.ts +22 -0
- package/types/utils/classes.d.ts.map +1 -0
- package/types/utils/compact.d.ts +4 -0
- package/types/utils/compact.d.ts.map +1 -0
- package/types/utils/deleteKey.d.ts +16 -0
- package/types/utils/deleteKey.d.ts.map +1 -0
- package/types/utils/flattenPaths.d.ts +23 -0
- package/types/utils/flattenPaths.d.ts.map +1 -0
- package/types/utils/getFakePk.d.ts +13 -0
- package/types/utils/getFakePk.d.ts.map +1 -0
- package/types/utils/keepAliveTry.d.ts +15 -0
- package/types/utils/keepAliveTry.d.ts.map +1 -0
- package/types/utils/keyDiff.d.ts +63 -0
- package/types/utils/keyDiff.d.ts.map +1 -0
- package/types/utils/loadingCombine.d.ts +9 -0
- package/types/utils/loadingCombine.d.ts.map +1 -0
- package/types/utils/proxyRunning.d.ts +9 -0
- package/types/utils/proxyRunning.d.ts.map +1 -0
- package/types/utils/relatedCalculatedHelpers.d.ts +5 -0
- package/types/utils/relatedCalculatedHelpers.d.ts.map +1 -0
- package/types/utils/set.d.ts +7 -0
- package/types/utils/set.d.ts.map +1 -0
- package/types/utils/transformWalk.d.ts +2 -0
- package/types/utils/transformWalk.d.ts.map +1 -0
- package/types/utils/watches.d.ts +155 -0
- package/types/utils/watches.d.ts.map +1 -0
- package/use/loadingError.js +1 -1
- package/.circleci/config.yml +0 -88
- package/.commitlintrc.json +0 -25
- package/.editorconfig +0 -5
- package/.husky/commit-msg +0 -3
- package/.husky/pre-commit +0 -3
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/encodings.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -7
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -8
- package/.idea/reactive-helpers.iml +0 -15
- package/.prettierignore +0 -5
- package/.prettierrc.cjs +0 -5
- package/.vscode/extensions.json +0 -3
- package/docs/README.md +0 -45
- package/docs/config/listCrud.md +0 -422
- package/docs/config/objectCrud.md +0 -427
- package/docs/use/cancellableIntent.md +0 -165
- package/docs/use/combineClasses.md +0 -62
- package/docs/use/list.md +0 -361
- package/docs/use/listCalculated.md +0 -794
- package/docs/use/listFilter.md +0 -897
- package/docs/use/listInstance.md +0 -559
- package/docs/use/listKeys.md +0 -91
- package/docs/use/listRelated.md +0 -706
- package/docs/use/listSearch.md +0 -903
- package/docs/use/listSort.md +0 -1171
- package/docs/use/listSubscription.md +0 -393
- package/docs/use/loadingError.md +0 -115
- package/docs/use/object.md +0 -668
- package/docs/use/objectCalculated.md +0 -741
- package/docs/use/objectInstance.md +0 -685
- package/docs/use/objectRelated.md +0 -723
- package/docs/use/objectSubscription.md +0 -538
- package/docs/use/paginatedListInstance.md +0 -155
- package/docs/use/proxyLoadingError.md +0 -51
- package/docs/use/search.md +0 -321
- package/docs/use/watchesRunning.md +0 -84
- package/docs/utils/assignReactiveObject.md +0 -413
- package/docs/utils/classes.md +0 -139
- package/docs/utils/compact.md +0 -67
- package/docs/utils/deleteKey.md +0 -61
- package/docs/utils/flattenPaths.md +0 -53
- package/docs/utils/getFakePk.md +0 -39
- package/docs/utils/keepAliveTry.md +0 -59
- package/docs/utils/keyDiff.md +0 -117
- package/docs/utils/loadingCombine.md +0 -30
- package/docs/utils/proxyRunning.md +0 -39
- package/docs/utils/relatedCalculatedHelpers.md +0 -93
- package/docs/utils/set.md +0 -223
- package/docs/utils/transformWalk.md +0 -68
- package/docs/utils/watches.md +0 -489
- package/eslint.config.js +0 -125
- package/lint-staged.config.js +0 -10
- package/makeTypeDoc.sh +0 -25
- package/make_type_doc.js +0 -59
- package/tests/unit/config/listCrud.spec.js +0 -114
- package/tests/unit/config/objectCrud.spec.js +0 -160
- package/tests/unit/crudPromise.js +0 -40
- package/tests/unit/expectHelpers.js +0 -6
- package/tests/unit/mockOnUnmounted.js +0 -9
- package/tests/unit/poll.js +0 -50
- package/tests/unit/use/cancellableIntent.spec.js +0 -152
- package/tests/unit/use/listCalculated.spec.js +0 -135
- package/tests/unit/use/listFilter.spec.js +0 -484
- package/tests/unit/use/listInstance.spec.js +0 -1166
- package/tests/unit/use/listRelated.spec.js +0 -260
- package/tests/unit/use/listSearch.spec.js +0 -586
- package/tests/unit/use/listSort.spec.js +0 -418
- package/tests/unit/use/listSubscription.spec.js +0 -845
- package/tests/unit/use/loadingError.spec.js +0 -43
- package/tests/unit/use/objectInstance.spec.js +0 -1525
- package/tests/unit/use/objectSubscription.spec.js +0 -849
- package/tests/unit/use/proxyLoadingError.spec.js +0 -64
- package/tests/unit/use/search.spec.js +0 -248
- package/tests/unit/utils/assignReactiveObject.spec.js +0 -593
- package/tests/unit/utils/classes.spec.js +0 -427
- package/tests/unit/utils/deleteKey.spec.js +0 -265
- package/tests/unit/utils/flattenPaths.spec.js +0 -126
- package/tests/unit/utils/keyDiff.spec.js +0 -110
- package/tests/unit/utils/set.spec.js +0 -81
- package/tests/unit/utils/watches.spec.js +0 -276
- package/tsconfig.json +0 -19
- package/typedoc-local-plugins/customize-output.js +0 -13
- package/typedoc.json +0 -11
- package/vitest.config.js +0 -11
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A reactive object for passing document options or search options to useSearch.
|
|
3
|
+
*
|
|
4
|
+
* @typedef {object} SearchProps
|
|
5
|
+
* @property {DocumentOptions} customDocumentOptions - FlexSearch.Document options.
|
|
6
|
+
* @property {SearchOptions} customSearchOptions - Search options.
|
|
7
|
+
* @property {string} pkKey - The primary key field.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* A reactive wrapper around FlexSearch.Index.
|
|
11
|
+
*
|
|
12
|
+
* @param {object} options - Options.
|
|
13
|
+
* @param {SearchProps} options.props - Props.
|
|
14
|
+
* @param {number} [options.throttle] - Throttle wait time.
|
|
15
|
+
* @returns {SearchInstance} - The instance.
|
|
16
|
+
*/
|
|
17
|
+
export function useSearch({ props, throttle }: {
|
|
18
|
+
props: SearchProps;
|
|
19
|
+
throttle?: number;
|
|
20
|
+
}): SearchInstance;
|
|
21
|
+
/**
|
|
22
|
+
* A reactive object for passing document options or search options to useSearch.
|
|
23
|
+
*/
|
|
24
|
+
export type SearchProps = {
|
|
25
|
+
/**
|
|
26
|
+
* - FlexSearch.Document options.
|
|
27
|
+
*/
|
|
28
|
+
customDocumentOptions: DocumentOptions;
|
|
29
|
+
/**
|
|
30
|
+
* - Search options.
|
|
31
|
+
*/
|
|
32
|
+
customSearchOptions: SearchOptions;
|
|
33
|
+
/**
|
|
34
|
+
* - The primary key field.
|
|
35
|
+
*/
|
|
36
|
+
pkKey: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* FlexSearch.Document search options.
|
|
40
|
+
*/
|
|
41
|
+
export type SearchOptions = {
|
|
42
|
+
/**
|
|
43
|
+
* - Limit of results.
|
|
44
|
+
*/
|
|
45
|
+
limit: number;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Configuration options for creating a document in FlexSearch.
|
|
49
|
+
*/
|
|
50
|
+
export type DocumentOptions = {
|
|
51
|
+
/**
|
|
52
|
+
* - The document field to use as an identifier. Populated from `pkKey`.
|
|
53
|
+
*/
|
|
54
|
+
id: string;
|
|
55
|
+
/**
|
|
56
|
+
* - The document field to use as a tag. Default is false, can be set to a string.
|
|
57
|
+
*/
|
|
58
|
+
tag: boolean | string;
|
|
59
|
+
/**
|
|
60
|
+
* - Fields to index. Can be a single string, an array of strings, or an array of objects specifying custom index options.
|
|
61
|
+
*/
|
|
62
|
+
index: string | string[] | object[];
|
|
63
|
+
/**
|
|
64
|
+
* - Specifies if and what document fields to store. Can be false, a string, or an array of strings. Default is false.
|
|
65
|
+
*/
|
|
66
|
+
store: boolean | string | string[];
|
|
67
|
+
/**
|
|
68
|
+
* - Specifies the tokenizer to use.
|
|
69
|
+
*/
|
|
70
|
+
tokenizer?: string;
|
|
71
|
+
/**
|
|
72
|
+
* - Minimum length of a token to be indexed.
|
|
73
|
+
*/
|
|
74
|
+
minLength?: number;
|
|
75
|
+
};
|
|
76
|
+
export type SearchRawState = {
|
|
77
|
+
/**
|
|
78
|
+
* - The search string.
|
|
79
|
+
*/
|
|
80
|
+
search: string;
|
|
81
|
+
/**
|
|
82
|
+
* - The results, where the keys are the ids of the objects that match, and the values are true.
|
|
83
|
+
*/
|
|
84
|
+
results: object;
|
|
85
|
+
/**
|
|
86
|
+
* - Whether the search has been performed.
|
|
87
|
+
*/
|
|
88
|
+
searched: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* - Whether the search is currently running.
|
|
91
|
+
*/
|
|
92
|
+
searching: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* - FlexSearch.Document options.
|
|
95
|
+
*/
|
|
96
|
+
customDocumentOptions: DocumentOptions;
|
|
97
|
+
/**
|
|
98
|
+
* - Search options.
|
|
99
|
+
*/
|
|
100
|
+
customSearchOptions: SearchOptions;
|
|
101
|
+
/**
|
|
102
|
+
* - The number of times the search has been called.
|
|
103
|
+
*/
|
|
104
|
+
called: number;
|
|
105
|
+
/**
|
|
106
|
+
* - The number of times the search has been called, but has not yet returned.
|
|
107
|
+
*/
|
|
108
|
+
pending: number;
|
|
109
|
+
/**
|
|
110
|
+
* - Whether the search is currently running or has pending calls.
|
|
111
|
+
*/
|
|
112
|
+
running: boolean;
|
|
113
|
+
};
|
|
114
|
+
export type SearchInstance = {
|
|
115
|
+
/**
|
|
116
|
+
* - The state.
|
|
117
|
+
*/
|
|
118
|
+
state: import("vue").UnwrapNestedRefs<SearchRawState>;
|
|
119
|
+
/**
|
|
120
|
+
* - Add an index.
|
|
121
|
+
*/
|
|
122
|
+
addIndex: Function;
|
|
123
|
+
/**
|
|
124
|
+
* - Update an index.
|
|
125
|
+
*/
|
|
126
|
+
updateIndex: Function;
|
|
127
|
+
/**
|
|
128
|
+
* - Remove an index.
|
|
129
|
+
*/
|
|
130
|
+
removeIndex: Function;
|
|
131
|
+
/**
|
|
132
|
+
* - Clear the index.
|
|
133
|
+
*/
|
|
134
|
+
clearIndex: Function;
|
|
135
|
+
/**
|
|
136
|
+
* - An event target.
|
|
137
|
+
*/
|
|
138
|
+
events: EventTarget;
|
|
139
|
+
/**
|
|
140
|
+
* - A Vue effect scope.
|
|
141
|
+
*/
|
|
142
|
+
effectScope: object;
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../use/search.js"],"names":[],"mappings":"AAkEA;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH,+CAJG;IAA6B,KAAK,EAA1B,WAAW;IACM,QAAQ,GAAzB,MAAM;CACd,GAAU,cAAc,CA0I1B;;;;;;;;2BArJa,eAAe;;;;yBACf,aAAa;;;;WACb,MAAM;;;;;;;;;WApDN,MAAM;;;;;;;;;QAON,MAAM;;;;SACN,OAAO,GAAC,MAAM;;;;WACd,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE;;;;WAC5B,OAAO,GAAC,MAAM,GAAC,MAAM,EAAE;;;;gBACvB,MAAM;;;;gBACN,MAAM;;;;;;YAKN,MAAM;;;;aACN,MAAM;;;;cACN,OAAO;;;;eACP,OAAO;;;;2BACP,eAAe;;;;yBACf,aAAa;;;;YACb,MAAM;;;;aACN,MAAM;;;;aACN,OAAO;;;;;;WAKP,OAAO,KAAK,EAAE,gBAAgB,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;YAK9C,WAAW;;;;iBACX,MAAM"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vue Composition API composable function for watches running.
|
|
3
|
+
*
|
|
4
|
+
* @module use/watchesRunning.js
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The state for watches running.
|
|
8
|
+
*
|
|
9
|
+
* @typedef {object} WatchesRunningRawState
|
|
10
|
+
* @property {import('vue').ComputedRef<boolean>} running - Whether the watches are running.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The state for watches running.
|
|
14
|
+
*
|
|
15
|
+
* @typedef {import('vue').UnwrapNestedRefs<WatchesRunningRawState>} WatchesRunningState
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* An instance of `useWatchesRunning`.
|
|
19
|
+
*
|
|
20
|
+
* @typedef {object} WatchesRunning
|
|
21
|
+
* @property {WatchesRunningState} state - The state for watches running.
|
|
22
|
+
* @property {import('vue').EffectScope} effectScope - The effect scope for watches running.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* A composable function for handling watches running. When all the trigger refs are true,
|
|
26
|
+
* the watch sentinel refs are set to true.
|
|
27
|
+
*
|
|
28
|
+
* @param {object} options - The options for the watches running.
|
|
29
|
+
* @param {import('vue').WatchSource[]} options.triggerRefs - The trigger refs.
|
|
30
|
+
* @param {import('vue').Ref<boolean>[]} options.watchSentinelRefs - The watch sentinel refs.
|
|
31
|
+
* @returns {WatchesRunning} - The watches running.
|
|
32
|
+
*/
|
|
33
|
+
export function useWatchesRunning({ triggerRefs, watchSentinelRefs }: {
|
|
34
|
+
triggerRefs: import("vue").WatchSource[];
|
|
35
|
+
watchSentinelRefs: import("vue").Ref<boolean>[];
|
|
36
|
+
}): WatchesRunning;
|
|
37
|
+
/**
|
|
38
|
+
* The state for watches running.
|
|
39
|
+
*/
|
|
40
|
+
export type WatchesRunningRawState = {
|
|
41
|
+
/**
|
|
42
|
+
* - Whether the watches are running.
|
|
43
|
+
*/
|
|
44
|
+
running: import("vue").ComputedRef<boolean>;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* The state for watches running.
|
|
48
|
+
*/
|
|
49
|
+
export type WatchesRunningState = import("vue").UnwrapNestedRefs<WatchesRunningRawState>;
|
|
50
|
+
/**
|
|
51
|
+
* An instance of `useWatchesRunning`.
|
|
52
|
+
*/
|
|
53
|
+
export type WatchesRunning = {
|
|
54
|
+
/**
|
|
55
|
+
* - The state for watches running.
|
|
56
|
+
*/
|
|
57
|
+
state: WatchesRunningState;
|
|
58
|
+
/**
|
|
59
|
+
* - The effect scope for watches running.
|
|
60
|
+
*/
|
|
61
|
+
effectScope: import("vue").EffectScope;
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=watchesRunning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watchesRunning.d.ts","sourceRoot":"","sources":["../../use/watchesRunning.js"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH;;;;;GAKG;AAEH;;;;GAIG;AAEH;;;;;;GAMG;AAEH;;;;;;;;GAQG;AACH,sEAJG;IAA6C,WAAW,EAAhD,OAAO,KAAK,EAAE,WAAW,EAAE;IACW,iBAAiB,EAAvD,OAAO,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE;CACpC,GAAU,cAAc,CA+B1B;;;;;;;;aAvDa,OAAO,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC;;;;;kCAMnC,OAAO,KAAK,EAAE,gBAAgB,CAAC,sBAAsB,CAAC;;;;;;;;WAOrD,mBAAmB;;;;iBACnB,OAAO,KAAK,EAAE,WAAW"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds to a target the missing keys from a source. `addedKeys` can be precalculated to avoid recalculation.
|
|
3
|
+
*
|
|
4
|
+
* @param {ValidTargetOrSource} target - The object receiving values.
|
|
5
|
+
* @param {ValidTargetOrSource} source - The object providing values.
|
|
6
|
+
* @param {Array} [exclude] - Keys to exclude from the addition.
|
|
7
|
+
* @param {Array|Set} [addedKeys] - Precaulcated array of keys to add, if available. Otherwise, the
|
|
8
|
+
* keys will be calculated.
|
|
9
|
+
* @returns {boolean} True if any keys were added, false otherwise.
|
|
10
|
+
* @throws {AssignReactiveObjectError} If either target or source are not ultimately objects or arrays.
|
|
11
|
+
*/
|
|
12
|
+
export function addReactiveObject(target: ValidTargetOrSource, source: ValidTargetOrSource, exclude?: any[], addedKeys?: any[] | Set<any>): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Updates a target with mutually shared keys from a source. `sameKeys` can be precalculated to avoid recalculation.
|
|
15
|
+
*
|
|
16
|
+
* @param {ValidTargetOrSource} target - The object receiving values.
|
|
17
|
+
* @param {ValidTargetOrSource} source - The object providing values.
|
|
18
|
+
* @param {Array} [exclude] - Keys to exclude from the update.
|
|
19
|
+
* @param {Array|Set} [sameKeys] - Precaulcated array of keys to update, if available. Otherwise, the
|
|
20
|
+
* keys will be calculated.
|
|
21
|
+
* @returns {boolean} True if any keys were updated, false otherwise.
|
|
22
|
+
* @throws {AssignReactiveObjectError} If either target or source are not ultimately objects or arrays.
|
|
23
|
+
*/
|
|
24
|
+
export function updateReactiveObject(target: ValidTargetOrSource, source: ValidTargetOrSource, exclude?: any[], sameKeys?: any[] | Set<any>): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Adds to a target the missing keys from a source, and updates a target with mutually shared keys from a source.
|
|
27
|
+
*
|
|
28
|
+
* @param {ValidTargetOrSource} target - The object receiving values.
|
|
29
|
+
* @param {ValidTargetOrSource} source - The object providing values.
|
|
30
|
+
* @param {Array} [exclude] - Keys to exclude from the addition or update.
|
|
31
|
+
* @param {Array|Set} [addedKeys] - Precaulcated array of keys to add, if available. Otherwise, the
|
|
32
|
+
* keys will be calculated.
|
|
33
|
+
* @param {Array|Set} [sameKeys] - Precaulcated array of keys to update, if available. Otherwise, the
|
|
34
|
+
* keys will be calculated.
|
|
35
|
+
* @param {boolean} [doNotSetUndefinedKeys=true] - If true, do not update keys in the target that are undefined in the source.
|
|
36
|
+
* @returns {boolean} True if any keys were added or updated, false otherwise.
|
|
37
|
+
*/
|
|
38
|
+
export function addOrUpdateReactiveObject(target: ValidTargetOrSource, source: ValidTargetOrSource, exclude?: any[], addedKeys?: any[] | Set<any>, sameKeys?: any[] | Set<any>, doNotSetUndefinedKeys?: boolean): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Removes keys from a target that are not present in a source.
|
|
41
|
+
*
|
|
42
|
+
* @param {ValidTargetOrSource} target - The object receiving trimming.
|
|
43
|
+
* @param {ValidTargetOrSource|null} source - The object that provides the allowed set of keys for calculating `removedKeys`.
|
|
44
|
+
* @param {Array} [exclude] - Keys to exclude from removal.
|
|
45
|
+
* @param {Array|Set} [removedKeys] - An array to store removed keys.
|
|
46
|
+
* @returns {boolean} True if any keys were removed, false otherwise.
|
|
47
|
+
* @throws {AssignReactiveObjectError} If either target or source are not ultimately objects or arrays.
|
|
48
|
+
*/
|
|
49
|
+
export function trimReactiveObject(target: ValidTargetOrSource, source: ValidTargetOrSource | null, exclude?: any[], removedKeys?: any[] | Set<any>): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Change a target to match a source, where keys missing from the source are removed from the target,
|
|
52
|
+
* keys present in the source are added to the target, and keys present in both are updated in the target.
|
|
53
|
+
* This function is optimized for arrays.
|
|
54
|
+
*
|
|
55
|
+
* @param {ValidTargetOrSource} target - The array receiving updates.
|
|
56
|
+
* @param {ValidTargetOrSource} source - The reactive array to assign.
|
|
57
|
+
* @returns {boolean} True if any keys were added, updated, or removed, false otherwise.
|
|
58
|
+
*/
|
|
59
|
+
export function assignReactiveArray(target: ValidTargetOrSource, source: ValidTargetOrSource): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Change a target to match a source, where keys missing from the source are removed from the target,
|
|
62
|
+
* keys present in the source are added to the target, and keys present in both are updated in the target.
|
|
63
|
+
*
|
|
64
|
+
* @param {ValidTargetOrSource} target - The target object or array.
|
|
65
|
+
* @param {ValidTargetOrSource} source - The reactive object to assign.
|
|
66
|
+
* @param {Array} [exclude] - Keys to exclude from the assignment.
|
|
67
|
+
* @throws {AssignReactiveObjectError} If either target or source are not ultimately objects or arrays.
|
|
68
|
+
* @returns {boolean} True if any keys were added, updated, or removed, false otherwise.
|
|
69
|
+
*/
|
|
70
|
+
export function assignReactiveObject(target: ValidTargetOrSource, source: ValidTargetOrSource, exclude?: any[]): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Recursively change a target to match a source, where keys missing from the source are removed from the target,
|
|
73
|
+
* keys present in the source are added to the target, and keys present in both are updated in the target.
|
|
74
|
+
*
|
|
75
|
+
* @param {ValidTargetOrSource} target - The object receiving updates.
|
|
76
|
+
* @param {ValidTargetOrSource} source - The object providing updates.
|
|
77
|
+
* @param {Array} [exclude] - Keys to exclude from the assignment.
|
|
78
|
+
* @returns {boolean} True if any keys were added, updated, or removed, false otherwise.
|
|
79
|
+
* @throws {AssignReactiveObjectError} If either target or source are not ultimately objects or arrays.
|
|
80
|
+
*/
|
|
81
|
+
export function assignReactiveObjectDeep(target: ValidTargetOrSource, source: ValidTargetOrSource, exclude?: any[]): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Recursively change a target to match a source, where keys present in the source are added to the target, and
|
|
84
|
+
* keys present in both are updated in the target. Missing keys are not removed.
|
|
85
|
+
*
|
|
86
|
+
* @param {ValidTargetOrSource} target - The object receiving updates.
|
|
87
|
+
* @param {ValidTargetOrSource} source - The object providing updates.
|
|
88
|
+
* @param {Array} [exclude] - Keys to exclude from the update.
|
|
89
|
+
* @returns {boolean} True if any keys were added or updated, false otherwise.
|
|
90
|
+
* @throws {AssignReactiveObjectError} If either target or source are not ultimately objects or arrays.
|
|
91
|
+
*/
|
|
92
|
+
export function addOrUpdateReactiveObjectDeep(target: ValidTargetOrSource, source: ValidTargetOrSource, exclude?: any[]): boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Reactive object assignment utilities.
|
|
95
|
+
*
|
|
96
|
+
* @module utils/assignReactiveObject.js
|
|
97
|
+
*/
|
|
98
|
+
/**
|
|
99
|
+
* Error thrown when an invalid value is passed to a function.
|
|
100
|
+
*/
|
|
101
|
+
export class AssignReactiveObjectError extends Error {
|
|
102
|
+
/**
|
|
103
|
+
* @param {string} message - The error message.
|
|
104
|
+
* @param {string} code - The error code.
|
|
105
|
+
*/
|
|
106
|
+
constructor(message: string, code: string);
|
|
107
|
+
code: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* targets and sources must be refs, objects, or arrays
|
|
111
|
+
* and refs must ultimately resolve to objects or arrays
|
|
112
|
+
*/
|
|
113
|
+
export type ValidTargetOrSource = import("vue").Ref<object | any[]> | object | any[];
|
|
114
|
+
export type validateTargetAndSourceResult = object;
|
|
115
|
+
//# sourceMappingURL=assignReactiveObject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assignReactiveObject.d.ts","sourceRoot":"","sources":["../../utils/assignReactiveObject.js"],"names":[],"mappings":"AAiIA;;;;;;;;;;GAUG;AACH,0CARW,mBAAmB,UACnB,mBAAmB,+BAEnB,gBAAS,GAEP,OAAO,CAYnB;AAED;;;;;;;;;;GAUG;AACH,6CARW,mBAAmB,UACnB,mBAAmB,8BAEnB,gBAAS,GAEP,OAAO,CAYnB;AAED;;;;;;;;;;;;GAYG;AACH,kDAVW,mBAAmB,UACnB,mBAAmB,+BAEnB,gBAAS,aAET,gBAAS,0BAET,OAAO,GACL,OAAO,CAoCnB;AAED;;;;;;;;;GASG;AACH,2CAPW,mBAAmB,UACnB,mBAAmB,GAAC,IAAI,iCAExB,gBAAS,GACP,OAAO,CA8BnB;AAsBD;;;;;;;;GAQG;AACH,4CAJW,mBAAmB,UACnB,mBAAmB,GACjB,OAAO,CAmBnB;AAED;;;;;;;;;GASG;AACH,6CANW,mBAAmB,UACnB,mBAAmB,oBAGjB,OAAO,CAiBnB;AAmFD;;;;;;;;;GASG;AACH,iDANW,mBAAmB,UACnB,mBAAmB,oBAEjB,OAAO,CAUnB;AAoBD;;;;;;;;;GASG;AACH,sDANW,mBAAmB,UACnB,mBAAmB,oBAEjB,OAAO,CAUnB;AA9cD;;;;GAIG;AAEH;;GAEG;AACH;IACI;;;OAGG;IACH,qBAHW,MAAM,QACN,MAAM,EAMhB;IADG,aAAgB;CAEvB;;;;;kCAGY,OAAO,KAAK,EAAE,GAAG,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,GAAG,MAAM,GAAG,GAAG,EAAE;4CAsBlD,MAAM"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function objectifyClasses(...classes: (CombinedClassesArgument | CombinedClassesArgument[])[]): {
|
|
2
|
+
[key: string]: boolean;
|
|
3
|
+
};
|
|
4
|
+
export function combineClasses(...classes: (CombinedClassesArgument | CombinedClassesArgument[])[]): CombinedClasses;
|
|
5
|
+
export function stringifyClasses(...classes: (CombinedClassesArgument | CombinedClassesArgument[])[]): string;
|
|
6
|
+
export function stringifyClass(cls: ((CombinedClassesArgument | CombinedClassesArgument[]) | null | undefined)[]): string | null | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* - The normalized form of the CSS classes, either as a string of space-separated class names or an
|
|
9
|
+
*/
|
|
10
|
+
export type CombinedClasses = (string | {
|
|
11
|
+
[classnames: string]: boolean | import("vue").Ref<boolean>;
|
|
12
|
+
} | {
|
|
13
|
+
[classnames: string]: boolean | import("vue").Ref<boolean>;
|
|
14
|
+
}[]);
|
|
15
|
+
export type NestedArrayStructureWithStrings = (string | string[] | import("vue").Ref<string | string[]>);
|
|
16
|
+
export type BooleanOrRef = boolean | import("vue").Ref<boolean>;
|
|
17
|
+
export type CombinedClassesArgument = (NestedArrayStructureWithStrings | {
|
|
18
|
+
[key: string]: BooleanOrRef | NestedArrayStructureWithStrings | CombinedClassesArgument;
|
|
19
|
+
} | import("vue").Ref<NestedArrayStructureWithStrings | {
|
|
20
|
+
[key: string]: BooleanOrRef | NestedArrayStructureWithStrings | CombinedClassesArgument;
|
|
21
|
+
}>);
|
|
22
|
+
//# sourceMappingURL=classes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classes.d.ts","sourceRoot":"","sources":["../../utils/classes.js"],"names":[],"mappings":"AAsFO,6CAHO,CAAC,uBAAuB,GAAC,uBAAuB,EAAE,CAAC,EAAA,GACpD;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAC,CA2BpC;AAYM,2CAHO,CAAC,uBAAuB,GAAC,uBAAuB,EAAE,CAAC,EAAA,GACpD,eAAe,CAa3B;AAWM,6CAHO,CAAC,uBAAuB,GAAC,uBAAuB,EAAE,CAAC,EAAA,GACpD,MAAM,CAMD;AAWX,oCAHI,CAAG,CAAC,uBAAuB,GAAC,uBAAuB,EAAE,CAAC,GAAC,IAAI,GAAC,SAAS,GAAA,GACnE,MAAM,GAAC,IAAI,GAAC,SAAS,CA6BjC;;;;8BA/KY,CACZ,MAAY,GACZ;IAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;CAAE,GACpE;IAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;CAAE,EAAE,CACnE;8CAIS,CACZ,MAAW,GAAG,MAAM,EAAE,GACtB,OAAY,KAAK,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,CACtC;2BAIU,OAAO,GAAG,OAAO,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;sCAIrC,CACN,+BAA+B,GACrC;IACA,CAAW,GAAG,EAAE,MAAM,GAAG,YAAY,GAC3B,+BAA+B,GAC/B,uBAAuB,CAAA;CAC1B,GACP,OAAa,KAAK,EAAE,GAAG,CAAC,+BAA+B,GAAG;IAC1D,CAAW,GAAG,EAAE,MAAM,GAAG,YAAY,GAC3B,+BAA+B,GAC/B,uBAAuB,CAAA;CAC1B,CAAC,CACL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compact.d.ts","sourceRoot":"","sources":["../../utils/compact.js"],"names":[],"mappings":"AAqCO,wCAHI,MAAM,QAAM,GACV,IAAI,CAIhB;AAkCM,yCAFI,MAAM,QAAQ,QAIxB;AAwCM,8DAHI,MAAM,QAAQ,GACZ,IAAI,CAIhB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Split a string into an array of keys.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} string - The string to split.
|
|
5
|
+
* @param {object} object - The object to split keys for.
|
|
6
|
+
* @returns {string[]} Returns the new array of split keys.
|
|
7
|
+
*/
|
|
8
|
+
export function lodashLikePathSplit(string: string, object: object): string[];
|
|
9
|
+
/**
|
|
10
|
+
* Delete a key from an object. Lodash-like delete function, as companion for get/set.
|
|
11
|
+
*
|
|
12
|
+
* @param {object} obj - The object to modify.
|
|
13
|
+
* @param {string} path - The key to delete.
|
|
14
|
+
*/
|
|
15
|
+
export function del(obj: object, path: string): void;
|
|
16
|
+
//# sourceMappingURL=deleteKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteKey.d.ts","sourceRoot":"","sources":["../../utils/deleteKey.js"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AACH,4CAJW,MAAM,UACN,MAAM,GACJ,MAAM,EAAE,CAkBpB;AAED;;;;;GAKG;AACH,yBAHW,MAAM,QACN,MAAM,QAiBhB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get all paths from an array or object.
|
|
3
|
+
*
|
|
4
|
+
* @module utils/flattenPaths.js
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Turn an array or object into an array of path strings. Recurses for any found arrays or objects.
|
|
8
|
+
*
|
|
9
|
+
* Array indexes are wrapped in square brackets and object keys are prefixed with a period.
|
|
10
|
+
*
|
|
11
|
+
* @param {Array | object} arrayOrObject - Array or object to flatten.
|
|
12
|
+
* @param {object} [options] - Options.
|
|
13
|
+
* @param {string} [options.currentPath=""] - Current path, for recursion or as a starting point.
|
|
14
|
+
* @param {number} [options.depth=0] - Current depth, for recursion.
|
|
15
|
+
* @param {number} [options.limit=0] - Limit the depth of recursion.
|
|
16
|
+
* @returns {string[]} Paths.
|
|
17
|
+
*/
|
|
18
|
+
export function flattenPaths(arrayOrObject: any[] | object, { currentPath, depth, limit }?: {
|
|
19
|
+
currentPath?: string;
|
|
20
|
+
depth?: number;
|
|
21
|
+
limit?: number;
|
|
22
|
+
}): string[];
|
|
23
|
+
//# sourceMappingURL=flattenPaths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flattenPaths.d.ts","sourceRoot":"","sources":["../../utils/flattenPaths.js"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH;;;;;;;;;;;GAWG;AACH,4CAPW,QAAQ,MAAM,kCAEtB;IAAyB,WAAW,GAA5B,MAAM;IACW,KAAK,GAAtB,MAAM;IACW,KAAK,GAAtB,MAAM;CACd,GAAU,MAAM,EAAE,CAwCpB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get a fake pk that is not in the array, set, map, or object. The fake pk is negative number, so they can be
|
|
3
|
+
* differentiated from real ids. They are returned as strings, as javascript object property keys are always strings.
|
|
4
|
+
*
|
|
5
|
+
* @param {Array|Set|Map|object} arraySetMapOrObject - The array, set, map, or object to check for the fake pk.
|
|
6
|
+
* An array is assumed to be an array of objects.
|
|
7
|
+
* A set is assumed to be a set of ids.
|
|
8
|
+
* A map or object is assumed to be an object with keys that are ids.
|
|
9
|
+
* @param {string} key - The key to check for in the array or object.
|
|
10
|
+
* @returns {string} - The fake pk.
|
|
11
|
+
*/
|
|
12
|
+
export function getFakePk(arraySetMapOrObject: any[] | Set<any> | Map<any, any> | object, key?: string): string;
|
|
13
|
+
//# sourceMappingURL=getFakePk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFakePk.d.ts","sourceRoot":"","sources":["../../utils/getFakePk.js"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,+CAPW,mCAAc,MAAM,QAIpB,MAAM,GACJ,MAAM,CAmBlB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* If there is an active component, set up an onActivated hook.
|
|
3
|
+
*
|
|
4
|
+
* @param {Function} fn - The function to call.
|
|
5
|
+
* @param {any} [target] - The target to call the function on.
|
|
6
|
+
*/
|
|
7
|
+
export function tryOnActivated(fn: Function, target?: any): void;
|
|
8
|
+
/**
|
|
9
|
+
* If there is an active component, set up an onDeactivated hook.
|
|
10
|
+
*
|
|
11
|
+
* @param {Function} fn - The function to call.
|
|
12
|
+
* @param {any} [target] - The target to call the function on.
|
|
13
|
+
*/
|
|
14
|
+
export function tryOnDeactivated(fn: Function, target?: any): void;
|
|
15
|
+
//# sourceMappingURL=keepAliveTry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keepAliveTry.d.ts","sourceRoot":"","sources":["../../utils/keepAliveTry.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,sDAFW,GAAG,QAOb;AAED;;;;;GAKG;AACH,wDAFW,GAAG,QAOb"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculate the difference between objects in terms of what keys
|
|
3
|
+
* are the same, what keys are removed, and what keys are added.
|
|
4
|
+
*
|
|
5
|
+
* @module utils/keyDiff.js
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Result object of keyDiff and keyDiffDeep.
|
|
9
|
+
*
|
|
10
|
+
* @typedef {object} KeyDiffResult
|
|
11
|
+
* @property {Set} [sameKeys] - If sameKeys option is true, return keys that are the same.
|
|
12
|
+
* @property {Set} [removedKeys] - If removedKeys option is true, return keys that are removed.
|
|
13
|
+
* @property {Set} [addedKeys] - If addedKeys option is true, return keys that are added.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Calculate the difference between two arrays of keys, in terms of what keys
|
|
17
|
+
* are the same, what keys are removed, and what keys are added.
|
|
18
|
+
*
|
|
19
|
+
* @param {string[]|Set} newKeys - Keys to consider as new.
|
|
20
|
+
* @param {string[]|Set} oldKeys - Keys to consider as old.
|
|
21
|
+
* @param {object} [options] - Which differences are returned.
|
|
22
|
+
* @param {boolean} [options.sameKeys=true] - If true, return keys that are the same.
|
|
23
|
+
* @param {boolean} [options.removedKeys=true] - If true, return keys that are removed.
|
|
24
|
+
* @param {boolean} [options.addedKeys=true] - If true, return keys that are added.
|
|
25
|
+
* @returns {KeyDiffResult} - The differences.
|
|
26
|
+
*/
|
|
27
|
+
export function keyDiff(newKeys: string[] | Set<any>, oldKeys: string[] | Set<any>, { sameKeys, removedKeys, addedKeys }?: {
|
|
28
|
+
sameKeys?: boolean;
|
|
29
|
+
removedKeys?: boolean;
|
|
30
|
+
addedKeys?: boolean;
|
|
31
|
+
}): KeyDiffResult;
|
|
32
|
+
/**
|
|
33
|
+
* Calculate the difference between two objects, in terms of what keys are the same,
|
|
34
|
+
* what keys are removed, and what keys are added. Keys are sourced deeply in the objects.
|
|
35
|
+
*
|
|
36
|
+
* @param {object} newObj - The new version of the object.
|
|
37
|
+
* @param {object} oldObj - The old version of the object.
|
|
38
|
+
* @param {object} [options] - Which differences are returned.
|
|
39
|
+
* @property {boolean} [sameKeys=true] - If true, return keys that are the same.
|
|
40
|
+
* @property {boolean} [removedKeys=true] - If true, return keys that are removed.
|
|
41
|
+
* @property {boolean} [addedKeys=true] - If true, return keys that are added.
|
|
42
|
+
* @property {number} [limit] - Limit the depth of recursion.
|
|
43
|
+
* @returns {KeyDiffResult} - The differences.
|
|
44
|
+
*/
|
|
45
|
+
export function keyDiffDeep(newObj: object, oldObj: object, options?: object): KeyDiffResult;
|
|
46
|
+
/**
|
|
47
|
+
* Result object of keyDiff and keyDiffDeep.
|
|
48
|
+
*/
|
|
49
|
+
export type KeyDiffResult = {
|
|
50
|
+
/**
|
|
51
|
+
* - If sameKeys option is true, return keys that are the same.
|
|
52
|
+
*/
|
|
53
|
+
sameKeys?: Set<any>;
|
|
54
|
+
/**
|
|
55
|
+
* - If removedKeys option is true, return keys that are removed.
|
|
56
|
+
*/
|
|
57
|
+
removedKeys?: Set<any>;
|
|
58
|
+
/**
|
|
59
|
+
* - If addedKeys option is true, return keys that are added.
|
|
60
|
+
*/
|
|
61
|
+
addedKeys?: Set<any>;
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=keyDiff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyDiff.d.ts","sourceRoot":"","sources":["../../utils/keyDiff.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;;;;GAWG;AACH,iCARW,MAAM,EAAE,WAAI,WACZ,MAAM,EAAE,WAAI,yCAEpB;IAA0B,QAAQ,GAA1B,OAAO;IACW,WAAW,GAA7B,OAAO;IACW,SAAS,GAA3B,OAAO;CACf,GAAU,aAAa,CAgBzB;AAED;;;;;;;;;;;;GAYG;AACH,oCATW,MAAM,UACN,MAAM,YACN,MAAM,GAKJ,aAAa,CAUzB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Combine multiple loading states into a single loading state. If any are loading, the combined state is loading.
|
|
3
|
+
* If all are undefined, the combined state is undefined. Otherwise, the combined state is not loading.
|
|
4
|
+
*
|
|
5
|
+
* @param {...(boolean | undefined)} loadingStates - The loading states to combine.
|
|
6
|
+
* @returns {boolean | undefined} The combined loading state.
|
|
7
|
+
*/
|
|
8
|
+
export function loadingCombine(...loadingStates: (boolean | undefined)[]): boolean | undefined;
|
|
9
|
+
//# sourceMappingURL=loadingCombine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadingCombine.d.ts","sourceRoot":"","sources":["../../utils/loadingCombine.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,iDAHe,CAAC,OAAO,GAAG,SAAS,CAAC,EAAA,GACvB,OAAO,GAAG,SAAS,CAU/B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Proxy a parent's running state to a child's running state.
|
|
3
|
+
*
|
|
4
|
+
* @param {import("vue").UnwrapNestedRefs<object>} parentState - The parent state.
|
|
5
|
+
* @param {string} parentStateProp - The parent state property.
|
|
6
|
+
* @param {import("vue").Ref<boolean>} ref - The ref to proxy to.
|
|
7
|
+
*/
|
|
8
|
+
export function proxyRunning(parentState: import("vue").UnwrapNestedRefs<object>, parentStateProp: string, ref: import("vue").Ref<boolean>): void;
|
|
9
|
+
//# sourceMappingURL=proxyRunning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxyRunning.d.ts","sourceRoot":"","sources":["../../utils/proxyRunning.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,0CAJW,OAAO,KAAK,EAAE,gBAAgB,CAAC,MAAM,CAAC,mBACtC,MAAM,OACN,OAAO,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,QA0BpC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const relatedItemRegex: RegExp;
|
|
2
|
+
export const calculatedItemRegex: RegExp;
|
|
3
|
+
export function getObjectRelatedCalculatedByKey(obj: object, relatedObj: object, calculatedObj: object, key: string): [object, string];
|
|
4
|
+
export function getObjectRelatedByKey(obj: object, relatedObj: object, key: string): [object, string];
|
|
5
|
+
//# sourceMappingURL=relatedCalculatedHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relatedCalculatedHelpers.d.ts","sourceRoot":"","sources":["../../utils/relatedCalculatedHelpers.js"],"names":[],"mappings":"AAAA,sCAAiD;AACjD,yCAAuD;AAWhD,qDANI,MAAM,cACN,MAAM,iBACN,MAAM,OACN,MAAM,GACJ,CAAC,MAAM,EAAE,MAAM,CAAC,CAe5B;AAUM,2CALI,MAAM,cACN,MAAM,OACN,MAAM,GACJ,CAAC,MAAM,EAAE,MAAM,CAAC,CAS5B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function isSuperset(set: Set<any>, subset: Set<any>): boolean;
|
|
2
|
+
export function union(setA: Set<any>, setB: Set<any>): Set<any>;
|
|
3
|
+
export function intersection(setA: Set<any>, setB: Set<any>): Set<any>;
|
|
4
|
+
export function symmetricDifference(setA: Set<any>, setB: Set<any>): Set<any>;
|
|
5
|
+
export function difference(setA: Set<any>, setB: Set<any>): Set<any>;
|
|
6
|
+
export function equals(setA: Set<any>, setB: Set<any>): boolean;
|
|
7
|
+
//# sourceMappingURL=set.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../utils/set.js"],"names":[],"mappings":"AAaO,6DANM,OAAO,CAanB;AAaM,gEAMN;AAaM,uEAQN;AAaM,8EAUN;AAaM,qEAMN;AAaM,wDANM,OAAO,CAQnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformWalk.d.ts","sourceRoot":"","sources":["../../utils/transformWalk.js"],"names":[],"mappings":"AAwCO,mCA5BI,MAAM,gCAEN,MAAM,GACJ,MAAM,CAyClB"}
|