@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.
Files changed (50) hide show
  1. package/README.md +37 -4
  2. package/dist/ts-res-ui-components.d.ts +221 -141
  3. package/lib/components/common/AppHeader.d.ts +15 -0
  4. package/lib/components/common/AppHeader.js +17 -0
  5. package/lib/components/common/AppLayout.d.ts +21 -0
  6. package/lib/components/common/AppLayout.js +20 -0
  7. package/lib/components/common/AppSidebar.d.ts +22 -0
  8. package/lib/components/common/AppSidebar.js +24 -0
  9. package/lib/components/common/NavigationWarningModal.d.ts +15 -0
  10. package/lib/components/common/NavigationWarningModal.js +22 -0
  11. package/lib/components/common/QualifierContextControl.js +46 -16
  12. package/lib/components/orchestrator/ResourceOrchestrator.js +8 -15
  13. package/lib/components/views/CompiledView/index.js +2 -2
  14. package/lib/components/views/FilterView/index.js +3 -3
  15. package/lib/components/views/ImportView/index.d.ts +4 -4
  16. package/lib/components/views/ImportView/index.js +259 -240
  17. package/lib/components/views/ResolutionView/index.js +3 -3
  18. package/lib/components/views/SourceView/index.js +2 -2
  19. package/lib/hooks/index.d.ts +7 -0
  20. package/lib/hooks/index.js +28 -0
  21. package/lib/hooks/useNavigationWarning.d.ts +35 -0
  22. package/lib/hooks/useNavigationWarning.js +69 -0
  23. package/lib/hooks/useResolutionState.js +4 -3
  24. package/lib/hooks/useResourceData.d.ts +8 -9
  25. package/lib/hooks/useResourceData.js +21 -62
  26. package/lib/hooks/useSmartObservability.js +17 -2
  27. package/lib/hooks/useUrlParams.d.ts +10 -0
  28. package/lib/hooks/useUrlParams.js +50 -0
  29. package/lib/index.d.ts +6 -1
  30. package/lib/index.js +7 -1
  31. package/lib/namespaces/ImportTools.d.ts +10 -10
  32. package/lib/namespaces/ImportTools.js +11 -10
  33. package/lib/namespaces/TsResTools.d.ts +1 -1
  34. package/lib/namespaces/TsResTools.js +1 -1
  35. package/lib/types/index.d.ts +9 -56
  36. package/lib/types/index.js +2 -0
  37. package/lib/utils/observability/factories.d.ts +6 -0
  38. package/lib/utils/observability/factories.js +11 -1
  39. package/lib/utils/observability/implementations.d.ts +33 -4
  40. package/lib/utils/observability/implementations.js +41 -3
  41. package/lib/utils/observability/index.d.ts +3 -3
  42. package/lib/utils/observability/index.js +2 -2
  43. package/lib/utils/observability/interfaces.d.ts +24 -3
  44. package/lib/utils/tsResIntegration.d.ts +9 -25
  45. package/lib/utils/tsResIntegration.js +10 -88
  46. package/lib/utils/zipLoader/zipProcessingHelpers.d.ts +4 -4
  47. package/lib/utils/zipLoader/zipProcessingHelpers.js +4 -12
  48. package/package.json +8 -7
  49. package/lib/utils/fileProcessing.d.ts +0 -22
  50. 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 pickerOptionsPresentation
492
+ // All view components support pickerOptionsPanelPresentation
460
493
  <ObservabilityProvider observabilityContext={myObservabilityContext}>
461
494
  <SourceView
462
495
  resources={state.processedResources}
463
- pickerOptionsPresentation="collapsible" // Enable picker options UI
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
- pickerOptionsPresentation="collapsible" // Shows both picker & context gear icons
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
- pickerOptionsPresentation="collapsible" // Shows both picker & context gear icons
1181
+ pickerOptionsPanelPresentation="collapsible" // Shows both picker & context gear icons
1149
1182
  filterState={filterState}
1150
1183
  filterActions={filterActions}
1151
1184
  />