@vuu-ui/vuu-data-test 4.0.0-alpha.2 → 4.0.0-alpha.4

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.
@@ -0,0 +1,477 @@
1
+ const USER_ADMIN_INITIAL_SNAPSHOT = {
2
+ clients: [
3
+ {
4
+ clientId: "vuu-portal",
5
+ description: "VUU portal",
6
+ enabled: true,
7
+ id: "client-portal",
8
+ name: "VUU Portal"
9
+ }
10
+ ],
11
+ clientRoles: [
12
+ {
13
+ client: {
14
+ clientId: "vuu-portal",
15
+ id: "client-portal",
16
+ name: "VUU Portal"
17
+ },
18
+ role: {
19
+ clientRole: true,
20
+ containerId: "client-portal",
21
+ id: "role-user-admin-access",
22
+ name: "user-admin-access",
23
+ roleDisplayName: "access"
24
+ }
25
+ },
26
+ {
27
+ client: {
28
+ clientId: "vuu-portal",
29
+ id: "client-portal",
30
+ name: "VUU Portal"
31
+ },
32
+ role: {
33
+ clientRole: true,
34
+ containerId: "client-portal",
35
+ id: "role-feature-filter-table-access",
36
+ name: "feature-filter-table-access",
37
+ roleDisplayName: "access"
38
+ }
39
+ },
40
+ {
41
+ client: {
42
+ clientId: "vuu-portal",
43
+ id: "client-portal",
44
+ name: "VUU Portal"
45
+ },
46
+ role: {
47
+ clientRole: true,
48
+ containerId: "client-portal",
49
+ id: "role-module-admin-access",
50
+ name: "module-admin-access",
51
+ roleDisplayName: "access"
52
+ }
53
+ },
54
+ {
55
+ client: {
56
+ clientId: "vuu-portal",
57
+ id: "client-portal",
58
+ name: "VUU Portal"
59
+ },
60
+ role: {
61
+ clientRole: true,
62
+ containerId: "client-portal",
63
+ id: "role-basket-trading-access",
64
+ name: "basket-trading-access",
65
+ roleDisplayName: "access"
66
+ }
67
+ },
68
+ {
69
+ client: {
70
+ clientId: "vuu-portal",
71
+ id: "client-portal",
72
+ name: "VUU Portal"
73
+ },
74
+ role: {
75
+ clientRole: true,
76
+ containerId: "client-portal",
77
+ id: "role-user-admin-admin",
78
+ name: "user-admin-admin",
79
+ roleDisplayName: "admin"
80
+ }
81
+ },
82
+ {
83
+ client: {
84
+ clientId: "vuu-portal",
85
+ id: "client-portal",
86
+ name: "VUU Portal"
87
+ },
88
+ role: {
89
+ clientRole: true,
90
+ containerId: "client-portal",
91
+ id: "role-module-admin-admin",
92
+ name: "module-admin-admin",
93
+ roleDisplayName: "admin"
94
+ }
95
+ },
96
+ {
97
+ client: {
98
+ clientId: "vuu-portal",
99
+ id: "client-portal",
100
+ name: "VUU Portal"
101
+ },
102
+ role: {
103
+ clientRole: true,
104
+ containerId: "client-portal",
105
+ id: "role-basket-trading-trade",
106
+ name: "basket-trading-trade",
107
+ roleDisplayName: "trade"
108
+ }
109
+ },
110
+ {
111
+ client: {
112
+ clientId: "realm",
113
+ id: "realm",
114
+ name: "Realm"
115
+ },
116
+ role: {
117
+ id: "role-admin",
118
+ name: "admin",
119
+ roleDisplayName: "admin"
120
+ }
121
+ }
122
+ ],
123
+ groupRoles: [
124
+ {
125
+ client: {
126
+ clientId: "vuu-portal",
127
+ id: "client-portal",
128
+ name: "VUU Portal"
129
+ },
130
+ group: {
131
+ id: "group-user-admin-read",
132
+ name: "user-admin-read",
133
+ groupDisplayName: "read",
134
+ moduleAccessDefaultRoles: [
135
+ "user-admin-access"
136
+ ],
137
+ path: "/vuu/user-admin-read"
138
+ },
139
+ role: {
140
+ id: "role-user-admin-access",
141
+ name: "user-admin-access",
142
+ roleDisplayName: "access"
143
+ }
144
+ },
145
+ {
146
+ client: {
147
+ clientId: "vuu-portal",
148
+ id: "client-portal",
149
+ name: "VUU Portal"
150
+ },
151
+ group: {
152
+ id: "group-feature-filter-table-read",
153
+ name: "feature-filter-table-read",
154
+ groupDisplayName: "read",
155
+ moduleAccessDefaultRoles: [
156
+ "feature-filter-table-access"
157
+ ],
158
+ path: "/vuu/feature-filter-table-read"
159
+ },
160
+ role: {
161
+ id: "role-feature-filter-table-access",
162
+ name: "feature-filter-table-access",
163
+ roleDisplayName: "access"
164
+ }
165
+ },
166
+ {
167
+ client: {
168
+ clientId: "vuu-portal",
169
+ id: "client-portal",
170
+ name: "VUU Portal"
171
+ },
172
+ group: {
173
+ id: "group-module-admin-read",
174
+ name: "module-admin-read",
175
+ groupDisplayName: "read",
176
+ moduleAccessDefaultRoles: [
177
+ "module-admin-access"
178
+ ],
179
+ path: "/vuu/module-admin-read"
180
+ },
181
+ role: {
182
+ id: "role-module-admin-access",
183
+ name: "module-admin-access",
184
+ roleDisplayName: "access"
185
+ }
186
+ },
187
+ {
188
+ client: {
189
+ clientId: "vuu-portal",
190
+ id: "client-portal",
191
+ name: "VUU Portal"
192
+ },
193
+ group: {
194
+ id: "group-basket-trading-read",
195
+ name: "basket-trading-read",
196
+ groupDisplayName: "read",
197
+ moduleAccessDefaultRoles: [
198
+ "basket-trading-access"
199
+ ],
200
+ path: "/vuu/basket-trading-read"
201
+ },
202
+ role: {
203
+ id: "role-basket-trading-access",
204
+ name: "basket-trading-access",
205
+ roleDisplayName: "access"
206
+ }
207
+ },
208
+ {
209
+ client: {
210
+ clientId: "vuu-portal",
211
+ id: "client-portal",
212
+ name: "VUU Portal"
213
+ },
214
+ group: {
215
+ id: "group-user-admin-admin",
216
+ name: "user-admin-admin",
217
+ groupDisplayName: "admin",
218
+ path: "/vuu/user-admin-admin"
219
+ },
220
+ role: {
221
+ id: "role-user-admin-access",
222
+ name: "user-admin-access",
223
+ roleDisplayName: "access"
224
+ }
225
+ },
226
+ {
227
+ client: {
228
+ clientId: "vuu-portal",
229
+ id: "client-portal",
230
+ name: "VUU Portal"
231
+ },
232
+ group: {
233
+ id: "group-user-admin-admin",
234
+ name: "user-admin-admin",
235
+ groupDisplayName: "admin",
236
+ path: "/vuu/user-admin-admin"
237
+ },
238
+ role: {
239
+ id: "role-user-admin-admin",
240
+ name: "user-admin-admin",
241
+ roleDisplayName: "admin"
242
+ }
243
+ },
244
+ {
245
+ client: {
246
+ clientId: "vuu-portal",
247
+ id: "client-portal",
248
+ name: "VUU Portal"
249
+ },
250
+ group: {
251
+ id: "group-module-admin-admin",
252
+ name: "module-admin-admin",
253
+ groupDisplayName: "admin",
254
+ path: "/vuu/module-admin-admin"
255
+ },
256
+ role: {
257
+ id: "role-module-admin-access",
258
+ name: "module-admin-access",
259
+ roleDisplayName: "access"
260
+ }
261
+ },
262
+ {
263
+ client: {
264
+ clientId: "vuu-portal",
265
+ id: "client-portal",
266
+ name: "VUU Portal"
267
+ },
268
+ group: {
269
+ id: "group-module-admin-admin",
270
+ name: "module-admin-admin",
271
+ groupDisplayName: "admin",
272
+ path: "/vuu/module-admin-admin"
273
+ },
274
+ role: {
275
+ id: "role-module-admin-admin",
276
+ name: "module-admin-admin",
277
+ roleDisplayName: "admin"
278
+ }
279
+ },
280
+ {
281
+ client: {
282
+ clientId: "vuu-portal",
283
+ id: "client-portal",
284
+ name: "VUU Portal"
285
+ },
286
+ group: {
287
+ id: "group-basket-trading-trade",
288
+ name: "basket-trading-trade",
289
+ groupDisplayName: "trade",
290
+ path: "/vuu/basket-trading-trade"
291
+ },
292
+ role: {
293
+ id: "role-basket-trading-access",
294
+ name: "basket-trading-access",
295
+ roleDisplayName: "access"
296
+ }
297
+ },
298
+ {
299
+ client: {
300
+ clientId: "vuu-portal",
301
+ id: "client-portal",
302
+ name: "VUU Portal"
303
+ },
304
+ group: {
305
+ id: "group-basket-trading-trade",
306
+ name: "basket-trading-trade",
307
+ groupDisplayName: "trade",
308
+ path: "/vuu/basket-trading-trade"
309
+ },
310
+ role: {
311
+ id: "role-basket-trading-trade",
312
+ name: "basket-trading-trade",
313
+ roleDisplayName: "trade"
314
+ }
315
+ },
316
+ {
317
+ group: {
318
+ id: "group-admins",
319
+ name: "administrators",
320
+ groupDisplayName: "administrators",
321
+ path: "/vuu/administrators"
322
+ },
323
+ role: {
324
+ id: "role-admin",
325
+ name: "admin",
326
+ roleDisplayName: "admin"
327
+ }
328
+ }
329
+ ],
330
+ groups: [
331
+ {
332
+ id: "group-user-admin-read",
333
+ name: "user-admin-read",
334
+ groupDisplayName: "read",
335
+ moduleAccessDefaultRoles: [
336
+ "user-admin-access"
337
+ ],
338
+ path: "/vuu/user-admin-read"
339
+ },
340
+ {
341
+ id: "group-module-admin-read",
342
+ name: "module-admin-read",
343
+ groupDisplayName: "read",
344
+ moduleAccessDefaultRoles: [
345
+ "module-admin-access"
346
+ ],
347
+ path: "/vuu/module-admin-read"
348
+ },
349
+ {
350
+ id: "group-basket-trading-read",
351
+ name: "basket-trading-read",
352
+ groupDisplayName: "read",
353
+ moduleAccessDefaultRoles: [
354
+ "basket-trading-access"
355
+ ],
356
+ path: "/vuu/basket-trading-read"
357
+ },
358
+ {
359
+ id: "group-feature-filter-table-read",
360
+ name: "feature-filter-table-read",
361
+ groupDisplayName: "read",
362
+ moduleAccessDefaultRoles: [
363
+ "feature-filter-table-access"
364
+ ],
365
+ path: "/vuu/feature-filter-table-read"
366
+ },
367
+ {
368
+ id: "group-user-admin-admin",
369
+ name: "user-admin-admin",
370
+ groupDisplayName: "admin",
371
+ path: "/vuu/user-admin-admin"
372
+ },
373
+ {
374
+ id: "group-module-admin-admin",
375
+ name: "module-admin-admin",
376
+ groupDisplayName: "admin",
377
+ path: "/vuu/module-admin-admin"
378
+ },
379
+ {
380
+ id: "group-basket-trading-trade",
381
+ name: "basket-trading-trade",
382
+ groupDisplayName: "trade",
383
+ path: "/vuu/basket-trading-trade"
384
+ },
385
+ {
386
+ id: "group-admins",
387
+ name: "administrators",
388
+ groupDisplayName: "administrators",
389
+ path: "/vuu/administrators"
390
+ }
391
+ ],
392
+ timestamp: 1710000000000,
393
+ userGroups: [
394
+ {
395
+ group: {
396
+ id: "group-user-admin-read",
397
+ name: "user-admin-read",
398
+ groupDisplayName: "read",
399
+ moduleAccessDefaultRoles: [
400
+ "user-admin-access"
401
+ ],
402
+ path: "/vuu/user-admin-read"
403
+ },
404
+ user: {
405
+ email: "alice@example.com",
406
+ id: "user-alice",
407
+ username: "alice"
408
+ }
409
+ },
410
+ {
411
+ group: {
412
+ id: "group-module-admin-read",
413
+ name: "module-admin-read",
414
+ groupDisplayName: "read",
415
+ moduleAccessDefaultRoles: [
416
+ "module-admin-access"
417
+ ],
418
+ path: "/vuu/module-admin-read"
419
+ },
420
+ user: {
421
+ email: "bob@example.com",
422
+ id: "user-bob",
423
+ username: "bob"
424
+ }
425
+ },
426
+ {
427
+ group: {
428
+ id: "group-basket-trading-read",
429
+ name: "basket-trading-read",
430
+ groupDisplayName: "read",
431
+ moduleAccessDefaultRoles: [
432
+ "basket-trading-access"
433
+ ],
434
+ path: "/vuu/basket-trading-read"
435
+ },
436
+ user: {
437
+ email: "alice@example.com",
438
+ id: "user-alice",
439
+ username: "alice"
440
+ }
441
+ },
442
+ {
443
+ group: {
444
+ id: "group-admins",
445
+ name: "administrators",
446
+ groupDisplayName: "administrators",
447
+ path: "/vuu/administrators"
448
+ },
449
+ user: {
450
+ email: "alice@example.com",
451
+ id: "user-alice",
452
+ username: "alice"
453
+ }
454
+ }
455
+ ],
456
+ users: [
457
+ {
458
+ email: "alice@example.com",
459
+ emailVerified: true,
460
+ enabled: true,
461
+ firstName: "Alice",
462
+ id: "user-alice",
463
+ lastName: "Admin",
464
+ username: "alice"
465
+ },
466
+ {
467
+ email: "bob@example.com",
468
+ emailVerified: true,
469
+ enabled: true,
470
+ firstName: "Bob",
471
+ id: "user-bob",
472
+ lastName: "Builder",
473
+ username: "bob"
474
+ }
475
+ ]
476
+ };
477
+ export { USER_ADMIN_INITIAL_SNAPSHOT };
@@ -0,0 +1,151 @@
1
+ const rowsEqual = (left, right)=>left.length === right.length && left.every((value, index)=>value === right[index]);
2
+ const membershipId = (userId, groupId)=>`${userId}:${groupId}`;
3
+ const assignmentId = (groupId, roleId)=>`${groupId}:${roleId}`;
4
+ const resolveDisplayName = (name, configuredDisplayName)=>configuredDisplayName ?? name.split("-").at(-1) ?? name;
5
+ const groupDisplayName = ({ groupDisplayName: configuredDisplayName, name })=>resolveDisplayName(name, configuredDisplayName);
6
+ const roleDisplayName = ({ roleDisplayName: configuredDisplayName, name })=>resolveDisplayName(name, configuredDisplayName);
7
+ const systemValues = (timestamp)=>({
8
+ vuuCreatedTimestamp: timestamp,
9
+ vuuMsg: "",
10
+ vuuUpdatedTimestamp: timestamp
11
+ });
12
+ const toRow = (table, values)=>table.schema.columns.map(({ name })=>values[name] ?? "");
13
+ const userRoleIds = (snapshot, userId)=>{
14
+ const groupIds = new Set(snapshot.userGroups.filter(({ user })=>user.id === userId).map(({ group })=>group.id));
15
+ return new Set(snapshot.groupRoles.filter(({ group })=>groupIds.has(group.id)).map(({ role })=>role.id));
16
+ };
17
+ const moduleAccessRoles = (snapshot, userId)=>Array.from(new Set(snapshot.groupRoles.filter(({ group, role })=>snapshot.userGroups.some(({ user, group: userGroup })=>user.id === userId && userGroup.id === group.id) && role.name.endsWith("-access")).map(({ role })=>role.name))).sort();
18
+ const projectUserAdminSnapshot = (snapshot, tables)=>{
19
+ const system = systemValues(snapshot.timestamp);
20
+ const membershipRows = snapshot.userGroups.map(({ user, group })=>({
21
+ group,
22
+ membership_id: membershipId(user.id, group.id),
23
+ user
24
+ }));
25
+ const assignmentRows = snapshot.groupRoles.map(({ client, group, role })=>({
26
+ assignment_id: assignmentId(group.id, role.id),
27
+ client,
28
+ group,
29
+ role
30
+ }));
31
+ return {
32
+ users: snapshot.users.map((user)=>{
33
+ const accessRoles = moduleAccessRoles(snapshot, user.id);
34
+ return toRow(tables.users, {
35
+ ...system,
36
+ email: user.email ?? "",
37
+ email_verified: user.emailVerified ?? false,
38
+ enabled: user.enabled ?? true,
39
+ first_name: user.firstName ?? "",
40
+ group_count: snapshot.userGroups.filter(({ user: member })=>member.id === user.id).length,
41
+ last_login: 0,
42
+ last_name: user.lastName ?? "",
43
+ module_access: accessRoles.join(","),
44
+ module_access_count: accessRoles.length,
45
+ password_update_required: user.requiredActions?.includes("UPDATE_PASSWORD") ?? false,
46
+ role_count: userRoleIds(snapshot, user.id).size,
47
+ user_id: user.id,
48
+ username: user.username
49
+ });
50
+ }),
51
+ groups: snapshot.groups.map((group)=>toRow(tables.groups, {
52
+ ...system,
53
+ group_display_name: groupDisplayName(group),
54
+ group_id: group.id,
55
+ group_path: group.path ?? `/${group.name}`,
56
+ parent_group_id: group.parentId ?? "",
57
+ role_count: snapshot.groupRoles.filter(({ group: assignmentGroup })=>assignmentGroup.id === group.id).length,
58
+ user_count: snapshot.userGroups.filter(({ group: memberGroup })=>memberGroup.id === group.id).length
59
+ })),
60
+ clients: snapshot.clients.map((client)=>toRow(tables.clients, {
61
+ ...system,
62
+ client_id: client.id,
63
+ client_identifier: client.clientId,
64
+ client_name: client.name ?? "",
65
+ description: client.description ?? "",
66
+ enabled: client.enabled ?? true
67
+ })),
68
+ roles: snapshot.clientRoles.map(({ client, role })=>toRow(tables.roles, {
69
+ ...system,
70
+ client_id: role.containerId ?? client.id,
71
+ client_identifier: client.clientId,
72
+ client_name: client.name ?? "",
73
+ description: role.description ?? "",
74
+ group_count: snapshot.groupRoles.filter(({ role: groupRole })=>groupRole.id === role.id).length,
75
+ role_id: role.id,
76
+ role_display_name: roleDisplayName(role),
77
+ role_name: role.name,
78
+ user_count: new Set(snapshot.userGroups.filter(({ group })=>snapshot.groupRoles.some(({ group: roleGroup, role: groupRole })=>group.id === roleGroup.id && groupRole.id === role.id)).map(({ user })=>user.id)).size
79
+ })),
80
+ user_groups: membershipRows.map(({ group, membership_id, user })=>toRow(tables.user_groups, {
81
+ ...system,
82
+ group_display_name: groupDisplayName(group),
83
+ group_id: group.id,
84
+ group_name: group.name,
85
+ group_path: group.path ?? `/${group.name}`,
86
+ membership_id,
87
+ user_id: user.id,
88
+ username: user.username
89
+ })),
90
+ group_roles: assignmentRows.map(({ assignment_id, client, group, role })=>toRow(tables.group_roles, {
91
+ ...system,
92
+ assignment_id,
93
+ client_id: client?.id ?? "",
94
+ client_identifier: client?.clientId ?? "",
95
+ client_name: client?.name ?? "",
96
+ group_id: group.id,
97
+ group_display_name: groupDisplayName(group),
98
+ group_name: group.name,
99
+ role_id: role.id,
100
+ role_display_name: roleDisplayName(role),
101
+ role_name: role.name
102
+ })),
103
+ user_group_roles: membershipRows.flatMap(({ group, membership_id, user })=>assignmentRows.filter(({ group: assignmentGroup })=>assignmentGroup.id === group.id).map(({ assignment_id, client, role })=>toRow(tables.user_group_roles, {
104
+ ...system,
105
+ assignment_id,
106
+ client_id: client?.id ?? "",
107
+ client_identifier: client?.clientId ?? "",
108
+ client_name: client?.name ?? "",
109
+ email: user.email ?? "",
110
+ email_verified: user.emailVerified ?? false,
111
+ enabled: user.enabled ?? true,
112
+ first_name: user.firstName ?? "",
113
+ group_id: group.id,
114
+ group_display_name: groupDisplayName(group),
115
+ group_name: group.name,
116
+ group_path: group.path ?? `/${group.name}`,
117
+ id: `${membership_id}:${assignment_id}`,
118
+ last_login: 0,
119
+ last_name: user.lastName ?? "",
120
+ membership_id,
121
+ password_update_required: user.requiredActions?.includes("UPDATE_PASSWORD") ?? false,
122
+ role_id: role.id,
123
+ role_display_name: roleDisplayName(role),
124
+ role_name: role.name,
125
+ user_id: user.id,
126
+ username: user.username
127
+ })))
128
+ };
129
+ };
130
+ const reconcileUserAdminTables = (snapshot, tables)=>{
131
+ const projected = projectUserAdminSnapshot(snapshot, tables);
132
+ for (const tableName of Object.keys(tables)){
133
+ const table = tables[tableName];
134
+ const desiredRows = projected[tableName];
135
+ const keyIndex = table.map[table.schema.key];
136
+ const desiredKeys = new Set(desiredRows.map((row)=>String(row[keyIndex])));
137
+ for (const existingRow of [
138
+ ...table.data
139
+ ]){
140
+ const key = String(existingRow[keyIndex]);
141
+ if (!desiredKeys.has(key)) table.delete(key);
142
+ }
143
+ for (const row of desiredRows){
144
+ const key = String(row[keyIndex]);
145
+ const existingRow = table.findByKey(key);
146
+ if (void 0 === existingRow) table.insert(row);
147
+ else if (!rowsEqual(existingRow, row)) table.updateRow(row);
148
+ }
149
+ }
150
+ };
151
+ export { projectUserAdminSnapshot, reconcileUserAdminTables, resolveDisplayName };
@@ -1,11 +1,14 @@
1
- import { VuuModule } from "./VuuModule";
1
+ import type { VuuModule } from "./VuuModule";
2
+ type RegisteredVuuModule = VuuModule<any>;
2
3
  declare class ModuleContainer {
3
4
  #private;
4
5
  private constructor();
5
6
  static get instance(): ModuleContainer;
6
- register(module: VuuModule<any>): void;
7
- get(name: string): VuuModule<string>;
7
+ register(module: RegisteredVuuModule): void;
8
+ has(name: string): boolean;
9
+ get(name: string): RegisteredVuuModule;
8
10
  get moduleNames(): MapIterator<string>;
9
11
  }
10
12
  declare const _default: ModuleContainer;
11
13
  export default _default;
14
+ export declare const ensureVuuModule: <T extends RegisteredVuuModule>(module: T) => T;
@@ -38,6 +38,9 @@ export declare abstract class VuuModule<T extends string = string> implements IV
38
38
  protected abstract menuServices?: Record<T, RpcMenuService[] | undefined> | undefined;
39
39
  protected abstract services?: Record<T, RpcService[] | undefined> | undefined;
40
40
  protected abstract visualLinks?: Record<T, VuuLink[] | undefined>;
41
+ protected get includeDefaultServices(): boolean;
42
+ protected beforeSessionSave(_sourceTable: Table, _sessionTable: Table): Promise<void>;
43
+ protected afterSessionSave(_sourceTable: Table, _sessionTable: Table): Promise<void>;
41
44
  getTableSchema(tableName: string): Record<T, Readonly<TableSchema>>[T];
42
45
  getTableList(): string[];
43
46
  protected handlePostSubscribeActivities: ({ clientViewportId, tableSchema, }: DataSourceSubscribedMessage) => void;
@@ -1,13 +1,13 @@
1
- import { TableSchema } from "@vuu-ui/vuu-data-types";
1
+ import type { TableSchema } from "@vuu-ui/vuu-data-types";
2
2
  import { Table } from "../../Table";
3
- import { VuuRowDataItemType, VuuTable } from "@vuu-ui/vuu-protocol-types";
4
- import { ColumnMap } from "@vuu-ui/vuu-utils";
5
- import { UpdateGenerator } from "../../rowUpdates";
3
+ import type { VuuRowDataItemType, VuuTable } from "@vuu-ui/vuu-protocol-types";
4
+ import type { ColumnMap } from "@vuu-ui/vuu-utils";
5
+ import type { UpdateGenerator } from "../../rowUpdates";
6
6
  declare class TableContainer {
7
7
  #private;
8
8
  private constructor();
9
9
  static get instance(): TableContainer;
10
- createTable: (schema: TableSchema, data: Array<Array<VuuRowDataItemType | bigint>>, dataMap: ColumnMap, updateGenerator?: UpdateGenerator) => Table;
10
+ createTable: (schema: TableSchema, data?: Array<Array<VuuRowDataItemType | bigint>>, dataMap?: ColumnMap, updateGenerator?: UpdateGenerator) => Table;
11
11
  createJoinTable(joinTable: VuuTable, { table: t1 }: VuuTable, { table: t2 }: VuuTable, joinColumn: string): Table;
12
12
  addTable(table: Table): void;
13
13
  getTable<T = Table>(tableName: string): NonNullable<T>;
package/types/index.d.ts CHANGED
@@ -1,11 +1,14 @@
1
1
  export * from "./ArrayProxy";
2
2
  export * from "./core/module/VuuModule";
3
+ export { ensureVuuModule } from "./core/module/ModuleContainer";
3
4
  export { default as tableContainer } from "./core/table/TableContainer";
4
5
  export * from "./local-datasource-provider/LocalDatasourceProvider";
5
6
  export * from "./makeSuggestions";
6
7
  export * from "./schemas";
7
8
  export * from "./simul";
8
9
  export * from "./basket";
10
+ export * from "./module-admin";
11
+ export * from "./user-admin";
9
12
  export { buildDataColumnMap, buildDataColumnMapFromSchema, Table, type TableEvents, } from "./Table";
10
13
  export * from "./test";
11
14
  export * from "./TickingArrayDataSource";