@heswell/vuu-data-engine-local 1.0.0 → 2.0.1
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/index.js +100 -46
- package/package.json +5 -5
- package/src/module-admin/index.d.ts +1 -1
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { parseFilter } from "@vuu-ui/vuu-filter-parser";
|
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { DataProvider } from "@vuu-ui/core";
|
|
7
7
|
import { USER_ADMIN_RPC_CONTRACT, USER_ADMIN_TABLE_SCHEMAS } from "@heswell/user-admin/contracts";
|
|
8
|
-
import {
|
|
8
|
+
import { MODULE_ADMIN_RPC, executeModuleAdminRpc, managedModuleColumnValues, managedModulePermissionValues } from "@heswell/module-admin/contracts";
|
|
9
9
|
import { InMemoryUserAdminStore } from "@heswell/user-admin/in-memory";
|
|
10
10
|
class ArrayProxy {
|
|
11
11
|
#getItem;
|
|
@@ -3866,18 +3866,6 @@ const MODULE_ADMIN_TABLE_SCHEMAS = {
|
|
|
3866
3866
|
name: "mfUrl",
|
|
3867
3867
|
serverDataType: "string"
|
|
3868
3868
|
},
|
|
3869
|
-
{
|
|
3870
|
-
name: "vuuConnectionId",
|
|
3871
|
-
serverDataType: "string"
|
|
3872
|
-
},
|
|
3873
|
-
{
|
|
3874
|
-
name: "vuuWebsocketUrl",
|
|
3875
|
-
serverDataType: "string"
|
|
3876
|
-
},
|
|
3877
|
-
{
|
|
3878
|
-
name: "vuuRestUrl",
|
|
3879
|
-
serverDataType: "string"
|
|
3880
|
-
},
|
|
3881
3869
|
{
|
|
3882
3870
|
name: "navIconUrl",
|
|
3883
3871
|
serverDataType: "string"
|
|
@@ -8160,52 +8148,118 @@ const createTables = ()=>({
|
|
|
8160
8148
|
modules: ModuleAdminModule_createTable("modules")
|
|
8161
8149
|
});
|
|
8162
8150
|
const INITIAL_TIMESTAMP = 1710000000000;
|
|
8163
|
-
const
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
{
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8151
|
+
const svgIcon = (body)=>`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${body}</svg>`)}`;
|
|
8152
|
+
const NAV_ICONS = {
|
|
8153
|
+
modules: svgIcon('<rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/>'),
|
|
8154
|
+
users: svgIcon('<circle cx="9" cy="8" r="4"/><path d="M2 21v-1a6 6 0 0 1 6-6h2a6 6 0 0 1 6 6v1"/><path d="M16 4a4 4 0 0 1 0 8"/><path d="M22 21v-1a6 6 0 0 0-4-5.6"/>'),
|
|
8155
|
+
trading: svgIcon('<path d="M3 3v18h18"/><path d="m7 15 4-4 3 3 6-6"/>'),
|
|
8156
|
+
tables: svgIcon('<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18"/><path d="M3 15h18"/><path d="M9 3v18"/>')
|
|
8157
|
+
};
|
|
8158
|
+
const localModule = (module)=>({
|
|
8159
|
+
...module,
|
|
8160
|
+
created: INITIAL_TIMESTAMP,
|
|
8161
|
+
updated: INITIAL_TIMESTAMP
|
|
8162
|
+
});
|
|
8163
|
+
const INITIAL_MODULES = [
|
|
8164
|
+
localModule({
|
|
8165
|
+
id: 1,
|
|
8166
|
+
version: 1,
|
|
8167
|
+
parentModuleId: 0,
|
|
8168
|
+
name: "moduleAdmin",
|
|
8169
|
+
title: "Manage remote modules",
|
|
8170
|
+
description: "Create new remote module, update existing modules",
|
|
8171
|
+
enabled: true,
|
|
8172
|
+
location: "/Modules/Manage Modules",
|
|
8173
|
+
path: "/modules/admin",
|
|
8174
|
+
mfComponent: "ModuleAdmin",
|
|
8175
|
+
mfScope: "moduleAdmin",
|
|
8176
|
+
mfUrl: "http://localhost:5002",
|
|
8177
|
+
navIconUrl: NAV_ICONS.modules,
|
|
8178
|
+
accessRole: "module-admin-access"
|
|
8179
|
+
}),
|
|
8180
|
+
localModule({
|
|
8181
|
+
id: 2,
|
|
8182
|
+
version: 1,
|
|
8183
|
+
parentModuleId: 0,
|
|
8184
|
+
name: "userAdmin",
|
|
8185
|
+
title: "Manage users",
|
|
8186
|
+
description: "Add, remove and update users",
|
|
8187
|
+
enabled: true,
|
|
8188
|
+
location: "/Users/Manage Users",
|
|
8189
|
+
path: "/users/admin",
|
|
8190
|
+
mfComponent: "UserAdmin",
|
|
8191
|
+
mfScope: "userAdmin",
|
|
8192
|
+
mfUrl: "http://localhost:5003",
|
|
8193
|
+
navIconUrl: NAV_ICONS.users,
|
|
8194
|
+
accessRole: "user-admin-access"
|
|
8195
|
+
}),
|
|
8196
|
+
localModule({
|
|
8197
|
+
id: 3,
|
|
8198
|
+
version: 1,
|
|
8199
|
+
parentModuleId: 0,
|
|
8200
|
+
name: "basket-trading",
|
|
8201
|
+
title: "Basket trading",
|
|
8202
|
+
description: "Basket Trading",
|
|
8203
|
+
enabled: true,
|
|
8204
|
+
location: "/Trading/Baskets",
|
|
8205
|
+
path: "/basket/trade",
|
|
8206
|
+
mfComponent: "VuuBasketTradingFeature",
|
|
8207
|
+
mfScope: "basketTrading",
|
|
8208
|
+
mfUrl: "http://localhost:5006",
|
|
8209
|
+
navIconUrl: NAV_ICONS.trading,
|
|
8210
|
+
accessRole: "basket-trading-access"
|
|
8211
|
+
}),
|
|
8212
|
+
localModule({
|
|
8213
|
+
id: 4,
|
|
8214
|
+
version: 1,
|
|
8215
|
+
parentModuleId: 0,
|
|
8216
|
+
name: "vuu-table-browser",
|
|
8217
|
+
title: "Browse tables",
|
|
8218
|
+
description: "Discover and browse VUU tables",
|
|
8219
|
+
enabled: true,
|
|
8220
|
+
location: "/Tools/Tables",
|
|
8221
|
+
path: "/tools/tables",
|
|
8222
|
+
mfComponent: "VuuTableBrowser",
|
|
8223
|
+
mfScope: "vuuTableBrowser",
|
|
8224
|
+
mfUrl: "http://localhost:5004",
|
|
8225
|
+
navIconUrl: NAV_ICONS.tables,
|
|
8226
|
+
accessRole: "vuu-table-browser-access"
|
|
8227
|
+
}),
|
|
8228
|
+
localModule({
|
|
8229
|
+
id: 5,
|
|
8230
|
+
version: 1,
|
|
8231
|
+
parentModuleId: 4,
|
|
8232
|
+
name: "vuu-table-viewer",
|
|
8233
|
+
title: "View table",
|
|
8234
|
+
description: "View a selected VUU table",
|
|
8235
|
+
enabled: true,
|
|
8236
|
+
location: "",
|
|
8237
|
+
path: "",
|
|
8238
|
+
mfComponent: "VuuTableViewer",
|
|
8239
|
+
mfScope: "vuuTableViewer",
|
|
8240
|
+
mfUrl: "http://localhost:5005",
|
|
8241
|
+
navIconUrl: "",
|
|
8242
|
+
accessRole: ""
|
|
8243
|
+
}),
|
|
8244
|
+
localModule({
|
|
8183
8245
|
id: 6,
|
|
8246
|
+
version: 3,
|
|
8184
8247
|
parentModuleId: 0,
|
|
8185
8248
|
name: "order-blotter",
|
|
8186
8249
|
title: "Order blotter",
|
|
8187
8250
|
description: "Monitor parent and child orders across all desks.",
|
|
8188
|
-
version: 3,
|
|
8189
8251
|
enabled: false,
|
|
8190
8252
|
location: "/Trading/Orders",
|
|
8191
8253
|
path: "/trading/orders",
|
|
8192
8254
|
mfComponent: "OrderBlotter",
|
|
8193
8255
|
mfScope: "orderBlotter",
|
|
8194
8256
|
mfUrl: "http://localhost:5009",
|
|
8195
|
-
navIconUrl:
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
vuuRestUrl: "https://localhost:8447/api/authn",
|
|
8199
|
-
accessRole: "",
|
|
8200
|
-
created: INITIAL_TIMESTAMP,
|
|
8201
|
-
updated: INITIAL_TIMESTAMP
|
|
8202
|
-
}
|
|
8257
|
+
navIconUrl: NAV_ICONS.tables,
|
|
8258
|
+
accessRole: ""
|
|
8259
|
+
})
|
|
8203
8260
|
];
|
|
8204
8261
|
const MODULE_ADMIN_INITIAL_SNAPSHOT = {
|
|
8205
|
-
modules:
|
|
8206
|
-
...toManagedModules(DEFAULT_MODULE_DEFINITIONS, INITIAL_ACCESS_ROLES, INITIAL_TIMESTAMP),
|
|
8207
|
-
...EXAMPLE_MODULES
|
|
8208
|
-
]
|
|
8262
|
+
modules: INITIAL_MODULES
|
|
8209
8263
|
};
|
|
8210
8264
|
class ModuleAdminModule extends VuuModule {
|
|
8211
8265
|
now;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heswell/vuu-data-engine-local",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "In-browser Vuu server (VuuModule, tables, EngineDataSource) built on @heswell/vuu-table and @heswell/vuu-viewport",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@heswell/module-admin": "
|
|
22
|
-
"@heswell/user-admin": "1.0.2",
|
|
23
|
-
"@heswell/vuu-table": "1.0.1",
|
|
24
|
-
"@heswell/vuu-viewport": "1.1.
|
|
21
|
+
"@heswell/module-admin": "^2.0.1",
|
|
22
|
+
"@heswell/user-admin": "^1.0.2",
|
|
23
|
+
"@heswell/vuu-table": "^1.0.1",
|
|
24
|
+
"@heswell/vuu-viewport": "^1.1.3",
|
|
25
25
|
"@vuu-ui/vuu-data-editing": "4.0.0-alpha.20",
|
|
26
26
|
"@vuu-ui/vuu-data-local": "4.0.0-alpha.20",
|
|
27
27
|
"@vuu-ui/vuu-filter-parser": "4.0.0-alpha.20",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ModuleAdminModule, MODULE_ADMIN_INITIAL_SNAPSHOT, moduleAdminModule, } from "./ModuleAdminModule";
|
|
2
2
|
export { MODULE_ADMIN_MODULE_NAME, MODULE_ADMIN_TABLE_SCHEMAS, type ModuleAdminTableName, } from "./module-admin-schemas";
|
|
3
3
|
export { projectModuleAdminSnapshot, reconcileModuleAdminTables, type ModuleAdminSnapshot, } from "./snapshot-projection";
|
|
4
|
-
export type { ManagedModule,
|
|
4
|
+
export type { ManagedModule, ModuleConfig, } from "@heswell/module-admin/contracts";
|