@fgv/ts-res-ui-components 5.0.1-6 → 5.0.1-8
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.
|
@@ -2,6 +2,7 @@ import { useState, useCallback } from 'react';
|
|
|
2
2
|
import { succeed, fail, mapResults } from '@fgv/ts-utils';
|
|
3
3
|
import { Converters } from '@fgv/ts-json-base';
|
|
4
4
|
import { Bundle, Runtime, Resources, Import, QualifierTypes } from '@fgv/ts-res';
|
|
5
|
+
import { FileTree } from '@fgv/ts-json-base';
|
|
5
6
|
import { processFileTree } from '../utils/tsResIntegration';
|
|
6
7
|
import { createResolverWithContext, resolveResourceDetailed } from '../utils/resolutionUtils';
|
|
7
8
|
import * as ObservabilityTools from '../utils/observability';
|
|
@@ -189,7 +190,8 @@ export function useResourceData(params) {
|
|
|
189
190
|
resources: Resources.ResourceManagerBuilder.create({
|
|
190
191
|
qualifiers: systemConfiguration.qualifiers,
|
|
191
192
|
resourceTypes: systemConfiguration.resourceTypes
|
|
192
|
-
}).orThrow()
|
|
193
|
+
}).orThrow(),
|
|
194
|
+
fileTree: FileTree.inMemory([]).orThrow()
|
|
193
195
|
}).orThrow(),
|
|
194
196
|
contextQualifierProvider: Runtime.Context.ValidatingSimpleContextQualifierProvider.create({
|
|
195
197
|
qualifiers: systemConfiguration.qualifiers
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { succeed, fail } from '@fgv/ts-utils';
|
|
2
2
|
import { Runtime, Import } from '@fgv/ts-res';
|
|
3
|
+
import { FileTree } from '@fgv/ts-json-base';
|
|
3
4
|
// Helper function for conditional debug logging
|
|
4
5
|
const debugLog = (enableDebug, ...args) => {
|
|
5
6
|
if (enableDebug) {
|
|
@@ -155,10 +156,12 @@ export const createFilteredResourceManagerSimple = async (originalSystem, partia
|
|
|
155
156
|
.onSuccess((filteredManager) => {
|
|
156
157
|
debugLog(enableDebug, 'Filtered manager created:', filteredManager);
|
|
157
158
|
// Create new ImportManager for the filtered system
|
|
158
|
-
return
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
return FileTree.inMemory([])
|
|
160
|
+
.withErrorFormat((e) => `Failed to create in-memory FileTree: ${e}`)
|
|
161
|
+
.onSuccess((emptyTree) => Import.ImportManager.create({
|
|
162
|
+
resources: filteredManager,
|
|
163
|
+
fileTree: emptyTree
|
|
164
|
+
}).withErrorFormat((e) => `Failed to create filtered import manager: ${e}`))
|
|
162
165
|
.onSuccess((newImportManager) => {
|
|
163
166
|
// Create new ContextQualifierProvider for the filtered system
|
|
164
167
|
return Runtime.ValidatingSimpleContextQualifierProvider.create({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { succeed, fail } from '@fgv/ts-utils';
|
|
2
|
+
import { FileTree } from '@fgv/ts-json-base';
|
|
2
3
|
import { Resources, Import, Runtime, Config } from '@fgv/ts-res';
|
|
3
4
|
import * as ObservabilityTools from '../utils/observability';
|
|
4
5
|
/**
|
|
@@ -74,10 +75,12 @@ export function createTsResSystemFromConfig(systemConfig, qualifierTypeFactory,
|
|
|
74
75
|
})
|
|
75
76
|
.withErrorFormat((e) => `Failed to create resource manager: ${e}`)
|
|
76
77
|
.onSuccess((resourceManager) => {
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
return FileTree.inMemory([])
|
|
79
|
+
.withErrorFormat((e) => `Failed to create in-memory FileTree: ${e}`)
|
|
80
|
+
.onSuccess((emptyTree) => Import.ImportManager.create({
|
|
81
|
+
resources: resourceManager,
|
|
82
|
+
fileTree: emptyTree
|
|
83
|
+
}).withErrorFormat((e) => `Failed to create import manager: ${e}`))
|
|
81
84
|
.onSuccess((importManager) => {
|
|
82
85
|
return Runtime.ValidatingSimpleContextQualifierProvider.create({
|
|
83
86
|
qualifiers: systemConfiguration.qualifiers
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fgv/ts-res-ui-components",
|
|
3
|
-
"version": "5.0.1-
|
|
3
|
+
"version": "5.0.1-8",
|
|
4
4
|
"description": "Reusable React components for ts-res resource visualization and management",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"@heroicons/react": "~2.2.0",
|
|
24
24
|
"tslib": "^2.8.1",
|
|
25
25
|
"json-edit-react": "~1.29.0",
|
|
26
|
-
"@fgv/ts-res": "5.0.1-
|
|
27
|
-
"@fgv/ts-utils": "5.0.1-
|
|
28
|
-
"@fgv/ts-json": "5.0.1-
|
|
29
|
-
"@fgv/ts-json-base": "5.0.1-
|
|
30
|
-
"@fgv/ts-extras": "5.0.1-
|
|
31
|
-
"@fgv/ts-
|
|
26
|
+
"@fgv/ts-res": "5.0.1-8",
|
|
27
|
+
"@fgv/ts-utils": "5.0.1-8",
|
|
28
|
+
"@fgv/ts-json": "5.0.1-8",
|
|
29
|
+
"@fgv/ts-json-base": "5.0.1-8",
|
|
30
|
+
"@fgv/ts-web-extras": "5.0.1-8",
|
|
31
|
+
"@fgv/ts-extras": "5.0.1-8"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": ">=18.0.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@microsoft/api-documenter": "^7.27.3",
|
|
64
64
|
"@microsoft/api-extractor": "^7.53.3",
|
|
65
65
|
"@testing-library/dom": "^10.4.0",
|
|
66
|
-
"@fgv/ts-utils-jest": "5.0.1-
|
|
66
|
+
"@fgv/ts-utils-jest": "5.0.1-8"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "heft build --clean",
|