@fgv/ts-res-ui-components 5.1.0-2 → 5.1.0-21
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/lib/components/common/AppHeader.d.ts.map +1 -0
- package/lib/components/common/AppHeader.js.map +1 -0
- package/lib/components/common/AppLayout.d.ts.map +1 -0
- package/lib/components/common/AppLayout.js.map +1 -0
- package/lib/components/common/AppSidebar.d.ts.map +1 -0
- package/lib/components/common/AppSidebar.js.map +1 -0
- package/lib/components/common/NavigationWarningModal.d.ts.map +1 -0
- package/lib/components/common/NavigationWarningModal.js.map +1 -0
- package/lib/components/common/QualifierContextControl.d.ts.map +1 -0
- package/lib/components/common/QualifierContextControl.js.map +1 -0
- package/lib/components/common/ResolutionContextOptionsControl.d.ts.map +1 -0
- package/lib/components/common/ResolutionContextOptionsControl.js.map +1 -0
- package/lib/components/common/ResolutionResults/index.d.ts.map +1 -0
- package/lib/components/common/ResolutionResults/index.js.map +1 -0
- package/lib/components/common/ResourceListView.d.ts.map +1 -0
- package/lib/components/common/ResourceListView.js.map +1 -0
- package/lib/components/common/ResourcePickerOptionsControl.d.ts.map +1 -0
- package/lib/components/common/ResourcePickerOptionsControl.js.map +1 -0
- package/lib/components/common/ResourceTreeView.d.ts.map +1 -0
- package/lib/components/common/ResourceTreeView.js.map +1 -0
- package/lib/components/common/SourceResourceDetail/index.d.ts.map +1 -0
- package/lib/components/common/SourceResourceDetail/index.js.map +1 -0
- package/lib/components/forms/GenericQualifierTypeEditForm.d.ts.map +1 -0
- package/lib/components/forms/GenericQualifierTypeEditForm.js.map +1 -0
- package/lib/components/forms/HierarchyEditor.d.ts.map +1 -0
- package/lib/components/forms/HierarchyEditor.js.map +1 -0
- package/lib/components/forms/QualifierEditForm.d.ts.map +1 -0
- package/lib/components/forms/QualifierEditForm.js.map +1 -0
- package/lib/components/forms/QualifierTypeEditForm.d.ts.map +1 -0
- package/lib/components/forms/QualifierTypeEditForm.js.map +1 -0
- package/lib/components/forms/ResourceTypeEditForm.d.ts.map +1 -0
- package/lib/components/forms/ResourceTypeEditForm.js.map +1 -0
- package/lib/components/forms/index.d.ts.map +1 -0
- package/lib/components/forms/index.js.map +1 -0
- package/lib/components/orchestrator/ResourceOrchestrator.d.ts.map +1 -0
- package/lib/components/orchestrator/ResourceOrchestrator.js.map +1 -0
- package/lib/components/pickers/ResourcePicker/ResourceItem.d.ts.map +1 -0
- package/lib/components/pickers/ResourcePicker/ResourceItem.js.map +1 -0
- package/lib/components/pickers/ResourcePicker/ResourcePickerList.d.ts.map +1 -0
- package/lib/components/pickers/ResourcePicker/ResourcePickerList.js.map +1 -0
- package/lib/components/pickers/ResourcePicker/ResourcePickerTree.d.ts.map +1 -0
- package/lib/components/pickers/ResourcePicker/ResourcePickerTree.js.map +1 -0
- package/lib/components/pickers/ResourcePicker/index.d.ts.map +1 -0
- package/lib/components/pickers/ResourcePicker/index.js.map +1 -0
- package/lib/components/pickers/ResourcePicker/types.d.ts.map +1 -0
- package/lib/components/pickers/ResourcePicker/types.js.map +1 -0
- package/lib/components/pickers/ResourcePicker/utils/treeNavigation.d.ts.map +1 -0
- package/lib/components/pickers/ResourcePicker/utils/treeNavigation.js.map +1 -0
- package/lib/components/views/CompiledView/index.d.ts.map +1 -0
- package/lib/components/views/CompiledView/index.js.map +1 -0
- package/lib/components/views/ConfigurationView/index.d.ts.map +1 -0
- package/lib/components/views/ConfigurationView/index.js.map +1 -0
- package/lib/components/views/FilterView/index.d.ts.map +1 -0
- package/lib/components/views/FilterView/index.js.map +1 -0
- package/lib/components/views/GridView/EditableGridCell.d.ts.map +1 -0
- package/lib/components/views/GridView/EditableGridCell.js.map +1 -0
- package/lib/components/views/GridView/GridSelector.d.ts.map +1 -0
- package/lib/components/views/GridView/GridSelector.js.map +1 -0
- package/lib/components/views/GridView/MultiGridView.d.ts.map +1 -0
- package/lib/components/views/GridView/MultiGridView.js.map +1 -0
- package/lib/components/views/GridView/ResourceGrid.d.ts.map +1 -0
- package/lib/components/views/GridView/ResourceGrid.js.map +1 -0
- package/lib/components/views/GridView/SharedContextControls.d.ts.map +1 -0
- package/lib/components/views/GridView/SharedContextControls.js.map +1 -0
- package/lib/components/views/GridView/cells/BooleanCell.d.ts.map +1 -0
- package/lib/components/views/GridView/cells/BooleanCell.js.map +1 -0
- package/lib/components/views/GridView/cells/DropdownCell.d.ts.map +1 -0
- package/lib/components/views/GridView/cells/DropdownCell.js.map +1 -0
- package/lib/components/views/GridView/cells/StringCell.d.ts.map +1 -0
- package/lib/components/views/GridView/cells/StringCell.js.map +1 -0
- package/lib/components/views/GridView/cells/TriStateCell.d.ts.map +1 -0
- package/lib/components/views/GridView/cells/TriStateCell.js.map +1 -0
- package/lib/components/views/GridView/cells/index.d.ts.map +1 -0
- package/lib/components/views/GridView/cells/index.js.map +1 -0
- package/lib/components/views/GridView/index.d.ts.map +1 -0
- package/lib/components/views/GridView/index.js.map +1 -0
- package/lib/components/views/ImportView/index.d.ts.map +1 -0
- package/lib/components/views/ImportView/index.js.map +1 -0
- package/lib/components/views/MessagesWindow/index.d.ts.map +1 -0
- package/lib/components/views/MessagesWindow/index.js.map +1 -0
- package/lib/components/views/ResolutionView/EditableJsonView.d.ts.map +1 -0
- package/lib/components/views/ResolutionView/EditableJsonView.js.map +1 -0
- package/lib/components/views/ResolutionView/NewResourceModal.d.ts.map +1 -0
- package/lib/components/views/ResolutionView/NewResourceModal.js.map +1 -0
- package/lib/components/views/ResolutionView/UnifiedChangeControls.d.ts.map +1 -0
- package/lib/components/views/ResolutionView/UnifiedChangeControls.js.map +1 -0
- package/lib/components/views/ResolutionView/index.d.ts.map +1 -0
- package/lib/components/views/ResolutionView/index.js.map +1 -0
- package/lib/components/views/SourceView/index.d.ts.map +1 -0
- package/lib/components/views/SourceView/index.js.map +1 -0
- package/lib/contexts/ObservabilityContext.d.ts.map +1 -0
- package/lib/contexts/ObservabilityContext.js.map +1 -0
- package/lib/contexts/index.d.ts.map +1 -0
- package/lib/contexts/index.js.map +1 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/useConfigurationState.d.ts.map +1 -0
- package/lib/hooks/useConfigurationState.js.map +1 -0
- package/lib/hooks/useFilterState.d.ts.map +1 -0
- package/lib/hooks/useFilterState.js.map +1 -0
- package/lib/hooks/useNavigationWarning.d.ts.map +1 -0
- package/lib/hooks/useNavigationWarning.js.map +1 -0
- package/lib/hooks/useResolutionState.d.ts.map +1 -0
- package/lib/hooks/useResolutionState.js.map +1 -0
- package/lib/hooks/useResourceData.d.ts.map +1 -0
- package/lib/hooks/useResourceData.js.map +1 -0
- package/lib/hooks/useSmartObservability.d.ts.map +1 -0
- package/lib/hooks/useSmartObservability.js.map +1 -0
- package/lib/hooks/useUrlParams.d.ts.map +1 -0
- package/lib/hooks/useUrlParams.js.map +1 -0
- package/lib/hooks/useViewState.d.ts.map +1 -0
- package/lib/hooks/useViewState.js.map +1 -0
- package/lib/index.browser.d.ts.map +1 -0
- package/lib/index.browser.js.map +1 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js.map +1 -0
- package/lib/namespaces/ConfigurationTools.d.ts.map +1 -0
- package/lib/namespaces/ConfigurationTools.js.map +1 -0
- package/lib/namespaces/DownloadTools.d.ts.map +1 -0
- package/lib/namespaces/DownloadTools.js.map +1 -0
- package/lib/namespaces/FilterTools.d.ts.map +1 -0
- package/lib/namespaces/FilterTools.js.map +1 -0
- package/lib/namespaces/GridTools.d.ts.map +1 -0
- package/lib/namespaces/GridTools.js.map +1 -0
- package/lib/namespaces/ImportTools.d.ts.map +1 -0
- package/lib/namespaces/ImportTools.js.map +1 -0
- package/lib/namespaces/ObservabilityTools.d.ts.map +1 -0
- package/lib/namespaces/ObservabilityTools.js.map +1 -0
- package/lib/namespaces/PickerTools.d.ts.map +1 -0
- package/lib/namespaces/PickerTools.js.map +1 -0
- package/lib/namespaces/ResolutionTools.d.ts.map +1 -0
- package/lib/namespaces/ResolutionTools.js.map +1 -0
- package/lib/namespaces/ResourceTools.d.ts.map +1 -0
- package/lib/namespaces/ResourceTools.js.map +1 -0
- package/lib/namespaces/TsResTools.d.ts.map +1 -0
- package/lib/namespaces/TsResTools.js.map +1 -0
- package/lib/namespaces/ViewStateTools.d.ts.map +1 -0
- package/lib/namespaces/ViewStateTools.js.map +1 -0
- package/lib/namespaces/ZipTools.d.ts.map +1 -0
- package/lib/namespaces/ZipTools.js.map +1 -0
- package/lib/namespaces/index.d.ts.map +1 -0
- package/lib/namespaces/index.js.map +1 -0
- package/lib/tsdoc-metadata.json +1 -1
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js.map +1 -0
- package/lib/utils/cellValidation.d.ts.map +1 -0
- package/lib/utils/cellValidation.js.map +1 -0
- package/lib/utils/configurationUtils.d.ts.map +1 -0
- package/lib/utils/configurationUtils.js.map +1 -0
- package/lib/utils/downloadHelper.d.ts.map +1 -0
- package/lib/utils/downloadHelper.js.map +1 -0
- package/lib/utils/filterResources.d.ts.map +1 -0
- package/lib/utils/filterResources.js.map +1 -0
- package/lib/utils/observability/factories.d.ts.map +1 -0
- package/lib/utils/observability/factories.js.map +1 -0
- package/lib/utils/observability/implementations.d.ts.map +1 -0
- package/lib/utils/observability/implementations.js.map +1 -0
- package/lib/utils/observability/index.d.ts.map +1 -0
- package/lib/utils/observability/index.js.map +1 -0
- package/lib/utils/observability/interfaces.d.ts.map +1 -0
- package/lib/utils/observability/interfaces.js.map +1 -0
- package/lib/utils/resolutionEditing.d.ts.map +1 -0
- package/lib/utils/resolutionEditing.js.map +1 -0
- package/lib/utils/resolutionUtils.d.ts.map +1 -0
- package/lib/utils/resolutionUtils.js.map +1 -0
- package/lib/utils/resourceSelector.d.ts.map +1 -0
- package/lib/utils/resourceSelector.js.map +1 -0
- package/lib/utils/resourceSelectors.d.ts.map +1 -0
- package/lib/utils/resourceSelectors.js.map +1 -0
- package/lib/utils/tsResIntegration.d.ts.map +1 -0
- package/lib/utils/tsResIntegration.js.map +1 -0
- package/lib/utils/zipLoader/index.d.ts.map +1 -0
- package/lib/utils/zipLoader/index.js.map +1 -0
- package/lib/utils/zipLoader/zipProcessingHelpers.d.ts.map +1 -0
- package/lib/utils/zipLoader/zipProcessingHelpers.js.map +1 -0
- package/lib/utils/zipLoader/zipUtils.d.ts.map +1 -0
- package/lib/utils/zipLoader/zipUtils.js.map +1 -0
- package/package.json +25 -23
- package/dist/ts-res-ui-components.d.ts +0 -6795
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/pickers/ResourcePicker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAElG;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,OAAO;IAC7C,+DAA+D;IAC/D,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,sDAAsD;IACtD,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,mDAAmD;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sDAAsD;IACtD,WAAW,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;CAC9C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,sBAAsB;IACrC,kCAAkC;IAClC,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,wDAAwD;IACxD,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,+BAA+B;IAC/B,qFAAqF;IACrF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,qBAAqB;IACrB,yCAAyC;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,4CA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MAAM,WAAW,wBAAwB,CAAC,CAAC,GAAG,OAAO;IACnD,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;IACzC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,gBAAgB,EAAE,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC7D,mBAAmB,CAAC,EAAE,oBAAoB,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC,GAAG,OAAO;IACnD,SAAS,EAAE,mBAAmB,GAAG,2BAA2B,CAAC;IAC7D,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;IACzC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,gBAAgB,EAAE,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC7D,mBAAmB,CAAC,EAAE,oBAAoB,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/pickers/ResourcePicker/types.ts"],"names":[],"mappings":"","sourcesContent":["import React from 'react';\nimport { IProcessedResources, IExtendedProcessedResources, IViewBaseProps } from '../../../types';\n\n/**\n * Resource selection data returned by the onResourceSelect callback.\n *\n * This interface provides comprehensive information about the selected resource,\n * eliminating the need for consumers to perform additional lookups.\n *\n * @example\n * ```tsx\n * const handleResourceSelect = (selection: IResourceSelection<MyResourceType>) => {\n * if (selection.resourceId) {\n * console.log('Selected:', selection.resourceId);\n * if (selection.resourceData) {\n * console.log('Data:', selection.resourceData);\n * }\n * if (selection.isPending) {\n * console.log('Pending operation:', selection.pendingType);\n * }\n * }\n * };\n * ```\n *\n * @public\n */\nexport interface IResourceSelection<T = unknown> {\n /** The ID of the selected resource, or null if no selection */\n resourceId: string | null;\n /** The actual resource data if available and typed */\n resourceData?: T;\n /** Whether this is a pending (unsaved) resource */\n isPending?: boolean;\n /** Type of pending operation for unsaved resources */\n pendingType?: 'new' | 'modified' | 'deleted';\n}\n\n/**\n * UI behavior configuration options for ResourcePicker.\n *\n * This interface groups all UI-related options that control how the ResourcePicker\n * behaves and appears, separate from functional data like annotations and pending resources.\n *\n * @example\n * ```tsx\n * const pickerOptions: IResourcePickerOptions = {\n * defaultView: 'tree',\n * enableSearch: true,\n * searchPlaceholder: 'Find resources...',\n * rootPath: 'user.messages',\n * hideRootNode: true,\n * height: '400px'\n * };\n * ```\n *\n * @public\n */\nexport interface IResourcePickerOptions {\n /** View and navigation options */\n /** Default view mode to use on initial render */\n defaultView?: 'list' | 'tree';\n /** Whether to show the list/tree view toggle buttons */\n showViewToggle?: boolean;\n\n /** Branch isolation options */\n /** Path to treat as root for tree branch isolation (e.g., \"platform/territories\") */\n rootPath?: string;\n /** Hide the root node itself, showing only its children */\n hideRootNode?: boolean;\n\n /** Search options */\n /** Whether to enable the search input */\n enableSearch?: boolean;\n /** Placeholder text for the search input */\n searchPlaceholder?: string;\n /** Scope of search - entire tree or just the currently visible branch */\n searchScope?: 'all' | 'current-branch';\n\n /** Appearance options */\n /** Message to display when no resources are available */\n emptyMessage?: string;\n /** Height of the picker component */\n height?: string | number;\n}\n\n/**\n * Props for the ResourcePicker component.\n *\n * The ResourcePicker is a comprehensive component for browsing and selecting resources\n * with support for multiple view modes, search, annotations, and pending resources.\n * UI behavior is controlled through the options object, while functional data is\n * passed as separate props.\n *\n * @example\n * ```tsx\n * <ResourcePicker\n * resources={processedResources}\n * selectedResourceId={currentId}\n * onResourceSelect={(selection) => {\n * setCurrentId(selection.resourceId);\n * if (selection.resourceData) {\n * // Use the resource data directly\n * handleResourceData(selection.resourceData);\n * }\n * }}\n * resourceAnnotations={{\n * 'res1': { badge: { text: '3', variant: 'info' } }\n * }}\n * options={{\n * defaultView: 'tree',\n * enableSearch: true,\n * searchPlaceholder: 'Find resources...',\n * height: '400px'\n * }}\n * />\n * ```\n *\n * @public\n */\nexport interface IResourcePickerProps<T = unknown> extends IViewBaseProps {\n /** Core functionality */\n /** Processed resources to display in the picker */\n resources: IProcessedResources | IExtendedProcessedResources | null;\n /** Currently selected resource ID */\n selectedResourceId: string | null;\n /** Callback fired when a resource is selected, providing comprehensive selection data */\n onResourceSelect: (selection: IResourceSelection<T>) => void;\n\n /** Functional data */\n /** Annotations to display next to resource names (badges, indicators, etc.) */\n resourceAnnotations?: IResourceAnnotations;\n /** Pending (unsaved) resources to display alongside persisted resources */\n pendingResources?: IPendingResource<T>[];\n\n /** UI behavior configuration */\n /** Options controlling picker appearance and behavior */\n options?: IResourcePickerOptions;\n}\n\n/**\n * Annotations that can be displayed next to resource names in the picker.\n *\n * This allows the host application to provide visual indicators for resources,\n * such as candidate counts, editing status, or validation states.\n *\n * @example\n * ```tsx\n * const annotations: IResourceAnnotations = {\n * 'user.welcome': {\n * badge: { text: '3', variant: 'info' },\n * suffix: '(3 candidates)'\n * },\n * 'user.modified': {\n * badge: { text: 'M', variant: 'edited' },\n * indicator: { type: 'dot', value: 'orange', tooltip: 'Modified' }\n * }\n * };\n * ```\n *\n * @public\n */\nexport interface IResourceAnnotations {\n /** Map of resource IDs to their annotation configurations */\n [resourceId: string]: IResourceAnnotation;\n}\n\n/**\n * Individual resource annotation configuration.\n *\n * Supports multiple types of visual indicators that can be combined:\n * - Badge: Small colored badge with text\n * - Indicator: Dot, icon, or text indicator with optional tooltip\n * - Suffix: Additional content displayed after the resource name\n *\n * @example\n * ```tsx\n * const annotation: IResourceAnnotation = {\n * badge: { text: 'NEW', variant: 'new' },\n * indicator: {\n * type: 'icon',\n * value: <CheckIcon />,\n * tooltip: 'Validated'\n * },\n * suffix: <span className=\"text-gray-500\">(5 candidates)</span>,\n * className: 'resource-highlighted'\n * };\n * ```\n *\n * @public\n */\nexport interface IResourceAnnotation {\n /** Small colored badge displayed next to the resource name */\n badge?: {\n /** Text content of the badge */\n text: string;\n /** Visual style variant for the badge */\n variant: 'info' | 'warning' | 'success' | 'error' | 'edited' | 'new';\n };\n /** Visual indicator (dot, icon, or text) with optional tooltip */\n indicator?: {\n /** Type of indicator to display */\n type: 'dot' | 'icon' | 'text';\n /** Content of the indicator (color for dot, React element for icon, string for text) */\n value: string | React.ReactNode;\n /** Optional tooltip text shown on hover */\n tooltip?: string;\n };\n /** Additional content displayed after the resource name (e.g., candidate counts) */\n suffix?: React.ReactNode;\n /** Additional CSS class names to apply to the resource item */\n className?: string;\n}\n\n/**\n * Represents a resource that hasn't been persisted yet.\n *\n * Pending resources are displayed alongside persisted resources in the picker,\n * allowing users to interact with unsaved changes. They are visually distinguished\n * with appropriate styling and annotations.\n *\n * @example\n * ```tsx\n * const pendingResources: IPendingResource<MyResourceType>[] = [\n * {\n * id: 'user.new-welcome',\n * type: 'new',\n * resourceType: 'string',\n * displayName: 'Welcome Message (New)',\n * resourceData: { text: 'Welcome!', locale: 'en' }\n * },\n * {\n * id: 'user.existing-modified',\n * type: 'modified',\n * displayName: 'User Profile (Modified)',\n * resourceData: { name: 'Updated Name' }\n * }\n * ];\n * ```\n *\n * @public\n */\nexport interface IPendingResource<T = unknown> {\n /** Unique identifier for the pending resource */\n id: string;\n /** Type of pending operation */\n type: 'new' | 'modified' | 'deleted';\n /** Optional resource type identifier */\n resourceType?: string;\n /** Display name for the resource in the picker */\n displayName?: string;\n /** The actual resource data with type safety */\n resourceData?: T;\n}\n\n/**\n * Props for individual resource items\n */\nexport interface IResourceItemProps<T = unknown> {\n resourceId: string;\n displayName?: string;\n isSelected: boolean;\n isPending?: boolean;\n annotation?: IResourceAnnotation;\n onClick: (selection: IResourceSelection<T>) => void;\n searchTerm?: string;\n className?: string;\n resourceData?: T; // The actual resource data if available\n pendingType?: 'new' | 'modified' | 'deleted'; // Type of pending operation\n}\n\n/**\n * Props for the list view component\n */\nexport interface IResourcePickerListProps<T = unknown> {\n resourceIds: string[];\n pendingResources?: IPendingResource<T>[];\n selectedResourceId: string | null;\n onResourceSelect: (selection: IResourceSelection<T>) => void;\n resourceAnnotations?: IResourceAnnotations;\n searchTerm?: string;\n rootPath?: string;\n hideRootNode?: boolean;\n className?: string;\n emptyMessage?: string;\n}\n\n/**\n * Props for the tree view component\n */\nexport interface IResourcePickerTreeProps<T = unknown> {\n resources: IProcessedResources | IExtendedProcessedResources;\n pendingResources?: IPendingResource<T>[];\n selectedResourceId: string | null;\n onResourceSelect: (selection: IResourceSelection<T>) => void;\n resourceAnnotations?: IResourceAnnotations;\n searchTerm?: string;\n rootPath?: string;\n hideRootNode?: boolean;\n className?: string;\n emptyMessage?: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treeNavigation.d.ts","sourceRoot":"","sources":["../../../../../src/components/pickers/ResourcePicker/utils/treeNavigation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAe3G;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAWxG;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,OAAO,GACrB,MAAM,CAMR;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,MAAM,EAAE,EACrB,QAAQ,CAAC,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,OAAO,EACtB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAC1B,SAAS,EAAE,CAmEb;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,CAexD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,EAAE,EACrB,UAAU,EAAE,MAAM,EAClB,WAAW,GAAE,KAAK,GAAG,gBAAwB,EAC7C,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,EAAE,CAcV;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,GAAG,OAAO,EACnD,WAAW,EAAE,MAAM,EAAE,EACrB,gBAAgB,CAAC,EAAE,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC,GAC/F,MAAM,EAAE,CAkBV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treeNavigation.js","sourceRoot":"","sources":["../../../../../src/components/pickers/ResourcePicker/utils/treeNavigation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH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B,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvD,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,+BAA+B;IAC/B,MAAM,gBAAgB,GAAG,WAAW,CAAC,MAAM,CACzC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAC9E,CAAC;IAEF,yFAAyF;IACzF,MAAM,cAAc,GAAG,gBAAgB;SACpC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC,IAAI,KAAK,UAAU,CAAC;SAC3D,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;SAClB,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,mBAAmB;IAEtE,mBAAmB;IACnB,OAAO,CAAC,GAAG,gBAAgB,EAAE,GAAG,cAAc,CAAC,CAAC,IAAI,EAAE,CAAC;AACzD,CAAC","sourcesContent":["/**\n * Utility functions for tree navigation and branch isolation\n */\n\n/**\n * Filters resources to show only those under a specific path\n */\nexport function filterTreeBranch(resourceIds: string[], rootPath?: string, hideRootNode?: boolean): string[] {\n if (!rootPath) {\n return resourceIds;\n }\n\n const filtered = resourceIds.filter((id) => {\n if (hideRootNode) {\n // Show children of the root path, but not the root itself\n return id.startsWith(rootPath + '.') && id !== rootPath;\n }\n // Show the root path and all its children\n return id === rootPath || id.startsWith(rootPath + '.');\n });\n\n return filtered;\n}\n\n/**\n * Adjusts resource IDs for display when showing an isolated branch\n * This makes the branch appear as if it's the root\n */\nexport function adjustResourcePath(resourceId: string, rootPath?: string, hideRootNode?: boolean): string {\n if (!rootPath || !hideRootNode) {\n return resourceId;\n }\n\n // Remove the root path prefix to make children appear as top-level\n if (resourceId.startsWith(rootPath + '.')) {\n return resourceId.substring(rootPath.length + 1);\n }\n\n return resourceId;\n}\n\n/**\n * Gets the display name for a resource, handling path adjustments\n */\nexport function getResourceDisplayName(\n resourceId: string,\n rootPath?: string,\n hideRootNode?: boolean\n): string {\n const adjustedPath = adjustResourcePath(resourceId, rootPath, hideRootNode);\n\n // Extract just the last segment for display\n const segments = adjustedPath.split('/');\n return segments[segments.length - 1] || adjustedPath;\n}\n\n/**\n * Builds a tree structure from flat resource IDs\n */\nexport interface ITreeNode {\n id: string;\n displayName: string;\n children: ITreeNode[];\n isExpanded?: boolean;\n isPending?: boolean;\n}\n\nexport function buildResourceTree(\n resourceIds: string[],\n rootPath?: string,\n hideRootNode?: boolean,\n expandedNodes?: Set<string>\n): ITreeNode[] {\n const tree: ITreeNode[] = [];\n const nodeMap = new Map<string, ITreeNode>();\n\n // Filter resources based on root path\n const filteredIds = filterTreeBranch(resourceIds, rootPath, hideRootNode);\n\n // Sort IDs to ensure parents come before children\n const sortedIds = [...filteredIds].sort();\n\n // Convert dot notation to slash notation for tree building\n const convertedIds = sortedIds.map((id) => id.replace(/\\./g, '/'));\n\n // Check for conflicts where a converted ID would be both a parent and leaf\n const conflicts = new Set<string>();\n for (const convertedId of convertedIds) {\n const hasChildren = convertedIds.some(\n (otherId) => otherId !== convertedId && otherId.startsWith(convertedId + '/')\n );\n if (hasChildren && convertedIds.includes(convertedId)) {\n conflicts.add(convertedId);\n }\n }\n\n if (conflicts.size > 0) {\n throw new Error(`${Array.from(conflicts)[0]}: Duplicate resource at path.`);\n }\n\n // Build tree with converted IDs but keep original IDs for node references\n for (let i = 0; i < sortedIds.length; i++) {\n const originalId = sortedIds[i];\n const convertedId = convertedIds[i];\n const segments = convertedId.split('/');\n const adjustedId = adjustResourcePath(convertedId, rootPath, hideRootNode);\n const adjustedSegments = adjustedId.split('/');\n\n const node: ITreeNode = {\n id: originalId, // Keep original ID\n displayName: segments[segments.length - 1],\n children: [],\n isExpanded: expandedNodes?.has(originalId)\n };\n\n nodeMap.set(originalId, node);\n\n if (adjustedSegments.length === 1) {\n // Top-level node in the adjusted tree\n tree.push(node);\n } else {\n // Find parent node using converted path logic\n const parentSegments = segments.slice(0, -1);\n const parentConvertedId = parentSegments.join('/');\n\n // Find the original ID that corresponds to this parent path\n const parentOriginalIndex = convertedIds.indexOf(parentConvertedId);\n if (parentOriginalIndex >= 0) {\n const parentOriginalId = sortedIds[parentOriginalIndex];\n const parentNode = nodeMap.get(parentOriginalId);\n\n if (parentNode) {\n parentNode.children.push(node);\n }\n }\n }\n }\n\n return tree;\n}\n\n/**\n * Flattens a tree structure back to a list of IDs\n */\nexport function flattenTree(nodes: ITreeNode[]): string[] {\n const result: string[] = [];\n\n function traverse(node: ITreeNode): void {\n result.push(node.id);\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n for (const node of nodes) {\n traverse(node);\n }\n\n return result;\n}\n\n/**\n * Searches for resources matching a search term\n */\nexport function searchResources(\n resourceIds: string[],\n searchTerm: string,\n searchScope: 'all' | 'current-branch' = 'all',\n rootPath?: string\n): string[] {\n if (!searchTerm) {\n return resourceIds;\n }\n\n const term = searchTerm.toLowerCase();\n let searchableIds = resourceIds;\n\n // If searching only current branch, filter first\n if (searchScope === 'current-branch' && rootPath) {\n searchableIds = filterTreeBranch(resourceIds, rootPath, false);\n }\n\n return searchableIds.filter((id) => id.toLowerCase().includes(term));\n}\n\n/**\n * Merges pending resources with existing resources\n */\nexport function mergeWithPendingResources<T = unknown>(\n existingIds: string[],\n pendingResources?: Array<{ id: string; type: 'new' | 'modified' | 'deleted'; resourceData?: T }>\n): string[] {\n if (!pendingResources || pendingResources.length === 0) {\n return existingIds;\n }\n\n // Filter out deleted resources\n const filteredExisting = existingIds.filter(\n (id) => !pendingResources.some((pr) => pr.id === id && pr.type === 'deleted')\n );\n\n // Add new and modified resources (modified resources might not exist in existingIds yet)\n const newResourceIds = pendingResources\n .filter((pr) => pr.type === 'new' || pr.type === 'modified')\n .map((pr) => pr.id)\n .filter((id) => !filteredExisting.includes(id)); // Avoid duplicates\n\n // Combine and sort\n return [...filteredExisting, ...newResourceIds].sort();\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/views/CompiledView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAC;AAavF,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAA6B,MAAM,aAAa,CAAC;AAyOtE,UAAU,6BAA6B;IACrC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,iBAAiB,CAAC;CACnD;AAED,UAAU,uBAAuB;IAC/B,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;CAChE;AAED,UAAU,2BAA2B;IACnC,IAAI,EAAE,iBAAiB,CAAC;IACxB,KAAK,EAAE,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;CACpE;AAED,UAAU,0BAA0B;IAClC,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;CACnE;AAED,UAAU,uBAAuB;IAC/B,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;CAChE;AAED,UAAU,0BAA0B;IAClC,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;CACnE;AAED,UAAU,sBAAsB;IAC9B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;CACvE;AAED,UAAU,4BAA4B;IACpC,IAAI,EAAE,kBAAkB,CAAC;IACzB,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACjC;AAED,MAAM,MAAM,YAAY,GACpB,6BAA6B,GAC7B,uBAAuB,GACvB,2BAA2B,GAC3B,0BAA0B,GAC1B,uBAAuB,GACvB,0BAA0B,GAC1B,sBAAsB,GACtB,4BAA4B,CAAC;AAUjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8lBrD,CAAC;AAqiBF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/views/CompiledView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAC;AACvF,OAAO,EACL,QAAQ,EACR,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,cAAc,EACf,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAgB,MAAM,EAAE,MAAM,EAAa,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAM9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,+EAA+E;AAC/E,SAAS,YAAY,CAAC,IAAe,EAAE,EAAU;IAC/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SAAS,CAC3B;wCACP,8BAAM,SAAS,EAAC,yBAAyB,IAAE,SAAS,CAAC,KAAK,CAAQ;wCAClE,8BAAM,SAAS,EAAC,+BAA+B;;4CAClC,SAAS,CAAC,QAAQ,IAAI,CAAC;4CACjC,SAAS,CAAC,cAAc,KAAK,SAAS,IAAI,CACzC,8BAAM,SAAS,EAAC,MAAM;;gDAAW,SAAS,CAAC,cAAc,CAAQ,CAClE,CACI,CACH,CACP,CAAC;gCACJ,CAAC,CAAC,CACE,CACF,CACP;4BAEA,CAAC,CAAC,YAAY;gCACb,CAAC,YAAY,CAAC,UAAU;gCACxB,YAAY,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,IAAI,CACzC,6BAAK,SAAS,EAAC,eAAe;gCAC5B,8BAAM,SAAS,EAAC,qDAAqD,wCAE9D,CACH,CACP,CACG,CACP,CAAC;oBACJ,CAAC,CACF,CACC,CACF,CACF,CACP,CACG,CACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,YAAY,CAAC","sourcesContent":["import React, { useState, useMemo, useCallback, useEffect, ReactElement } from 'react';\nimport {\n CubeIcon,\n FolderIcon,\n FolderOpenIcon,\n DocumentTextIcon,\n ChevronRightIcon,\n ChevronDownIcon,\n DocumentArrowDownIcon,\n CodeBracketIcon,\n ChevronUpIcon,\n ArchiveBoxIcon\n} from '@heroicons/react/24/outline';\nimport { ICompiledViewProps, JsonValue } from '../../../types';\nimport { ResourceJson, Config, Bundle, Resources } from '@fgv/ts-res';\nimport { Hash } from '@fgv/ts-utils';\nimport { ResourcePicker } from '../../pickers/ResourcePicker';\nimport {\n IResourceSelection,\n IResourceAnnotations,\n IResourcePickerOptions\n} from '../../pickers/ResourcePicker/types';\nimport { ResourcePickerOptionsControl } from '../../common/ResourcePickerOptionsControl';\nimport { useSmartObservability } from '../../../hooks/useSmartObservability';\n\n// Helper function to find node by ID - using function declaration for hoisting\nfunction findNodeById(tree: ITreeNode, id: string): ITreeNode | null {\n if (tree.id === id) return tree;\n if (tree.children) {\n for (const child of tree.children) {\n const found = findNodeById(child, id);\n if (found) return found;\n }\n }\n return null;\n}\n\n// Helper functions for compiled object display - using function declarations\nfunction getCompiledItemDisplayName(\n data: TreeNodeData,\n index: number,\n activeCompiledCollection: ResourceJson.Compiled.ICompiledResourceCollection | null | undefined\n): string {\n switch (data.type) {\n case 'qualifiers':\n return `${index}: ${data.items[index].name}`;\n case 'qualifier-types':\n return `${index}: ${data.items[index].name}`;\n case 'resource-types':\n return `${index}: ${data.items[index].name}`;\n case 'conditions':\n const qualifier = activeCompiledCollection?.qualifiers?.[data.items[index].qualifierIndex];\n return `${index}: ${qualifier?.name || `Q${data.items[index].qualifierIndex}`} ${String(\n data.items[index].operator || 'matches'\n )} \"${data.items[index].value}\"`;\n case 'condition-sets':\n return `${index}: ${\n data.items[index].conditions.length === 0 || !data.items[index].conditions\n ? 'Unconditional'\n : `${data.items[index].conditions?.length || 0} conditions`\n }`;\n case 'decisions':\n return `${index}: Decision with ${data.items[index].conditionSets.length} condition sets`;\n case 'candidate-values':\n try {\n const normalizer = new Hash.Crc32Normalizer();\n const hashResult = normalizer.computeHash(data.items[index]);\n const jsonStr = JSON.stringify(data.items[index]);\n if (hashResult.isSuccess()) {\n return `${index}: ${typeof data.items[index]}, ${jsonStr.length} chars (CRC32: ${String(\n hashResult.value\n )})`;\n } else {\n return `${index}: ${typeof data.items[index]}, ${jsonStr.length} chars`;\n }\n } catch (error) {\n return `${index}: ${typeof data.items[index]}, size unknown`;\n }\n default:\n return `${index}: Item ${index}`;\n }\n}\n\nfunction getCompiledItemDisplayKey(data: TreeNodeData, index: number): string {\n switch (data.type) {\n case 'qualifiers':\n return `type: ${String(data.items[index].type || 'N/A')}, defaultPriority: ${\n data.items[index].defaultPriority\n }`;\n case 'qualifier-types':\n return `systemType: ${data.items[index].name}`;\n case 'resource-types':\n return `key: ${data.items[index].name}`;\n case 'conditions':\n return `priority: ${data.items[index].priority}`;\n case 'condition-sets':\n if (!data.items[index].conditions || data.items[index].conditions.length === 0) return 'default';\n return `${data.items[index].conditions.length} condition${\n data.items[index].conditions.length !== 1 ? 's' : ''\n }`;\n case 'decisions':\n return `${data.items[index].conditionSets.length} condition set${\n data.items[index].conditionSets.length !== 1 ? 's' : ''\n }`;\n case 'candidate-values':\n return ''; // All info now in main header\n default:\n return '';\n }\n}\n\nfunction renderCompiledItemDetail(\n data: TreeNodeData,\n index: number,\n activeCompiledCollection: ResourceJson.Compiled.ICompiledResourceCollection | null | undefined\n): ReactElement {\n switch (data.type) {\n case 'qualifiers':\n const qualifierType = activeCompiledCollection?.qualifierTypes?.[data.items[index].type];\n return (\n <div className=\"space-y-2\">\n <div>\n <span className=\"font-medium\">Name:</span> {data.items[index].name}\n </div>\n <div>\n <span className=\"font-medium\">Type Index:</span> {data.items[index].type}\n {qualifierType && <span className=\"ml-2 text-gray-600\">({qualifierType.name || 'unnamed'})</span>}\n </div>\n <div>\n <span className=\"font-medium\">Default Priority:</span> {data.items[index].defaultPriority}\n </div>\n </div>\n );\n case 'qualifier-types':\n return (\n <div className=\"space-y-2\">\n <div>\n <span className=\"font-medium\">Name:</span> {data.items[index].name}\n </div>\n <div>\n <span className=\"font-medium\">System Type:</span> {data.items[index].name}\n </div>\n </div>\n );\n case 'resource-types':\n return (\n <div className=\"space-y-2\">\n <div>\n <span className=\"font-medium\">Name:</span> {data.items[index].name}\n </div>\n </div>\n );\n case 'conditions':\n const qualifier = activeCompiledCollection?.qualifiers?.[data.items[index].qualifierIndex];\n return (\n <div className=\"space-y-2\">\n <div>\n <span className=\"font-medium\">Qualifier Index:</span> {data.items[index].qualifierIndex}\n {qualifier && <span className=\"ml-2 text-gray-600\">({qualifier.name || 'unnamed'})</span>}\n </div>\n <div>\n <span className=\"font-medium\">Operator:</span> {data.items[index].operator}\n </div>\n <div>\n <span className=\"font-medium\">Value:</span> {data.items[index].value}\n </div>\n <div>\n <span className=\"font-medium\">Priority:</span> {data.items[index].priority}\n </div>\n {data.items[index].scoreAsDefault !== undefined && (\n <div>\n <span className=\"font-medium\">Score As Default:</span> {data.items[index].scoreAsDefault}\n </div>\n )}\n </div>\n );\n case 'condition-sets':\n return (\n <div className=\"space-y-2\">\n <div>\n <span className=\"font-medium\">Conditions:</span> {data.items[index].conditions.length}\n </div>\n {\n (data.items[index].conditions &&\n Array.isArray(data.items[index].conditions) &&\n data.items[index].conditions.length > 0 && (\n <div className=\"space-y-1\">\n <div className=\"font-medium text-sm\">Condition Indices:</div>\n {data.items[index].conditions.map((conditionIndex: number, idx: number) => {\n const condition = activeCompiledCollection?.conditions?.[conditionIndex];\n const qualifier = condition\n ? activeCompiledCollection?.qualifiers?.[condition.qualifierIndex]\n : null;\n return (\n <div key={idx} className=\"text-xs bg-blue-50 rounded px-2 py-1\">\n [{conditionIndex}] {qualifier?.name || `Q${condition?.qualifierIndex}`}{' '}\n {condition?.operator || 'matches'} \"{condition?.value || ''}\" (p:\n {condition?.priority || 0})\n </div>\n );\n })}\n </div>\n )) as React.ReactNode\n }\n </div>\n );\n case 'decisions':\n return (\n <div className=\"space-y-2\">\n <div>\n <span className=\"font-medium\">Condition Sets:</span> {data.items[index].conditionSets.length}\n </div>\n {\n (data.items[index].conditionSets &&\n Array.isArray(data.items[index].conditionSets) &&\n data.items[index].conditionSets.length > 0 && (\n <div className=\"space-y-1\">\n <div className=\"font-medium text-sm\">Condition Set Indices:</div>\n <div className=\"flex flex-wrap gap-1\">\n {data.items[index].conditionSets.map((conditionSetIndex: number, idx: number) => (\n <span key={idx} className=\"text-xs bg-green-50 text-green-800 px-2 py-1 rounded\">\n [{conditionSetIndex}]\n </span>\n ))}\n </div>\n </div>\n )) as React.ReactNode\n }\n </div>\n );\n case 'candidate-values':\n return (\n <div className=\"bg-gray-50 rounded p-3\">\n <pre className=\"text-sm font-mono text-gray-800 whitespace-pre-wrap overflow-x-auto max-h-48 overflow-y-auto\">\n {JSON.stringify(data.items[index], null, 2)}\n </pre>\n </div>\n );\n default:\n return (\n <pre className=\"text-xs bg-gray-50 p-2 rounded overflow-x-auto max-h-32 overflow-y-auto\">\n {JSON.stringify(data, null, 2)}\n </pre>\n );\n }\n}\n\ninterface ITreeNodeCompiledResourceData {\n type: 'compiled-resource';\n resource: ResourceJson.Compiled.ICompiledResource;\n}\n\ninterface ITreeNodeQualifiersData {\n type: 'qualifiers';\n items: ReadonlyArray<ResourceJson.Compiled.ICompiledQualifier>;\n}\n\ninterface ITreeNodeQualifierTypesData {\n type: 'qualifier-types';\n items: ReadonlyArray<ResourceJson.Compiled.ICompiledQualifierType>;\n}\n\ninterface ITreeNodeResourceTypesData {\n type: 'resource-types';\n items: ReadonlyArray<ResourceJson.Compiled.ICompiledResourceType>;\n}\n\ninterface ITreeNodeConditionsData {\n type: 'conditions';\n items: ReadonlyArray<ResourceJson.Compiled.ICompiledCondition>;\n}\n\ninterface ITreeNodeConditionSetsData {\n type: 'condition-sets';\n items: ReadonlyArray<ResourceJson.Compiled.ICompiledConditionSet>;\n}\n\ninterface ITreeNodeDecisionsData {\n type: 'decisions';\n items: ReadonlyArray<ResourceJson.Compiled.ICompiledAbstractDecision>;\n}\n\ninterface ITreeNodeCandidateValuesData {\n type: 'candidate-values';\n items: ReadonlyArray<JsonValue>;\n}\n\nexport type TreeNodeData =\n | ITreeNodeCompiledResourceData\n | ITreeNodeQualifiersData\n | ITreeNodeQualifierTypesData\n | ITreeNodeResourceTypesData\n | ITreeNodeConditionsData\n | ITreeNodeConditionSetsData\n | ITreeNodeDecisionsData\n | ITreeNodeCandidateValuesData;\n\ninterface ITreeNode {\n id: string;\n name: string;\n type: 'folder' | 'resource' | 'section';\n children?: ITreeNode[];\n data?: TreeNodeData;\n}\n\n/**\n * CompiledView component for browsing compiled resource collections and metadata.\n *\n * Provides an interface for exploring the compiled resource collection structure,\n * including resources, configuration metadata, qualifiers, and resource types.\n * Supports both filtered and unfiltered views with export functionality.\n *\n * **Key Features:**\n * - **Compiled structure browsing**: Navigate through compiled resource collections\n * - **Metadata exploration**: View system configuration, qualifiers, and resource types\n * - **Filter integration**: Works with filtered resource collections\n * - **Tree-based navigation**: Hierarchical view of resources and metadata\n * - **Export functionality**: Export compiled collections in various formats\n * - **Bundle support**: View and export as ts-res bundles for distribution\n *\n * @example\n * ```tsx\n * import { CompiledView } from '@fgv/ts-res-ui-components';\n *\n * function MyCompiledBrowser() {\n * const handleExport = (format) => {\n * console.log(`Exporting compiled resources as ${format}...`);\n * };\n *\n * return (\n * <CompiledView\n * resources={processedResources}\n * filterState={filterState}\n * filterResult={filterResult}\n * useNormalization={true}\n * onExport={handleExport}\n * />\n * );\n * }\n * ```\n *\n * @public\n */\nexport const CompiledView: React.FC<ICompiledViewProps> = ({\n resources,\n filterState,\n filterResult,\n useNormalization: useNormalizationProp = false,\n onExport,\n pickerOptions,\n pickerOptionsPanelPresentation = 'hidden',\n className = ''\n}) => {\n const o11y = useSmartObservability();\n const [selectedResourceId, setSelectedResourceId] = useState<string | null>(null);\n const [selectedMetadataSection, setSelectedMetadataSection] = useState<string | null>(null);\n const [expandedNodes, setExpandedNodes] = useState<Set<string>>(new Set(['metadata']));\n const [showJsonView, setShowJsonView] = useState(false);\n const [useNormalization, setUseNormalization] = useState(useNormalizationProp);\n\n // State for picker options control\n const [currentPickerOptions, setCurrentPickerOptions] = useState<IResourcePickerOptions>(\n (pickerOptions ?? {}) as IResourcePickerOptions\n );\n const [activeTab, setActiveTab] = useState<'resources' | 'metadata'>('resources');\n\n // Merge picker options with compiled view-specific defaults\n const effectivePickerOptions = useMemo(\n () => ({\n defaultView: 'tree' as const,\n showViewToggle: true,\n enableSearch: true,\n searchPlaceholder: 'Search compiled resources...',\n searchScope: 'all' as const,\n height: '500px',\n emptyMessage: 'No compiled resources available',\n // Override with user-provided options\n ...pickerOptions,\n // Override with current picker options from control\n ...currentPickerOptions\n }),\n [pickerOptions, currentPickerOptions]\n );\n\n // Update normalization default when bundle state changes\n useEffect(() => {\n if (resources?.isLoadedFromBundle && !useNormalization) {\n setUseNormalization(true);\n }\n }, [resources?.isLoadedFromBundle, useNormalization]);\n\n // Use filtered resources when filtering is active and successful\n const isFilteringActive = filterState?.enabled && filterResult?.success === true;\n const activeProcessedResources = isFilteringActive ? filterResult?.processedResources : resources;\n\n // Get the active compiled collection\n const activeCompiledCollection = useMemo(() => {\n return isFilteringActive\n ? filterResult?.processedResources?.compiledCollection\n : resources?.compiledCollection;\n }, [\n isFilteringActive,\n filterResult?.processedResources?.compiledCollection,\n resources?.compiledCollection\n ]);\n\n // Build metadata tree structure for non-resource sections\n const metadataTree = useMemo(() => {\n if (!activeCompiledCollection) {\n return null;\n }\n\n const tree: ITreeNode = {\n id: 'metadata',\n name: 'Compiled Collection Metadata',\n type: 'folder',\n children: []\n };\n\n try {\n // Collectors section - showing from compiled collection\n tree.children!.push({\n id: 'qualifiers',\n name: `Qualifiers (${activeCompiledCollection.qualifiers?.length ?? 0})`,\n type: 'section',\n data: { type: 'qualifiers', items: activeCompiledCollection.qualifiers }\n });\n\n tree.children!.push({\n id: 'qualifier-types',\n name: `Qualifier Types (${activeCompiledCollection.qualifierTypes?.length ?? 0})`,\n type: 'section',\n data: { type: 'qualifier-types', items: activeCompiledCollection.qualifierTypes }\n });\n\n tree.children!.push({\n id: 'resource-types',\n name: `Resource Types (${activeCompiledCollection.resourceTypes?.length ?? 0})`,\n type: 'section',\n data: { type: 'resource-types', items: activeCompiledCollection.resourceTypes }\n });\n\n tree.children!.push({\n id: 'conditions',\n name: `Conditions (${activeCompiledCollection.conditions?.length ?? 0})`,\n type: 'section',\n data: { type: 'conditions', items: activeCompiledCollection.conditions }\n });\n\n tree.children!.push({\n id: 'condition-sets',\n name: `Condition Sets (${activeCompiledCollection.conditionSets?.length ?? 0})`,\n type: 'section',\n data: { type: 'condition-sets', items: activeCompiledCollection.conditionSets }\n });\n\n tree.children!.push({\n id: 'decisions',\n name: `Decisions (${activeCompiledCollection.decisions?.length ?? 0})`,\n type: 'section',\n data: { type: 'decisions', items: activeCompiledCollection.decisions }\n });\n\n tree.children!.push({\n id: 'candidate-values',\n name: `Candidate Values (${activeCompiledCollection.candidateValues?.length ?? 0})`,\n type: 'section',\n data: { type: 'candidate-values', items: activeCompiledCollection.candidateValues }\n });\n } catch (error) {\n o11y.user.info(\n 'error',\n `Error building metadata tree: ${error instanceof Error ? error.message : String(error)}`\n );\n }\n\n return tree;\n }, [activeCompiledCollection, o11y]);\n\n // Create resource annotations for compiled collection metadata\n const resourceAnnotations = useMemo(() => {\n const annotations: IResourceAnnotations = {};\n\n if (activeCompiledCollection?.resources) {\n activeCompiledCollection.resources.forEach((resource) => {\n const resourceId = String(resource.id);\n\n // Get compiled resource metadata\n const decision = activeCompiledCollection.decisions?.[resource.decision];\n const candidateCount = decision?.conditionSets?.length ?? 0;\n const resourceType = activeCompiledCollection.resourceTypes?.[resource.type];\n\n annotations[resourceId] = {\n suffix: `${candidateCount} candidate${candidateCount !== 1 ? 's' : ''}`,\n badge: resourceType\n ? {\n text: resourceType.name ?? 'unknown',\n variant: 'info'\n }\n : undefined\n };\n\n // Add indicator for resources with no candidates\n if (candidateCount === 0) {\n annotations[resourceId].indicator = {\n type: 'icon',\n value: '⚠️',\n tooltip: 'No candidates in compiled resource'\n };\n }\n });\n }\n\n return annotations;\n }, [activeCompiledCollection]);\n\n const handleExportCompiledData = useCallback(async () => {\n if (!activeProcessedResources?.compiledCollection) {\n o11y.user.error('No compiled data available to export');\n return;\n }\n\n let compiledCollection = activeProcessedResources.compiledCollection;\n\n if (useNormalization && resources?.activeConfiguration) {\n const systemConfigResult = Config.SystemConfiguration.create(resources.activeConfiguration);\n if (systemConfigResult.isSuccess()) {\n // Check if we have a ResourceManagerBuilder (which supports normalization)\n if ('getCompiledResourceCollection' in activeProcessedResources.system.resourceManager) {\n const resourceManagerResult = Bundle.BundleNormalizer.normalize(\n activeProcessedResources.system.resourceManager as Resources.ResourceManagerBuilder,\n systemConfigResult.value\n );\n\n if (resourceManagerResult.isSuccess()) {\n const normalizedCompiledResult = resourceManagerResult.value.getCompiledResourceCollection({\n includeMetadata: true\n });\n if (normalizedCompiledResult.isSuccess()) {\n compiledCollection = normalizedCompiledResult.value;\n } else {\n o11y.diag.warn(\n 'Failed to get normalized compiled collection:',\n normalizedCompiledResult.message\n );\n }\n } else {\n o11y.diag.warn('Failed to normalize bundle:', resourceManagerResult.message);\n }\n }\n // For IResourceManager from bundles, the compiled collection is already normalized\n } else {\n o11y.diag.warn(\n 'Failed to create system configuration for normalization:',\n systemConfigResult.message\n );\n }\n }\n\n const compiledData = {\n ...compiledCollection,\n metadata: {\n exportedAt: new Date().toISOString(),\n type: isFilteringActive ? 'ts-res-filtered-compiled-collection' : 'ts-res-compiled-collection',\n normalized: useNormalization,\n ...(resources?.isLoadedFromBundle && { loadedFromBundle: true }),\n ...(isFilteringActive && { filterContext: filterState?.appliedValues })\n }\n };\n\n onExport?.(compiledData, 'json');\n }, [\n activeProcessedResources,\n o11y,\n isFilteringActive,\n filterState?.appliedValues,\n useNormalization,\n resources,\n onExport\n ]);\n\n const handleExportBundle = useCallback(async () => {\n if (!activeProcessedResources?.system?.resourceManager || !resources?.activeConfiguration) {\n o11y.user.error('No resource manager or configuration available to create bundle');\n return;\n }\n\n const systemConfigResult = Config.SystemConfiguration.create(resources.activeConfiguration);\n if (systemConfigResult.isFailure()) {\n o11y.user.error(`Failed to create system configuration: ${systemConfigResult.message}`);\n return;\n }\n\n const systemConfig = systemConfigResult.value;\n\n const bundleParams: Bundle.IBundleCreateParams = {\n version: '1.0.0',\n description: isFilteringActive\n ? 'Bundle exported from ts-res-ui-components (filtered)'\n : 'Bundle exported from ts-res-ui-components',\n normalize: true\n };\n\n // Check if we have a ResourceManagerBuilder (which supports bundle creation)\n if (!('getCompiledResourceCollection' in activeProcessedResources.system.resourceManager)) {\n o11y.user.error('Bundle export is not supported for resources loaded from bundles');\n return;\n }\n\n const bundleResult = Bundle.BundleBuilder.create(\n activeProcessedResources.system.resourceManager as Resources.ResourceManagerBuilder,\n systemConfig,\n bundleParams\n );\n\n if (bundleResult.isFailure()) {\n o11y.user.error(`Failed to create bundle: ${bundleResult.message}`);\n return;\n }\n\n const bundle = bundleResult.value;\n\n const exportBundle = {\n ...bundle,\n exportMetadata: {\n exportedAt: new Date().toISOString(),\n exportedFrom: 'ts-res-ui-components',\n type: isFilteringActive ? 'ts-res-bundle-filtered' : 'ts-res-bundle',\n ...(isFilteringActive && { filterContext: filterState?.appliedValues })\n }\n };\n\n onExport?.(exportBundle, 'bundle');\n }, [\n activeProcessedResources?.system?.resourceManager,\n resources?.activeConfiguration,\n o11y,\n isFilteringActive,\n filterState?.appliedValues,\n onExport\n ]);\n\n // Handle resource selection from ResourcePicker\n const handleResourceSelect = useCallback(\n (selection: IResourceSelection) => {\n setSelectedResourceId(selection.resourceId);\n setSelectedMetadataSection(null); // Clear metadata selection when resource is selected\n setActiveTab('resources');\n if (selection.resourceId) {\n o11y.user.info(`Selected compiled resource: ${selection.resourceId}`);\n }\n },\n [o11y]\n );\n\n // Handle metadata node selection\n const handleMetadataNodeClick = (node: ITreeNode): void => {\n setSelectedMetadataSection(node.id);\n setSelectedResourceId(null); // Clear resource selection when metadata is selected\n setActiveTab('metadata');\n o11y.user.info(`Selected metadata: ${node.name}`);\n\n if (node.type === 'folder' || (node.type === 'section' && node.children)) {\n setExpandedNodes((prev) => {\n const newExpanded = new Set(prev);\n if (newExpanded.has(node.id)) {\n newExpanded.delete(node.id);\n } else {\n newExpanded.add(node.id);\n }\n return newExpanded;\n });\n }\n };\n\n const renderTreeNode = (node: ITreeNode, level = 0): React.ReactNode => {\n const isExpanded = expandedNodes.has(node.id);\n const isSelected = selectedMetadataSection === node.id;\n const hasChildren = node.children && node.children.length > 0;\n\n return (\n <div key={node.id}>\n <div\n className={`flex items-center px-2 py-1 cursor-pointer hover:bg-gray-100 ${\n isSelected ? 'bg-blue-50 border-r-2 border-blue-500' : ''\n }`}\n style={{ paddingLeft: `${8 + level * 16}px` }}\n onClick={() => handleMetadataNodeClick(node)}\n >\n {hasChildren && (\n <div className=\"w-4 h-4 mr-1 flex items-center justify-center\">\n {isExpanded ? (\n <ChevronDownIcon className=\"w-3 h-3 text-gray-500\" />\n ) : (\n <ChevronRightIcon className=\"w-3 h-3 text-gray-500\" />\n )}\n </div>\n )}\n {!hasChildren && <div className=\"w-5 mr-1\" />}\n\n <div className=\"w-4 h-4 mr-2 flex items-center justify-center\">\n {node.type === 'folder' ? (\n isExpanded ? (\n <FolderOpenIcon className=\"w-4 h-4 text-blue-500\" />\n ) : (\n <FolderIcon className=\"w-4 h-4 text-blue-500\" />\n )\n ) : node.type === 'resource' ? (\n <DocumentTextIcon className=\"w-4 h-4 text-green-500\" />\n ) : (\n <CubeIcon className=\"w-4 h-4 text-purple-500\" />\n )}\n </div>\n\n <span className={`text-sm ${isSelected ? 'font-medium text-blue-900' : 'text-gray-700'}`}>\n {node.name}\n </span>\n </div>\n\n {hasChildren && isExpanded && (\n <div>{node.children!.map((child) => renderTreeNode(child, level + 1))}</div>\n )}\n </div>\n );\n };\n\n if (!resources) {\n return (\n <div className={`p-6 ${className}`}>\n <div className=\"flex items-center space-x-3 mb-6\">\n <CubeIcon className=\"h-8 w-8 text-blue-600\" />\n <h2 className=\"text-2xl font-bold text-gray-900\">Compiled Resources</h2>\n </div>\n\n <div className=\"bg-white rounded-lg shadow-sm border border-gray-200 p-8 text-center\">\n <div className=\"max-w-2xl mx-auto\">\n <h3 className=\"text-xl font-semibold text-gray-900 mb-4\">No Compiled Resources</h3>\n <p className=\"text-gray-600 mb-6\">\n Import resources to explore the compiled resource collection.\n </p>\n </div>\n </div>\n </div>\n );\n }\n\n // Get selected metadata node or resource data\n const selectedMetadataNode = selectedMetadataSection\n ? findNodeById(metadataTree!, selectedMetadataSection)\n : null;\n const selectedCompiledResource =\n selectedResourceId && activeCompiledCollection?.resources\n ? activeCompiledCollection.resources.find((r) => String(r.id) === selectedResourceId)\n : null;\n\n return (\n <div className={`p-6 ${className}`}>\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center space-x-3\">\n <CubeIcon className=\"h-8 w-8 text-blue-600\" />\n <h2 className=\"text-2xl font-bold text-gray-900\">Compiled Resources</h2>\n {isFilteringActive && (\n <span className=\"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-purple-100 text-purple-800\">\n Filtered\n </span>\n )}\n </div>\n {activeProcessedResources && (\n <div className=\"flex items-center space-x-2\">\n <button\n onClick={handleExportCompiledData}\n className=\"inline-flex items-center px-3 py-1.5 border border-gray-300 text-xs font-medium rounded text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\"\n >\n <DocumentArrowDownIcon className=\"h-4 w-4 mr-1\" />\n Export JSON\n </button>\n <button\n onClick={handleExportBundle}\n className=\"inline-flex items-center px-3 py-1.5 border border-blue-300 text-xs font-medium rounded text-blue-700 bg-blue-50 hover:bg-blue-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\"\n >\n <ArchiveBoxIcon className=\"h-4 w-4 mr-1\" />\n Export Bundle\n </button>\n </div>\n )}\n </div>\n\n {/* ResourcePicker Options Control */}\n <ResourcePickerOptionsControl\n options={currentPickerOptions}\n onOptionsChange={setCurrentPickerOptions}\n presentation={pickerOptionsPanelPresentation}\n title=\"Compiled View Picker Options\"\n className=\"mb-6\"\n />\n\n {/* Controls Panel */}\n {activeProcessedResources && (\n <div className=\"bg-white rounded-lg shadow-sm border border-gray-200 p-4 mb-6\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center space-x-6\">\n {/* Normalization Toggle */}\n <div className=\"flex items-center space-x-2\">\n {resources?.isLoadedFromBundle ? (\n <ArchiveBoxIcon className=\"h-4 w-4 text-blue-600\" />\n ) : (\n <CubeIcon className=\"h-4 w-4 text-gray-600\" />\n )}\n <label className=\"text-sm font-medium text-gray-700\">Normalize Output:</label>\n <button\n onClick={() => setUseNormalization(!useNormalization)}\n className={`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 ${\n useNormalization ? 'bg-blue-600' : 'bg-gray-300'\n }`}\n >\n <span\n className={`inline-block h-3 w-3 transform rounded-full bg-white transition-transform ${\n useNormalization ? 'translate-x-5' : 'translate-x-1'\n }`}\n />\n </button>\n <span className=\"text-xs text-gray-500\">{useNormalization ? 'ON' : 'OFF'}</span>\n </div>\n\n {/* JSON View Toggle */}\n <button\n onClick={() => setShowJsonView(!showJsonView)}\n className=\"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\"\n >\n <CodeBracketIcon className=\"h-4 w-4 mr-2\" />\n {showJsonView ? 'Hide' : 'Show'} JSON\n {showJsonView ? (\n <ChevronUpIcon className=\"h-4 w-4 ml-2\" />\n ) : (\n <ChevronDownIcon className=\"h-4 w-4 ml-2\" />\n )}\n </button>\n </div>\n </div>\n\n {/* JSON View */}\n {showJsonView && (\n <div className=\"mt-4\">\n <div className=\"bg-gray-50 rounded-lg border border-gray-200 p-4\">\n <pre className=\"text-xs text-gray-800 bg-white p-3 rounded border overflow-x-auto max-h-64 overflow-y-auto\">\n {JSON.stringify(activeProcessedResources.compiledCollection, null, 2)}\n </pre>\n </div>\n </div>\n )}\n </div>\n )}\n\n <div className=\"bg-white rounded-lg shadow-sm border border-gray-200 p-6\">\n {/* Tab Navigation */}\n <div className=\"mb-6\">\n <div className=\"border-b border-gray-200\">\n <nav className=\"-mb-px flex space-x-8\">\n <button\n onClick={() => {\n setActiveTab('resources');\n setSelectedMetadataSection(null);\n }}\n className={`py-2 px-1 border-b-2 font-medium text-sm ${\n activeTab === 'resources'\n ? 'border-blue-500 text-blue-600'\n : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'\n }`}\n >\n <div className=\"flex items-center space-x-2\">\n <DocumentTextIcon className=\"h-4 w-4\" />\n <span>Resources ({activeCompiledCollection?.resources?.length || 0})</span>\n </div>\n </button>\n <button\n onClick={() => {\n setActiveTab('metadata');\n setSelectedResourceId(null);\n }}\n className={`py-2 px-1 border-b-2 font-medium text-sm ${\n activeTab === 'metadata'\n ? 'border-blue-500 text-blue-600'\n : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'\n }`}\n >\n <div className=\"flex items-center space-x-2\">\n <CubeIcon className=\"h-4 w-4\" />\n <span>Collection Metadata</span>\n </div>\n </button>\n </nav>\n </div>\n </div>\n\n <div className=\"flex flex-col lg:flex-row gap-6 h-[600px]\">\n {/* Resources or Metadata Navigation */}\n <div className=\"lg:w-1/2 flex flex-col\">\n {activeTab === 'resources' ? (\n <>\n <div className=\"flex items-center mb-4\">\n <h3 className=\"text-lg font-semibold text-gray-900\">Compiled Resources</h3>\n </div>\n <div className=\"flex-1\">\n <ResourcePicker\n resources={activeProcessedResources || null}\n selectedResourceId={selectedResourceId}\n onResourceSelect={handleResourceSelect}\n resourceAnnotations={resourceAnnotations}\n options={effectivePickerOptions}\n />\n </div>\n </>\n ) : (\n <>\n <h3 className=\"text-lg font-semibold text-gray-900 mb-4\">Collection Metadata</h3>\n <div className=\"flex-1 overflow-y-auto border border-gray-200 rounded-lg bg-gray-50\">\n {metadataTree && renderTreeNode(metadataTree)}\n </div>\n </>\n )}\n </div>\n\n {/* Details Panel */}\n <div className=\"lg:w-1/2 flex flex-col\">\n {activeTab === 'resources' && selectedResourceId ? (\n <CompiledResourceDetail\n resourceId={selectedResourceId}\n compiledResource={selectedCompiledResource}\n activeCompiledCollection={activeCompiledCollection}\n />\n ) : activeTab === 'metadata' && selectedMetadataNode ? (\n <NodeDetail node={selectedMetadataNode} activeCompiledCollection={activeCompiledCollection} />\n ) : (\n <div className=\"flex-1 flex items-center justify-center border border-gray-200 rounded-lg bg-gray-50\">\n <div className=\"text-center\">\n <CubeIcon className=\"h-12 w-12 text-gray-400 mx-auto mb-4\" />\n <p className=\"text-gray-500\">\n {activeTab === 'resources'\n ? 'Select a resource to view details'\n : 'Select a metadata item to view details'}\n </p>\n </div>\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n );\n};\n\n// NodeDetail component with access to compiled collection\ninterface INodeDetailProps {\n node: ITreeNode;\n activeCompiledCollection: ResourceJson.Compiled.ICompiledResourceCollection | null | undefined;\n}\n\nfunction NodeDetail({ node, activeCompiledCollection }: INodeDetailProps): React.ReactElement {\n const [showRawJson, setShowRawJson] = useState(false);\n\n // Function that renders raw JSON data - using function declaration for hoisting\n function renderRawData(): ReactElement {\n return (\n <div className=\"bg-white rounded-lg border p-4\">\n <h4 className=\"font-medium text-gray-700 mb-2\">{node.name}</h4>\n <pre className=\"text-xs bg-gray-50 p-2 rounded overflow-x-auto max-h-96 overflow-y-auto\">\n {JSON.stringify(node.data, null, 2)}\n </pre>\n </div>\n );\n }\n\n // Function that renders compiled resource data with indices - using function declaration for hoisting\n function renderCompiledResource(resource: ResourceJson.Compiled.ICompiledResource): ReactElement {\n if (!resource) {\n return (\n <div className=\"bg-white rounded-lg border p-4\">\n <h4 className=\"font-medium text-red-700 mb-2\">Error Loading Resource</h4>\n <p className=\"text-sm text-red-600\">Resource data not available</p>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6\">\n {/* Resource Details Header */}\n <div className=\"bg-gray-50 rounded-lg p-4\">\n <h3 className=\"text-lg font-semibold text-gray-900 mb-4\">Compiled Resource Details</h3>\n\n <div className=\"bg-white rounded-lg border p-4 space-y-3\">\n <div className=\"flex items-start\">\n <span className=\"font-semibold text-gray-700 w-32\">ID:</span>\n <span className=\"font-mono text-gray-900\">{resource.id}</span>\n </div>\n\n <div className=\"flex items-start\">\n <span className=\"font-semibold text-gray-700 w-32\">Resource Type:</span>\n <span className=\"text-gray-900\">Index: {resource.type}</span>\n </div>\n\n <div className=\"flex items-start\">\n <span className=\"font-semibold text-gray-700 w-32\">Decision:</span>\n <span className=\"text-gray-900\">\n <span className=\"font-mono\">\n Decision Index: {resource.decision} with {resource.candidates?.length ?? 0} candidates\n </span>\n </span>\n </div>\n </div>\n </div>\n\n {/* Candidates Section - Full candidate data from compiled collection */}\n <div className=\"bg-gray-50 rounded-lg p-4\">\n <h3 className=\"text-lg font-semibold text-gray-900 mb-4\">\n Candidates ({resource.candidates?.length ?? 0})\n </h3>\n\n <div className=\"space-y-4\">\n {\n resource.candidates?.map(\n (candidate: ResourceJson.Compiled.ICompiledCandidate, candidateIdx: number) => {\n // Get the condition set index for this candidate from the decision\n const compiledCollection = activeCompiledCollection;\n const decision = compiledCollection?.decisions?.[resource.decision];\n const conditionSetIndex = decision?.conditionSets?.[candidateIdx];\n const conditionSet =\n conditionSetIndex !== undefined\n ? compiledCollection?.conditionSets?.[conditionSetIndex]\n : null;\n\n return (\n <div key={candidateIdx} className=\"bg-white rounded-lg border p-4\">\n <div className=\"mb-3 flex items-center justify-between\">\n <h4 className=\"font-semibold text-gray-900\">\n Candidate {candidateIdx}\n {\n (candidate.isPartial && (\n <span className=\"ml-2 bg-yellow-100 text-yellow-800 px-2 py-1 rounded text-xs\">\n Partial\n </span>\n )) as React.ReactNode\n }\n </h4>\n {conditionSetIndex !== undefined && (\n <span className=\"text-xs font-mono bg-gray-100 px-2 py-1 rounded\">\n ConditionSet: {conditionSetIndex}\n </span>\n )}\n </div>\n\n {/* Candidate Value Index and JSON Data */}\n <div className=\"space-y-3 mb-3\">\n {/* Show Value Index */}\n {candidate.valueIndex !== undefined && (\n <div className=\"bg-blue-50 rounded p-3\">\n <div className=\"flex items-center justify-between mb-2\">\n <h6 className=\"text-sm font-semibold text-blue-700\">\n Candidate Value Reference:\n </h6>\n <span className=\"text-xs font-mono bg-blue-100 text-blue-800 px-2 py-1 rounded\">\n Index: {candidate.valueIndex}\n </span>\n </div>\n <div className=\"text-xs text-blue-600\">\n This candidate references candidateValues[{candidate.valueIndex}] from the\n compiled collection\n </div>\n </div>\n )}\n\n {/* Show Actual JSON Content */}\n {!!candidate && (\n <div className=\"bg-gray-50 rounded p-3\">\n <h6 className=\"text-sm font-semibold text-gray-700 mb-2\">\n {candidate.valueIndex !== undefined\n ? 'Resolved Resource Content:'\n : 'Resource Content:'}\n </h6>\n <pre className=\"text-sm font-mono text-gray-800 whitespace-pre-wrap overflow-x-auto max-h-48 overflow-y-auto\">\n {JSON.stringify(candidate, null, 2)}\n </pre>\n {candidate.valueIndex !== undefined &&\n activeCompiledCollection?.candidateValues && (\n <div className=\"mt-2 pt-2 border-t border-gray-200\">\n <div className=\"text-xs text-gray-600 mb-1\">\n From candidateValues array:\n </div>\n <pre className=\"text-xs font-mono text-gray-700 bg-white p-2 rounded border overflow-x-auto max-h-32 overflow-y-auto\">\n {JSON.stringify(\n activeCompiledCollection.candidateValues[candidate.valueIndex],\n null,\n 2\n )}\n </pre>\n </div>\n )}\n </div>\n )}\n </div>\n\n {/* Conditions from the condition set */}\n {conditionSet && conditionSet.conditions && conditionSet.conditions.length > 0 && (\n <div className=\"border-t pt-3\">\n <h5 className=\"text-sm font-semibold text-gray-700 mb-2\">Conditions:</h5>\n <div className=\"space-y-2\">\n {conditionSet.conditions.map((conditionIndex: number, idx: number) => {\n const condition = compiledCollection?.conditions?.[conditionIndex];\n if (!condition) return null;\n const qualifier = compiledCollection?.qualifiers?.[condition.qualifierIndex];\n\n return (\n <div\n key={idx}\n className=\"flex items-center text-sm bg-blue-50 rounded px-3 py-2\"\n >\n <span className=\"font-mono text-blue-700 mr-2 text-xs\">\n [{conditionIndex}]\n </span>\n <span className=\"font-medium text-blue-900 mr-2\">\n {qualifier?.name || `Q${condition.qualifierIndex}`}\n </span>\n <span className=\"text-blue-700 mr-2\">\n {condition.operator || 'matches'}\n </span>\n <span className=\"font-mono text-blue-800\">{condition.value}</span>\n <span className=\"ml-auto text-xs text-blue-600\">\n Priority: {condition.priority || 0}\n {condition.scoreAsDefault !== undefined && (\n <span className=\"ml-2\">Default: {condition.scoreAsDefault}</span>\n )}\n </span>\n </div>\n );\n })}\n </div>\n </div>\n )}\n\n {(!conditionSet ||\n !conditionSet.conditions ||\n conditionSet.conditions.length === 0) && (\n <div className=\"border-t pt-3\">\n <span className=\"text-xs text-gray-500 bg-gray-100 px-2 py-1 rounded\">\n No conditions (default candidate)\n </span>\n </div>\n )}\n </div>\n );\n }\n ) as React.ReactNode\n }\n </div>\n </div>\n </div>\n );\n }\n\n // Function that renders compiled collection data - using function declaration for hoisting\n function renderCompiledCollectionData(data: TreeNodeData): ReactElement {\n if (data.type === 'compiled-resource' || !data.items) {\n return (\n <div className=\"bg-white rounded-lg border p-4\">\n <p className=\"text-sm text-gray-500\">No data available</p>\n </div>\n );\n }\n\n let title: string;\n switch (data.type) {\n case 'qualifiers':\n title = 'Qualifiers';\n break;\n case 'qualifier-types':\n title = 'Qualifier Types';\n break;\n case 'resource-types':\n title = 'Resource Types';\n break;\n case 'conditions':\n title = 'Conditions';\n break;\n case 'condition-sets':\n title = 'Condition Sets';\n break;\n case 'decisions':\n title = 'Decisions';\n break;\n case 'candidate-values':\n title = 'Candidate Values';\n break;\n }\n\n return (\n <div className=\"bg-gray-50 rounded-lg p-4\">\n <h3 className=\"text-lg font-semibold text-gray-900 mb-4\">\n {title} <span className=\"text-sm font-normal text-gray-600\">({data.items.length})</span>\n </h3>\n\n {data.items.length === 0 ? (\n <div className=\"bg-white rounded-lg border p-4\">\n <p className=\"text-sm text-gray-500\">No {title.toLowerCase()} available</p>\n </div>\n ) : (\n <div className=\"space-y-3 max-h-96 overflow-y-auto\">\n {data.items.map((item: unknown, index: number) => (\n <div key={index} className=\"bg-white rounded-lg border p-4\">\n <div className=\"flex items-start justify-between mb-3\">\n <div>\n <h4 className=\"font-semibold text-gray-900\">\n {getCompiledItemDisplayName(data, index, activeCompiledCollection)}\n </h4>\n <p className=\"text-sm text-gray-600 font-mono mt-1\">\n {getCompiledItemDisplayKey(data, index)}\n </p>\n </div>\n <span className=\"bg-gray-100 text-gray-700 px-2 py-1 rounded text-xs font-mono\">\n Index: {index}\n </span>\n </div>\n <div className=\"border-t pt-3\">\n {renderCompiledItemDetail(data, index, activeCompiledCollection)}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n );\n }\n\n const renderDetails = (): React.ReactElement => {\n if (!node.data) {\n return (\n <div className=\"space-y-4\">\n <div className=\"bg-white rounded-lg border p-4\">\n <h4 className=\"font-medium text-gray-700 mb-2\">📁 {node.name}</h4>\n <p className=\"text-sm text-gray-600\">\n {node.children ? `Contains ${node.children.length} items` : 'Empty folder'}\n </p>\n </div>\n </div>\n );\n }\n\n if (!node.data || typeof node.data !== 'object') {\n return renderRawData();\n }\n\n const data = node.data;\n\n switch (data.type) {\n case 'compiled-resource':\n return renderCompiledResource(data.resource);\n\n case 'qualifiers':\n case 'qualifier-types':\n case 'resource-types':\n case 'conditions':\n case 'condition-sets':\n case 'decisions':\n case 'candidate-values':\n return renderCompiledCollectionData(data);\n\n default:\n return renderRawData();\n }\n };\n\n return (\n <div className=\"flex flex-col h-full\">\n <div className=\"flex items-center justify-between mb-4\">\n <h3 className=\"text-lg font-semibold text-gray-900\">Details</h3>\n <button\n onClick={() => setShowRawJson(!showRawJson)}\n className=\"text-xs text-gray-500 hover:text-gray-700 px-2 py-1 rounded hover:bg-gray-100\"\n >\n {showRawJson ? 'Rich View' : 'Raw JSON'}\n </button>\n </div>\n <div className=\"flex-1 overflow-y-auto\">\n {showRawJson ? (\n <div className=\"bg-white rounded-lg border p-4\">\n <pre className=\"text-xs bg-gray-50 p-3 rounded overflow-x-auto\">\n {JSON.stringify(node.data, null, 2)}\n </pre>\n </div>\n ) : (\n renderDetails()\n )}\n </div>\n </div>\n );\n}\n\n// CompiledResourceDetail component specifically for compiled resources\ninterface ICompiledResourceDetailProps {\n resourceId: string;\n compiledResource?: ResourceJson.Compiled.ICompiledResource | null;\n activeCompiledCollection: ResourceJson.Compiled.ICompiledResourceCollection | null | undefined;\n}\n\nfunction CompiledResourceDetail({\n resourceId,\n compiledResource,\n activeCompiledCollection\n}: ICompiledResourceDetailProps): React.ReactElement {\n const [showRawJson, setShowRawJson] = useState(false);\n\n if (!compiledResource) {\n return (\n <div className=\"flex flex-col h-full\">\n <h3 className=\"text-lg font-semibold text-gray-900 mb-4\">Resource Details</h3>\n <div className=\"flex-1 flex items-center justify-center border border-gray-200 rounded-lg bg-red-50\">\n <div className=\"text-center\">\n <p className=\"text-red-600 font-medium mb-2\">Resource Not Found</p>\n <p className=\"text-red-500 text-sm\">Resource {resourceId} not found in compiled collection</p>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"flex flex-col h-full\">\n <div className=\"flex items-center justify-between mb-4\">\n <h3 className=\"text-lg font-semibold text-gray-900\">Compiled Resource Details</h3>\n <button\n onClick={() => setShowRawJson(!showRawJson)}\n className=\"text-xs text-gray-500 hover:text-gray-700 px-2 py-1 rounded hover:bg-gray-100\"\n >\n {showRawJson ? 'Rich View' : 'Raw JSON'}\n </button>\n </div>\n <div className=\"flex-1 overflow-y-auto border border-gray-200 rounded-lg p-4 bg-gray-50\">\n {showRawJson ? (\n <div className=\"bg-white rounded-lg border p-4\">\n <pre className=\"text-xs bg-gray-50 p-3 rounded overflow-x-auto\">\n {JSON.stringify(compiledResource, null, 2)}\n </pre>\n </div>\n ) : (\n <div className=\"space-y-6\">\n {/* Resource Details Header */}\n <div className=\"bg-gray-50 rounded-lg p-4\">\n <h3 className=\"text-lg font-semibold text-gray-900 mb-4\">Compiled Resource Details</h3>\n\n <div className=\"bg-white rounded-lg border p-4 space-y-3\">\n <div className=\"flex items-start\">\n <span className=\"font-semibold text-gray-700 w-32\">ID:</span>\n <span className=\"font-mono text-gray-900\">{compiledResource.id}</span>\n </div>\n\n <div className=\"flex items-start\">\n <span className=\"font-semibold text-gray-700 w-32\">Resource Type:</span>\n <span className=\"text-gray-900\">Index: {compiledResource.type}</span>\n </div>\n\n <div className=\"flex items-start\">\n <span className=\"font-semibold text-gray-700 w-32\">Decision:</span>\n <span className=\"text-gray-900\">\n <span className=\"font-mono\">\n Decision Index: {compiledResource.decision} with{' '}\n {compiledResource.candidates?.length ?? 0} candidates\n </span>\n </span>\n </div>\n </div>\n </div>\n\n {/* Candidates Section */}\n <div className=\"bg-gray-50 rounded-lg p-4\">\n <h3 className=\"text-lg font-semibold text-gray-900 mb-4\">\n Candidates ({compiledResource.candidates?.length ?? 0})\n </h3>\n\n <div className=\"space-y-4\">\n {compiledResource.candidates &&\n compiledResource.candidates.map(\n (candidate: ResourceJson.Compiled.ICompiledCandidate, candidateIdx: number) => {\n // Get the condition set index for this candidate from the decision\n const decisionIndex = compiledResource.decision;\n const decision = activeCompiledCollection?.decisions?.[decisionIndex];\n const conditionSetIndex = decision?.conditionSets?.[candidateIdx];\n const conditionSet =\n conditionSetIndex !== undefined\n ? activeCompiledCollection?.conditionSets?.[conditionSetIndex]\n : null;\n\n return (\n <div key={candidateIdx} className=\"bg-white rounded-lg border p-4\">\n <div className=\"mb-3 flex items-center justify-between\">\n <h4 className=\"font-semibold text-gray-900\">Candidate {candidateIdx}</h4>\n {conditionSetIndex !== undefined && (\n <span className=\"text-xs font-mono bg-gray-100 px-2 py-1 rounded\">\n ConditionSet: {conditionSetIndex}\n </span>\n )}\n </div>\n\n {/* Candidate metadata banner */}\n {(candidate.isPartial || candidate.mergeMethod) && (\n <div className=\"mb-3 flex items-center gap-2 text-xs\">\n {candidate.isPartial && (\n <span className=\"bg-yellow-100 text-yellow-800 px-2 py-1 rounded\">\n Partial\n </span>\n )}\n {candidate.mergeMethod && (\n <span className=\"bg-blue-100 text-blue-800 px-2 py-1 rounded\">\n Merge: {candidate.mergeMethod}\n </span>\n )}\n </div>\n )}\n\n {/* Resource Value */}\n <div className=\"mb-3\">\n <div className=\"text-xs text-gray-600 mb-1\">\n Value\n {candidate.valueIndex !== undefined\n ? ` (candidateValues[${candidate.valueIndex}])`\n : ''}\n :\n </div>\n <pre className=\"text-xs font-mono text-gray-700 bg-white p-2 rounded border overflow-x-auto max-h-32 overflow-y-auto\">\n {typeof candidate.valueIndex === 'number' &&\n activeCompiledCollection?.candidateValues\n ? JSON.stringify(\n activeCompiledCollection.candidateValues[candidate.valueIndex],\n null,\n 2\n )\n : JSON.stringify(candidate, null, 2)}\n </pre>\n </div>\n\n {/* Conditions from the condition set */}\n {conditionSet && conditionSet.conditions && conditionSet.conditions.length > 0 && (\n <div className=\"border-t pt-3\">\n <h5 className=\"text-sm font-semibold text-gray-700 mb-2\">Conditions:</h5>\n <div className=\"space-y-2\">\n {conditionSet.conditions.map((conditionIndex: number, idx: number) => {\n const condition = activeCompiledCollection?.conditions?.[conditionIndex];\n if (!condition) return null;\n const qualifier =\n activeCompiledCollection?.qualifiers?.[condition.qualifierIndex];\n\n return (\n <div\n key={idx}\n className=\"flex items-center text-sm bg-blue-50 rounded px-3 py-2\"\n >\n <span className=\"font-mono text-blue-700 mr-2 text-xs\">\n [{conditionIndex}]\n </span>\n <span className=\"font-medium text-blue-900 mr-2\">\n {qualifier?.name || `Q${condition.qualifierIndex}`}\n </span>\n <span className=\"text-blue-700 mr-2\">\n {condition.operator || 'matches'}\n </span>\n <span className=\"font-mono text-blue-800\">{condition.value}</span>\n <span className=\"ml-auto text-xs text-blue-600\">\n Priority: {condition.priority || 0}\n {condition.scoreAsDefault !== undefined && (\n <span className=\"ml-2\">Default: {condition.scoreAsDefault}</span>\n )}\n </span>\n </div>\n );\n })}\n </div>\n </div>\n )}\n\n {(!conditionSet ||\n !conditionSet.conditions ||\n conditionSet.conditions.length === 0) && (\n <div className=\"border-t pt-3\">\n <span className=\"text-xs text-gray-500 bg-gray-100 px-2 py-1 rounded\">\n No conditions (default candidate)\n </span>\n </div>\n )}\n </div>\n );\n }\n )}\n </div>\n </div>\n </div>\n )}\n </div>\n </div>\n );\n}\n\nexport default CompiledView;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/views/ConfigurationView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AActE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AA6UzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA+kB/D,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/views/ConfigurationView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EACL,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,uBAAuB,EACvB,qBAAqB,EACrB,OAAO,EACP,UAAU,EACV,SAAS,EACV,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAU,cAAc,EAA6B,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAa7E,MAAM,mBAAmB,GAAwC,CAAC,EAChE,cAAc,EACd,QAAQ,EACR,SAAS,EACT,MAAM,EACP,EAAE,EAAE;IACH,MAAM,uBAAuB,GAAG,CAAC,IAAmD,EAAU,EAAE;QAC9F,IAAI,CAAC,IAAI,CAAC,aAAa;YAAE,OAAO,kBAAkB,CAAC;QAEnD,gCAAgC;QAChC,IAAI,cAAc,CAAC,MAAM,CAAC,2BAA2B,CAAC,IAAI,CAAC,EAAE,CAAC;YAC5D,MAAM,M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AAC,EAA4C,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAC1D,GACD,CACH;QAEA,mBAAmB,IAAI,CACtB,oBAAC,oBAAoB,IACnB,YAAY,EAAE,mBAAmB,CAAC,IAAI,EACtC,MAAM,EAAE,CAAC,YAAY,EAAE,EAAE;gBACvB,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;gBACpE,sBAAsB,CAAC,IAAI,CAAC,CAAC;gBAC7B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,0BAA0B,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;YACnE,CAAC,EACD,QAAQ,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC,EAC5C,aAAa,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC,aAAa,IAAI,EAAE,CAAC;iBAC5D,MAAM,CACL,CAAC,EAA4C,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,KAAK,mBAAmB,CAAC,KAAK,CAC7F;iBACA,GAAG,CAAC,CAAC,EAA4C,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,GACjE,CACH,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import React, { useState, useCallback, useRef, useMemo } from 'react';\nimport {\n CogIcon,\n DocumentTextIcon,\n PlusIcon,\n TrashIcon,\n ArrowDownTrayIcon,\n ArrowUpTrayIcon,\n ExclamationTriangleIcon,\n InformationCircleIcon,\n EyeIcon,\n PencilIcon,\n XMarkIcon\n} from '@heroicons/react/24/outline';\nimport { IConfigurationViewProps } from '../../../types';\nimport { useIConfigurationState } from '../../../hooks/useConfigurationState';\nimport { Config, QualifierTypes, Qualifiers, ResourceTypes } from '@fgv/ts-res';\nimport { QualifierTypeEditForm } from '../../forms/QualifierTypeEditForm';\nimport { GenericQualifierTypeEditForm } from '../../forms/GenericQualifierTypeEditForm';\nimport { QualifierEditForm } from '../../forms/QualifierEditForm';\nimport { ResourceTypeEditForm } from '../../forms/ResourceTypeEditForm';\nimport { useSmartObservability } from '../../../hooks/useSmartObservability';\n\n// Panel component definitions - moved before main component to avoid use-before-define\n\n// Comprehensive panel components with full editing capabilities\ninterface IQualifierTypesPanelProps {\n qualifierTypes: QualifierTypes.Config.IAnyQualifierTypeConfig[];\n onUpdateItem: (index: number, qualifierType: QualifierTypes.Config.IAnyQualifierTypeConfig) => void;\n onRemove: (index: number) => void;\n onShowAdd: () => void;\n onEdit: (item: QualifierTypes.Config.IAnyQualifierTypeConfig, index: number) => void;\n}\n\nconst QualifierTypesPanel: React.FC<IQualifierTypesPanelProps> = ({\n qualifierTypes,\n onRemove,\n onShowAdd,\n onEdit\n}) => {\n const getConfigurationSummary = (type: QualifierTypes.Config.IAnyQualifierTypeConfig): string => {\n if (!type.configuration) return 'No configuration';\n\n // Handle system qualifier types\n if (QualifierTypes.Config.isSystemQualifierTypeConfig(type)) {\n const config = type.configuration as Record<string, unknown>;\n const details: string[] = [];\n\n if (config?.allowContextList) details.push('Context List');\n if (type.systemType === 'literal') {\n if (config?.caseSensitive === false) details.push('Case Insensitive');\n const enumValues = config?.enumeratedValues as string[] | undefined;\n if (enumValues?.length) details.push(`${enumValues.length} values`);\n }\n if (type.systemType === 'territory') {\n if (config?.acceptLowercase) details.push('Accept Lowercase');\n const territories = config?.allowedTerritories as string[] | undefined;\n if (territories?.length) details.push(`${territories.length} territories`);\n }\n\n return details.length > 0 ? details.join(', ') : 'Default settings';\n }\n\n // Handle custom qualifier types\n const config = type.configuration;\n if (typeof config === 'object' && config !== null) {\n const keys = Object.keys(config);\n return keys.length > 0 ? `${keys.length} properties` : 'Empty configuration';\n }\n return 'Custom configuration';\n };\n\n return (\n <div>\n <div className=\"flex items-center justify-between mb-4\">\n <h3 className=\"text-lg font-semibold text-gray-900\">Qualifier Types</h3>\n <button\n onClick={onShowAdd}\n className=\"inline-flex items-center px-3 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700\"\n >\n <PlusIcon className=\"w-4 h-4 mr-2\" />\n Add Type\n </button>\n </div>\n\n {qualifierTypes.length === 0 ? (\n <div className=\"text-center py-8 text-gray-500\">\n <CogIcon className=\"w-12 h-12 mx-auto mb-4 text-gray-400\" />\n <p>No qualifier types defined</p>\n <p className=\"text-sm\">Add a qualifier type to get started</p>\n </div>\n ) : (\n <div className=\"space-y-3\">\n {qualifierTypes.map((type, index) => (\n <div\n key={index}\n className=\"bg-gray-50 p-4 rounded-lg border border-gray-200 hover:border-gray-300 transition-colors\"\n >\n <div className=\"flex items-start justify-between\">\n <div className=\"flex-1\">\n <div className=\"flex items-center space-x-2 mb-2\">\n <h4 className=\"font-medium text-gray-900\">{type.name}</h4>\n <span\n className={`px-2 py-1 text-xs font-medium rounded-full ${\n QualifierTypes.Config.isSystemQualifierTypeConfig(type)\n ? type.systemType === 'language'\n ? 'bg-blue-100 text-blue-800'\n : type.systemType === 'territory'\n ? 'bg-green-100 text-green-800'\n : 'bg-purple-100 text-purple-800'\n : 'bg-orange-100 text-orange-800 border border-orange-300'\n }`}\n >\n {QualifierTypes.Config.isSystemQualifierTypeConfig(type) ? type.systemType : 'custom'}\n </span>\n </div>\n <p className=\"text-sm text-gray-600 mb-2\">{getConfigurationSummary(type)}</p>\n </div>\n <div className=\"flex items-center space-x-2 ml-4\">\n <button\n onClick={() => onEdit(type, index)}\n className=\"p-1.5 text-gray-400 hover:text-blue-600 hover:bg-blue-50 rounded\"\n title=\"Edit qualifier type\"\n >\n <PencilIcon className=\"w-4 h-4\" />\n </button>\n <button\n onClick={() => onRemove(index)}\n className=\"p-1.5 text-gray-400 hover:text-red-600 hover:bg-red-50 rounded\"\n title=\"Delete qualifier type\"\n >\n <TrashIcon className=\"w-4 h-4\" />\n </button>\n </div>\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n );\n};\n\ninterface IQualifiersPanelProps {\n qualifiers: Qualifiers.IQualifierDecl[];\n qualifierTypes: QualifierTypes.Config.IAnyQualifierTypeConfig[];\n onUpdateItem: (index: number, qualifier: Qualifiers.IQualifierDecl) => void;\n onRemove: (index: number) => void;\n onShowAdd: () => void;\n onEdit: (item: Qualifiers.IQualifierDecl, index: number) => void;\n}\n\nconst QualifiersPanel: React.FC<IQualifiersPanelProps> = ({\n qualifiers,\n qualifierTypes,\n onRemove,\n onShowAdd,\n onEdit\n}) => {\n // Sort qualifiers by priority (highest first)\n const sortedQualifiers = [...qualifiers].sort((a, b) => b.defaultPriority - a.defaultPriority);\n\n return (\n <div>\n <div className=\"flex items-center justify-between mb-4\">\n <h3 className=\"text-lg font-semibold text-gray-900\">Qualifiers</h3>\n <button\n onClick={onShowAdd}\n disabled={qualifierTypes.length === 0}\n className=\"inline-flex items-center px-3 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed\"\n title={qualifierTypes.length === 0 ? 'Add qualifier types first' : 'Add qualifier'}\n >\n <PlusIcon className=\"w-4 h-4 mr-2\" />\n Add Qualifier\n </button>\n </div>\n\n {qualifierTypes.length === 0 ? (\n <div className=\"text-center py-8 text-gray-500\">\n <ExclamationTriangleIcon className=\"w-12 h-12 mx-auto mb-4 text-amber-400\" />\n <p>No qualifier types available</p>\n <p className=\"text-sm\">Create qualifier types first before adding qualifiers</p>\n </div>\n ) : qualifiers.length === 0 ? (\n <div className=\"text-center py-8 text-gray-500\">\n <CogIcon className=\"w-12 h-12 mx-auto mb-4 text-gray-400\" />\n <p>No qualifiers defined</p>\n <p className=\"text-sm\">Add a qualifier to get started</p>\n </div>\n ) : (\n <div className=\"space-y-3\">\n {sortedQualifiers.map((qualifier, index) => {\n const originalIndex = qualifiers.findIndex((q) => q === qualifier);\n const qualifierType = qualifierTypes.find((qt) => qt.name === qualifier.typeName);\n\n return (\n <div\n key={originalIndex}\n className=\"bg-gray-50 p-4 rounded-lg border border-gray-200 hover:border-gray-300 transition-colors\"\n >\n <div className=\"flex items-center justify-between\">\n <div className=\"flex-1\">\n {/* Header line with name, type, and token */}\n <div className=\"flex items-center space-x-3 mb-2\">\n <h4 className=\"font-medium text-gray-900\">{qualifier.name}</h4>\n <span className=\"text-gray-600 text-sm\">{qualifier.typeName}</span>\n {qualifier.token && (\n <span className=\"px-2 py-1 text-xs font-medium bg-purple-100 text-purple-700 rounded\">\n token: {qualifier.token}\n </span>\n )}\n {!qualifierType && (\n <span className=\"px-2 py-1 text-xs font-medium bg-red-100 text-red-800 rounded-full\">\n Missing Type\n </span>\n )}\n </div>\n {/* Bottom line with type and priority */}\n <div className=\"flex items-center justify-between text-sm text-gray-600\">\n <span>Type: {qualifier.typeName}</span>\n <span>Priority: {qualifier.defaultPriority}</span>\n </div>\n </div>\n <div className=\"flex items-center space-x-2 ml-4\">\n <button\n onClick={() => onEdit(qualifier, originalIndex)}\n className=\"p-1.5 text-gray-400 hover:text-blue-600 hover:bg-blue-50 rounded\"\n title=\"Edit qualifier\"\n >\n <PencilIcon className=\"w-4 h-4\" />\n </button>\n <button\n onClick={() => onRemove(originalIndex)}\n className=\"p-1.5 text-gray-400 hover:text-red-600 hover:bg-red-50 rounded\"\n title=\"Delete qualifier\"\n >\n <TrashIcon className=\"w-4 h-4\" />\n </button>\n </div>\n </div>\n </div>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\ninterface IResourceTypesPanelProps {\n resourceTypes: ResourceTypes.Config.IResourceTypeConfig[];\n onUpdateItem: (index: number, resourceType: ResourceTypes.Config.IResourceTypeConfig) => void;\n onRemove: (index: number) => void;\n onShowAdd: () => void;\n onEdit: (item: ResourceTypes.Config.IResourceTypeConfig, index: number) => void;\n}\n\nconst ResourceTypesPanel: React.FC<IResourceTypesPanelProps> = ({\n resourceTypes,\n onRemove,\n onShowAdd,\n onEdit\n}) => {\n const getTypeNameBadgeColor = (typeName: string): string => {\n switch (typeName) {\n case 'string':\n return 'bg-blue-100 text-blue-800';\n case 'object':\n return 'bg-green-100 text-green-800';\n case 'array':\n return 'bg-purple-100 text-purple-800';\n case 'number':\n return 'bg-yellow-100 text-yellow-800';\n case 'boolean':\n return 'bg-red-100 text-red-800';\n default:\n return 'bg-gray-100 text-gray-800';\n }\n };\n\n return (\n <div>\n <div className=\"flex items-center justify-between mb-4\">\n <h3 className=\"text-lg font-semibold text-gray-900\">Resource Types</h3>\n <button\n onClick={onShowAdd}\n className=\"inline-flex items-center px-3 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700\"\n >\n <PlusIcon className=\"w-4 h-4 mr-2\" />\n Add Type\n </button>\n </div>\n\n {resourceTypes.length === 0 ? (\n <div className=\"text-center py-8 text-gray-500\">\n <CogIcon className=\"w-12 h-12 mx-auto mb-4 text-gray-400\" />\n <p>No resource types defined</p>\n <p className=\"text-sm\">Add a resource type to get started</p>\n </div>\n ) : (\n <div className=\"space-y-3\">\n {resourceTypes.map((type, index) => (\n <div\n key={index}\n className=\"bg-gray-50 p-4 rounded-lg border border-gray-200 hover:border-gray-300 transition-colors\"\n >\n <div className=\"flex items-start justify-between\">\n <div className=\"flex-1\">\n <div className=\"flex items-center space-x-2 mb-2\">\n <h4 className=\"font-medium text-gray-900\">{type.name}</h4>\n <span\n className={`px-2 py-1 text-xs font-medium rounded-full ${getTypeNameBadgeColor(\n type.typeName\n )}`}\n >\n {type.typeName}\n </span>\n </div>\n <p className=\"text-sm text-gray-600\">\n Defines how resources of this type are processed and validated\n </p>\n </div>\n <div className=\"flex items-center space-x-2 ml-4\">\n <button\n onClick={() => onEdit(type, index)}\n className=\"p-1.5 text-gray-400 hover:text-blue-600 hover:bg-blue-50 rounded\"\n title=\"Edit resource type\"\n >\n <PencilIcon className=\"w-4 h-4\" />\n </button>\n <button\n onClick={() => onRemove(index)}\n className=\"p-1.5 text-gray-400 hover:text-red-600 hover:bg-red-50 rounded\"\n title=\"Delete resource type\"\n >\n <TrashIcon className=\"w-4 h-4\" />\n </button>\n </div>\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n );\n};\n\n/**\n * ConfigurationView component for managing ts-res system configurations.\n *\n * Provides a comprehensive interface for creating, editing, and managing ts-res\n * system configurations including qualifier types, qualifiers, and resource types.\n * Supports import/export functionality and real-time validation.\n *\n * **Key Features:**\n * - **Configuration editing**: Create and modify system configurations\n * - **Qualifier type management**: Add, edit, and remove qualifier types (language, territory, etc.)\n * - **Qualifier management**: Configure specific qualifiers with default values\n * - **Resource type management**: Define and manage resource types\n * - **Import/export**: Load configurations from files or export current settings\n * - **Real-time validation**: Validate configuration changes as you type\n * - **Change tracking**: Track unsaved changes with visual indicators\n *\n * @example\n * ```tsx\n * import { ConfigurationView } from '@fgv/ts-res-ui-components';\n *\n * function MyConfigurationEditor() {\n * const [config, setConfig] = useState(defaultConfiguration);\n * const [hasChanges, setHasChanges] = useState(false);\n *\n * const handleSave = () => {\n * console.log('Saving configuration...', config);\n * setHasChanges(false);\n * };\n *\n * return (\n * <ConfigurationView\n * configuration={config}\n * onConfigurationChange={(newConfig) => {\n * setConfig(newConfig);\n * setHasChanges(true);\n * }}\n * onSave={handleSave}\n * hasUnsavedChanges={hasChanges}\n * />\n * );\n * }\n * ```\n *\n * @public\n */\nexport const ConfigurationView: React.FC<IConfigurationViewProps> = ({\n configuration,\n onConfigurationChange,\n onSave,\n hasUnsavedChanges,\n className = ''\n}) => {\n const o11y = useSmartObservability();\n const fileInputRef = useRef<HTMLInputElement>(null);\n const [editingQualifierType, setEditingQualifierType] = useState<{\n item: QualifierTypes.Config.IAnyQualifierTypeConfig;\n index: number;\n } | null>(null);\n const [editingQualifier, setEditingQualifier] = useState<{\n item: Qualifiers.IQualifierDecl;\n index: number;\n } | null>(null);\n const [editingResourceType, setEditingResourceType] = useState<{\n item: ResourceTypes.Config.IResourceTypeConfig;\n index: number;\n } | null>(null);\n const [showAddQualifierType, setShowAddQualifierType] = useState(false);\n const [addQualifierTypeMode, setAddQualifierTypeMode] = useState<'system' | 'custom' | null>(null);\n const [showAddQualifier, setShowAddQualifier] = useState(false);\n const [showAddResourceType, setShowAddResourceType] = useState(false);\n\n const { state, actions, templates } = useIConfigurationState(\n configuration || undefined,\n onConfigurationChange,\n hasUnsavedChanges\n ? undefined\n : (changes: unknown) => {\n // Only notify if we weren't already told there are unsaved changes\n }\n );\n\n // Create instantiated qualifier types from configurations for validation\n const qualifierTypeInstances = useMemo(() => {\n const instances = new Map<string, QualifierTypes.QualifierType>();\n\n if (state.currentConfiguration.qualifierTypes) {\n state.currentConfiguration.qualifierTypes.forEach((typeConfig) => {\n // Only instantiate system qualifier types for now\n if (QualifierTypes.Config.isSystemQualifierTypeConfig(typeConfig)) {\n const result = QualifierTypes.createQualifierTypeFromSystemConfig(typeConfig);\n if (result.isSuccess()) {\n instances.set(typeConfig.name, result.value);\n }\n }\n });\n }\n\n return instances;\n }, [state.currentConfiguration.qualifierTypes]);\n\n // Handle file import\n const handleFileImport = useCallback(\n (files: FileList | null) => {\n if (!files || files.length === 0) return;\n\n const file = files[0];\n const reader = new FileReader();\n\n reader.onload = (e) => {\n const content = e.target?.result as string;\n if (content) {\n const result = actions.importFromJson(content);\n if (result.isSuccess()) {\n o11y.user.success(`Configuration imported from ${file.name}`);\n } else {\n o11y.user.error(`Import failed: ${result.message}`);\n }\n }\n };\n\n reader.onerror = () => {\n o11y.user.error(`Failed to read file: ${file.name}`);\n };\n\n reader.readAsText(file);\n },\n [actions, o11y]\n );\n\n // Handle export\n const handleExport = useCallback(() => {\n const result = actions.exportToJson({ format: 'json', pretty: true });\n if (result.isSuccess()) {\n const blob = new Blob([result.value], { type: 'application/json' });\n const url = URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.href = url;\n a.download = 'ts-res-configuration.json';\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n URL.revokeObjectURL(url);\n o11y.user.success('Configuration exported successfully');\n } else {\n o11y.user.error(`Export failed: ${result.message}`);\n }\n }, [actions, o11y]);\n\n // Handle template loading\n const handleLoadTemplate = useCallback(\n (templateId: string) => {\n const result = actions.loadTemplate(templateId);\n if (result.isSuccess()) {\n const template = templates.find((t: { id: string; name?: string }) => t.id === templateId);\n o11y.user.success(`Loaded template: ${template?.name}`);\n } else {\n o11y.user.error(`Failed to load template: ${result.message}`);\n }\n },\n [actions, templates, o11y]\n );\n\n // Handle save\n const handleSave = useCallback(() => {\n if (onSave) {\n onSave(state.currentConfiguration);\n actions.applyConfiguration();\n o11y.user.success('Configuration saved successfully');\n }\n }, [onSave, state.currentConfiguration, actions, o11y]);\n\n if (!configuration && !state.currentConfiguration) {\n return (\n <div className={`p-6 ${className}`}>\n <div className=\"flex items-center space-x-3 mb-6\">\n <CogIcon className=\"h-8 w-8 text-blue-600\" />\n <h2 className=\"text-2xl font-bold text-gray-900\">Configuration</h2>\n </div>\n\n <div className=\"bg-white rounded-lg shadow-sm border border-gray-200 p-8 text-center\">\n <div className=\"max-w-2xl mx-auto\">\n <h3 className=\"text-xl font-semibold text-gray-900 mb-4\">No Configuration Available</h3>\n <p className=\"text-gray-600 mb-6\">\n Load a configuration to manage qualifiers, qualifier types, and resource types.\n </p>\n <div className=\"bg-blue-50 rounded-lg p-4\">\n <p className=\"text-sm text-blue-800\">\n <strong>Configuration Manager:</strong> Define and manage system configurations for resource\n management, including qualifiers, qualifier types, and resource types.\n </p>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div className={`p-6 ${className}`}>\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center space-x-3\">\n <CogIcon className=\"h-8 w-8 text-blue-600\" />\n <h2 className=\"text-2xl font-bold text-gray-900\">Configuration</h2>\n {state.hasUnsavedChanges && (\n <span className=\"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800\">\n Unsaved Changes\n </span>\n )}\n </div>\n\n <div className=\"flex items-center space-x-2\">\n {/* Template Selection */}\n <select\n onChange={(e) => e.target.value && handleLoadTemplate(e.target.value)}\n value=\"\"\n className=\"px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500\"\n >\n <option value=\"\">Load Template...</option>\n {templates.map((template: { id: string; name: string }) => (\n <option key={template.id} value={template.id}>\n {template.name}\n </option>\n ))}\n </select>\n\n {/* Import Button */}\n <button\n onClick={() => fileInputRef.current?.click()}\n className=\"inline-flex items-center px-3 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500\"\n >\n <ArrowUpTrayIcon className=\"w-4 h-4 mr-2\" />\n Import\n </button>\n\n {/* Export Button */}\n <button\n onClick={handleExport}\n className=\"inline-flex items-center px-3 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500\"\n >\n <ArrowDownTrayIcon className=\"w-4 h-4 mr-2\" />\n Export\n </button>\n\n {/* View Toggle */}\n <button\n onClick={actions.toggleJsonView}\n className={`inline-flex items-center px-3 py-2 border rounded-md text-sm font-medium focus:outline-none focus:ring-2 focus:ring-blue-500 ${\n state.isJsonView\n ? 'border-blue-600 text-blue-600 bg-blue-50'\n : 'border-gray-300 text-gray-700 bg-white hover:bg-gray-50'\n }`}\n >\n {state.isJsonView ? (\n <>\n <PencilIcon className=\"w-4 h-4 mr-2\" />\n Form View\n </>\n ) : (\n <>\n <EyeIcon className=\"w-4 h-4 mr-2\" />\n JSON View\n </>\n )}\n </button>\n\n {/* Save Button */}\n {onSave && (\n <button\n onClick={handleSave}\n disabled={!state.hasUnsavedChanges}\n className={`inline-flex items-center px-4 py-2 border border-transparent rounded-md text-sm font-medium ${\n state.hasUnsavedChanges\n ? 'text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500'\n : 'text-gray-400 bg-gray-200 cursor-not-allowed'\n }`}\n >\n Save\n </button>\n )}\n </div>\n </div>\n\n {/* Validation Status */}\n {!state.validation.isValid && (\n <div className=\"mb-6 bg-red-50 border border-red-200 rounded-lg p-4\">\n <div className=\"flex items-center space-x-2 text-red-600 mb-2\">\n <ExclamationTriangleIcon className=\"w-5 h-5\" />\n <span className=\"font-medium\">Configuration Issues</span>\n </div>\n <ul className=\"text-sm text-red-700 space-y-1\">\n {state.validation.errors.map((error: string, index: number) => (\n <li key={index}>• {error}</li>\n ))}\n </ul>\n </div>\n )}\n\n {/* Warnings */}\n {state.validation.warnings.length > 0 && (\n <div className=\"mb-6 bg-yellow-50 border border-yellow-200 rounded-lg p-4\">\n <div className=\"flex items-center space-x-2 text-yellow-600 mb-2\">\n <InformationCircleIcon className=\"w-5 h-5\" />\n <span className=\"font-medium\">Configuration Warnings</span>\n </div>\n <ul className=\"text-sm text-yellow-700 space-y-1\">\n {state.validation.warnings.map((warning: string, index: number) => (\n <li key={index}>• {warning}</li>\n ))}\n </ul>\n </div>\n )}\n\n <div className=\"bg-white rounded-lg shadow-sm border border-gray-200\">\n {state.isJsonView ? (\n // JSON Editor View\n <div className=\"p-6\">\n <div className=\"flex items-center justify-between mb-4\">\n <h3 className=\"text-lg font-semibold text-gray-900\">JSON Configuration</h3>\n <button\n onClick={() => {\n const result = actions.applyJsonChanges();\n if (result.isSuccess()) {\n o11y.user.success('JSON changes applied');\n } else {\n o11y.user.error(`JSON error: ${result.message}`);\n }\n }}\n disabled={!!state.jsonError}\n className={`px-4 py-2 rounded-md text-sm font-medium ${\n state.jsonError\n ? 'bg-gray-200 text-gray-400 cursor-not-allowed'\n : 'bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500'\n }`}\n >\n Apply Changes\n </button>\n </div>\n\n {state.jsonError && (\n <div className=\"mb-4 bg-red-50 border border-red-200 rounded-lg p-3\">\n <p className=\"text-sm text-red-700\">{state.jsonError}</p>\n </div>\n )}\n\n <textarea\n value={state.jsonString}\n onChange={(e) => actions.updateJsonString(e.target.value)}\n className=\"w-full h-96 px-3 py-2 border border-gray-300 rounded-md font-mono text-sm focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder=\"Enter JSON configuration...\"\n />\n </div>\n ) : (\n // Form View\n <div>\n {/* Tab Navigation */}\n <div className=\"border-b border-gray-200\">\n <nav className=\"-mb-px flex space-x-8 px-6\">\n {[\n {\n key: 'qualifiers' as const,\n label: 'Qualifiers',\n count: state.currentConfiguration.qualifiers?.length || 0\n },\n {\n key: 'qualifierTypes' as const,\n label: 'Qualifier Types',\n count: state.currentConfiguration.qualifierTypes?.length || 0\n },\n {\n key: 'resourceTypes' as const,\n label: 'Resource Types',\n count: state.currentConfiguration.resourceTypes?.length || 0\n }\n ].map((tab) => (\n <button\n key={tab.key}\n onClick={() => actions.setActiveTab(tab.key)}\n className={`py-4 px-1 border-b-2 font-medium text-sm whitespace-nowrap ${\n state.activeTab === tab.key\n ? 'border-blue-600 text-blue-600'\n : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'\n }`}\n >\n {tab.label}\n <span className=\"ml-2 bg-gray-100 text-gray-900 rounded-full px-2.5 py-0.5 text-xs font-medium\">\n {tab.count}\n </span>\n </button>\n ))}\n </nav>\n </div>\n\n {/* Tab Content */}\n <div className=\"p-6\">\n {state.activeTab === 'qualifiers' && (\n <QualifiersPanel\n qualifiers={state.currentConfiguration.qualifiers || []}\n qualifierTypes={state.currentConfiguration.qualifierTypes || []}\n onUpdateItem={actions.updateQualifier}\n onRemove={actions.removeQualifier}\n onShowAdd={() => setShowAddQualifier(true)}\n onEdit={(item, index) => setEditingQualifier({ item, index })}\n />\n )}\n\n {state.activeTab === 'qualifierTypes' && (\n <QualifierTypesPanel\n qualifierTypes={state.currentConfiguration.qualifierTypes || []}\n onUpdateItem={actions.updateQualifierType}\n onRemove={actions.removeQualifierType}\n onShowAdd={() => setShowAddQualifierType(true)}\n onEdit={(item, index) => setEditingQualifierType({ item, index })}\n />\n )}\n\n {state.activeTab === 'resourceTypes' && (\n <ResourceTypesPanel\n resourceTypes={state.currentConfiguration.resourceTypes || []}\n onUpdateItem={actions.updateResourceType}\n onRemove={actions.removeResourceType}\n onShowAdd={() => setShowAddResourceType(true)}\n onEdit={(item, index) => setEditingResourceType({ item, index })}\n />\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* Hidden file input */}\n <input\n ref={fileInputRef}\n type=\"file\"\n accept=\".json\"\n onChange={(e) => handleFileImport(e.target.files)}\n className=\"hidden\"\n />\n\n {/* Edit Modals */}\n {/* Qualifier Type Choice Modal */}\n {showAddQualifierType && addQualifierTypeMode === null && (\n <div className=\"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50\">\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full\">\n <div className=\"flex items-center justify-between p-6 border-b border-gray-200\">\n <div>\n <h3 className=\"text-lg font-semibold text-gray-900\">Add Qualifier Type</h3>\n <p className=\"text-sm text-gray-600 mt-1\">Choose the type of qualifier to create</p>\n </div>\n <button\n onClick={() => {\n setShowAddQualifierType(false);\n setAddQualifierTypeMode(null);\n }}\n className=\"p-2 text-gray-400 hover:text-gray-600 rounded-lg hover:bg-gray-100\"\n >\n <XMarkIcon className=\"w-6 h-6\" />\n </button>\n </div>\n\n <div className=\"p-6 space-y-4\">\n <button\n onClick={() => setAddQualifierTypeMode('system')}\n className=\"w-full p-4 text-left border-2 border-gray-200 rounded-lg hover:border-blue-300 hover:bg-blue-50 transition-colors\"\n >\n <div className=\"flex items-center\">\n <div className=\"flex-1\">\n <h4 className=\"font-medium text-gray-900 mb-1\">System Qualifier Type</h4>\n <p className=\"text-sm text-gray-600\">\n Built-in types: language, territory, or literal with predefined configuration options\n </p>\n </div>\n <CogIcon className=\"w-6 h-6 text-gray-400 ml-3\" />\n </div>\n </button>\n\n <button\n onClick={() => setAddQualifierTypeMode('custom')}\n className=\"w-full p-4 text-left border-2 border-gray-200 rounded-lg hover:border-orange-300 hover:bg-orange-50 transition-colors\"\n >\n <div className=\"flex items-center\">\n <div className=\"flex-1\">\n <h4 className=\"font-medium text-gray-900 mb-1\">Custom Qualifier Type</h4>\n <p className=\"text-sm text-gray-600\">\n Custom type with JSON configuration for specialized validation logic\n </p>\n </div>\n <DocumentTextIcon className=\"w-6 h-6 text-gray-400 ml-3\" />\n </div>\n </button>\n </div>\n </div>\n </div>\n )}\n\n {/* System Qualifier Type Form */}\n {showAddQualifierType && addQualifierTypeMode === 'system' && (\n <QualifierTypeEditForm\n onSave={(qualifierType) => {\n actions.addQualifierType(qualifierType);\n setShowAddQualifierType(false);\n setAddQualifierTypeMode(null);\n o11y.user.success(`Added system qualifier type: ${qualifierType.name}`);\n }}\n onCancel={() => {\n setShowAddQualifierType(false);\n setAddQualifierTypeMode(null);\n }}\n existingNames={(state.currentConfiguration.qualifierTypes || []).map(\n (qt: QualifierTypes.Config.IAnyQualifierTypeConfig) => qt.name\n )}\n />\n )}\n\n {/* Custom Qualifier Type Form */}\n {showAddQualifierType && addQualifierTypeMode === 'custom' && (\n <GenericQualifierTypeEditForm\n onSave={(qualifierType) => {\n actions.addQualifierType(qualifierType);\n setShowAddQualifierType(false);\n setAddQualifierTypeMode(null);\n o11y.user.success(`Added custom qualifier type: ${qualifierType.name}`);\n }}\n onCancel={() => {\n setShowAddQualifierType(false);\n setAddQualifierTypeMode(null);\n }}\n existingNames={(state.currentConfiguration.qualifierTypes || []).map(\n (qt: QualifierTypes.Config.IAnyQualifierTypeConfig) => qt.name\n )}\n />\n )}\n\n {editingQualifierType &&\n (QualifierTypes.Config.isSystemQualifierTypeConfig(editingQualifierType.item) ? (\n <QualifierTypeEditForm\n qualifierType={editingQualifierType.item}\n onSave={(qualifierType) => {\n actions.updateQualifierType(editingQualifierType.index, qualifierType);\n setEditingQualifierType(null);\n o11y.user.success(`Updated qualifier type: ${qualifierType.name}`);\n }}\n onCancel={() => setEditingQualifierType(null)}\n existingNames={(state.currentConfiguration.qualifierTypes || [])\n .filter(\n (__: QualifierTypes.Config.IAnyQualifierTypeConfig, i: number) =>\n i !== editingQualifierType.index\n )\n .map((qt: QualifierTypes.Config.IAnyQualifierTypeConfig) => qt.name)}\n />\n ) : (\n <GenericQualifierTypeEditForm\n qualifierType={editingQualifierType.item}\n onSave={(qualifierType) => {\n actions.updateQualifierType(editingQualifierType.index, qualifierType);\n setEditingQualifierType(null);\n o11y.user.success(`Updated custom qualifier type: ${qualifierType.name}`);\n }}\n onCancel={() => setEditingQualifierType(null)}\n existingNames={(state.currentConfiguration.qualifierTypes || [])\n .filter(\n (__: QualifierTypes.Config.IAnyQualifierTypeConfig, i: number) =>\n i !== editingQualifierType.index\n )\n .map((qt: QualifierTypes.Config.IAnyQualifierTypeConfig) => qt.name)}\n />\n ))}\n\n {showAddQualifier && (\n <QualifierEditForm\n qualifierTypes={(state.currentConfiguration.qualifierTypes || []).filter(\n QualifierTypes.Config.isSystemQualifierTypeConfig\n )}\n qualifierTypeInstances={qualifierTypeInstances}\n onSave={(qualifier) => {\n actions.addQualifier(qualifier);\n setShowAddQualifier(false);\n o11y.user.success(`Added qualifier: ${qualifier.name}`);\n }}\n onCancel={() => setShowAddQualifier(false)}\n existingNames={(state.currentConfiguration.qualifiers || []).map(\n (q: Qualifiers.IQualifierDecl) => q.name\n )}\n />\n )}\n\n {editingQualifier && (\n <QualifierEditForm\n qualifier={editingQualifier.item}\n qualifierTypes={(state.currentConfiguration.qualifierTypes || []).filter(\n QualifierTypes.Config.isSystemQualifierTypeConfig\n )}\n qualifierTypeInstances={qualifierTypeInstances}\n onSave={(qualifier) => {\n actions.updateQualifier(editingQualifier.index, qualifier);\n setEditingQualifier(null);\n o11y.user.success(`Updated qualifier: ${qualifier.name}`);\n }}\n onCancel={() => setEditingQualifier(null)}\n existingNames={(state.currentConfiguration.qualifiers || [])\n .filter((__: Qualifiers.IQualifierDecl, i: number) => i !== editingQualifier.index)\n .map((q: Qualifiers.IQualifierDecl) => q.name)}\n />\n )}\n\n {showAddResourceType && (\n <ResourceTypeEditForm\n onSave={(resourceType) => {\n actions.addResourceType(resourceType);\n setShowAddResourceType(false);\n o11y.user.success(`Added resource type: ${resourceType.name}`);\n }}\n onCancel={() => setShowAddResourceType(false)}\n existingNames={(state.currentConfiguration.resourceTypes || []).map(\n (rt: ResourceTypes.Config.IResourceTypeConfig) => rt.name\n )}\n />\n )}\n\n {editingResourceType && (\n <ResourceTypeEditForm\n resourceType={editingResourceType.item}\n onSave={(resourceType) => {\n actions.updateResourceType(editingResourceType.index, resourceType);\n setEditingResourceType(null);\n o11y.user.success(`Updated resource type: ${resourceType.name}`);\n }}\n onCancel={() => setEditingResourceType(null)}\n existingNames={(state.currentConfiguration.resourceTypes || [])\n .filter(\n (__: ResourceTypes.Config.IResourceTypeConfig, i: number) => i !== editingResourceType.index\n )\n .map((rt: ResourceTypes.Config.IResourceTypeConfig) => rt.name)}\n />\n )}\n </div>\n );\n};\n\nexport default ConfigurationView;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/views/FilterView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAG9D,OAAO,EAAE,gBAAgB,EAA6B,MAAM,gBAAgB,CAAC;AAiB7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAogBjD,CAAC;AAEF,eAAe,UAAU,CAAC"}
|