@fgv/ts-res-ui-components 5.0.0-29 → 5.0.0-31
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 +37 -4
- package/dist/ts-res-ui-components.d.ts +221 -141
- package/lib/components/common/AppHeader.d.ts +15 -0
- package/lib/components/common/AppHeader.js +17 -0
- package/lib/components/common/AppLayout.d.ts +21 -0
- package/lib/components/common/AppLayout.js +20 -0
- package/lib/components/common/AppSidebar.d.ts +22 -0
- package/lib/components/common/AppSidebar.js +24 -0
- package/lib/components/common/NavigationWarningModal.d.ts +15 -0
- package/lib/components/common/NavigationWarningModal.js +22 -0
- package/lib/components/common/QualifierContextControl.js +46 -16
- package/lib/components/orchestrator/ResourceOrchestrator.js +8 -15
- package/lib/components/views/CompiledView/index.js +2 -2
- package/lib/components/views/FilterView/index.js +3 -3
- package/lib/components/views/ImportView/index.d.ts +4 -4
- package/lib/components/views/ImportView/index.js +259 -240
- package/lib/components/views/ResolutionView/index.js +3 -3
- package/lib/components/views/SourceView/index.js +2 -2
- package/lib/hooks/index.d.ts +7 -0
- package/lib/hooks/index.js +28 -0
- package/lib/hooks/useNavigationWarning.d.ts +35 -0
- package/lib/hooks/useNavigationWarning.js +69 -0
- package/lib/hooks/useResolutionState.js +4 -3
- package/lib/hooks/useResourceData.d.ts +8 -9
- package/lib/hooks/useResourceData.js +21 -62
- package/lib/hooks/useSmartObservability.js +17 -2
- package/lib/hooks/useUrlParams.d.ts +10 -0
- package/lib/hooks/useUrlParams.js +50 -0
- package/lib/index.d.ts +6 -1
- package/lib/index.js +7 -1
- package/lib/namespaces/ImportTools.d.ts +10 -10
- package/lib/namespaces/ImportTools.js +11 -10
- package/lib/namespaces/TsResTools.d.ts +1 -1
- package/lib/namespaces/TsResTools.js +1 -1
- package/lib/types/index.d.ts +9 -56
- package/lib/types/index.js +2 -0
- package/lib/utils/observability/factories.d.ts +6 -0
- package/lib/utils/observability/factories.js +11 -1
- package/lib/utils/observability/implementations.d.ts +33 -4
- package/lib/utils/observability/implementations.js +41 -3
- package/lib/utils/observability/index.d.ts +3 -3
- package/lib/utils/observability/index.js +2 -2
- package/lib/utils/observability/interfaces.d.ts +24 -3
- package/lib/utils/tsResIntegration.d.ts +9 -25
- package/lib/utils/tsResIntegration.js +10 -88
- package/lib/utils/zipLoader/zipProcessingHelpers.d.ts +4 -4
- package/lib/utils/zipLoader/zipProcessingHelpers.js +4 -12
- package/package.json +8 -7
- package/lib/utils/fileProcessing.d.ts +0 -22
- package/lib/utils/fileProcessing.js +0 -150
package/README.md
CHANGED
|
@@ -451,16 +451,49 @@ is a generic component used by all of the views, which can also be used to power
|
|
|
451
451
|
- **Type safety**: Full TypeScript support with generic resource types
|
|
452
452
|
- **Debug controls**: Optional ResourcePickerOptionsControl for development and debugging
|
|
453
453
|
|
|
454
|
+
#### ResourcePicker Configuration
|
|
455
|
+
|
|
456
|
+
The ResourcePicker supports two distinct configuration mechanisms:
|
|
457
|
+
|
|
458
|
+
1. **`pickerOptions`** - Controls actual picker behavior (defaultView, rootPath, search settings, etc.)
|
|
459
|
+
2. **`pickerOptionsPanelPresentation`** - Controls whether/how the debug options control panel is displayed
|
|
460
|
+
|
|
461
|
+
```tsx
|
|
462
|
+
// Example: Configure picker behavior programmatically
|
|
463
|
+
<SourceView
|
|
464
|
+
resources={state.processedResources}
|
|
465
|
+
pickerOptions={{
|
|
466
|
+
defaultView: 'tree',
|
|
467
|
+
rootPath: 'user.messages', // Focus on specific branch
|
|
468
|
+
hideRootNode: true, // Hide the root node itself
|
|
469
|
+
enableSearch: true,
|
|
470
|
+
searchPlaceholder: 'Search user messages...',
|
|
471
|
+
height: '500px'
|
|
472
|
+
}}
|
|
473
|
+
pickerOptionsPanelPresentation="hidden" // Hide debug controls in production
|
|
474
|
+
/>
|
|
475
|
+
|
|
476
|
+
// Example: Enable debug controls during development
|
|
477
|
+
<SourceView
|
|
478
|
+
resources={state.processedResources}
|
|
479
|
+
pickerOptions={{
|
|
480
|
+
defaultView: 'list',
|
|
481
|
+
enableSearch: true
|
|
482
|
+
}}
|
|
483
|
+
pickerOptionsPanelPresentation={isDevelopment ? 'collapsible' : 'hidden'}
|
|
484
|
+
/>
|
|
485
|
+
```
|
|
486
|
+
|
|
454
487
|
#### ResourcePickerOptionsControl
|
|
455
488
|
|
|
456
489
|
A debugging/design tool for interactively configuring ResourcePicker behavior. Hidden by default for production use, but can be enabled in development:
|
|
457
490
|
|
|
458
491
|
```tsx
|
|
459
|
-
// All view components support
|
|
492
|
+
// All view components support pickerOptionsPanelPresentation
|
|
460
493
|
<ObservabilityProvider observabilityContext={myObservabilityContext}>
|
|
461
494
|
<SourceView
|
|
462
495
|
resources={state.processedResources}
|
|
463
|
-
|
|
496
|
+
pickerOptionsPanelPresentation="collapsible" // Enable picker options UI
|
|
464
497
|
/>
|
|
465
498
|
</ObservabilityProvider>
|
|
466
499
|
|
|
@@ -1002,7 +1035,7 @@ Enable the context options gear icon during development for interactive configur
|
|
|
1002
1035
|
```tsx
|
|
1003
1036
|
<ResolutionView
|
|
1004
1037
|
resources={processedResources}
|
|
1005
|
-
|
|
1038
|
+
pickerOptionsPanelPresentation="collapsible" // Shows both picker & context gear icons
|
|
1006
1039
|
resolutionState={resolutionState}
|
|
1007
1040
|
resolutionActions={resolutionActions}
|
|
1008
1041
|
/>
|
|
@@ -1145,7 +1178,7 @@ Enable the context options gear icon during development for interactive filter c
|
|
|
1145
1178
|
```tsx
|
|
1146
1179
|
<FilterView
|
|
1147
1180
|
resources={processedResources}
|
|
1148
|
-
|
|
1181
|
+
pickerOptionsPanelPresentation="collapsible" // Shows both picker & context gear icons
|
|
1149
1182
|
filterState={filterState}
|
|
1150
1183
|
filterActions={filterActions}
|
|
1151
1184
|
/>
|