@juicemantics/veloiq-ui 0.2.2 → 0.6.0
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/LICENSE +21 -0
- package/dist/index.d.mts +111 -12
- package/dist/index.d.ts +111 -12
- package/dist/index.js +5678 -3612
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5539 -3501
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 JuiceMantics
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.mts
CHANGED
|
@@ -8,6 +8,36 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
8
8
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
9
9
|
import * as antd from 'antd';
|
|
10
10
|
|
|
11
|
+
/** One entry in navigation.config.json — one per module or model. */
|
|
12
|
+
interface NavConfigEntry {
|
|
13
|
+
/** Refine resource key: "module:tasks", "task", "dashboard" */
|
|
14
|
+
key: string;
|
|
15
|
+
/** Human-readable display label */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Ant Design icon component name, e.g. "UserOutlined" */
|
|
18
|
+
icon: string;
|
|
19
|
+
/** Display order — lower numbers appear first; ties keep original registration order */
|
|
20
|
+
sequence: number;
|
|
21
|
+
/** "module" for a top-level group, "model" for a leaf resource */
|
|
22
|
+
type: "module" | "model";
|
|
23
|
+
}
|
|
24
|
+
type NavConfig = NavConfigEntry[];
|
|
25
|
+
/** Guess an Ant Design icon name from a resource name or label. */
|
|
26
|
+
declare function guessIcon(text: string, isModule?: boolean): string;
|
|
27
|
+
/** Resolve an icon name string to a React element using the AntD icon registry. */
|
|
28
|
+
declare function resolveIcon(iconName: string): React__default.ReactNode;
|
|
29
|
+
/** Find a NavConfigEntry by exact resource key. */
|
|
30
|
+
declare function getNavEntry(navConfig: NavConfig, key: string): NavConfigEntry | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Sort items by the `sequence` values in navConfig.
|
|
33
|
+
* Items without a matching entry sort to the end (sequence = 999).
|
|
34
|
+
* Original array order serves as a stable tiebreaker.
|
|
35
|
+
*/
|
|
36
|
+
declare function sortItemsByNavConfig<T extends {
|
|
37
|
+
key?: string;
|
|
38
|
+
name?: string;
|
|
39
|
+
}>(items: T[], navConfig: NavConfig): T[];
|
|
40
|
+
|
|
11
41
|
interface LayoutWrapperProps {
|
|
12
42
|
children?: React__default.ReactNode;
|
|
13
43
|
/** Logo element or image URL shown in header and sider. */
|
|
@@ -21,9 +51,18 @@ interface LayoutWrapperProps {
|
|
|
21
51
|
icon?: React__default.ReactNode;
|
|
22
52
|
onClick?: () => void;
|
|
23
53
|
}>;
|
|
54
|
+
/** Navigation config loaded from navigation.config.json — drives icons and sort order. */
|
|
55
|
+
navConfig?: NavConfig;
|
|
24
56
|
}
|
|
25
57
|
declare const LayoutWrapper: React__default.FC<LayoutWrapperProps>;
|
|
26
58
|
|
|
59
|
+
interface CommandCenterPortalProps {
|
|
60
|
+
open: boolean;
|
|
61
|
+
onClose: () => void;
|
|
62
|
+
navConfig?: NavConfig;
|
|
63
|
+
}
|
|
64
|
+
declare const CommandCenterPortal: React__default.FC<CommandCenterPortalProps>;
|
|
65
|
+
|
|
27
66
|
declare const MultiPaneLayout: React__default.FC<{
|
|
28
67
|
children: React__default.ReactNode;
|
|
29
68
|
}>;
|
|
@@ -44,9 +83,12 @@ declare const CustomSider: React__default.FC<{
|
|
|
44
83
|
collapsed?: boolean;
|
|
45
84
|
logo?: React__default.ReactNode | string;
|
|
46
85
|
appTitle?: string;
|
|
86
|
+
navConfig?: NavConfig;
|
|
47
87
|
}>;
|
|
48
88
|
|
|
49
|
-
declare const HorizontalMenu: React__default.FC
|
|
89
|
+
declare const HorizontalMenu: React__default.FC<{
|
|
90
|
+
navConfig?: NavConfig;
|
|
91
|
+
}>;
|
|
50
92
|
|
|
51
93
|
type ExecutableHtmlProps = {
|
|
52
94
|
html?: string;
|
|
@@ -110,7 +152,7 @@ interface FieldDef {
|
|
|
110
152
|
/** Roles allowed to write this field (absent = all roles). Emitted by veloiq_field(write_roles=…). */
|
|
111
153
|
writeRoles?: string[];
|
|
112
154
|
}
|
|
113
|
-
type RelationViewType = "table" | "editable-table" | "editable-list" | "list" | "csv" | "read-and-edit-list" | "read-and-edit-csv" | "editable-csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
|
|
155
|
+
type RelationViewType = "table" | "editable-table" | "crosstab" | "editable-crosstab" | "editable-list" | "list" | "csv" | "read-and-edit-list" | "read-and-edit-csv" | "editable-csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
|
|
114
156
|
interface MillerLeafConfig {
|
|
115
157
|
relationPath: string;
|
|
116
158
|
targetKey: string;
|
|
@@ -247,7 +289,11 @@ declare const ModelHeading: React__default.FC<{
|
|
|
247
289
|
actionLabel?: string;
|
|
248
290
|
}>;
|
|
249
291
|
|
|
250
|
-
declare const useShowActionsPreferences: (model: ModelDef, allModels?: ModelDef[], record?: any, saveButtonProps?: any
|
|
292
|
+
declare const useShowActionsPreferences: (model: ModelDef, allModels?: ModelDef[], record?: any, saveButtonProps?: any, configureLayoutButtonRef?: {
|
|
293
|
+
current: React__default.ReactNode;
|
|
294
|
+
}, saveLayoutRef?: {
|
|
295
|
+
current: () => void;
|
|
296
|
+
}) => {
|
|
251
297
|
actionsState: {
|
|
252
298
|
showActions: boolean;
|
|
253
299
|
showCreate: boolean;
|
|
@@ -301,10 +347,19 @@ declare const useStandardShowTabs: (model: ModelDef | undefined, record: any, al
|
|
|
301
347
|
formProps?: any;
|
|
302
348
|
effectiveFields?: FieldDef[];
|
|
303
349
|
}, overrideConfigRows?: ViewConfigRow[]) => {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
350
|
+
tabs: {
|
|
351
|
+
key: string;
|
|
352
|
+
label: React__default.ReactNode;
|
|
353
|
+
children: React__default.ReactNode;
|
|
354
|
+
}[];
|
|
355
|
+
layoutConfig: {
|
|
356
|
+
isConfiguring: boolean;
|
|
357
|
+
enterConfigMode: () => void;
|
|
358
|
+
saveLayout: () => void;
|
|
359
|
+
cancelLayout: () => void;
|
|
360
|
+
hasConfig: boolean;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
308
363
|
|
|
309
364
|
declare const renderRelationBlock: ({ rel, relationModel, relatedModel, record, mode, parentResource, allModels, showLabel, showActions, showCreate, relationViewTypeDefaults, labelStyle, valueStyle, fieldLayoutStyle, }: {
|
|
310
365
|
rel: RelationDef;
|
|
@@ -335,7 +390,7 @@ declare const DynamicList: React__default.FC<{
|
|
|
335
390
|
showActions?: boolean;
|
|
336
391
|
showCreate?: boolean;
|
|
337
392
|
layoutPreferenceType?: "ShowLayout" | "EditLayout";
|
|
338
|
-
listViewType?: "table" | "gallery" | "calendar" | "totals-details";
|
|
393
|
+
listViewType?: "table" | "gallery" | "calendar" | "totals-details" | "crosstab" | "editable-crosstab";
|
|
339
394
|
rowSelection?: any;
|
|
340
395
|
extraHeaderButtons?: React__default.ReactNode;
|
|
341
396
|
bulkActions?: BulkActionDef[];
|
|
@@ -407,6 +462,19 @@ interface ResourceContextValue {
|
|
|
407
462
|
}
|
|
408
463
|
declare const ResourceContext: React$1.Context<ResourceContextValue>;
|
|
409
464
|
|
|
465
|
+
/**
|
|
466
|
+
* Makes the app's navigation.config.json available to any component rendered
|
|
467
|
+
* inside LayoutWrapper (including extension-contributed routes). This is the
|
|
468
|
+
* authoritative list of modules ("module:{name}" entries) and their labels.
|
|
469
|
+
*/
|
|
470
|
+
declare const NavConfigContext: React$1.Context<NavConfig>;
|
|
471
|
+
declare const useNavConfig: () => NavConfig;
|
|
472
|
+
/** Convenience: module entries from the nav config as {value, label} options. */
|
|
473
|
+
declare function useNavModules(): {
|
|
474
|
+
value: string;
|
|
475
|
+
label: string;
|
|
476
|
+
}[];
|
|
477
|
+
|
|
410
478
|
interface LoginPageProps {
|
|
411
479
|
/** App title shown on the login card. Defaults to "VeloIQ". */
|
|
412
480
|
appTitle?: string;
|
|
@@ -417,10 +485,11 @@ declare const LoginPage: React__default.FC<LoginPageProps>;
|
|
|
417
485
|
|
|
418
486
|
declare const DashboardPage: React__default.FC;
|
|
419
487
|
|
|
488
|
+
type CellSourceType = "model" | "named_query" | "field" | "relation" | "custom";
|
|
420
489
|
interface DashboardCell {
|
|
421
490
|
id: string;
|
|
422
491
|
model: string;
|
|
423
|
-
source_type:
|
|
492
|
+
source_type: CellSourceType;
|
|
424
493
|
row: number;
|
|
425
494
|
col: number;
|
|
426
495
|
view_type: string | null;
|
|
@@ -429,6 +498,8 @@ interface DashboardCell {
|
|
|
429
498
|
max_width: string | null;
|
|
430
499
|
min_height: string | null;
|
|
431
500
|
max_height: string | null;
|
|
501
|
+
section_name?: string;
|
|
502
|
+
section_id?: string;
|
|
432
503
|
}
|
|
433
504
|
interface DashboardTab {
|
|
434
505
|
id: string;
|
|
@@ -440,12 +511,22 @@ interface DashboardConfig {
|
|
|
440
511
|
tabs: DashboardTab[];
|
|
441
512
|
}
|
|
442
513
|
|
|
443
|
-
interface Props {
|
|
514
|
+
interface Props$1 {
|
|
444
515
|
config: DashboardConfig;
|
|
445
516
|
allModels: ModelDef[];
|
|
446
517
|
onConfigChange: (next: DashboardConfig) => void;
|
|
447
518
|
}
|
|
448
|
-
declare const ViewsGrid: React__default.FC<Props>;
|
|
519
|
+
declare const ViewsGrid: React__default.FC<Props$1>;
|
|
520
|
+
|
|
521
|
+
interface Props {
|
|
522
|
+
cells: DashboardCell[];
|
|
523
|
+
config: DashboardConfig;
|
|
524
|
+
tabId: string;
|
|
525
|
+
renderContent: (cell: DashboardCell) => React__default.ReactNode;
|
|
526
|
+
onConfigChange: (next: DashboardConfig) => void;
|
|
527
|
+
isConfiguring?: boolean;
|
|
528
|
+
}
|
|
529
|
+
declare const SectionsGrid: React__default.FC<Props>;
|
|
449
530
|
|
|
450
531
|
declare const RecentActivityPanel: React__default.FC;
|
|
451
532
|
|
|
@@ -480,6 +561,24 @@ type ShortcutDef = {
|
|
|
480
561
|
};
|
|
481
562
|
declare function useKeyboardShortcuts(shortcuts: ShortcutDef[]): void;
|
|
482
563
|
|
|
564
|
+
interface RecordResult {
|
|
565
|
+
id: number | string;
|
|
566
|
+
label: string;
|
|
567
|
+
}
|
|
568
|
+
interface ModelSearchResult {
|
|
569
|
+
modelName: string;
|
|
570
|
+
modelLabel: string;
|
|
571
|
+
resource: string;
|
|
572
|
+
records: RecordResult[];
|
|
573
|
+
}
|
|
574
|
+
interface UseRecordSearchReturn {
|
|
575
|
+
results: ModelSearchResult[];
|
|
576
|
+
searching: boolean;
|
|
577
|
+
search: (query: string) => void;
|
|
578
|
+
clear: () => void;
|
|
579
|
+
}
|
|
580
|
+
declare function useRecordSearch(): UseRecordSearchReturn;
|
|
581
|
+
|
|
483
582
|
interface ResourceDef {
|
|
484
583
|
name: string;
|
|
485
584
|
list: string;
|
|
@@ -537,4 +636,4 @@ declare const getModelTone: (modelLike?: string | {
|
|
|
537
636
|
|
|
538
637
|
declare const authSystemModels: ModelDef[];
|
|
539
638
|
|
|
540
|
-
export { API_URL, AllModelsProvider, type BulkActionDef, ColorModeContext, ColorModeContextProvider, CustomSider, type DashboardCell, type DashboardConfig, DashboardPage, type DashboardTab, DynamicCreate, DynamicEdit, DynamicList, DynamicShow, ExecutableHtml, type FieldDef, GlobalSearch, HierarchyView, HorizontalMenu, InlinePlotlyHtml, LayoutWrapper, type LayoutWrapperProps, LoginPage, type LoginPageProps, type MillerLeafConfig, type ModelDef, ModelHeading, MultiPaneLayout, PaneNavigationContext, PinnedRecordsPanel, PrimaryShowContext, type PrimaryShowRendererProps, type RecentActivityData, type RecentActivityGroup, RecentActivityPanel, type RecentRecord, ReferenceField, type RelationDef, ResourceContext, type ResourceDef, ShowFooterButtons, StandardList, StandardShow, type ViewConfigRow, ViewsGrid, accessControlProvider, authProvider, authSystemModels, authenticatedFetch, buildShowTabFormOptions, generateResources, getModelTone, httpClient, normalizeToneKey, renderRelationBlock, setColorSchemas, useAllModels, useKeyboardShortcuts, useMetadataModal, usePaneNavigation, useShowActionsPreferences, useShowEditableForm, useStandardShowTabs };
|
|
639
|
+
export { API_URL, AllModelsProvider, type BulkActionDef, type CellSourceType, ColorModeContext, ColorModeContextProvider, CommandCenterPortal, type CommandCenterPortalProps, CustomSider, type DashboardCell, type DashboardConfig, DashboardPage, type DashboardTab, DynamicCreate, DynamicEdit, DynamicList, DynamicShow, ExecutableHtml, type FieldDef, GlobalSearch, HierarchyView, HorizontalMenu, InlinePlotlyHtml, LayoutWrapper, type LayoutWrapperProps, LoginPage, type LoginPageProps, type MillerLeafConfig, type ModelDef, ModelHeading, type ModelSearchResult, MultiPaneLayout, type NavConfig, NavConfigContext, type NavConfigEntry, PaneNavigationContext, PinnedRecordsPanel, PrimaryShowContext, type PrimaryShowRendererProps, type RecentActivityData, type RecentActivityGroup, RecentActivityPanel, type RecentRecord, type RecordResult, ReferenceField, type RelationDef, ResourceContext, type ResourceDef, SectionsGrid, ShowFooterButtons, StandardList, StandardShow, type UseRecordSearchReturn, type ViewConfigRow, ViewsGrid, accessControlProvider, authProvider, authSystemModels, authenticatedFetch, buildShowTabFormOptions, generateResources, getModelTone, getNavEntry, guessIcon, httpClient, normalizeToneKey, renderRelationBlock, resolveIcon, setColorSchemas, sortItemsByNavConfig, useAllModels, useKeyboardShortcuts, useMetadataModal, useNavConfig, useNavModules, usePaneNavigation, useRecordSearch, useShowActionsPreferences, useShowEditableForm, useStandardShowTabs };
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,36 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
8
8
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
9
9
|
import * as antd from 'antd';
|
|
10
10
|
|
|
11
|
+
/** One entry in navigation.config.json — one per module or model. */
|
|
12
|
+
interface NavConfigEntry {
|
|
13
|
+
/** Refine resource key: "module:tasks", "task", "dashboard" */
|
|
14
|
+
key: string;
|
|
15
|
+
/** Human-readable display label */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Ant Design icon component name, e.g. "UserOutlined" */
|
|
18
|
+
icon: string;
|
|
19
|
+
/** Display order — lower numbers appear first; ties keep original registration order */
|
|
20
|
+
sequence: number;
|
|
21
|
+
/** "module" for a top-level group, "model" for a leaf resource */
|
|
22
|
+
type: "module" | "model";
|
|
23
|
+
}
|
|
24
|
+
type NavConfig = NavConfigEntry[];
|
|
25
|
+
/** Guess an Ant Design icon name from a resource name or label. */
|
|
26
|
+
declare function guessIcon(text: string, isModule?: boolean): string;
|
|
27
|
+
/** Resolve an icon name string to a React element using the AntD icon registry. */
|
|
28
|
+
declare function resolveIcon(iconName: string): React__default.ReactNode;
|
|
29
|
+
/** Find a NavConfigEntry by exact resource key. */
|
|
30
|
+
declare function getNavEntry(navConfig: NavConfig, key: string): NavConfigEntry | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Sort items by the `sequence` values in navConfig.
|
|
33
|
+
* Items without a matching entry sort to the end (sequence = 999).
|
|
34
|
+
* Original array order serves as a stable tiebreaker.
|
|
35
|
+
*/
|
|
36
|
+
declare function sortItemsByNavConfig<T extends {
|
|
37
|
+
key?: string;
|
|
38
|
+
name?: string;
|
|
39
|
+
}>(items: T[], navConfig: NavConfig): T[];
|
|
40
|
+
|
|
11
41
|
interface LayoutWrapperProps {
|
|
12
42
|
children?: React__default.ReactNode;
|
|
13
43
|
/** Logo element or image URL shown in header and sider. */
|
|
@@ -21,9 +51,18 @@ interface LayoutWrapperProps {
|
|
|
21
51
|
icon?: React__default.ReactNode;
|
|
22
52
|
onClick?: () => void;
|
|
23
53
|
}>;
|
|
54
|
+
/** Navigation config loaded from navigation.config.json — drives icons and sort order. */
|
|
55
|
+
navConfig?: NavConfig;
|
|
24
56
|
}
|
|
25
57
|
declare const LayoutWrapper: React__default.FC<LayoutWrapperProps>;
|
|
26
58
|
|
|
59
|
+
interface CommandCenterPortalProps {
|
|
60
|
+
open: boolean;
|
|
61
|
+
onClose: () => void;
|
|
62
|
+
navConfig?: NavConfig;
|
|
63
|
+
}
|
|
64
|
+
declare const CommandCenterPortal: React__default.FC<CommandCenterPortalProps>;
|
|
65
|
+
|
|
27
66
|
declare const MultiPaneLayout: React__default.FC<{
|
|
28
67
|
children: React__default.ReactNode;
|
|
29
68
|
}>;
|
|
@@ -44,9 +83,12 @@ declare const CustomSider: React__default.FC<{
|
|
|
44
83
|
collapsed?: boolean;
|
|
45
84
|
logo?: React__default.ReactNode | string;
|
|
46
85
|
appTitle?: string;
|
|
86
|
+
navConfig?: NavConfig;
|
|
47
87
|
}>;
|
|
48
88
|
|
|
49
|
-
declare const HorizontalMenu: React__default.FC
|
|
89
|
+
declare const HorizontalMenu: React__default.FC<{
|
|
90
|
+
navConfig?: NavConfig;
|
|
91
|
+
}>;
|
|
50
92
|
|
|
51
93
|
type ExecutableHtmlProps = {
|
|
52
94
|
html?: string;
|
|
@@ -110,7 +152,7 @@ interface FieldDef {
|
|
|
110
152
|
/** Roles allowed to write this field (absent = all roles). Emitted by veloiq_field(write_roles=…). */
|
|
111
153
|
writeRoles?: string[];
|
|
112
154
|
}
|
|
113
|
-
type RelationViewType = "table" | "editable-table" | "editable-list" | "list" | "csv" | "read-and-edit-list" | "read-and-edit-csv" | "editable-csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
|
|
155
|
+
type RelationViewType = "table" | "editable-table" | "crosstab" | "editable-crosstab" | "editable-list" | "list" | "csv" | "read-and-edit-list" | "read-and-edit-csv" | "editable-csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
|
|
114
156
|
interface MillerLeafConfig {
|
|
115
157
|
relationPath: string;
|
|
116
158
|
targetKey: string;
|
|
@@ -247,7 +289,11 @@ declare const ModelHeading: React__default.FC<{
|
|
|
247
289
|
actionLabel?: string;
|
|
248
290
|
}>;
|
|
249
291
|
|
|
250
|
-
declare const useShowActionsPreferences: (model: ModelDef, allModels?: ModelDef[], record?: any, saveButtonProps?: any
|
|
292
|
+
declare const useShowActionsPreferences: (model: ModelDef, allModels?: ModelDef[], record?: any, saveButtonProps?: any, configureLayoutButtonRef?: {
|
|
293
|
+
current: React__default.ReactNode;
|
|
294
|
+
}, saveLayoutRef?: {
|
|
295
|
+
current: () => void;
|
|
296
|
+
}) => {
|
|
251
297
|
actionsState: {
|
|
252
298
|
showActions: boolean;
|
|
253
299
|
showCreate: boolean;
|
|
@@ -301,10 +347,19 @@ declare const useStandardShowTabs: (model: ModelDef | undefined, record: any, al
|
|
|
301
347
|
formProps?: any;
|
|
302
348
|
effectiveFields?: FieldDef[];
|
|
303
349
|
}, overrideConfigRows?: ViewConfigRow[]) => {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
350
|
+
tabs: {
|
|
351
|
+
key: string;
|
|
352
|
+
label: React__default.ReactNode;
|
|
353
|
+
children: React__default.ReactNode;
|
|
354
|
+
}[];
|
|
355
|
+
layoutConfig: {
|
|
356
|
+
isConfiguring: boolean;
|
|
357
|
+
enterConfigMode: () => void;
|
|
358
|
+
saveLayout: () => void;
|
|
359
|
+
cancelLayout: () => void;
|
|
360
|
+
hasConfig: boolean;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
308
363
|
|
|
309
364
|
declare const renderRelationBlock: ({ rel, relationModel, relatedModel, record, mode, parentResource, allModels, showLabel, showActions, showCreate, relationViewTypeDefaults, labelStyle, valueStyle, fieldLayoutStyle, }: {
|
|
310
365
|
rel: RelationDef;
|
|
@@ -335,7 +390,7 @@ declare const DynamicList: React__default.FC<{
|
|
|
335
390
|
showActions?: boolean;
|
|
336
391
|
showCreate?: boolean;
|
|
337
392
|
layoutPreferenceType?: "ShowLayout" | "EditLayout";
|
|
338
|
-
listViewType?: "table" | "gallery" | "calendar" | "totals-details";
|
|
393
|
+
listViewType?: "table" | "gallery" | "calendar" | "totals-details" | "crosstab" | "editable-crosstab";
|
|
339
394
|
rowSelection?: any;
|
|
340
395
|
extraHeaderButtons?: React__default.ReactNode;
|
|
341
396
|
bulkActions?: BulkActionDef[];
|
|
@@ -407,6 +462,19 @@ interface ResourceContextValue {
|
|
|
407
462
|
}
|
|
408
463
|
declare const ResourceContext: React$1.Context<ResourceContextValue>;
|
|
409
464
|
|
|
465
|
+
/**
|
|
466
|
+
* Makes the app's navigation.config.json available to any component rendered
|
|
467
|
+
* inside LayoutWrapper (including extension-contributed routes). This is the
|
|
468
|
+
* authoritative list of modules ("module:{name}" entries) and their labels.
|
|
469
|
+
*/
|
|
470
|
+
declare const NavConfigContext: React$1.Context<NavConfig>;
|
|
471
|
+
declare const useNavConfig: () => NavConfig;
|
|
472
|
+
/** Convenience: module entries from the nav config as {value, label} options. */
|
|
473
|
+
declare function useNavModules(): {
|
|
474
|
+
value: string;
|
|
475
|
+
label: string;
|
|
476
|
+
}[];
|
|
477
|
+
|
|
410
478
|
interface LoginPageProps {
|
|
411
479
|
/** App title shown on the login card. Defaults to "VeloIQ". */
|
|
412
480
|
appTitle?: string;
|
|
@@ -417,10 +485,11 @@ declare const LoginPage: React__default.FC<LoginPageProps>;
|
|
|
417
485
|
|
|
418
486
|
declare const DashboardPage: React__default.FC;
|
|
419
487
|
|
|
488
|
+
type CellSourceType = "model" | "named_query" | "field" | "relation" | "custom";
|
|
420
489
|
interface DashboardCell {
|
|
421
490
|
id: string;
|
|
422
491
|
model: string;
|
|
423
|
-
source_type:
|
|
492
|
+
source_type: CellSourceType;
|
|
424
493
|
row: number;
|
|
425
494
|
col: number;
|
|
426
495
|
view_type: string | null;
|
|
@@ -429,6 +498,8 @@ interface DashboardCell {
|
|
|
429
498
|
max_width: string | null;
|
|
430
499
|
min_height: string | null;
|
|
431
500
|
max_height: string | null;
|
|
501
|
+
section_name?: string;
|
|
502
|
+
section_id?: string;
|
|
432
503
|
}
|
|
433
504
|
interface DashboardTab {
|
|
434
505
|
id: string;
|
|
@@ -440,12 +511,22 @@ interface DashboardConfig {
|
|
|
440
511
|
tabs: DashboardTab[];
|
|
441
512
|
}
|
|
442
513
|
|
|
443
|
-
interface Props {
|
|
514
|
+
interface Props$1 {
|
|
444
515
|
config: DashboardConfig;
|
|
445
516
|
allModels: ModelDef[];
|
|
446
517
|
onConfigChange: (next: DashboardConfig) => void;
|
|
447
518
|
}
|
|
448
|
-
declare const ViewsGrid: React__default.FC<Props>;
|
|
519
|
+
declare const ViewsGrid: React__default.FC<Props$1>;
|
|
520
|
+
|
|
521
|
+
interface Props {
|
|
522
|
+
cells: DashboardCell[];
|
|
523
|
+
config: DashboardConfig;
|
|
524
|
+
tabId: string;
|
|
525
|
+
renderContent: (cell: DashboardCell) => React__default.ReactNode;
|
|
526
|
+
onConfigChange: (next: DashboardConfig) => void;
|
|
527
|
+
isConfiguring?: boolean;
|
|
528
|
+
}
|
|
529
|
+
declare const SectionsGrid: React__default.FC<Props>;
|
|
449
530
|
|
|
450
531
|
declare const RecentActivityPanel: React__default.FC;
|
|
451
532
|
|
|
@@ -480,6 +561,24 @@ type ShortcutDef = {
|
|
|
480
561
|
};
|
|
481
562
|
declare function useKeyboardShortcuts(shortcuts: ShortcutDef[]): void;
|
|
482
563
|
|
|
564
|
+
interface RecordResult {
|
|
565
|
+
id: number | string;
|
|
566
|
+
label: string;
|
|
567
|
+
}
|
|
568
|
+
interface ModelSearchResult {
|
|
569
|
+
modelName: string;
|
|
570
|
+
modelLabel: string;
|
|
571
|
+
resource: string;
|
|
572
|
+
records: RecordResult[];
|
|
573
|
+
}
|
|
574
|
+
interface UseRecordSearchReturn {
|
|
575
|
+
results: ModelSearchResult[];
|
|
576
|
+
searching: boolean;
|
|
577
|
+
search: (query: string) => void;
|
|
578
|
+
clear: () => void;
|
|
579
|
+
}
|
|
580
|
+
declare function useRecordSearch(): UseRecordSearchReturn;
|
|
581
|
+
|
|
483
582
|
interface ResourceDef {
|
|
484
583
|
name: string;
|
|
485
584
|
list: string;
|
|
@@ -537,4 +636,4 @@ declare const getModelTone: (modelLike?: string | {
|
|
|
537
636
|
|
|
538
637
|
declare const authSystemModels: ModelDef[];
|
|
539
638
|
|
|
540
|
-
export { API_URL, AllModelsProvider, type BulkActionDef, ColorModeContext, ColorModeContextProvider, CustomSider, type DashboardCell, type DashboardConfig, DashboardPage, type DashboardTab, DynamicCreate, DynamicEdit, DynamicList, DynamicShow, ExecutableHtml, type FieldDef, GlobalSearch, HierarchyView, HorizontalMenu, InlinePlotlyHtml, LayoutWrapper, type LayoutWrapperProps, LoginPage, type LoginPageProps, type MillerLeafConfig, type ModelDef, ModelHeading, MultiPaneLayout, PaneNavigationContext, PinnedRecordsPanel, PrimaryShowContext, type PrimaryShowRendererProps, type RecentActivityData, type RecentActivityGroup, RecentActivityPanel, type RecentRecord, ReferenceField, type RelationDef, ResourceContext, type ResourceDef, ShowFooterButtons, StandardList, StandardShow, type ViewConfigRow, ViewsGrid, accessControlProvider, authProvider, authSystemModels, authenticatedFetch, buildShowTabFormOptions, generateResources, getModelTone, httpClient, normalizeToneKey, renderRelationBlock, setColorSchemas, useAllModels, useKeyboardShortcuts, useMetadataModal, usePaneNavigation, useShowActionsPreferences, useShowEditableForm, useStandardShowTabs };
|
|
639
|
+
export { API_URL, AllModelsProvider, type BulkActionDef, type CellSourceType, ColorModeContext, ColorModeContextProvider, CommandCenterPortal, type CommandCenterPortalProps, CustomSider, type DashboardCell, type DashboardConfig, DashboardPage, type DashboardTab, DynamicCreate, DynamicEdit, DynamicList, DynamicShow, ExecutableHtml, type FieldDef, GlobalSearch, HierarchyView, HorizontalMenu, InlinePlotlyHtml, LayoutWrapper, type LayoutWrapperProps, LoginPage, type LoginPageProps, type MillerLeafConfig, type ModelDef, ModelHeading, type ModelSearchResult, MultiPaneLayout, type NavConfig, NavConfigContext, type NavConfigEntry, PaneNavigationContext, PinnedRecordsPanel, PrimaryShowContext, type PrimaryShowRendererProps, type RecentActivityData, type RecentActivityGroup, RecentActivityPanel, type RecentRecord, type RecordResult, ReferenceField, type RelationDef, ResourceContext, type ResourceDef, SectionsGrid, ShowFooterButtons, StandardList, StandardShow, type UseRecordSearchReturn, type ViewConfigRow, ViewsGrid, accessControlProvider, authProvider, authSystemModels, authenticatedFetch, buildShowTabFormOptions, generateResources, getModelTone, getNavEntry, guessIcon, httpClient, normalizeToneKey, renderRelationBlock, resolveIcon, setColorSchemas, sortItemsByNavConfig, useAllModels, useKeyboardShortcuts, useMetadataModal, useNavConfig, useNavModules, usePaneNavigation, useRecordSearch, useShowActionsPreferences, useShowEditableForm, useStandardShowTabs };
|