@rokkit/core 1.0.0-next.113 → 1.0.0-next.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/packages/actions/src/delegate.svelte.d.ts +13 -0
- package/dist/packages/actions/src/dismissable.svelte.d.ts +7 -0
- package/dist/packages/actions/src/fillable.svelte.d.ts +8 -0
- package/dist/packages/actions/src/index.d.ts +11 -0
- package/dist/packages/actions/src/kbd.d.ts +44 -0
- package/dist/packages/actions/src/keyboard.svelte.d.ts +7 -0
- package/dist/packages/actions/src/lib/event-manager.d.ts +8 -0
- package/dist/packages/actions/src/lib/index.d.ts +2 -0
- package/dist/packages/actions/src/lib/internal.d.ts +19 -0
- package/dist/packages/actions/src/navigable.svelte.d.ts +8 -0
- package/dist/packages/actions/src/navigator.svelte.d.ts +20 -0
- package/dist/packages/actions/src/pannable.svelte.d.ts +6 -0
- package/dist/packages/actions/src/skinnable.svelte.d.ts +8 -0
- package/dist/packages/actions/src/swipeable.svelte.d.ts +14 -0
- package/dist/packages/actions/src/themable.svelte.d.ts +7 -0
- package/dist/packages/actions/src/types.d.ts +72 -0
- package/dist/packages/actions/src/utils.d.ts +18 -0
- package/dist/packages/bits-ui/src/index.d.ts +2 -0
- package/dist/packages/bits-ui/src/reference.d.ts +22 -0
- package/dist/packages/bits-ui/src/tree/constants.d.ts +13 -0
- package/dist/packages/bits-ui/src/tree/index.d.ts +7 -0
- package/dist/packages/bits-ui/src/tree/types.d.ts +71 -0
- package/dist/packages/core/src/calendar.d.ts +10 -0
- package/dist/packages/core/src/colors/index.d.ts +333 -0
- package/dist/packages/core/src/connector.d.ts +8 -0
- package/dist/packages/core/src/constants.d.ts +39 -0
- package/dist/packages/core/src/events.d.ts +12 -0
- package/dist/packages/core/src/field-mapper.d.ts +63 -0
- package/dist/packages/core/src/index.d.ts +13 -0
- package/dist/packages/core/src/key-event-map.d.ts +18 -0
- package/dist/packages/core/src/mapped-items.d.ts +14 -0
- package/dist/packages/core/src/mapping.d.ts +75 -0
- package/dist/packages/core/src/nested.d.ts +18 -0
- package/dist/packages/core/src/string.d.ts +59 -0
- package/dist/packages/core/src/theme.d.ts +52 -0
- package/dist/packages/core/src/ticks.d.ts +10 -0
- package/dist/packages/core/src/types.d.ts +245 -0
- package/dist/packages/core/src/utils.d.ts +70 -0
- package/dist/packages/data/src/aggregators.d.ts +2 -0
- package/dist/packages/data/src/constants.d.ts +46 -0
- package/dist/packages/data/src/convert.d.ts +10 -0
- package/dist/packages/data/src/dataset.d.ts +43 -0
- package/dist/packages/data/src/filter.d.ts +26 -0
- package/dist/packages/data/src/formatter.d.ts +10 -0
- package/dist/packages/data/src/hierarchy.d.ts +36 -0
- package/dist/packages/data/src/index.d.ts +7 -0
- package/dist/packages/data/src/infer.d.ts +80 -0
- package/dist/packages/data/src/join.d.ts +95 -0
- package/dist/packages/data/src/list.d.ts +121 -0
- package/dist/packages/data/src/metadata.d.ts +32 -0
- package/dist/packages/data/src/model.d.ts +29 -0
- package/dist/packages/data/src/parser.d.ts +31 -0
- package/dist/packages/data/src/renamer.d.ts +37 -0
- package/dist/packages/data/src/rollup.d.ts +51 -0
- package/dist/packages/data/src/types.d.ts +346 -0
- package/dist/packages/data/src/utils.d.ts +6 -0
- package/dist/packages/data/src/view.d.ts +35 -0
- package/dist/packages/helpers/src/components/index.d.ts +2 -0
- package/dist/packages/helpers/src/index.d.ts +1 -0
- package/dist/packages/helpers/src/matchers/action.d.ts +27 -0
- package/dist/packages/helpers/src/matchers/array.d.ts +10 -0
- package/dist/packages/helpers/src/matchers/dataset.d.ts +10 -0
- package/dist/packages/helpers/src/matchers/event.d.ts +10 -0
- package/dist/packages/helpers/src/matchers/index.d.ts +4 -0
- package/dist/packages/helpers/src/matchers/internal.d.ts +1 -0
- package/dist/packages/helpers/src/mocks/animate.d.ts +1 -0
- package/dist/packages/helpers/src/mocks/element.d.ts +60 -0
- package/dist/packages/helpers/src/mocks/index.d.ts +2 -0
- package/dist/packages/helpers/src/mocks/match-media.d.ts +30 -0
- package/dist/packages/helpers/src/mocks/resize-observer.d.ts +9 -0
- package/dist/packages/helpers/src/simulators/index.d.ts +1 -0
- package/dist/packages/helpers/src/simulators/touch.d.ts +40 -0
- package/dist/packages/icons/src/convert.d.ts +22 -0
- package/dist/packages/icons/src/index.d.ts +2 -0
- package/dist/packages/input/src/index.d.ts +18 -0
- package/dist/packages/states/src/constants.d.ts +27 -0
- package/dist/packages/states/src/derive.svelte.d.ts +22 -0
- package/dist/packages/states/src/hierarchy.d.ts +34 -0
- package/dist/packages/states/src/index.d.ts +5 -0
- package/dist/packages/states/src/list-controller.svelte.d.ts +70 -0
- package/dist/packages/states/src/nested-controller.svelte.d.ts +32 -0
- package/dist/packages/states/src/proxy.svelte.d.ts +43 -0
- package/dist/packages/states/src/tabular.svelte.d.ts +5 -0
- package/dist/packages/states/src/traversal.svelte.d.ts +69 -0
- package/dist/packages/states/src/vibe.svelte.d.ts +622 -0
- package/dist/packages/themes/src/constants.d.ts +6 -0
- package/dist/packages/themes/src/index.d.ts +2 -0
- package/dist/packages/tutorial/src/assimilate.d.ts +25 -0
- package/dist/packages/tutorial/src/collector.d.ts +46 -0
- package/dist/packages/tutorial/src/files.d.ts +8 -0
- package/dist/packages/tutorial/src/index.d.ts +2 -0
- package/dist/packages/tutorial/src/metadata/base.d.ts +19 -0
- package/dist/packages/tutorial/src/metadata/factory.d.ts +19 -0
- package/dist/packages/tutorial/src/metadata/index.d.ts +2 -0
- package/dist/packages/tutorial/src/metadata/javascript.d.ts +7 -0
- package/dist/packages/tutorial/src/metadata/json.d.ts +7 -0
- package/dist/packages/tutorial/src/metadata/markdown.d.ts +7 -0
- package/dist/packages/tutorial/src/metadata/registry.d.ts +26 -0
- package/dist/packages/tutorial/src/metamodel.d.ts +45 -0
- package/dist/packages/tutorial/src/tutorial.d.ts +21 -0
- package/dist/packages/tutorial/src/types.d.ts +172 -0
- package/dist/packages/tutorial/src/utils.d.ts +13 -0
- package/dist/packages/ui/src/constants.d.ts +2 -0
- package/dist/packages/ui/src/index.d.ts +42 -0
- package/dist/packages/ui/src/input/types.d.ts +9 -0
- package/dist/packages/ui/src/lib/fields.d.ts +16 -0
- package/dist/packages/ui/src/lib/form.d.ts +95 -0
- package/dist/packages/ui/src/lib/index.d.ts +6 -0
- package/dist/packages/ui/src/lib/layout.d.ts +7 -0
- package/dist/packages/ui/src/lib/nested.d.ts +48 -0
- package/dist/packages/ui/src/lib/schema.d.ts +7 -0
- package/dist/packages/ui/src/lib/select.d.ts +8 -0
- package/dist/packages/ui/src/lib/tree.d.ts +9 -0
- package/dist/packages/ui/src/types.d.ts +5 -0
- package/dist/packages/ui/src/wrappers/index.d.ts +3 -0
- package/dist/sites/learn/src/hooks.d.ts +1 -0
- package/dist/sites/learn/src/hooks.server.d.ts +2 -0
- package/dist/sites/learn/src/lib/index.d.ts +7 -0
- package/dist/sites/learn/src/lib/media.d.ts +13 -0
- package/dist/sites/learn/src/lib/paraglide/messages/en.d.ts +3 -0
- package/dist/sites/learn/src/lib/paraglide/messages/fr.d.ts +3 -0
- package/dist/sites/learn/src/lib/paraglide/messages/hi.d.ts +3 -0
- package/dist/sites/learn/src/lib/paraglide/messages.d.ts +5 -0
- package/dist/sites/learn/src/lib/paraglide/runtime.d.ts +52 -0
- package/dist/sites/learn/src/lib/stories/02-elements/01-list/03-mapping/src/data.d.ts +5 -0
- package/dist/sites/learn/src/lib/stories/02-elements/01-list/04-mixed/src/data.d.ts +13 -0
- package/dist/sites/learn/src/lib/stories/02-elements/02-tabs/04-fields/src/data.d.ts +5 -0
- package/dist/sites/learn/src/lib/stories/02-elements/02-tabs/05-using/src/data.d.ts +6 -0
- package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/01-intro/src/data.d.ts +4 -0
- package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/02-fields/src/data.d.ts +9 -0
- package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/03-using/src/data.d.ts +19 -0
- package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/04-mixed/src/data.d.ts +30 -0
- package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/props.d.ts +15 -0
- package/dist/sites/learn/src/lib/stories/02-elements/04-tree/01-intro/src/data.d.ts +12 -0
- package/dist/sites/learn/src/lib/stories/02-elements/06-select/02-fields/src/data.d.ts +5 -0
- package/dist/sites/learn/src/lib/stories/02-elements/07-multi-select/02-fields/src/data.d.ts +5 -0
- package/dist/sites/learn/src/lib/stories/02-elements/08-drop-down/02-fields/src/data.d.ts +5 -0
- package/dist/sites/learn/src/lib/stories/05-templates/01-form/02-schema/src/schema.d.ts +22 -0
- package/dist/sites/learn/src/lib/stories/05-templates/01-form/03-layout/src/layout.d.ts +19 -0
- package/dist/sites/learn/src/lib/stories/05-templates/01-form/03-layout/src/schema.d.ts +36 -0
- package/dist/sites/learn/src/lib/stories/05-templates/01-form/05-validation/src/schema.d.ts +34 -0
- package/dist/sites/learn/src/lib/stories/05-templates/02-editor/01-introduction/src/data.d.ts +39 -0
- package/dist/sites/learn/src/lib/stories/05-templates/02-editor/01-introduction/src/schema.d.ts +187 -0
- package/dist/sites/learn/src/lib/stories/06-layout/03-stepper/01-intro/src/data.d.ts +37 -0
- package/dist/sites/learn/src/lib/stories/06-layout/03-stepper/02-play/src/data.d.ts +37 -0
- package/dist/sites/learn/src/lib/stories/index.d.ts +1 -0
- package/dist/sites/learn/src/lib/theme.svelte.d.ts +70 -0
- package/dist/sites/learn/src/routes/(learn)/+layout.d.ts +12 -0
- package/dist/sites/learn/src/routes/(learn)/[segment]/[...slug]/+page.d.ts +8 -0
- package/dist/sites/learn/src/routes/+layout.d.ts +18 -0
- package/dist/sites/quick-start/src/hooks.d.ts +1 -0
- package/dist/sites/quick-start/src/hooks.server.d.ts +2 -0
- package/dist/sites/quick-start/src/lib/index.d.ts +1 -0
- package/dist/sites/quick-start/src/lib/paraglide/messages/en.d.ts +3 -0
- package/dist/sites/quick-start/src/lib/paraglide/messages/fr.d.ts +3 -0
- package/dist/sites/quick-start/src/lib/paraglide/messages/hi.d.ts +3 -0
- package/dist/sites/quick-start/src/lib/paraglide/messages.d.ts +5 -0
- package/dist/sites/quick-start/src/lib/paraglide/runtime.d.ts +52 -0
- package/dist/sites/quick-start/src/routes/+layout.d.ts +9 -0
- package/dist/utils.d.ts +1 -1
- package/package.json +2 -2
- package/src/constants.js +5 -4
- package/src/utils.js +5 -3
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filters the results of the first dataset based on the condition using the second dataset.
|
|
3
|
+
*
|
|
4
|
+
* @param {Array<Object>} first - The first dataset to filter.
|
|
5
|
+
* @param {Array<Object>} second - The second dataset to filter by.
|
|
6
|
+
* @param {Function} condition - The condition to filter the first dataset by.
|
|
7
|
+
* @returns {Array<Object>} - The filtered dataset.
|
|
8
|
+
*/
|
|
9
|
+
export function antiJoin(first: Array<Object>, second: Array<Object>, condition: Function): Array<Object>;
|
|
10
|
+
/**
|
|
11
|
+
* Joins two datasets together based on a condition. Result includes all rows from the first
|
|
12
|
+
* dataset and matching rows from the second dataset. In case of multiple matches, all
|
|
13
|
+
* combinations are returned. When combining the rows, the columns from the first dataset take
|
|
14
|
+
* precedence.
|
|
15
|
+
*
|
|
16
|
+
* @param {Array<Object>} first - The first dataset to join.
|
|
17
|
+
* @param {Array<Object>} second - The second dataset to join.
|
|
18
|
+
* @param {Function} condition - The condition to join the datasets on.
|
|
19
|
+
* @returns {Array<Object>} - The joined dataset.
|
|
20
|
+
*/
|
|
21
|
+
export function innerJoin(first: Array<Object>, second: Array<Object>, condition: Function): Array<Object>;
|
|
22
|
+
/**
|
|
23
|
+
* Performs a left join on two datasets based on a condition.
|
|
24
|
+
*
|
|
25
|
+
* - Result includes all rows from the first dataset and matching rows from the second dataset.
|
|
26
|
+
* - In case of multiple matches, all combinations are returned.
|
|
27
|
+
* - When combining the rows, the columns from the first dataset take precedence.
|
|
28
|
+
* - If there is no match in the second dataset, only the row from the first dataset is returned.
|
|
29
|
+
*
|
|
30
|
+
* This can be used to perform a right join by swapping the datasets.
|
|
31
|
+
*
|
|
32
|
+
* @param {Array<Object>} first - The first dataset to join.
|
|
33
|
+
* @param {Array<Object>} second - The second dataset to join.
|
|
34
|
+
* @param {Function} condition - The condition to join the datasets on.
|
|
35
|
+
* @returns {Array<Object>} - The joined dataset.
|
|
36
|
+
*/
|
|
37
|
+
export function leftJoin(first: Array<Object>, second: Array<Object>, condition: Function): Array<Object>;
|
|
38
|
+
/**
|
|
39
|
+
* Performs a right join on two datasets based on a condition.
|
|
40
|
+
*
|
|
41
|
+
* - Result includes all rows from both datasets.
|
|
42
|
+
* - In case of multiple matches, all combinations are returned.
|
|
43
|
+
* - When combining the rows, the columns from the second dataset take precedence.
|
|
44
|
+
* - If there is no match in the first dataset, only the row from the second dataset is returned.
|
|
45
|
+
*
|
|
46
|
+
* @param {Array<Object>} first - The first dataset to join.
|
|
47
|
+
* @param {Array<Object>} second - The second dataset to join.
|
|
48
|
+
* @param {Function} condition - The condition to join the datasets on.
|
|
49
|
+
* @returns {Array<Object>} - The joined dataset.
|
|
50
|
+
*/
|
|
51
|
+
export function rightJoin(first: Array<Object>, second: Array<Object>, condition: Function): Array<Object>;
|
|
52
|
+
/**
|
|
53
|
+
* Performs a full join on two datasets based on a condition.
|
|
54
|
+
*
|
|
55
|
+
* - Result includes all rows from both datasets.
|
|
56
|
+
* - In case of multiple matches, all combinations are returned.
|
|
57
|
+
* - When combining the rows, the columns from the second dataset take precedence.
|
|
58
|
+
* - If there is no match in the first dataset, only the row from the second dataset is returned.
|
|
59
|
+
*
|
|
60
|
+
* @param {Array<Object>} first - The first dataset to join.
|
|
61
|
+
* @param {Array<Object>} second - The second dataset to join.
|
|
62
|
+
* @param {Function} condition - The condition to join the datasets on.
|
|
63
|
+
* @returns {Array<Object>} - The joined dataset.
|
|
64
|
+
*/
|
|
65
|
+
export function fullJoin(first: Array<Object>, second: Array<Object>, condition: Function): Array<Object>;
|
|
66
|
+
/**
|
|
67
|
+
* Performs a cross join on two datasets. Result includes all combinations of rows from both datasets.
|
|
68
|
+
*
|
|
69
|
+
* @param {Array<Object>} first - The first dataset to join.
|
|
70
|
+
* @param {Array<Object>} second - The second dataset to join.
|
|
71
|
+
* @returns {Array<Object>} - The joined dataset.
|
|
72
|
+
*/
|
|
73
|
+
export function crossJoin(first: Array<Object>, second: Array<Object>): Array<Object>;
|
|
74
|
+
/**
|
|
75
|
+
* Performs a semi join on two datasets based on a condition. Result includes all rows from the first
|
|
76
|
+
* dataset that have a match in the second dataset.
|
|
77
|
+
*
|
|
78
|
+
* @param {Array<Object>} first - The first dataset to join.
|
|
79
|
+
* @param {Array<Object>} second - The second dataset to join.
|
|
80
|
+
* @param {Function} condition - The condition to join the datasets on.
|
|
81
|
+
* @returns {Array<Object>} - The joined dataset.
|
|
82
|
+
*/
|
|
83
|
+
export function semiJoin(first: Array<Object>, second: Array<Object>, condition: Function): Array<Object>;
|
|
84
|
+
/**
|
|
85
|
+
* Performs a nested join on two datasets based on a condition. Result includes all rows from the first
|
|
86
|
+
* dataset that have a match in the second dataset. The result is nested with the matching rows from the
|
|
87
|
+
* second dataset.
|
|
88
|
+
*
|
|
89
|
+
* @param {Array<Object>} first - The first dataset to join.
|
|
90
|
+
* @param {Array<Object>} second - The second dataset to join.
|
|
91
|
+
* @param {Function} condition - The condition to join the datasets on.
|
|
92
|
+
* @param {String} [key='children'] - The key to nest the matching rows under.
|
|
93
|
+
* @returns {Array<Object>} - The joined dataset.
|
|
94
|
+
*/
|
|
95
|
+
export function nestedJoin(first: Array<Object>, second: Array<Object>, condition: Function, key?: string): Array<Object>;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compares two items for sorting. When grouped, uses group comparison before item comparison
|
|
3
|
+
*
|
|
4
|
+
* @param {*} a first item
|
|
5
|
+
* @param {*} b second item
|
|
6
|
+
* @param {*} data
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export function compare(a: any, b: any, data: any): number;
|
|
10
|
+
/**
|
|
11
|
+
* Search the data for existence of string in the data
|
|
12
|
+
*
|
|
13
|
+
* @param {List} data
|
|
14
|
+
* @param {string} value
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export function quickSearch(data: List, value: string): object[];
|
|
18
|
+
/**
|
|
19
|
+
* Create a new list
|
|
20
|
+
*
|
|
21
|
+
* @param {Array<object>} data
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
export function list(data: Array<object>): List;
|
|
25
|
+
/**
|
|
26
|
+
* Implements a list containing data and functionality for sorting, filtering, and grouping.
|
|
27
|
+
*/
|
|
28
|
+
export class List {
|
|
29
|
+
/**
|
|
30
|
+
* Creates a List instance with initial data and default settings for keys and functions.
|
|
31
|
+
* @param {Array<object>} data - The initial array of objects to populate the list.
|
|
32
|
+
*/
|
|
33
|
+
constructor(data: Array<object>);
|
|
34
|
+
data: object[];
|
|
35
|
+
primaryKey: string;
|
|
36
|
+
filterKey: string | undefined;
|
|
37
|
+
sortKey: string | undefined;
|
|
38
|
+
groupKey: string | undefined;
|
|
39
|
+
lookup: {};
|
|
40
|
+
searchText: string;
|
|
41
|
+
filterUsing: Function | undefined;
|
|
42
|
+
sortUsing: Function | undefined;
|
|
43
|
+
filtered: import("svelte/store").Writable<object[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Sets a primary key attribute for list items and assigns a unique identifier if not present.
|
|
46
|
+
*
|
|
47
|
+
* @param {string} value - The property name to be set as the primary key.
|
|
48
|
+
* @returns {List} This list instance for method chaining.
|
|
49
|
+
*/
|
|
50
|
+
key(value: string): List;
|
|
51
|
+
/**
|
|
52
|
+
* Configures sorting by a given key and sorting function.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} key - The property name to sort by.
|
|
55
|
+
* @param {Function} [using=compare] - The function used to sort the list items.
|
|
56
|
+
* @returns {List} This list instance for method chaining.
|
|
57
|
+
*/
|
|
58
|
+
sortBy(key: string, using?: Function): List;
|
|
59
|
+
/**
|
|
60
|
+
* Groups list items by a given key and maps group keys for display using an optional lookup object.
|
|
61
|
+
*
|
|
62
|
+
* @param {string} key - The property name to group by.
|
|
63
|
+
* @param {object|null} [lookup=null] - An object mapping group keys to display names.
|
|
64
|
+
* @returns {List} This list instance for method chaining.
|
|
65
|
+
*/
|
|
66
|
+
groupBy(key: string, lookup?: object | null): List;
|
|
67
|
+
/**
|
|
68
|
+
* Sets the key and function for filtering list items.
|
|
69
|
+
*
|
|
70
|
+
* @param {string} key - The property name to filter by.
|
|
71
|
+
* @param {Function} [using=quickSearch] - The function used to filter the list items.
|
|
72
|
+
* @returns {List} This list instance for method chaining.
|
|
73
|
+
*/
|
|
74
|
+
filterBy(key: string, using?: Function): List;
|
|
75
|
+
/**
|
|
76
|
+
* Sorts the list based on the configured sorting function.
|
|
77
|
+
*
|
|
78
|
+
* @returns {List} This list instance for method chaining.
|
|
79
|
+
*/
|
|
80
|
+
sort(): List;
|
|
81
|
+
/**
|
|
82
|
+
* Adds a new item to the list, assigning a primary key if necessary, and then sorts and refreshes the list.
|
|
83
|
+
*
|
|
84
|
+
* @param {object} item - The item to add to the list.
|
|
85
|
+
* @returns {List} This list instance for method chaining.
|
|
86
|
+
*/
|
|
87
|
+
add(item: object): List;
|
|
88
|
+
/**
|
|
89
|
+
* Removes an item from the list by primary key and refreshes the list.
|
|
90
|
+
*
|
|
91
|
+
* @param {object} item - The item to remove from the list.
|
|
92
|
+
* @returns {List} This list instance for method chaining.
|
|
93
|
+
*/
|
|
94
|
+
remove(item: object): List;
|
|
95
|
+
/**
|
|
96
|
+
* Modifies an existing item in the list, identified by primary key, and then sorts and refreshes the list.
|
|
97
|
+
*
|
|
98
|
+
* @param {object} item - The item to modify in the list.
|
|
99
|
+
* @returns {List} This list instance for method chaining.
|
|
100
|
+
*/
|
|
101
|
+
modify(item: object): List;
|
|
102
|
+
/**
|
|
103
|
+
* Sets the text to search for in the list's items and then refreshes the list.
|
|
104
|
+
*
|
|
105
|
+
* @param {string} text - The text to search for.
|
|
106
|
+
* @returns {List} This list instance for method chaining.
|
|
107
|
+
*/
|
|
108
|
+
search(text: string): List;
|
|
109
|
+
/**
|
|
110
|
+
* Refreshes the list based on current sorting, grouping, and filtering configuration.
|
|
111
|
+
*
|
|
112
|
+
* @returns {List} This list instance for method chaining.
|
|
113
|
+
*/
|
|
114
|
+
refresh(): List;
|
|
115
|
+
/**
|
|
116
|
+
* Gets the current state of the filtered list data.
|
|
117
|
+
*
|
|
118
|
+
* @returns {Array<object>} The current filtered data of the list.
|
|
119
|
+
*/
|
|
120
|
+
current(): Array<object>;
|
|
121
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds a path modifier to column definitions that match a specific path.
|
|
3
|
+
*
|
|
4
|
+
* @param {Array<Object>} columns - The original array of column definitions.
|
|
5
|
+
* @param {string|null} path - The path used to identify columns that require path modifiers.
|
|
6
|
+
* @param {string} separator - The separator used in conjunction with the path.
|
|
7
|
+
* @returns {Array<Object>} The array of column definitions with path modifiers added as needed.
|
|
8
|
+
*/
|
|
9
|
+
export function addPathModifier(columns: Array<Object>, path: string | null, separator: string): Array<Object>;
|
|
10
|
+
/**
|
|
11
|
+
* Derives column properties for a given sample and options.
|
|
12
|
+
*
|
|
13
|
+
* @param {Object} sample - The sample object used to derive column properties.
|
|
14
|
+
* @param {Object} options - The options used to modify column properties.
|
|
15
|
+
* It can specify path, separator, and currencySuffix for column customization.
|
|
16
|
+
* @returns {Array<Object>} An array of derived column definitions.
|
|
17
|
+
*/
|
|
18
|
+
export function deriveColumnProperties(sample: Object, options: Object): Array<Object>;
|
|
19
|
+
/**
|
|
20
|
+
* Derives the column metadata from the provided data and options.
|
|
21
|
+
*
|
|
22
|
+
* @param {Array} data - The data to derive the column metadata from.
|
|
23
|
+
* @param {Object} [options] - Optional parameters to control the metadata derivation.
|
|
24
|
+
* @param {Array} [options.metadata] - The metadata to use instead of deriving it from the data.
|
|
25
|
+
* @param {boolean} [options.deepScan=false] - Determines if the metadata derivation should perform a deep scan of the data.
|
|
26
|
+
*
|
|
27
|
+
* @returns {import('./types').Metadata} The derived column metadata.
|
|
28
|
+
*/
|
|
29
|
+
export function deriveColumnMetadata(data: any[], options?: {
|
|
30
|
+
metadata?: any[] | undefined;
|
|
31
|
+
deepScan?: boolean | undefined;
|
|
32
|
+
}): import("./types").Metadata;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A model is a representation of a dataset
|
|
3
|
+
* @returns an object with methods to manipulate the model
|
|
4
|
+
*/
|
|
5
|
+
export function model(): {
|
|
6
|
+
get: () => any[];
|
|
7
|
+
clone: (other: any) => /*elided*/ any;
|
|
8
|
+
/**
|
|
9
|
+
* Renames the reference names using a renamer
|
|
10
|
+
* @param {Function} rename - the renamer function
|
|
11
|
+
*/
|
|
12
|
+
renameUsing: (rename?: Function) => /*elided*/ any;
|
|
13
|
+
/**
|
|
14
|
+
* Analyzes the input data and derives a model from it
|
|
15
|
+
*
|
|
16
|
+
* @param {Array|Object} value - the data to derive the model from
|
|
17
|
+
* @param {boolean} sparseData - indicates that rows may have missing attributes
|
|
18
|
+
* @returns {Object} this
|
|
19
|
+
*/
|
|
20
|
+
from: (value: any[] | Object, sparseData: boolean) => Object;
|
|
21
|
+
/**
|
|
22
|
+
* Merges the model with another model
|
|
23
|
+
*
|
|
24
|
+
* @param {Array} other - the model to merge with
|
|
25
|
+
* @param {Boolean} override - whether to override the type of the first model
|
|
26
|
+
* @returns {Object} this
|
|
27
|
+
*/
|
|
28
|
+
merge: (other: any[], override?: boolean) => Object;
|
|
29
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constructs a regular expression pattern for matching search filter strings.
|
|
3
|
+
* The pattern captures "column", "operator", and "value" groups for filter expressions.
|
|
4
|
+
* Supported operators include common comparison and wildcard operators.
|
|
5
|
+
*
|
|
6
|
+
* Examples of valid expressions this regex can match:
|
|
7
|
+
* - "username:john_doe"
|
|
8
|
+
* - "age>30"
|
|
9
|
+
* - "status!=active"
|
|
10
|
+
* - "title~\"Product Manager\""
|
|
11
|
+
* - "completed!~*yes"
|
|
12
|
+
*
|
|
13
|
+
* The "column" group matches one or more word characters.
|
|
14
|
+
* The "operator" group matches one among the specified comparison or wildcard operators:
|
|
15
|
+
* :, >, <, >=, <=, =<, =>, =, !=, ~, ~*, !~, !~*.
|
|
16
|
+
* The "value" group matches either a double-quoted string or a single unquoted word
|
|
17
|
+
* that doesn't include whitespace or any of the operator characters.
|
|
18
|
+
*
|
|
19
|
+
* @returns {RegExp} - The regular expression pattern to identify search filter elements.
|
|
20
|
+
*/
|
|
21
|
+
export function getRegex(): RegExp;
|
|
22
|
+
/**
|
|
23
|
+
* Parses a search string and extracts filters based on a predefined regular expression pattern.
|
|
24
|
+
* Each filter captures column, operator, and value components. Any remaining text that
|
|
25
|
+
* does not fit the pattern is considered a general search term.
|
|
26
|
+
*
|
|
27
|
+
* @param {string} string - The search string to parse for filters.
|
|
28
|
+
* @returns {Object[]} - An array of filter objects each containing the column, operator, and value,
|
|
29
|
+
* plus an additional object for general search if there is remaining text.
|
|
30
|
+
*/
|
|
31
|
+
export function parseFilters(string: string): Object[];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A generator function that produces a function to rename keys.
|
|
3
|
+
*
|
|
4
|
+
* @param {OptionsToRenameKeys} options - Options to rename keys
|
|
5
|
+
* @returns {Object} - A renamer object.
|
|
6
|
+
*
|
|
7
|
+
* Example:
|
|
8
|
+
*
|
|
9
|
+
* renamer({ prefix: 'a', keys: ['a', 'b'] }).get()
|
|
10
|
+
* renamer({ prefix: 'a', separator: '-' }).get()
|
|
11
|
+
* renamer().setPrefix('a')
|
|
12
|
+
* .setSeparator('-')
|
|
13
|
+
* .setKeys(['a', 'b'])
|
|
14
|
+
* .get()
|
|
15
|
+
* renamer().setPrefix('a').get()
|
|
16
|
+
* renamer().setSuffix('b').get()
|
|
17
|
+
* renamer().setKeys(['a', 'b']).get()
|
|
18
|
+
*/
|
|
19
|
+
export function renamer(options?: OptionsToRenameKeys): Object;
|
|
20
|
+
export type OptionsToRenameKeys = {
|
|
21
|
+
/**
|
|
22
|
+
* - The prefix to add to the key.
|
|
23
|
+
*/
|
|
24
|
+
prefix?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* - The suffix to add to the key.
|
|
27
|
+
*/
|
|
28
|
+
suffix?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* - The separator to use between the key and the prefix or suffix.
|
|
31
|
+
*/
|
|
32
|
+
separator?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* - The keys to rename.
|
|
35
|
+
*/
|
|
36
|
+
keys?: any[] | undefined;
|
|
37
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sets initial values for summaries.
|
|
3
|
+
*
|
|
4
|
+
* @param {Array} summaries - An array of summary objects.
|
|
5
|
+
* @returns {Object} An object with keys for each summary initialized to empty arrays.
|
|
6
|
+
*/
|
|
7
|
+
export function initialValues(summaries: any[]): Object;
|
|
8
|
+
/**
|
|
9
|
+
* Adds data to summary aggregation arrays.
|
|
10
|
+
*
|
|
11
|
+
* @param {Object} group - The group object to add data to.
|
|
12
|
+
* @param {Object} row - The data row being processed.
|
|
13
|
+
* @param {Array} summaries - An array of summary objects.
|
|
14
|
+
*/
|
|
15
|
+
export function addToSummaries(group: Object, row: Object, summaries: any[]): void;
|
|
16
|
+
/**
|
|
17
|
+
* Groups data by specified keys.
|
|
18
|
+
*
|
|
19
|
+
* @param {Array} data - An array of data points.
|
|
20
|
+
* @param {Array} groupByKeys - Keys to group the data by.
|
|
21
|
+
* @param {Array} summaries - An array of summary objects to define aggregation operations.
|
|
22
|
+
* @returns {Object} Grouped data object with aggregation placeholders.
|
|
23
|
+
*/
|
|
24
|
+
export function groupDataByKeys(data: any[], groupByKeys: any[], summaries: any[]): Object;
|
|
25
|
+
/**
|
|
26
|
+
* Fills grouped data with aligned data if specified in configuration.
|
|
27
|
+
*
|
|
28
|
+
* @param {Object} groupedData - The grouped data object.
|
|
29
|
+
* @param {Object} config - Configuration object containing alignment settings.
|
|
30
|
+
* @returns {Array} Aligned data array.
|
|
31
|
+
*/
|
|
32
|
+
export function fillAlignedData(groupedData: Object, config: Object, fillRowsFunc: any): any[];
|
|
33
|
+
/**
|
|
34
|
+
* Performs aggregation operations on grouped data.
|
|
35
|
+
*
|
|
36
|
+
* @param {Array} dataArray - An array of grouped data with aggregation arrays.
|
|
37
|
+
* @param {Array} summaries - An array of summary objects with reducer functions.
|
|
38
|
+
* @returns {Array} Aggregated data array with computed summary values.
|
|
39
|
+
*/
|
|
40
|
+
export function aggregateData(dataArray: any[], summaries: any[]): any[];
|
|
41
|
+
/**
|
|
42
|
+
* Creates a generator that produces missing rows in a dataset based on specified columns.
|
|
43
|
+
* The function determines all unique combinations of the specified columns in config.align_by
|
|
44
|
+
* and returns a generator function to create the missing combinations, potentially with default
|
|
45
|
+
* values for other columns.
|
|
46
|
+
* @param {Array<Object>} data - The array of objects representing the dataset.
|
|
47
|
+
* @param {Object} config - The configuration object.
|
|
48
|
+
*
|
|
49
|
+
* @returns {Function} A generator function that when called, produces the missing rows.
|
|
50
|
+
*/
|
|
51
|
+
export function getAlignGenerator(data: Array<Object>, config: Object): Function;
|