@fgv/ts-res-ui-components 5.0.0-21 → 5.0.0-23
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/README.md +401 -155
- package/config/jest.setup.js +10 -0
- package/dist/ts-res-ui-components.d.ts +1657 -76
- package/lib/components/common/QualifierContextControl.js +4 -1
- package/lib/components/common/ResourceTreeView.js +4 -1
- package/lib/components/forms/GenericQualifierTypeEditForm.d.ts +26 -0
- package/lib/components/forms/GenericQualifierTypeEditForm.js +166 -0
- package/lib/components/forms/QualifierEditForm.d.ts +1 -1
- package/lib/components/forms/index.d.ts +2 -0
- package/lib/components/forms/index.js +1 -0
- package/lib/components/orchestrator/ResourceOrchestrator.d.ts +3 -0
- package/lib/components/orchestrator/ResourceOrchestrator.js +118 -51
- package/lib/components/pickers/ResourcePicker/ResourcePickerTree.js +32 -10
- package/lib/components/pickers/ResourcePicker/index.js +4 -2
- package/lib/components/views/CompiledView/index.js +75 -16
- package/lib/components/views/ConfigurationView/index.js +94 -35
- package/lib/components/views/FilterView/index.js +7 -4
- package/lib/components/views/GridView/EditableGridCell.d.ts +76 -0
- package/lib/components/views/GridView/EditableGridCell.js +224 -0
- package/lib/components/views/GridView/GridSelector.d.ts +43 -0
- package/lib/components/views/GridView/GridSelector.js +89 -0
- package/lib/components/views/GridView/MultiGridView.d.ts +85 -0
- package/lib/components/views/GridView/MultiGridView.js +196 -0
- package/lib/components/views/GridView/ResourceGrid.d.ts +38 -0
- package/lib/components/views/GridView/ResourceGrid.js +232 -0
- package/lib/components/views/GridView/SharedContextControls.d.ts +47 -0
- package/lib/components/views/GridView/SharedContextControls.js +95 -0
- package/lib/components/views/GridView/cells/BooleanCell.d.ts +44 -0
- package/lib/components/views/GridView/cells/BooleanCell.js +49 -0
- package/lib/components/views/GridView/cells/DropdownCell.d.ts +58 -0
- package/lib/components/views/GridView/cells/DropdownCell.js +182 -0
- package/lib/components/views/GridView/cells/StringCell.d.ts +57 -0
- package/lib/components/views/GridView/cells/StringCell.js +106 -0
- package/lib/components/views/GridView/cells/TriStateCell.d.ts +54 -0
- package/lib/components/views/GridView/cells/TriStateCell.js +112 -0
- package/lib/components/views/GridView/cells/index.d.ts +15 -0
- package/lib/components/views/GridView/cells/index.js +11 -0
- package/lib/components/views/GridView/index.d.ts +53 -0
- package/lib/components/views/GridView/index.js +212 -0
- package/lib/components/views/ImportView/index.js +22 -19
- package/lib/components/views/MessagesWindow/index.js +4 -1
- package/lib/components/views/ResolutionView/index.js +8 -5
- package/lib/contexts/ObservabilityContext.d.ts +85 -0
- package/lib/contexts/ObservabilityContext.js +98 -0
- package/lib/contexts/index.d.ts +2 -0
- package/lib/contexts/index.js +24 -0
- package/lib/hooks/useConfigurationState.d.ts +3 -3
- package/lib/hooks/useResolutionState.js +850 -246
- package/lib/hooks/useResourceData.d.ts +7 -4
- package/lib/hooks/useResourceData.js +185 -184
- package/lib/index.d.ts +5 -1
- package/lib/index.js +8 -1
- package/lib/namespaces/GridTools.d.ts +136 -0
- package/lib/namespaces/GridTools.js +138 -0
- package/lib/namespaces/ObservabilityTools.d.ts +3 -0
- package/lib/namespaces/ObservabilityTools.js +23 -0
- package/lib/namespaces/ResolutionTools.d.ts +2 -1
- package/lib/namespaces/ResolutionTools.js +2 -0
- package/lib/namespaces/index.d.ts +2 -0
- package/lib/namespaces/index.js +2 -0
- package/lib/test/integration/observability.integration.test.d.ts +2 -0
- package/lib/test/unit/hooks/useResourceData.test.d.ts +2 -0
- package/lib/test/unit/utils/downloadHelper.test.d.ts +2 -0
- package/lib/test/unit/workflows/resolutionWorkflows.test.d.ts +2 -0
- package/lib/test/unit/workflows/resourceCreation.test.d.ts +2 -0
- package/lib/test/unit/workflows/resultPatternExtensions.test.d.ts +2 -0
- package/lib/test/unit/workflows/validation.test.d.ts +2 -0
- package/lib/types/index.d.ts +387 -20
- package/lib/types/index.js +2 -1
- package/lib/utils/cellValidation.d.ts +113 -0
- package/lib/utils/cellValidation.js +248 -0
- package/lib/utils/downloadHelper.d.ts +66 -0
- package/lib/utils/downloadHelper.js +195 -0
- package/lib/utils/observability/factories.d.ts +29 -0
- package/lib/utils/observability/factories.js +58 -0
- package/lib/utils/observability/implementations.d.ts +61 -0
- package/lib/utils/observability/implementations.js +103 -0
- package/lib/utils/observability/index.d.ts +4 -0
- package/lib/utils/observability/index.js +26 -0
- package/lib/utils/observability/interfaces.d.ts +30 -0
- package/lib/utils/observability/interfaces.js +23 -0
- package/lib/utils/resolutionEditing.js +2 -1
- package/lib/utils/resourceSelector.d.ts +97 -0
- package/lib/utils/resourceSelector.js +195 -0
- package/lib/utils/resourceSelectors.d.ts +146 -0
- package/lib/utils/resourceSelectors.js +233 -0
- package/lib/utils/tsResIntegration.d.ts +6 -41
- package/lib/utils/tsResIntegration.js +20 -16
- package/lib/utils/zipLoader/zipProcessingHelpers.d.ts +3 -2
- package/lib/utils/zipLoader/zipProcessingHelpers.js +6 -5
- package/lib-commonjs/components/common/QualifierContextControl.js +4 -1
- package/lib-commonjs/components/common/ResourceTreeView.js +4 -1
- package/lib-commonjs/components/forms/GenericQualifierTypeEditForm.js +171 -0
- package/lib-commonjs/components/forms/index.js +3 -1
- package/lib-commonjs/components/orchestrator/ResourceOrchestrator.js +118 -51
- package/lib-commonjs/components/pickers/ResourcePicker/ResourcePickerTree.js +32 -10
- package/lib-commonjs/components/pickers/ResourcePicker/index.js +4 -2
- package/lib-commonjs/components/views/CompiledView/index.js +75 -16
- package/lib-commonjs/components/views/ConfigurationView/index.js +93 -34
- package/lib-commonjs/components/views/FilterView/index.js +7 -4
- package/lib-commonjs/components/views/GridView/EditableGridCell.js +232 -0
- package/lib-commonjs/components/views/GridView/GridSelector.js +94 -0
- package/lib-commonjs/components/views/GridView/MultiGridView.js +201 -0
- package/lib-commonjs/components/views/GridView/ResourceGrid.js +237 -0
- package/lib-commonjs/components/views/GridView/SharedContextControls.js +100 -0
- package/lib-commonjs/components/views/GridView/cells/BooleanCell.js +54 -0
- package/lib-commonjs/components/views/GridView/cells/DropdownCell.js +187 -0
- package/lib-commonjs/components/views/GridView/cells/StringCell.js +111 -0
- package/lib-commonjs/components/views/GridView/cells/TriStateCell.js +117 -0
- package/lib-commonjs/components/views/GridView/cells/index.js +18 -0
- package/lib-commonjs/components/views/GridView/index.js +217 -0
- package/lib-commonjs/components/views/ImportView/index.js +22 -19
- package/lib-commonjs/components/views/MessagesWindow/index.js +4 -1
- package/lib-commonjs/components/views/ResolutionView/index.js +8 -5
- package/lib-commonjs/contexts/ObservabilityContext.js +104 -0
- package/lib-commonjs/contexts/index.js +30 -0
- package/lib-commonjs/hooks/useResolutionState.js +849 -245
- package/lib-commonjs/hooks/useResourceData.js +184 -215
- package/lib-commonjs/index.js +15 -1
- package/lib-commonjs/namespaces/GridTools.js +161 -0
- package/lib-commonjs/namespaces/ObservabilityTools.js +33 -0
- package/lib-commonjs/namespaces/ResolutionTools.js +10 -1
- package/lib-commonjs/namespaces/index.js +3 -1
- package/lib-commonjs/types/index.js +10 -0
- package/lib-commonjs/utils/cellValidation.js +253 -0
- package/lib-commonjs/utils/downloadHelper.js +198 -0
- package/lib-commonjs/utils/observability/factories.js +63 -0
- package/lib-commonjs/utils/observability/implementations.js +109 -0
- package/lib-commonjs/utils/observability/index.js +36 -0
- package/lib-commonjs/utils/observability/interfaces.js +24 -0
- package/lib-commonjs/utils/resolutionEditing.js +2 -1
- package/lib-commonjs/utils/resourceSelector.js +200 -0
- package/lib-commonjs/utils/resourceSelectors.js +242 -0
- package/lib-commonjs/utils/tsResIntegration.js +21 -16
- package/lib-commonjs/utils/zipLoader/zipProcessingHelpers.js +7 -5
- package/package.json +7 -7
- package/src/components/common/QualifierContextControl.tsx +0 -338
- package/src/components/common/ResolutionContextOptionsControl.tsx +0 -450
- package/src/components/common/ResolutionResults/index.tsx +0 -481
- package/src/components/common/ResourceListView.tsx +0 -167
- package/src/components/common/ResourcePickerOptionsControl.tsx +0 -351
- package/src/components/common/ResourceTreeView.tsx +0 -417
- package/src/components/common/SourceResourceDetail/index.tsx +0 -493
- package/src/components/forms/HierarchyEditor.tsx +0 -285
- package/src/components/forms/QualifierEditForm.tsx +0 -487
- package/src/components/forms/QualifierTypeEditForm.tsx +0 -458
- package/src/components/forms/ResourceTypeEditForm.tsx +0 -437
- package/src/components/forms/index.ts +0 -11
- package/src/components/orchestrator/ResourceOrchestrator.tsx +0 -444
- package/src/components/pickers/ResourcePicker/README.md +0 -570
- package/src/components/pickers/ResourcePicker/ResourceItem.tsx +0 -127
- package/src/components/pickers/ResourcePicker/ResourcePickerList.tsx +0 -114
- package/src/components/pickers/ResourcePicker/ResourcePickerTree.tsx +0 -461
- package/src/components/pickers/ResourcePicker/index.tsx +0 -234
- package/src/components/pickers/ResourcePicker/types.ts +0 -301
- package/src/components/pickers/ResourcePicker/utils/treeNavigation.ts +0 -210
- package/src/components/views/CompiledView/index.tsx +0 -1342
- package/src/components/views/ConfigurationView/index.tsx +0 -848
- package/src/components/views/FilterView/index.tsx +0 -681
- package/src/components/views/ImportView/index.tsx +0 -789
- package/src/components/views/MessagesWindow/index.tsx +0 -325
- package/src/components/views/ResolutionView/EditableJsonView.tsx +0 -386
- package/src/components/views/ResolutionView/NewResourceModal.tsx +0 -158
- package/src/components/views/ResolutionView/UnifiedChangeControls.tsx +0 -163
- package/src/components/views/ResolutionView/index.tsx +0 -751
- package/src/components/views/SourceView/index.tsx +0 -291
- package/src/hooks/useConfigurationState.ts +0 -436
- package/src/hooks/useFilterState.ts +0 -150
- package/src/hooks/useResolutionState.ts +0 -893
- package/src/hooks/useResourceData.ts +0 -596
- package/src/hooks/useViewState.ts +0 -97
- package/src/index.ts +0 -68
- package/src/namespaces/ConfigurationTools.ts +0 -59
- package/src/namespaces/FilterTools.ts +0 -47
- package/src/namespaces/ImportTools.ts +0 -42
- package/src/namespaces/PickerTools.ts +0 -104
- package/src/namespaces/ResolutionTools.ts +0 -68
- package/src/namespaces/ResourceTools.ts +0 -106
- package/src/namespaces/TsResTools.ts +0 -49
- package/src/namespaces/ViewStateTools.ts +0 -91
- package/src/namespaces/ZipTools.ts +0 -49
- package/src/namespaces/index.ts +0 -49
- package/src/types/index.ts +0 -1273
- package/src/utils/configurationUtils.ts +0 -339
- package/src/utils/fileProcessing.ts +0 -164
- package/src/utils/filterResources.ts +0 -356
- package/src/utils/resolutionEditing.ts +0 -346
- package/src/utils/resolutionUtils.ts +0 -740
- package/src/utils/tsResIntegration.ts +0 -475
- package/src/utils/zipLoader/index.ts +0 -5
- package/src/utils/zipLoader/zipProcessingHelpers.ts +0 -46
- package/src/utils/zipLoader/zipUtils.ts +0 -7
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Result } from '@fgv/ts-utils';
|
|
2
2
|
import { ResourceManagerState, ProcessedResources, ImportedDirectory, ImportedFile, JsonValue } from '../types';
|
|
3
3
|
import { Config, Bundle, QualifierTypes, ResourceTypes } from '@fgv/ts-res';
|
|
4
|
+
import * as ObservabilityTools from '../utils/observability';
|
|
4
5
|
/**
|
|
5
6
|
* Parameters for the useResourceData hook.
|
|
6
7
|
* Allows customization of type factories for extended functionality.
|
|
@@ -12,6 +13,8 @@ export interface UseResourceDataParams {
|
|
|
12
13
|
qualifierTypeFactory?: Config.IConfigInitFactory<QualifierTypes.Config.IAnyQualifierTypeConfig, QualifierTypes.QualifierType>;
|
|
13
14
|
/** Optional resource type factory for creating custom resource types */
|
|
14
15
|
resourceTypeFactory?: Config.IConfigInitFactory<ResourceTypes.Config.IResourceTypeConfig, ResourceTypes.ResourceType>;
|
|
16
|
+
/** Optional observability context for logging */
|
|
17
|
+
o11y?: ObservabilityTools.IObservabilityContext;
|
|
15
18
|
}
|
|
16
19
|
/**
|
|
17
20
|
* Return type for the useResourceData hook.
|
|
@@ -25,11 +28,11 @@ export interface UseResourceDataReturn {
|
|
|
25
28
|
/** Available actions for processing and managing resources */
|
|
26
29
|
actions: {
|
|
27
30
|
/** Process an imported directory structure into a resource system */
|
|
28
|
-
processDirectory: (directory: ImportedDirectory) => Promise<void
|
|
31
|
+
processDirectory: (directory: ImportedDirectory) => Promise<Result<void>>;
|
|
29
32
|
/** Process a directory with an explicit configuration */
|
|
30
|
-
processDirectoryWithConfig: (directory: ImportedDirectory, config: Config.Model.ISystemConfiguration) => Promise<void
|
|
33
|
+
processDirectoryWithConfig: (directory: ImportedDirectory, config: Config.Model.ISystemConfiguration) => Promise<Result<void>>;
|
|
31
34
|
/** Process an array of imported files into a resource system */
|
|
32
|
-
processFiles: (files: ImportedFile[]) => Promise<void
|
|
35
|
+
processFiles: (files: ImportedFile[]) => Promise<Result<void>>;
|
|
33
36
|
/** Process a pre-compiled bundle file */
|
|
34
37
|
processBundleFile: (bundle: Bundle.IBundle) => Promise<void>;
|
|
35
38
|
/** Clear any current error state */
|
|
@@ -37,7 +40,7 @@ export interface UseResourceDataReturn {
|
|
|
37
40
|
/** Reset the entire resource management state */
|
|
38
41
|
reset: () => void;
|
|
39
42
|
/** Resolve a specific resource with optional context */
|
|
40
|
-
resolveResource: (resourceId: string, context?: Record<string, string>) =>
|
|
43
|
+
resolveResource: (resourceId: string, context?: Record<string, string>) => Result<JsonValue>;
|
|
41
44
|
/** Apply a new configuration to the current system */
|
|
42
45
|
applyConfiguration: (config: Config.Model.ISystemConfiguration) => void;
|
|
43
46
|
/** Update the processed resources state directly */
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { useState, useCallback } from 'react';
|
|
2
|
-
import { succeed, fail } from '@fgv/ts-utils';
|
|
3
|
-
import { Bundle, Runtime, Resources, Import } from '@fgv/ts-res';
|
|
2
|
+
import { succeed, fail, mapResults } from '@fgv/ts-utils';
|
|
3
|
+
import { Bundle, Runtime, Resources, Import, QualifierTypes } from '@fgv/ts-res';
|
|
4
4
|
import { processImportedFiles, processImportedDirectory } from '../utils/tsResIntegration';
|
|
5
|
+
import { createResolverWithContext, resolveResourceDetailed } from '../utils/resolutionUtils';
|
|
6
|
+
import * as ObservabilityTools from '../utils/observability';
|
|
5
7
|
const initialState = {
|
|
6
8
|
isProcessing: false,
|
|
7
9
|
processedResources: null,
|
|
@@ -50,119 +52,152 @@ const initialState = {
|
|
|
50
52
|
*/
|
|
51
53
|
export function useResourceData(params) {
|
|
52
54
|
const [state, setState] = useState(initialState);
|
|
55
|
+
const o11y = params?.o11y ?? ObservabilityTools.DefaultObservabilityContext;
|
|
53
56
|
const processDirectory = useCallback(async (directory) => {
|
|
54
57
|
setState((prev) => ({ ...prev, isProcessing: true, error: null }));
|
|
55
58
|
try {
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
return processImportedDirectory(directory, state.activeConfiguration || undefined, params?.qualifierTypeFactory, params?.resourceTypeFactory, o11y)
|
|
60
|
+
.onSuccess((value) => {
|
|
61
|
+
o11y.diag.info(`[useResourceData] Directory processing succeeded, resources found: ${value.summary?.totalResources || 0}`);
|
|
62
|
+
o11y.diag.info(`[useResourceData] Resource IDs: ${JSON.stringify(value.summary?.resourceIds || [])}`);
|
|
58
63
|
setState((prev) => ({
|
|
59
64
|
...prev,
|
|
60
65
|
isProcessing: false,
|
|
61
|
-
processedResources:
|
|
66
|
+
processedResources: value,
|
|
62
67
|
hasProcessedData: true,
|
|
63
68
|
isLoadedFromBundle: false,
|
|
64
69
|
bundleMetadata: null
|
|
65
70
|
}));
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
71
|
+
o11y.diag.info(`[useResourceData] State updated with ${value.summary?.totalResources || 0} resources`);
|
|
72
|
+
return succeed(undefined);
|
|
73
|
+
})
|
|
74
|
+
.onFailure((errorMessage) => {
|
|
75
|
+
o11y.diag.error(`[useResourceData] Directory processing failed: ${errorMessage}`);
|
|
76
|
+
o11y.user.error(`Directory import failed: ${errorMessage}`);
|
|
77
|
+
setState((prev) => ({
|
|
78
|
+
...prev,
|
|
79
|
+
isProcessing: false,
|
|
80
|
+
error: errorMessage
|
|
81
|
+
}));
|
|
82
|
+
return fail(errorMessage);
|
|
83
|
+
});
|
|
70
84
|
}
|
|
71
85
|
catch (error) {
|
|
86
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
87
|
+
o11y.diag.error(`[useResourceData] Exception during directory processing: ${errorMessage}`);
|
|
88
|
+
o11y.user.error(`Directory import failed: ${errorMessage}`);
|
|
72
89
|
setState((prev) => ({
|
|
73
90
|
...prev,
|
|
74
91
|
isProcessing: false,
|
|
75
|
-
error:
|
|
92
|
+
error: errorMessage
|
|
76
93
|
}));
|
|
94
|
+
return fail(errorMessage);
|
|
77
95
|
}
|
|
78
|
-
}, [state.activeConfiguration, params?.qualifierTypeFactory, params?.resourceTypeFactory]);
|
|
96
|
+
}, [state.activeConfiguration, params?.qualifierTypeFactory, params?.resourceTypeFactory, o11y]);
|
|
79
97
|
const processDirectoryWithConfig = useCallback(async (directory, config) => {
|
|
80
98
|
setState((prev) => ({ ...prev, isProcessing: true, error: null, activeConfiguration: config }));
|
|
81
99
|
try {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
100
|
+
return processImportedDirectory(directory, config, params?.qualifierTypeFactory, params?.resourceTypeFactory, o11y)
|
|
101
|
+
.onSuccess((value) => {
|
|
102
|
+
setState((prev) => ({
|
|
103
|
+
...prev,
|
|
104
|
+
isProcessing: false,
|
|
105
|
+
processedResources: value,
|
|
106
|
+
hasProcessedData: true,
|
|
107
|
+
isLoadedFromBundle: false,
|
|
108
|
+
bundleMetadata: null,
|
|
109
|
+
activeConfiguration: config
|
|
110
|
+
}));
|
|
111
|
+
return succeed(undefined);
|
|
112
|
+
})
|
|
113
|
+
.onFailure((errorMessage) => {
|
|
114
|
+
o11y.user.error(`Directory import with config failed: ${errorMessage}`);
|
|
115
|
+
setState((prev) => ({
|
|
116
|
+
...prev,
|
|
117
|
+
isProcessing: false,
|
|
118
|
+
error: errorMessage
|
|
119
|
+
}));
|
|
120
|
+
return fail(errorMessage);
|
|
121
|
+
});
|
|
92
122
|
}
|
|
93
123
|
catch (error) {
|
|
124
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
125
|
+
o11y.user.error(`Directory import with config failed: ${errorMessage}`);
|
|
94
126
|
setState((prev) => ({
|
|
95
127
|
...prev,
|
|
96
128
|
isProcessing: false,
|
|
97
|
-
error:
|
|
129
|
+
error: errorMessage
|
|
98
130
|
}));
|
|
131
|
+
return fail(errorMessage);
|
|
99
132
|
}
|
|
100
|
-
}, [params?.qualifierTypeFactory, params?.resourceTypeFactory]);
|
|
133
|
+
}, [params?.qualifierTypeFactory, params?.resourceTypeFactory, o11y]);
|
|
101
134
|
const processFiles = useCallback(async (files) => {
|
|
102
135
|
setState((prev) => ({ ...prev, isProcessing: true, error: null }));
|
|
103
136
|
try {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
137
|
+
return processImportedFiles(files, state.activeConfiguration || undefined, params?.qualifierTypeFactory, params?.resourceTypeFactory, o11y)
|
|
138
|
+
.onSuccess((value) => {
|
|
139
|
+
setState((prev) => ({
|
|
140
|
+
...prev,
|
|
141
|
+
isProcessing: false,
|
|
142
|
+
processedResources: value,
|
|
143
|
+
hasProcessedData: true,
|
|
144
|
+
isLoadedFromBundle: false,
|
|
145
|
+
bundleMetadata: null
|
|
146
|
+
}));
|
|
147
|
+
return succeed(undefined);
|
|
148
|
+
})
|
|
149
|
+
.onFailure((errorMessage) => {
|
|
150
|
+
o11y.user.error(`Files import failed: ${errorMessage}`);
|
|
151
|
+
setState((prev) => ({
|
|
152
|
+
...prev,
|
|
153
|
+
isProcessing: false,
|
|
154
|
+
error: errorMessage
|
|
155
|
+
}));
|
|
156
|
+
return fail(errorMessage);
|
|
157
|
+
});
|
|
113
158
|
}
|
|
114
159
|
catch (error) {
|
|
160
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
161
|
+
o11y.user.error(`Files import failed: ${errorMessage}`);
|
|
115
162
|
setState((prev) => ({
|
|
116
163
|
...prev,
|
|
117
164
|
isProcessing: false,
|
|
118
|
-
error:
|
|
165
|
+
error: errorMessage
|
|
119
166
|
}));
|
|
167
|
+
return fail(errorMessage);
|
|
120
168
|
}
|
|
121
|
-
}, [state.activeConfiguration, params?.qualifierTypeFactory, params?.resourceTypeFactory]);
|
|
169
|
+
}, [state.activeConfiguration, params?.qualifierTypeFactory, params?.resourceTypeFactory, o11y]);
|
|
122
170
|
const processBundleFile = useCallback(async (bundle) => {
|
|
123
|
-
|
|
171
|
+
o11y.diag.info('[Bundle Processing] Starting bundle processing...', bundle);
|
|
124
172
|
setState((prev) => ({ ...prev, isProcessing: true, error: null }));
|
|
125
173
|
try {
|
|
126
|
-
|
|
174
|
+
o11y.diag.info('[Bundle Processing] Attempting to extract bundle components...');
|
|
127
175
|
// Extract bundle components (configuration and compiled collection)
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
if (componentsResult.isFailure()) {
|
|
131
|
-
throw new Error(`Failed to extract bundle components: ${componentsResult.message}`);
|
|
132
|
-
}
|
|
133
|
-
const { systemConfiguration, compiledCollection, metadata } = componentsResult.value;
|
|
134
|
-
console.log('[Bundle Processing] Extracted components:', {
|
|
176
|
+
const { systemConfiguration, compiledCollection, metadata } = Bundle.BundleUtils.extractBundleComponents(bundle).orThrow((msg) => `Failed to extract bundle components: ${msg}`);
|
|
177
|
+
o11y.diag.info('[Bundle Processing] Extracted components:', {
|
|
135
178
|
hasSystemConfiguration: !!systemConfiguration,
|
|
136
179
|
hasCompiledCollection: !!compiledCollection,
|
|
137
180
|
hasMetadata: !!metadata,
|
|
138
181
|
systemConfiguration: systemConfiguration
|
|
139
182
|
});
|
|
140
183
|
// Use BundleLoader to create a fully functional resource manager from the bundle
|
|
141
|
-
|
|
142
|
-
const bundleManagerResult = Bundle.BundleLoader.createManagerFromBundle({
|
|
143
|
-
bundle: bundle,
|
|
144
|
-
skipChecksumVerification: true // Skip for now since we're in a browser environment
|
|
145
|
-
});
|
|
146
|
-
if (bundleManagerResult.isFailure()) {
|
|
147
|
-
throw new Error(`Failed to create resource manager from bundle: ${bundleManagerResult.message}`);
|
|
148
|
-
}
|
|
184
|
+
o11y.diag.info('[Bundle Processing] Using BundleLoader to create resource manager from bundle');
|
|
149
185
|
// The bundle's IResourceManager contains all the resources and candidates
|
|
150
186
|
// We'll use it directly for both UI and resolution
|
|
151
|
-
const bundleResourceManager =
|
|
187
|
+
const bundleResourceManager = Bundle.BundleLoader.createManagerFromBundle({
|
|
188
|
+
bundle: bundle,
|
|
189
|
+
skipChecksumVerification: true // Skip for now since we're in a browser environment
|
|
190
|
+
}).orThrow((msg) => `Failed to create resource manager from bundle: ${msg}`);
|
|
152
191
|
// Debug: Check what resources are in the original bundle manager
|
|
153
|
-
|
|
192
|
+
o11y.diag.info('[Bundle Processing] Original bundle manager resources:', {
|
|
154
193
|
numResources: bundleResourceManager.numResources,
|
|
155
194
|
numCandidates: bundleResourceManager.numCandidates,
|
|
156
195
|
resourceIds: Array.from(bundleResourceManager.builtResources.keys())
|
|
157
196
|
});
|
|
158
197
|
// Convert the compiled collection to an editable ResourceManagerBuilder
|
|
159
198
|
// using createFromCompiledResourceCollection for exact reconstruction
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
throw new Error(`Failed to reconstruct builder from compiled collection: ${reconstructedBuilderResult.message}`);
|
|
163
|
-
}
|
|
164
|
-
const editableResourceManager = reconstructedBuilderResult.value;
|
|
165
|
-
console.log('[Bundle Processing] Normalized builder resources:', {
|
|
199
|
+
const editableResourceManager = Resources.ResourceManagerBuilder.createFromCompiledResourceCollection(compiledCollection, systemConfiguration).orThrow((msg) => `Failed to reconstruct builder from compiled collection: ${msg}`);
|
|
200
|
+
o11y.diag.info('[Bundle Processing] Normalized builder resources:', {
|
|
166
201
|
numResources: editableResourceManager.resources.size,
|
|
167
202
|
numCandidates: Array.from(editableResourceManager.getAllCandidates()).length,
|
|
168
203
|
resourceIds: Array.from(editableResourceManager.resources.keys())
|
|
@@ -183,89 +218,43 @@ export function useResourceData(params) {
|
|
|
183
218
|
qualifiers: systemConfiguration.qualifiers
|
|
184
219
|
}).orThrow()
|
|
185
220
|
};
|
|
186
|
-
// Extract configuration for UI display using the
|
|
187
|
-
|
|
221
|
+
// Extract configuration for UI display using the new getConfigurationJson method
|
|
222
|
+
const allQualifierTypes = mapResults(Array.from(system.qualifierTypes.values()).map((qt) => qt
|
|
223
|
+
.getConfigurationJson()
|
|
224
|
+
.onSuccess((jsonConfig) => QualifierTypes.Config.Convert.anyQualifierTypeConfig.convert(jsonConfig)))).orThrow((msg) => `Failed to extract qualifier type configurations: ${msg}`);
|
|
225
|
+
const systemQualifierTypes = allQualifierTypes.filter(QualifierTypes.Config.isSystemQualifierTypeConfig);
|
|
188
226
|
const configForStorage = {
|
|
189
227
|
name: 'Bundle Configuration',
|
|
190
228
|
description: metadata?.description || 'Configuration extracted from bundle',
|
|
191
|
-
qualifierTypes:
|
|
192
|
-
console.log('[Bundle Processing] Extracting qualifier type:', qt);
|
|
193
|
-
// Determine the system type based on the class name
|
|
194
|
-
let systemType = 'literal';
|
|
195
|
-
if (qt.constructor?.name === 'LanguageQualifierType') {
|
|
196
|
-
systemType = 'language';
|
|
197
|
-
}
|
|
198
|
-
else if (qt.constructor?.name === 'TerritoryQualifierType') {
|
|
199
|
-
systemType = 'territory';
|
|
200
|
-
}
|
|
201
|
-
else if (qt.constructor?.name === 'LiteralQualifierType') {
|
|
202
|
-
systemType = 'literal';
|
|
203
|
-
}
|
|
204
|
-
// Extract configuration properties based on type
|
|
205
|
-
const configuration = {};
|
|
206
|
-
// Common properties
|
|
207
|
-
if (qt.allowContextList !== undefined) {
|
|
208
|
-
configuration.allowContextList = qt.allowContextList;
|
|
209
|
-
}
|
|
210
|
-
// LiteralQualifierType specific
|
|
211
|
-
if (systemType === 'literal') {
|
|
212
|
-
const qtAny = qt;
|
|
213
|
-
if (qtAny.caseSensitive !== undefined) {
|
|
214
|
-
configuration.caseSensitive = qtAny.caseSensitive;
|
|
215
|
-
}
|
|
216
|
-
if (qtAny.enumeratedValues) {
|
|
217
|
-
configuration.enumeratedValues = qtAny.enumeratedValues;
|
|
218
|
-
}
|
|
219
|
-
if (qtAny.hierarchy) {
|
|
220
|
-
configuration.hierarchy = qtAny.hierarchy;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
// TerritoryQualifierType specific
|
|
224
|
-
if (systemType === 'territory') {
|
|
225
|
-
const qtAny = qt;
|
|
226
|
-
if (qtAny.acceptLowercase !== undefined) {
|
|
227
|
-
configuration.acceptLowercase = qtAny.acceptLowercase;
|
|
228
|
-
}
|
|
229
|
-
if (qtAny.allowedTerritories) {
|
|
230
|
-
configuration.allowedTerritories = qtAny.allowedTerritories;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
return {
|
|
234
|
-
name: qt.name,
|
|
235
|
-
systemType: systemType,
|
|
236
|
-
configuration: configuration
|
|
237
|
-
};
|
|
238
|
-
}),
|
|
229
|
+
qualifierTypes: systemQualifierTypes,
|
|
239
230
|
qualifiers: Array.from(system.qualifiers.values()).map((q) => {
|
|
240
|
-
|
|
231
|
+
o11y.diag.info('[Bundle Processing] Extracting qualifier:', q);
|
|
241
232
|
// Instantiated Qualifier objects have .type property which is a QualifierType object
|
|
242
|
-
const
|
|
243
|
-
const typeName = q.type?.name || qAny.typeName;
|
|
233
|
+
const typeName = q.type.name;
|
|
244
234
|
if (!typeName) {
|
|
245
|
-
|
|
235
|
+
o11y.diag.error('[Bundle Processing] Missing typeName for qualifier:', q);
|
|
246
236
|
}
|
|
247
237
|
return {
|
|
248
238
|
name: q.name,
|
|
249
|
-
typeName
|
|
239
|
+
typeName,
|
|
250
240
|
token: q.token,
|
|
251
|
-
defaultPriority: q.defaultPriority
|
|
252
|
-
|
|
253
|
-
|
|
241
|
+
defaultPriority: q.defaultPriority,
|
|
242
|
+
tokenIsOptional: q.tokenIsOptional,
|
|
243
|
+
...(q.defaultValue !== undefined ? { defaultValue: q.defaultValue } : {})
|
|
254
244
|
};
|
|
255
245
|
}),
|
|
256
246
|
resourceTypes: Array.from(system.resourceTypes.values()).map((rt, index) => {
|
|
257
|
-
|
|
247
|
+
o11y.diag.info('[Bundle Processing] Extracting resource type:', rt);
|
|
258
248
|
// ResourceTypes in bundles might not have a name property
|
|
259
249
|
// Default to 'json' for JsonResourceType
|
|
260
|
-
const
|
|
261
|
-
const typeName = rt.constructor?.name === 'JsonResourceType' ? 'json' : rtAny.typeName || 'json';
|
|
250
|
+
const typeName = rt.systemTypeName;
|
|
262
251
|
return {
|
|
263
|
-
name:
|
|
264
|
-
typeName:
|
|
252
|
+
name: rt.key,
|
|
253
|
+
typeName: rt.systemTypeName
|
|
265
254
|
};
|
|
266
255
|
})
|
|
267
256
|
};
|
|
268
|
-
|
|
257
|
+
o11y.diag.info('[Bundle Processing] Extracted configuration for UI:', configForStorage);
|
|
269
258
|
// Extract resource IDs from the loaded resource manager
|
|
270
259
|
const resourceIds = [];
|
|
271
260
|
let resourceCount = 0;
|
|
@@ -278,16 +267,13 @@ export function useResourceData(params) {
|
|
|
278
267
|
resourceCount++;
|
|
279
268
|
}
|
|
280
269
|
}
|
|
281
|
-
|
|
270
|
+
o11y.diag.info(`Bundle loaded with ${resourceCount} resources (with candidates):`, resourceIds);
|
|
282
271
|
// Create a resolver using the bundle's resource manager
|
|
283
|
-
const
|
|
272
|
+
const resolver = Runtime.ResourceResolver.create({
|
|
284
273
|
resourceManager: system.resourceManager,
|
|
285
274
|
qualifierTypes: system.qualifierTypes,
|
|
286
275
|
contextQualifierProvider: system.contextQualifierProvider
|
|
287
|
-
});
|
|
288
|
-
if (resolverResult.isFailure()) {
|
|
289
|
-
throw new Error(`Failed to create resolver: ${resolverResult.message}`);
|
|
290
|
-
}
|
|
276
|
+
}).orThrow((msg) => `Failed to create resolver: ${msg}`);
|
|
291
277
|
// No longer create a separate CompiledResourceCollection manager
|
|
292
278
|
// We'll derive the compiled collection from ResourceManagerBuilder when needed
|
|
293
279
|
// Create the processed resources structure with bundle data
|
|
@@ -301,7 +287,7 @@ export function useResourceData(params) {
|
|
|
301
287
|
contextQualifierProvider: system.contextQualifierProvider
|
|
302
288
|
},
|
|
303
289
|
compiledCollection,
|
|
304
|
-
resolver
|
|
290
|
+
resolver,
|
|
305
291
|
resourceCount,
|
|
306
292
|
summary: {
|
|
307
293
|
totalResources: resourceCount,
|
|
@@ -310,7 +296,7 @@ export function useResourceData(params) {
|
|
|
310
296
|
warnings: [`Bundle loaded with ${resourceCount} resources from compiled collection`]
|
|
311
297
|
}
|
|
312
298
|
};
|
|
313
|
-
|
|
299
|
+
o11y.diag.info('[Bundle Processing] Setting final state...', {
|
|
314
300
|
resourceCount,
|
|
315
301
|
resourceIds,
|
|
316
302
|
configForStorage,
|
|
@@ -326,7 +312,7 @@ export function useResourceData(params) {
|
|
|
326
312
|
isLoadedFromBundle: true,
|
|
327
313
|
bundleMetadata: metadata
|
|
328
314
|
}));
|
|
329
|
-
|
|
315
|
+
o11y.diag.info('[Bundle Processing] Bundle processing completed successfully!');
|
|
330
316
|
}
|
|
331
317
|
catch (error) {
|
|
332
318
|
setState((prev) => ({
|
|
@@ -335,67 +321,56 @@ export function useResourceData(params) {
|
|
|
335
321
|
error: error instanceof Error ? error.message : String(error)
|
|
336
322
|
}));
|
|
337
323
|
}
|
|
338
|
-
}, []);
|
|
324
|
+
}, [o11y]);
|
|
339
325
|
const clearError = useCallback(() => {
|
|
340
326
|
setState((prev) => ({ ...prev, error: null }));
|
|
341
327
|
}, []);
|
|
342
328
|
const reset = useCallback(() => {
|
|
343
329
|
setState(initialState);
|
|
344
330
|
}, []);
|
|
345
|
-
const resolveResource = useCallback(
|
|
331
|
+
const resolveResource = useCallback((resourceId, context) => {
|
|
346
332
|
if (!state.processedResources?.system?.resourceManager) {
|
|
347
333
|
return fail('No resources loaded');
|
|
348
334
|
}
|
|
349
335
|
try {
|
|
350
|
-
// Get the resource from the resource manager
|
|
351
|
-
const resourceResult = state.processedResources.system.resourceManager.getBuiltResource(resourceId);
|
|
352
|
-
if (resourceResult.isFailure()) {
|
|
353
|
-
return fail(`Resource not found: ${resourceId}`);
|
|
354
|
-
}
|
|
355
|
-
// Get the resource and convert to JSON
|
|
356
|
-
const resource = resourceResult.value;
|
|
357
|
-
// Import resolution utilities for detailed resolution
|
|
358
|
-
const { createResolverWithContext, resolveResourceDetailed } = await import('../utils/resolutionUtils');
|
|
359
336
|
// Use provided context or empty context
|
|
360
337
|
const contextValues = context || {};
|
|
361
|
-
|
|
362
|
-
|
|
338
|
+
return state.processedResources.system.resourceManager
|
|
339
|
+
.getBuiltResource(resourceId)
|
|
340
|
+
.onFailure(() => fail(`Resource not found: ${resourceId}`))
|
|
341
|
+
.onSuccess(() => createResolverWithContext(state.processedResources, contextValues, {
|
|
363
342
|
enableDebugLogging: false
|
|
343
|
+
}).withErrorFormat((msg) => `Failed to create resolver: ${msg}`))
|
|
344
|
+
.onSuccess((resolver) => resolveResourceDetailed(resolver, resourceId, state.processedResources, {
|
|
345
|
+
enableDebugLogging: false
|
|
346
|
+
}).withErrorFormat((msg) => `Failed to resolve resource details: ${msg}`))
|
|
347
|
+
.onSuccess((resolutionResult) => {
|
|
348
|
+
// Return the detailed resolution result as JsonValue
|
|
349
|
+
const detailedJson = {
|
|
350
|
+
success: resolutionResult.success,
|
|
351
|
+
resourceId: resolutionResult.resourceId,
|
|
352
|
+
resource: resolutionResult.resource
|
|
353
|
+
? {
|
|
354
|
+
id: resolutionResult.resource.id,
|
|
355
|
+
resourceType: resolutionResult.resource.resourceType?.key || 'unknown',
|
|
356
|
+
candidateCount: resolutionResult.resource.candidates.length
|
|
357
|
+
}
|
|
358
|
+
: null,
|
|
359
|
+
bestCandidate: resolutionResult.bestCandidate?.json,
|
|
360
|
+
allCandidates: resolutionResult.allCandidates?.map((c) => c.json),
|
|
361
|
+
candidateDetails: resolutionResult.candidateDetails?.map((cd) => ({
|
|
362
|
+
candidateIndex: cd.candidateIndex,
|
|
363
|
+
matched: cd.matched,
|
|
364
|
+
matchType: cd.matchType,
|
|
365
|
+
isDefaultMatch: cd.isDefaultMatch,
|
|
366
|
+
conditionEvaluations: cd.conditionEvaluations,
|
|
367
|
+
candidateJson: cd.candidate?.json
|
|
368
|
+
})),
|
|
369
|
+
composedValue: resolutionResult.composedValue,
|
|
370
|
+
error: resolutionResult.error
|
|
371
|
+
};
|
|
372
|
+
return succeed(detailedJson);
|
|
364
373
|
});
|
|
365
|
-
if (resolverResult.isFailure()) {
|
|
366
|
-
return fail(`Failed to create resolver: ${resolverResult.message}`);
|
|
367
|
-
}
|
|
368
|
-
// Resolve resource with detailed information
|
|
369
|
-
const detailedResult = resolveResourceDetailed(resolverResult.value, resourceId, state.processedResources, { enableDebugLogging: false });
|
|
370
|
-
if (detailedResult.isFailure()) {
|
|
371
|
-
return fail(`Failed to resolve resource details: ${detailedResult.message}`);
|
|
372
|
-
}
|
|
373
|
-
const resolutionResult = detailedResult.value;
|
|
374
|
-
// Return the detailed resolution result as JsonValue
|
|
375
|
-
const detailedJson = {
|
|
376
|
-
success: resolutionResult.success,
|
|
377
|
-
resourceId: resolutionResult.resourceId,
|
|
378
|
-
resource: resolutionResult.resource
|
|
379
|
-
? {
|
|
380
|
-
id: resolutionResult.resource.id,
|
|
381
|
-
resourceType: resolutionResult.resource.resourceType?.key || 'unknown',
|
|
382
|
-
candidateCount: resolutionResult.resource.candidates.length
|
|
383
|
-
}
|
|
384
|
-
: null,
|
|
385
|
-
bestCandidate: resolutionResult.bestCandidate?.json,
|
|
386
|
-
allCandidates: resolutionResult.allCandidates?.map((c) => c.json),
|
|
387
|
-
candidateDetails: resolutionResult.candidateDetails?.map((cd) => ({
|
|
388
|
-
candidateIndex: cd.candidateIndex,
|
|
389
|
-
matched: cd.matched,
|
|
390
|
-
matchType: cd.matchType,
|
|
391
|
-
isDefaultMatch: cd.isDefaultMatch,
|
|
392
|
-
conditionEvaluations: cd.conditionEvaluations,
|
|
393
|
-
candidateJson: cd.candidate?.json
|
|
394
|
-
})),
|
|
395
|
-
composedValue: resolutionResult.composedValue,
|
|
396
|
-
error: resolutionResult.error
|
|
397
|
-
};
|
|
398
|
-
return succeed(detailedJson);
|
|
399
374
|
}
|
|
400
375
|
catch (error) {
|
|
401
376
|
return fail(`Failed to resolve resource: ${error instanceof Error ? error.message : String(error)}`);
|
|
@@ -405,11 +380,37 @@ export function useResourceData(params) {
|
|
|
405
380
|
setState((prev) => ({ ...prev, activeConfiguration: config }));
|
|
406
381
|
}, []);
|
|
407
382
|
const updateProcessedResources = useCallback((processedResources) => {
|
|
408
|
-
setState((prev) =>
|
|
409
|
-
|
|
410
|
-
processedResources
|
|
411
|
-
|
|
412
|
-
|
|
383
|
+
setState((prev) => {
|
|
384
|
+
const incomingExtended = processedResources;
|
|
385
|
+
const existingExtended = prev.processedResources;
|
|
386
|
+
// Build the extended properties object, only including defined values
|
|
387
|
+
const extendedProps = {};
|
|
388
|
+
// Handle activeConfiguration - prefer incoming, then existing, then leave undefined
|
|
389
|
+
const activeConfig = incomingExtended.activeConfiguration ?? existingExtended?.activeConfiguration;
|
|
390
|
+
if (activeConfig !== undefined) {
|
|
391
|
+
extendedProps.activeConfiguration = activeConfig;
|
|
392
|
+
}
|
|
393
|
+
// Handle isLoadedFromBundle - prefer incoming, then existing, then leave undefined
|
|
394
|
+
const isLoaded = incomingExtended.isLoadedFromBundle ?? existingExtended?.isLoadedFromBundle;
|
|
395
|
+
if (isLoaded !== undefined) {
|
|
396
|
+
extendedProps.isLoadedFromBundle = isLoaded;
|
|
397
|
+
}
|
|
398
|
+
// Handle bundleMetadata - prefer incoming, then existing, then leave undefined
|
|
399
|
+
const bundleMeta = incomingExtended.bundleMetadata ?? existingExtended?.bundleMetadata;
|
|
400
|
+
if (bundleMeta !== undefined) {
|
|
401
|
+
extendedProps.bundleMetadata = bundleMeta;
|
|
402
|
+
}
|
|
403
|
+
return {
|
|
404
|
+
...prev,
|
|
405
|
+
processedResources: {
|
|
406
|
+
// Start with the new processedResources (core data)
|
|
407
|
+
...processedResources,
|
|
408
|
+
// Then add any extended properties that have values
|
|
409
|
+
...extendedProps
|
|
410
|
+
},
|
|
411
|
+
hasProcessedData: true
|
|
412
|
+
};
|
|
413
|
+
});
|
|
413
414
|
}, []);
|
|
414
415
|
return {
|
|
415
416
|
state,
|
package/lib/index.d.ts
CHANGED
|
@@ -8,10 +8,14 @@ export { CompiledView } from './components/views/CompiledView';
|
|
|
8
8
|
export { ResolutionView } from './components/views/ResolutionView';
|
|
9
9
|
export { ConfigurationView } from './components/views/ConfigurationView';
|
|
10
10
|
export { MessagesWindow } from './components/views/MessagesWindow';
|
|
11
|
+
export { GridView } from './components/views/GridView';
|
|
12
|
+
export { MultiGridView } from './components/views/GridView/MultiGridView';
|
|
11
13
|
export { ResourceOrchestrator } from './components/orchestrator/ResourceOrchestrator';
|
|
14
|
+
export { DownloadUtils } from './utils/downloadHelper';
|
|
15
|
+
export { ObservabilityProvider, useObservability, type ObservabilityProviderProps } from './contexts';
|
|
12
16
|
export { ResourceTreeView } from './components/common/ResourceTreeView';
|
|
13
17
|
export { ResourceListView } from './components/common/ResourceListView';
|
|
14
18
|
export { SourceResourceDetail } from './components/common/SourceResourceDetail';
|
|
15
19
|
export { ResolutionResults } from './components/common/ResolutionResults';
|
|
16
|
-
export { FilterTools, ResolutionTools, ConfigurationTools, ResourceTools, ImportTools, TsResTools, ZipTools, ViewStateTools, PickerTools } from './namespaces';
|
|
20
|
+
export { FilterTools, ResolutionTools, ConfigurationTools, ResourceTools, ImportTools, TsResTools, ZipTools, ViewStateTools, PickerTools, GridTools, ObservabilityTools } from './namespaces';
|
|
17
21
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
// - TsResTools: SourceViewProps, CompiledViewProps
|
|
8
8
|
// - ZipTools: ImportViewProps and ZIP utilities
|
|
9
9
|
// - ConfigurationTools: ConfigurationViewProps
|
|
10
|
+
// - GridTools: GridViewProps, MultiGridViewProps, GridColumnDefinition, GridResourceSelector, GridDropdownOption, GridCellValidation
|
|
10
11
|
// - ImportTools: ImportedFile, ImportedDirectory
|
|
11
12
|
// Export views
|
|
12
13
|
export { ImportView } from './components/views/ImportView';
|
|
@@ -16,8 +17,14 @@ export { CompiledView } from './components/views/CompiledView';
|
|
|
16
17
|
export { ResolutionView } from './components/views/ResolutionView';
|
|
17
18
|
export { ConfigurationView } from './components/views/ConfigurationView';
|
|
18
19
|
export { MessagesWindow } from './components/views/MessagesWindow';
|
|
20
|
+
export { GridView } from './components/views/GridView';
|
|
21
|
+
export { MultiGridView } from './components/views/GridView/MultiGridView';
|
|
19
22
|
// Export orchestrator
|
|
20
23
|
export { ResourceOrchestrator } from './components/orchestrator/ResourceOrchestrator';
|
|
24
|
+
// Export utilities
|
|
25
|
+
export { DownloadUtils } from './utils/downloadHelper';
|
|
26
|
+
// Export contexts and hooks
|
|
27
|
+
export { ObservabilityProvider, useObservability } from './contexts';
|
|
21
28
|
// Export common components (likely to be used by consumers)
|
|
22
29
|
export { ResourceTreeView } from './components/common/ResourceTreeView';
|
|
23
30
|
export { ResourceListView } from './components/common/ResourceListView';
|
|
@@ -40,5 +47,5 @@ export { ResolutionResults } from './components/common/ResolutionResults';
|
|
|
40
47
|
// - useResolutionState: ResolutionTools.useResolutionState (resource resolution)
|
|
41
48
|
// - useConfigurationState: ConfigurationTools.useConfigurationState (system configuration)
|
|
42
49
|
// Export organized tool namespaces
|
|
43
|
-
export { FilterTools, ResolutionTools, ConfigurationTools, ResourceTools, ImportTools, TsResTools, ZipTools, ViewStateTools, PickerTools } from './namespaces';
|
|
50
|
+
export { FilterTools, ResolutionTools, ConfigurationTools, ResourceTools, ImportTools, TsResTools, ZipTools, ViewStateTools, PickerTools, GridTools, ObservabilityTools } from './namespaces';
|
|
44
51
|
//# sourceMappingURL=index.js.map
|