@burdenoff/microfe-product 2026.1013.2 → 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 +35 -23
- 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":"ProductForm.js","names":[],"sources":["../../../../../src/product-management/modules/products/components/ProductForm.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Loader2, ChevronDown, ChevronRight, Plus, X, Shield } from 'lucide-react';\nimport { ZodError } from 'zod';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport type { CreateProductInput, UpdateProductInput, PlatformProduct } from '../types';\nimport { ProductStatus } from '../types';\nimport { createProductSchema, updateProductSchema } from '../schemas';\nimport { TagInput } from '../../../shared/components/input/TagInput';\nimport { MarkdownEditor } from '../../../../shared/components/MarkdownEditor';\n\ninterface SocialLinkEntry {\n /** Stable client-side id so React list keys survive reorder/remove. */\n id: string;\n platform: string;\n url: string;\n}\n\nlet nextEntryId = 0;\nconst makeEntryId = (prefix: string) => `${prefix}-${++nextEntryId}`;\n\n/**\n * Resource-links share the same admin UI shape as social-links — a list of\n * (key, URL) rows the admin can freely add / remove. They're stored in their\n * own JSON column on `Product` so the website SDK can pick them up separately\n * from socials (different footer column, different default behaviour).\n */\ninterface ResourceLinkEntry {\n /** Stable client-side id so React list keys survive reorder/remove. */\n id: string;\n resource: string;\n url: string;\n}\n\ninterface ProductFormProps {\n product?: PlatformProduct | null;\n onSubmit: (data: CreateProductInput | UpdateProductInput) => Promise<void>;\n onCancel: () => void;\n loading?: boolean;\n}\n\nfunction initSocialLinks(product?: PlatformProduct | null): SocialLinkEntry[] {\n if (product?.socialLinks && typeof product.socialLinks === 'object') {\n const entries = Object.entries(product.socialLinks);\n if (entries.length > 0) {\n return entries.map(([platform, url]) => ({ id: makeEntryId('social'), platform, url }));\n }\n }\n return [];\n}\n\nfunction initResourceLinks(product?: PlatformProduct | null): ResourceLinkEntry[] {\n if (product?.resourceLinks && typeof product.resourceLinks === 'object') {\n const entries = Object.entries(product.resourceLinks);\n if (entries.length > 0) {\n return entries.map(([resource, url]) => ({ id: makeEntryId('resource'), resource, url }));\n }\n }\n return [];\n}\n\nexport function ProductForm({ product, onSubmit, onCancel, loading }: ProductFormProps) {\n const tr = useTr();\n\n const [formData, setFormData] = useState({\n name: product?.name || '',\n slug: product?.slug || '',\n description: product?.description || '',\n status: product?.status || ProductStatus.ACTIVE,\n logoUrl: product?.logoUrl || '',\n website: product?.website || '',\n appUrl: product?.appUrl || '',\n docsUrl: product?.docsUrl || '',\n githubUrl: product?.githubUrl || '',\n statusPageUrl: product?.statusPageUrl || '',\n contactEmail: product?.contactEmail || '',\n supportEmail: product?.supportEmail || '',\n contactPhone: product?.contactPhone || '',\n contactAddress: product?.contactAddress || '',\n seoTitle: product?.seoTitle || '',\n seoDescription: product?.seoDescription || '',\n seoKeywords: product?.seoKeywords || '',\n ogImage: product?.ogImage || '',\n appStoreUrl: product?.appStoreUrl || '',\n playStoreUrl: product?.playStoreUrl || '',\n });\n\n const [socialLinks, setSocialLinks] = useState<SocialLinkEntry[]>(() => initSocialLinks(product));\n const [resourceLinks, setResourceLinks] = useState<ResourceLinkEntry[]>(() =>\n initResourceLinks(product)\n );\n const [tags, setTags] = useState<string[]>(product?.tags ?? []);\n\n const [errors, setErrors] = useState<Record<string, string>>({});\n\n const [expandedSections, setExpandedSections] = useState<Record<string, boolean>>({\n contact: false,\n seo: false,\n appStore: false,\n social: false,\n resources: false,\n integrations: false,\n });\n\n const toggleSection = (section: string) => {\n setExpandedSections((prev) => ({ ...prev, [section]: !prev[section] }));\n };\n\n const addSocialLink = () => {\n setSocialLinks((prev) => [...prev, { id: makeEntryId('social'), platform: '', url: '' }]);\n };\n\n const removeSocialLink = (index: number) => {\n setSocialLinks((prev) => prev.filter((_, i) => i !== index));\n };\n\n const updateSocialLink = (index: number, field: 'platform' | 'url', value: string) => {\n setSocialLinks((prev) =>\n prev.map((entry, i) => (i === index ? { ...entry, [field]: value } : entry))\n );\n };\n\n const buildSocialLinksRecord = (): Record<string, string> | undefined => {\n const filtered = socialLinks.filter(\n (entry) => entry.platform.trim() !== '' && entry.url.trim() !== ''\n );\n if (filtered.length === 0) return undefined;\n const record: Record<string, string> = {};\n filtered.forEach((entry) => {\n record[entry.platform.trim()] = entry.url.trim();\n });\n return record;\n };\n\n const addResourceLink = () => {\n setResourceLinks((prev) => [...prev, { id: makeEntryId('resource'), resource: '', url: '' }]);\n };\n\n const removeResourceLink = (index: number) => {\n setResourceLinks((prev) => prev.filter((_, i) => i !== index));\n };\n\n const updateResourceLink = (index: number, field: 'resource' | 'url', value: string) => {\n setResourceLinks((prev) =>\n prev.map((entry, i) => (i === index ? { ...entry, [field]: value } : entry))\n );\n };\n\n const buildResourceLinksRecord = (): Record<string, string> | undefined => {\n const filtered = resourceLinks.filter(\n (entry) => entry.resource.trim() !== '' && entry.url.trim() !== ''\n );\n if (filtered.length === 0) return undefined;\n const record: Record<string, string> = {};\n filtered.forEach((entry) => {\n record[entry.resource.trim()] = entry.url.trim();\n });\n return record;\n };\n\n const validate = () => {\n try {\n const schema = product ? updateProductSchema : createProductSchema;\n const dataToValidate = {\n ...formData,\n socialLinks: buildSocialLinksRecord(),\n resourceLinks: buildResourceLinksRecord(),\n };\n schema.parse(dataToValidate);\n setErrors({});\n return true;\n } catch (error) {\n if (error instanceof ZodError) {\n const newErrors: Record<string, string> = {};\n error.issues.forEach((issue) => {\n const path = issue.path.join('.');\n newErrors[path] = issue.message;\n });\n setErrors(newErrors);\n }\n return false;\n }\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (!validate()) {\n return;\n }\n\n const socialLinksRecord = buildSocialLinksRecord();\n const resourceLinksRecord = buildResourceLinksRecord();\n\n const submitData = product\n ? {\n // Update only changed fields\n name: formData.name !== product.name ? formData.name : undefined,\n description:\n formData.description !== product.description ? formData.description : undefined,\n status: formData.status !== product.status ? formData.status : undefined,\n logoUrl: formData.logoUrl !== product.logoUrl ? formData.logoUrl : undefined,\n website: formData.website !== product.website ? formData.website : undefined,\n appUrl: formData.appUrl !== product.appUrl ? formData.appUrl : undefined,\n docsUrl: formData.docsUrl !== product.docsUrl ? formData.docsUrl : undefined,\n githubUrl: formData.githubUrl !== product.githubUrl ? formData.githubUrl : undefined,\n statusPageUrl:\n formData.statusPageUrl !== product.statusPageUrl ? formData.statusPageUrl : undefined,\n contactEmail:\n formData.contactEmail !== (product.contactEmail || '')\n ? formData.contactEmail\n : undefined,\n supportEmail:\n formData.supportEmail !== (product.supportEmail || '')\n ? formData.supportEmail\n : undefined,\n contactPhone:\n formData.contactPhone !== (product.contactPhone || '')\n ? formData.contactPhone\n : undefined,\n contactAddress:\n formData.contactAddress !== (product.contactAddress || '')\n ? formData.contactAddress\n : undefined,\n seoTitle: formData.seoTitle !== (product.seoTitle || '') ? formData.seoTitle : undefined,\n seoDescription:\n formData.seoDescription !== (product.seoDescription || '')\n ? formData.seoDescription\n : undefined,\n seoKeywords:\n formData.seoKeywords !== (product.seoKeywords || '') ? formData.seoKeywords : undefined,\n ogImage: formData.ogImage !== (product.ogImage || '') ? formData.ogImage : undefined,\n appStoreUrl:\n formData.appStoreUrl !== (product.appStoreUrl || '') ? formData.appStoreUrl : undefined,\n playStoreUrl:\n formData.playStoreUrl !== (product.playStoreUrl || '')\n ? formData.playStoreUrl\n : undefined,\n socialLinks: socialLinksRecord,\n resourceLinks: resourceLinksRecord,\n tags,\n // reCAPTCHA keys from Integrations section\n ...(() => {\n const form = e.target as HTMLFormElement;\n const siteKey = (form.elements.namedItem('recaptchaSiteKey') as HTMLInputElement)\n ?.value;\n const secretKey = (form.elements.namedItem('recaptchaSecretKey') as HTMLInputElement)\n ?.value;\n const result: Record<string, string | undefined> = {};\n if (siteKey && siteKey !== (product.recaptchaSiteKey || ''))\n result.recaptchaSiteKey = siteKey;\n if (secretKey) result.recaptchaSecretKey = secretKey;\n return result;\n })(),\n }\n : {\n // Create with all fields\n name: formData.name,\n slug: formData.slug,\n description: formData.description || undefined,\n status: formData.status,\n logoUrl: formData.logoUrl || undefined,\n website: formData.website || undefined,\n appUrl: formData.appUrl || undefined,\n docsUrl: formData.docsUrl || undefined,\n githubUrl: formData.githubUrl || undefined,\n statusPageUrl: formData.statusPageUrl || undefined,\n contactEmail: formData.contactEmail || undefined,\n supportEmail: formData.supportEmail || undefined,\n contactPhone: formData.contactPhone || undefined,\n contactAddress: formData.contactAddress || undefined,\n seoTitle: formData.seoTitle || undefined,\n seoDescription: formData.seoDescription || undefined,\n seoKeywords: formData.seoKeywords || undefined,\n ogImage: formData.ogImage || undefined,\n appStoreUrl: formData.appStoreUrl || undefined,\n playStoreUrl: formData.playStoreUrl || undefined,\n socialLinks: socialLinksRecord,\n resourceLinks: resourceLinksRecord,\n tags,\n };\n\n await onSubmit(submitData);\n };\n\n const inputClassName = `\n w-full px-3 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n placeholder:text-text-tertiary\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 `;\n\n const sectionHeaderClassName = `\n flex items-center gap-2 w-full text-left\n text-sm font-semibold text-text-secondary uppercase tracking-wider\n cursor-pointer hover:text-text-primary transition-colors duration-200\n `;\n\n return (\n <form onSubmit={handleSubmit} className=\"space-y-6 animate-in fade-in duration-200\">\n {/* Basic Information Section */}\n <div className=\"space-y-4\">\n <h3 className=\"text-sm font-semibold text-text-secondary uppercase tracking-wider\">\n {tr('products.basicInformation', 'Basic Information')}\n </h3>\n\n {/* Name */}\n <div>\n <label htmlFor=\"name\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.productName', 'Product Name')}{' '}\n <span className=\"text-[var(--color-status-error)]\">*</span>\n </label>\n <input\n id=\"name\"\n type=\"text\"\n value={formData.name}\n onChange={(e) => setFormData({ ...formData, name: e.target.value })}\n className={inputClassName}\n placeholder={tr('products.enterProductName', 'Enter product name')}\n disabled={loading}\n required\n />\n {errors.name && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.name}</p>\n )}\n </div>\n\n {/* Slug */}\n <div>\n <label htmlFor=\"slug\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.slug', 'Slug')}{' '}\n <span className=\"text-[var(--color-status-error)]\">*</span>\n </label>\n <input\n id=\"slug\"\n type=\"text\"\n value={formData.slug}\n onChange={(e) =>\n setFormData({ ...formData, slug: e.target.value.toLowerCase().replace(/\\s+/g, '-') })\n }\n className={inputClassName}\n placeholder=\"product-slug\"\n disabled={loading || !!product}\n required={!product}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr(\n 'products.slugHint',\n 'Lowercase letters, numbers, and hyphens only. Cannot be changed after creation.'\n )}\n </p>\n {errors.slug && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.slug}</p>\n )}\n </div>\n\n {/* Description */}\n <MarkdownEditor\n id=\"description\"\n label={tr('products.description', 'Description')}\n value={formData.description}\n onChange={(value) => setFormData({ ...formData, description: value })}\n placeholder={tr('products.enterProductDescription', 'Enter product description')}\n disabled={loading}\n rows={4}\n minHeight={120}\n />\n\n {/* Status */}\n <div>\n <label htmlFor=\"status\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.status', 'Status')}\n </label>\n <select\n id=\"status\"\n value={formData.status}\n onChange={(e) =>\n setFormData({\n ...formData,\n status: e.target.value as (typeof ProductStatus)[keyof typeof ProductStatus],\n })\n }\n className={\n inputClassName +\n ' scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary'\n }\n disabled={loading}\n >\n <option value={ProductStatus.ACTIVE}>{tr('products.statusActive', 'Active')}</option>\n <option value={ProductStatus.DRAFT}>{tr('products.statusDraft', 'Draft')}</option>\n <option value={ProductStatus.WAITLIST}>\n {tr('products.statusWaitlist', 'Waitlist')}\n </option>\n <option value={ProductStatus.COMING_SOON}>\n {tr('products.statusComingSoon', 'Coming Soon')}\n </option>\n </select>\n </div>\n\n {/* Tags */}\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.tags', 'Tags')}\n </label>\n <TagInput value={tags} onChange={setTags} disabled={loading} />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr('products.tagsHint', 'Press Enter or comma to add a tag.')}\n </p>\n </div>\n </div>\n\n {/* URLs Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <h3 className=\"text-sm font-semibold text-text-secondary uppercase tracking-wider\">\n {tr('products.urlsAndLinks', 'URLs & Links')}\n </h3>\n\n {/* Logo URL */}\n <div>\n <label htmlFor=\"logoUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.logoUrl', 'Logo URL')}\n </label>\n <input\n id=\"logoUrl\"\n type=\"url\"\n value={formData.logoUrl}\n onChange={(e) => setFormData({ ...formData, logoUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://example.com/logo.png\"\n disabled={loading}\n />\n {errors.logoUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.logoUrl}</p>\n )}\n </div>\n\n {/* App URL - Important for ProductSwitcher */}\n <div>\n <label htmlFor=\"appUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.appUrl', 'App URL')}{' '}\n <span className=\"text-[var(--color-status-warning)]\">\n {tr('products.requiredForProductSwitcher', '(Required for product switcher)')}\n </span>\n </label>\n <input\n id=\"appUrl\"\n type=\"url\"\n value={formData.appUrl}\n onChange={(e) => setFormData({ ...formData, appUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://app.product.com/\"\n disabled={loading}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr(\n 'products.appUrlHint',\n \"The main application URL. Products without an App URL won't appear in the product switcher.\"\n )}\n </p>\n {errors.appUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.appUrl}</p>\n )}\n </div>\n\n {/* Website URL */}\n <div>\n <label htmlFor=\"website\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.websiteUrl', 'Website URL')}\n </label>\n <input\n id=\"website\"\n type=\"url\"\n value={formData.website}\n onChange={(e) => setFormData({ ...formData, website: e.target.value })}\n className={inputClassName}\n placeholder=\"https://product.com/\"\n disabled={loading}\n />\n {errors.website && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.website}</p>\n )}\n </div>\n\n {/* Docs URL */}\n <div>\n <label htmlFor=\"docsUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.documentationUrl', 'Documentation URL')}\n </label>\n <input\n id=\"docsUrl\"\n type=\"url\"\n value={formData.docsUrl}\n onChange={(e) => setFormData({ ...formData, docsUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://docs.product.com/\"\n disabled={loading}\n />\n {errors.docsUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.docsUrl}</p>\n )}\n </div>\n\n {/* GitHub URL */}\n <div>\n <label htmlFor=\"githubUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.githubUrl', 'GitHub URL')}\n </label>\n <input\n id=\"githubUrl\"\n type=\"url\"\n value={formData.githubUrl}\n onChange={(e) => setFormData({ ...formData, githubUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://github.com/org/repo\"\n disabled={loading}\n />\n {errors.githubUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.githubUrl}</p>\n )}\n </div>\n\n {/* Status Page URL */}\n <div>\n <label\n htmlFor=\"statusPageUrl\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.statusPageUrl', 'Status Page URL')}\n </label>\n <input\n id=\"statusPageUrl\"\n type=\"url\"\n value={formData.statusPageUrl}\n onChange={(e) => setFormData({ ...formData, statusPageUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://status.product.com/\"\n disabled={loading}\n />\n {errors.statusPageUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.statusPageUrl}</p>\n )}\n </div>\n </div>\n\n {/* Contact Information Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('contact')}\n className={sectionHeaderClassName}\n >\n {expandedSections.contact ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.contactInformation', 'Contact Information')}\n </button>\n\n {expandedSections.contact && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {/* Contact Email */}\n <div>\n <label\n htmlFor=\"contactEmail\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.contactEmail', 'Contact Email')}\n </label>\n <input\n id=\"contactEmail\"\n type=\"email\"\n value={formData.contactEmail}\n onChange={(e) => setFormData({ ...formData, contactEmail: e.target.value })}\n className={inputClassName}\n placeholder=\"contact@product.com\"\n disabled={loading}\n />\n {errors.contactEmail && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.contactEmail}\n </p>\n )}\n </div>\n\n {/* Support Email */}\n <div>\n <label\n htmlFor=\"supportEmail\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.supportEmail', 'Support Email')}\n </label>\n <input\n id=\"supportEmail\"\n type=\"email\"\n value={formData.supportEmail}\n onChange={(e) => setFormData({ ...formData, supportEmail: e.target.value })}\n className={inputClassName}\n placeholder=\"support@product.com\"\n disabled={loading}\n />\n {errors.supportEmail && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.supportEmail}\n </p>\n )}\n </div>\n\n {/* Contact Phone */}\n <div>\n <label\n htmlFor=\"contactPhone\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.contactPhone', 'Contact Phone')}\n </label>\n <input\n id=\"contactPhone\"\n type=\"tel\"\n value={formData.contactPhone}\n onChange={(e) => setFormData({ ...formData, contactPhone: e.target.value })}\n className={inputClassName}\n placeholder=\"+1 (555) 123-4567\"\n disabled={loading}\n />\n {errors.contactPhone && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.contactPhone}\n </p>\n )}\n </div>\n\n {/* Contact Address */}\n <div>\n <label\n htmlFor=\"contactAddress\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.contactAddress', 'Contact Address')}\n </label>\n <textarea\n id=\"contactAddress\"\n value={formData.contactAddress}\n onChange={(e) => setFormData({ ...formData, contactAddress: e.target.value })}\n rows={3}\n className={inputClassName}\n placeholder=\"123 Main St, City, State, ZIP\"\n disabled={loading}\n />\n {errors.contactAddress && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.contactAddress}\n </p>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* SEO Metadata Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('seo')}\n className={sectionHeaderClassName}\n >\n {expandedSections.seo ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.seoMetadata', 'SEO Metadata')}\n </button>\n\n {expandedSections.seo && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {/* SEO Title */}\n <div>\n <label\n htmlFor=\"seoTitle\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.seoTitle', 'SEO Title')}\n </label>\n <input\n id=\"seoTitle\"\n type=\"text\"\n value={formData.seoTitle}\n onChange={(e) => setFormData({ ...formData, seoTitle: e.target.value })}\n className={inputClassName}\n placeholder=\"Product SEO title\"\n disabled={loading}\n maxLength={100}\n />\n <div className=\"flex justify-between mt-1\">\n {errors.seoTitle ? (\n <p className=\"text-sm text-[var(--color-status-error)]\">{errors.seoTitle}</p>\n ) : (\n <span />\n )}\n <p className=\"text-xs text-text-tertiary\">{formData.seoTitle.length}/100</p>\n </div>\n </div>\n\n {/* SEO Description */}\n <div>\n <label\n htmlFor=\"seoDescription\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.seoDescription', 'SEO Description')}\n </label>\n <textarea\n id=\"seoDescription\"\n value={formData.seoDescription}\n onChange={(e) => setFormData({ ...formData, seoDescription: e.target.value })}\n rows={3}\n className={inputClassName}\n placeholder={tr(\n 'products.seoDescriptionPlaceholder',\n 'Brief description for search engines'\n )}\n disabled={loading}\n maxLength={300}\n />\n <div className=\"flex justify-between mt-1\">\n {errors.seoDescription ? (\n <p className=\"text-sm text-[var(--color-status-error)]\">\n {errors.seoDescription}\n </p>\n ) : (\n <span />\n )}\n <p className=\"text-xs text-text-tertiary\">{formData.seoDescription.length}/300</p>\n </div>\n </div>\n\n {/* SEO Keywords */}\n <div>\n <label\n htmlFor=\"seoKeywords\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.seoKeywords', 'SEO Keywords')}\n </label>\n <input\n id=\"seoKeywords\"\n type=\"text\"\n value={formData.seoKeywords}\n onChange={(e) => setFormData({ ...formData, seoKeywords: e.target.value })}\n className={inputClassName}\n placeholder=\"keyword1, keyword2, keyword3\"\n disabled={loading}\n maxLength={200}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr(\n 'products.seoKeywordsHint',\n 'Comma-separated keywords for search engine optimization.'\n )}\n </p>\n {errors.seoKeywords && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.seoKeywords}\n </p>\n )}\n </div>\n\n {/* OG Image */}\n <div>\n <label htmlFor=\"ogImage\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.ogImageUrl', 'OG Image URL')}\n </label>\n <input\n id=\"ogImage\"\n type=\"url\"\n value={formData.ogImage}\n onChange={(e) => setFormData({ ...formData, ogImage: e.target.value })}\n className={inputClassName}\n placeholder=\"https://example.com/og-image.png\"\n disabled={loading}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr('products.ogImageHint', 'Open Graph image used when sharing on social media.')}\n </p>\n {errors.ogImage && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.ogImage}</p>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* App Store Links Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('appStore')}\n className={sectionHeaderClassName}\n >\n {expandedSections.appStore ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.appStoreLinks', 'App Store Links')}\n </button>\n\n {expandedSections.appStore && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {/* Apple App Store URL */}\n <div>\n <label\n htmlFor=\"appStoreUrl\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.appleAppStoreUrl', 'Apple App Store URL')}\n </label>\n <input\n id=\"appStoreUrl\"\n type=\"url\"\n value={formData.appStoreUrl}\n onChange={(e) => setFormData({ ...formData, appStoreUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://apps.apple.com/app/...\"\n disabled={loading}\n />\n {errors.appStoreUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.appStoreUrl}\n </p>\n )}\n </div>\n\n {/* Google Play Store URL */}\n <div>\n <label\n htmlFor=\"playStoreUrl\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.googlePlayStoreUrl', 'Google Play Store URL')}\n </label>\n <input\n id=\"playStoreUrl\"\n type=\"url\"\n value={formData.playStoreUrl}\n onChange={(e) => setFormData({ ...formData, playStoreUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://play.google.com/store/apps/details?id=...\"\n disabled={loading}\n />\n {errors.playStoreUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.playStoreUrl}\n </p>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* Social Media Links Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('social')}\n className={sectionHeaderClassName}\n >\n {expandedSections.social ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.socialMediaLinks', 'Social Media Links')}\n </button>\n\n {expandedSections.social && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {socialLinks.map((entry, index) => (\n <div key={entry.id} className=\"flex items-start gap-3\">\n <div className=\"flex-1\">\n <label\n htmlFor={`socialPlatform-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.platform', 'Platform')}\n </label>\n <input\n id={`socialPlatform-${index}`}\n type=\"text\"\n value={entry.platform}\n onChange={(e) => updateSocialLink(index, 'platform', e.target.value)}\n className={inputClassName}\n placeholder=\"e.g. twitter\"\n disabled={loading}\n />\n </div>\n <div className=\"flex-[2]\">\n <label\n htmlFor={`socialUrl-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.url', 'URL')}\n </label>\n <input\n id={`socialUrl-${index}`}\n type=\"url\"\n value={entry.url}\n onChange={(e) => updateSocialLink(index, 'url', e.target.value)}\n className={inputClassName}\n placeholder=\"https://twitter.com/yourproduct\"\n disabled={loading}\n />\n </div>\n <button\n type=\"button\"\n onClick={() => removeSocialLink(index)}\n disabled={loading}\n className=\"\n mt-7 p-2\n text-text-tertiary\n hover:text-[var(--color-status-error)]\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n title={tr('products.removeSocialLink', 'Remove social link')}\n >\n <X size={16} />\n </button>\n </div>\n ))}\n\n <button\n type=\"button\"\n onClick={addSocialLink}\n disabled={loading}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n text-sm font-medium\n text-text-secondary\n border border-dashed border-default\n rounded-lg\n hover:bg-bg-sunken hover:text-text-primary\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n <Plus size={16} />\n {tr('products.addSocialLink', 'Add Social Link')}\n </button>\n </div>\n )}\n </div>\n\n {/*\n * Resource Links Section\n * Identical shape to \"Social Media Links\" — a free-form list of\n * (resource-key, URL) rows. Surfaces in the website footer\n * \"Resources\" column via the SDK <ResourceLinks/> primitive. Known\n * resource keys the SDK renders today: `docs`, `community`,\n * `careers`, `team`, `companies`. Unknown keys are silently skipped\n * by the SDK, so admins can add new ones before the SDK ships an\n * icon/label for them.\n */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('resources')}\n className={sectionHeaderClassName}\n >\n {expandedSections.resources ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.resourceLinks', 'Resource Links')}\n </button>\n\n {expandedSections.resources && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n <p className=\"text-xs text-text-tertiary\">\n {tr(\n 'products.resourceLinksHint',\n 'Footer \"Resources\" column. Known keys: docs, community, careers, team, companies. Unknown keys are ignored by the website until the SDK adds them.'\n )}\n </p>\n\n {resourceLinks.map((entry, index) => (\n <div key={entry.id} className=\"flex items-start gap-3\">\n <div className=\"flex-1\">\n <label\n htmlFor={`resourceKey-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.resource', 'Resource')}\n </label>\n <input\n id={`resourceKey-${index}`}\n type=\"text\"\n value={entry.resource}\n onChange={(e) => updateResourceLink(index, 'resource', e.target.value)}\n className={inputClassName}\n placeholder=\"e.g. docs\"\n disabled={loading}\n />\n </div>\n <div className=\"flex-[2]\">\n <label\n htmlFor={`resourceUrl-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.url', 'URL')}\n </label>\n <input\n id={`resourceUrl-${index}`}\n type=\"url\"\n value={entry.url}\n onChange={(e) => updateResourceLink(index, 'url', e.target.value)}\n className={inputClassName}\n placeholder=\"https://docs.yourproduct.com\"\n disabled={loading}\n />\n </div>\n <button\n type=\"button\"\n onClick={() => removeResourceLink(index)}\n disabled={loading}\n className=\"\n mt-7 p-2\n text-text-tertiary\n hover:text-[var(--color-status-error)]\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n title={tr('products.removeResourceLink', 'Remove resource link')}\n >\n <X size={16} />\n </button>\n </div>\n ))}\n\n <button\n type=\"button\"\n onClick={addResourceLink}\n disabled={loading}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n text-sm font-medium\n text-text-secondary\n border border-dashed border-default\n rounded-lg\n hover:bg-bg-sunken hover:text-text-primary\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n <Plus size={16} />\n {tr('products.addResourceLink', 'Add Resource Link')}\n </button>\n </div>\n )}\n </div>\n\n {/* Integrations Section */}\n <div className=\"border border-default rounded-lg overflow-hidden\">\n <button\n type=\"button\"\n onClick={() => toggleSection('integrations')}\n className=\"\n w-full flex items-center gap-2 px-4 py-3\n text-sm font-semibold text-text-primary\n bg-surface hover:bg-bg-sunken\n transition-all duration-200\n \"\n >\n {expandedSections.integrations ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n <Shield size={16} className=\"text-text-secondary\" />\n {tr('products.integrations', 'Integrations')}\n <span className=\"text-xs font-normal text-text-secondary ml-1\">\n {tr('products.recaptcha', '(reCAPTCHA)')}\n </span>\n </button>\n\n {expandedSections.integrations && (\n <div className=\"px-4 pb-4 pt-2 space-y-4 border-t border-border-seam\">\n <p className=\"text-xs text-text-secondary\">\n {tr(\n 'products.recaptchaDescription',\n 'reCAPTCHA v2 keys for bot protection on website forms (newsletter, contact). Site key is public, secret key is used for server-side verification only.'\n )}\n </p>\n\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n {tr('products.recaptchaSiteKey', 'reCAPTCHA Site Key')}\n </label>\n <input\n type=\"text\"\n name=\"recaptchaSiteKey\"\n defaultValue={product?.recaptchaSiteKey || ''}\n disabled={loading}\n placeholder=\"6Lxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n className=\"\n w-full px-3 py-2\n bg-[var(--color-bg-input)] text-text-primary\n border border-default rounded-lg\n focus:outline-none focus:ring-2 focus:ring-[var(--color-action-primary-bg)] focus:border-transparent\n disabled:opacity-50\n text-sm font-mono\n transition-all duration-200\n \"\n />\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'products.recaptchaSiteKeyHint',\n 'Public key — exposed in frontend. Register at google.com/recaptcha/admin'\n )}\n </p>\n </div>\n\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n {tr('products.recaptchaSecretKey', 'reCAPTCHA Secret Key')}\n </label>\n <input\n type=\"password\"\n name=\"recaptchaSecretKey\"\n defaultValue=\"\"\n disabled={loading}\n placeholder={tr(\n 'products.enterSecretKeyPlaceholder',\n 'Enter secret key (leave empty to keep existing)'\n )}\n className=\"\n w-full px-3 py-2\n bg-[var(--color-bg-input)] text-text-primary\n border border-default rounded-lg\n focus:outline-none focus:ring-2 focus:ring-[var(--color-action-primary-bg)] focus:border-transparent\n disabled:opacity-50\n text-sm font-mono\n transition-all duration-200\n \"\n />\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'products.recaptchaSecretKeyHint',\n 'Secret key — server-side only, never exposed via public API'\n )}\n </p>\n </div>\n </div>\n )}\n </div>\n\n {/* Form Actions */}\n <div className=\"flex gap-3 pt-4 border-t border-border-seam\">\n <button\n type=\"submit\"\n disabled={loading}\n className=\"\n inline-flex items-center gap-2 px-6 py-2.5\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 disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n {loading && <Loader2 size={16} className=\"animate-spin\" />}\n {product\n ? tr('products.updateProduct', 'Update Product')\n : tr('products.createProduct', 'Create Product')}\n </button>\n\n <button\n type=\"button\"\n onClick={onCancel}\n disabled={loading}\n className=\"\n px-6 py-2.5\n bg-transparent\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n font-medium\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n {tr('productCommon.cancel', 'Cancel')}\n </button>\n </div>\n </form>\n );\n}\n"],"mappings":";;;;;;;;;;AAiBA,IAAI,IAAc,GACZ,KAAe,MAAmB,GAAG,EAAO,GAAG,EAAE;AAsBvD,SAAS,EAAgB,GAAqD;AAC5E,KAAI,GAAS,eAAe,OAAO,EAAQ,eAAgB,UAAU;EACnE,IAAM,IAAU,OAAO,QAAQ,EAAQ,YAAY;AACnD,MAAI,EAAQ,SAAS,EACnB,QAAO,EAAQ,KAAK,CAAC,GAAU,QAAU;GAAE,IAAI,EAAY,SAAS;GAAE;GAAU;GAAK,EAAE;;AAG3F,QAAO,EAAE;;AAGX,SAAS,EAAkB,GAAuD;AAChF,KAAI,GAAS,iBAAiB,OAAO,EAAQ,iBAAkB,UAAU;EACvE,IAAM,IAAU,OAAO,QAAQ,EAAQ,cAAc;AACrD,MAAI,EAAQ,SAAS,EACnB,QAAO,EAAQ,KAAK,CAAC,GAAU,QAAU;GAAE,IAAI,EAAY,WAAW;GAAE;GAAU;GAAK,EAAE;;AAG7F,QAAO,EAAE;;AAGX,SAAgB,EAAY,EAAE,YAAS,aAAU,aAAU,cAA6B;CACtF,IAAM,IAAK,GAAO,EAEZ,CAAC,GAAU,KAAe,EAAS;EACvC,MAAM,GAAS,QAAQ;EACvB,MAAM,GAAS,QAAQ;EACvB,aAAa,GAAS,eAAe;EACrC,QAAQ,GAAS,UAAU,EAAc;EACzC,SAAS,GAAS,WAAW;EAC7B,SAAS,GAAS,WAAW;EAC7B,QAAQ,GAAS,UAAU;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AiB,CAAA,EACzD,IACG,EAAG,0BAA0B,iBAAiB,GAC9C,EAAG,0BAA0B,iBAAiB,CAC3C;QAET,kBAAC,UAAD;KACE,MAAK;KACL,SAAS;KACT,UAAU;KACV,WAAU;eAYT,EAAG,wBAAwB,SAAS;KAC9B,CAAA,CACL;;GACD"}
|
|
1
|
+
{"version":3,"file":"ProductForm.js","names":["nextEntryId","makeEntryId","prefix","initSocialLinks","product","entries","platform","url","initResourceLinks","resource","ProductForm","tr","useTr","formData","setFormData","useState","ProductStatus","socialLinks","setSocialLinks","resourceLinks","setResourceLinks","tags","setTags","errors","setErrors","expandedSections","setExpandedSections","toggleSection","prev","section","addSocialLink","removeSocialLink","i","index","updateSocialLink","entry","field","value","buildSocialLinksRecord","filtered","record","addResourceLink","removeResourceLink","updateResourceLink","buildResourceLinksRecord","validate","schema","updateProductSchema","createProductSchema","dataToValidate","error","ZodError","newErrors","path","issue","handleSubmit","socialLinksRecord","resourceLinksRecord","onSubmit","form","siteKey","secretKey","result","inputClassName","sectionHeaderClassName","loading","MarkdownEditor","TagInput","ChevronDown","ChevronRight","X","Plus","Shield","Loader2","onCancel"],"sources":["../../../../../src/product-management/modules/products/components/ProductForm.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Loader2, ChevronDown, ChevronRight, Plus, X, Shield } from 'lucide-react';\nimport { ZodError } from 'zod';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport type { CreateProductInput, UpdateProductInput, PlatformProduct } from '../types';\nimport { ProductStatus } from '../types';\nimport { createProductSchema, updateProductSchema } from '../schemas';\nimport { TagInput } from '../../../shared/components/input/TagInput';\nimport { MarkdownEditor } from '../../../../shared/components/MarkdownEditor';\n\ninterface SocialLinkEntry {\n /** Stable client-side id so React list keys survive reorder/remove. */\n id: string;\n platform: string;\n url: string;\n}\n\nlet nextEntryId = 0;\nconst makeEntryId = (prefix: string) => `${prefix}-${++nextEntryId}`;\n\n/**\n * Resource-links share the same admin UI shape as social-links — a list of\n * (key, URL) rows the admin can freely add / remove. They're stored in their\n * own JSON column on `Product` so the website SDK can pick them up separately\n * from socials (different footer column, different default behaviour).\n */\ninterface ResourceLinkEntry {\n /** Stable client-side id so React list keys survive reorder/remove. */\n id: string;\n resource: string;\n url: string;\n}\n\ninterface ProductFormProps {\n product?: PlatformProduct | null;\n onSubmit: (data: CreateProductInput | UpdateProductInput) => Promise<void>;\n onCancel: () => void;\n loading?: boolean;\n}\n\nfunction initSocialLinks(product?: PlatformProduct | null): SocialLinkEntry[] {\n if (product?.socialLinks && typeof product.socialLinks === 'object') {\n const entries = Object.entries(product.socialLinks);\n if (entries.length > 0) {\n return entries.map(([platform, url]) => ({ id: makeEntryId('social'), platform, url }));\n }\n }\n return [];\n}\n\nfunction initResourceLinks(product?: PlatformProduct | null): ResourceLinkEntry[] {\n if (product?.resourceLinks && typeof product.resourceLinks === 'object') {\n const entries = Object.entries(product.resourceLinks);\n if (entries.length > 0) {\n return entries.map(([resource, url]) => ({ id: makeEntryId('resource'), resource, url }));\n }\n }\n return [];\n}\n\nexport function ProductForm({ product, onSubmit, onCancel, loading }: ProductFormProps) {\n const tr = useTr();\n\n const [formData, setFormData] = useState({\n name: product?.name || '',\n slug: product?.slug || '',\n description: product?.description || '',\n status: product?.status || ProductStatus.ACTIVE,\n logoUrl: product?.logoUrl || '',\n website: product?.website || '',\n appUrl: product?.appUrl || '',\n docsUrl: product?.docsUrl || '',\n githubUrl: product?.githubUrl || '',\n statusPageUrl: product?.statusPageUrl || '',\n contactEmail: product?.contactEmail || '',\n supportEmail: product?.supportEmail || '',\n contactPhone: product?.contactPhone || '',\n contactAddress: product?.contactAddress || '',\n seoTitle: product?.seoTitle || '',\n seoDescription: product?.seoDescription || '',\n seoKeywords: product?.seoKeywords || '',\n ogImage: product?.ogImage || '',\n appStoreUrl: product?.appStoreUrl || '',\n playStoreUrl: product?.playStoreUrl || '',\n });\n\n const [socialLinks, setSocialLinks] = useState<SocialLinkEntry[]>(() => initSocialLinks(product));\n const [resourceLinks, setResourceLinks] = useState<ResourceLinkEntry[]>(() =>\n initResourceLinks(product)\n );\n const [tags, setTags] = useState<string[]>(product?.tags ?? []);\n\n const [errors, setErrors] = useState<Record<string, string>>({});\n\n const [expandedSections, setExpandedSections] = useState<Record<string, boolean>>({\n contact: false,\n seo: false,\n appStore: false,\n social: false,\n resources: false,\n integrations: false,\n });\n\n const toggleSection = (section: string) => {\n setExpandedSections((prev) => ({ ...prev, [section]: !prev[section] }));\n };\n\n const addSocialLink = () => {\n setSocialLinks((prev) => [...prev, { id: makeEntryId('social'), platform: '', url: '' }]);\n };\n\n const removeSocialLink = (index: number) => {\n setSocialLinks((prev) => prev.filter((_, i) => i !== index));\n };\n\n const updateSocialLink = (index: number, field: 'platform' | 'url', value: string) => {\n setSocialLinks((prev) =>\n prev.map((entry, i) => (i === index ? { ...entry, [field]: value } : entry))\n );\n };\n\n const buildSocialLinksRecord = (): Record<string, string> | undefined => {\n const filtered = socialLinks.filter(\n (entry) => entry.platform.trim() !== '' && entry.url.trim() !== ''\n );\n if (filtered.length === 0) return undefined;\n const record: Record<string, string> = {};\n filtered.forEach((entry) => {\n record[entry.platform.trim()] = entry.url.trim();\n });\n return record;\n };\n\n const addResourceLink = () => {\n setResourceLinks((prev) => [...prev, { id: makeEntryId('resource'), resource: '', url: '' }]);\n };\n\n const removeResourceLink = (index: number) => {\n setResourceLinks((prev) => prev.filter((_, i) => i !== index));\n };\n\n const updateResourceLink = (index: number, field: 'resource' | 'url', value: string) => {\n setResourceLinks((prev) =>\n prev.map((entry, i) => (i === index ? { ...entry, [field]: value } : entry))\n );\n };\n\n const buildResourceLinksRecord = (): Record<string, string> | undefined => {\n const filtered = resourceLinks.filter(\n (entry) => entry.resource.trim() !== '' && entry.url.trim() !== ''\n );\n if (filtered.length === 0) return undefined;\n const record: Record<string, string> = {};\n filtered.forEach((entry) => {\n record[entry.resource.trim()] = entry.url.trim();\n });\n return record;\n };\n\n const validate = () => {\n try {\n const schema = product ? updateProductSchema : createProductSchema;\n const dataToValidate = {\n ...formData,\n socialLinks: buildSocialLinksRecord(),\n resourceLinks: buildResourceLinksRecord(),\n };\n schema.parse(dataToValidate);\n setErrors({});\n return true;\n } catch (error) {\n if (error instanceof ZodError) {\n const newErrors: Record<string, string> = {};\n error.issues.forEach((issue) => {\n const path = issue.path.join('.');\n newErrors[path] = issue.message;\n });\n setErrors(newErrors);\n }\n return false;\n }\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (!validate()) {\n return;\n }\n\n const socialLinksRecord = buildSocialLinksRecord();\n const resourceLinksRecord = buildResourceLinksRecord();\n\n const submitData = product\n ? {\n // Update only changed fields\n name: formData.name !== product.name ? formData.name : undefined,\n description:\n formData.description !== product.description ? formData.description : undefined,\n status: formData.status !== product.status ? formData.status : undefined,\n logoUrl: formData.logoUrl !== product.logoUrl ? formData.logoUrl : undefined,\n website: formData.website !== product.website ? formData.website : undefined,\n appUrl: formData.appUrl !== product.appUrl ? formData.appUrl : undefined,\n docsUrl: formData.docsUrl !== product.docsUrl ? formData.docsUrl : undefined,\n githubUrl: formData.githubUrl !== product.githubUrl ? formData.githubUrl : undefined,\n statusPageUrl:\n formData.statusPageUrl !== product.statusPageUrl ? formData.statusPageUrl : undefined,\n contactEmail:\n formData.contactEmail !== (product.contactEmail || '')\n ? formData.contactEmail\n : undefined,\n supportEmail:\n formData.supportEmail !== (product.supportEmail || '')\n ? formData.supportEmail\n : undefined,\n contactPhone:\n formData.contactPhone !== (product.contactPhone || '')\n ? formData.contactPhone\n : undefined,\n contactAddress:\n formData.contactAddress !== (product.contactAddress || '')\n ? formData.contactAddress\n : undefined,\n seoTitle: formData.seoTitle !== (product.seoTitle || '') ? formData.seoTitle : undefined,\n seoDescription:\n formData.seoDescription !== (product.seoDescription || '')\n ? formData.seoDescription\n : undefined,\n seoKeywords:\n formData.seoKeywords !== (product.seoKeywords || '') ? formData.seoKeywords : undefined,\n ogImage: formData.ogImage !== (product.ogImage || '') ? formData.ogImage : undefined,\n appStoreUrl:\n formData.appStoreUrl !== (product.appStoreUrl || '') ? formData.appStoreUrl : undefined,\n playStoreUrl:\n formData.playStoreUrl !== (product.playStoreUrl || '')\n ? formData.playStoreUrl\n : undefined,\n socialLinks: socialLinksRecord,\n resourceLinks: resourceLinksRecord,\n tags,\n // reCAPTCHA keys from Integrations section\n ...(() => {\n const form = e.target as HTMLFormElement;\n const siteKey = (form.elements.namedItem('recaptchaSiteKey') as HTMLInputElement)\n ?.value;\n const secretKey = (form.elements.namedItem('recaptchaSecretKey') as HTMLInputElement)\n ?.value;\n const result: Record<string, string | undefined> = {};\n if (siteKey && siteKey !== (product.recaptchaSiteKey || ''))\n result.recaptchaSiteKey = siteKey;\n if (secretKey) result.recaptchaSecretKey = secretKey;\n return result;\n })(),\n }\n : {\n // Create with all fields\n name: formData.name,\n slug: formData.slug,\n description: formData.description || undefined,\n status: formData.status,\n logoUrl: formData.logoUrl || undefined,\n website: formData.website || undefined,\n appUrl: formData.appUrl || undefined,\n docsUrl: formData.docsUrl || undefined,\n githubUrl: formData.githubUrl || undefined,\n statusPageUrl: formData.statusPageUrl || undefined,\n contactEmail: formData.contactEmail || undefined,\n supportEmail: formData.supportEmail || undefined,\n contactPhone: formData.contactPhone || undefined,\n contactAddress: formData.contactAddress || undefined,\n seoTitle: formData.seoTitle || undefined,\n seoDescription: formData.seoDescription || undefined,\n seoKeywords: formData.seoKeywords || undefined,\n ogImage: formData.ogImage || undefined,\n appStoreUrl: formData.appStoreUrl || undefined,\n playStoreUrl: formData.playStoreUrl || undefined,\n socialLinks: socialLinksRecord,\n resourceLinks: resourceLinksRecord,\n tags,\n };\n\n await onSubmit(submitData);\n };\n\n const inputClassName = `\n w-full px-3 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n placeholder:text-text-tertiary\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 `;\n\n const sectionHeaderClassName = `\n flex items-center gap-2 w-full text-left\n text-sm font-semibold text-text-secondary uppercase tracking-wider\n cursor-pointer hover:text-text-primary transition-colors duration-200\n `;\n\n return (\n <form onSubmit={handleSubmit} className=\"space-y-6 animate-in fade-in duration-200\">\n {/* Basic Information Section */}\n <div className=\"space-y-4\">\n <h3 className=\"text-sm font-semibold text-text-secondary uppercase tracking-wider\">\n {tr('products.basicInformation', 'Basic Information')}\n </h3>\n\n {/* Name */}\n <div>\n <label htmlFor=\"name\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.productName', 'Product Name')}{' '}\n <span className=\"text-[var(--color-status-error)]\">*</span>\n </label>\n <input\n id=\"name\"\n type=\"text\"\n value={formData.name}\n onChange={(e) => setFormData({ ...formData, name: e.target.value })}\n className={inputClassName}\n placeholder={tr('products.enterProductName', 'Enter product name')}\n disabled={loading}\n required\n />\n {errors.name && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.name}</p>\n )}\n </div>\n\n {/* Slug */}\n <div>\n <label htmlFor=\"slug\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.slug', 'Slug')}{' '}\n <span className=\"text-[var(--color-status-error)]\">*</span>\n </label>\n <input\n id=\"slug\"\n type=\"text\"\n value={formData.slug}\n onChange={(e) =>\n setFormData({ ...formData, slug: e.target.value.toLowerCase().replace(/\\s+/g, '-') })\n }\n className={inputClassName}\n placeholder=\"product-slug\"\n disabled={loading || !!product}\n required={!product}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr(\n 'products.slugHint',\n 'Lowercase letters, numbers, and hyphens only. Cannot be changed after creation.'\n )}\n </p>\n {errors.slug && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.slug}</p>\n )}\n </div>\n\n {/* Description */}\n <MarkdownEditor\n id=\"description\"\n label={tr('products.description', 'Description')}\n value={formData.description}\n onChange={(value) => setFormData({ ...formData, description: value })}\n placeholder={tr('products.enterProductDescription', 'Enter product description')}\n disabled={loading}\n rows={4}\n minHeight={120}\n />\n\n {/* Status */}\n <div>\n <label htmlFor=\"status\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.status', 'Status')}\n </label>\n <select\n id=\"status\"\n value={formData.status}\n onChange={(e) =>\n setFormData({\n ...formData,\n status: e.target.value as (typeof ProductStatus)[keyof typeof ProductStatus],\n })\n }\n className={\n inputClassName +\n ' scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary'\n }\n disabled={loading}\n >\n <option value={ProductStatus.ACTIVE}>{tr('products.statusActive', 'Active')}</option>\n <option value={ProductStatus.DRAFT}>{tr('products.statusDraft', 'Draft')}</option>\n <option value={ProductStatus.WAITLIST}>\n {tr('products.statusWaitlist', 'Waitlist')}\n </option>\n <option value={ProductStatus.COMING_SOON}>\n {tr('products.statusComingSoon', 'Coming Soon')}\n </option>\n </select>\n </div>\n\n {/* Tags */}\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.tags', 'Tags')}\n </label>\n <TagInput value={tags} onChange={setTags} disabled={loading} />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr('products.tagsHint', 'Press Enter or comma to add a tag.')}\n </p>\n </div>\n </div>\n\n {/* URLs Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <h3 className=\"text-sm font-semibold text-text-secondary uppercase tracking-wider\">\n {tr('products.urlsAndLinks', 'URLs & Links')}\n </h3>\n\n {/* Logo URL */}\n <div>\n <label htmlFor=\"logoUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.logoUrl', 'Logo URL')}\n </label>\n <input\n id=\"logoUrl\"\n type=\"url\"\n value={formData.logoUrl}\n onChange={(e) => setFormData({ ...formData, logoUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://example.com/logo.png\"\n disabled={loading}\n />\n {errors.logoUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.logoUrl}</p>\n )}\n </div>\n\n {/* App URL - Important for ProductSwitcher */}\n <div>\n <label htmlFor=\"appUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.appUrl', 'App URL')}{' '}\n <span className=\"text-[var(--color-status-warning)]\">\n {tr('products.requiredForProductSwitcher', '(Required for product switcher)')}\n </span>\n </label>\n <input\n id=\"appUrl\"\n type=\"url\"\n value={formData.appUrl}\n onChange={(e) => setFormData({ ...formData, appUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://app.product.com/\"\n disabled={loading}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr(\n 'products.appUrlHint',\n \"The main application URL. Products without an App URL won't appear in the product switcher.\"\n )}\n </p>\n {errors.appUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.appUrl}</p>\n )}\n </div>\n\n {/* Website URL */}\n <div>\n <label htmlFor=\"website\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.websiteUrl', 'Website URL')}\n </label>\n <input\n id=\"website\"\n type=\"url\"\n value={formData.website}\n onChange={(e) => setFormData({ ...formData, website: e.target.value })}\n className={inputClassName}\n placeholder=\"https://product.com/\"\n disabled={loading}\n />\n {errors.website && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.website}</p>\n )}\n </div>\n\n {/* Docs URL */}\n <div>\n <label htmlFor=\"docsUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.documentationUrl', 'Documentation URL')}\n </label>\n <input\n id=\"docsUrl\"\n type=\"url\"\n value={formData.docsUrl}\n onChange={(e) => setFormData({ ...formData, docsUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://docs.product.com/\"\n disabled={loading}\n />\n {errors.docsUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.docsUrl}</p>\n )}\n </div>\n\n {/* GitHub URL */}\n <div>\n <label htmlFor=\"githubUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.githubUrl', 'GitHub URL')}\n </label>\n <input\n id=\"githubUrl\"\n type=\"url\"\n value={formData.githubUrl}\n onChange={(e) => setFormData({ ...formData, githubUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://github.com/org/repo\"\n disabled={loading}\n />\n {errors.githubUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.githubUrl}</p>\n )}\n </div>\n\n {/* Status Page URL */}\n <div>\n <label\n htmlFor=\"statusPageUrl\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.statusPageUrl', 'Status Page URL')}\n </label>\n <input\n id=\"statusPageUrl\"\n type=\"url\"\n value={formData.statusPageUrl}\n onChange={(e) => setFormData({ ...formData, statusPageUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://status.product.com/\"\n disabled={loading}\n />\n {errors.statusPageUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.statusPageUrl}</p>\n )}\n </div>\n </div>\n\n {/* Contact Information Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('contact')}\n className={sectionHeaderClassName}\n >\n {expandedSections.contact ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.contactInformation', 'Contact Information')}\n </button>\n\n {expandedSections.contact && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {/* Contact Email */}\n <div>\n <label\n htmlFor=\"contactEmail\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.contactEmail', 'Contact Email')}\n </label>\n <input\n id=\"contactEmail\"\n type=\"email\"\n value={formData.contactEmail}\n onChange={(e) => setFormData({ ...formData, contactEmail: e.target.value })}\n className={inputClassName}\n placeholder=\"contact@product.com\"\n disabled={loading}\n />\n {errors.contactEmail && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.contactEmail}\n </p>\n )}\n </div>\n\n {/* Support Email */}\n <div>\n <label\n htmlFor=\"supportEmail\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.supportEmail', 'Support Email')}\n </label>\n <input\n id=\"supportEmail\"\n type=\"email\"\n value={formData.supportEmail}\n onChange={(e) => setFormData({ ...formData, supportEmail: e.target.value })}\n className={inputClassName}\n placeholder=\"support@product.com\"\n disabled={loading}\n />\n {errors.supportEmail && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.supportEmail}\n </p>\n )}\n </div>\n\n {/* Contact Phone */}\n <div>\n <label\n htmlFor=\"contactPhone\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.contactPhone', 'Contact Phone')}\n </label>\n <input\n id=\"contactPhone\"\n type=\"tel\"\n value={formData.contactPhone}\n onChange={(e) => setFormData({ ...formData, contactPhone: e.target.value })}\n className={inputClassName}\n placeholder=\"+1 (555) 123-4567\"\n disabled={loading}\n />\n {errors.contactPhone && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.contactPhone}\n </p>\n )}\n </div>\n\n {/* Contact Address */}\n <div>\n <label\n htmlFor=\"contactAddress\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.contactAddress', 'Contact Address')}\n </label>\n <textarea\n id=\"contactAddress\"\n value={formData.contactAddress}\n onChange={(e) => setFormData({ ...formData, contactAddress: e.target.value })}\n rows={3}\n className={inputClassName}\n placeholder=\"123 Main St, City, State, ZIP\"\n disabled={loading}\n />\n {errors.contactAddress && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.contactAddress}\n </p>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* SEO Metadata Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('seo')}\n className={sectionHeaderClassName}\n >\n {expandedSections.seo ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.seoMetadata', 'SEO Metadata')}\n </button>\n\n {expandedSections.seo && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {/* SEO Title */}\n <div>\n <label\n htmlFor=\"seoTitle\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.seoTitle', 'SEO Title')}\n </label>\n <input\n id=\"seoTitle\"\n type=\"text\"\n value={formData.seoTitle}\n onChange={(e) => setFormData({ ...formData, seoTitle: e.target.value })}\n className={inputClassName}\n placeholder=\"Product SEO title\"\n disabled={loading}\n maxLength={100}\n />\n <div className=\"flex justify-between mt-1\">\n {errors.seoTitle ? (\n <p className=\"text-sm text-[var(--color-status-error)]\">{errors.seoTitle}</p>\n ) : (\n <span />\n )}\n <p className=\"text-xs text-text-tertiary\">{formData.seoTitle.length}/100</p>\n </div>\n </div>\n\n {/* SEO Description */}\n <div>\n <label\n htmlFor=\"seoDescription\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.seoDescription', 'SEO Description')}\n </label>\n <textarea\n id=\"seoDescription\"\n value={formData.seoDescription}\n onChange={(e) => setFormData({ ...formData, seoDescription: e.target.value })}\n rows={3}\n className={inputClassName}\n placeholder={tr(\n 'products.seoDescriptionPlaceholder',\n 'Brief description for search engines'\n )}\n disabled={loading}\n maxLength={300}\n />\n <div className=\"flex justify-between mt-1\">\n {errors.seoDescription ? (\n <p className=\"text-sm text-[var(--color-status-error)]\">\n {errors.seoDescription}\n </p>\n ) : (\n <span />\n )}\n <p className=\"text-xs text-text-tertiary\">{formData.seoDescription.length}/300</p>\n </div>\n </div>\n\n {/* SEO Keywords */}\n <div>\n <label\n htmlFor=\"seoKeywords\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.seoKeywords', 'SEO Keywords')}\n </label>\n <input\n id=\"seoKeywords\"\n type=\"text\"\n value={formData.seoKeywords}\n onChange={(e) => setFormData({ ...formData, seoKeywords: e.target.value })}\n className={inputClassName}\n placeholder=\"keyword1, keyword2, keyword3\"\n disabled={loading}\n maxLength={200}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr(\n 'products.seoKeywordsHint',\n 'Comma-separated keywords for search engine optimization.'\n )}\n </p>\n {errors.seoKeywords && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.seoKeywords}\n </p>\n )}\n </div>\n\n {/* OG Image */}\n <div>\n <label htmlFor=\"ogImage\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.ogImageUrl', 'OG Image URL')}\n </label>\n <input\n id=\"ogImage\"\n type=\"url\"\n value={formData.ogImage}\n onChange={(e) => setFormData({ ...formData, ogImage: e.target.value })}\n className={inputClassName}\n placeholder=\"https://example.com/og-image.png\"\n disabled={loading}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr('products.ogImageHint', 'Open Graph image used when sharing on social media.')}\n </p>\n {errors.ogImage && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.ogImage}</p>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* App Store Links Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('appStore')}\n className={sectionHeaderClassName}\n >\n {expandedSections.appStore ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.appStoreLinks', 'App Store Links')}\n </button>\n\n {expandedSections.appStore && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {/* Apple App Store URL */}\n <div>\n <label\n htmlFor=\"appStoreUrl\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.appleAppStoreUrl', 'Apple App Store URL')}\n </label>\n <input\n id=\"appStoreUrl\"\n type=\"url\"\n value={formData.appStoreUrl}\n onChange={(e) => setFormData({ ...formData, appStoreUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://apps.apple.com/app/...\"\n disabled={loading}\n />\n {errors.appStoreUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.appStoreUrl}\n </p>\n )}\n </div>\n\n {/* Google Play Store URL */}\n <div>\n <label\n htmlFor=\"playStoreUrl\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.googlePlayStoreUrl', 'Google Play Store URL')}\n </label>\n <input\n id=\"playStoreUrl\"\n type=\"url\"\n value={formData.playStoreUrl}\n onChange={(e) => setFormData({ ...formData, playStoreUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://play.google.com/store/apps/details?id=...\"\n disabled={loading}\n />\n {errors.playStoreUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.playStoreUrl}\n </p>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* Social Media Links Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('social')}\n className={sectionHeaderClassName}\n >\n {expandedSections.social ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.socialMediaLinks', 'Social Media Links')}\n </button>\n\n {expandedSections.social && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {socialLinks.map((entry, index) => (\n <div key={entry.id} className=\"flex items-start gap-3\">\n <div className=\"flex-1\">\n <label\n htmlFor={`socialPlatform-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.platform', 'Platform')}\n </label>\n <input\n id={`socialPlatform-${index}`}\n type=\"text\"\n value={entry.platform}\n onChange={(e) => updateSocialLink(index, 'platform', e.target.value)}\n className={inputClassName}\n placeholder=\"e.g. twitter\"\n disabled={loading}\n />\n </div>\n <div className=\"flex-[2]\">\n <label\n htmlFor={`socialUrl-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.url', 'URL')}\n </label>\n <input\n id={`socialUrl-${index}`}\n type=\"url\"\n value={entry.url}\n onChange={(e) => updateSocialLink(index, 'url', e.target.value)}\n className={inputClassName}\n placeholder=\"https://twitter.com/yourproduct\"\n disabled={loading}\n />\n </div>\n <button\n type=\"button\"\n onClick={() => removeSocialLink(index)}\n disabled={loading}\n className=\"\n mt-7 p-2\n text-text-tertiary\n hover:text-[var(--color-status-error)]\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n title={tr('products.removeSocialLink', 'Remove social link')}\n >\n <X size={16} />\n </button>\n </div>\n ))}\n\n <button\n type=\"button\"\n onClick={addSocialLink}\n disabled={loading}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n text-sm font-medium\n text-text-secondary\n border border-dashed border-default\n rounded-lg\n hover:bg-bg-sunken hover:text-text-primary\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n <Plus size={16} />\n {tr('products.addSocialLink', 'Add Social Link')}\n </button>\n </div>\n )}\n </div>\n\n {/*\n * Resource Links Section\n * Identical shape to \"Social Media Links\" — a free-form list of\n * (resource-key, URL) rows. Surfaces in the website footer\n * \"Resources\" column via the SDK <ResourceLinks/> primitive. Known\n * resource keys the SDK renders today: `docs`, `community`,\n * `careers`, `team`, `companies`. Unknown keys are silently skipped\n * by the SDK, so admins can add new ones before the SDK ships an\n * icon/label for them.\n */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('resources')}\n className={sectionHeaderClassName}\n >\n {expandedSections.resources ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.resourceLinks', 'Resource Links')}\n </button>\n\n {expandedSections.resources && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n <p className=\"text-xs text-text-tertiary\">\n {tr(\n 'products.resourceLinksHint',\n 'Footer \"Resources\" column. Known keys: docs, community, careers, team, companies. Unknown keys are ignored by the website until the SDK adds them.'\n )}\n </p>\n\n {resourceLinks.map((entry, index) => (\n <div key={entry.id} className=\"flex items-start gap-3\">\n <div className=\"flex-1\">\n <label\n htmlFor={`resourceKey-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.resource', 'Resource')}\n </label>\n <input\n id={`resourceKey-${index}`}\n type=\"text\"\n value={entry.resource}\n onChange={(e) => updateResourceLink(index, 'resource', e.target.value)}\n className={inputClassName}\n placeholder=\"e.g. docs\"\n disabled={loading}\n />\n </div>\n <div className=\"flex-[2]\">\n <label\n htmlFor={`resourceUrl-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.url', 'URL')}\n </label>\n <input\n id={`resourceUrl-${index}`}\n type=\"url\"\n value={entry.url}\n onChange={(e) => updateResourceLink(index, 'url', e.target.value)}\n className={inputClassName}\n placeholder=\"https://docs.yourproduct.com\"\n disabled={loading}\n />\n </div>\n <button\n type=\"button\"\n onClick={() => removeResourceLink(index)}\n disabled={loading}\n className=\"\n mt-7 p-2\n text-text-tertiary\n hover:text-[var(--color-status-error)]\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n title={tr('products.removeResourceLink', 'Remove resource link')}\n >\n <X size={16} />\n </button>\n </div>\n ))}\n\n <button\n type=\"button\"\n onClick={addResourceLink}\n disabled={loading}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n text-sm font-medium\n text-text-secondary\n border border-dashed border-default\n rounded-lg\n hover:bg-bg-sunken hover:text-text-primary\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n <Plus size={16} />\n {tr('products.addResourceLink', 'Add Resource Link')}\n </button>\n </div>\n )}\n </div>\n\n {/* Integrations Section */}\n <div className=\"border border-default rounded-lg overflow-hidden\">\n <button\n type=\"button\"\n onClick={() => toggleSection('integrations')}\n className=\"\n w-full flex items-center gap-2 px-4 py-3\n text-sm font-semibold text-text-primary\n bg-surface hover:bg-bg-sunken\n transition-all duration-200\n \"\n >\n {expandedSections.integrations ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n <Shield size={16} className=\"text-text-secondary\" />\n {tr('products.integrations', 'Integrations')}\n <span className=\"text-xs font-normal text-text-secondary ml-1\">\n {tr('products.recaptcha', '(reCAPTCHA)')}\n </span>\n </button>\n\n {expandedSections.integrations && (\n <div className=\"px-4 pb-4 pt-2 space-y-4 border-t border-border-seam\">\n <p className=\"text-xs text-text-secondary\">\n {tr(\n 'products.recaptchaDescription',\n 'reCAPTCHA v2 keys for bot protection on website forms (newsletter, contact). Site key is public, secret key is used for server-side verification only.'\n )}\n </p>\n\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n {tr('products.recaptchaSiteKey', 'reCAPTCHA Site Key')}\n </label>\n <input\n type=\"text\"\n name=\"recaptchaSiteKey\"\n defaultValue={product?.recaptchaSiteKey || ''}\n disabled={loading}\n placeholder=\"6Lxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n className=\"\n w-full px-3 py-2\n bg-[var(--color-bg-input)] text-text-primary\n border border-default rounded-lg\n focus:outline-none focus:ring-2 focus:ring-[var(--color-action-primary-bg)] focus:border-transparent\n disabled:opacity-50\n text-sm font-mono\n transition-all duration-200\n \"\n />\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'products.recaptchaSiteKeyHint',\n 'Public key — exposed in frontend. Register at google.com/recaptcha/admin'\n )}\n </p>\n </div>\n\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n {tr('products.recaptchaSecretKey', 'reCAPTCHA Secret Key')}\n </label>\n <input\n type=\"password\"\n name=\"recaptchaSecretKey\"\n defaultValue=\"\"\n disabled={loading}\n placeholder={tr(\n 'products.enterSecretKeyPlaceholder',\n 'Enter secret key (leave empty to keep existing)'\n )}\n className=\"\n w-full px-3 py-2\n bg-[var(--color-bg-input)] text-text-primary\n border border-default rounded-lg\n focus:outline-none focus:ring-2 focus:ring-[var(--color-action-primary-bg)] focus:border-transparent\n disabled:opacity-50\n text-sm font-mono\n transition-all duration-200\n \"\n />\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'products.recaptchaSecretKeyHint',\n 'Secret key — server-side only, never exposed via public API'\n )}\n </p>\n </div>\n </div>\n )}\n </div>\n\n {/* Form Actions */}\n <div className=\"flex gap-3 pt-4 border-t border-border-seam\">\n <button\n type=\"submit\"\n disabled={loading}\n className=\"\n inline-flex items-center gap-2 px-6 py-2.5\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 disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n {loading && <Loader2 size={16} className=\"animate-spin\" />}\n {product\n ? tr('products.updateProduct', 'Update Product')\n : tr('products.createProduct', 'Create Product')}\n </button>\n\n <button\n type=\"button\"\n onClick={onCancel}\n disabled={loading}\n className=\"\n px-6 py-2.5\n bg-transparent\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n font-medium\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n {tr('productCommon.cancel', 'Cancel')}\n </button>\n </div>\n </form>\n );\n}\n"],"mappings":";;;;;;;;;;AAiBA,IAAIA,IAAc,GACZC,KAAe,MAAmB,GAAGC,EAAO,GAAG,EAAEF;AAsBvD,SAASG,EAAgB,GAAqD;CAC5E,IAAIC,GAAS,eAAe,OAAOA,EAAQ,eAAgB,UAAU;EACnE,IAAMC,IAAU,OAAO,QAAQD,EAAQ,WAAW;EAClD,IAAIC,EAAQ,SAAS,GACnB,OAAOA,EAAQ,KAAK,CAACC,GAAUC,QAAU;GAAE,IAAIN,EAAY,QAAQ;GAAG;GAAU;EAAI,EAAE;CAE1F;CACA,OAAO,CAAC;AACV;AAEA,SAASO,EAAkB,GAAuD;CAChF,IAAIJ,GAAS,iBAAiB,OAAOA,EAAQ,iBAAkB,UAAU;EACvE,IAAMC,IAAU,OAAO,QAAQD,EAAQ,aAAa;EACpD,IAAIC,EAAQ,SAAS,GACnB,OAAOA,EAAQ,KAAK,CAACI,GAAUF,QAAU;GAAE,IAAIN,EAAY,UAAU;GAAG;GAAU;EAAI,EAAE;CAE5F;CACA,OAAO,CAAC;AACV;AAEA,SAAgBS,EAAY,EAAE,YAAS,aAAU,aAAU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D,kBAAC,KAAD;QAAG,WAAU;QACV,UAAAtD,EACC,iCACA,0EACF;OACC,CAAA;MACA,EAAA,CAAA;MAEL,kBAAC,OAAD,EAAA,UAAA;OACE,kBAAC,SAAD;QAAO,WAAU;QACd,UAAAA,EAAG,+BAA+B,sBAAsB;OACpD,CAAA;OACP,kBAAC,SAAD;QACE,MAAK;QACL,MAAK;QACL,cAAa;QACb,UAAUsD;QACV,aAAatD,EACX,sCACA,iDACF;QACA,WAAU;OASX,CAAA;OACD,kBAAC,KAAD;QAAG,WAAU;QACV,UAAAA,EACC,mCACA,6DACF;OACC,CAAA;MACA,EAAA,CAAA;KACF;IAEJ,CAAA,CAAA;;GAGL,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,UAAD;KACE,MAAK;KACL,UAAUsD;KACV,WAAU;KAHZ,UAAA,CAcGA,KAAW,kBAACQ,GAAD;MAAS,MAAM;MAAI,WAAU;KAAgB,CAAA,GACxDrE,IACGO,EAAG,0BAA0B,gBAAgB,IAC7CA,EAAG,0BAA0B,gBAAgB,CAC3C;IAER,CAAA,GAAA,kBAAC,UAAD;KACE,MAAK;KACL,SAAS+D;KACT,UAAUT;KACV,WAAU;KAYT,UAAAtD,EAAG,wBAAwB,QAAQ;IAC9B,CAAA,CACL;;EACD;;AAEV"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface ProductPlansProps {
|
|
2
|
+
productId: string;
|
|
3
|
+
productName: string;
|
|
4
|
+
readOnly?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function ProductPlans({ productId, productName: _productName, readOnly, }: ProductPlansProps): import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=ProductPlans.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductPlans.d.ts","sourceRoot":"","sources":["../../../../../src/product-management/modules/products/components/ProductPlans.tsx"],"names":[],"mappings":"AA+HA,UAAU,iBAAiB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,WAAW,EAAE,YAAY,EACzB,QAAgB,GACjB,EAAE,iBAAiB,+BAyoBnB"}
|
|
@@ -4,7 +4,7 @@ import { Check as i, DollarSign as a, Edit as o, List as s, Loader2 as c, Plus a
|
|
|
4
4
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
5
5
|
import { IllustratedEmptyState as m } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
import { graphqlFetch as h } from "@burdenoff/fe-libs/shared/graphql/fetch";
|
|
7
|
-
|
|
7
|
+
// src/product-management/modules/products/components/ProductPlans.tsx
|
|
8
8
|
var g = "\n query GetAllPlans {\n getAllPlans {\n id\n name\n price\n currency\n duration\n isActive\n productID\n features {\n id\n quotaId\n quota {\n id\n name\n limits\n }\n }\n createdAt\n }\n }\n", _ = "\n query GetAllQuotas {\n getAllQuotas {\n id\n name\n limits\n }\n }\n", v = "\n mutation CreateQuota($input: createQuotaInput!) {\n createQuota(input: $input)\n }\n", y = "\n mutation CreatePlan($input: createPlanInput!) {\n createPlan(input: $input)\n }\n", te = "\n mutation UpdatePlan($input: updatePlanInput!) {\n updatePlan(input: $input)\n }\n", b = "\n mutation TogglePlan($planID: ID!, $status: Boolean!) {\n togglePlan(planID: $planID, status: $status)\n }\n";
|
|
9
9
|
function x({ productId: x, productName: ne, readOnly: S = !1 }) {
|
|
10
10
|
let C = e(), [w, T] = r([]), [E, re] = r([]), [ie, D] = r(!0), [O, k] = r(null), [A, j] = r(!1), [M, N] = r(null), [P, F] = r(!1), [I, L] = r(!1), [R, z] = r(""), [B, V] = r({
|
|
@@ -24,8 +24,8 @@ function x({ productId: x, productName: ne, readOnly: S = !1 }) {
|
|
|
24
24
|
}, []), U = t(async () => {
|
|
25
25
|
try {
|
|
26
26
|
D(!0);
|
|
27
|
-
let [e, t] = await Promise.all([H(g), H(_)]);
|
|
28
|
-
T(
|
|
27
|
+
let [e, t] = await Promise.all([H(g), H(_)]), n = e?.getAllPlans || [];
|
|
28
|
+
T(n.filter((e) => e.productID === x)), re(t?.getAllQuotas || []), k(null);
|
|
29
29
|
} catch (e) {
|
|
30
30
|
k(C("products.failedToLoadPlans", "Failed to load plans")), console.error("Failed to fetch plans:", e);
|
|
31
31
|
} finally {
|
|
@@ -224,26 +224,29 @@ function x({ productId: x, productName: ne, readOnly: S = !1 }) {
|
|
|
224
224
|
}), C("products.featuresQuotas", "Features / Quotas")]
|
|
225
225
|
}), E.length > 0 ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", {
|
|
226
226
|
className: "space-y-1.5 max-h-32 overflow-y-auto",
|
|
227
|
-
children: E.map((e) =>
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
227
|
+
children: E.map((e) => {
|
|
228
|
+
let t = B.quotas.some((t) => t.quotaId === e.id);
|
|
229
|
+
return /* @__PURE__ */ p("label", {
|
|
230
|
+
className: "flex items-center gap-2 text-xs text-text-primary cursor-pointer hover:bg-bg-sunken/50 px-2 py-1 rounded",
|
|
231
|
+
children: [/* @__PURE__ */ f("input", {
|
|
232
|
+
type: "checkbox",
|
|
233
|
+
checked: t,
|
|
234
|
+
onChange: (t) => {
|
|
235
|
+
t.target.checked ? V({
|
|
236
|
+
...B,
|
|
237
|
+
quotas: [...B.quotas, {
|
|
238
|
+
quotaId: e.id,
|
|
239
|
+
quantity: 1
|
|
240
|
+
}]
|
|
241
|
+
}) : V({
|
|
242
|
+
...B,
|
|
243
|
+
quotas: B.quotas.filter((t) => t.quotaId !== e.id)
|
|
244
|
+
});
|
|
245
|
+
},
|
|
246
|
+
className: "rounded border-default"
|
|
247
|
+
}), e.name]
|
|
248
|
+
}, e.id);
|
|
249
|
+
})
|
|
247
250
|
}), /* @__PURE__ */ p("div", {
|
|
248
251
|
className: "flex items-center gap-2 mt-2",
|
|
249
252
|
children: [
|
|
@@ -500,7 +503,6 @@ function x({ productId: x, productName: ne, readOnly: S = !1 }) {
|
|
|
500
503
|
]
|
|
501
504
|
});
|
|
502
505
|
}
|
|
503
|
-
//#endregion
|
|
504
506
|
export { x as ProductPlans };
|
|
505
507
|
|
|
506
508
|
//# sourceMappingURL=ProductPlans.js.map
|