@rokkit/data 1.0.0-next.119 → 1.0.0-next.121
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/aggregators.d.ts +2 -0
- package/dist/constants.d.ts +46 -0
- package/dist/convert.d.ts +10 -0
- package/dist/dataset.d.ts +43 -0
- package/dist/filter.d.ts +26 -0
- package/dist/formatter.d.ts +10 -0
- package/dist/hierarchy.d.ts +36 -0
- package/dist/index.d.ts +7 -0
- package/dist/infer.d.ts +80 -0
- package/dist/join.d.ts +95 -0
- package/dist/list.d.ts +121 -0
- package/dist/metadata.d.ts +32 -0
- package/dist/model.d.ts +29 -0
- 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/parser.d.ts +31 -0
- package/dist/renamer.d.ts +37 -0
- package/dist/rollup.d.ts +51 -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/types.d.ts +346 -0
- package/dist/utils.d.ts +6 -0
- package/dist/view.d.ts +35 -0
- package/package.json +5 -6
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
declare const _default: {};
|
|
2
|
+
export default _default;
|
|
3
|
+
export type FieldMapping = import("@rokkit/core").FieldMapping;
|
|
4
|
+
export type SortOptions = import("@rokkit/core").SortOptions;
|
|
5
|
+
export type HorizontalAlignOptions = import("@rokkit/core").HorizontalAlignOptions;
|
|
6
|
+
export type ActionTypes = import("@rokkit/core").ActionTypes;
|
|
7
|
+
export type SelectionState = import("@rokkit/core").SelectionState;
|
|
8
|
+
export type ColumnSorter = {
|
|
9
|
+
name: string;
|
|
10
|
+
sorter: Function;
|
|
11
|
+
};
|
|
12
|
+
export type SortableColumn = string | [string, boolean] | ColumnSorter;
|
|
13
|
+
export type ColumnAggregator = {
|
|
14
|
+
name: string;
|
|
15
|
+
aggregator: Function;
|
|
16
|
+
suffix: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Options for joining two data sets
|
|
20
|
+
*/
|
|
21
|
+
export type OptionsToRenameKeys = {
|
|
22
|
+
/**
|
|
23
|
+
* - Prefix to be added to each attribute
|
|
24
|
+
*/
|
|
25
|
+
prefix?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* - Suffix to be added to each attribute
|
|
28
|
+
*/
|
|
29
|
+
suffix?: string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* - Separator to be used when adding prefix or suffix. defaults to _
|
|
32
|
+
*/
|
|
33
|
+
separator?: string | undefined;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Column metadata for the table.
|
|
37
|
+
*/
|
|
38
|
+
export type ColumnMetadata = {
|
|
39
|
+
/**
|
|
40
|
+
* - The name of the column.
|
|
41
|
+
*/
|
|
42
|
+
name: string;
|
|
43
|
+
/**
|
|
44
|
+
* - The data type of the column (e.g., "string", "number", "date").
|
|
45
|
+
*/
|
|
46
|
+
type: string;
|
|
47
|
+
/**
|
|
48
|
+
* - The field mapping for the column.
|
|
49
|
+
*/
|
|
50
|
+
field?: import("@rokkit/core").FieldMapping | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* - The number of digits for numeric values (defaults to 0).
|
|
53
|
+
*/
|
|
54
|
+
digits?: number | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* - A function to format the column value.
|
|
57
|
+
*/
|
|
58
|
+
formatter: Function;
|
|
59
|
+
/**
|
|
60
|
+
* - Indicates if the column is sortable (true/false).
|
|
61
|
+
*/
|
|
62
|
+
sortable?: boolean | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* - The sort order of the column.
|
|
65
|
+
*/
|
|
66
|
+
sortOrder?: import("@rokkit/core").SortOptions | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* - The alignment of the column content.
|
|
69
|
+
*/
|
|
70
|
+
align?: import("@rokkit/core").HorizontalAlignOptions | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* - Action attribute for action columns.
|
|
73
|
+
*/
|
|
74
|
+
action?: import("@rokkit/core").ActionTypes | undefined;
|
|
75
|
+
};
|
|
76
|
+
export type Metadata = Array<ColumnMetadata>;
|
|
77
|
+
export type ColumnIndexMap = {
|
|
78
|
+
[x: string]: number;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Track the state of a row in the table.
|
|
82
|
+
*/
|
|
83
|
+
export type TreeTableNode = {
|
|
84
|
+
/**
|
|
85
|
+
* - Reference to actual row in the data.
|
|
86
|
+
*/
|
|
87
|
+
row: number;
|
|
88
|
+
/**
|
|
89
|
+
* - The depth of the node in the hierarchy.
|
|
90
|
+
*/
|
|
91
|
+
depth: number;
|
|
92
|
+
/**
|
|
93
|
+
* - The value of the hierarchy node.
|
|
94
|
+
*/
|
|
95
|
+
value?: string | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* - Indicates whether the node is visible (true/false).
|
|
98
|
+
*/
|
|
99
|
+
isHidden?: boolean | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* - Indicates if this node is a parent (true/false).
|
|
102
|
+
*/
|
|
103
|
+
isParent?: boolean | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* - Indicates whether the node is expanded (true/false).
|
|
106
|
+
*/
|
|
107
|
+
isExpanded?: boolean | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* - Reference to the parent node in the flat list.
|
|
110
|
+
*/
|
|
111
|
+
parent?: number | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* - Indicates whether the node is selected (true/false/indeterminate).
|
|
114
|
+
*/
|
|
115
|
+
selected?: import("@rokkit/core").SelectionState | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* - Reference to the children nodes in the flat list.
|
|
118
|
+
*/
|
|
119
|
+
children: Array<any>;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Track the state of all rows in the table.
|
|
123
|
+
*/
|
|
124
|
+
export type TreeTable = {
|
|
125
|
+
/**
|
|
126
|
+
* - Flat list of hierarchy nodes.
|
|
127
|
+
*/
|
|
128
|
+
rows: TreeTableNode[];
|
|
129
|
+
};
|
|
130
|
+
export type OverrideConfig = {
|
|
131
|
+
/**
|
|
132
|
+
* - the field used for identifying filler rows in the data
|
|
133
|
+
*/
|
|
134
|
+
actual_flag: string;
|
|
135
|
+
/**
|
|
136
|
+
* - the field used for collecting children of a node in rollup
|
|
137
|
+
*/
|
|
138
|
+
children: string;
|
|
139
|
+
};
|
|
140
|
+
export type ReducerConfig = {
|
|
141
|
+
/**
|
|
142
|
+
* - The target field to hold the reduced value
|
|
143
|
+
*/
|
|
144
|
+
field: string;
|
|
145
|
+
/**
|
|
146
|
+
* - The function to use for reducing the data
|
|
147
|
+
*/
|
|
148
|
+
using: Function;
|
|
149
|
+
};
|
|
150
|
+
export type SummaryConfig = {
|
|
151
|
+
/**
|
|
152
|
+
* - A function used to collect the data for the summary
|
|
153
|
+
*/
|
|
154
|
+
mapper: Function;
|
|
155
|
+
/**
|
|
156
|
+
* - Array of reducer configurations
|
|
157
|
+
*/
|
|
158
|
+
reducers: Array<ReducerConfig>;
|
|
159
|
+
/**
|
|
160
|
+
* - Array of column metadata for the summary
|
|
161
|
+
*/
|
|
162
|
+
metadata?: Metadata | undefined;
|
|
163
|
+
};
|
|
164
|
+
export type DataFrameConfig = {
|
|
165
|
+
/**
|
|
166
|
+
* =[] - The columns to group by.
|
|
167
|
+
*/
|
|
168
|
+
group_by: Array<string>;
|
|
169
|
+
/**
|
|
170
|
+
* =[] - The columns to be aligned during rollup.
|
|
171
|
+
*/
|
|
172
|
+
align_by: Array<string>;
|
|
173
|
+
/**
|
|
174
|
+
* =[] - Array of summary configurations.
|
|
175
|
+
*/
|
|
176
|
+
summaries: Array<SummaryConfig>;
|
|
177
|
+
/**
|
|
178
|
+
* ={} - Template row to be used for filling in missing rows.
|
|
179
|
+
*/
|
|
180
|
+
template: any;
|
|
181
|
+
};
|
|
182
|
+
export type SortBy = Function;
|
|
183
|
+
/**
|
|
184
|
+
* DataFrame-like object with data manipulation methods.
|
|
185
|
+
*/
|
|
186
|
+
export type DataFrame = {
|
|
187
|
+
/**
|
|
188
|
+
* - Array of objects representing the rows of data.
|
|
189
|
+
*/
|
|
190
|
+
data: Array<Object>;
|
|
191
|
+
/**
|
|
192
|
+
* - Array of column metadata for the data.
|
|
193
|
+
*/
|
|
194
|
+
metadata: Metadata;
|
|
195
|
+
/**
|
|
196
|
+
* - Configuration options for the DataFrame.
|
|
197
|
+
*/
|
|
198
|
+
config: DataFrameConfig;
|
|
199
|
+
/**
|
|
200
|
+
* - A map of column names to their index in the metadata.
|
|
201
|
+
*/
|
|
202
|
+
columns: ColumnIndexMap;
|
|
203
|
+
/**
|
|
204
|
+
* - Method to override the configuration of the DataFrame.
|
|
205
|
+
*/
|
|
206
|
+
override: (arg0: OverrideConfig) => DataFrame;
|
|
207
|
+
/**
|
|
208
|
+
* - Method to group the DataFrame by specified columns.
|
|
209
|
+
*/
|
|
210
|
+
groupBy: (...args: string[]) => DataFrame;
|
|
211
|
+
/**
|
|
212
|
+
* - Sets the filter function for the DataFrame
|
|
213
|
+
*/
|
|
214
|
+
where: (arg0: (arg0: any) => any) => DataFrame;
|
|
215
|
+
/**
|
|
216
|
+
* - Method to align the DataFrame.
|
|
217
|
+
*/
|
|
218
|
+
align: () => DataFrame;
|
|
219
|
+
/**
|
|
220
|
+
* - set the template to be used for filling in missing rows.
|
|
221
|
+
*/
|
|
222
|
+
using: () => DataFrame;
|
|
223
|
+
/**
|
|
224
|
+
* - add a summarizer to be used during rollup
|
|
225
|
+
*/
|
|
226
|
+
summarize: () => DataFrame;
|
|
227
|
+
/**
|
|
228
|
+
* - Method to sort the DataFrame by specified columns.
|
|
229
|
+
*/
|
|
230
|
+
sortBy: (...args: SortableColumn[]) => DataFrame;
|
|
231
|
+
/**
|
|
232
|
+
* - perform join with another DataFrame returning a new DataFrmae. Defaults to innerJoin, other join types can be specified.
|
|
233
|
+
*/
|
|
234
|
+
join: () => DataFrame;
|
|
235
|
+
/**
|
|
236
|
+
* - perform an ineer join with another DataFrame and return a new DataFrame.
|
|
237
|
+
*/
|
|
238
|
+
innerJoin: () => DataFrame;
|
|
239
|
+
/**
|
|
240
|
+
* - perform a left join with another DataFrame and return a new DataFrame.
|
|
241
|
+
*/
|
|
242
|
+
leftJoin: () => DataFrame;
|
|
243
|
+
/**
|
|
244
|
+
* - perform a right join with another DataFrame returning a new DataFrame.
|
|
245
|
+
*/
|
|
246
|
+
rightJoin: () => DataFrame;
|
|
247
|
+
/**
|
|
248
|
+
* - perform a full join with another DataFrame returning a new DataFrame.
|
|
249
|
+
*/
|
|
250
|
+
fullJoin: () => DataFrame;
|
|
251
|
+
/**
|
|
252
|
+
* - perform a nested join with another DataFrame returning a new DataFrame.
|
|
253
|
+
*/
|
|
254
|
+
nestedJoin: () => DataFrame;
|
|
255
|
+
/**
|
|
256
|
+
* - Method to rename the columns of the DataFrame.
|
|
257
|
+
*/
|
|
258
|
+
rename: () => DataFrame;
|
|
259
|
+
/**
|
|
260
|
+
* - Method to drop the columns of the DataFrame.
|
|
261
|
+
*/
|
|
262
|
+
drop: () => DataFrame;
|
|
263
|
+
/**
|
|
264
|
+
* - Method to delete the rows of the DataFrame.
|
|
265
|
+
*/
|
|
266
|
+
delete: () => DataFrame;
|
|
267
|
+
/**
|
|
268
|
+
* - Method to update the rows of the DataFrame.
|
|
269
|
+
*/
|
|
270
|
+
update: () => DataFrame;
|
|
271
|
+
/**
|
|
272
|
+
* - Method to combine the rows of the DataFrame with another DataFrame.
|
|
273
|
+
*/
|
|
274
|
+
union: () => DataFrame;
|
|
275
|
+
/**
|
|
276
|
+
* - Method to remove the rows of the DataFrame which are present in another DataFrame.
|
|
277
|
+
*/
|
|
278
|
+
minus: () => DataFrame;
|
|
279
|
+
/**
|
|
280
|
+
* - Method to keep the rows of the DataFrame which are present in another DataFrame.
|
|
281
|
+
*/
|
|
282
|
+
intersect: () => DataFrame;
|
|
283
|
+
/**
|
|
284
|
+
* - Method to rollup the DataFrame.
|
|
285
|
+
*/
|
|
286
|
+
rollup: () => DataFrame;
|
|
287
|
+
/**
|
|
288
|
+
* - Method to select the columns of the DataFrame.
|
|
289
|
+
*/
|
|
290
|
+
select: () => Arrat<Object>;
|
|
291
|
+
};
|
|
292
|
+
export type JoinType = inner | outer | full | nested;
|
|
293
|
+
/**
|
|
294
|
+
* Options for joining two data sets
|
|
295
|
+
*/
|
|
296
|
+
export type JoinOptions = {
|
|
297
|
+
/**
|
|
298
|
+
* - Flag indicating inner join
|
|
299
|
+
*/
|
|
300
|
+
inner?: boolean | undefined;
|
|
301
|
+
/**
|
|
302
|
+
* {string} [prefix] - prefix to be used for renaming keys in the second data set.
|
|
303
|
+
*/
|
|
304
|
+
type?: JoinType;
|
|
305
|
+
/**
|
|
306
|
+
* - suffix to be used for renaming keys in the second data set.
|
|
307
|
+
*/
|
|
308
|
+
suffix?: string | undefined;
|
|
309
|
+
/**
|
|
310
|
+
* - separator to be used for renaming keys in the second data set.
|
|
311
|
+
*/
|
|
312
|
+
separator?: string | undefined;
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* DataView
|
|
316
|
+
*/
|
|
317
|
+
export type DataView = {
|
|
318
|
+
/**
|
|
319
|
+
* - The state of the rows in the table.
|
|
320
|
+
*/
|
|
321
|
+
hierarchy: TreeTable;
|
|
322
|
+
/**
|
|
323
|
+
* - The metadata for the columns in the table.
|
|
324
|
+
*/
|
|
325
|
+
columns: Metadata;
|
|
326
|
+
/**
|
|
327
|
+
* - Sort the DataView by the specified columns.
|
|
328
|
+
*/
|
|
329
|
+
sortBy: Function;
|
|
330
|
+
/**
|
|
331
|
+
* - Clear the sorting of the DataView.
|
|
332
|
+
*/
|
|
333
|
+
clearSort: Function;
|
|
334
|
+
/**
|
|
335
|
+
* - Filter the DataView by the specified columns.
|
|
336
|
+
*/
|
|
337
|
+
filter: Function;
|
|
338
|
+
/**
|
|
339
|
+
* - toggle expand or collapse the DataView by the specified columns.
|
|
340
|
+
*/
|
|
341
|
+
toggle: Function;
|
|
342
|
+
/**
|
|
343
|
+
* - select the DataView by the specified columns.
|
|
344
|
+
*/
|
|
345
|
+
select: Function;
|
|
346
|
+
};
|
package/dist/utils.d.ts
ADDED
package/dist/view.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sorts a hierarchy based on a group of sorters.
|
|
3
|
+
*
|
|
4
|
+
* @param {Array<Object>} hierarchy - The hierarchy to sort.
|
|
5
|
+
* @param {Array<Array<string, boolean>>} sortGroup - The group of sorters to apply.
|
|
6
|
+
*/
|
|
7
|
+
export function groupSort(hierarchy: Array<Object>, sortGroup: Array<Array<string, boolean>>): void;
|
|
8
|
+
/**
|
|
9
|
+
* Determines the selected state of a group of children in the hierarchy.
|
|
10
|
+
* If all children are checked, returns 'checked'.
|
|
11
|
+
* If all children are unchecked, returns 'unchecked'.
|
|
12
|
+
* Otherwise, returns 'indeterminate'.
|
|
13
|
+
*
|
|
14
|
+
* @param {Array<Object>} children - The array of child objects with a 'selected' property.
|
|
15
|
+
* @returns {string} The determined selected state: 'checked', 'unchecked', or 'indeterminate'.
|
|
16
|
+
*/
|
|
17
|
+
export function determineSelectedState(children: Array<Object>): string;
|
|
18
|
+
/**
|
|
19
|
+
* Toggles the selection state of a node in the hierarchy.
|
|
20
|
+
* Depending on whether the node to toggle is a parent or child,
|
|
21
|
+
* it will either select or deselect all children, or update the parent's selection state based on its children's states.
|
|
22
|
+
*
|
|
23
|
+
* @param {import('./types').Hierarchy} item - The node to toggle.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export function toggleSelection(item: import("./types").Hierarchy): void;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a view object for managing data presentation with metadata and hierarchy structures,
|
|
29
|
+
* as well as providing methods for sorting, selection, and toggling of data expansion.
|
|
30
|
+
*
|
|
31
|
+
* @param {Array<Object>} data - The source data array to be presented by the view.
|
|
32
|
+
* @param {Object} options - The configuration options used for deriving metadata and hierarchy from the data.
|
|
33
|
+
* @returns {import('svelte/store').Writable} An object representing the view, providing methods to manipulate and query the presentation state.
|
|
34
|
+
*/
|
|
35
|
+
export function dataview(data: Array<Object>, options: Object): import("svelte/store").Writable<any>;
|
package/package.json
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rokkit/data",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.121",
|
|
4
4
|
"description": "Contains generic data manipulation functions that can be used in various components.",
|
|
5
5
|
"author": "Jerry Thomas <me@jerrythomas.name>",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"main": "index.js",
|
|
8
|
-
"module": "src/index.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
10
7
|
"type": "module",
|
|
11
8
|
"publishConfig": {
|
|
12
9
|
"access": "public"
|
|
@@ -18,7 +15,9 @@
|
|
|
18
15
|
},
|
|
19
16
|
"files": [
|
|
20
17
|
"src/**/*.js",
|
|
21
|
-
"
|
|
18
|
+
"dist/**/*.d.ts",
|
|
19
|
+
"README.md",
|
|
20
|
+
"package.json"
|
|
22
21
|
],
|
|
23
22
|
"exports": {
|
|
24
23
|
"./src": "./src",
|
|
@@ -31,7 +30,7 @@
|
|
|
31
30
|
},
|
|
32
31
|
"dependencies": {
|
|
33
32
|
"@lukeed/uuid": "^2.0.1",
|
|
34
|
-
"@rokkit/core": "1.0.0-next.
|
|
33
|
+
"@rokkit/core": "1.0.0-next.120",
|
|
35
34
|
"d3-array": "^3.2.4",
|
|
36
35
|
"d3-collection": "^1.0.7",
|
|
37
36
|
"ramda": "^0.30.1",
|