@burdenoff/microfe-product 2026.1014.1 → 2026.1109.1
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/dist/generated/global-operations.d.ts +2418 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-operations.js +109 -110
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +22700 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/global-types.js +1 -2
- package/dist/generated/global-types.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +5 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-types.d.ts +49087 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.js +8 -7
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +134 -151
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/errors.js +41 -20
- package/dist/node_modules/zod/v4/classic/errors.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/parse.js +4 -5
- package/dist/node_modules/zod/v4/classic/parse.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/schemas.js +519 -393
- package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -1
- package/dist/node_modules/zod/v4/core/api.js +199 -197
- package/dist/node_modules/zod/v4/core/api.js.map +1 -1
- package/dist/node_modules/zod/v4/core/checks.js +83 -123
- package/dist/node_modules/zod/v4/core/checks.js.map +1 -1
- package/dist/node_modules/zod/v4/core/core.js +70 -35
- package/dist/node_modules/zod/v4/core/core.js.map +1 -1
- package/dist/node_modules/zod/v4/core/doc.js +11 -7
- package/dist/node_modules/zod/v4/core/doc.js.map +1 -1
- package/dist/node_modules/zod/v4/core/errors.js +64 -20
- package/dist/node_modules/zod/v4/core/errors.js.map +1 -1
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +258 -139
- package/dist/node_modules/zod/v4/core/json-schema-processors.js.map +1 -1
- package/dist/node_modules/zod/v4/core/memoizer.js +188 -0
- package/dist/node_modules/zod/v4/core/memoizer.js.map +1 -0
- package/dist/node_modules/zod/v4/core/parse.js +136 -68
- package/dist/node_modules/zod/v4/core/parse.js.map +1 -1
- package/dist/node_modules/zod/v4/core/regexes.js +26 -19
- package/dist/node_modules/zod/v4/core/regexes.js.map +1 -1
- package/dist/node_modules/zod/v4/core/registries.js +2 -3
- package/dist/node_modules/zod/v4/core/registries.js.map +1 -1
- package/dist/node_modules/zod/v4/core/schemas.js +594 -457
- package/dist/node_modules/zod/v4/core/schemas.js.map +1 -1
- package/dist/node_modules/zod/v4/core/to-json-schema.js +204 -100
- package/dist/node_modules/zod/v4/core/to-json-schema.js.map +1 -1
- package/dist/node_modules/zod/v4/core/util.js +296 -142
- package/dist/node_modules/zod/v4/core/util.js.map +1 -1
- package/dist/node_modules/zod/v4/core/versions.js +3 -4
- package/dist/node_modules/zod/v4/core/versions.js.map +1 -1
- package/dist/node_modules/zod/v4/locales/en.js +96 -0
- package/dist/node_modules/zod/v4/locales/en.js.map +1 -0
- package/dist/product/ProductUserRoot.d.ts +4 -0
- package/dist/product/ProductUserRoot.d.ts.map +1 -0
- package/dist/product/ProductUserRoot.js +10 -7
- package/dist/product/ProductUserRoot.js.map +1 -1
- package/dist/product/ProductUserRoutes.d.ts +6 -0
- package/dist/product/ProductUserRoutes.d.ts.map +1 -0
- package/dist/product/ProductUserRoutes.js +1 -2
- package/dist/product/ProductUserRoutes.js.map +1 -1
- package/dist/product/hooks/usePublicContentPage.d.ts +9 -0
- package/dist/product/hooks/usePublicContentPage.d.ts.map +1 -0
- package/dist/product/hooks/usePublicContentPage.js +1 -2
- package/dist/product/hooks/usePublicContentPage.js.map +1 -1
- package/dist/product/hooks/usePublicProduct.d.ts +9 -0
- package/dist/product/hooks/usePublicProduct.d.ts.map +1 -0
- package/dist/product/hooks/usePublicProduct.js +1 -2
- package/dist/product/hooks/usePublicProduct.js.map +1 -1
- package/dist/product/hooks/usePublicProducts.d.ts +21 -0
- package/dist/product/hooks/usePublicProducts.d.ts.map +1 -0
- package/dist/product/hooks/usePublicProducts.js +1 -2
- package/dist/product/hooks/usePublicProducts.js.map +1 -1
- package/dist/product/pages/ContentPageViewPage.d.ts +2 -0
- package/dist/product/pages/ContentPageViewPage.d.ts.map +1 -0
- package/dist/product/pages/ContentPageViewPage.js +5 -6
- package/dist/product/pages/ContentPageViewPage.js.map +1 -1
- package/dist/product/pages/ProductCatalogPage.d.ts +2 -0
- package/dist/product/pages/ProductCatalogPage.d.ts.map +1 -0
- package/dist/product/pages/ProductCatalogPage.js +3 -4
- package/dist/product/pages/ProductCatalogPage.js.map +1 -1
- package/dist/product/pages/ProductViewPage.d.ts +2 -0
- package/dist/product/pages/ProductViewPage.d.ts.map +1 -0
- package/dist/product/pages/ProductViewPage.js +10 -11
- package/dist/product/pages/ProductViewPage.js.map +1 -1
- package/dist/product/pages/UserProductsLandingPage.d.ts +9 -0
- package/dist/product/pages/UserProductsLandingPage.d.ts.map +1 -0
- package/dist/product/pages/UserProductsLandingPage.js +1 -2
- package/dist/product/pages/UserProductsLandingPage.js.map +1 -1
- package/dist/product/providers/ProductUserProvider.d.ts +10 -0
- package/dist/product/providers/ProductUserProvider.d.ts.map +1 -0
- package/dist/product/providers/ProductUserProvider.js +1 -2
- package/dist/product/providers/ProductUserProvider.js.map +1 -1
- package/dist/product/types/index.d.ts +34 -0
- package/dist/product/types/index.d.ts.map +1 -0
- package/dist/product-management/ProductManagementRoot.d.ts +4 -0
- package/dist/product-management/ProductManagementRoot.d.ts.map +1 -0
- package/dist/product-management/ProductManagementRoot.js +9 -6
- package/dist/product-management/ProductManagementRoot.js.map +1 -1
- package/dist/product-management/ProductManagementRoutes.d.ts +6 -0
- package/dist/product-management/ProductManagementRoutes.d.ts.map +1 -0
- package/dist/product-management/ProductManagementRoutes.js +1 -2
- package/dist/product-management/ProductManagementRoutes.js.map +1 -1
- package/dist/product-management/index.d.ts +5 -0
- package/dist/product-management/index.d.ts.map +1 -0
- package/dist/product-management/modules/content-pages/components/ContentPageForm.d.ts +10 -0
- package/dist/product-management/modules/content-pages/components/ContentPageForm.d.ts.map +1 -0
- package/dist/product-management/modules/content-pages/components/ContentPageForm.js +59 -60
- package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
- package/dist/product-management/modules/content-pages/components/ContentPageStatusBadge.d.ts +11 -0
- package/dist/product-management/modules/content-pages/components/ContentPageStatusBadge.d.ts.map +1 -0
- package/dist/product-management/modules/content-pages/components/ContentPageStatusBadge.js +1 -2
- package/dist/product-management/modules/content-pages/components/ContentPageStatusBadge.js.map +1 -1
- package/dist/product-management/modules/content-pages/hooks/useContentPages.d.ts +76 -0
- package/dist/product-management/modules/content-pages/hooks/useContentPages.d.ts.map +1 -0
- package/dist/product-management/modules/content-pages/hooks/useContentPages.js +1 -2
- package/dist/product-management/modules/content-pages/hooks/useContentPages.js.map +1 -1
- package/dist/product-management/modules/content-pages/index.d.ts +15 -0
- package/dist/product-management/modules/content-pages/index.d.ts.map +1 -0
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.d.ts +2 -0
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.d.ts.map +1 -0
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js +3 -3
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.d.ts +6 -0
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.d.ts.map +1 -0
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +19 -20
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.d.ts +2 -0
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.d.ts.map +1 -0
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js +11 -11
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.d.ts +2 -0
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.d.ts.map +1 -0
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +37 -35
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/schemas/index.d.ts +57 -0
- package/dist/product-management/modules/content-pages/schemas/index.d.ts.map +1 -0
- package/dist/product-management/modules/content-pages/schemas/index.js +8 -9
- package/dist/product-management/modules/content-pages/schemas/index.js.map +1 -1
- package/dist/product-management/modules/content-pages/types/index.d.ts +91 -0
- package/dist/product-management/modules/content-pages/types/index.d.ts.map +1 -0
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.d.ts +17 -0
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.d.ts.map +1 -0
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js +10 -11
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js.map +1 -1
- package/dist/product-management/modules/feature-flags/components/FeatureFlagStatusBadge.d.ts +8 -0
- package/dist/product-management/modules/feature-flags/components/FeatureFlagStatusBadge.d.ts.map +1 -0
- package/dist/product-management/modules/feature-flags/components/FeatureFlagStatusBadge.js +1 -2
- package/dist/product-management/modules/feature-flags/components/FeatureFlagStatusBadge.js.map +1 -1
- package/dist/product-management/modules/feature-flags/components/FeatureFlagTypeBadge.d.ts +8 -0
- package/dist/product-management/modules/feature-flags/components/FeatureFlagTypeBadge.d.ts.map +1 -0
- package/dist/product-management/modules/feature-flags/components/FeatureFlagTypeBadge.js +1 -2
- package/dist/product-management/modules/feature-flags/components/FeatureFlagTypeBadge.js.map +1 -1
- package/dist/product-management/modules/feature-flags/hooks/useFeatureFlags.d.ts +59 -0
- package/dist/product-management/modules/feature-flags/hooks/useFeatureFlags.d.ts.map +1 -0
- package/dist/product-management/modules/feature-flags/hooks/useFeatureFlags.js +1 -2
- package/dist/product-management/modules/feature-flags/hooks/useFeatureFlags.js.map +1 -1
- package/dist/product-management/modules/feature-flags/index.d.ts +13 -0
- package/dist/product-management/modules/feature-flags/index.d.ts.map +1 -0
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.d.ts +3 -0
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.d.ts.map +1 -0
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +8 -8
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.d.ts +3 -0
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.d.ts.map +1 -0
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +18 -19
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.d.ts +3 -0
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.d.ts.map +1 -0
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +8 -8
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.d.ts +3 -0
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.d.ts.map +1 -0
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +27 -30
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/schemas/index.d.ts +35 -0
- package/dist/product-management/modules/feature-flags/schemas/index.d.ts.map +1 -0
- package/dist/product-management/modules/feature-flags/schemas/index.js +5 -6
- package/dist/product-management/modules/feature-flags/schemas/index.js.map +1 -1
- package/dist/product-management/modules/feature-flags/types/index.d.ts +101 -0
- package/dist/product-management/modules/feature-flags/types/index.d.ts.map +1 -0
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.d.ts +10 -0
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.d.ts.map +1 -0
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js +23 -24
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
- package/dist/product-management/modules/press-kit/hooks/usePressKitAssets.d.ts +73 -0
- package/dist/product-management/modules/press-kit/hooks/usePressKitAssets.d.ts.map +1 -0
- package/dist/product-management/modules/press-kit/hooks/usePressKitAssets.js +1 -2
- package/dist/product-management/modules/press-kit/hooks/usePressKitAssets.js.map +1 -1
- package/dist/product-management/modules/press-kit/index.d.ts +14 -0
- package/dist/product-management/modules/press-kit/index.d.ts.map +1 -0
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.d.ts +2 -0
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.d.ts.map +1 -0
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js +3 -3
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.d.ts +2 -0
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.d.ts.map +1 -0
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +15 -16
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.d.ts +2 -0
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.d.ts.map +1 -0
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js +11 -11
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.d.ts +2 -0
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.d.ts.map +1 -0
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +34 -32
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/schemas/index.d.ts +60 -0
- package/dist/product-management/modules/press-kit/schemas/index.d.ts.map +1 -0
- package/dist/product-management/modules/press-kit/schemas/index.js +7 -8
- package/dist/product-management/modules/press-kit/schemas/index.js.map +1 -1
- package/dist/product-management/modules/press-kit/types/index.d.ts +73 -0
- package/dist/product-management/modules/press-kit/types/index.d.ts.map +1 -0
- package/dist/product-management/modules/press-kit/types/index.js +1 -2
- package/dist/product-management/modules/press-kit/types/index.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductCard.d.ts +15 -0
- package/dist/product-management/modules/products/components/ProductCard.d.ts.map +1 -0
- package/dist/product-management/modules/products/components/ProductForm.d.ts +10 -0
- package/dist/product-management/modules/products/components/ProductForm.d.ts.map +1 -0
- package/dist/product-management/modules/products/components/ProductForm.js +23 -24
- package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductPlans.d.ts +8 -0
- package/dist/product-management/modules/products/components/ProductPlans.d.ts.map +1 -0
- package/dist/product-management/modules/products/components/ProductPlans.js +26 -24
- package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductStats.d.ts +23 -0
- package/dist/product-management/modules/products/components/ProductStats.d.ts.map +1 -0
- package/dist/product-management/modules/products/components/ProductStatusBadge.d.ts +12 -0
- package/dist/product-management/modules/products/components/ProductStatusBadge.d.ts.map +1 -0
- package/dist/product-management/modules/products/components/ProductStatusBadge.js +1 -2
- package/dist/product-management/modules/products/components/ProductStatusBadge.js.map +1 -1
- package/dist/product-management/modules/products/hooks/useProducts.d.ts +103 -0
- package/dist/product-management/modules/products/hooks/useProducts.d.ts.map +1 -0
- package/dist/product-management/modules/products/hooks/useProducts.js +1 -2
- package/dist/product-management/modules/products/hooks/useProducts.js.map +1 -1
- package/dist/product-management/modules/products/index.d.ts +16 -0
- package/dist/product-management/modules/products/index.d.ts.map +1 -0
- package/dist/product-management/modules/products/pages/ProductCreatePage.d.ts +2 -0
- package/dist/product-management/modules/products/pages/ProductCreatePage.d.ts.map +1 -0
- package/dist/product-management/modules/products/pages/ProductCreatePage.js +3 -3
- package/dist/product-management/modules/products/pages/ProductCreatePage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductDetailPage.d.ts +6 -0
- package/dist/product-management/modules/products/pages/ProductDetailPage.d.ts.map +1 -0
- package/dist/product-management/modules/products/pages/ProductDetailPage.js +21 -22
- package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductEditPage.d.ts +2 -0
- package/dist/product-management/modules/products/pages/ProductEditPage.d.ts.map +1 -0
- package/dist/product-management/modules/products/pages/ProductEditPage.js +11 -12
- package/dist/product-management/modules/products/pages/ProductEditPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductsListPage.d.ts +2 -0
- package/dist/product-management/modules/products/pages/ProductsListPage.d.ts.map +1 -0
- package/dist/product-management/modules/products/pages/ProductsListPage.js +19 -20
- package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
- package/dist/product-management/modules/products/schemas/index.d.ts +61 -0
- package/dist/product-management/modules/products/schemas/index.d.ts.map +1 -0
- package/dist/product-management/modules/products/schemas/index.js +16 -17
- package/dist/product-management/modules/products/schemas/index.js.map +1 -1
- package/dist/product-management/modules/products/types/index.d.ts +115 -0
- package/dist/product-management/modules/products/types/index.d.ts.map +1 -0
- package/dist/product-management/modules/products/types/index.js +1 -2
- package/dist/product-management/modules/products/types/index.js.map +1 -1
- package/dist/product-management/modules/shortcuts/components/ShortcutCategoryBadge.d.ts +6 -0
- package/dist/product-management/modules/shortcuts/components/ShortcutCategoryBadge.d.ts.map +1 -0
- package/dist/product-management/modules/shortcuts/components/ShortcutCategoryBadge.js +1 -2
- package/dist/product-management/modules/shortcuts/components/ShortcutCategoryBadge.js.map +1 -1
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.d.ts +10 -0
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.d.ts.map +1 -0
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +19 -20
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
- package/dist/product-management/modules/shortcuts/components/ShortcutKeyBadge.d.ts +11 -0
- package/dist/product-management/modules/shortcuts/components/ShortcutKeyBadge.d.ts.map +1 -0
- package/dist/product-management/modules/shortcuts/components/ShortcutKeyBadge.js +1 -2
- package/dist/product-management/modules/shortcuts/components/ShortcutKeyBadge.js.map +1 -1
- package/dist/product-management/modules/shortcuts/hooks/useShortcuts.d.ts +85 -0
- package/dist/product-management/modules/shortcuts/hooks/useShortcuts.d.ts.map +1 -0
- package/dist/product-management/modules/shortcuts/hooks/useShortcuts.js +1 -2
- package/dist/product-management/modules/shortcuts/hooks/useShortcuts.js.map +1 -1
- package/dist/product-management/modules/shortcuts/index.d.ts +17 -0
- package/dist/product-management/modules/shortcuts/index.d.ts.map +1 -0
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.d.ts +2 -0
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.d.ts.map +1 -0
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js +3 -3
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.d.ts +2 -0
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.d.ts.map +1 -0
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +25 -26
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.d.ts +2 -0
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.d.ts.map +1 -0
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js +10 -11
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.d.ts +2 -0
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.d.ts.map +1 -0
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +36 -37
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/schemas/index.d.ts +35 -0
- package/dist/product-management/modules/shortcuts/schemas/index.d.ts.map +1 -0
- package/dist/product-management/modules/shortcuts/schemas/index.js +1 -2
- package/dist/product-management/modules/shortcuts/schemas/index.js.map +1 -1
- package/dist/product-management/modules/shortcuts/types/index.d.ts +28 -0
- package/dist/product-management/modules/shortcuts/types/index.d.ts.map +1 -0
- package/dist/product-management/modules/shortcuts/types/index.js +1 -2
- package/dist/product-management/modules/shortcuts/types/index.js.map +1 -1
- package/dist/product-management/providers/ProductConsoleProvider.d.ts +18 -0
- package/dist/product-management/providers/ProductConsoleProvider.d.ts.map +1 -0
- package/dist/product-management/providers/ProductConsoleProvider.js +1 -2
- package/dist/product-management/providers/ProductConsoleProvider.js.map +1 -1
- package/dist/product-management/shared/components/AuditHistoryTab.d.ts +7 -0
- package/dist/product-management/shared/components/AuditHistoryTab.d.ts.map +1 -0
- package/dist/product-management/shared/components/AuditHistoryTab.js +4 -5
- package/dist/product-management/shared/components/AuditHistoryTab.js.map +1 -1
- package/dist/product-management/shared/components/TagList.d.ts +7 -0
- package/dist/product-management/shared/components/TagList.d.ts.map +1 -0
- package/dist/product-management/shared/components/TagList.js +1 -2
- package/dist/product-management/shared/components/TagList.js.map +1 -1
- package/dist/product-management/shared/components/feedback/EmptyState.d.ts +20 -0
- package/dist/product-management/shared/components/feedback/EmptyState.d.ts.map +1 -0
- package/dist/product-management/shared/components/feedback/ErrorState.d.ts +33 -0
- package/dist/product-management/shared/components/feedback/ErrorState.d.ts.map +1 -0
- package/dist/product-management/shared/components/feedback/ErrorState.js +4 -5
- package/dist/product-management/shared/components/feedback/ErrorState.js.map +1 -1
- package/dist/product-management/shared/components/feedback/LoadingState.d.ts +13 -0
- package/dist/product-management/shared/components/feedback/LoadingState.d.ts.map +1 -0
- package/dist/product-management/shared/components/feedback/LoadingState.js +1 -2
- package/dist/product-management/shared/components/feedback/LoadingState.js.map +1 -1
- package/dist/product-management/shared/components/input/ProductCombobox.d.ts +29 -0
- package/dist/product-management/shared/components/input/ProductCombobox.d.ts.map +1 -0
- package/dist/product-management/shared/components/input/ProductCombobox.js +12 -13
- package/dist/product-management/shared/components/input/ProductCombobox.js.map +1 -1
- package/dist/product-management/shared/components/input/SearchInput.d.ts +17 -0
- package/dist/product-management/shared/components/input/SearchInput.d.ts.map +1 -0
- package/dist/product-management/shared/components/input/SearchInput.js +1 -2
- package/dist/product-management/shared/components/input/SearchInput.js.map +1 -1
- package/dist/product-management/shared/components/input/TagInput.d.ts +10 -0
- package/dist/product-management/shared/components/input/TagInput.d.ts.map +1 -0
- package/dist/product-management/shared/components/input/TagInput.js +2 -3
- package/dist/product-management/shared/components/input/TagInput.js.map +1 -1
- package/dist/product-management/shared/hooks/useConfirmDialog.d.ts +22 -0
- package/dist/product-management/shared/hooks/useConfirmDialog.d.ts.map +1 -0
- package/dist/product-management/shared/hooks/useConfirmDialog.js +1 -2
- package/dist/product-management/shared/hooks/useConfirmDialog.js.map +1 -1
- package/dist/product-management/shared/hooks/useDebounced.d.ts +6 -0
- package/dist/product-management/shared/hooks/useDebounced.d.ts.map +1 -0
- package/dist/product-management/shared/hooks/useDebounced.js +1 -2
- package/dist/product-management/shared/hooks/useDebounced.js.map +1 -1
- package/dist/product-management/shared/hooks/useTr.d.ts +17 -0
- package/dist/product-management/shared/hooks/useTr.d.ts.map +1 -0
- package/dist/product-management/shared/hooks/useTr.js +1 -2
- package/dist/product-management/shared/hooks/useTr.js.map +1 -1
- package/dist/product-management/shared/index.d.ts +13 -0
- package/dist/product-management/shared/index.d.ts.map +1 -0
- package/dist/product-management/shared/types/graphql.d.ts +119 -0
- package/dist/product-management/shared/types/graphql.d.ts.map +1 -0
- package/dist/product-management/shared/utils/cn.d.ts +7 -0
- package/dist/product-management/shared/utils/cn.d.ts.map +1 -0
- package/dist/product-management/shared/utils/cn.js +2 -3
- package/dist/product-management/shared/utils/cn.js.map +1 -1
- package/dist/product-management/shared/utils/exportUtils.d.ts +4 -0
- package/dist/product-management/shared/utils/exportUtils.d.ts.map +1 -0
- package/dist/product-management/shared/utils/exportUtils.js +1 -2
- package/dist/product-management/shared/utils/exportUtils.js.map +1 -1
- package/dist/product-management/shared/utils/permission-error.d.ts +13 -0
- package/dist/product-management/shared/utils/permission-error.d.ts.map +1 -0
- package/dist/product-management/shared/utils/permission-error.js +3 -4
- package/dist/product-management/shared/utils/permission-error.js.map +1 -1
- package/dist/product-management/types/index.d.ts +40 -0
- package/dist/product-management/types/index.d.ts.map +1 -0
- package/dist/shared/components/MarkdownEditor.d.ts +16 -0
- package/dist/shared/components/MarkdownEditor.d.ts.map +1 -0
- package/dist/shared/components/MarkdownEditor.js +3 -4
- package/dist/shared/components/MarkdownEditor.js.map +1 -1
- package/dist/shared/components/index.d.ts +11 -0
- package/dist/shared/components/index.d.ts.map +1 -0
- package/dist/shared/components/index.js +5 -4
- package/dist/shared/hooks/useTr.d.ts +2 -0
- package/dist/shared/hooks/useTr.d.ts.map +1 -0
- package/dist/shared/hooks/useTr.js +1 -1
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/utils/formatDate.d.ts +5 -0
- package/dist/shared/utils/formatDate.d.ts.map +1 -0
- package/dist/shared/utils/formatDate.js +1 -2
- package/dist/shared/utils/formatDate.js.map +1 -1
- package/dist/shared/utils/index.d.ts +4 -0
- package/dist/shared/utils/index.d.ts.map +1 -0
- package/dist/shared/utils/isSafeUrl.d.ts +6 -0
- package/dist/shared/utils/isSafeUrl.d.ts.map +1 -0
- package/dist/shared/utils/isSafeUrl.js +1 -2
- package/dist/shared/utils/isSafeUrl.js.map +1 -1
- package/dist/shared/utils/renderMarkdown.d.ts +10 -0
- package/dist/shared/utils/renderMarkdown.d.ts.map +1 -0
- package/dist/translations/en.d.ts +651 -0
- package/dist/translations/en.d.ts.map +1 -0
- package/dist/translations/en.js +1 -2
- package/dist/translations/en.js.map +1 -1
- package/dist/translations/index.d.ts +2 -0
- package/dist/translations/index.d.ts.map +1 -0
- package/dist/utils/nativeBridge.d.ts +3 -0
- package/dist/utils/nativeBridge.d.ts.map +1 -0
- package/dist/utils/nativeBridge.js +1 -2
- package/package.json +33 -21
- package/dist/node_modules/zod/v4/classic/iso.js +0 -33
- package/dist/node_modules/zod/v4/classic/iso.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/product-management/modules/shortcuts/schemas/index.ts"],"sourcesContent":["import { z } from 'zod';\n\n/**\n * Validation schema for creating a keyboard shortcut\n */\nexport const createShortcutSchema = z.object({\n productId: z.string().optional(),\n shortcutKey: z\n .string()\n .min(1, 'Shortcut key is required')\n .max(50, 'Shortcut key must be 50 characters or less'),\n eventName: z\n .string()\n .min(1, 'Event name is required')\n .max(100, 'Event name must be 100 characters or less')\n .regex(\n /^[a-z][a-z0-9:_-]*$/i,\n 'Event name must be alphanumeric with colons, underscores, or hyphens'\n ),\n category: z\n .string()\n .min(1, 'Category is required')\n .max(50, 'Category must be 50 characters or less'),\n label: z.string().min(1, 'Label is required').max(100, 'Label must be 100 characters or less'),\n description: z.string().max(500, 'Description must be 500 characters or less').optional(),\n macKey: z.string().max(50, 'Mac key must be 50 characters or less').optional(),\n windowsKey: z.string().max(50, 'Windows key must be 50 characters or less').optional(),\n isEnabled: z.boolean().optional(),\n isSequence: z.boolean().optional(),\n sortOrder: z.number().int().min(0).optional(),\n});\n\n/**\n * Validation schema for updating a keyboard shortcut\n */\nexport const updateShortcutSchema = z.object({\n shortcutKey: z\n .string()\n .min(1, 'Shortcut key is required')\n .max(50, 'Shortcut key must be 50 characters or less')\n .optional(),\n eventName: z\n .string()\n .min(1, 'Event name is required')\n .max(100, 'Event name must be 100 characters or less')\n .regex(\n /^[a-z][a-z0-9:_-]*$/i,\n 'Event name must be alphanumeric with colons, underscores, or hyphens'\n )\n .optional(),\n category: z\n .string()\n .min(1, 'Category is required')\n .max(50, 'Category must be 50 characters or less')\n .optional(),\n label: z\n .string()\n .min(1, 'Label is required')\n .max(100, 'Label must be 100 characters or less')\n .optional(),\n description: z.string().max(500, 'Description must be 500 characters or less').optional(),\n macKey: z.string().max(50, 'Mac key must be 50 characters or less').optional(),\n windowsKey: z.string().max(50, 'Windows key must be 50 characters or less').optional(),\n isEnabled: z.boolean().optional(),\n isSequence: z.boolean().optional(),\n sortOrder: z.number().int().min(0).optional(),\n});\n\nexport type CreateShortcutFormData = z.infer<typeof createShortcutSchema>;\nexport type UpdateShortcutFormData = z.infer<typeof updateShortcutSchema>;\n"],"mappings":";;AAKA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["z.object","z.string","z.boolean","z.number","createShortcutSchema","object","string","boolean","number","updateShortcutSchema"],"sources":["../../../../../src/product-management/modules/shortcuts/schemas/index.ts"],"sourcesContent":["import { z } from 'zod';\n\n/**\n * Validation schema for creating a keyboard shortcut\n */\nexport const createShortcutSchema = z.object({\n productId: z.string().optional(),\n shortcutKey: z\n .string()\n .min(1, 'Shortcut key is required')\n .max(50, 'Shortcut key must be 50 characters or less'),\n eventName: z\n .string()\n .min(1, 'Event name is required')\n .max(100, 'Event name must be 100 characters or less')\n .regex(\n /^[a-z][a-z0-9:_-]*$/i,\n 'Event name must be alphanumeric with colons, underscores, or hyphens'\n ),\n category: z\n .string()\n .min(1, 'Category is required')\n .max(50, 'Category must be 50 characters or less'),\n label: z.string().min(1, 'Label is required').max(100, 'Label must be 100 characters or less'),\n description: z.string().max(500, 'Description must be 500 characters or less').optional(),\n macKey: z.string().max(50, 'Mac key must be 50 characters or less').optional(),\n windowsKey: z.string().max(50, 'Windows key must be 50 characters or less').optional(),\n isEnabled: z.boolean().optional(),\n isSequence: z.boolean().optional(),\n sortOrder: z.number().int().min(0).optional(),\n});\n\n/**\n * Validation schema for updating a keyboard shortcut\n */\nexport const updateShortcutSchema = z.object({\n shortcutKey: z\n .string()\n .min(1, 'Shortcut key is required')\n .max(50, 'Shortcut key must be 50 characters or less')\n .optional(),\n eventName: z\n .string()\n .min(1, 'Event name is required')\n .max(100, 'Event name must be 100 characters or less')\n .regex(\n /^[a-z][a-z0-9:_-]*$/i,\n 'Event name must be alphanumeric with colons, underscores, or hyphens'\n )\n .optional(),\n category: z\n .string()\n .min(1, 'Category is required')\n .max(50, 'Category must be 50 characters or less')\n .optional(),\n label: z\n .string()\n .min(1, 'Label is required')\n .max(100, 'Label must be 100 characters or less')\n .optional(),\n description: z.string().max(500, 'Description must be 500 characters or less').optional(),\n macKey: z.string().max(50, 'Mac key must be 50 characters or less').optional(),\n windowsKey: z.string().max(50, 'Windows key must be 50 characters or less').optional(),\n isEnabled: z.boolean().optional(),\n isSequence: z.boolean().optional(),\n sortOrder: z.number().int().min(0).optional(),\n});\n\nexport type CreateShortcutFormData = z.infer<typeof createShortcutSchema>;\nexport type UpdateShortcutFormData = z.infer<typeof updateShortcutSchema>;\n"],"mappings":";;AAKA,IAAaI,IAAuBJ,EAAS;CAC3C,WAAWC,EAAS,CAAC,CAAC,SAAS;CAC/B,aAAaA,EACH,CAAC,CACR,IAAI,GAAG,0BAA0B,CAAC,CAClC,IAAI,IAAI,4CAA4C;CACvD,WAAWA,EACD,CAAC,CACR,IAAI,GAAG,wBAAwB,CAAC,CAChC,IAAI,KAAK,2CAA2C,CAAC,CACrD,MACC,wBACA,sEACF;CACF,UAAUA,EACA,CAAC,CACR,IAAI,GAAG,sBAAsB,CAAC,CAC9B,IAAI,IAAI,wCAAwC;CACnD,OAAOA,EAAS,CAAC,CAAC,IAAI,GAAG,mBAAmB,CAAC,CAAC,IAAI,KAAK,sCAAsC;CAC7F,aAAaA,EAAS,CAAC,CAAC,IAAI,KAAK,4CAA4C,CAAC,CAAC,SAAS;CACxF,QAAQA,EAAS,CAAC,CAAC,IAAI,IAAI,uCAAuC,CAAC,CAAC,SAAS;CAC7E,YAAYA,EAAS,CAAC,CAAC,IAAI,IAAI,2CAA2C,CAAC,CAAC,SAAS;CACrF,WAAWC,EAAU,CAAC,CAAC,SAAS;CAChC,YAAYA,EAAU,CAAC,CAAC,SAAS;CACjC,WAAWC,EAAS,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;AAC9C,CAAC,GAKYM,IAAuBT,EAAS;CAC3C,aAAaC,EACH,CAAC,CACR,IAAI,GAAG,0BAA0B,CAAC,CAClC,IAAI,IAAI,4CAA4C,CAAC,CACrD,SAAS;CACZ,WAAWA,EACD,CAAC,CACR,IAAI,GAAG,wBAAwB,CAAC,CAChC,IAAI,KAAK,2CAA2C,CAAC,CACrD,MACC,wBACA,sEACF,CAAC,CACA,SAAS;CACZ,UAAUA,EACA,CAAC,CACR,IAAI,GAAG,sBAAsB,CAAC,CAC9B,IAAI,IAAI,wCAAwC,CAAC,CACjD,SAAS;CACZ,OAAOA,EACG,CAAC,CACR,IAAI,GAAG,mBAAmB,CAAC,CAC3B,IAAI,KAAK,sCAAsC,CAAC,CAChD,SAAS;CACZ,aAAaA,EAAS,CAAC,CAAC,IAAI,KAAK,4CAA4C,CAAC,CAAC,SAAS;CACxF,QAAQA,EAAS,CAAC,CAAC,IAAI,IAAI,uCAAuC,CAAC,CAAC,SAAS;CAC7E,YAAYA,EAAS,CAAC,CAAC,IAAI,IAAI,2CAA2C,CAAC,CAAC,SAAS;CACrF,WAAWC,EAAU,CAAC,CAAC,SAAS;CAChC,YAAYA,EAAU,CAAC,CAAC,SAAS;CACjC,WAAWC,EAAS,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;AAC9C,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shortcuts Module Types
|
|
3
|
+
* Aligned with backend KeyboardShortcut schema
|
|
4
|
+
*/
|
|
5
|
+
export type { KeyboardShortcut, KeyboardShortcutList, KeyboardShortcutFilterInput, CreateKeyboardShortcutInput, UpdateKeyboardShortcutInput, } from '../../../../generated/global-types';
|
|
6
|
+
export declare const ShortcutCategories: {
|
|
7
|
+
readonly NAVIGATION: "Navigation";
|
|
8
|
+
readonly SEARCH: "Search";
|
|
9
|
+
readonly UI: "UI";
|
|
10
|
+
readonly HELP: "Help";
|
|
11
|
+
readonly ACTIONS: "Actions";
|
|
12
|
+
readonly EDITING: "Editing";
|
|
13
|
+
};
|
|
14
|
+
export type ShortcutCategory = (typeof ShortcutCategories)[keyof typeof ShortcutCategories];
|
|
15
|
+
export interface ShortcutFormData {
|
|
16
|
+
productId?: string;
|
|
17
|
+
shortcutKey: string;
|
|
18
|
+
eventName: string;
|
|
19
|
+
category: string;
|
|
20
|
+
label: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
macKey?: string;
|
|
23
|
+
windowsKey?: string;
|
|
24
|
+
isEnabled: boolean;
|
|
25
|
+
isSequence?: boolean;
|
|
26
|
+
sortOrder?: number;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/product-management/modules/shortcuts/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,2BAA2B,EAC3B,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,oCAAoC,CAAC;AAG5C,eAAO,MAAM,kBAAkB;;;;;;;CAOrB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAG5F,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/product-management/modules/shortcuts/types/index.ts
|
|
2
2
|
var e = {
|
|
3
3
|
NAVIGATION: "Navigation",
|
|
4
4
|
SEARCH: "Search",
|
|
@@ -7,7 +7,6 @@ var e = {
|
|
|
7
7
|
ACTIONS: "Actions",
|
|
8
8
|
EDITING: "Editing"
|
|
9
9
|
};
|
|
10
|
-
//#endregion
|
|
11
10
|
export { e as ShortcutCategories };
|
|
12
11
|
|
|
13
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/product-management/modules/shortcuts/types/index.ts"],"sourcesContent":["/**\n * Shortcuts Module Types\n * Aligned with backend KeyboardShortcut schema\n */\n\n// Re-export generated types from GraphQL\nexport type {\n KeyboardShortcut,\n KeyboardShortcutList,\n KeyboardShortcutFilterInput,\n CreateKeyboardShortcutInput,\n UpdateKeyboardShortcutInput,\n} from '../../../../generated/global-types';\n\n// Shortcut categories for UI display\nexport const ShortcutCategories = {\n NAVIGATION: 'Navigation',\n SEARCH: 'Search',\n UI: 'UI',\n HELP: 'Help',\n ACTIONS: 'Actions',\n EDITING: 'Editing',\n} as const;\n\nexport type ShortcutCategory = (typeof ShortcutCategories)[keyof typeof ShortcutCategories];\n\n// Helper type for form data\nexport interface ShortcutFormData {\n productId?: string;\n shortcutKey: string;\n eventName: string;\n category: string;\n label: string;\n description?: string;\n macKey?: string;\n windowsKey?: string;\n isEnabled: boolean;\n isSequence?: boolean;\n sortOrder?: number;\n}\n"],"mappings":";AAeA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["ShortcutCategories"],"sources":["../../../../../src/product-management/modules/shortcuts/types/index.ts"],"sourcesContent":["/**\n * Shortcuts Module Types\n * Aligned with backend KeyboardShortcut schema\n */\n\n// Re-export generated types from GraphQL\nexport type {\n KeyboardShortcut,\n KeyboardShortcutList,\n KeyboardShortcutFilterInput,\n CreateKeyboardShortcutInput,\n UpdateKeyboardShortcutInput,\n} from '../../../../generated/global-types';\n\n// Shortcut categories for UI display\nexport const ShortcutCategories = {\n NAVIGATION: 'Navigation',\n SEARCH: 'Search',\n UI: 'UI',\n HELP: 'Help',\n ACTIONS: 'Actions',\n EDITING: 'Editing',\n} as const;\n\nexport type ShortcutCategory = (typeof ShortcutCategories)[keyof typeof ShortcutCategories];\n\n// Helper type for form data\nexport interface ShortcutFormData {\n productId?: string;\n shortcutKey: string;\n eventName: string;\n category: string;\n label: string;\n description?: string;\n macKey?: string;\n windowsKey?: string;\n isEnabled: boolean;\n isSequence?: boolean;\n sortOrder?: number;\n}\n"],"mappings":";AAeA,IAAaA,IAAqB;CAChC,YAAY;CACZ,QAAQ;CACR,IAAI;CACJ,MAAM;CACN,SAAS;CACT,SAAS;AACX"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ProductManagementRootProps } from '../types';
|
|
3
|
+
type ProductConsoleContextValue = ProductManagementRootProps;
|
|
4
|
+
export interface ProductConsoleProviderProps extends ProductManagementRootProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* ProductConsoleProvider
|
|
9
|
+
* Provides global console context to all child components
|
|
10
|
+
*/
|
|
11
|
+
export declare function ProductConsoleProvider({ children, ...props }: ProductConsoleProviderProps): import("react").JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* Hook to access global console context
|
|
14
|
+
* @throws Error if used outside ProductConsoleProvider
|
|
15
|
+
*/
|
|
16
|
+
export declare function useProductConsole(): ProductConsoleContextValue;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=ProductConsoleProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductConsoleProvider.d.ts","sourceRoot":"","sources":["../../../src/product-management/providers/ProductConsoleProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAE3D,KAAK,0BAA0B,GAAG,0BAA0B,CAAC;AAI7D,MAAM,WAAW,2BAA4B,SAAQ,0BAA0B;IAC7E,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,2BAA2B,+BAEzF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,0BAA0B,CAM9D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext as e, use as t } from "react";
|
|
2
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/product-management/providers/ProductConsoleProvider.tsx
|
|
4
4
|
var r = e(null);
|
|
5
5
|
function i({ children: e, ...t }) {
|
|
6
6
|
return /* @__PURE__ */ n(r.Provider, {
|
|
@@ -13,7 +13,6 @@ function a() {
|
|
|
13
13
|
if (!e) throw Error("useProductConsole must be used within ProductConsoleProvider");
|
|
14
14
|
return e;
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
16
|
export { i as ProductConsoleProvider, a as useProductConsole };
|
|
18
17
|
|
|
19
18
|
//# sourceMappingURL=ProductConsoleProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductConsoleProvider.js","names":[],"sources":["../../../src/product-management/providers/ProductConsoleProvider.tsx"],"sourcesContent":["import { createContext, use, type ReactNode } from 'react';\nimport type { ProductManagementRootProps } from '../types';\n\ntype ProductConsoleContextValue = ProductManagementRootProps;\n\nconst ProductConsoleContext = createContext<ProductConsoleContextValue | null>(null);\n\nexport interface ProductConsoleProviderProps extends ProductManagementRootProps {\n children: ReactNode;\n}\n\n/**\n * ProductConsoleProvider\n * Provides global console context to all child components\n */\nexport function ProductConsoleProvider({ children, ...props }: ProductConsoleProviderProps) {\n return <ProductConsoleContext.Provider value={props}>{children}</ProductConsoleContext.Provider>;\n}\n\n/**\n * Hook to access global console context\n * @throws Error if used outside ProductConsoleProvider\n */\nexport function useProductConsole(): ProductConsoleContextValue {\n const context = use(ProductConsoleContext);\n if (!context) {\n throw new Error('useProductConsole must be used within ProductConsoleProvider');\n }\n return context;\n}\n"],"mappings":";;;AAKA,
|
|
1
|
+
{"version":3,"file":"ProductConsoleProvider.js","names":["ProductConsoleContext","createContext","ProductConsoleProvider","props","useProductConsole","context","use"],"sources":["../../../src/product-management/providers/ProductConsoleProvider.tsx"],"sourcesContent":["import { createContext, use, type ReactNode } from 'react';\nimport type { ProductManagementRootProps } from '../types';\n\ntype ProductConsoleContextValue = ProductManagementRootProps;\n\nconst ProductConsoleContext = createContext<ProductConsoleContextValue | null>(null);\n\nexport interface ProductConsoleProviderProps extends ProductManagementRootProps {\n children: ReactNode;\n}\n\n/**\n * ProductConsoleProvider\n * Provides global console context to all child components\n */\nexport function ProductConsoleProvider({ children, ...props }: ProductConsoleProviderProps) {\n return <ProductConsoleContext.Provider value={props}>{children}</ProductConsoleContext.Provider>;\n}\n\n/**\n * Hook to access global console context\n * @throws Error if used outside ProductConsoleProvider\n */\nexport function useProductConsole(): ProductConsoleContextValue {\n const context = use(ProductConsoleContext);\n if (!context) {\n throw new Error('useProductConsole must be used within ProductConsoleProvider');\n }\n return context;\n}\n"],"mappings":";;;AAKA,IAAMA,IAAwBC,EAAiD,IAAI;AAUnF,SAAgBC,EAAuB,EAAE,aAAU,GAAGC,KAAsC;CAC1F,OAAO,kBAACH,EAAsB,UAAvB;EAAgC,OAAOG;EAAQ;CAAyC,CAAA;AACjG;AAMA,SAAgBC,IAAgD;CAC9D,IAAMC,IAAUC,EAAIN,CAAqB;CACzC,IAAI,CAACK,GACH,MAAU,MAAM,8DAA8D;CAEhF,OAAOA;AACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuditHistoryTab.d.ts","sourceRoot":"","sources":["../../../../src/product-management/shared/components/AuditHistoryTab.tsx"],"names":[],"mappings":"AAYA,UAAU,oBAAoB;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,oBAAoB,+BA4EjF"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetEntityActivityLogsDocument as e } from "../../../generated/global-operations.js";
|
|
2
2
|
import { LoadingState as t } from "./feedback/LoadingState.js";
|
|
3
|
-
import {
|
|
3
|
+
import { useTr as n } from "../hooks/useTr.js";
|
|
4
4
|
import { AlertCircle as r, Clock as i, User as a } from "lucide-react";
|
|
5
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
6
|
import { IllustratedEmptyState as c } from "@burdenoff/fe-libs/ui";
|
|
7
7
|
import { useQuery as l } from "@apollo/client/react";
|
|
8
|
-
|
|
8
|
+
// src/product-management/shared/components/AuditHistoryTab.tsx
|
|
9
9
|
function u({ resourceId: u, resourceType: d }) {
|
|
10
|
-
let f =
|
|
10
|
+
let f = n(), { data: p, loading: m, error: h } = l(e, {
|
|
11
11
|
variables: {
|
|
12
12
|
resourceId: u,
|
|
13
13
|
resourceType: d,
|
|
@@ -77,7 +77,6 @@ function u({ resourceId: u, resourceType: d }) {
|
|
|
77
77
|
}, e.id))
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
//#endregion
|
|
81
80
|
export { u as AuditHistoryTab };
|
|
82
81
|
|
|
83
82
|
//# sourceMappingURL=AuditHistoryTab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuditHistoryTab.js","names":[],"sources":["../../../../src/product-management/shared/components/AuditHistoryTab.tsx"],"sourcesContent":["import { useQuery } from '@apollo/client/react';\nimport { Clock, User, AlertCircle } from 'lucide-react';\nimport { IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport {\n GetEntityActivityLogsDocument,\n type GetEntityActivityLogsQuery,\n} from '../../../generated/global-operations';\nimport { LoadingState } from './feedback/LoadingState';\nimport { useTr } from '../hooks/useTr';\n\ntype ActivityLog = NonNullable<GetEntityActivityLogsQuery['activityLogs']['nodes'][number]>;\n\ninterface AuditHistoryTabProps {\n resourceId: string;\n resourceType: string;\n}\n\nexport function AuditHistoryTab({ resourceId, resourceType }: AuditHistoryTabProps) {\n const tr = useTr();\n const { data, loading, error } = useQuery(GetEntityActivityLogsDocument, {\n variables: { resourceId, resourceType, limit: 50, offset: 0 },\n fetchPolicy: 'cache-and-network',\n });\n\n if (loading)\n return <LoadingState message={tr('auditHistory.loading', 'Loading activity history…')} />;\n\n if (error) {\n return (\n <div className=\"flex items-center gap-2 text-[var(--color-status-error)] p-4\">\n <AlertCircle size={16} />\n <span className=\"text-sm\">{error.message}</span>\n </div>\n );\n }\n\n const logs = data?.activityLogs?.nodes ?? [];\n\n if (logs.length === 0) {\n return (\n <IllustratedEmptyState\n illustration=\"empty-notifications\"\n title={tr('auditHistory.noActivityTitle', 'No activity yet')}\n description={tr(\n 'auditHistory.noActivityDescription',\n 'Changes to this item — who edited what and when — will appear here as they happen.'\n )}\n />\n );\n }\n\n const formatDate = (dateString: string) =>\n new Date(dateString).toLocaleString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n\n return (\n <div className=\"divide-y divide-border-seam\">\n {logs.map((log: ActivityLog) => (\n <div\n key={log.id}\n className=\"flex items-start gap-3 px-4 py-3 hover:bg-bg-sunken transition-colors\"\n >\n <div className=\"size-8 rounded-full bg-[var(--color-status-info-subtle)] flex items-center justify-center shrink-0\">\n <User size={14} className=\"text-[var(--color-status-info)]\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm text-text-primary\">\n <span className=\"font-medium\">\n {log.actorId ?? tr('auditHistory.actorFallback', 'system')}\n </span>{' '}\n <span className=\"text-text-secondary\">{log.description ?? log.action}</span>\n </p>\n {log.metadata &&\n typeof log.metadata === 'object' &&\n Object.keys(log.metadata as object).length > 0 && (\n <p className=\"text-xs text-text-tertiary font-mono mt-0.5 truncate\">\n {JSON.stringify(log.metadata)}\n </p>\n )}\n </div>\n <div className=\"flex items-center gap-1 text-xs text-text-tertiary shrink-0\">\n <Clock size={12} />\n <span>{formatDate(log.createdAt)}</span>\n </div>\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAiBA,
|
|
1
|
+
{"version":3,"file":"AuditHistoryTab.js","names":["AuditHistoryTab","tr","useTr","useQuery","GetEntityActivityLogsDocument","loading","LoadingState","error","AlertCircle","logs","data","IllustratedEmptyState","formatDate","dateString","User","log","Clock"],"sources":["../../../../src/product-management/shared/components/AuditHistoryTab.tsx"],"sourcesContent":["import { useQuery } from '@apollo/client/react';\nimport { Clock, User, AlertCircle } from 'lucide-react';\nimport { IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport {\n GetEntityActivityLogsDocument,\n type GetEntityActivityLogsQuery,\n} from '../../../generated/global-operations';\nimport { LoadingState } from './feedback/LoadingState';\nimport { useTr } from '../hooks/useTr';\n\ntype ActivityLog = NonNullable<GetEntityActivityLogsQuery['activityLogs']['nodes'][number]>;\n\ninterface AuditHistoryTabProps {\n resourceId: string;\n resourceType: string;\n}\n\nexport function AuditHistoryTab({ resourceId, resourceType }: AuditHistoryTabProps) {\n const tr = useTr();\n const { data, loading, error } = useQuery(GetEntityActivityLogsDocument, {\n variables: { resourceId, resourceType, limit: 50, offset: 0 },\n fetchPolicy: 'cache-and-network',\n });\n\n if (loading)\n return <LoadingState message={tr('auditHistory.loading', 'Loading activity history…')} />;\n\n if (error) {\n return (\n <div className=\"flex items-center gap-2 text-[var(--color-status-error)] p-4\">\n <AlertCircle size={16} />\n <span className=\"text-sm\">{error.message}</span>\n </div>\n );\n }\n\n const logs = data?.activityLogs?.nodes ?? [];\n\n if (logs.length === 0) {\n return (\n <IllustratedEmptyState\n illustration=\"empty-notifications\"\n title={tr('auditHistory.noActivityTitle', 'No activity yet')}\n description={tr(\n 'auditHistory.noActivityDescription',\n 'Changes to this item — who edited what and when — will appear here as they happen.'\n )}\n />\n );\n }\n\n const formatDate = (dateString: string) =>\n new Date(dateString).toLocaleString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n\n return (\n <div className=\"divide-y divide-border-seam\">\n {logs.map((log: ActivityLog) => (\n <div\n key={log.id}\n className=\"flex items-start gap-3 px-4 py-3 hover:bg-bg-sunken transition-colors\"\n >\n <div className=\"size-8 rounded-full bg-[var(--color-status-info-subtle)] flex items-center justify-center shrink-0\">\n <User size={14} className=\"text-[var(--color-status-info)]\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm text-text-primary\">\n <span className=\"font-medium\">\n {log.actorId ?? tr('auditHistory.actorFallback', 'system')}\n </span>{' '}\n <span className=\"text-text-secondary\">{log.description ?? log.action}</span>\n </p>\n {log.metadata &&\n typeof log.metadata === 'object' &&\n Object.keys(log.metadata as object).length > 0 && (\n <p className=\"text-xs text-text-tertiary font-mono mt-0.5 truncate\">\n {JSON.stringify(log.metadata)}\n </p>\n )}\n </div>\n <div className=\"flex items-center gap-1 text-xs text-text-tertiary shrink-0\">\n <Clock size={12} />\n <span>{formatDate(log.createdAt)}</span>\n </div>\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAiBA,SAAgBA,EAAgB,EAAE,eAAY,mBAAsC;CAClF,IAAMC,IAAKC,EAAM,GACX,EAAE,SAAM,YAAS,aAAUC,EAASC,GAA+B;EACvE,WAAW;GAAE;GAAY;GAAc,OAAO;GAAI,QAAQ;EAAE;EAC5D,aAAa;CACf,CAAC;CAED,IAAIC,GACF,OAAO,kBAACC,GAAD,EAAc,SAASL,EAAG,wBAAwB,2BAA2B,EAAI,CAAA;CAE1F,IAAIM,GACF,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAACC,GAAD,EAAa,MAAM,GAAK,CAAA,GACxB,kBAAC,QAAD;GAAM,WAAU;GAAW,UAAAD,EAAM;EAAc,CAAA,CAC5C;;CAIT,IAAME,IAAOC,GAAM,cAAc,SAAS,CAAC;CAE3C,IAAID,EAAK,WAAW,GAClB,OACE,kBAACE,GAAD;EACE,cAAa;EACb,OAAOV,EAAG,gCAAgC,iBAAiB;EAC3D,aAAaA,EACX,sCACA,oFACF;CACD,CAAA;CAIL,IAAMW,KAAc,MAClB,IAAI,KAAKC,CAAU,CAAC,CAAC,eAAe,SAAS;EAC3C,MAAM;EACN,OAAO;EACP,KAAK;EACL,MAAM;EACN,QAAQ;CACV,CAAC;CAEH,OACE,kBAAC,OAAD;EAAK,WAAU;EACZ,UAAAJ,EAAK,KAAK,MACT,kBAAC,OAAD;GAEE,WAAU;GAFZ,UAAA;IAIE,kBAAC,OAAD;KAAK,WAAU;KACb,UAAA,kBAACK,GAAD;MAAM,MAAM;MAAI,WAAU;KAAmC,CAAA;IAC1D,CAAA;IACL,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,kBAAC,KAAD;MAAG,WAAU;MAAb,UAAA;OACE,kBAAC,QAAD;QAAM,WAAU;QACb,UAAAC,EAAI,WAAWd,EAAG,8BAA8B,QAAQ;OACrD,CAAA;OAAE;OACR,kBAAC,QAAD;QAAM,WAAU;QAAuB,UAAAc,EAAI,eAAeA,EAAI;OAAa,CAAA;MAC1E;KACF,CAAA,GAAAA,EAAI,YACH,OAAOA,EAAI,YAAa,YACxB,OAAO,KAAKA,EAAI,QAAkB,CAAC,CAAC,SAAS,KAC3C,kBAAC,KAAD;MAAG,WAAU;MACV,UAAA,KAAK,UAAUA,EAAI,QAAQ;KAC3B,CAAA,CAEJ;;IACL,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,kBAACC,GAAD,EAAO,MAAM,GAAK,CAAA,GAClB,kBAAC,QAAD,EAAA,UAAOJ,EAAWG,EAAI,SAAS,EAAQ,CAAA,CACpC;;GACF;EAzBE,GAAAA,EAAI,EAyBN,CACN;CACE,CAAA;AAET"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagList.d.ts","sourceRoot":"","sources":["../../../../src/product-management/shared/components/TagList.tsx"],"names":[],"mappings":"AAAA,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,SAAc,EAAE,EAAE,YAAY,sCAmB7D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
// src/product-management/shared/components/TagList.tsx
|
|
3
3
|
function t({ tags: t, className: n = "" }) {
|
|
4
4
|
return !t || t.length === 0 ? null : /* @__PURE__ */ e("div", {
|
|
5
5
|
className: `flex flex-wrap gap-1 ${n}`,
|
|
@@ -9,7 +9,6 @@ function t({ tags: t, className: n = "" }) {
|
|
|
9
9
|
}, t))
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
//#endregion
|
|
13
12
|
export { t as TagList };
|
|
14
13
|
|
|
15
14
|
//# sourceMappingURL=TagList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagList.js","names":[],"sources":["../../../../src/product-management/shared/components/TagList.tsx"],"sourcesContent":["interface TagListProps {\n tags: string[];\n className?: string;\n}\n\nexport function TagList({ tags, className = '' }: TagListProps) {\n if (!tags || tags.length === 0) return null;\n return (\n <div className={`flex flex-wrap gap-1 ${className}`}>\n {tags.map((tag) => (\n <span\n key={tag}\n className=\"\n inline-flex items-center px-2 py-0.5\n bg-[var(--color-status-info-subtle)]\n text-[var(--color-status-info)]\n text-xs font-medium rounded-full\n \"\n >\n {tag}\n </span>\n ))}\n </div>\n );\n}\n"],"mappings":";;AAKA,
|
|
1
|
+
{"version":3,"file":"TagList.js","names":["TagList","tags","className","tag"],"sources":["../../../../src/product-management/shared/components/TagList.tsx"],"sourcesContent":["interface TagListProps {\n tags: string[];\n className?: string;\n}\n\nexport function TagList({ tags, className = '' }: TagListProps) {\n if (!tags || tags.length === 0) return null;\n return (\n <div className={`flex flex-wrap gap-1 ${className}`}>\n {tags.map((tag) => (\n <span\n key={tag}\n className=\"\n inline-flex items-center px-2 py-0.5\n bg-[var(--color-status-info-subtle)]\n text-[var(--color-status-info)]\n text-xs font-medium rounded-full\n \"\n >\n {tag}\n </span>\n ))}\n </div>\n );\n}\n"],"mappings":";;AAKA,SAAgBA,EAAQ,EAAE,SAAM,eAAY,MAAoB;CAE9D,OADI,CAACC,KAAQA,EAAK,WAAW,IAAU,OAErC,kBAAC,OAAD;EAAK,WAAW,wBAAwBC;EACrC,UAAAD,EAAK,KAAK,MACT,kBAAC,QAAD;GAEE,WAAU;GAOT,UAAAE;EACG,GATCA,CASD,CACP;CACE,CAAA;AAET"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface EmptyStateProps {
|
|
3
|
+
icon: ReactNode;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
action?: {
|
|
7
|
+
label: string;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Local wrapper around the canonical `EmptyState` from `@burdenoff/fe-libs/ui`.
|
|
13
|
+
*
|
|
14
|
+
* Maps the legacy microfe-product local shape (`action: { label, onClick }`)
|
|
15
|
+
* onto the canonical shape (`action: ReactNode`). Keeps existing call sites
|
|
16
|
+
* stable while routing all empty-state rendering through the shared primitive.
|
|
17
|
+
*/
|
|
18
|
+
export declare function EmptyState({ icon, title, description, action }: EmptyStateProps): import("react").JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../../../src/product-management/shared/components/feedback/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,eAAe;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB,CAAC;CACH;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,eAAe,+BA2B/E"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
interface ErrorStateProps {
|
|
2
|
+
title?: string;
|
|
3
|
+
message: string;
|
|
4
|
+
/**
|
|
5
|
+
* The raw error, when the caller has it. Lets this component tell a denial
|
|
6
|
+
* apart from a genuine failure via the GraphQL `extensions.code` rather than
|
|
7
|
+
* guessing from the message.
|
|
8
|
+
*/
|
|
9
|
+
error?: unknown;
|
|
10
|
+
action?: {
|
|
11
|
+
label: string;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
};
|
|
14
|
+
/** Copy for the access-denied variant; English defaults, translate at the call site. */
|
|
15
|
+
deniedTitle?: string;
|
|
16
|
+
deniedMessage?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* ErrorState — generic error display.
|
|
20
|
+
*
|
|
21
|
+
* Defaults are translated through the i18n provider. Callers can pass
|
|
22
|
+
* explicit `title`, `deniedTitle`, and `deniedMessage` props when they need
|
|
23
|
+
* a context-specific string from another namespace.
|
|
24
|
+
*
|
|
25
|
+
* A permission denial renders as its own state: these screens read the platform
|
|
26
|
+
* product catalog, which is restricted to super admins, so a normal user who
|
|
27
|
+
* lands here is not looking at a broken page. Showing "Something went wrong"
|
|
28
|
+
* over a Retry button that can never succeed invites them to sit there
|
|
29
|
+
* retrying, so the denial says what it is and drops the action.
|
|
30
|
+
*/
|
|
31
|
+
export declare function ErrorState({ title, message, error, action, deniedTitle, deniedMessage, }: ErrorStateProps): import("react").JSX.Element;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=ErrorState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorState.d.ts","sourceRoot":"","sources":["../../../../../src/product-management/shared/components/feedback/ErrorState.tsx"],"names":[],"mappings":"AAKA,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB,CAAC;IACF,wFAAwF;IACxF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,OAAO,EACP,KAAK,EACL,MAAM,EACN,WAAW,EACX,aAAa,GACd,EAAE,eAAe,+BAgDjB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { isPermissionDeniedError as e } from "../../utils/permission-error.js";
|
|
2
|
+
import { useTr as t } from "../../hooks/useTr.js";
|
|
3
3
|
import { AlertCircle as n, Lock as r } from "lucide-react";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/product-management/shared/components/feedback/ErrorState.tsx
|
|
6
6
|
function o({ title: o, message: s, error: c, action: l, deniedTitle: u, deniedMessage: d }) {
|
|
7
|
-
let f =
|
|
7
|
+
let f = t(), p = o ?? f("errorState.title", "Something went wrong"), m = u ?? f("errorState.deniedTitle", "You don't have access"), h = d ?? f("errorState.deniedMessage", "This area is restricted to platform administrators."), g = e(c, s);
|
|
8
8
|
return /* @__PURE__ */ a("div", {
|
|
9
9
|
className: "flex flex-col items-center justify-center py-12 text-center animate-in fade-in duration-200",
|
|
10
10
|
children: [
|
|
@@ -35,7 +35,6 @@ function o({ title: o, message: s, error: c, action: l, deniedTitle: u, deniedMe
|
|
|
35
35
|
]
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { o as ErrorState };
|
|
40
39
|
|
|
41
40
|
//# sourceMappingURL=ErrorState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorState.js","names":[],"sources":["../../../../../src/product-management/shared/components/feedback/ErrorState.tsx"],"sourcesContent":["import { AlertCircle, Lock } from 'lucide-react';\n\nimport { isPermissionDeniedError } from '../../utils/permission-error';\nimport { useTr } from '../../hooks/useTr';\n\ninterface ErrorStateProps {\n title?: string;\n message: string;\n /**\n * The raw error, when the caller has it. Lets this component tell a denial\n * apart from a genuine failure via the GraphQL `extensions.code` rather than\n * guessing from the message.\n */\n error?: unknown;\n action?: {\n label: string;\n onClick: () => void;\n };\n /** Copy for the access-denied variant; English defaults, translate at the call site. */\n deniedTitle?: string;\n deniedMessage?: string;\n}\n\n/**\n * ErrorState — generic error display.\n *\n * Defaults are translated through the i18n provider. Callers can pass\n * explicit `title`, `deniedTitle`, and `deniedMessage` props when they need\n * a context-specific string from another namespace.\n *\n * A permission denial renders as its own state: these screens read the platform\n * product catalog, which is restricted to super admins, so a normal user who\n * lands here is not looking at a broken page. Showing \"Something went wrong\"\n * over a Retry button that can never succeed invites them to sit there\n * retrying, so the denial says what it is and drops the action.\n */\nexport function ErrorState({\n title,\n message,\n error,\n action,\n deniedTitle,\n deniedMessage,\n}: ErrorStateProps) {\n const tr = useTr();\n const resolvedTitle = title ?? tr('errorState.title', 'Something went wrong');\n const resolvedDeniedTitle = deniedTitle ?? tr('errorState.deniedTitle', \"You don't have access\");\n const resolvedDeniedMessage =\n deniedMessage ??\n tr('errorState.deniedMessage', 'This area is restricted to platform administrators.');\n\n const denied = isPermissionDeniedError(error, message);\n\n return (\n <div className=\"flex flex-col items-center justify-center py-12 text-center animate-in fade-in duration-200\">\n <div\n className={`size-16 rounded-full flex items-center justify-center mb-4 ${\n denied ? 'bg-[var(--color-bg-subtle)]' : 'bg-[var(--color-status-error-subtle)]'\n }`}\n >\n {denied ? (\n <Lock size={32} className=\"text-text-tertiary\" />\n ) : (\n <AlertCircle size={32} className=\"text-[var(--color-status-error)]\" />\n )}\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">\n {denied ? resolvedDeniedTitle : resolvedTitle}\n </h3>\n <p className=\"text-sm text-text-tertiary mb-6 max-w-md\">\n {denied ? resolvedDeniedMessage : message}\n </p>\n {action && !denied && (\n <button\n type=\"button\"\n onClick={action.onClick}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90\n transition-all duration-200\n font-medium\n \"\n >\n {action.label}\n </button>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;AAoCA,
|
|
1
|
+
{"version":3,"file":"ErrorState.js","names":["ErrorState","tr","useTr","resolvedTitle","title","resolvedDeniedTitle","deniedTitle","resolvedDeniedMessage","deniedMessage","denied","isPermissionDeniedError","error","message","Lock","AlertCircle","action"],"sources":["../../../../../src/product-management/shared/components/feedback/ErrorState.tsx"],"sourcesContent":["import { AlertCircle, Lock } from 'lucide-react';\n\nimport { isPermissionDeniedError } from '../../utils/permission-error';\nimport { useTr } from '../../hooks/useTr';\n\ninterface ErrorStateProps {\n title?: string;\n message: string;\n /**\n * The raw error, when the caller has it. Lets this component tell a denial\n * apart from a genuine failure via the GraphQL `extensions.code` rather than\n * guessing from the message.\n */\n error?: unknown;\n action?: {\n label: string;\n onClick: () => void;\n };\n /** Copy for the access-denied variant; English defaults, translate at the call site. */\n deniedTitle?: string;\n deniedMessage?: string;\n}\n\n/**\n * ErrorState — generic error display.\n *\n * Defaults are translated through the i18n provider. Callers can pass\n * explicit `title`, `deniedTitle`, and `deniedMessage` props when they need\n * a context-specific string from another namespace.\n *\n * A permission denial renders as its own state: these screens read the platform\n * product catalog, which is restricted to super admins, so a normal user who\n * lands here is not looking at a broken page. Showing \"Something went wrong\"\n * over a Retry button that can never succeed invites them to sit there\n * retrying, so the denial says what it is and drops the action.\n */\nexport function ErrorState({\n title,\n message,\n error,\n action,\n deniedTitle,\n deniedMessage,\n}: ErrorStateProps) {\n const tr = useTr();\n const resolvedTitle = title ?? tr('errorState.title', 'Something went wrong');\n const resolvedDeniedTitle = deniedTitle ?? tr('errorState.deniedTitle', \"You don't have access\");\n const resolvedDeniedMessage =\n deniedMessage ??\n tr('errorState.deniedMessage', 'This area is restricted to platform administrators.');\n\n const denied = isPermissionDeniedError(error, message);\n\n return (\n <div className=\"flex flex-col items-center justify-center py-12 text-center animate-in fade-in duration-200\">\n <div\n className={`size-16 rounded-full flex items-center justify-center mb-4 ${\n denied ? 'bg-[var(--color-bg-subtle)]' : 'bg-[var(--color-status-error-subtle)]'\n }`}\n >\n {denied ? (\n <Lock size={32} className=\"text-text-tertiary\" />\n ) : (\n <AlertCircle size={32} className=\"text-[var(--color-status-error)]\" />\n )}\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">\n {denied ? resolvedDeniedTitle : resolvedTitle}\n </h3>\n <p className=\"text-sm text-text-tertiary mb-6 max-w-md\">\n {denied ? resolvedDeniedMessage : message}\n </p>\n {action && !denied && (\n <button\n type=\"button\"\n onClick={action.onClick}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90\n transition-all duration-200\n font-medium\n \"\n >\n {action.label}\n </button>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;AAoCA,SAAgBA,EAAW,EACzB,UACA,YACA,UACA,WACA,gBACA,oBACkB;CAClB,IAAMC,IAAKC,EAAM,GACXC,IAAgBC,KAASH,EAAG,oBAAoB,sBAAsB,GACtEI,IAAsBC,KAAeL,EAAG,0BAA0B,uBAAuB,GACzFM,IACJC,KACAP,EAAG,4BAA4B,qDAAqD,GAEhFQ,IAASC,EAAwBC,GAAOC,CAAO;CAErD,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,kBAAC,OAAD;IACE,WAAW,8DACTH,IAAS,gCAAgC;IAG1C,UAAAA,IACC,kBAACI,GAAD;KAAM,MAAM;KAAI,WAAU;IAAsB,CAAA,IAEhD,kBAACC,GAAD;KAAa,MAAM;KAAI,WAAU;IAAoC,CAAA;GAEpE,CAAA;GACL,kBAAC,MAAD;IAAI,WAAU;IACX,UAAAL,IAASJ,IAAsBF;GAC9B,CAAA;GACJ,kBAAC,KAAD;IAAG,WAAU;IACV,UAAAM,IAASF,IAAwBK;GACjC,CAAA;GACFG,KAAU,CAACN,KACV,kBAAC,UAAD;IACE,MAAK;IACL,SAASM,EAAO;IAChB,WAAU;IAUT,UAAAA,EAAO;GACF,CAAA;EAEP;;AAET"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface LoadingStateProps {
|
|
2
|
+
message?: string;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* LoadingState — generic loading indicator.
|
|
6
|
+
*
|
|
7
|
+
* Default message is translated through the i18n provider. Callers can pass
|
|
8
|
+
* an explicit `message` prop when they need a context-specific string from
|
|
9
|
+
* another namespace.
|
|
10
|
+
*/
|
|
11
|
+
export declare function LoadingState({ message }: LoadingStateProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=LoadingState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingState.d.ts","sourceRoot":"","sources":["../../../../../src/product-management/shared/components/feedback/LoadingState.tsx"],"names":[],"mappings":"AAGA,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,+BAS1D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTr as e } from "../../hooks/useTr.js";
|
|
2
2
|
import { Loader2 as t } from "lucide-react";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/product-management/shared/components/feedback/LoadingState.tsx
|
|
5
5
|
function i({ message: i }) {
|
|
6
6
|
let a = e(), o = i ?? a("loadingState.message", "Loading...");
|
|
7
7
|
return /* @__PURE__ */ r("div", {
|
|
@@ -15,7 +15,6 @@ function i({ message: i }) {
|
|
|
15
15
|
})]
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
//#endregion
|
|
19
18
|
export { i as LoadingState };
|
|
20
19
|
|
|
21
20
|
//# sourceMappingURL=LoadingState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingState.js","names":[],"sources":["../../../../../src/product-management/shared/components/feedback/LoadingState.tsx"],"sourcesContent":["import { Loader2 } from 'lucide-react';\nimport { useTr } from '../../hooks/useTr';\n\ninterface LoadingStateProps {\n message?: string;\n}\n\n/**\n * LoadingState — generic loading indicator.\n *\n * Default message is translated through the i18n provider. Callers can pass\n * an explicit `message` prop when they need a context-specific string from\n * another namespace.\n */\nexport function LoadingState({ message }: LoadingStateProps) {\n const tr = useTr();\n const resolvedMessage = message ?? tr('loadingState.message', 'Loading...');\n return (\n <div className=\"flex flex-col items-center justify-center py-12 animate-in fade-in duration-200\">\n <Loader2 size={48} className=\"text-[var(--color-status-info)] animate-spin mb-4\" />\n <p className=\"text-sm text-text-tertiary\">{resolvedMessage}</p>\n </div>\n );\n}\n"],"mappings":";;;;AAcA,
|
|
1
|
+
{"version":3,"file":"LoadingState.js","names":["LoadingState","tr","useTr","resolvedMessage","message","Loader2"],"sources":["../../../../../src/product-management/shared/components/feedback/LoadingState.tsx"],"sourcesContent":["import { Loader2 } from 'lucide-react';\nimport { useTr } from '../../hooks/useTr';\n\ninterface LoadingStateProps {\n message?: string;\n}\n\n/**\n * LoadingState — generic loading indicator.\n *\n * Default message is translated through the i18n provider. Callers can pass\n * an explicit `message` prop when they need a context-specific string from\n * another namespace.\n */\nexport function LoadingState({ message }: LoadingStateProps) {\n const tr = useTr();\n const resolvedMessage = message ?? tr('loadingState.message', 'Loading...');\n return (\n <div className=\"flex flex-col items-center justify-center py-12 animate-in fade-in duration-200\">\n <Loader2 size={48} className=\"text-[var(--color-status-info)] animate-spin mb-4\" />\n <p className=\"text-sm text-text-tertiary\">{resolvedMessage}</p>\n </div>\n );\n}\n"],"mappings":";;;;AAcA,SAAgBA,EAAa,EAAE,cAA8B;CAC3D,IAAMC,IAAKC,EAAM,GACXC,IAAkBC,KAAWH,EAAG,wBAAwB,YAAY;CAC1E,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAACI,GAAD;GAAS,MAAM;GAAI,WAAU;EAAqD,CAAA,GAClF,kBAAC,KAAD;GAAG,WAAU;GAA8B,UAAAF;EAAmB,CAAA,CAC3D;;AAET"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface ProductComboboxProps {
|
|
2
|
+
/** Selected product id (controlled). Empty string = nothing selected. */
|
|
3
|
+
value: string;
|
|
4
|
+
/** Called with the selected product id ('' when cleared). */
|
|
5
|
+
onChange: (id: string) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
/** Id for the trigger button — pairs with an external <label htmlFor>. */
|
|
10
|
+
id?: string;
|
|
11
|
+
/** Optional error message — toggles the invalid border + aria-invalid. */
|
|
12
|
+
error?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* ProductCombobox — searchable single-select for platform products.
|
|
16
|
+
*
|
|
17
|
+
* A button trigger shows the selected product as `name (slug)` (or a
|
|
18
|
+
* placeholder) and opens a Popover with a cmdk Command. Built entirely on the
|
|
19
|
+
* existing fe-libs `ui` primitives (Command + Popover) — no new dependencies.
|
|
20
|
+
*
|
|
21
|
+
* Search is performed **server-side** (`useProducts({ search })`) so any
|
|
22
|
+
* product is reachable, not just the first page — important now that the
|
|
23
|
+
* free-text product-id input was replaced by this control. The current
|
|
24
|
+
* selection's label is resolved independently via `useProduct(value)`, so it
|
|
25
|
+
* renders correctly even while the list is filtered to a different search.
|
|
26
|
+
*/
|
|
27
|
+
export declare function ProductCombobox({ value, onChange, disabled, required, placeholder, id, error, }: ProductComboboxProps): import("react").JSX.Element;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=ProductCombobox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductCombobox.d.ts","sourceRoot":"","sources":["../../../../../src/product-management/shared/components/input/ProductCombobox.tsx"],"names":[],"mappings":"AAiBA,UAAU,oBAAoB;IAC5B,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAYD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,QAAgB,EAChB,QAAgB,EAChB,WAAiC,EACjC,EAAE,EACF,KAAK,GACN,EAAE,oBAAoB,+BAgItB"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cn as e } from "../../utils/cn.js";
|
|
2
2
|
import { useProduct as t, useProducts as n } from "../../../modules/products/hooks/useProducts.js";
|
|
3
|
-
import {
|
|
3
|
+
import { useTr as r } from "../../hooks/useTr.js";
|
|
4
4
|
import { useEffect as i, useState as a } from "react";
|
|
5
5
|
import { Check as o, ChevronsUpDown as s } from "lucide-react";
|
|
6
6
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
7
|
import { Command as u, CommandEmpty as d, CommandInput as f, CommandItem as p, CommandList as m, Popover as h, PopoverContent as g, PopoverTrigger as _ } from "@burdenoff/fe-libs/ui";
|
|
8
|
-
|
|
8
|
+
// src/product-management/shared/components/input/ProductCombobox.tsx
|
|
9
9
|
function v(e, t) {
|
|
10
10
|
let [n, r] = a(e);
|
|
11
11
|
return i(() => {
|
|
@@ -14,7 +14,7 @@ function v(e, t) {
|
|
|
14
14
|
}, [e, t]), n;
|
|
15
15
|
}
|
|
16
16
|
function y({ value: i, onChange: y, disabled: b = !1, required: x = !1, placeholder: S = "Select a product…", id: C, error: w }) {
|
|
17
|
-
let [T, E] = a(!1), [D, O] = a(""), k = v(D.trim(), 200), A =
|
|
17
|
+
let [T, E] = a(!1), [D, O] = a(""), k = v(D.trim(), 200), A = r(), { products: j, loading: M } = n(k ? { search: k } : void 0, { limit: 100 }), { product: N, loading: P } = t(i), F = N ? `${N.name} (${N.slug})` : i ? P ? A("productCombobox.loading", "Loading…") : i : S, I = e("w-full flex items-center justify-between gap-2 px-3 py-2", "bg-surface", "border border-default", "rounded-lg", "text-left text-sm text-text-primary", "focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]", "disabled:bg-bg-sunken disabled:cursor-not-allowed", "transition-all duration-200", w && "border-[var(--color-status-error)]", !N && "text-text-tertiary");
|
|
18
18
|
return /* @__PURE__ */ l(h, {
|
|
19
19
|
open: T,
|
|
20
20
|
onOpenChange: (e) => {
|
|
@@ -64,45 +64,44 @@ function y({ value: i, onChange: y, disabled: b = !1, required: x = !1, placehol
|
|
|
64
64
|
className: "text-text-tertiary",
|
|
65
65
|
children: [/* @__PURE__ */ c(o, {
|
|
66
66
|
size: 16,
|
|
67
|
-
className:
|
|
67
|
+
className: e("shrink-0", i === "" ? "opacity-100" : "opacity-0"),
|
|
68
68
|
"aria-hidden": "true"
|
|
69
69
|
}), /* @__PURE__ */ c("span", {
|
|
70
70
|
className: "truncate italic",
|
|
71
71
|
children: A("productCombobox.none", "None")
|
|
72
72
|
})]
|
|
73
73
|
}),
|
|
74
|
-
j.map((
|
|
75
|
-
value:
|
|
74
|
+
j.map((t) => /* @__PURE__ */ l(p, {
|
|
75
|
+
value: t.id,
|
|
76
76
|
onSelect: () => {
|
|
77
|
-
y(
|
|
77
|
+
y(t.id), E(!1);
|
|
78
78
|
},
|
|
79
79
|
className: "text-text-primary",
|
|
80
80
|
children: [/* @__PURE__ */ c(o, {
|
|
81
81
|
size: 16,
|
|
82
|
-
className:
|
|
82
|
+
className: e("shrink-0", t.id === i ? "opacity-100" : "opacity-0"),
|
|
83
83
|
"aria-hidden": "true"
|
|
84
84
|
}), /* @__PURE__ */ l("span", {
|
|
85
85
|
className: "truncate",
|
|
86
86
|
children: [
|
|
87
|
-
|
|
87
|
+
t.name,
|
|
88
88
|
" ",
|
|
89
89
|
/* @__PURE__ */ l("span", {
|
|
90
90
|
className: "text-text-tertiary",
|
|
91
91
|
children: [
|
|
92
92
|
"(",
|
|
93
|
-
|
|
93
|
+
t.slug,
|
|
94
94
|
")"
|
|
95
95
|
]
|
|
96
96
|
})
|
|
97
97
|
]
|
|
98
98
|
})]
|
|
99
|
-
},
|
|
99
|
+
}, t.id))
|
|
100
100
|
] })]
|
|
101
101
|
})
|
|
102
102
|
})]
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
//#endregion
|
|
106
105
|
export { y as ProductCombobox };
|
|
107
106
|
|
|
108
107
|
//# sourceMappingURL=ProductCombobox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCombobox.js","names":[],"sources":["../../../../../src/product-management/shared/components/input/ProductCombobox.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { Check, ChevronsUpDown } from 'lucide-react';\nimport {\n Command,\n CommandEmpty,\n CommandInput,\n CommandItem,\n CommandList,\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@burdenoff/fe-libs/ui';\n\nimport { cn } from '../../utils/cn';\nimport { useProduct, useProducts } from '../../../modules/products/hooks/useProducts';\nimport { useTr } from '../../hooks/useTr';\n\ninterface ProductComboboxProps {\n /** Selected product id (controlled). Empty string = nothing selected. */\n value: string;\n /** Called with the selected product id ('' when cleared). */\n onChange: (id: string) => void;\n disabled?: boolean;\n required?: boolean;\n placeholder?: string;\n /** Id for the trigger button — pairs with an external <label htmlFor>. */\n id?: string;\n /** Optional error message — toggles the invalid border + aria-invalid. */\n error?: string;\n}\n\n/** Debounce a value so each keystroke doesn't fire a query. */\nfunction useDebounced<T>(value: T, ms: number): T {\n const [debounced, setDebounced] = useState(value);\n useEffect(() => {\n const t = setTimeout(() => setDebounced(value), ms);\n return () => clearTimeout(t);\n }, [value, ms]);\n return debounced;\n}\n\n/**\n * ProductCombobox — searchable single-select for platform products.\n *\n * A button trigger shows the selected product as `name (slug)` (or a\n * placeholder) and opens a Popover with a cmdk Command. Built entirely on the\n * existing fe-libs `ui` primitives (Command + Popover) — no new dependencies.\n *\n * Search is performed **server-side** (`useProducts({ search })`) so any\n * product is reachable, not just the first page — important now that the\n * free-text product-id input was replaced by this control. The current\n * selection's label is resolved independently via `useProduct(value)`, so it\n * renders correctly even while the list is filtered to a different search.\n */\nexport function ProductCombobox({\n value,\n onChange,\n disabled = false,\n required = false,\n placeholder = 'Select a product…',\n id,\n error,\n}: ProductComboboxProps) {\n const [open, setOpen] = useState(false);\n const [search, setSearch] = useState('');\n const debouncedSearch = useDebounced(search.trim(), 200);\n const tr = useTr();\n\n // Options: server-side search, so any product is reachable (no client-only cap).\n const { products, loading } = useProducts(\n debouncedSearch ? { search: debouncedSearch } : undefined,\n { limit: 100 }\n );\n\n // Resolve the selected product's label independently of the (searchable) list,\n // so a current selection still shows even when the list is filtered elsewhere.\n const { product: selectedProduct, loading: selectedLoading } = useProduct(value);\n\n // Resolved → name (slug). Still fetching → localized \"Loading…\". Set but unresolved\n // (e.g. a deleted/stale product id) → show the raw id, not a permanent spinner.\n // Empty → placeholder.\n const triggerLabel = selectedProduct\n ? `${selectedProduct.name} (${selectedProduct.slug})`\n : value\n ? selectedLoading\n ? tr('productCombobox.loading', 'Loading…')\n : value\n : placeholder;\n\n const triggerClassName = cn(\n 'w-full flex items-center justify-between gap-2 px-3 py-2',\n 'bg-surface',\n 'border border-default',\n 'rounded-lg',\n 'text-left text-sm text-text-primary',\n 'focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]',\n 'disabled:bg-bg-sunken disabled:cursor-not-allowed',\n 'transition-all duration-200',\n error && 'border-[var(--color-status-error)]',\n !selectedProduct && 'text-text-tertiary'\n );\n\n return (\n <Popover\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n // Reset the query on close so reopening starts fresh, not pre-filtered.\n if (!next) setSearch('');\n }}\n >\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n id={id}\n role=\"combobox\"\n aria-expanded={open}\n aria-required={required}\n aria-invalid={error ? true : undefined}\n disabled={disabled}\n className={triggerClassName}\n >\n <span className=\"truncate\">{triggerLabel}</span>\n <ChevronsUpDown size={16} className=\"shrink-0 text-text-tertiary\" aria-hidden=\"true\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n align=\"start\"\n className=\"w-[var(--radix-popover-trigger-width)] p-0 border border-default bg-surface\"\n >\n {/* Search is server-side → disable cmdk's client filter so we render\n exactly what the query returned. */}\n <Command shouldFilter={false} className=\"bg-surface text-text-primary\">\n <CommandInput\n value={search}\n onValueChange={setSearch}\n placeholder={tr('productCombobox.searchPlaceholder', 'Search products…')}\n className=\"text-text-primary placeholder:text-text-tertiary\"\n />\n <CommandList>\n <CommandEmpty className=\"text-text-tertiary\">\n {loading\n ? tr('productCombobox.searching', 'Searching…')\n : tr('productCombobox.noProductsFound', 'No products found.')}\n </CommandEmpty>\n {/* Optional fields need a way back to \"no product\" — emit '' so\n callers like ContentPageForm (productId || undefined) can clear\n an existing association. Hidden when the field is required. */}\n {!required && (\n <CommandItem\n value=\"__none__\"\n onSelect={() => {\n onChange('');\n setOpen(false);\n }}\n className=\"text-text-tertiary\"\n >\n <Check\n size={16}\n className={cn('shrink-0', value === '' ? 'opacity-100' : 'opacity-0')}\n aria-hidden=\"true\"\n />\n <span className=\"truncate italic\">{tr('productCombobox.none', 'None')}</span>\n </CommandItem>\n )}\n {products.map((product) => (\n <CommandItem\n key={product.id}\n value={product.id}\n onSelect={() => {\n onChange(product.id);\n setOpen(false);\n }}\n className=\"text-text-primary\"\n >\n <Check\n size={16}\n className={cn('shrink-0', product.id === value ? 'opacity-100' : 'opacity-0')}\n aria-hidden=\"true\"\n />\n <span className=\"truncate\">\n {product.name} <span className=\"text-text-tertiary\">({product.slug})</span>\n </span>\n </CommandItem>\n ))}\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;AAgCA,
|
|
1
|
+
{"version":3,"file":"ProductCombobox.js","names":["useDebounced","debounced","setDebounced","useState","value","useEffect","t","ms","ProductCombobox","open","setOpen","search","setSearch","debouncedSearch","tr","useTr","useProducts","selectedProduct","selectedLoading","useProduct","triggerLabel","placeholder","triggerClassName","cn","error","Popover","next","PopoverTrigger","required","ChevronsUpDown","PopoverContent","Command","CommandInput","CommandList","CommandEmpty","loading","CommandItem","onChange","Check","products","product"],"sources":["../../../../../src/product-management/shared/components/input/ProductCombobox.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { Check, ChevronsUpDown } from 'lucide-react';\nimport {\n Command,\n CommandEmpty,\n CommandInput,\n CommandItem,\n CommandList,\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@burdenoff/fe-libs/ui';\n\nimport { cn } from '../../utils/cn';\nimport { useProduct, useProducts } from '../../../modules/products/hooks/useProducts';\nimport { useTr } from '../../hooks/useTr';\n\ninterface ProductComboboxProps {\n /** Selected product id (controlled). Empty string = nothing selected. */\n value: string;\n /** Called with the selected product id ('' when cleared). */\n onChange: (id: string) => void;\n disabled?: boolean;\n required?: boolean;\n placeholder?: string;\n /** Id for the trigger button — pairs with an external <label htmlFor>. */\n id?: string;\n /** Optional error message — toggles the invalid border + aria-invalid. */\n error?: string;\n}\n\n/** Debounce a value so each keystroke doesn't fire a query. */\nfunction useDebounced<T>(value: T, ms: number): T {\n const [debounced, setDebounced] = useState(value);\n useEffect(() => {\n const t = setTimeout(() => setDebounced(value), ms);\n return () => clearTimeout(t);\n }, [value, ms]);\n return debounced;\n}\n\n/**\n * ProductCombobox — searchable single-select for platform products.\n *\n * A button trigger shows the selected product as `name (slug)` (or a\n * placeholder) and opens a Popover with a cmdk Command. Built entirely on the\n * existing fe-libs `ui` primitives (Command + Popover) — no new dependencies.\n *\n * Search is performed **server-side** (`useProducts({ search })`) so any\n * product is reachable, not just the first page — important now that the\n * free-text product-id input was replaced by this control. The current\n * selection's label is resolved independently via `useProduct(value)`, so it\n * renders correctly even while the list is filtered to a different search.\n */\nexport function ProductCombobox({\n value,\n onChange,\n disabled = false,\n required = false,\n placeholder = 'Select a product…',\n id,\n error,\n}: ProductComboboxProps) {\n const [open, setOpen] = useState(false);\n const [search, setSearch] = useState('');\n const debouncedSearch = useDebounced(search.trim(), 200);\n const tr = useTr();\n\n // Options: server-side search, so any product is reachable (no client-only cap).\n const { products, loading } = useProducts(\n debouncedSearch ? { search: debouncedSearch } : undefined,\n { limit: 100 }\n );\n\n // Resolve the selected product's label independently of the (searchable) list,\n // so a current selection still shows even when the list is filtered elsewhere.\n const { product: selectedProduct, loading: selectedLoading } = useProduct(value);\n\n // Resolved → name (slug). Still fetching → localized \"Loading…\". Set but unresolved\n // (e.g. a deleted/stale product id) → show the raw id, not a permanent spinner.\n // Empty → placeholder.\n const triggerLabel = selectedProduct\n ? `${selectedProduct.name} (${selectedProduct.slug})`\n : value\n ? selectedLoading\n ? tr('productCombobox.loading', 'Loading…')\n : value\n : placeholder;\n\n const triggerClassName = cn(\n 'w-full flex items-center justify-between gap-2 px-3 py-2',\n 'bg-surface',\n 'border border-default',\n 'rounded-lg',\n 'text-left text-sm text-text-primary',\n 'focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]',\n 'disabled:bg-bg-sunken disabled:cursor-not-allowed',\n 'transition-all duration-200',\n error && 'border-[var(--color-status-error)]',\n !selectedProduct && 'text-text-tertiary'\n );\n\n return (\n <Popover\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n // Reset the query on close so reopening starts fresh, not pre-filtered.\n if (!next) setSearch('');\n }}\n >\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n id={id}\n role=\"combobox\"\n aria-expanded={open}\n aria-required={required}\n aria-invalid={error ? true : undefined}\n disabled={disabled}\n className={triggerClassName}\n >\n <span className=\"truncate\">{triggerLabel}</span>\n <ChevronsUpDown size={16} className=\"shrink-0 text-text-tertiary\" aria-hidden=\"true\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n align=\"start\"\n className=\"w-[var(--radix-popover-trigger-width)] p-0 border border-default bg-surface\"\n >\n {/* Search is server-side → disable cmdk's client filter so we render\n exactly what the query returned. */}\n <Command shouldFilter={false} className=\"bg-surface text-text-primary\">\n <CommandInput\n value={search}\n onValueChange={setSearch}\n placeholder={tr('productCombobox.searchPlaceholder', 'Search products…')}\n className=\"text-text-primary placeholder:text-text-tertiary\"\n />\n <CommandList>\n <CommandEmpty className=\"text-text-tertiary\">\n {loading\n ? tr('productCombobox.searching', 'Searching…')\n : tr('productCombobox.noProductsFound', 'No products found.')}\n </CommandEmpty>\n {/* Optional fields need a way back to \"no product\" — emit '' so\n callers like ContentPageForm (productId || undefined) can clear\n an existing association. Hidden when the field is required. */}\n {!required && (\n <CommandItem\n value=\"__none__\"\n onSelect={() => {\n onChange('');\n setOpen(false);\n }}\n className=\"text-text-tertiary\"\n >\n <Check\n size={16}\n className={cn('shrink-0', value === '' ? 'opacity-100' : 'opacity-0')}\n aria-hidden=\"true\"\n />\n <span className=\"truncate italic\">{tr('productCombobox.none', 'None')}</span>\n </CommandItem>\n )}\n {products.map((product) => (\n <CommandItem\n key={product.id}\n value={product.id}\n onSelect={() => {\n onChange(product.id);\n setOpen(false);\n }}\n className=\"text-text-primary\"\n >\n <Check\n size={16}\n className={cn('shrink-0', product.id === value ? 'opacity-100' : 'opacity-0')}\n aria-hidden=\"true\"\n />\n <span className=\"truncate\">\n {product.name} <span className=\"text-text-tertiary\">({product.slug})</span>\n </span>\n </CommandItem>\n ))}\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;AAgCA,SAASA,EAAgB,GAAU,GAAe;CAChD,IAAM,CAACC,GAAWC,KAAgBC,EAASC,CAAK;CAKhD,OAJAC,QAAgB;EACd,IAAMC,IAAI,iBAAiBJ,EAAaE,CAAK,GAAGG,CAAE;EAClD,aAAa,aAAaD,CAAC;CAC7B,GAAG,CAACF,GAAOG,CAAE,CAAC,GACPN;AACT;AAeA,SAAgBO,EAAgB,EAC9B,UACA,aACA,cAAW,IACX,cAAW,IACX,iBAAc,qBACd,OACA,YACuB;CACvB,IAAM,CAACC,GAAMC,KAAWP,EAAS,EAAK,GAChC,CAACQ,GAAQC,KAAaT,EAAS,EAAE,GACjCU,IAAkBb,EAAaW,EAAO,KAAK,GAAG,GAAG,GACjDG,IAAKC,EAAM,GAGX,EAAE,aAAU,eAAYC,EAC5BH,IAAkB,EAAE,QAAQA,EAAgB,IAAI,KAAA,GAChD,EAAE,OAAO,IAAI,CACf,GAIM,EAAE,SAASI,GAAiB,SAASC,MAAoBC,EAAWf,CAAK,GAKzEgB,IAAeH,IACjB,GAAGA,EAAgB,KAAK,IAAIA,EAAgB,KAAK,KACjDb,IACEc,IACEJ,EAAG,2BAA2B,UAAU,IACxCV,IACFiB,GAEAC,IAAmBC,EACvB,4DACA,cACA,yBACA,cACA,uCACA,0EACA,qDACA,+BACAC,KAAS,sCACT,CAACP,KAAmB,oBACtB;CAEA,OACE,kBAACQ,GAAD;EACQ;EACN,eAAe,MAAS;GAGtB,AAFAf,EAAQgB,CAAI,GAEPA,KAAMd,EAAU,EAAE;EACzB;EANF,UAAA,CAQE,kBAACe,GAAD;GAAgB,SAAA;GACd,UAAA,kBAAC,UAAD;IACE,MAAK;IACD;IACJ,MAAK;IACL,iBAAelB;IACf,iBAAemB;IACf,gBAAcJ,IAAQ,KAAO,KAAA;IACnB;IACV,WAAWF;IARb,UAAA,CAUE,kBAAC,QAAD;KAAM,WAAU;KAAY,UAAAF;IAAmB,CAAA,GAC/C,kBAACS,GAAD;KAAgB,MAAM;KAAI,WAAU;KAA8B,eAAY;IAAQ,CAAA,CAChF;;EACM,CAAA,GAChB,kBAACC,GAAD;GACE,OAAM;GACN,WAAU;GAIV,UAAA,kBAACC,GAAD;IAAS,cAAc;IAAO,WAAU;IAAxC,UAAA,CACE,kBAACC,GAAD;KACE,OAAOrB;KACP,eAAeC;KACf,aAAaE,EAAG,qCAAqC,kBAAkB;KACvE,WAAU;IACX,CAAA,GACD,kBAACmB,GAAD,EAAA,UAAA;KACE,kBAACC,GAAD;MAAc,WAAU;MACrB,UAAAC,IACGrB,EAAG,6BAA6B,YAAY,IAC5CA,EAAG,mCAAmC,oBAAoB;KAClD,CAAA;KAIb,CAACc,KACA,kBAACQ,GAAD;MACE,OAAM;MACN,gBAAgB;OAEd,AADAC,EAAS,EAAE,GACX3B,EAAQ,EAAK;MACf;MACA,WAAU;MANZ,UAAA,CAQE,kBAAC4B,GAAD;OACE,MAAM;OACN,WAAWf,EAAG,YAAYnB,MAAU,KAAK,gBAAgB,WAAW;OACpE,eAAY;MACb,CAAA,GACD,kBAAC,QAAD;OAAM,WAAU;OAAmB,UAAAU,EAAG,wBAAwB,MAAM;MAAQ,CAAA,CACjE;;KAEdyB,EAAS,KAAK,MACb,kBAACH,GAAD;MAEE,OAAOI,EAAQ;MACf,gBAAgB;OAEd,AADAH,EAASG,EAAQ,EAAE,GACnB9B,EAAQ,EAAK;MACf;MACA,WAAU;MAPZ,UAAA,CASE,kBAAC4B,GAAD;OACE,MAAM;OACN,WAAWf,EAAG,YAAYiB,EAAQ,OAAOpC,IAAQ,gBAAgB,WAAW;OAC5E,eAAY;MACb,CAAA,GACD,kBAAC,QAAD;OAAM,WAAU;OAAhB,UAAA;QACGoC,EAAQ;QAAK;QAAC,kBAAC,QAAD;SAAM,WAAU;SAAhB,UAAA;UAAqC;UAAEA,EAAQ;UAAK;SAAO;;OACtE;MACK,CAAA,CAAA;KAhBN,GAAAA,EAAQ,EAgBF,CACd;IACU,EAAA,CAAA,CACN;;EACK,CAAA,CACT;;AAEb"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface SearchInputProps {
|
|
2
|
+
value: string;
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
clearAriaLabel?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* SearchInput — reusable search input with clear button.
|
|
10
|
+
*
|
|
11
|
+
* Defaults are translated through the i18n provider. Callers can still pass
|
|
12
|
+
* explicit `placeholder` / `clearAriaLabel` props when they need a
|
|
13
|
+
* context-specific string from another namespace.
|
|
14
|
+
*/
|
|
15
|
+
export declare function SearchInput({ value, onChange, placeholder, clearAriaLabel, className, }: SearchInputProps): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=SearchInput.d.ts.map
|