themelia-react-ui 1.0.1 → 2.0.0
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/CHANGELOG.md +417 -0
- package/README.md +67 -16
- package/dist/{accordion-B-5Focs8.js → accordion-CQXVcd7Q.js} +15 -15
- package/dist/accordion-CQXVcd7Q.js.map +1 -0
- package/dist/action-menu-BTpyPWJ2.js +264 -0
- package/dist/action-menu-BTpyPWJ2.js.map +1 -0
- package/dist/affordance-geometry.generated-CCIXb2A1.js +68 -0
- package/dist/affordance-geometry.generated-CCIXb2A1.js.map +1 -0
- package/dist/{ai-artifact-B5tPpXnS.js → ai-artifact-2PQ2fItc.js} +206 -215
- package/dist/ai-artifact-2PQ2fItc.js.map +1 -0
- package/dist/{app-shell-at8Kt4l_.js → app-shell-BE_j8-AT.js} +11 -10
- package/dist/app-shell-BE_j8-AT.js.map +1 -0
- package/dist/{attachment-BO2R47wn.js → attachment-q69dlt5Y.js} +14 -14
- package/dist/attachment-q69dlt5Y.js.map +1 -0
- package/dist/auth-M3vGMgDR.js +723 -0
- package/dist/auth-M3vGMgDR.js.map +1 -0
- package/dist/{avatar-Bpzty83c.js → avatar-djdaaQ_s.js} +15 -13
- package/dist/avatar-djdaaQ_s.js.map +1 -0
- package/dist/{badge-BZXZT9wd.js → badge-0tATj-tW.js} +9 -9
- package/dist/badge-0tATj-tW.js.map +1 -0
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/buttons.js +3 -2
- package/dist/base/cards.js +3 -3
- package/dist/base/carousel.js +33 -35
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +246 -222
- package/dist/base/cascader.js.map +1 -1
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +3 -3
- package/dist/base/display.js +7 -7
- package/dist/base/feedback.js +4 -4
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +94 -92
- package/dist/base/inline-edit.js.map +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/navigation.js +6 -6
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +7 -4
- package/dist/base/qr-code.js.map +1 -1
- package/dist/base/repeaters.js +53 -53
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +1 -1
- package/dist/base/signature-pad.js +84 -82
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +1 -1
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +7 -7
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/blocks/admin.js +228 -219
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +182 -212
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +665 -620
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +2 -2
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1439 -1553
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +1 -1
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +88 -97
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-DdQ_I5ra.js → breadcrumbs-BG_FfMK4.js} +10 -9
- package/dist/breadcrumbs-BG_FfMK4.js.map +1 -0
- package/dist/button-BS3KDg00.js +674 -0
- package/dist/button-BS3KDg00.js.map +1 -0
- package/dist/{button-BS6l5JUw.js → button-R9CCoH7A.js} +3 -3
- package/dist/button-R9CCoH7A.js.map +1 -0
- package/dist/buttons-DS0ZIwJ_.js +99 -0
- package/dist/buttons-DS0ZIwJ_.js.map +1 -0
- package/dist/{cards-Cum56XOF.js → cards-QoJ4syG9.js} +12 -12
- package/dist/{cards-Cum56XOF.js.map → cards-QoJ4syG9.js.map} +1 -1
- package/dist/chart-DwYRKKc-.js +152 -0
- package/dist/chart-DwYRKKc-.js.map +1 -0
- package/dist/checkbox-B7ygNTYp.js +35 -0
- package/dist/checkbox-B7ygNTYp.js.map +1 -0
- package/dist/choice-inputs-DrJ17tpL.js +752 -0
- package/dist/choice-inputs-DrJ17tpL.js.map +1 -0
- package/dist/{code-block-xHKbAJDj.js → code-block-CD0B7M93.js} +27 -27
- package/dist/code-block-CD0B7M93.js.map +1 -0
- package/dist/{collapsible-DsnktFNv.js → collapsible-oMUGM4tr.js} +3 -3
- package/dist/{collapsible-DsnktFNv.js.map → collapsible-oMUGM4tr.js.map} +1 -1
- package/dist/{collection-content-C4fthJV_.js → collection-content-Ys-OZOkY.js} +3 -3
- package/dist/{collection-content-C4fthJV_.js.map → collection-content-Ys-OZOkY.js.map} +1 -1
- package/dist/combobox-6dvVny2q.js +272 -0
- package/dist/combobox-6dvVny2q.js.map +1 -0
- package/dist/combobox-CB7039j7.js +865 -0
- package/dist/combobox-CB7039j7.js.map +1 -0
- package/dist/{command-C0xe7u9B.js → command-kPMPjIxJ.js} +35 -31
- package/dist/command-kPMPjIxJ.js.map +1 -0
- package/dist/{comments-DviPLnwy.js → comments-You0Bzbr.js} +434 -409
- package/dist/comments-You0Bzbr.js.map +1 -0
- package/dist/components/base/accordion/accordion-variants.d.ts +3 -3
- package/dist/components/base/action-menu/action-menu.d.ts +7 -2
- package/dist/components/base/avatar/stacked-avatars.d.ts +5 -4
- package/dist/components/base/badge/badge.d.ts +1 -1
- package/dist/components/base/badge/badge.recipes.d.ts +4 -4
- package/dist/components/base/buttons/base-button.d.ts +7 -0
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/buttons/button.recipes.d.ts +10 -19
- package/dist/components/base/buttons/button.variants.d.ts +1 -0
- package/dist/components/base/buttons/loader-button.d.ts +3 -1
- package/dist/components/base/buttons/text-button.d.ts +2 -2
- package/dist/components/base/buttons/use-pending-button-focus.d.ts +3 -0
- package/dist/components/base/cards/card.recipes.d.ts +13 -5
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -4
- package/dist/components/base/cards/smart-card.types.d.ts +1 -1
- package/dist/components/base/carousel/carousel.d.ts +3 -1
- package/dist/components/base/chart/chart.d.ts +7 -7
- package/dist/components/base/choice-inputs/checkbox.d.ts +6 -7
- package/dist/components/base/choice-inputs/choice-types.d.ts +10 -1
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +9 -0
- package/dist/components/base/choice-inputs/select-popup.d.ts +9 -1
- package/dist/components/base/choice-inputs/switch-card.d.ts +1 -1
- package/dist/components/base/date-pickers/date-picker-field.d.ts +23 -0
- package/dist/components/base/date-pickers/date-picker.recipes.d.ts +5 -18
- package/dist/components/base/date-pickers/datepicker.types.d.ts +16 -3
- package/dist/components/base/display/alert-dialog.d.ts +8 -2
- package/dist/components/base/display/content-block.d.ts +4 -2
- package/dist/components/base/display/date-block.d.ts +1 -1
- package/dist/components/base/display/dialog.d.ts +12 -5
- package/dist/components/base/display/surface-title.d.ts +6 -1
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/feedback/state-display.d.ts +5 -4
- package/dist/components/base/forms/form-field.d.ts +1 -0
- package/dist/components/base/forms/form-sizing.d.ts +35 -3
- package/dist/components/base/forms/workflow.d.ts +2 -0
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +3 -0
- package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +4 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +2 -2
- package/dist/components/base/navigation/language-switcher.d.ts +4 -1
- package/dist/components/base/navigation/overflow-tab-bar.d.ts +7 -0
- package/dist/components/base/navigation/page-header/page-header.d.ts +4 -1
- package/dist/components/base/navigation/tabs.d.ts +3 -5
- package/dist/components/base/popover/popover.recipes.d.ts +3 -3
- package/dist/components/base/qr-code/qr-code.d.ts +2 -0
- package/dist/components/base/sheet/index.d.ts +29 -1
- package/dist/components/base/sheet/sheet.d.ts +14 -5
- package/dist/components/base/spinner/spinner.d.ts +3 -2
- package/dist/components/base/structure/structure.types.d.ts +1 -1
- package/dist/components/base/table/index.d.ts +1 -1
- package/dist/components/base/text-inputs/clear-native-field.d.ts +2 -0
- package/dist/components/base/text-inputs/input-group.d.ts +2 -2
- package/dist/components/base/text-inputs/input-trailing-action.d.ts +3 -0
- package/dist/components/base/upload/upload.recipes.d.ts +11 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +4 -2
- package/dist/components/base/value-inputs/tags-input.d.ts +2 -0
- package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +1 -1
- package/dist/components/blocks/analytics/format-metric-value.d.ts +11 -1
- package/dist/components/blocks/analytics/index.d.ts +1 -1
- package/dist/components/blocks/analytics/types.d.ts +1 -1
- package/dist/components/blocks/analytics/use-metric-format-options.d.ts +3 -0
- package/dist/components/blocks/collaboration/message/message.recipes.d.ts +12 -0
- package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
- package/dist/components/blocks/commerce/address-card/types.d.ts +3 -1
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +4 -0
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +2 -2
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +4 -1
- package/dist/components/blocks/commerce/loyalty-points/types.d.ts +1 -1
- package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +1 -1
- package/dist/components/blocks/commerce/payment-method/types.d.ts +3 -1
- package/dist/components/blocks/commerce/seo-listing/seo-listing-card.d.ts +1 -1
- package/dist/components/blocks/commerce/seo-listing/types.d.ts +3 -1
- package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -1
- package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +4 -1
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/document-stack.d.ts +1 -4
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.d.ts +1 -4
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/index.d.ts +3 -3
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.d.ts +1 -6
- package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +4 -1
- package/dist/components/features/combobox/components/error-message.d.ts +1 -1
- package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -0
- package/dist/components/features/filters/facets/search-facet.d.ts +0 -12
- package/dist/components/features/filters/facets/tags-facet.d.ts +1 -1
- package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +1 -1
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.types.d.ts +9 -1
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
- package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
- package/dist/components/features/overlays/drawer.d.ts +1 -1
- package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +2 -2
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +11 -4
- package/dist/components/features/overlays/hooks/use-pending-overlay-focus.d.ts +2 -0
- package/dist/components/features/overlays/overlay-tone-icon.d.ts +37 -0
- package/dist/components/features/overlays/overlays.types.d.ts +46 -22
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/partials/index.d.ts +1 -1
- package/dist/components/features/products/partials/product-metric-tile.d.ts +6 -0
- package/dist/components/features/products/partials/product-tone.d.ts +11 -1
- package/dist/components/features/products/products.types.d.ts +2 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +2 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/partials/cell-renderers.d.ts +1 -1
- package/dist/components/features/table/table.types.d.ts +1 -1
- package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +3 -1
- package/dist/components/layout/auth/auth.types.d.ts +1 -0
- package/dist/components/layout/page/index.d.ts +1 -1
- package/dist/components/layout/page/page.d.ts +0 -1
- package/dist/components/layout/page/page.types.d.ts +62 -6
- package/dist/components/layout/page/partials/page-header-commands.d.ts +13 -0
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar.types.d.ts +4 -0
- package/dist/components/layout/workspace/workspace.types.d.ts +3 -0
- package/dist/components/primitives/date.d.ts +16 -3
- package/dist/components/primitives/dimensions.d.ts +6 -0
- package/dist/components/primitives/duration.d.ts +6 -0
- package/dist/components/primitives/file-size.d.ts +6 -0
- package/dist/components/primitives/index.d.ts +1 -1
- package/dist/components/primitives/initials.d.ts +11 -2
- package/dist/components/primitives/link.d.ts +7 -0
- package/dist/components/primitives/money.d.ts +29 -7
- package/dist/components/primitives/number.d.ts +17 -0
- package/dist/components/primitives/value-typography.d.ts +54 -0
- package/dist/components/primitives/value.d.ts +31 -6
- package/dist/components/typography/heading.d.ts +13 -2
- package/dist/components/typography/index.d.ts +1 -1
- package/dist/components/typography/label.d.ts +3 -0
- package/dist/components/typography/running-text.d.ts +12 -0
- package/dist/components/typography/text-link.d.ts +23 -1
- package/dist/components/typography/text.d.ts +12 -0
- package/dist/components/typography/text.styles.d.ts +37 -5
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/overlay.recipes.d.ts +15 -2
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/select.d.ts +3 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/table.d.ts +2 -1
- package/dist/container.recipes-D9t8MHR3.js +27 -0
- package/dist/container.recipes-D9t8MHR3.js.map +1 -0
- package/dist/{containers-6s-ucRQQ.js → containers-D_L4mTVb.js} +34 -57
- package/dist/containers-D_L4mTVb.js.map +1 -0
- package/dist/control-group-recipes-DBXmfh2E.js +21 -0
- package/dist/control-group-recipes-DBXmfh2E.js.map +1 -0
- package/dist/{copyable-B7SBXJMr.js → copyable-DDjTeW_j.js} +6 -6
- package/dist/{copyable-B7SBXJMr.js.map → copyable-DDjTeW_j.js.map} +1 -1
- package/dist/data-display-3xWQUnMA.js +1335 -0
- package/dist/data-display-3xWQUnMA.js.map +1 -0
- package/dist/date-picker-DrDFj8Lo.js +1527 -0
- package/dist/date-picker-DrDFj8Lo.js.map +1 -0
- package/dist/date-pickers-CnFCb0n2.js +174 -0
- package/dist/date-pickers-CnFCb0n2.js.map +1 -0
- package/dist/date-uf3z37Nm.js +144 -0
- package/dist/date-uf3z37Nm.js.map +1 -0
- package/dist/{display-CFM5myut.js → display-DrdvPwF0.js} +25 -25
- package/dist/display-DrdvPwF0.js.map +1 -0
- package/dist/{dropdown-menu-BlnyHr-9.js → dropdown-menu-CURh59jb.js} +22 -15
- package/dist/dropdown-menu-CURh59jb.js.map +1 -0
- package/dist/features/activities.js +177 -163
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +187 -183
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/async-preview.js +9 -9
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +25 -23
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer/engine.js +1 -1
- package/dist/features/email-composer.js +353 -355
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +346 -354
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +225 -227
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +29 -29
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +59 -58
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +898 -900
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +1412 -1444
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +51 -49
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +103 -97
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +13 -13
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +187 -183
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +7 -7
- package/dist/features/sync.js.map +1 -1
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +508 -503
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-DWUkgEjR.js → feedback-C7nR0UtT.js} +30 -31
- package/dist/feedback-C7nR0UtT.js.map +1 -0
- package/dist/field-affordance-recipes-CkOCdE2y.js +46 -0
- package/dist/field-affordance-recipes-CkOCdE2y.js.map +1 -0
- package/dist/{field-state-recipes-CBTRt9Bt.js → field-state-recipes-C-MFBX_8.js} +5 -5
- package/dist/field-state-recipes-C-MFBX_8.js.map +1 -0
- package/dist/{filters-BhsUtsxW.js → filters-Da-gNPsE.js} +760 -765
- package/dist/filters-Da-gNPsE.js.map +1 -0
- package/dist/{form-field-Bn7ZH1rA.js → form-field-VZRULhUK.js} +20 -12
- package/dist/form-field-VZRULhUK.js.map +1 -0
- package/dist/form-sizing-uWP4lzVh.js +126 -0
- package/dist/form-sizing-uWP4lzVh.js.map +1 -0
- package/dist/{forms-B7pzS25o.js → forms-DDeEnXSY.js} +38 -38
- package/dist/forms-DDeEnXSY.js.map +1 -0
- package/dist/forms-numeric-D3CO60IF.js +905 -0
- package/dist/forms-numeric-D3CO60IF.js.map +1 -0
- package/dist/{header-C59QZyxV.js → header-2ycNqGOR.js} +42 -37
- package/dist/header-2ycNqGOR.js.map +1 -0
- package/dist/{hooks-CM1Vp9Pe.js → hooks-DQ5SPwZw.js} +2 -2
- package/dist/{hooks-CM1Vp9Pe.js.map → hooks-DQ5SPwZw.js.map} +1 -1
- package/dist/{http-CLTVJc5I.js → http-CdEIHyQf.js} +2 -2
- package/dist/http-CdEIHyQf.js.map +1 -0
- package/dist/{icon-badge-Dv0RYQwj.js → icon-badge-DKlaKXoo.js} +4 -4
- package/dist/{icon-badge-Dv0RYQwj.js.map → icon-badge-DKlaKXoo.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/input-BoLm9Hks.js +20 -0
- package/dist/input-BoLm9Hks.js.map +1 -0
- package/dist/input-DhQdBnV3.js +255 -0
- package/dist/input-DhQdBnV3.js.map +1 -0
- package/dist/item-xzh8Df65.js +264 -0
- package/dist/item-xzh8Df65.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +1 -1
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +2 -2
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +10 -10
- package/dist/lib/affordance-geometry.generated.d.ts +46 -10
- package/dist/lib/control-group-recipes.d.ts +22 -0
- package/dist/lib/field-affordance-recipes.d.ts +70 -2
- package/dist/lib/field-state-recipes.d.ts +6 -4
- package/dist/lib/format.d.ts +9 -0
- package/dist/lib/money-format.d.ts +30 -0
- package/dist/lib/navigation-row-recipes.d.ts +3 -2
- package/dist/lib/overlay-anatomy-recipes.d.ts +2 -2
- package/dist/lib/surface-recipes.d.ts +13 -8
- package/dist/lib/token-merge.generated.d.ts +144 -2
- package/dist/lib/track-recipes.d.ts +1 -1
- package/dist/lib/ui-provider/provider.d.ts +7 -2
- package/dist/lib/ui-provider/store.d.ts +6 -2
- package/dist/lib/ui-provider/types.d.ts +9 -4
- package/dist/lib/use-prefers-reduced-motion.d.ts +2 -0
- package/dist/lib/utils.js +1 -1
- package/dist/media-gallery-DQUQ0m3O.js +201 -0
- package/dist/media-gallery-DQUQ0m3O.js.map +1 -0
- package/dist/{mentions-B8Ko-fhS.js → mentions-DwnO1hh4.js} +40 -39
- package/dist/{mentions-B8Ko-fhS.js.map → mentions-DwnO1hh4.js.map} +1 -1
- package/dist/message-YfFmbXNP.js +127 -0
- package/dist/message-YfFmbXNP.js.map +1 -0
- package/dist/{navigation-BUIn2Qxx.js → navigation-Cbp5V8gG.js} +27 -28
- package/dist/navigation-Cbp5V8gG.js.map +1 -0
- package/dist/navigation-Cs1npsPm.js +300 -0
- package/dist/navigation-Cs1npsPm.js.map +1 -0
- package/dist/{navigation-row-recipes-GVh11KiT.js → navigation-row-recipes-DlU-4QYO.js} +3 -3
- package/dist/navigation-row-recipes-DlU-4QYO.js.map +1 -0
- package/dist/number-CKRBYmZK.js +352 -0
- package/dist/number-CKRBYmZK.js.map +1 -0
- package/dist/overlay.recipes-CNO2S9V6.js +34 -0
- package/dist/overlay.recipes-CNO2S9V6.js.map +1 -0
- package/dist/overlays-DhZO7N-I.js +994 -0
- package/dist/overlays-DhZO7N-I.js.map +1 -0
- package/dist/page-C6R_8jFt.js +325 -0
- package/dist/page-C6R_8jFt.js.map +1 -0
- package/dist/{page-header-DQRa0jug.js → page-header-hUTzcRZX.js} +12 -12
- package/dist/page-header-hUTzcRZX.js.map +1 -0
- package/dist/{pagination-C29vvt3I.js → pagination-Cm0jqa3I.js} +21 -21
- package/dist/pagination-Cm0jqa3I.js.map +1 -0
- package/dist/{popover-CoLDEg19.js → popover-Dcv_9jxr.js} +23 -22
- package/dist/popover-Dcv_9jxr.js.map +1 -0
- package/dist/{popover-menu-GLIQTJTx.js → popover-menu-DnRFKnHP.js} +6 -6
- package/dist/{popover-menu-GLIQTJTx.js.map → popover-menu-DnRFKnHP.js.map} +1 -1
- package/dist/{popover.recipes-zgBhMlUu.js → popover.recipes-wmbvL8Ah.js} +5 -5
- package/dist/popover.recipes-wmbvL8Ah.js.map +1 -0
- package/dist/primitives-BHrwQXFC.js +379 -0
- package/dist/primitives-BHrwQXFC.js.map +1 -0
- package/dist/primitives.js +5 -5
- package/dist/{progress-BOe8l_FZ.js → progress-Br9WTFya.js} +12 -11
- package/dist/progress-Br9WTFya.js.map +1 -0
- package/dist/{receipt-BM8xsGFy.js → receipt-CV89q1fs.js} +8 -8
- package/dist/{receipt-BM8xsGFy.js.map → receipt-CV89q1fs.js.map} +1 -1
- package/dist/rich-text-editor-CF8QYt5p.js +574 -0
- package/dist/rich-text-editor-CF8QYt5p.js.map +1 -0
- package/dist/{rich-text-editor.recipes-DxvOE0Lp.js → rich-text-editor.recipes-CnrbmTS1.js} +35 -26
- package/dist/rich-text-editor.recipes-CnrbmTS1.js.map +1 -0
- package/dist/{rich-text-B7sBAdDG.js → rich-text-j-FGAeZW.js} +4 -4
- package/dist/{rich-text-B7sBAdDG.js.map → rich-text-j-FGAeZW.js.map} +1 -1
- package/dist/{scroll-area-BheMQ270.js → scroll-area-DRdr16Pt.js} +3 -3
- package/dist/scroll-area-DRdr16Pt.js.map +1 -0
- package/dist/{separator-DO0EbCEm.js → separator-BMEvwnSX.js} +2 -2
- package/dist/{separator-DO0EbCEm.js.map → separator-BMEvwnSX.js.map} +1 -1
- package/dist/{separator-Gk_WXH-l.js → separator-Do5GWDYi.js} +4 -4
- package/dist/separator-Do5GWDYi.js.map +1 -0
- package/dist/services/actions/action-adapters.d.ts +4 -0
- package/dist/services/actions.js +8 -3
- package/dist/services/actions.js.map +1 -1
- package/dist/{settings-BnCyyPOJ.js → settings-DHk0L2MF.js} +20 -19
- package/dist/settings-DHk0L2MF.js.map +1 -0
- package/dist/sheet-DRFNY1_D.js +207 -0
- package/dist/sheet-DRFNY1_D.js.map +1 -0
- package/dist/sidebar-Cb8WzOvE.js +511 -0
- package/dist/sidebar-Cb8WzOvE.js.map +1 -0
- package/dist/{sidebar-DPR7fmqN.js → sidebar-Crc9M9JV.js} +220 -201
- package/dist/sidebar-Crc9M9JV.js.map +1 -0
- package/dist/{skeleton-CmT1ppqb.js → skeleton-DVMXr15h.js} +5 -5
- package/dist/{skeleton-CmT1ppqb.js.map → skeleton-DVMXr15h.js.map} +1 -1
- package/dist/smart-card-Bek-TwUp.js +599 -0
- package/dist/smart-card-Bek-TwUp.js.map +1 -0
- package/dist/{spinner-BY9HbUEh.js → spinner-CmTAbEp0.js} +8 -6
- package/dist/spinner-CmTAbEp0.js.map +1 -0
- package/dist/{structure-MvKVq-oL.js → structure-hzCW-XsV.js} +3 -3
- package/dist/{structure-MvKVq-oL.js.map → structure-hzCW-XsV.js.map} +1 -1
- package/dist/{structure.recipes-Bqhf9oIh.js → structure.recipes-EPz60cU8.js} +37 -19
- package/dist/structure.recipes-EPz60cU8.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/surface-recipes-DOdoBXGm.js +28 -0
- package/dist/surface-recipes-DOdoBXGm.js.map +1 -0
- package/dist/table-D6zKeYQX.js +162 -0
- package/dist/table-D6zKeYQX.js.map +1 -0
- package/dist/table-Dn4XSrSB.js +1444 -0
- package/dist/table-Dn4XSrSB.js.map +1 -0
- package/dist/tabs-Dk8E_knt.js +189 -0
- package/dist/tabs-Dk8E_knt.js.map +1 -0
- package/dist/text-inputs-BFpku0Qd.js +331 -0
- package/dist/text-inputs-BFpku0Qd.js.map +1 -0
- package/dist/{text.styles-BwB7vAF2.js → text.styles-g4He6UIW.js} +26 -15
- package/dist/text.styles-g4He6UIW.js.map +1 -0
- package/dist/theme.css +90 -124
- package/dist/themes/green.css +24 -0
- package/dist/{timelines-B9ICkQcV.js → timelines-CxuAFIc2.js} +97 -104
- package/dist/timelines-CxuAFIc2.js.map +1 -0
- package/dist/track-recipes-CDcKmndW.js +10 -0
- package/dist/track-recipes-CDcKmndW.js.map +1 -0
- package/dist/{tree-BdWSaoFT.js → tree-BotPlyiD.js} +13 -13
- package/dist/{tree-BdWSaoFT.js.map → tree-BotPlyiD.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-CAr3dQhX.js +116 -0
- package/dist/typography-CAr3dQhX.js.map +1 -0
- package/dist/typography.js +2 -2
- package/dist/{ui-provider-CftIB6TY.js → ui-provider-D2_TeLqw.js} +22 -22
- package/dist/ui-provider-D2_TeLqw.js.map +1 -0
- package/dist/ui-provider.js +1 -1
- package/dist/{upload-D8Za5x_c.js → upload-B0WHW7ak.js} +278 -274
- package/dist/upload-B0WHW7ak.js.map +1 -0
- package/dist/{upload-queue-hIIYBLS7.js → upload-queue-BHZ_wBfd.js} +72 -75
- package/dist/upload-queue-BHZ_wBfd.js.map +1 -0
- package/dist/{usage-card-DnmnJ58D.js → usage-card-U0YBLTNT.js} +31 -33
- package/dist/usage-card-U0YBLTNT.js.map +1 -0
- package/dist/utils-Cospvlj1.js +4445 -0
- package/dist/utils-Cospvlj1.js.map +1 -0
- package/dist/value-inputs-CjfzGMsN.js +854 -0
- package/dist/value-inputs-CjfzGMsN.js.map +1 -0
- package/dist/value-typography-Deb3yQZg.js +116 -0
- package/dist/value-typography-Deb3yQZg.js.map +1 -0
- package/dist/{workspace-C1PZmk8L.js → workspace-YoFjXi6i.js} +97 -105
- package/dist/workspace-YoFjXi6i.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +123 -119
- package/docs/consumer-skill/examples/analytics.tsx +34 -0
- package/docs/consumer-skill/examples/app-layout.tsx +42 -14
- package/docs/consumer-skill/examples/detail.tsx +20 -5
- package/docs/consumer-skill/examples/edit.tsx +1 -1
- package/docs/consumer-skill/examples/layout-blocks.tsx +20 -0
- package/docs/consumer-skill/examples/manifest.json +37 -3
- package/docs/consumer-skill/examples/scoped-directory.tsx +2 -2
- package/docs/consumer-skill/examples/website.tsx +56 -0
- package/docs/consumer-skill/references/analytics.md +70 -0
- package/docs/consumer-skill/references/composition.md +195 -9
- package/docs/consumer-skill/references/design-contract.md +33 -7
- package/docs/consumer-skill/references/discovery.md +80 -5
- package/docs/consumer-skill/references/installation.md +22 -0
- package/docs/consumer-skill/references/integration.md +46 -1
- package/docs/consumer-skill/references/public-api.json +2083 -237
- package/docs/consumer-skill/references/review.md +74 -6
- package/docs/consumer-skill/references/theming.md +59 -8
- package/docs/consumer-skill/references/tokens.json +180 -9
- package/docs/consumer-skill/references/workflows.md +34 -0
- package/docs/consumer-skill/scripts/check-composition.mjs +1 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +271 -18
- package/docs/consumer-skill/scripts/discovery.mjs +69 -9
- package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
- package/docs/consumer-skill/scripts/surface-policy.mjs +44 -0
- package/package.json +11 -6
- package/dist/accordion-B-5Focs8.js.map +0 -1
- package/dist/action-menu-Cx3SdfbN.js +0 -265
- package/dist/action-menu-Cx3SdfbN.js.map +0 -1
- package/dist/affordance-geometry.generated-D8Jcfb0G.js +0 -32
- package/dist/affordance-geometry.generated-D8Jcfb0G.js.map +0 -1
- package/dist/ai-artifact-B5tPpXnS.js.map +0 -1
- package/dist/app-shell-at8Kt4l_.js.map +0 -1
- package/dist/attachment-BO2R47wn.js.map +0 -1
- package/dist/auth-OFwWSAap.js +0 -704
- package/dist/auth-OFwWSAap.js.map +0 -1
- package/dist/avatar-Bpzty83c.js.map +0 -1
- package/dist/badge-BZXZT9wd.js.map +0 -1
- package/dist/breadcrumbs-DdQ_I5ra.js.map +0 -1
- package/dist/button-BS6l5JUw.js.map +0 -1
- package/dist/buttons-Co6GavvM.js +0 -674
- package/dist/buttons-Co6GavvM.js.map +0 -1
- package/dist/chart-DVfcwQu6.js +0 -149
- package/dist/chart-DVfcwQu6.js.map +0 -1
- package/dist/checkbox-BavDRjF7.js +0 -34
- package/dist/checkbox-BavDRjF7.js.map +0 -1
- package/dist/choice-inputs-CC7XqPQO.js +0 -619
- package/dist/choice-inputs-CC7XqPQO.js.map +0 -1
- package/dist/code-block-xHKbAJDj.js.map +0 -1
- package/dist/combobox-DEbdr-3u.js +0 -273
- package/dist/combobox-DEbdr-3u.js.map +0 -1
- package/dist/combobox-xv3yJbzl.js +0 -850
- package/dist/combobox-xv3yJbzl.js.map +0 -1
- package/dist/command-C0xe7u9B.js.map +0 -1
- package/dist/comments-DviPLnwy.js.map +0 -1
- package/dist/containers-6s-ucRQQ.js.map +0 -1
- package/dist/data-display-cWIRdeaf.js +0 -1129
- package/dist/data-display-cWIRdeaf.js.map +0 -1
- package/dist/date-BFNMnrS5.js +0 -140
- package/dist/date-BFNMnrS5.js.map +0 -1
- package/dist/date-picker-CA6ogMQB.js +0 -1521
- package/dist/date-picker-CA6ogMQB.js.map +0 -1
- package/dist/date-pickers-BPIKLdsD.js +0 -224
- package/dist/date-pickers-BPIKLdsD.js.map +0 -1
- package/dist/display-CFM5myut.js.map +0 -1
- package/dist/dropdown-menu-BlnyHr-9.js.map +0 -1
- package/dist/feedback-DWUkgEjR.js.map +0 -1
- package/dist/field-affordance-recipes-IjzPrCTw.js +0 -17
- package/dist/field-affordance-recipes-IjzPrCTw.js.map +0 -1
- package/dist/field-state-recipes-CBTRt9Bt.js.map +0 -1
- package/dist/filters-BhsUtsxW.js.map +0 -1
- package/dist/form-field-Bn7ZH1rA.js.map +0 -1
- package/dist/form-sizing-BWs70_a2.js +0 -100
- package/dist/form-sizing-BWs70_a2.js.map +0 -1
- package/dist/format-iamDSqs2.js +0 -110
- package/dist/format-iamDSqs2.js.map +0 -1
- package/dist/forms-B7pzS25o.js.map +0 -1
- package/dist/forms-numeric-BUBxELBv.js +0 -867
- package/dist/forms-numeric-BUBxELBv.js.map +0 -1
- package/dist/header-C59QZyxV.js.map +0 -1
- package/dist/http-CLTVJc5I.js.map +0 -1
- package/dist/input-WwYQZJzG.js +0 -202
- package/dist/input-WwYQZJzG.js.map +0 -1
- package/dist/input-ci9fIgFH.js +0 -20
- package/dist/input-ci9fIgFH.js.map +0 -1
- package/dist/item-pJ0GsOiJ.js +0 -257
- package/dist/item-pJ0GsOiJ.js.map +0 -1
- package/dist/media-gallery-DhDRgnVZ.js +0 -200
- package/dist/media-gallery-DhDRgnVZ.js.map +0 -1
- package/dist/message-COsdEvXT.js +0 -108
- package/dist/message-COsdEvXT.js.map +0 -1
- package/dist/navigation-BUIn2Qxx.js.map +0 -1
- package/dist/navigation-DBEu4POU.js +0 -267
- package/dist/navigation-DBEu4POU.js.map +0 -1
- package/dist/navigation-row-recipes-GVh11KiT.js.map +0 -1
- package/dist/number-BNT_BIzJ.js +0 -269
- package/dist/number-BNT_BIzJ.js.map +0 -1
- package/dist/overlay.recipes-BxW5FIfK.js +0 -6
- package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
- package/dist/overlays-B11wZka6.js +0 -982
- package/dist/overlays-B11wZka6.js.map +0 -1
- package/dist/page-BV6ioQg3.js +0 -202
- package/dist/page-BV6ioQg3.js.map +0 -1
- package/dist/page-header-DQRa0jug.js.map +0 -1
- package/dist/pagination-C29vvt3I.js.map +0 -1
- package/dist/popover-CoLDEg19.js.map +0 -1
- package/dist/popover.recipes-zgBhMlUu.js.map +0 -1
- package/dist/primitives-DKPOGVpj.js +0 -330
- package/dist/primitives-DKPOGVpj.js.map +0 -1
- package/dist/progress-BOe8l_FZ.js.map +0 -1
- package/dist/rich-text-editor-CoVrTiSv.js +0 -575
- package/dist/rich-text-editor-CoVrTiSv.js.map +0 -1
- package/dist/rich-text-editor.recipes-DxvOE0Lp.js.map +0 -1
- package/dist/scroll-area-BheMQ270.js.map +0 -1
- package/dist/select-B2mb-qN2.js +0 -108
- package/dist/select-B2mb-qN2.js.map +0 -1
- package/dist/separator-Gk_WXH-l.js.map +0 -1
- package/dist/settings-BnCyyPOJ.js.map +0 -1
- package/dist/sheet-B-q914Ad.js +0 -205
- package/dist/sheet-B-q914Ad.js.map +0 -1
- package/dist/sidebar-C_2p3Tfj.js +0 -501
- package/dist/sidebar-C_2p3Tfj.js.map +0 -1
- package/dist/sidebar-DPR7fmqN.js.map +0 -1
- package/dist/smart-card-CYLn46e6.js +0 -578
- package/dist/smart-card-CYLn46e6.js.map +0 -1
- package/dist/spinner-BY9HbUEh.js.map +0 -1
- package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
- package/dist/surface-recipes-CQfRr-VL.js +0 -27
- package/dist/surface-recipes-CQfRr-VL.js.map +0 -1
- package/dist/table-BS39xnlq.js +0 -1424
- package/dist/table-BS39xnlq.js.map +0 -1
- package/dist/table-DnlAJ-xR.js +0 -146
- package/dist/table-DnlAJ-xR.js.map +0 -1
- package/dist/tabs-B5cNMWiP.js +0 -187
- package/dist/tabs-B5cNMWiP.js.map +0 -1
- package/dist/text-inputs-Dh9XGyiS.js +0 -331
- package/dist/text-inputs-Dh9XGyiS.js.map +0 -1
- package/dist/text.styles-BwB7vAF2.js.map +0 -1
- package/dist/timelines-B9ICkQcV.js.map +0 -1
- package/dist/track-recipes-LLPNVwFg.js +0 -10
- package/dist/track-recipes-LLPNVwFg.js.map +0 -1
- package/dist/typography-Cv8MT-82.js +0 -96
- package/dist/typography-Cv8MT-82.js.map +0 -1
- package/dist/ui-provider-CftIB6TY.js.map +0 -1
- package/dist/upload-D8Za5x_c.js.map +0 -1
- package/dist/upload-queue-hIIYBLS7.js.map +0 -1
- package/dist/usage-card-DnmnJ58D.js.map +0 -1
- package/dist/utils-C2EKeIw3.js +0 -72
- package/dist/utils-C2EKeIw3.js.map +0 -1
- package/dist/value-inputs-DX2dbxjj.js +0 -824
- package/dist/value-inputs-DX2dbxjj.js.map +0 -1
- package/dist/workspace-C1PZmk8L.js.map +0 -1
|
@@ -1,27 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { a
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { t as
|
|
16
|
-
import {
|
|
17
|
-
import { t as
|
|
18
|
-
import {
|
|
19
|
-
import { c as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
2
|
+
import { _ as e, s as t } from "../ui-provider-D2_TeLqw.js";
|
|
3
|
+
import { interpolateString as n, useStrings as r } from "../lib/strings.js";
|
|
4
|
+
import { t as i } from "../utils-Cospvlj1.js";
|
|
5
|
+
import { a, s as o } from "../typography-CAr3dQhX.js";
|
|
6
|
+
import { t as s } from "../button-BS3KDg00.js";
|
|
7
|
+
import { r as c, t as l } from "../structure-hzCW-XsV.js";
|
|
8
|
+
import { t as u } from "../smart-card-Bek-TwUp.js";
|
|
9
|
+
import { t as d } from "../progress-Br9WTFya.js";
|
|
10
|
+
import { i as f, t as p } from "../overlays-DhZO7N-I.js";
|
|
11
|
+
import { _ as m, g as h } from "../primitives-BHrwQXFC.js";
|
|
12
|
+
import { n as g } from "../number-CKRBYmZK.js";
|
|
13
|
+
import { t as _ } from "../badge-0tATj-tW.js";
|
|
14
|
+
import { t as v } from "../separator-Do5GWDYi.js";
|
|
15
|
+
import { t as y } from "../field-affordance-recipes-CkOCdE2y.js";
|
|
16
|
+
import { t as b } from "../input-DhQdBnV3.js";
|
|
17
|
+
import { t as x } from "../form-field-VZRULhUK.js";
|
|
18
|
+
import { d as S } from "../text-inputs-BFpku0Qd.js";
|
|
19
|
+
import { c as C, s as w } from "../choice-inputs-DrJ17tpL.js";
|
|
20
|
+
import { t as T } from "../checkbox-B7ygNTYp.js";
|
|
21
|
+
import { n as E } from "../display-DrdvPwF0.js";
|
|
22
|
+
import { r as D, t as O } from "../control-group-recipes-DBXmfh2E.js";
|
|
23
|
+
import { c as k, i as A, n as j, o as M, r as N, t as P, u as F } from "../item-xzh8Df65.js";
|
|
24
|
+
import { c as ee, i as I, n as te, o as ne, s as re, t as ie } from "../table-D6zKeYQX.js";
|
|
25
|
+
import { g as ae, l as oe, n as se } from "../data-display-3xWQUnMA.js";
|
|
26
|
+
import { O as L, f as ce } from "../table-Dn4XSrSB.js";
|
|
27
|
+
import { Fragment as le, useCallback as R, useId as z, useMemo as B, useState as ue } from "react";
|
|
28
|
+
import { Fragment as de, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
29
|
+
import { ArrowLeft as fe, ChevronDown as pe, Copy as me, Eye as he, GripVertical as ge, ListFilter as U, Pencil as W, Plus as G, PlusCircle as _e, Search as ve, SlidersHorizontal as K, Trash2 as q, X as ye } from "lucide-react";
|
|
25
30
|
//#region src/components/features/products/products.strings.ts
|
|
26
31
|
var J = {
|
|
27
32
|
title: "Readiness",
|
|
@@ -35,7 +40,7 @@ var J = {
|
|
|
35
40
|
emptyTitle: "No readiness checks",
|
|
36
41
|
emptyDescription: "Pass readiness items from your product workflow to show progress.",
|
|
37
42
|
actionLabel: "Open"
|
|
38
|
-
},
|
|
43
|
+
}, Y = {
|
|
39
44
|
title: "Structure",
|
|
40
45
|
description: "Media, taxonomy, options, and content coverage.",
|
|
41
46
|
createLabel: "Add metric",
|
|
@@ -45,7 +50,7 @@ var J = {
|
|
|
45
50
|
actionsLabel: "Metric actions",
|
|
46
51
|
emptyTitle: "No structure metrics",
|
|
47
52
|
emptyDescription: "Pass structure metrics to summarize the product setup."
|
|
48
|
-
},
|
|
53
|
+
}, be = {
|
|
49
54
|
title: "Operations",
|
|
50
55
|
description: "Availability, channels, service rules, and fulfilment signals.",
|
|
51
56
|
createLabel: "Add signal",
|
|
@@ -55,13 +60,13 @@ var J = {
|
|
|
55
60
|
emptyTitle: "No operational signals",
|
|
56
61
|
emptyDescription: "Pass operational rows to show channel and availability health.",
|
|
57
62
|
actionLabel: "Open"
|
|
58
|
-
},
|
|
63
|
+
}, xe = {
|
|
59
64
|
title: "Product details",
|
|
60
65
|
description: "Core identity and catalogue fields.",
|
|
61
66
|
editLabel: "Edit details",
|
|
62
67
|
emptyTitle: "No details",
|
|
63
68
|
emptyDescription: "Pass metadata rows to render product details."
|
|
64
|
-
},
|
|
69
|
+
}, Se = {
|
|
65
70
|
title: "Contract",
|
|
66
71
|
description: "Commercial terms, pricing rules, and customer-facing conditions.",
|
|
67
72
|
termsTitle: "Terms",
|
|
@@ -75,7 +80,7 @@ var J = {
|
|
|
75
80
|
ruleActionsLabel: "Rule actions",
|
|
76
81
|
emptyTitle: "No contract summary",
|
|
77
82
|
emptyDescription: "Pass metrics, terms, or rules to summarize the product contract."
|
|
78
|
-
},
|
|
83
|
+
}, Ce = {
|
|
79
84
|
title: "Options",
|
|
80
85
|
description: "Variant-driving choices and add-ons customers can select.",
|
|
81
86
|
manageLabel: "Manage options",
|
|
@@ -86,12 +91,12 @@ var J = {
|
|
|
86
91
|
actionsLabel: "Option actions",
|
|
87
92
|
emptyTitle: "No options",
|
|
88
93
|
emptyDescription: "Pass option groups to summarize configurable product choices."
|
|
89
|
-
},
|
|
94
|
+
}, we = {
|
|
90
95
|
viewLabel: "Open option",
|
|
91
96
|
editLabel: "Edit option",
|
|
92
97
|
deleteLabel: "Delete option",
|
|
93
98
|
actionsLabel: "Option actions"
|
|
94
|
-
},
|
|
99
|
+
}, Te = {
|
|
95
100
|
title: "Variant options",
|
|
96
101
|
description: "Define option groups and values before generating sellable variants.",
|
|
97
102
|
createLabel: "Add attribute",
|
|
@@ -121,7 +126,7 @@ var J = {
|
|
|
121
126
|
emptyTitle: "No option groups",
|
|
122
127
|
emptyDescription: "Add options such as size, color, or packaging to create variant combinations.",
|
|
123
128
|
noValuesLabel: "No values"
|
|
124
|
-
},
|
|
129
|
+
}, Ee = {
|
|
125
130
|
title: "Quote preview",
|
|
126
131
|
description: "How the product appears in a compact customer quote.",
|
|
127
132
|
subtotalLabel: "Subtotal",
|
|
@@ -136,7 +141,7 @@ var J = {
|
|
|
136
141
|
lineActionsLabel: "Line actions",
|
|
137
142
|
emptyTitle: "No quote lines",
|
|
138
143
|
emptyDescription: "Pass quote lines to preview pricing."
|
|
139
|
-
},
|
|
144
|
+
}, X = {
|
|
140
145
|
title: "Policies",
|
|
141
146
|
description: "Cancellation, booking, service, and customer-facing rules.",
|
|
142
147
|
createLabel: "Add policy",
|
|
@@ -146,7 +151,7 @@ var J = {
|
|
|
146
151
|
actionsLabel: "Policy actions",
|
|
147
152
|
emptyTitle: "No policies",
|
|
148
153
|
emptyDescription: "Pass policies to summarize customer-facing rules."
|
|
149
|
-
},
|
|
154
|
+
}, Z = {
|
|
150
155
|
title: "Variants",
|
|
151
156
|
description: "Sellable combinations with price, availability, and SKU.",
|
|
152
157
|
createLabel: "Add variant",
|
|
@@ -165,7 +170,7 @@ var J = {
|
|
|
165
170
|
updated: "Updated",
|
|
166
171
|
actions: "Actions"
|
|
167
172
|
}
|
|
168
|
-
},
|
|
173
|
+
}, De = {
|
|
169
174
|
title: "Variants",
|
|
170
175
|
description: "Review generated combinations, select rows, and apply bulk operations.",
|
|
171
176
|
createLabel: "Add variant",
|
|
@@ -193,7 +198,7 @@ var J = {
|
|
|
193
198
|
updated: "Updated",
|
|
194
199
|
actions: "Actions"
|
|
195
200
|
}
|
|
196
|
-
},
|
|
201
|
+
}, Oe = {
|
|
197
202
|
title: "Variants",
|
|
198
203
|
description: "Configure option groups first, then manage the generated sellable variants.",
|
|
199
204
|
optionsTitle: "Variant options",
|
|
@@ -204,13 +209,13 @@ var J = {
|
|
|
204
209
|
generateLabel: "Generate variants",
|
|
205
210
|
createVariantLabel: "Add variant",
|
|
206
211
|
actionsLabel: "Variant manager actions"
|
|
207
|
-
},
|
|
212
|
+
}, ke = {
|
|
208
213
|
viewLabel: "Open variant",
|
|
209
214
|
editLabel: "Edit",
|
|
210
215
|
duplicateLabel: "Duplicate",
|
|
211
216
|
deleteLabel: "Delete",
|
|
212
217
|
actionsLabel: "Variant actions"
|
|
213
|
-
},
|
|
218
|
+
}, Q = {
|
|
214
219
|
title: "Variant",
|
|
215
220
|
description: "Sellable variant details, options, pricing, and fulfilment data.",
|
|
216
221
|
backLabel: "Back",
|
|
@@ -227,7 +232,7 @@ var J = {
|
|
|
227
232
|
channels: "Channels",
|
|
228
233
|
updated: "Updated"
|
|
229
234
|
}
|
|
230
|
-
},
|
|
235
|
+
}, Ae = {
|
|
231
236
|
title: "Edit variant",
|
|
232
237
|
description: "Controlled form for variant identity, pricing, inventory, and option values.",
|
|
233
238
|
identityTitle: "Identity",
|
|
@@ -257,48 +262,55 @@ var J = {
|
|
|
257
262
|
status: "Active",
|
|
258
263
|
channels: "Online store, POS"
|
|
259
264
|
}
|
|
260
|
-
},
|
|
265
|
+
}, je = {
|
|
261
266
|
mainLabel: "Product overview",
|
|
262
267
|
railLabel: "Product supporting information"
|
|
263
268
|
};
|
|
264
269
|
//#endregion
|
|
265
270
|
//#region src/components/features/products/partials/product-empty-state.tsx
|
|
266
|
-
function $({ title: e, description: t, action:
|
|
267
|
-
return /* @__PURE__ */
|
|
271
|
+
function $({ title: e, description: t, action: n, className: r }) {
|
|
272
|
+
return /* @__PURE__ */ V(oe, {
|
|
268
273
|
padding: "md",
|
|
269
274
|
border: !0,
|
|
270
275
|
title: e,
|
|
271
276
|
description: t,
|
|
272
|
-
actions:
|
|
273
|
-
className:
|
|
277
|
+
actions: n,
|
|
278
|
+
className: i("product-empty-state--component bg-muted/20", r)
|
|
274
279
|
});
|
|
275
280
|
}
|
|
276
281
|
//#endregion
|
|
277
282
|
//#region src/components/features/products/partials/product-tone.tsx
|
|
278
|
-
var
|
|
283
|
+
var Me = {
|
|
279
284
|
neutral: "secondary",
|
|
280
|
-
primary: "
|
|
285
|
+
primary: "secondary",
|
|
281
286
|
success: "success",
|
|
282
287
|
warning: "warning",
|
|
283
288
|
destructive: "destructive",
|
|
284
289
|
info: "info"
|
|
285
|
-
},
|
|
286
|
-
neutral:
|
|
287
|
-
primary:
|
|
288
|
-
success: "
|
|
289
|
-
warning: "
|
|
290
|
-
destructive: "
|
|
291
|
-
info: "
|
|
292
|
-
}
|
|
293
|
-
|
|
290
|
+
}, Ne = {
|
|
291
|
+
neutral: void 0,
|
|
292
|
+
primary: void 0,
|
|
293
|
+
success: "text-success",
|
|
294
|
+
warning: "text-warning-accent",
|
|
295
|
+
destructive: "text-destructive",
|
|
296
|
+
info: "text-info"
|
|
297
|
+
}, Pe = /* @__PURE__ */ new Set([
|
|
298
|
+
"success",
|
|
299
|
+
"warning",
|
|
300
|
+
"destructive",
|
|
301
|
+
"info"
|
|
302
|
+
]);
|
|
303
|
+
function Fe(e) {
|
|
304
|
+
return e !== void 0 && Pe.has(e);
|
|
305
|
+
}
|
|
306
|
+
function Ie(e) {
|
|
294
307
|
return Number.isFinite(e) ? Math.min(100, Math.max(0, Math.round(e))) : 0;
|
|
295
308
|
}
|
|
296
|
-
function
|
|
297
|
-
return /* @__PURE__ */
|
|
309
|
+
function Le({ tone: e = "neutral" }) {
|
|
310
|
+
return /* @__PURE__ */ V("span", {
|
|
298
311
|
"aria-hidden": "true",
|
|
299
|
-
className:
|
|
300
|
-
"bg-muted-foreground": e === "neutral",
|
|
301
|
-
"bg-primary": e === "primary",
|
|
312
|
+
className: i("product-tone-dot--component size-2 shrink-0 rounded-full", {
|
|
313
|
+
"bg-muted-foreground": e === "neutral" || e === "primary",
|
|
302
314
|
"bg-success": e === "success",
|
|
303
315
|
"bg-warning": e === "warning",
|
|
304
316
|
"bg-destructive": e === "destructive",
|
|
@@ -308,301 +320,278 @@ function ze({ tone: e = "neutral" }) {
|
|
|
308
320
|
}
|
|
309
321
|
//#endregion
|
|
310
322
|
//#region src/components/features/products/partials/product-metric-tile.tsx
|
|
311
|
-
function
|
|
312
|
-
let t = e.
|
|
313
|
-
return /* @__PURE__ */
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
323
|
+
function Re({ metric: e }) {
|
|
324
|
+
let t = "icon" in e ? e.icon : void 0;
|
|
325
|
+
return /* @__PURE__ */ H(l, {
|
|
326
|
+
gap: "dense",
|
|
327
|
+
className: "product-metric-tile--component min-w-0",
|
|
328
|
+
children: [
|
|
329
|
+
/* @__PURE__ */ H(l, {
|
|
330
|
+
direction: "horizontal",
|
|
331
|
+
gap: "sm",
|
|
332
|
+
wrap: !1,
|
|
333
|
+
children: [
|
|
334
|
+
Fe(e.tone) && /* @__PURE__ */ V(Le, { tone: e.tone }),
|
|
335
|
+
!!t && /* @__PURE__ */ V("span", {
|
|
336
|
+
className: "flex shrink-0 text-muted-foreground",
|
|
337
|
+
children: t
|
|
338
|
+
}),
|
|
339
|
+
/* @__PURE__ */ V(a, {
|
|
340
|
+
className: "truncate",
|
|
341
|
+
children: e.label
|
|
342
|
+
})
|
|
343
|
+
]
|
|
344
|
+
}),
|
|
345
|
+
/* @__PURE__ */ V(m, {
|
|
346
|
+
weight: "semibold",
|
|
347
|
+
className: "tabular-nums",
|
|
348
|
+
children: e.value
|
|
349
|
+
}),
|
|
350
|
+
!!e.description && /* @__PURE__ */ V(o, {
|
|
351
|
+
size: "xs",
|
|
352
|
+
type: "secondary",
|
|
353
|
+
lineHeight: "snug",
|
|
354
|
+
children: e.description
|
|
355
|
+
})
|
|
356
|
+
]
|
|
343
357
|
});
|
|
344
358
|
}
|
|
345
359
|
//#endregion
|
|
346
360
|
//#region src/components/features/products/partials/product-actions.tsx
|
|
347
|
-
function
|
|
348
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
349
|
-
className:
|
|
350
|
-
children: /* @__PURE__ */ L
|
|
361
|
+
function ze({ item: e, actions: t, menuLabel: n, className: r }) {
|
|
362
|
+
return t.length === 0 ? null : /* @__PURE__ */ V("div", {
|
|
363
|
+
className: i("product-row-actions--component flex justify-end", r),
|
|
364
|
+
children: /* @__PURE__ */ V(L, {
|
|
351
365
|
row: e,
|
|
352
366
|
actions: t,
|
|
353
|
-
menuLabel:
|
|
367
|
+
menuLabel: n,
|
|
354
368
|
displayMode: "menu"
|
|
355
369
|
})
|
|
356
370
|
});
|
|
357
371
|
}
|
|
358
372
|
//#endregion
|
|
359
373
|
//#region src/components/features/products/partials/product-rows.tsx
|
|
360
|
-
var
|
|
361
|
-
function
|
|
362
|
-
let
|
|
363
|
-
|
|
374
|
+
var Be = "min-w-0 basis-48", Ve = "line-clamp-none break-words overflow-visible", He = "ml-auto shrink-0 flex-wrap justify-end gap-space-md";
|
|
375
|
+
function Ue({ label: e, value: t, tone: n, badge: r }) {
|
|
376
|
+
let i = /* @__PURE__ */ V(F, {
|
|
377
|
+
className: Ve,
|
|
378
|
+
children: e
|
|
379
|
+
});
|
|
380
|
+
return !t && !r ? i : /* @__PURE__ */ H(l, {
|
|
381
|
+
direction: "horizontal",
|
|
382
|
+
gap: "sm",
|
|
383
|
+
className: "product-row--heading",
|
|
384
|
+
children: [
|
|
385
|
+
i,
|
|
386
|
+
!!t && (Fe(n) ? /* @__PURE__ */ V(_, {
|
|
387
|
+
tone: Me[n],
|
|
388
|
+
children: t
|
|
389
|
+
}) : /* @__PURE__ */ V(o, {
|
|
390
|
+
tag: "span",
|
|
391
|
+
type: "secondary",
|
|
392
|
+
lineHeight: "tight",
|
|
393
|
+
children: t
|
|
394
|
+
})),
|
|
395
|
+
r
|
|
396
|
+
]
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
function We({ label: e, onSelect: t }) {
|
|
400
|
+
return /* @__PURE__ */ V(s, {
|
|
401
|
+
type: "button",
|
|
402
|
+
tone: "secondary",
|
|
403
|
+
buttonStyle: "ghost",
|
|
404
|
+
onClick: t,
|
|
405
|
+
children: e
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
function Ge({ metric: e, actions: t }) {
|
|
409
|
+
return /* @__PURE__ */ H(P, {
|
|
364
410
|
className: "product-structure-metric-row--component product-structure-card--item",
|
|
365
411
|
children: [
|
|
366
|
-
/* @__PURE__ */
|
|
412
|
+
!!e.icon && /* @__PURE__ */ V(k, {
|
|
367
413
|
variant: "icon",
|
|
368
|
-
className:
|
|
369
|
-
children: e.icon
|
|
414
|
+
className: "text-muted-foreground",
|
|
415
|
+
children: e.icon
|
|
370
416
|
}),
|
|
371
|
-
/* @__PURE__ */
|
|
372
|
-
className:
|
|
373
|
-
children: [/* @__PURE__ */
|
|
374
|
-
className:
|
|
417
|
+
/* @__PURE__ */ H(N, {
|
|
418
|
+
className: Be,
|
|
419
|
+
children: [/* @__PURE__ */ V(F, {
|
|
420
|
+
className: Ve,
|
|
375
421
|
children: e.label
|
|
376
|
-
}), !!e.description && /* @__PURE__ */
|
|
422
|
+
}), !!e.description && /* @__PURE__ */ V(A, {
|
|
377
423
|
clamp: 2,
|
|
378
424
|
children: e.description
|
|
379
425
|
})]
|
|
380
426
|
}),
|
|
381
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ H(j, {
|
|
382
428
|
className: "ml-auto shrink-0 gap-space-md",
|
|
383
|
-
children: [/* @__PURE__ */
|
|
429
|
+
children: [/* @__PURE__ */ V(m, {
|
|
384
430
|
weight: "semibold",
|
|
385
|
-
className: "tabular-nums",
|
|
431
|
+
className: i("tabular-nums", e.tone && Ne[e.tone]),
|
|
386
432
|
children: e.value
|
|
387
433
|
}), t]
|
|
388
434
|
})
|
|
389
435
|
]
|
|
390
436
|
});
|
|
391
437
|
}
|
|
392
|
-
function
|
|
393
|
-
let
|
|
394
|
-
return /* @__PURE__ */
|
|
438
|
+
function Ke({ item: e, actionFallback: t, onSelect: n, actions: r }) {
|
|
439
|
+
let i = e.tone ?? (e.completed ? "success" : "neutral"), a = e.onSelect ?? n;
|
|
440
|
+
return /* @__PURE__ */ H(P, {
|
|
395
441
|
className: "product-readiness-row--component product-readiness-card--item",
|
|
396
442
|
children: [
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
children: /* @__PURE__ */ L(ze, { tone: o })
|
|
443
|
+
/* @__PURE__ */ V(k, {
|
|
444
|
+
className: "product-readiness-row--state h-icon-lg",
|
|
445
|
+
children: /* @__PURE__ */ V(Le, { tone: i })
|
|
401
446
|
}),
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
className:
|
|
404
|
-
children: [/* @__PURE__ */
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
447
|
+
/* @__PURE__ */ H(N, {
|
|
448
|
+
className: Be,
|
|
449
|
+
children: [/* @__PURE__ */ V(Ue, {
|
|
450
|
+
label: e.label,
|
|
451
|
+
value: e.value,
|
|
452
|
+
tone: e.tone
|
|
453
|
+
}), !!e.description && /* @__PURE__ */ V(A, {
|
|
408
454
|
clamp: 2,
|
|
409
455
|
children: e.description
|
|
410
456
|
})]
|
|
411
457
|
}),
|
|
412
|
-
!!(
|
|
413
|
-
className:
|
|
414
|
-
children: [
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
}),
|
|
419
|
-
!!s && /* @__PURE__ */ L(r, {
|
|
420
|
-
type: "button",
|
|
421
|
-
tone: "secondary",
|
|
422
|
-
buttonStyle: "ghost",
|
|
423
|
-
onClick: s,
|
|
424
|
-
icon: ue,
|
|
425
|
-
iconPosition: "right",
|
|
426
|
-
children: e.actionLabel ?? t
|
|
427
|
-
}),
|
|
428
|
-
a
|
|
429
|
-
]
|
|
458
|
+
!!(a || r) && /* @__PURE__ */ H(j, {
|
|
459
|
+
className: He,
|
|
460
|
+
children: [!!a && /* @__PURE__ */ V(We, {
|
|
461
|
+
label: e.actionLabel ?? t,
|
|
462
|
+
onSelect: a
|
|
463
|
+
}), r]
|
|
430
464
|
})
|
|
431
465
|
]
|
|
432
466
|
});
|
|
433
467
|
}
|
|
434
|
-
function
|
|
435
|
-
let
|
|
436
|
-
return /* @__PURE__ */
|
|
468
|
+
function qe({ item: e, actionFallback: t, onSelect: n, actions: r }) {
|
|
469
|
+
let i = e.onSelect ?? n;
|
|
470
|
+
return /* @__PURE__ */ H(P, {
|
|
437
471
|
className: "product-operation-row--component product-operations-card--item",
|
|
438
|
-
children: [
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
|
|
446
|
-
children:
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
}),
|
|
454
|
-
|
|
455
|
-
className: "ml-auto shrink-0 flex-wrap justify-end gap-space-md",
|
|
456
|
-
children: [
|
|
457
|
-
!!e.value && /* @__PURE__ */ L(i, {
|
|
458
|
-
tag: "span",
|
|
459
|
-
weight: "semibold",
|
|
460
|
-
children: e.value
|
|
461
|
-
}),
|
|
462
|
-
!!c && /* @__PURE__ */ L(r, {
|
|
463
|
-
type: "button",
|
|
464
|
-
tone: "secondary",
|
|
465
|
-
buttonStyle: "ghost",
|
|
466
|
-
onClick: c,
|
|
467
|
-
icon: ue,
|
|
468
|
-
iconPosition: "right",
|
|
469
|
-
children: e.actionLabel ?? t
|
|
470
|
-
}),
|
|
471
|
-
o
|
|
472
|
-
]
|
|
473
|
-
})
|
|
474
|
-
]
|
|
472
|
+
children: [/* @__PURE__ */ H(N, {
|
|
473
|
+
className: Be,
|
|
474
|
+
children: [/* @__PURE__ */ V(Ue, {
|
|
475
|
+
label: e.label,
|
|
476
|
+
value: e.value,
|
|
477
|
+
tone: e.tone
|
|
478
|
+
}), !!e.description && /* @__PURE__ */ V(A, {
|
|
479
|
+
clamp: 2,
|
|
480
|
+
children: e.description
|
|
481
|
+
})]
|
|
482
|
+
}), !!(i || r) && /* @__PURE__ */ H(j, {
|
|
483
|
+
className: He,
|
|
484
|
+
children: [!!i && /* @__PURE__ */ V(We, {
|
|
485
|
+
label: e.actionLabel ?? t,
|
|
486
|
+
onSelect: i
|
|
487
|
+
}), r]
|
|
488
|
+
})]
|
|
475
489
|
});
|
|
476
490
|
}
|
|
477
|
-
function
|
|
478
|
-
let
|
|
479
|
-
return /* @__PURE__ */
|
|
491
|
+
function Je({ item: e, actionLabel: t, onSelect: n, actions: r }) {
|
|
492
|
+
let i = "values" in e ? e.values : void 0;
|
|
493
|
+
return /* @__PURE__ */ H(P, {
|
|
480
494
|
className: "product-summary-row--component",
|
|
481
|
-
children: [
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
}),
|
|
498
|
-
!!c?.length && /* @__PURE__ */ L("div", {
|
|
499
|
-
className: "mt-space-md flex flex-wrap gap-space-xs",
|
|
500
|
-
children: c.map((e, t) => /* @__PURE__ */ L(m, {
|
|
501
|
-
tone: "secondary",
|
|
502
|
-
children: e
|
|
503
|
-
}, t))
|
|
504
|
-
})
|
|
505
|
-
]
|
|
506
|
-
}),
|
|
507
|
-
!!(e.value || e.badge || a || o) && /* @__PURE__ */ R(C, {
|
|
508
|
-
className: "ml-auto shrink-0 flex-wrap justify-end gap-space-md",
|
|
509
|
-
children: [
|
|
510
|
-
!!e.value && /* @__PURE__ */ L(i, {
|
|
511
|
-
tag: "span",
|
|
512
|
-
weight: "semibold",
|
|
513
|
-
children: e.value
|
|
514
|
-
}),
|
|
515
|
-
!!e.badge && e.badge,
|
|
516
|
-
!!a && /* @__PURE__ */ L(r, {
|
|
517
|
-
type: "button",
|
|
495
|
+
children: [/* @__PURE__ */ H(N, {
|
|
496
|
+
className: Be,
|
|
497
|
+
children: [
|
|
498
|
+
/* @__PURE__ */ V(Ue, {
|
|
499
|
+
label: e.label,
|
|
500
|
+
value: e.value,
|
|
501
|
+
tone: e.tone,
|
|
502
|
+
badge: e.badge
|
|
503
|
+
}),
|
|
504
|
+
!!e.description && /* @__PURE__ */ V(A, {
|
|
505
|
+
clamp: 2,
|
|
506
|
+
children: e.description
|
|
507
|
+
}),
|
|
508
|
+
!!i?.length && /* @__PURE__ */ V("div", {
|
|
509
|
+
className: "mt-space-md flex flex-wrap gap-space-xs",
|
|
510
|
+
children: i.map((e, t) => /* @__PURE__ */ V(_, {
|
|
518
511
|
tone: "secondary",
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
512
|
+
children: e
|
|
513
|
+
}, t))
|
|
514
|
+
})
|
|
515
|
+
]
|
|
516
|
+
}), !!(n || r) && /* @__PURE__ */ H(j, {
|
|
517
|
+
className: He,
|
|
518
|
+
children: [!!n && /* @__PURE__ */ V(We, {
|
|
519
|
+
label: t,
|
|
520
|
+
onSelect: n
|
|
521
|
+
}), r]
|
|
522
|
+
})]
|
|
529
523
|
});
|
|
530
524
|
}
|
|
531
525
|
//#endregion
|
|
532
526
|
//#region src/components/features/products/components/product-contract-overview.tsx
|
|
533
|
-
function
|
|
534
|
-
let x =
|
|
527
|
+
function Ye({ metrics: e = [], terms: t = [], rules: n = [], onOpenContract: a, onEditContract: u, onCreateRule: d, onSelectRule: f, onEditRule: p, onDeleteRule: m, renderRuleActions: h, actions: g, footerSlot: _, empty: v, className: y, strings: b }) {
|
|
528
|
+
let x = r(Se, b), S = e.length > 0 || t.length > 0 || n.length > 0, C = a || u || d ? /* @__PURE__ */ H("div", {
|
|
535
529
|
className: "flex items-center gap-space-md",
|
|
536
530
|
children: [
|
|
537
|
-
!!d && /* @__PURE__ */
|
|
531
|
+
!!d && /* @__PURE__ */ V(s, {
|
|
538
532
|
type: "button",
|
|
539
533
|
tone: "secondary",
|
|
540
534
|
buttonStyle: "ghost",
|
|
541
535
|
onClick: d,
|
|
542
|
-
icon:
|
|
536
|
+
icon: G,
|
|
543
537
|
children: x.createRuleLabel
|
|
544
538
|
}),
|
|
545
|
-
!!u && /* @__PURE__ */
|
|
539
|
+
!!u && /* @__PURE__ */ V(s, {
|
|
546
540
|
type: "button",
|
|
547
541
|
tone: "secondary",
|
|
548
542
|
buttonStyle: "ghost",
|
|
549
543
|
onClick: u,
|
|
550
|
-
icon: V,
|
|
551
544
|
children: x.editLabel
|
|
552
545
|
}),
|
|
553
|
-
!!
|
|
546
|
+
!!a && /* @__PURE__ */ V(s, {
|
|
554
547
|
type: "button",
|
|
555
548
|
tone: "secondary",
|
|
556
549
|
buttonStyle: "ghost",
|
|
557
|
-
onClick:
|
|
558
|
-
icon: ue,
|
|
559
|
-
iconPosition: "right",
|
|
550
|
+
onClick: a,
|
|
560
551
|
children: x.actionLabel
|
|
561
552
|
})
|
|
562
553
|
]
|
|
563
554
|
}) : void 0;
|
|
564
|
-
return /* @__PURE__ */
|
|
565
|
-
icon: /* @__PURE__ */ L(B, { className: "size-icon" }),
|
|
555
|
+
return /* @__PURE__ */ V(E, {
|
|
566
556
|
title: x.title,
|
|
567
557
|
description: x.description,
|
|
568
558
|
actions: g,
|
|
569
559
|
headerAction: C,
|
|
570
|
-
footerSlot:
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
gap: "xl",
|
|
560
|
+
footerSlot: _,
|
|
561
|
+
className: i("product-contract-overview--component w-full", y),
|
|
562
|
+
children: S ? /* @__PURE__ */ H(l, {
|
|
563
|
+
gap: "2xl",
|
|
575
564
|
children: [
|
|
576
|
-
e.length > 0 && /* @__PURE__ */
|
|
565
|
+
e.length > 0 && /* @__PURE__ */ V(c, {
|
|
577
566
|
columns: {
|
|
578
567
|
base: 1,
|
|
579
568
|
sm: 3
|
|
580
569
|
},
|
|
581
570
|
gap: "md",
|
|
582
|
-
children: e.map((e) => /* @__PURE__ */
|
|
571
|
+
children: e.map((e) => /* @__PURE__ */ V(Re, { metric: e }, e.id))
|
|
583
572
|
}),
|
|
584
|
-
|
|
573
|
+
t.length > 0 && /* @__PURE__ */ H(l, {
|
|
585
574
|
gap: "md",
|
|
586
|
-
children: [/* @__PURE__ */
|
|
575
|
+
children: [/* @__PURE__ */ V(o, {
|
|
587
576
|
weight: "semibold",
|
|
588
577
|
children: x.termsTitle
|
|
589
|
-
}), /* @__PURE__ */
|
|
590
|
-
items:
|
|
578
|
+
}), /* @__PURE__ */ V(se, {
|
|
579
|
+
items: t,
|
|
591
580
|
columns: 2,
|
|
592
581
|
density: "compact"
|
|
593
582
|
})]
|
|
594
583
|
}),
|
|
595
|
-
|
|
584
|
+
n.length > 0 && /* @__PURE__ */ H(l, {
|
|
596
585
|
gap: "md",
|
|
597
|
-
children: [/* @__PURE__ */
|
|
586
|
+
children: [/* @__PURE__ */ V(o, {
|
|
598
587
|
weight: "semibold",
|
|
599
588
|
children: x.rulesTitle
|
|
600
|
-
}), /* @__PURE__ */
|
|
589
|
+
}), /* @__PURE__ */ V(M, { children: n.map((e, t) => {
|
|
601
590
|
let n = f ? () => f(e) : void 0, r = p ? () => p(e) : void 0, i = m ? () => m(e) : void 0, a = [
|
|
602
591
|
...n ? [{
|
|
603
592
|
id: "open",
|
|
604
593
|
label: x.viewRuleLabel,
|
|
605
|
-
icon: /* @__PURE__ */
|
|
594
|
+
icon: /* @__PURE__ */ V(he, { className: "size-icon-md" }),
|
|
606
595
|
onClick: () => n(),
|
|
607
596
|
tone: "secondary",
|
|
608
597
|
buttonStyle: "ghost"
|
|
@@ -610,7 +599,7 @@ function Je({ metrics: e = [], terms: a = [], rules: c = [], onOpenContract: l,
|
|
|
610
599
|
...r ? [{
|
|
611
600
|
id: "edit",
|
|
612
601
|
label: x.editRuleLabel,
|
|
613
|
-
icon: /* @__PURE__ */
|
|
602
|
+
icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
|
|
614
603
|
onClick: () => r(),
|
|
615
604
|
tone: "secondary",
|
|
616
605
|
buttonStyle: "ghost"
|
|
@@ -618,7 +607,7 @@ function Je({ metrics: e = [], terms: a = [], rules: c = [], onOpenContract: l,
|
|
|
618
607
|
...i ? [{
|
|
619
608
|
id: "delete",
|
|
620
609
|
label: x.deleteRuleLabel,
|
|
621
|
-
icon: /* @__PURE__ */
|
|
610
|
+
icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
|
|
622
611
|
onClick: () => i(),
|
|
623
612
|
tone: "destructive"
|
|
624
613
|
}] : []
|
|
@@ -627,65 +616,63 @@ function Je({ metrics: e = [], terms: a = [], rules: c = [], onOpenContract: l,
|
|
|
627
616
|
onSelect: n,
|
|
628
617
|
onEdit: r,
|
|
629
618
|
onDelete: i
|
|
630
|
-
}) : /* @__PURE__ */
|
|
619
|
+
}) : /* @__PURE__ */ V(ze, {
|
|
631
620
|
item: e,
|
|
632
621
|
actions: a,
|
|
633
622
|
menuLabel: x.ruleActionsLabel
|
|
634
623
|
});
|
|
635
|
-
return /* @__PURE__ */
|
|
624
|
+
return /* @__PURE__ */ V(Je, {
|
|
636
625
|
item: e,
|
|
637
626
|
actions: o
|
|
638
627
|
}, e.id);
|
|
639
628
|
}) })]
|
|
640
629
|
})
|
|
641
630
|
]
|
|
642
|
-
}) :
|
|
631
|
+
}) : v ?? /* @__PURE__ */ V($, {
|
|
643
632
|
title: x.emptyTitle,
|
|
644
633
|
description: x.emptyDescription,
|
|
645
|
-
action: d ? /* @__PURE__ */
|
|
634
|
+
action: d ? /* @__PURE__ */ V(s, {
|
|
635
|
+
tone: "primary",
|
|
646
636
|
type: "button",
|
|
647
637
|
onClick: d,
|
|
648
|
-
icon:
|
|
638
|
+
icon: G,
|
|
649
639
|
children: x.createRuleLabel
|
|
650
640
|
}) : void 0
|
|
651
641
|
})
|
|
652
642
|
});
|
|
653
643
|
}
|
|
654
|
-
|
|
644
|
+
Ye.displayName = "ProductContractOverview";
|
|
655
645
|
//#endregion
|
|
656
646
|
//#region src/components/features/products/components/product-details-card.tsx
|
|
657
|
-
function
|
|
658
|
-
let m =
|
|
647
|
+
function Xe({ title: e, description: t, metadata: n = [], media: a, onEditDetails: o, actions: c, headerEnd: l, footerSlot: u, empty: d, className: f, strings: p }) {
|
|
648
|
+
let m = r(xe, p), h = o ? /* @__PURE__ */ V(s, {
|
|
659
649
|
type: "button",
|
|
660
650
|
tone: "secondary",
|
|
661
651
|
buttonStyle: "ghost",
|
|
662
|
-
onClick:
|
|
663
|
-
icon: V,
|
|
652
|
+
onClick: o,
|
|
664
653
|
children: m.editLabel
|
|
665
654
|
}) : void 0;
|
|
666
|
-
return /* @__PURE__ */
|
|
667
|
-
icon: /* @__PURE__ */ L(de, { className: "size-icon" }),
|
|
655
|
+
return /* @__PURE__ */ V(E, {
|
|
668
656
|
title: e ?? m.title,
|
|
669
|
-
description:
|
|
657
|
+
description: t === !1 ? void 0 : t ?? m.description,
|
|
670
658
|
actions: c,
|
|
671
659
|
headerAction: h,
|
|
672
660
|
headerEnd: l,
|
|
673
661
|
footerSlot: u,
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
children: a.length === 0 ? d ?? /* @__PURE__ */ L($, {
|
|
662
|
+
className: i("product-details-card--component w-full", f),
|
|
663
|
+
children: n.length === 0 ? d ?? /* @__PURE__ */ V($, {
|
|
677
664
|
title: m.emptyTitle,
|
|
678
665
|
description: m.emptyDescription
|
|
679
|
-
}) : /* @__PURE__ */
|
|
666
|
+
}) : /* @__PURE__ */ V("div", {
|
|
680
667
|
className: "@container/product-details",
|
|
681
|
-
children: /* @__PURE__ */
|
|
682
|
-
className:
|
|
683
|
-
children: [!!
|
|
684
|
-
className: "product-details-card--media overflow-hidden rounded-
|
|
685
|
-
children:
|
|
686
|
-
}), /* @__PURE__ */
|
|
687
|
-
items:
|
|
688
|
-
columns:
|
|
668
|
+
children: /* @__PURE__ */ H("div", {
|
|
669
|
+
className: i("grid min-w-0 grid-cols-1 gap-space-xl", a && "@xl/product-details:grid-cols-[12rem_minmax(0,1fr)]"),
|
|
670
|
+
children: [!!a && /* @__PURE__ */ V("div", {
|
|
671
|
+
className: "product-details-card--media self-start overflow-hidden rounded-inner border border-border bg-muted/30",
|
|
672
|
+
children: a
|
|
673
|
+
}), /* @__PURE__ */ V(se, {
|
|
674
|
+
items: n,
|
|
675
|
+
columns: a ? 1 : 2,
|
|
689
676
|
density: "compact",
|
|
690
677
|
className: "min-w-0 [&_.metadata-list--value]:break-words"
|
|
691
678
|
})]
|
|
@@ -693,28 +680,28 @@ function Ye({ title: e, description: i, metadata: a = [], media: o, onEditDetail
|
|
|
693
680
|
})
|
|
694
681
|
});
|
|
695
682
|
}
|
|
696
|
-
|
|
683
|
+
Xe.displayName = "ProductDetailsCard";
|
|
697
684
|
//#endregion
|
|
698
685
|
//#region src/components/features/products/components/product-option-action-menu.tsx
|
|
699
|
-
function
|
|
700
|
-
let d =
|
|
701
|
-
return f || p || m || s ? s ? /* @__PURE__ */
|
|
702
|
-
className:
|
|
686
|
+
function Ze({ option: e, index: t = 0, onSelectOption: n, onEditOption: a, onDeleteOption: o, renderOptionActions: s, menuLabel: c, className: l, strings: u }) {
|
|
687
|
+
let d = r(we, u), f = n ? () => n(e) : void 0, p = a ? () => a(e) : void 0, m = o ? () => o(e) : void 0;
|
|
688
|
+
return f || p || m || s ? s ? /* @__PURE__ */ V("div", {
|
|
689
|
+
className: i("product-option-action-menu--component flex justify-end", l),
|
|
703
690
|
children: s(e, {
|
|
704
|
-
index:
|
|
691
|
+
index: t,
|
|
705
692
|
onSelect: f,
|
|
706
693
|
onEdit: p,
|
|
707
694
|
onDelete: m
|
|
708
695
|
})
|
|
709
|
-
}) : /* @__PURE__ */
|
|
696
|
+
}) : /* @__PURE__ */ V(ze, {
|
|
710
697
|
item: e,
|
|
711
698
|
menuLabel: c ?? d.actionsLabel,
|
|
712
|
-
className:
|
|
699
|
+
className: i("product-option-action-menu--component", l),
|
|
713
700
|
actions: [
|
|
714
701
|
...f ? [{
|
|
715
702
|
id: "open",
|
|
716
703
|
label: d.viewLabel,
|
|
717
|
-
icon: /* @__PURE__ */
|
|
704
|
+
icon: /* @__PURE__ */ V(he, { className: "size-icon-md" }),
|
|
718
705
|
onClick: () => f(),
|
|
719
706
|
tone: "secondary",
|
|
720
707
|
buttonStyle: "ghost"
|
|
@@ -722,7 +709,7 @@ function Xe({ option: e, index: r = 0, onSelectOption: i, onEditOption: a, onDel
|
|
|
722
709
|
...p ? [{
|
|
723
710
|
id: "edit",
|
|
724
711
|
label: d.editLabel,
|
|
725
|
-
icon: /* @__PURE__ */
|
|
712
|
+
icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
|
|
726
713
|
onClick: () => p(),
|
|
727
714
|
tone: "secondary",
|
|
728
715
|
buttonStyle: "ghost"
|
|
@@ -730,306 +717,305 @@ function Xe({ option: e, index: r = 0, onSelectOption: i, onEditOption: a, onDel
|
|
|
730
717
|
...m ? [{
|
|
731
718
|
id: "delete",
|
|
732
719
|
label: d.deleteLabel,
|
|
733
|
-
icon: /* @__PURE__ */
|
|
720
|
+
icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
|
|
734
721
|
onClick: () => m(),
|
|
735
722
|
tone: "destructive"
|
|
736
723
|
}] : []
|
|
737
724
|
]
|
|
738
725
|
}) : null;
|
|
739
726
|
}
|
|
740
|
-
|
|
727
|
+
Ze.displayName = "ProductOptionActionMenu";
|
|
741
728
|
//#endregion
|
|
742
729
|
//#region src/components/features/products/components/product-operations-card.tsx
|
|
743
|
-
function
|
|
744
|
-
let h =
|
|
730
|
+
function Qe({ items: e = [], onCreateOperation: t, onSelectOperation: n, onEditOperation: a, onDeleteOperation: o, renderOperationActions: c, actions: l, footerSlot: u, renderItem: d, empty: f, className: p, strings: m }) {
|
|
731
|
+
let h = r(be, m), g = t ? /* @__PURE__ */ V(s, {
|
|
745
732
|
type: "button",
|
|
746
733
|
tone: "secondary",
|
|
747
734
|
buttonStyle: "ghost",
|
|
748
|
-
onClick:
|
|
749
|
-
icon:
|
|
735
|
+
onClick: t,
|
|
736
|
+
icon: G,
|
|
750
737
|
children: h.createLabel
|
|
751
738
|
}) : void 0;
|
|
752
|
-
return /* @__PURE__ */
|
|
753
|
-
icon: /* @__PURE__ */ L(ye, { className: "size-icon" }),
|
|
739
|
+
return /* @__PURE__ */ V(E, {
|
|
754
740
|
title: h.title,
|
|
755
741
|
description: h.description,
|
|
756
742
|
actions: l,
|
|
757
743
|
headerAction: g,
|
|
758
744
|
footerSlot: u,
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
children: e.length === 0 ? f ?? /* @__PURE__ */ L($, {
|
|
745
|
+
className: i("product-operations-card--component w-full", p),
|
|
746
|
+
children: e.length === 0 ? f ?? /* @__PURE__ */ V($, {
|
|
762
747
|
title: h.emptyTitle,
|
|
763
748
|
description: h.emptyDescription,
|
|
764
|
-
action:
|
|
749
|
+
action: t ? /* @__PURE__ */ V(s, {
|
|
750
|
+
tone: "primary",
|
|
765
751
|
type: "button",
|
|
766
|
-
onClick:
|
|
767
|
-
icon:
|
|
752
|
+
onClick: t,
|
|
753
|
+
icon: G,
|
|
768
754
|
children: h.createLabel
|
|
769
755
|
}) : void 0
|
|
770
|
-
}) : /* @__PURE__ */
|
|
771
|
-
let
|
|
756
|
+
}) : /* @__PURE__ */ V(M, { children: e.map((e, t) => {
|
|
757
|
+
let r = n ? () => n(e) : void 0, i = a ? () => a(e) : void 0, s = o ? () => o(e) : void 0, l = [...i ? [{
|
|
772
758
|
id: "edit",
|
|
773
759
|
label: h.editLabel,
|
|
774
|
-
icon: /* @__PURE__ */
|
|
775
|
-
onClick: () =>
|
|
760
|
+
icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
|
|
761
|
+
onClick: () => i(),
|
|
776
762
|
tone: "secondary",
|
|
777
763
|
buttonStyle: "ghost"
|
|
778
|
-
}] : [], ...
|
|
764
|
+
}] : [], ...s ? [{
|
|
779
765
|
id: "delete",
|
|
780
766
|
label: h.deleteLabel,
|
|
781
|
-
icon: /* @__PURE__ */
|
|
782
|
-
onClick: () =>
|
|
767
|
+
icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
|
|
768
|
+
onClick: () => s(),
|
|
783
769
|
tone: "destructive"
|
|
784
770
|
}] : []], u = c ? c(e, {
|
|
785
771
|
index: t,
|
|
786
|
-
onSelect:
|
|
787
|
-
onEdit:
|
|
788
|
-
onDelete:
|
|
789
|
-
}) : /* @__PURE__ */
|
|
772
|
+
onSelect: r,
|
|
773
|
+
onEdit: i,
|
|
774
|
+
onDelete: s
|
|
775
|
+
}) : /* @__PURE__ */ V(ze, {
|
|
790
776
|
item: e,
|
|
791
777
|
actions: l,
|
|
792
778
|
menuLabel: h.actionsLabel
|
|
793
779
|
});
|
|
794
|
-
return d ? /* @__PURE__ */
|
|
780
|
+
return d ? /* @__PURE__ */ V("div", { children: d(e, t) }, e.id) : /* @__PURE__ */ V(qe, {
|
|
795
781
|
item: e,
|
|
796
782
|
actionFallback: h.actionLabel,
|
|
797
|
-
onSelect:
|
|
783
|
+
onSelect: r,
|
|
798
784
|
actions: u
|
|
799
785
|
}, e.id);
|
|
800
786
|
}) })
|
|
801
787
|
});
|
|
802
788
|
}
|
|
803
|
-
|
|
789
|
+
Qe.displayName = "ProductOperationsCard";
|
|
804
790
|
//#endregion
|
|
805
791
|
//#region src/components/features/products/components/product-options-matrix.tsx
|
|
806
|
-
function
|
|
792
|
+
function $e(e) {
|
|
807
793
|
return typeof e == "string" || typeof e == "number" ? String(e) : "";
|
|
808
794
|
}
|
|
809
|
-
function
|
|
795
|
+
function et(e) {
|
|
810
796
|
return typeof e == "string" || typeof e == "number" || typeof e == "bigint";
|
|
811
797
|
}
|
|
812
|
-
function
|
|
813
|
-
let n =
|
|
798
|
+
function tt(e, t) {
|
|
799
|
+
let n = $e(t.name);
|
|
814
800
|
return n ? `${e}: ${n}` : e;
|
|
815
801
|
}
|
|
816
|
-
function
|
|
802
|
+
function nt(e) {
|
|
817
803
|
return {
|
|
818
|
-
name:
|
|
804
|
+
name: $e(e.name),
|
|
819
805
|
values: (e.values ?? []).map((e) => ({
|
|
820
806
|
...e,
|
|
821
|
-
label:
|
|
807
|
+
label: $e(e.label)
|
|
822
808
|
}))
|
|
823
809
|
};
|
|
824
810
|
}
|
|
825
|
-
function
|
|
826
|
-
let
|
|
827
|
-
|
|
811
|
+
function rt({ optionGroups: e = [], surface: t = "card", collapsedOptionIds: a, defaultCollapsedOptionIds: c = [], onCollapsedOptionIdsChange: u, editingOptionId: d, defaultEditingOptionId: m, onEditingOptionIdChange: h, onCreateOption: g, onEditOption: _, onDeleteOption: v, confirmDelete: S, onAddValue: C, onDeleteValue: T, onOptionNameChange: D, onValueLabelChange: O, onDoneEditingOption: k, onSaveEditingOption: A, onCancelEditingOption: j, onToggleUsedForVariants: M, renderOptionActions: N, renderValue: P, showHeader: F, showCollapseControls: ee = !0, showInlineActions: I = !0, showVariantToggle: te = !0, actions: ne, headerEnd: re, footerSlot: ie, empty: ae, className: oe, strings: se }) {
|
|
812
|
+
let L = r(Te, se), ce = a !== void 0, [z, fe] = ue(c), me = ce ? a : z, he = B(() => new Set(me), [me]), U = d !== void 0 || m !== void 0 || !!h || !!D || !!O || !!k || !!A || !!j, W = d !== void 0, [ve, K] = ue(m ?? null), [J, Y] = ue({}), be = U ? W ? d : ve : null, xe = e.length > 0, Se = t === "embedded" && F !== !1, Ce = xe && !!g, we = R((t) => {
|
|
813
|
+
ce || fe(t), u?.(t, e.filter((e) => t.includes(e.id)));
|
|
828
814
|
}, [
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
]),
|
|
833
|
-
let t =
|
|
815
|
+
ce,
|
|
816
|
+
u,
|
|
817
|
+
e
|
|
818
|
+
]), Ee = R((e) => {
|
|
819
|
+
let t = he.has(e.id) ? me.filter((t) => t !== e.id) : [...me, e.id];
|
|
834
820
|
we(t);
|
|
835
821
|
}, [
|
|
836
|
-
|
|
837
|
-
|
|
822
|
+
he,
|
|
823
|
+
me,
|
|
838
824
|
we
|
|
839
|
-
]),
|
|
840
|
-
|
|
825
|
+
]), X = R((e, t) => {
|
|
826
|
+
U && (W || K(e), h?.(e, t));
|
|
841
827
|
}, [
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
]),
|
|
846
|
-
|
|
828
|
+
W,
|
|
829
|
+
h,
|
|
830
|
+
U
|
|
831
|
+
]), Z = R((e) => {
|
|
832
|
+
Y((t) => ({
|
|
847
833
|
...t,
|
|
848
|
-
[e.id]:
|
|
849
|
-
})),
|
|
850
|
-
}, [
|
|
851
|
-
|
|
834
|
+
[e.id]: nt(e)
|
|
835
|
+
})), X(e.id, e), _?.(e);
|
|
836
|
+
}, [_, X]), De = R((e) => J[e.id] ?? nt(e), [J]), Oe = R((e, t) => {
|
|
837
|
+
Y((n) => ({
|
|
852
838
|
...n,
|
|
853
|
-
[e.id]: t(n[e.id] ??
|
|
839
|
+
[e.id]: t(n[e.id] ?? nt(e))
|
|
854
840
|
}));
|
|
855
|
-
}, []),
|
|
856
|
-
let t =
|
|
857
|
-
|
|
841
|
+
}, []), ke = R((e) => {
|
|
842
|
+
let t = De(e);
|
|
843
|
+
Y((t) => {
|
|
858
844
|
let { [e.id]: n, ...r } = t;
|
|
859
845
|
return r;
|
|
860
|
-
}),
|
|
846
|
+
}), X(null, e), j?.(e, t);
|
|
861
847
|
}, [
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
]),
|
|
866
|
-
let t =
|
|
867
|
-
|
|
848
|
+
De,
|
|
849
|
+
j,
|
|
850
|
+
X
|
|
851
|
+
]), Q = R((e) => {
|
|
852
|
+
let t = De(e), n = e.values ?? [], r = new Set(n.map((e) => e.id)), i = new Set(t.values.map((e) => e.id));
|
|
853
|
+
A?.(e, t), D?.(e, t.name), n.forEach((n) => {
|
|
868
854
|
let r = t.values.find((e) => e.id === n.id);
|
|
869
|
-
r &&
|
|
855
|
+
r && $e(n.label) !== $e(r.label) && O?.(e, n, $e(r.label));
|
|
870
856
|
}), t.values.forEach((t) => {
|
|
871
857
|
r.has(t.id) || C?.(e);
|
|
872
858
|
}), n.forEach((t) => {
|
|
873
|
-
i.has(t.id) ||
|
|
874
|
-
}),
|
|
859
|
+
i.has(t.id) || T?.(e, t);
|
|
860
|
+
}), Y((t) => {
|
|
875
861
|
let { [e.id]: n, ...r } = t;
|
|
876
862
|
return r;
|
|
877
|
-
}),
|
|
863
|
+
}), X(null, e), k?.(e);
|
|
878
864
|
}, [
|
|
879
|
-
|
|
865
|
+
De,
|
|
880
866
|
C,
|
|
881
|
-
w,
|
|
882
|
-
D,
|
|
883
867
|
T,
|
|
868
|
+
k,
|
|
869
|
+
D,
|
|
870
|
+
A,
|
|
884
871
|
O,
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
let t = X(e), n = new Set(t.values.map((e) => e.id)), r = (e.values ?? []).filter((e) => !n.has(e.id)).length;
|
|
872
|
+
X
|
|
873
|
+
]), Ae = f(), [je, Me] = ue(null), Ne = R((e) => {
|
|
874
|
+
let t = De(e), n = new Set(t.values.map((e) => e.id)), r = (e.values ?? []).filter((e) => !n.has(e.id)).length;
|
|
889
875
|
if (S === !1 || r === 0) {
|
|
890
|
-
|
|
876
|
+
Q(e);
|
|
891
877
|
return;
|
|
892
878
|
}
|
|
893
|
-
|
|
879
|
+
Me({
|
|
894
880
|
option: e,
|
|
895
881
|
removed: r
|
|
896
|
-
}),
|
|
882
|
+
}), Ae.show();
|
|
897
883
|
}, [
|
|
898
|
-
|
|
884
|
+
Q,
|
|
899
885
|
S,
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
]),
|
|
903
|
-
|
|
886
|
+
De,
|
|
887
|
+
Ae
|
|
888
|
+
]), Pe = R((e) => {
|
|
889
|
+
be === e.id && (Y((t) => {
|
|
904
890
|
let { [e.id]: n, ...r } = t;
|
|
905
891
|
return r;
|
|
906
|
-
}),
|
|
892
|
+
}), X(null, e)), v?.(e);
|
|
907
893
|
}, [
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
]),
|
|
894
|
+
v,
|
|
895
|
+
be,
|
|
896
|
+
X
|
|
897
|
+
]), Fe = f(), [Ie, Le] = ue(null), Re = R((e) => {
|
|
912
898
|
if (S === !1) {
|
|
913
|
-
|
|
899
|
+
Pe(e);
|
|
914
900
|
return;
|
|
915
901
|
}
|
|
916
|
-
|
|
902
|
+
Le(e), Fe.show();
|
|
917
903
|
}, [
|
|
918
904
|
S,
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
]),
|
|
905
|
+
Pe,
|
|
906
|
+
Fe
|
|
907
|
+
]), Be = g ? /* @__PURE__ */ V(s, {
|
|
922
908
|
type: "button",
|
|
923
909
|
tone: "neutral",
|
|
924
|
-
onClick:
|
|
925
|
-
icon:
|
|
926
|
-
children:
|
|
927
|
-
}) : void 0,
|
|
910
|
+
onClick: g,
|
|
911
|
+
icon: G,
|
|
912
|
+
children: L.createLabel
|
|
913
|
+
}) : void 0, Ve = Se ? /* @__PURE__ */ V("div", {
|
|
928
914
|
className: "product-options-matrix--panel-header p-surface",
|
|
929
|
-
children: /* @__PURE__ */
|
|
915
|
+
children: /* @__PURE__ */ H(l, {
|
|
930
916
|
direction: "horizontal",
|
|
931
917
|
gap: "md",
|
|
932
918
|
justify: "between",
|
|
933
|
-
children: [/* @__PURE__ */
|
|
919
|
+
children: [/* @__PURE__ */ V(o, {
|
|
934
920
|
weight: "semibold",
|
|
935
|
-
children:
|
|
936
|
-
}),
|
|
921
|
+
children: L.title
|
|
922
|
+
}), Be]
|
|
937
923
|
})
|
|
938
|
-
}) : null,
|
|
924
|
+
}) : null, He = /* @__PURE__ */ H("div", {
|
|
939
925
|
className: "product-options-matrix--body min-w-0",
|
|
940
926
|
children: [
|
|
941
|
-
/* @__PURE__ */
|
|
942
|
-
className: "product-options-matrix--panel overflow-hidden rounded-radius
|
|
943
|
-
children: [
|
|
944
|
-
className:
|
|
945
|
-
children: [
|
|
946
|
-
let
|
|
927
|
+
/* @__PURE__ */ H("div", {
|
|
928
|
+
className: "product-options-matrix--panel overflow-hidden rounded-radius border border-border bg-background",
|
|
929
|
+
children: [Ve, xe ? /* @__PURE__ */ H("div", {
|
|
930
|
+
className: i("product-options-matrix--list", Se && "border-t border-border/70"),
|
|
931
|
+
children: [e.map((e, t) => {
|
|
932
|
+
let n = e.values ?? [], r = he.has(e.id), a = be === e.id, c = !!_ || U, u = !!v, d = !!C, f = De(e), p = N?.(e, {
|
|
947
933
|
index: t,
|
|
948
|
-
onEdit:
|
|
949
|
-
onDelete:
|
|
934
|
+
onEdit: c ? () => Z(e) : void 0,
|
|
935
|
+
onDelete: v ? () => Re(e) : void 0,
|
|
950
936
|
onAddValue: C ? () => C(e) : void 0,
|
|
951
|
-
onToggleCollapsed: () =>
|
|
952
|
-
collapsed:
|
|
937
|
+
onToggleCollapsed: () => Ee(e),
|
|
938
|
+
collapsed: r
|
|
953
939
|
}), m = [...d ? [{
|
|
954
940
|
id: "add-value",
|
|
955
|
-
label:
|
|
956
|
-
icon: /* @__PURE__ */
|
|
941
|
+
label: L.addValueLabel,
|
|
942
|
+
icon: /* @__PURE__ */ V(G, { className: "size-icon-md" }),
|
|
957
943
|
onClick: () => C?.(e),
|
|
958
944
|
tone: "secondary",
|
|
959
945
|
buttonStyle: "ghost"
|
|
960
946
|
}] : [], ...u ? [{
|
|
961
947
|
id: "delete",
|
|
962
|
-
label:
|
|
963
|
-
icon: /* @__PURE__ */
|
|
964
|
-
onClick: () =>
|
|
948
|
+
label: L.deleteLabel,
|
|
949
|
+
icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
|
|
950
|
+
onClick: () => Re(e),
|
|
965
951
|
tone: "destructive"
|
|
966
|
-
}] : []],
|
|
952
|
+
}] : []], h = I ? /* @__PURE__ */ H(de, { children: [!!c && /* @__PURE__ */ V(s, {
|
|
967
953
|
type: "button",
|
|
968
954
|
tone: "secondary",
|
|
969
955
|
buttonStyle: "ghost",
|
|
970
|
-
onClick: () =>
|
|
971
|
-
children:
|
|
972
|
-
}), /* @__PURE__ */
|
|
956
|
+
onClick: () => Z(e),
|
|
957
|
+
children: L.editLabel
|
|
958
|
+
}), /* @__PURE__ */ V(ze, {
|
|
973
959
|
item: e,
|
|
974
960
|
actions: m,
|
|
975
|
-
menuLabel:
|
|
976
|
-
})] }) : null,
|
|
977
|
-
if (
|
|
961
|
+
menuLabel: L.actionsLabel
|
|
962
|
+
})] }) : null, g = p === void 0 ? h : p;
|
|
963
|
+
if (a) return /* @__PURE__ */ V("div", {
|
|
978
964
|
className: "product-options-matrix--item product-options-matrix--item-editing border-b border-border/70 p-surface last:border-b-0",
|
|
979
|
-
children: /* @__PURE__ */
|
|
965
|
+
children: /* @__PURE__ */ H("div", {
|
|
980
966
|
className: "grid min-w-0 grid-cols-[auto_minmax(0,1fr)] gap-x-space-md gap-y-space-lg",
|
|
981
|
-
children: [/* @__PURE__ */
|
|
982
|
-
className: "product-options-matrix--drag-handle
|
|
967
|
+
children: [/* @__PURE__ */ V("span", {
|
|
968
|
+
className: "product-options-matrix--drag-handle self-start flex size-icon-lg items-center justify-center text-muted-foreground",
|
|
983
969
|
"aria-hidden": "true",
|
|
984
|
-
children: /* @__PURE__ */
|
|
985
|
-
}), /* @__PURE__ */
|
|
970
|
+
children: /* @__PURE__ */ V(ge, { className: "size-icon-sm" })
|
|
971
|
+
}), /* @__PURE__ */ H(l, {
|
|
986
972
|
gap: "lg",
|
|
987
973
|
className: "product-options-matrix--editor",
|
|
988
974
|
children: [
|
|
989
|
-
/* @__PURE__ */
|
|
990
|
-
label:
|
|
975
|
+
/* @__PURE__ */ V(x, {
|
|
976
|
+
label: L.optionNameLabel,
|
|
991
977
|
className: "product-options-matrix--editor-field",
|
|
992
|
-
children: /* @__PURE__ */
|
|
978
|
+
children: /* @__PURE__ */ V(b, {
|
|
993
979
|
value: f.name,
|
|
994
980
|
onChange: (t) => {
|
|
995
981
|
let n = t.currentTarget.value;
|
|
996
|
-
|
|
982
|
+
Oe(e, (e) => ({
|
|
997
983
|
...e,
|
|
998
984
|
name: n
|
|
999
985
|
}));
|
|
1000
986
|
},
|
|
1001
|
-
"aria-label":
|
|
987
|
+
"aria-label": L.optionNameLabel,
|
|
1002
988
|
className: "bg-background"
|
|
1003
989
|
})
|
|
1004
990
|
}),
|
|
1005
|
-
/* @__PURE__ */
|
|
991
|
+
/* @__PURE__ */ H(l, {
|
|
1006
992
|
gap: "sm",
|
|
1007
993
|
className: "product-options-matrix--editor-field",
|
|
1008
|
-
children: [/* @__PURE__ */
|
|
994
|
+
children: [/* @__PURE__ */ V(o, {
|
|
1009
995
|
weight: "medium",
|
|
1010
|
-
children:
|
|
1011
|
-
}), /* @__PURE__ */
|
|
996
|
+
children: L.optionValuesLabel
|
|
997
|
+
}), /* @__PURE__ */ H(l, {
|
|
1012
998
|
gap: "xs",
|
|
1013
999
|
className: "product-options-matrix--editor-values",
|
|
1014
1000
|
children: [
|
|
1015
|
-
f.values.length === 0 && /* @__PURE__ */
|
|
1001
|
+
f.values.length === 0 && /* @__PURE__ */ V(o, {
|
|
1016
1002
|
size: "xs",
|
|
1017
1003
|
type: "secondary",
|
|
1018
|
-
children:
|
|
1004
|
+
children: L.noValuesLabel
|
|
1019
1005
|
}),
|
|
1020
|
-
f.values.map((t) => /* @__PURE__ */
|
|
1006
|
+
f.values.map((t) => /* @__PURE__ */ H("div", {
|
|
1021
1007
|
className: "product-options-matrix--editor-value grid min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-space-sm",
|
|
1022
1008
|
children: [
|
|
1023
|
-
/* @__PURE__ */
|
|
1009
|
+
/* @__PURE__ */ V("span", {
|
|
1024
1010
|
className: "flex size-icon-lg items-center justify-center text-muted-foreground",
|
|
1025
1011
|
"aria-hidden": "true",
|
|
1026
|
-
children: /* @__PURE__ */
|
|
1012
|
+
children: /* @__PURE__ */ V(ge, { className: "size-icon-sm" })
|
|
1027
1013
|
}),
|
|
1028
|
-
/* @__PURE__ */
|
|
1029
|
-
value:
|
|
1014
|
+
/* @__PURE__ */ V(b, {
|
|
1015
|
+
value: $e(t.label),
|
|
1030
1016
|
onChange: (n) => {
|
|
1031
1017
|
let r = n.currentTarget.value;
|
|
1032
|
-
|
|
1018
|
+
Oe(e, (e) => ({
|
|
1033
1019
|
...e,
|
|
1034
1020
|
values: e.values.map((e) => e.id === t.id ? {
|
|
1035
1021
|
...e,
|
|
@@ -1037,45 +1023,45 @@ function nt({ optionGroups: a = [], surface: o = "card", collapsedOptionIds: c,
|
|
|
1037
1023
|
} : e)
|
|
1038
1024
|
}));
|
|
1039
1025
|
},
|
|
1040
|
-
"aria-label": `${
|
|
1026
|
+
"aria-label": `${L.optionValuesLabel}: ${$e(t.label)}`,
|
|
1041
1027
|
className: "bg-background"
|
|
1042
1028
|
}),
|
|
1043
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ H(s, {
|
|
1044
1030
|
type: "button",
|
|
1045
1031
|
size: "sm",
|
|
1046
1032
|
iconOnly: !0,
|
|
1047
1033
|
tone: "secondary",
|
|
1048
1034
|
buttonStyle: "ghost",
|
|
1049
|
-
onClick: () =>
|
|
1035
|
+
onClick: () => Oe(e, (e) => ({
|
|
1050
1036
|
...e,
|
|
1051
1037
|
values: e.values.filter((e) => e.id !== t.id)
|
|
1052
1038
|
})),
|
|
1053
|
-
"aria-label":
|
|
1039
|
+
"aria-label": L.deleteValueLabel,
|
|
1054
1040
|
className: "text-muted-foreground hover:text-destructive",
|
|
1055
|
-
children: [/* @__PURE__ */
|
|
1041
|
+
children: [/* @__PURE__ */ V(q, {
|
|
1056
1042
|
className: "size-icon-sm",
|
|
1057
1043
|
"aria-hidden": "true"
|
|
1058
|
-
}), /* @__PURE__ */
|
|
1044
|
+
}), /* @__PURE__ */ V(o, {
|
|
1059
1045
|
tag: "span",
|
|
1060
1046
|
size: "pxs",
|
|
1061
1047
|
className: "sr-only",
|
|
1062
|
-
children:
|
|
1048
|
+
children: L.deleteValueLabel
|
|
1063
1049
|
})]
|
|
1064
1050
|
})
|
|
1065
1051
|
]
|
|
1066
1052
|
}, t.id)),
|
|
1067
|
-
/* @__PURE__ */
|
|
1053
|
+
/* @__PURE__ */ H("div", {
|
|
1068
1054
|
className: "product-options-matrix--editor-add-value grid min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-space-sm",
|
|
1069
1055
|
children: [
|
|
1070
|
-
/* @__PURE__ */
|
|
1056
|
+
/* @__PURE__ */ V("span", {
|
|
1071
1057
|
className: "size-icon-lg",
|
|
1072
1058
|
"aria-hidden": "true"
|
|
1073
1059
|
}),
|
|
1074
|
-
/* @__PURE__ */
|
|
1060
|
+
/* @__PURE__ */ V(s, {
|
|
1075
1061
|
type: "button",
|
|
1076
1062
|
tone: "secondary",
|
|
1077
1063
|
buttonStyle: "outline",
|
|
1078
|
-
onClick: () =>
|
|
1064
|
+
onClick: () => Oe(e, (t) => {
|
|
1079
1065
|
let n = t.values.length + 1;
|
|
1080
1066
|
return {
|
|
1081
1067
|
...t,
|
|
@@ -1087,9 +1073,9 @@ function nt({ optionGroups: a = [], surface: o = "card", collapsedOptionIds: c,
|
|
|
1087
1073
|
}),
|
|
1088
1074
|
fullWidth: !0,
|
|
1089
1075
|
className: "justify-start border-input bg-background text-muted-foreground hover:bg-muted/60",
|
|
1090
|
-
children:
|
|
1076
|
+
children: L.addAnotherValueLabel
|
|
1091
1077
|
}),
|
|
1092
|
-
/* @__PURE__ */
|
|
1078
|
+
/* @__PURE__ */ V("span", {
|
|
1093
1079
|
className: "size-action-sm",
|
|
1094
1080
|
"aria-hidden": "true"
|
|
1095
1081
|
})
|
|
@@ -1098,34 +1084,34 @@ function nt({ optionGroups: a = [], surface: o = "card", collapsedOptionIds: c,
|
|
|
1098
1084
|
]
|
|
1099
1085
|
})]
|
|
1100
1086
|
}),
|
|
1101
|
-
/* @__PURE__ */
|
|
1087
|
+
/* @__PURE__ */ H(l, {
|
|
1102
1088
|
direction: "horizontal",
|
|
1103
1089
|
gap: "md",
|
|
1104
1090
|
justify: "between",
|
|
1105
1091
|
wrap: !1,
|
|
1106
1092
|
className: "product-options-matrix--editor-actions",
|
|
1107
|
-
children: [/* @__PURE__ */
|
|
1093
|
+
children: [/* @__PURE__ */ V("div", { children: !!v && /* @__PURE__ */ V(s, {
|
|
1108
1094
|
type: "button",
|
|
1109
1095
|
tone: "destructive",
|
|
1110
1096
|
buttonStyle: "outline",
|
|
1111
|
-
onClick: () =>
|
|
1112
|
-
children:
|
|
1113
|
-
}) }), /* @__PURE__ */
|
|
1097
|
+
onClick: () => Re(e),
|
|
1098
|
+
children: L.deleteLabel
|
|
1099
|
+
}) }), /* @__PURE__ */ H(l, {
|
|
1114
1100
|
direction: "horizontal",
|
|
1115
1101
|
gap: "sm",
|
|
1116
1102
|
justify: "end",
|
|
1117
1103
|
wrap: !1,
|
|
1118
|
-
children: [/* @__PURE__ */
|
|
1104
|
+
children: [/* @__PURE__ */ V(s, {
|
|
1119
1105
|
type: "button",
|
|
1120
1106
|
tone: "secondary",
|
|
1121
1107
|
buttonStyle: "ghost",
|
|
1122
|
-
onClick: () =>
|
|
1123
|
-
children:
|
|
1124
|
-
}), /* @__PURE__ */
|
|
1108
|
+
onClick: () => ke(e),
|
|
1109
|
+
children: L.cancelLabel
|
|
1110
|
+
}), /* @__PURE__ */ V(s, {
|
|
1125
1111
|
type: "button",
|
|
1126
1112
|
tone: "neutral",
|
|
1127
|
-
onClick: () =>
|
|
1128
|
-
children:
|
|
1113
|
+
onClick: () => Ne(e),
|
|
1114
|
+
children: L.saveLabel ?? L.doneLabel
|
|
1129
1115
|
})]
|
|
1130
1116
|
})]
|
|
1131
1117
|
})
|
|
@@ -1133,247 +1119,242 @@ function nt({ optionGroups: a = [], surface: o = "card", collapsedOptionIds: c,
|
|
|
1133
1119
|
})]
|
|
1134
1120
|
})
|
|
1135
1121
|
}, e.id);
|
|
1136
|
-
let
|
|
1137
|
-
render: /* @__PURE__ */
|
|
1122
|
+
let S = /* @__PURE__ */ H(l, {
|
|
1123
|
+
render: /* @__PURE__ */ V("span", {}),
|
|
1138
1124
|
gap: "sm",
|
|
1139
1125
|
children: [
|
|
1140
|
-
/* @__PURE__ */
|
|
1141
|
-
render: /* @__PURE__ */
|
|
1126
|
+
/* @__PURE__ */ H(l, {
|
|
1127
|
+
render: /* @__PURE__ */ V("span", {}),
|
|
1142
1128
|
direction: "horizontal",
|
|
1143
1129
|
gap: "sm",
|
|
1144
|
-
children: [/* @__PURE__ */
|
|
1130
|
+
children: [/* @__PURE__ */ V(o, {
|
|
1145
1131
|
tag: "span",
|
|
1146
1132
|
weight: "semibold",
|
|
1147
1133
|
className: "min-w-0 whitespace-normal break-words",
|
|
1148
1134
|
children: e.name
|
|
1149
1135
|
}), e.badge]
|
|
1150
1136
|
}),
|
|
1151
|
-
!!e.description && /* @__PURE__ */
|
|
1137
|
+
!!e.description && /* @__PURE__ */ V(o, {
|
|
1152
1138
|
tag: "span",
|
|
1153
1139
|
size: "xs",
|
|
1154
1140
|
type: "secondary",
|
|
1155
1141
|
className: "max-w-prose",
|
|
1156
1142
|
children: e.description
|
|
1157
1143
|
}),
|
|
1158
|
-
!
|
|
1159
|
-
render: /* @__PURE__ */
|
|
1144
|
+
!r && /* @__PURE__ */ V(l, {
|
|
1145
|
+
render: /* @__PURE__ */ V("span", {}),
|
|
1160
1146
|
gap: "sm",
|
|
1161
1147
|
className: "product-options-matrix--values",
|
|
1162
|
-
children:
|
|
1148
|
+
children: n.length === 0 ? /* @__PURE__ */ V(o, {
|
|
1163
1149
|
tag: "span",
|
|
1164
1150
|
size: "xs",
|
|
1165
1151
|
type: "secondary",
|
|
1166
|
-
children:
|
|
1167
|
-
}) : /* @__PURE__ */
|
|
1152
|
+
children: L.noValuesLabel
|
|
1153
|
+
}) : /* @__PURE__ */ V("span", {
|
|
1168
1154
|
className: "flex flex-wrap gap-space-xs",
|
|
1169
|
-
children:
|
|
1170
|
-
let
|
|
1155
|
+
children: n.map((n, r) => {
|
|
1156
|
+
let a = T ? () => T(e, n) : void 0, s = P?.(n, {
|
|
1171
1157
|
option: e,
|
|
1172
1158
|
optionIndex: t,
|
|
1173
|
-
valueIndex:
|
|
1174
|
-
onDelete:
|
|
1159
|
+
valueIndex: r,
|
|
1160
|
+
onDelete: a
|
|
1175
1161
|
});
|
|
1176
|
-
return
|
|
1177
|
-
className:
|
|
1162
|
+
return s ? /* @__PURE__ */ V(le, { children: s }, n.id) : /* @__PURE__ */ H("span", {
|
|
1163
|
+
className: i("product-options-matrix--value inline-flex max-w-full items-center gap-space-xs rounded-radius bg-muted px-space-sm py-space-xs text-pxs font-medium leading-none text-muted-foreground", n.disabled && "opacity-60"),
|
|
1178
1164
|
children: [
|
|
1179
|
-
|
|
1165
|
+
et(n.label) ? /* @__PURE__ */ V(o, {
|
|
1180
1166
|
tag: "span",
|
|
1181
1167
|
size: "inherit",
|
|
1182
1168
|
className: "min-w-0 whitespace-normal break-words",
|
|
1183
|
-
children:
|
|
1184
|
-
}) :
|
|
1185
|
-
|
|
1186
|
-
!!
|
|
1169
|
+
children: n.label
|
|
1170
|
+
}) : n.label,
|
|
1171
|
+
n.badge,
|
|
1172
|
+
!!a && I && /* @__PURE__ */ H("button", {
|
|
1187
1173
|
type: "button",
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
"aria-label": z.deleteValueLabel,
|
|
1194
|
-
className: "size-icon-sm shrink-0 rounded-radius text-muted-foreground/70 hover:text-destructive",
|
|
1195
|
-
children: [/* @__PURE__ */ L(q, {
|
|
1196
|
-
className: "size-icon-sm",
|
|
1174
|
+
onClick: a,
|
|
1175
|
+
"aria-label": L.deleteValueLabel,
|
|
1176
|
+
className: i(y.target, y.focus, y.clear, "hover:text-destructive"),
|
|
1177
|
+
children: [/* @__PURE__ */ V(ye, {
|
|
1178
|
+
className: y.icon,
|
|
1197
1179
|
"aria-hidden": "true"
|
|
1198
|
-
}), /* @__PURE__ */
|
|
1180
|
+
}), /* @__PURE__ */ V(o, {
|
|
1199
1181
|
tag: "span",
|
|
1200
1182
|
size: "pxs",
|
|
1201
1183
|
className: "sr-only",
|
|
1202
|
-
children:
|
|
1184
|
+
children: L.deleteValueLabel
|
|
1203
1185
|
})]
|
|
1204
1186
|
})
|
|
1205
1187
|
]
|
|
1206
|
-
},
|
|
1188
|
+
}, n.id);
|
|
1207
1189
|
})
|
|
1208
1190
|
})
|
|
1209
1191
|
})
|
|
1210
1192
|
]
|
|
1211
1193
|
});
|
|
1212
|
-
return /* @__PURE__ */
|
|
1194
|
+
return /* @__PURE__ */ V("div", {
|
|
1213
1195
|
className: "product-options-matrix--item border-b border-border/70 last:border-b-0",
|
|
1214
|
-
children: /* @__PURE__ */
|
|
1196
|
+
children: /* @__PURE__ */ H("div", {
|
|
1215
1197
|
className: "grid min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-space-md gap-y-space-md p-surface @2xl/product-options-matrix:grid-cols-[auto_minmax(0,1fr)_auto]",
|
|
1216
1198
|
children: [
|
|
1217
|
-
|
|
1199
|
+
ee ? /* @__PURE__ */ H(s, {
|
|
1218
1200
|
type: "button",
|
|
1219
1201
|
size: "sm",
|
|
1220
1202
|
iconOnly: !0,
|
|
1221
1203
|
tone: "secondary",
|
|
1222
1204
|
buttonStyle: "ghost",
|
|
1223
|
-
onClick: () =>
|
|
1224
|
-
"aria-expanded": !
|
|
1225
|
-
"aria-label":
|
|
1205
|
+
onClick: () => Ee(e),
|
|
1206
|
+
"aria-expanded": !r,
|
|
1207
|
+
"aria-label": r ? L.expandOptionLabel : L.collapseOptionLabel,
|
|
1226
1208
|
className: "product-options-matrix--collapse-trigger mt-space-2xs shrink-0 text-muted-foreground",
|
|
1227
|
-
children: [/* @__PURE__ */
|
|
1228
|
-
className:
|
|
1209
|
+
children: [/* @__PURE__ */ V(pe, {
|
|
1210
|
+
className: i("size-icon-sm transition-transform", r && "-rotate-90"),
|
|
1229
1211
|
"aria-hidden": "true"
|
|
1230
|
-
}), /* @__PURE__ */
|
|
1212
|
+
}), /* @__PURE__ */ V(o, {
|
|
1231
1213
|
tag: "span",
|
|
1232
1214
|
size: "pxs",
|
|
1233
1215
|
className: "sr-only",
|
|
1234
|
-
children:
|
|
1216
|
+
children: r ? L.expandOptionLabel : L.collapseOptionLabel
|
|
1235
1217
|
})]
|
|
1236
|
-
}) : /* @__PURE__ */
|
|
1218
|
+
}) : /* @__PURE__ */ V("span", {
|
|
1237
1219
|
className: "product-options-matrix--drag-handle flex size-icon-lg items-center justify-center text-muted-foreground",
|
|
1238
1220
|
"aria-hidden": "true",
|
|
1239
|
-
children: /* @__PURE__ */
|
|
1221
|
+
children: /* @__PURE__ */ V(ge, { className: "size-icon-sm" })
|
|
1240
1222
|
}),
|
|
1241
|
-
/* @__PURE__ */
|
|
1223
|
+
/* @__PURE__ */ V("div", {
|
|
1242
1224
|
className: "product-options-matrix--item-main min-w-0",
|
|
1243
|
-
children:
|
|
1225
|
+
children: c && !I ? /* @__PURE__ */ V("button", {
|
|
1244
1226
|
type: "button",
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
children: y
|
|
1251
|
-
}) : y
|
|
1227
|
+
onClick: () => Z(e),
|
|
1228
|
+
"aria-label": tt(L.editLabel, e),
|
|
1229
|
+
className: "product-options-matrix--edit-summary box-border block w-full cursor-pointer whitespace-normal rounded-inner border-0 bg-transparent p-0 text-start font-sans text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1230
|
+
children: S
|
|
1231
|
+
}) : S
|
|
1252
1232
|
}),
|
|
1253
|
-
(
|
|
1233
|
+
(te || !!g) && /* @__PURE__ */ H("div", {
|
|
1254
1234
|
className: "product-options-matrix--item-actions col-start-2 flex min-w-fit items-center gap-space-md justify-start @2xl/product-options-matrix:justify-end lg:col-start-auto",
|
|
1255
|
-
children: [!!
|
|
1235
|
+
children: [!!M && te && /* @__PURE__ */ H("div", {
|
|
1256
1236
|
className: "inline-flex items-center gap-space-sm",
|
|
1257
|
-
children: [/* @__PURE__ */
|
|
1237
|
+
children: [/* @__PURE__ */ V(o, {
|
|
1258
1238
|
tag: "span",
|
|
1259
1239
|
id: `product-option-${e.id}-variant-toggle-label`,
|
|
1260
1240
|
size: "pxs",
|
|
1261
1241
|
type: "secondary",
|
|
1262
1242
|
weight: "medium",
|
|
1263
|
-
children:
|
|
1264
|
-
}), /* @__PURE__ */
|
|
1243
|
+
children: L.useForVariantsLabel
|
|
1244
|
+
}), /* @__PURE__ */ V(w, {
|
|
1265
1245
|
checked: !!e.usedForVariants,
|
|
1266
|
-
onValueChange: (t) =>
|
|
1246
|
+
onValueChange: (t) => M(e, t),
|
|
1267
1247
|
"aria-labelledby": `product-option-${e.id}-variant-toggle-label`
|
|
1268
1248
|
})]
|
|
1269
|
-
}),
|
|
1249
|
+
}), g]
|
|
1270
1250
|
})
|
|
1271
1251
|
]
|
|
1272
1252
|
})
|
|
1273
1253
|
}, e.id);
|
|
1274
|
-
}), !!
|
|
1275
|
-
className: "product-options-matrix--create-row border-t border-border/70",
|
|
1276
|
-
children: /* @__PURE__ */
|
|
1254
|
+
}), !!Ce && /* @__PURE__ */ V("div", {
|
|
1255
|
+
className: "product-options-matrix--create-row border-t border-border/70 p-surface-xs",
|
|
1256
|
+
children: /* @__PURE__ */ V(s, {
|
|
1277
1257
|
type: "button",
|
|
1278
1258
|
tone: "secondary",
|
|
1279
1259
|
buttonStyle: "ghost",
|
|
1280
|
-
onClick:
|
|
1281
|
-
icon:
|
|
1282
|
-
|
|
1283
|
-
|
|
1260
|
+
onClick: g,
|
|
1261
|
+
icon: _e,
|
|
1262
|
+
size: "sm",
|
|
1263
|
+
fullWidth: !0,
|
|
1264
|
+
className: "justify-start text-foreground",
|
|
1265
|
+
children: L.addAnotherOptionLabel
|
|
1284
1266
|
})
|
|
1285
1267
|
})]
|
|
1286
|
-
}) : /* @__PURE__ */
|
|
1287
|
-
className:
|
|
1288
|
-
children:
|
|
1289
|
-
title:
|
|
1290
|
-
description:
|
|
1291
|
-
action:
|
|
1268
|
+
}) : /* @__PURE__ */ V("div", {
|
|
1269
|
+
className: i(Se && "border-t border-border/70"),
|
|
1270
|
+
children: ae ?? /* @__PURE__ */ V($, {
|
|
1271
|
+
title: L.emptyTitle,
|
|
1272
|
+
description: L.emptyDescription,
|
|
1273
|
+
action: g && !Se ? /* @__PURE__ */ V(s, {
|
|
1274
|
+
tone: "primary",
|
|
1292
1275
|
type: "button",
|
|
1293
|
-
onClick:
|
|
1294
|
-
icon:
|
|
1295
|
-
children:
|
|
1276
|
+
onClick: g,
|
|
1277
|
+
icon: G,
|
|
1278
|
+
children: L.createLabel
|
|
1296
1279
|
}) : void 0
|
|
1297
1280
|
})
|
|
1298
1281
|
})]
|
|
1299
1282
|
}),
|
|
1300
|
-
!!(S !== !1 &&
|
|
1301
|
-
...
|
|
1283
|
+
!!(S !== !1 && je) && /* @__PURE__ */ V(p, {
|
|
1284
|
+
...Ae.overlayProps,
|
|
1302
1285
|
destructive: !0,
|
|
1303
|
-
title:
|
|
1304
|
-
description:
|
|
1305
|
-
strings: { confirm:
|
|
1306
|
-
onConfirm: () =>
|
|
1286
|
+
title: L.confirmRemoveValuesTitle,
|
|
1287
|
+
description: n(L.confirmRemoveValuesDescription, { count: je.removed }),
|
|
1288
|
+
strings: { confirm: L.confirmRemoveValuesLabel },
|
|
1289
|
+
onConfirm: () => Q(je.option)
|
|
1307
1290
|
}),
|
|
1308
|
-
!!(S !== !1 &&
|
|
1309
|
-
...
|
|
1291
|
+
!!(S !== !1 && v) && /* @__PURE__ */ V(p, {
|
|
1292
|
+
...Fe.overlayProps,
|
|
1310
1293
|
destructive: !0,
|
|
1311
|
-
title:
|
|
1312
|
-
description:
|
|
1313
|
-
strings: { confirm:
|
|
1294
|
+
title: L.confirmDeleteOptionTitle,
|
|
1295
|
+
description: L.confirmDeleteOptionDescription,
|
|
1296
|
+
strings: { confirm: L.deleteLabel },
|
|
1314
1297
|
onConfirm: () => {
|
|
1315
|
-
|
|
1298
|
+
Ie && Pe(Ie);
|
|
1316
1299
|
}
|
|
1317
1300
|
})
|
|
1318
1301
|
]
|
|
1319
1302
|
});
|
|
1320
|
-
return
|
|
1321
|
-
"aria-label":
|
|
1322
|
-
className:
|
|
1323
|
-
children:
|
|
1324
|
-
}) : /* @__PURE__ */
|
|
1325
|
-
title:
|
|
1326
|
-
description:
|
|
1327
|
-
actions:
|
|
1328
|
-
headerAction:
|
|
1329
|
-
headerEnd:
|
|
1330
|
-
footerSlot:
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
children: Be
|
|
1303
|
+
return t === "embedded" ? /* @__PURE__ */ V("section", {
|
|
1304
|
+
"aria-label": L.title,
|
|
1305
|
+
className: i("product-options-matrix--component @container/product-options-matrix min-w-0", oe),
|
|
1306
|
+
children: He
|
|
1307
|
+
}) : /* @__PURE__ */ V(E, {
|
|
1308
|
+
title: L.title,
|
|
1309
|
+
description: L.description,
|
|
1310
|
+
actions: ne,
|
|
1311
|
+
headerAction: Be,
|
|
1312
|
+
headerEnd: re,
|
|
1313
|
+
footerSlot: ie,
|
|
1314
|
+
className: i("product-options-matrix--component @container/product-options-matrix w-full", oe),
|
|
1315
|
+
children: He
|
|
1334
1316
|
});
|
|
1335
1317
|
}
|
|
1336
|
-
|
|
1318
|
+
rt.displayName = "ProductOptionsMatrix";
|
|
1337
1319
|
//#endregion
|
|
1338
1320
|
//#region src/components/features/products/components/product-options-summary.tsx
|
|
1339
|
-
function
|
|
1340
|
-
let g =
|
|
1321
|
+
function it({ options: e = [], onManageOptions: t, onCreateOption: n, onSelectOption: a, onEditOption: o, onDeleteOption: c, renderOptionActions: l, actions: u, footerSlot: d, renderOption: f, empty: p, className: m, strings: h }) {
|
|
1322
|
+
let g = r(Ce, h), _ = !!(a || o || c || l), v = [...u ?? [], ...n && t ? [{
|
|
1341
1323
|
id: "manage-options",
|
|
1342
1324
|
label: g.manageLabel,
|
|
1343
|
-
icon: /* @__PURE__ */
|
|
1344
|
-
onClick:
|
|
1345
|
-
}] : []],
|
|
1325
|
+
icon: /* @__PURE__ */ V(K, { className: "size-icon-md" }),
|
|
1326
|
+
onClick: t
|
|
1327
|
+
}] : []], y = n || t ? /* @__PURE__ */ V(s, {
|
|
1346
1328
|
type: "button",
|
|
1347
1329
|
tone: "secondary",
|
|
1348
1330
|
buttonStyle: "ghost",
|
|
1349
|
-
onClick:
|
|
1350
|
-
icon:
|
|
1351
|
-
children:
|
|
1331
|
+
onClick: n ?? t,
|
|
1332
|
+
icon: n ? G : void 0,
|
|
1333
|
+
children: n ? g.createLabel : g.manageLabel
|
|
1352
1334
|
}) : void 0;
|
|
1353
|
-
return /* @__PURE__ */
|
|
1354
|
-
icon: /* @__PURE__ */ L(G, { className: "size-icon" }),
|
|
1335
|
+
return /* @__PURE__ */ V(E, {
|
|
1355
1336
|
title: g.title,
|
|
1356
1337
|
description: g.description,
|
|
1357
|
-
actions:
|
|
1358
|
-
headerAction:
|
|
1338
|
+
actions: v.length > 0 ? v : void 0,
|
|
1339
|
+
headerAction: y,
|
|
1359
1340
|
footerSlot: d,
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
children: e.length === 0 ? p ?? /* @__PURE__ */ L($, {
|
|
1341
|
+
className: i("product-options-summary--component w-full", m),
|
|
1342
|
+
children: e.length === 0 ? p ?? /* @__PURE__ */ V($, {
|
|
1363
1343
|
title: g.emptyTitle,
|
|
1364
1344
|
description: g.emptyDescription,
|
|
1365
|
-
action:
|
|
1345
|
+
action: n ? /* @__PURE__ */ V(s, {
|
|
1346
|
+
tone: "primary",
|
|
1366
1347
|
type: "button",
|
|
1367
|
-
onClick:
|
|
1368
|
-
icon:
|
|
1348
|
+
onClick: n,
|
|
1349
|
+
icon: G,
|
|
1369
1350
|
children: g.createLabel
|
|
1370
1351
|
}) : void 0
|
|
1371
|
-
}) : /* @__PURE__ */
|
|
1372
|
-
let n =
|
|
1352
|
+
}) : /* @__PURE__ */ V(M, { children: e.map((e, t) => (() => {
|
|
1353
|
+
let n = _ ? /* @__PURE__ */ V(Ze, {
|
|
1373
1354
|
option: e,
|
|
1374
1355
|
index: t,
|
|
1375
|
-
onSelectOption:
|
|
1376
|
-
onEditOption:
|
|
1356
|
+
onSelectOption: a,
|
|
1357
|
+
onEditOption: o,
|
|
1377
1358
|
onDeleteOption: c,
|
|
1378
1359
|
renderOptionActions: l,
|
|
1379
1360
|
menuLabel: g.actionsLabel,
|
|
@@ -1384,141 +1365,138 @@ function rt({ options: e = [], onManageOptions: i, onCreateOption: a, onSelectOp
|
|
|
1384
1365
|
actionsLabel: g.actionsLabel
|
|
1385
1366
|
}
|
|
1386
1367
|
}) : void 0;
|
|
1387
|
-
return f ? /* @__PURE__ */
|
|
1368
|
+
return f ? /* @__PURE__ */ V("div", { children: f(e, t) }, e.id) : /* @__PURE__ */ V(Je, {
|
|
1388
1369
|
item: e,
|
|
1389
1370
|
actions: n
|
|
1390
1371
|
}, e.id);
|
|
1391
1372
|
})()) })
|
|
1392
1373
|
});
|
|
1393
1374
|
}
|
|
1394
|
-
|
|
1375
|
+
it.displayName = "ProductOptionsSummary";
|
|
1395
1376
|
//#endregion
|
|
1396
1377
|
//#region src/components/features/products/components/product-policies-card.tsx
|
|
1397
|
-
function
|
|
1398
|
-
let h =
|
|
1378
|
+
function at({ policies: e = [], onCreatePolicy: t, onSelectPolicy: n, onEditPolicy: a, onDeletePolicy: o, renderPolicyActions: c, actions: l, footerSlot: u, renderPolicy: d, empty: f, className: p, strings: m }) {
|
|
1379
|
+
let h = r(X, m), g = t ? /* @__PURE__ */ V(s, {
|
|
1399
1380
|
type: "button",
|
|
1400
1381
|
tone: "secondary",
|
|
1401
1382
|
buttonStyle: "ghost",
|
|
1402
|
-
onClick:
|
|
1403
|
-
icon:
|
|
1383
|
+
onClick: t,
|
|
1384
|
+
icon: G,
|
|
1404
1385
|
children: h.createLabel
|
|
1405
1386
|
}) : void 0;
|
|
1406
|
-
return /* @__PURE__ */
|
|
1407
|
-
icon: /* @__PURE__ */ L(Ce, { className: "size-icon" }),
|
|
1387
|
+
return /* @__PURE__ */ V(E, {
|
|
1408
1388
|
title: h.title,
|
|
1409
1389
|
description: h.description,
|
|
1410
1390
|
actions: l,
|
|
1411
1391
|
headerAction: g,
|
|
1412
1392
|
footerSlot: u,
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
children: e.length === 0 ? f ?? /* @__PURE__ */ L($, {
|
|
1393
|
+
className: i("product-policies-card--component w-full", p),
|
|
1394
|
+
children: e.length === 0 ? f ?? /* @__PURE__ */ V($, {
|
|
1416
1395
|
title: h.emptyTitle,
|
|
1417
1396
|
description: h.emptyDescription,
|
|
1418
|
-
action:
|
|
1397
|
+
action: t ? /* @__PURE__ */ V(s, {
|
|
1398
|
+
tone: "primary",
|
|
1419
1399
|
type: "button",
|
|
1420
|
-
onClick:
|
|
1421
|
-
icon:
|
|
1400
|
+
onClick: t,
|
|
1401
|
+
icon: G,
|
|
1422
1402
|
children: h.createLabel
|
|
1423
1403
|
}) : void 0
|
|
1424
|
-
}) : /* @__PURE__ */
|
|
1425
|
-
let
|
|
1404
|
+
}) : /* @__PURE__ */ V(M, { children: e.map((e, t) => (() => {
|
|
1405
|
+
let r = n ? () => n(e) : void 0, i = a ? () => a(e) : void 0, s = o ? () => o(e) : void 0, l = [...i ? [{
|
|
1426
1406
|
id: "edit",
|
|
1427
1407
|
label: h.editLabel,
|
|
1428
|
-
icon: /* @__PURE__ */
|
|
1429
|
-
onClick: () =>
|
|
1408
|
+
icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
|
|
1409
|
+
onClick: () => i(),
|
|
1430
1410
|
tone: "secondary",
|
|
1431
1411
|
buttonStyle: "ghost"
|
|
1432
|
-
}] : [], ...
|
|
1412
|
+
}] : [], ...s ? [{
|
|
1433
1413
|
id: "delete",
|
|
1434
1414
|
label: h.deleteLabel,
|
|
1435
|
-
icon: /* @__PURE__ */
|
|
1436
|
-
onClick: () =>
|
|
1415
|
+
icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
|
|
1416
|
+
onClick: () => s(),
|
|
1437
1417
|
tone: "destructive"
|
|
1438
1418
|
}] : []], u = c ? c(e, {
|
|
1439
1419
|
index: t,
|
|
1440
|
-
onSelect:
|
|
1441
|
-
onEdit:
|
|
1442
|
-
onDelete:
|
|
1443
|
-
}) : /* @__PURE__ */
|
|
1420
|
+
onSelect: r,
|
|
1421
|
+
onEdit: i,
|
|
1422
|
+
onDelete: s
|
|
1423
|
+
}) : /* @__PURE__ */ V(ze, {
|
|
1444
1424
|
item: e,
|
|
1445
1425
|
actions: l,
|
|
1446
1426
|
menuLabel: h.actionsLabel
|
|
1447
1427
|
});
|
|
1448
|
-
return d ? /* @__PURE__ */
|
|
1428
|
+
return d ? /* @__PURE__ */ V("div", { children: d(e, t) }, e.id) : /* @__PURE__ */ V(Je, {
|
|
1449
1429
|
item: e,
|
|
1450
1430
|
actionLabel: h.viewLabel,
|
|
1451
|
-
onSelect:
|
|
1431
|
+
onSelect: r,
|
|
1452
1432
|
actions: u
|
|
1453
1433
|
}, e.id);
|
|
1454
1434
|
})()) })
|
|
1455
1435
|
});
|
|
1456
1436
|
}
|
|
1457
|
-
|
|
1437
|
+
at.displayName = "ProductPoliciesCard";
|
|
1458
1438
|
//#endregion
|
|
1459
1439
|
//#region src/components/features/products/components/product-quote-preview-card.tsx
|
|
1460
|
-
function
|
|
1461
|
-
let
|
|
1440
|
+
function ot({ lines: e = [], subtotal: t, tax: n, discount: a, total: c, onOpenQuote: u, onCreateLine: d, onSelectLine: f, onEditLine: p, onDeleteLine: h, renderLineActions: g, actions: _, footerSlot: y, empty: b, className: x, strings: S }) {
|
|
1441
|
+
let C = r(Ee, S), w = t !== void 0 || n !== void 0 || a !== void 0, T = d || u ? /* @__PURE__ */ H("div", {
|
|
1462
1442
|
className: "flex items-center gap-space-md",
|
|
1463
|
-
children: [!!
|
|
1443
|
+
children: [!!d && /* @__PURE__ */ V(s, {
|
|
1464
1444
|
type: "button",
|
|
1465
1445
|
tone: "secondary",
|
|
1466
1446
|
buttonStyle: "ghost",
|
|
1467
|
-
onClick:
|
|
1468
|
-
icon:
|
|
1469
|
-
children:
|
|
1470
|
-
}), !!u && /* @__PURE__ */
|
|
1447
|
+
onClick: d,
|
|
1448
|
+
icon: G,
|
|
1449
|
+
children: C.createLineLabel
|
|
1450
|
+
}), !!u && /* @__PURE__ */ V(s, {
|
|
1471
1451
|
type: "button",
|
|
1472
1452
|
tone: "secondary",
|
|
1473
1453
|
buttonStyle: "ghost",
|
|
1474
1454
|
onClick: u,
|
|
1475
|
-
|
|
1476
|
-
iconPosition: "right",
|
|
1477
|
-
children: O.actionLabel
|
|
1455
|
+
children: C.actionLabel
|
|
1478
1456
|
})]
|
|
1479
1457
|
}) : void 0;
|
|
1480
|
-
return /* @__PURE__ */
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
headerAction: k,
|
|
1458
|
+
return /* @__PURE__ */ V(E, {
|
|
1459
|
+
title: C.title,
|
|
1460
|
+
description: C.description,
|
|
1461
|
+
actions: _,
|
|
1462
|
+
headerAction: T,
|
|
1486
1463
|
footerSlot: y,
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1464
|
+
className: i("product-quote-preview-card--component w-full", x),
|
|
1465
|
+
children: e.length === 0 ? b ?? /* @__PURE__ */ V($, {
|
|
1466
|
+
title: C.emptyTitle,
|
|
1467
|
+
description: C.emptyDescription,
|
|
1468
|
+
action: d ? /* @__PURE__ */ V(s, {
|
|
1469
|
+
tone: "primary",
|
|
1493
1470
|
type: "button",
|
|
1494
|
-
onClick:
|
|
1495
|
-
icon:
|
|
1496
|
-
children:
|
|
1471
|
+
onClick: d,
|
|
1472
|
+
icon: G,
|
|
1473
|
+
children: C.createLineLabel
|
|
1497
1474
|
}) : void 0
|
|
1498
|
-
}) : /* @__PURE__ */
|
|
1499
|
-
gap: "
|
|
1500
|
-
|
|
1501
|
-
|
|
1475
|
+
}) : /* @__PURE__ */ H(l, {
|
|
1476
|
+
gap: "2xl",
|
|
1477
|
+
className: "product-quote-preview-card--body",
|
|
1478
|
+
children: [/* @__PURE__ */ V(M, { children: e.map((e, t) => {
|
|
1479
|
+
let n = f ? () => f(e) : void 0, r = p ? () => p(e) : void 0, i = h ? () => h(e) : void 0, a = [
|
|
1502
1480
|
...n ? [{
|
|
1503
1481
|
id: "open",
|
|
1504
|
-
label:
|
|
1505
|
-
icon: /* @__PURE__ */
|
|
1482
|
+
label: C.viewLineLabel,
|
|
1483
|
+
icon: /* @__PURE__ */ V(he, { className: "size-icon-md" }),
|
|
1506
1484
|
onClick: () => n(),
|
|
1507
1485
|
tone: "secondary",
|
|
1508
1486
|
buttonStyle: "ghost"
|
|
1509
1487
|
}] : [],
|
|
1510
1488
|
...r ? [{
|
|
1511
1489
|
id: "edit",
|
|
1512
|
-
label:
|
|
1513
|
-
icon: /* @__PURE__ */
|
|
1490
|
+
label: C.editLineLabel,
|
|
1491
|
+
icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
|
|
1514
1492
|
onClick: () => r(),
|
|
1515
1493
|
tone: "secondary",
|
|
1516
1494
|
buttonStyle: "ghost"
|
|
1517
1495
|
}] : [],
|
|
1518
1496
|
...i ? [{
|
|
1519
1497
|
id: "delete",
|
|
1520
|
-
label:
|
|
1521
|
-
icon: /* @__PURE__ */
|
|
1498
|
+
label: C.deleteLineLabel,
|
|
1499
|
+
icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
|
|
1522
1500
|
onClick: () => i(),
|
|
1523
1501
|
tone: "destructive"
|
|
1524
1502
|
}] : []
|
|
@@ -1527,321 +1505,315 @@ function at({ lines: e = [], subtotal: a, tax: o, discount: c, total: l, onOpenQ
|
|
|
1527
1505
|
onSelect: n,
|
|
1528
1506
|
onEdit: r,
|
|
1529
1507
|
onDelete: i
|
|
1530
|
-
}) : /* @__PURE__ */
|
|
1508
|
+
}) : /* @__PURE__ */ V(ze, {
|
|
1531
1509
|
item: e,
|
|
1532
1510
|
actions: a,
|
|
1533
|
-
menuLabel:
|
|
1511
|
+
menuLabel: C.lineActionsLabel
|
|
1534
1512
|
});
|
|
1535
|
-
return /* @__PURE__ */
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
/* @__PURE__ */
|
|
1540
|
-
!!e.
|
|
1541
|
-
|
|
1542
|
-
] }), /* @__PURE__ */ R(C, { children: [/* @__PURE__ */ L(d, {
|
|
1543
|
-
weight: "semibold",
|
|
1513
|
+
return /* @__PURE__ */ H(P, {
|
|
1514
|
+
className: "product-quote-preview-card--line",
|
|
1515
|
+
children: [/* @__PURE__ */ H(N, { children: [
|
|
1516
|
+
/* @__PURE__ */ V(F, { children: e.label }),
|
|
1517
|
+
!!e.description && /* @__PURE__ */ V(A, { children: e.description }),
|
|
1518
|
+
!!e.quantity && /* @__PURE__ */ V(A, { children: e.quantity })
|
|
1519
|
+
] }), /* @__PURE__ */ H(j, { children: [/* @__PURE__ */ V(m, {
|
|
1544
1520
|
className: "tabular-nums",
|
|
1545
1521
|
children: e.amount
|
|
1546
1522
|
}), o] })]
|
|
1547
1523
|
}, e.id);
|
|
1548
|
-
}) }), /* @__PURE__ */
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
label: O.taxLabel,
|
|
1560
|
-
value: o,
|
|
1561
|
-
mono: !0
|
|
1562
|
-
}),
|
|
1563
|
-
c !== void 0 && /* @__PURE__ */ L(N, {
|
|
1564
|
-
label: O.discountLabel,
|
|
1565
|
-
value: c,
|
|
1566
|
-
mono: !0,
|
|
1567
|
-
valueClassName: "text-success"
|
|
1568
|
-
}),
|
|
1569
|
-
/* @__PURE__ */ L(N, {
|
|
1570
|
-
label: /* @__PURE__ */ L(i, {
|
|
1571
|
-
tag: "span",
|
|
1572
|
-
weight: "semibold",
|
|
1573
|
-
lineHeight: "tight",
|
|
1574
|
-
children: O.totalLabel
|
|
1524
|
+
}) }), /* @__PURE__ */ H(l, {
|
|
1525
|
+
gap: "lg",
|
|
1526
|
+
className: "product-quote-preview-card--totals",
|
|
1527
|
+
children: [
|
|
1528
|
+
!!w && /* @__PURE__ */ H(l, {
|
|
1529
|
+
gap: "sm",
|
|
1530
|
+
children: [
|
|
1531
|
+
t !== void 0 && /* @__PURE__ */ V(ae, {
|
|
1532
|
+
label: C.subtotalLabel,
|
|
1533
|
+
value: t,
|
|
1534
|
+
valueClassName: "tabular-nums"
|
|
1575
1535
|
}),
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1536
|
+
n !== void 0 && /* @__PURE__ */ V(ae, {
|
|
1537
|
+
label: C.taxLabel,
|
|
1538
|
+
value: n,
|
|
1539
|
+
valueClassName: "tabular-nums"
|
|
1540
|
+
}),
|
|
1541
|
+
a !== void 0 && /* @__PURE__ */ V(ae, {
|
|
1542
|
+
label: C.discountLabel,
|
|
1543
|
+
value: a,
|
|
1544
|
+
valueClassName: "tabular-nums text-success"
|
|
1545
|
+
})
|
|
1546
|
+
]
|
|
1547
|
+
}),
|
|
1548
|
+
!!w && /* @__PURE__ */ V(v, {}),
|
|
1549
|
+
/* @__PURE__ */ V(ae, {
|
|
1550
|
+
label: /* @__PURE__ */ V(o, {
|
|
1551
|
+
tag: "span",
|
|
1552
|
+
weight: "semibold",
|
|
1553
|
+
lineHeight: "tight",
|
|
1554
|
+
children: C.totalLabel
|
|
1555
|
+
}),
|
|
1556
|
+
value: c ?? "-",
|
|
1557
|
+
valueClassName: "font-semibold tabular-nums"
|
|
1558
|
+
})
|
|
1559
|
+
]
|
|
1582
1560
|
})]
|
|
1583
1561
|
})
|
|
1584
1562
|
});
|
|
1585
1563
|
}
|
|
1586
|
-
|
|
1564
|
+
ot.displayName = "ProductQuotePreviewCard";
|
|
1587
1565
|
//#endregion
|
|
1588
1566
|
//#region src/components/features/products/components/product-readiness-card.tsx
|
|
1589
|
-
function
|
|
1590
|
-
let S =
|
|
1567
|
+
function st({ items: e = [], score: t, scoreLabel: n, summary: a, onCreateReadinessItem: c, onSelectReadinessItem: u, onEditReadinessItem: f, onDeleteReadinessItem: p, renderReadinessItemActions: m, actions: h, footerSlot: _, renderItem: v, empty: y, className: b, strings: x }) {
|
|
1568
|
+
let S = r(J, x), C = t === void 0 ? void 0 : Ie(t), w = c ? /* @__PURE__ */ V(s, {
|
|
1591
1569
|
type: "button",
|
|
1592
1570
|
tone: "secondary",
|
|
1593
1571
|
buttonStyle: "ghost",
|
|
1594
|
-
onClick:
|
|
1595
|
-
icon:
|
|
1572
|
+
onClick: c,
|
|
1573
|
+
icon: G,
|
|
1596
1574
|
children: S.createLabel
|
|
1597
1575
|
}) : void 0;
|
|
1598
|
-
return /* @__PURE__ */
|
|
1599
|
-
icon: /* @__PURE__ */ L(z, { className: "size-icon" }),
|
|
1576
|
+
return /* @__PURE__ */ H(E, {
|
|
1600
1577
|
title: S.title,
|
|
1601
1578
|
description: S.description,
|
|
1602
|
-
actions:
|
|
1603
|
-
headerAction:
|
|
1604
|
-
footerSlot:
|
|
1605
|
-
|
|
1606
|
-
className:
|
|
1607
|
-
children: [
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1579
|
+
actions: h,
|
|
1580
|
+
headerAction: w,
|
|
1581
|
+
footerSlot: _,
|
|
1582
|
+
contentGap: "2xl",
|
|
1583
|
+
className: i("product-readiness-card--component w-full", b),
|
|
1584
|
+
children: [(C !== void 0 || !!a) && /* @__PURE__ */ H(l, {
|
|
1585
|
+
gap: "lg",
|
|
1586
|
+
className: "product-readiness-card--summary",
|
|
1587
|
+
children: [C !== void 0 && /* @__PURE__ */ H(l, {
|
|
1588
|
+
gap: "sm",
|
|
1589
|
+
className: "product-readiness-card--score",
|
|
1590
|
+
children: [/* @__PURE__ */ H(l, {
|
|
1611
1591
|
direction: "horizontal",
|
|
1612
|
-
align: "center",
|
|
1613
1592
|
justify: "between",
|
|
1614
1593
|
gap: "lg",
|
|
1615
|
-
|
|
1616
|
-
children: [/* @__PURE__ */ L(i, {
|
|
1594
|
+
children: [/* @__PURE__ */ V(o, {
|
|
1617
1595
|
size: "xs",
|
|
1618
1596
|
type: "secondary",
|
|
1619
|
-
children:
|
|
1620
|
-
}), /* @__PURE__ */
|
|
1597
|
+
children: n ?? S.scoreLabel
|
|
1598
|
+
}), /* @__PURE__ */ V(g, {
|
|
1621
1599
|
value: C,
|
|
1622
1600
|
scaled: !0,
|
|
1623
1601
|
size: "xs",
|
|
1624
1602
|
weight: "semibold"
|
|
1625
1603
|
})]
|
|
1626
|
-
}), /* @__PURE__ */
|
|
1604
|
+
}), /* @__PURE__ */ V(d, {
|
|
1627
1605
|
value: C,
|
|
1628
|
-
"aria-label": typeof
|
|
1606
|
+
"aria-label": typeof n == "string" ? n : S.progressLabel,
|
|
1629
1607
|
"aria-valuetext": `${C}%`,
|
|
1630
1608
|
className: "h-1.5"
|
|
1631
1609
|
})]
|
|
1632
|
-
}),
|
|
1633
|
-
!!l && /* @__PURE__ */ L(i, {
|
|
1610
|
+
}), !!a && /* @__PURE__ */ V(o, {
|
|
1634
1611
|
type: "secondary",
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
]
|
|
1612
|
+
children: a
|
|
1613
|
+
})]
|
|
1614
|
+
}), e.length === 0 ? y ?? /* @__PURE__ */ V($, {
|
|
1615
|
+
title: S.emptyTitle,
|
|
1616
|
+
description: S.emptyDescription,
|
|
1617
|
+
action: c ? /* @__PURE__ */ V(s, {
|
|
1618
|
+
tone: "primary",
|
|
1619
|
+
type: "button",
|
|
1620
|
+
onClick: c,
|
|
1621
|
+
icon: G,
|
|
1622
|
+
children: S.createLabel
|
|
1623
|
+
}) : void 0
|
|
1624
|
+
}) : /* @__PURE__ */ V(M, { children: e.map((e, t) => {
|
|
1625
|
+
let n = u ? () => u(e) : void 0, r = f ? () => f(e) : void 0, i = p ? () => p(e) : void 0, a = [...r ? [{
|
|
1626
|
+
id: "edit",
|
|
1627
|
+
label: S.editLabel,
|
|
1628
|
+
icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
|
|
1629
|
+
onClick: () => r(),
|
|
1630
|
+
tone: "secondary",
|
|
1631
|
+
buttonStyle: "ghost"
|
|
1632
|
+
}] : [], ...i ? [{
|
|
1633
|
+
id: "delete",
|
|
1634
|
+
label: S.deleteLabel,
|
|
1635
|
+
icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
|
|
1636
|
+
onClick: () => i(),
|
|
1637
|
+
tone: "destructive"
|
|
1638
|
+
}] : []], o = m ? m(e, {
|
|
1639
|
+
index: t,
|
|
1640
|
+
onSelect: n,
|
|
1641
|
+
onEdit: r,
|
|
1642
|
+
onDelete: i
|
|
1643
|
+
}) : /* @__PURE__ */ V(ze, {
|
|
1644
|
+
item: e,
|
|
1645
|
+
actions: a,
|
|
1646
|
+
menuLabel: S.actionsLabel
|
|
1647
|
+
});
|
|
1648
|
+
return v ? /* @__PURE__ */ V("div", { children: v(e, t) }, e.id) : /* @__PURE__ */ V(Ke, {
|
|
1649
|
+
item: e,
|
|
1650
|
+
actionFallback: S.actionLabel,
|
|
1651
|
+
onSelect: n,
|
|
1652
|
+
actions: o
|
|
1653
|
+
}, e.id);
|
|
1654
|
+
}) })]
|
|
1679
1655
|
});
|
|
1680
1656
|
}
|
|
1681
|
-
|
|
1657
|
+
st.displayName = "ProductReadinessCard";
|
|
1682
1658
|
//#endregion
|
|
1683
1659
|
//#region src/components/features/products/components/product-structure-card.tsx
|
|
1684
|
-
function
|
|
1685
|
-
let m =
|
|
1660
|
+
function ct({ metrics: e = [], onCreateMetric: t, onSelectMetric: n, onEditMetric: a, onDeleteMetric: o, renderMetricActions: c, actions: l, footerSlot: u, empty: d, className: f, strings: p }) {
|
|
1661
|
+
let m = r(Y, p), h = t ? /* @__PURE__ */ V(s, {
|
|
1686
1662
|
type: "button",
|
|
1687
1663
|
tone: "secondary",
|
|
1688
1664
|
buttonStyle: "ghost",
|
|
1689
|
-
onClick:
|
|
1690
|
-
icon:
|
|
1665
|
+
onClick: t,
|
|
1666
|
+
icon: G,
|
|
1691
1667
|
children: m.createLabel
|
|
1692
1668
|
}) : void 0;
|
|
1693
|
-
return /* @__PURE__ */
|
|
1694
|
-
icon: /* @__PURE__ */ L(ge, { className: "size-icon" }),
|
|
1669
|
+
return /* @__PURE__ */ V(E, {
|
|
1695
1670
|
title: m.title,
|
|
1696
1671
|
description: m.description,
|
|
1697
1672
|
actions: l,
|
|
1698
1673
|
headerAction: h,
|
|
1699
1674
|
footerSlot: u,
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
children: e.length === 0 ? d ?? /* @__PURE__ */ L($, {
|
|
1675
|
+
className: i("product-structure-card--component w-full", f),
|
|
1676
|
+
children: e.length === 0 ? d ?? /* @__PURE__ */ V($, {
|
|
1703
1677
|
title: m.emptyTitle,
|
|
1704
1678
|
description: m.emptyDescription,
|
|
1705
|
-
action:
|
|
1679
|
+
action: t ? /* @__PURE__ */ V(s, {
|
|
1680
|
+
tone: "primary",
|
|
1706
1681
|
type: "button",
|
|
1707
|
-
onClick:
|
|
1708
|
-
icon:
|
|
1682
|
+
onClick: t,
|
|
1683
|
+
icon: G,
|
|
1709
1684
|
children: m.createLabel
|
|
1710
1685
|
}) : void 0
|
|
1711
|
-
}) : /* @__PURE__ */
|
|
1712
|
-
let
|
|
1713
|
-
...
|
|
1686
|
+
}) : /* @__PURE__ */ V(M, { children: e.map((e, t) => {
|
|
1687
|
+
let r = n ? () => n(e) : void 0, i = a ? () => a(e) : void 0, s = o ? () => o(e) : void 0, l = [
|
|
1688
|
+
...r ? [{
|
|
1714
1689
|
id: "open",
|
|
1715
1690
|
label: m.viewLabel,
|
|
1716
|
-
icon: /* @__PURE__ */
|
|
1717
|
-
onClick: () =>
|
|
1691
|
+
icon: /* @__PURE__ */ V(he, { className: "size-icon-md" }),
|
|
1692
|
+
onClick: () => r(),
|
|
1718
1693
|
tone: "secondary",
|
|
1719
1694
|
buttonStyle: "ghost"
|
|
1720
1695
|
}] : [],
|
|
1721
|
-
...
|
|
1696
|
+
...i ? [{
|
|
1722
1697
|
id: "edit",
|
|
1723
1698
|
label: m.editLabel,
|
|
1724
|
-
icon: /* @__PURE__ */
|
|
1725
|
-
onClick: () =>
|
|
1699
|
+
icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
|
|
1700
|
+
onClick: () => i(),
|
|
1726
1701
|
tone: "secondary",
|
|
1727
1702
|
buttonStyle: "ghost"
|
|
1728
1703
|
}] : [],
|
|
1729
|
-
...
|
|
1704
|
+
...s ? [{
|
|
1730
1705
|
id: "delete",
|
|
1731
1706
|
label: m.deleteLabel,
|
|
1732
|
-
icon: /* @__PURE__ */
|
|
1733
|
-
onClick: () =>
|
|
1707
|
+
icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
|
|
1708
|
+
onClick: () => s(),
|
|
1734
1709
|
tone: "destructive"
|
|
1735
1710
|
}] : []
|
|
1736
1711
|
], u = c ? c(e, {
|
|
1737
1712
|
index: t,
|
|
1738
|
-
onSelect:
|
|
1739
|
-
onEdit:
|
|
1740
|
-
onDelete:
|
|
1741
|
-
}) : /* @__PURE__ */
|
|
1713
|
+
onSelect: r,
|
|
1714
|
+
onEdit: i,
|
|
1715
|
+
onDelete: s
|
|
1716
|
+
}) : /* @__PURE__ */ V(ze, {
|
|
1742
1717
|
item: e,
|
|
1743
1718
|
actions: l,
|
|
1744
1719
|
menuLabel: m.actionsLabel
|
|
1745
1720
|
});
|
|
1746
|
-
return /* @__PURE__ */
|
|
1721
|
+
return /* @__PURE__ */ V(Ge, {
|
|
1747
1722
|
metric: e,
|
|
1748
1723
|
actions: u
|
|
1749
1724
|
}, e.id);
|
|
1750
1725
|
}) })
|
|
1751
1726
|
});
|
|
1752
1727
|
}
|
|
1753
|
-
|
|
1728
|
+
ct.displayName = "ProductStructureCard";
|
|
1754
1729
|
//#endregion
|
|
1755
1730
|
//#region src/components/features/products/components/product-variants-table.tsx
|
|
1756
|
-
function
|
|
1757
|
-
return /* @__PURE__ */
|
|
1731
|
+
function lt({ variant: e, channelsLabel: t }) {
|
|
1732
|
+
return /* @__PURE__ */ H(l, {
|
|
1733
|
+
gap: "xs",
|
|
1758
1734
|
className: "product-variants-table--variant-cell min-w-0",
|
|
1759
|
-
children: [
|
|
1760
|
-
|
|
1735
|
+
children: [/* @__PURE__ */ H(l, {
|
|
1736
|
+
gap: "dense",
|
|
1737
|
+
children: [/* @__PURE__ */ H(l, {
|
|
1761
1738
|
direction: "horizontal",
|
|
1762
1739
|
gap: "sm",
|
|
1763
|
-
children: [/* @__PURE__ */
|
|
1740
|
+
children: [/* @__PURE__ */ V(o, {
|
|
1764
1741
|
weight: "semibold",
|
|
1765
1742
|
className: "truncate",
|
|
1766
1743
|
children: e.name
|
|
1767
|
-
}), !!e.status && /* @__PURE__ */
|
|
1744
|
+
}), !!e.status && /* @__PURE__ */ V(_, {
|
|
1768
1745
|
tone: e.statusTone ?? "secondary",
|
|
1769
1746
|
children: e.status
|
|
1770
1747
|
})]
|
|
1771
|
-
}),
|
|
1772
|
-
!!e.description && /* @__PURE__ */ L(i, {
|
|
1748
|
+
}), !!e.description && /* @__PURE__ */ V(o, {
|
|
1773
1749
|
size: "xs",
|
|
1774
1750
|
type: "secondary",
|
|
1775
|
-
className: "mt-space-2xs",
|
|
1776
1751
|
children: e.description
|
|
1777
|
-
})
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
})]
|
|
1796
|
-
})
|
|
1797
|
-
]
|
|
1752
|
+
})]
|
|
1753
|
+
}), !!(e.options?.length || e.channels) && /* @__PURE__ */ H(l, {
|
|
1754
|
+
direction: "horizontal",
|
|
1755
|
+
gap: "xs",
|
|
1756
|
+
children: [e.options?.map((e, t) => /* @__PURE__ */ V(_, {
|
|
1757
|
+
tone: "secondary",
|
|
1758
|
+
children: e
|
|
1759
|
+
}, t)), !!e.channels && /* @__PURE__ */ H(o, {
|
|
1760
|
+
tag: "span",
|
|
1761
|
+
size: "xs",
|
|
1762
|
+
type: "secondary",
|
|
1763
|
+
children: [
|
|
1764
|
+
t,
|
|
1765
|
+
": ",
|
|
1766
|
+
e.channels
|
|
1767
|
+
]
|
|
1768
|
+
})]
|
|
1769
|
+
})]
|
|
1798
1770
|
});
|
|
1799
1771
|
}
|
|
1800
|
-
function
|
|
1801
|
-
return /* @__PURE__ */
|
|
1772
|
+
function ut({ value: e, emphasis: t = !1 }) {
|
|
1773
|
+
return /* @__PURE__ */ V(e ? m : h, {
|
|
1802
1774
|
weight: t ? "semibold" : void 0,
|
|
1803
1775
|
className: "min-w-0 tabular-nums",
|
|
1804
1776
|
children: e ?? "-"
|
|
1805
1777
|
});
|
|
1806
1778
|
}
|
|
1807
|
-
function
|
|
1808
|
-
let h =
|
|
1779
|
+
function dt({ variants: e = [], onCreateVariant: t, onSelectVariant: n, onEditVariant: a, onDuplicateVariant: o, onDeleteVariant: c, renderVariantActions: l, actions: u, footerSlot: d, empty: f, className: p, strings: m }) {
|
|
1780
|
+
let h = r(Z, m), g = B(() => {
|
|
1809
1781
|
if (l) return;
|
|
1810
1782
|
let e = [
|
|
1811
|
-
...
|
|
1783
|
+
...n ? [{
|
|
1812
1784
|
id: "open",
|
|
1813
1785
|
label: h.viewLabel,
|
|
1814
|
-
icon: /* @__PURE__ */
|
|
1786
|
+
icon: /* @__PURE__ */ V(he, {
|
|
1815
1787
|
className: "size-icon-sm",
|
|
1816
1788
|
"aria-hidden": "true"
|
|
1817
1789
|
}),
|
|
1818
|
-
onClick:
|
|
1790
|
+
onClick: n,
|
|
1819
1791
|
buttonStyle: "ghost"
|
|
1820
1792
|
}] : [],
|
|
1821
|
-
...
|
|
1793
|
+
...a ? [{
|
|
1822
1794
|
id: "edit",
|
|
1823
1795
|
label: h.editLabel,
|
|
1824
|
-
icon: /* @__PURE__ */
|
|
1796
|
+
icon: /* @__PURE__ */ V(W, {
|
|
1825
1797
|
className: "size-icon-sm",
|
|
1826
1798
|
"aria-hidden": "true"
|
|
1827
1799
|
}),
|
|
1828
|
-
onClick:
|
|
1800
|
+
onClick: a,
|
|
1829
1801
|
buttonStyle: "ghost"
|
|
1830
1802
|
}] : [],
|
|
1831
|
-
...
|
|
1803
|
+
...o ? [{
|
|
1832
1804
|
id: "duplicate",
|
|
1833
1805
|
label: h.duplicateLabel,
|
|
1834
|
-
icon: /* @__PURE__ */
|
|
1806
|
+
icon: /* @__PURE__ */ V(me, {
|
|
1835
1807
|
className: "size-icon-sm",
|
|
1836
1808
|
"aria-hidden": "true"
|
|
1837
1809
|
}),
|
|
1838
|
-
onClick:
|
|
1810
|
+
onClick: o,
|
|
1839
1811
|
buttonStyle: "ghost"
|
|
1840
1812
|
}] : [],
|
|
1841
1813
|
...c ? [{
|
|
1842
1814
|
id: "delete",
|
|
1843
1815
|
label: h.deleteLabel,
|
|
1844
|
-
icon: /* @__PURE__ */
|
|
1816
|
+
icon: /* @__PURE__ */ V(q, {
|
|
1845
1817
|
className: "size-icon-sm",
|
|
1846
1818
|
"aria-hidden": "true"
|
|
1847
1819
|
}),
|
|
@@ -1852,20 +1824,20 @@ function ut({ variants: e = [], onCreateVariant: i, onSelectVariant: a, onEditVa
|
|
|
1852
1824
|
return e.length > 0 ? e : void 0;
|
|
1853
1825
|
}, [
|
|
1854
1826
|
c,
|
|
1855
|
-
s,
|
|
1856
1827
|
o,
|
|
1857
1828
|
a,
|
|
1829
|
+
n,
|
|
1858
1830
|
l,
|
|
1859
1831
|
h.deleteLabel,
|
|
1860
1832
|
h.duplicateLabel,
|
|
1861
1833
|
h.editLabel,
|
|
1862
1834
|
h.viewLabel
|
|
1863
|
-
]),
|
|
1835
|
+
]), _ = B(() => {
|
|
1864
1836
|
let e = [
|
|
1865
1837
|
{
|
|
1866
1838
|
accessorKey: "name",
|
|
1867
1839
|
header: h.headers.variant,
|
|
1868
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
1840
|
+
cell: ({ row: e }) => /* @__PURE__ */ V(lt, {
|
|
1869
1841
|
variant: e.original,
|
|
1870
1842
|
channelsLabel: h.headers.channels
|
|
1871
1843
|
})
|
|
@@ -1873,7 +1845,7 @@ function ut({ variants: e = [], onCreateVariant: i, onSelectVariant: a, onEditVa
|
|
|
1873
1845
|
{
|
|
1874
1846
|
accessorKey: "price",
|
|
1875
1847
|
header: h.headers.price,
|
|
1876
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
1848
|
+
cell: ({ row: e }) => /* @__PURE__ */ V(ut, {
|
|
1877
1849
|
value: e.original.price,
|
|
1878
1850
|
emphasis: !0
|
|
1879
1851
|
}),
|
|
@@ -1882,17 +1854,17 @@ function ut({ variants: e = [], onCreateVariant: i, onSelectVariant: a, onEditVa
|
|
|
1882
1854
|
{
|
|
1883
1855
|
accessorKey: "inventory",
|
|
1884
1856
|
header: h.headers.inventory,
|
|
1885
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
1857
|
+
cell: ({ row: e }) => /* @__PURE__ */ V(ut, { value: e.original.inventory })
|
|
1886
1858
|
},
|
|
1887
1859
|
{
|
|
1888
1860
|
accessorKey: "sku",
|
|
1889
1861
|
header: h.headers.sku,
|
|
1890
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
1862
|
+
cell: ({ row: e }) => /* @__PURE__ */ V(ut, { value: e.original.sku })
|
|
1891
1863
|
},
|
|
1892
1864
|
{
|
|
1893
1865
|
accessorKey: "updatedAt",
|
|
1894
1866
|
header: h.headers.updated,
|
|
1895
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
1867
|
+
cell: ({ row: e }) => /* @__PURE__ */ V(ut, { value: e.original.updatedAt })
|
|
1896
1868
|
}
|
|
1897
1869
|
];
|
|
1898
1870
|
return l && e.push({
|
|
@@ -1900,18 +1872,18 @@ function ut({ variants: e = [], onCreateVariant: i, onSelectVariant: a, onEditVa
|
|
|
1900
1872
|
header: h.headers.actions,
|
|
1901
1873
|
cell: ({ row: e }) => l(e.original, {
|
|
1902
1874
|
index: e.index,
|
|
1903
|
-
onSelect:
|
|
1904
|
-
onEdit:
|
|
1905
|
-
onDuplicate:
|
|
1875
|
+
onSelect: n ? () => n(e.original) : void 0,
|
|
1876
|
+
onEdit: a ? () => a(e.original) : void 0,
|
|
1877
|
+
onDuplicate: o ? () => o(e.original) : void 0,
|
|
1906
1878
|
onDelete: c ? () => c(e.original) : void 0
|
|
1907
1879
|
}),
|
|
1908
1880
|
meta: { align: "end" }
|
|
1909
1881
|
}), e;
|
|
1910
1882
|
}, [
|
|
1911
1883
|
c,
|
|
1912
|
-
s,
|
|
1913
1884
|
o,
|
|
1914
1885
|
a,
|
|
1886
|
+
n,
|
|
1915
1887
|
l,
|
|
1916
1888
|
h.headers.actions,
|
|
1917
1889
|
h.headers.channels,
|
|
@@ -1920,35 +1892,34 @@ function ut({ variants: e = [], onCreateVariant: i, onSelectVariant: a, onEditVa
|
|
|
1920
1892
|
h.headers.sku,
|
|
1921
1893
|
h.headers.updated,
|
|
1922
1894
|
h.headers.variant
|
|
1923
|
-
]),
|
|
1895
|
+
]), v = t ? /* @__PURE__ */ V(s, {
|
|
1924
1896
|
type: "button",
|
|
1925
1897
|
tone: "secondary",
|
|
1926
1898
|
buttonStyle: "ghost",
|
|
1927
|
-
onClick:
|
|
1928
|
-
icon:
|
|
1899
|
+
onClick: t,
|
|
1900
|
+
icon: G,
|
|
1929
1901
|
children: h.createLabel
|
|
1930
1902
|
}) : void 0;
|
|
1931
|
-
return /* @__PURE__ */
|
|
1932
|
-
icon: /* @__PURE__ */ L(_e, { className: "size-icon" }),
|
|
1903
|
+
return /* @__PURE__ */ V(E, {
|
|
1933
1904
|
title: h.title,
|
|
1934
1905
|
description: h.description,
|
|
1935
1906
|
actions: u,
|
|
1936
|
-
headerAction:
|
|
1907
|
+
headerAction: v,
|
|
1937
1908
|
footerSlot: d,
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
children: e.length === 0 ? f ?? /* @__PURE__ */ L($, {
|
|
1909
|
+
className: i("product-variants-table--component w-full", p),
|
|
1910
|
+
children: e.length === 0 ? f ?? /* @__PURE__ */ V($, {
|
|
1941
1911
|
title: h.emptyTitle,
|
|
1942
1912
|
description: h.emptyDescription,
|
|
1943
|
-
action:
|
|
1913
|
+
action: t ? /* @__PURE__ */ V(s, {
|
|
1914
|
+
tone: "primary",
|
|
1944
1915
|
type: "button",
|
|
1945
|
-
onClick:
|
|
1946
|
-
icon:
|
|
1916
|
+
onClick: t,
|
|
1917
|
+
icon: G,
|
|
1947
1918
|
children: h.createLabel
|
|
1948
1919
|
}) : void 0
|
|
1949
|
-
}) : /* @__PURE__ */
|
|
1920
|
+
}) : /* @__PURE__ */ V(ce, {
|
|
1950
1921
|
data: e,
|
|
1951
|
-
columns:
|
|
1922
|
+
columns: _,
|
|
1952
1923
|
getRowId: (e) => e.id,
|
|
1953
1924
|
enableColumnVisibility: !0,
|
|
1954
1925
|
surface: "glass",
|
|
@@ -1963,43 +1934,43 @@ function ut({ variants: e = [], onCreateVariant: i, onSelectVariant: a, onEditVa
|
|
|
1963
1934
|
})
|
|
1964
1935
|
});
|
|
1965
1936
|
}
|
|
1966
|
-
|
|
1937
|
+
dt.displayName = "ProductVariantsTable";
|
|
1967
1938
|
//#endregion
|
|
1968
1939
|
//#region src/components/features/products/components/product-overview.tsx
|
|
1969
|
-
function
|
|
1970
|
-
let _ =
|
|
1971
|
-
return /* @__PURE__ */
|
|
1972
|
-
gap: "
|
|
1973
|
-
className:
|
|
1940
|
+
function ft({ details: e, contract: t, options: n, variants: a, readiness: o, structure: s, operations: c, quote: u, policies: d, slots: f, className: p, mainClassName: m, railClassName: h, strings: g }) {
|
|
1941
|
+
let _ = r(je, g), v = !!(o || s || c || u || d || f?.railTop || f?.railBottom);
|
|
1942
|
+
return /* @__PURE__ */ H(l, {
|
|
1943
|
+
gap: "3xl",
|
|
1944
|
+
className: i("product-overview--component @container/product-overview", p),
|
|
1974
1945
|
children: [
|
|
1975
1946
|
f?.before,
|
|
1976
|
-
/* @__PURE__ */
|
|
1977
|
-
className:
|
|
1978
|
-
children: [/* @__PURE__ */
|
|
1979
|
-
render: /* @__PURE__ */
|
|
1980
|
-
gap: "
|
|
1947
|
+
/* @__PURE__ */ H("div", {
|
|
1948
|
+
className: i("grid min-w-0 grid-cols-1 gap-space-3xl", v && "@5xl/product-overview:grid-cols-[minmax(0,1fr)_22rem]"),
|
|
1949
|
+
children: [/* @__PURE__ */ H(l, {
|
|
1950
|
+
render: /* @__PURE__ */ V("section", {}),
|
|
1951
|
+
gap: "3xl",
|
|
1981
1952
|
"aria-label": _.mainLabel,
|
|
1982
|
-
className:
|
|
1953
|
+
className: i("product-overview--main", m),
|
|
1983
1954
|
children: [
|
|
1984
1955
|
f?.mainTop,
|
|
1985
|
-
!!e && /* @__PURE__ */
|
|
1986
|
-
!!
|
|
1987
|
-
!!
|
|
1988
|
-
!!a && /* @__PURE__ */
|
|
1956
|
+
!!e && /* @__PURE__ */ V(Xe, { ...e }),
|
|
1957
|
+
!!t && /* @__PURE__ */ V(Ye, { ...t }),
|
|
1958
|
+
!!n && /* @__PURE__ */ V(it, { ...n }),
|
|
1959
|
+
!!a && /* @__PURE__ */ V(dt, { ...a }),
|
|
1989
1960
|
f?.mainBottom
|
|
1990
1961
|
]
|
|
1991
|
-
}), !!v && /* @__PURE__ */
|
|
1992
|
-
render: /* @__PURE__ */
|
|
1993
|
-
gap: "
|
|
1962
|
+
}), !!v && /* @__PURE__ */ H(l, {
|
|
1963
|
+
render: /* @__PURE__ */ V("aside", {}),
|
|
1964
|
+
gap: "3xl",
|
|
1994
1965
|
"aria-label": _.railLabel,
|
|
1995
|
-
className:
|
|
1966
|
+
className: i("product-overview--rail", h),
|
|
1996
1967
|
children: [
|
|
1997
1968
|
f?.railTop,
|
|
1998
|
-
!!o && /* @__PURE__ */
|
|
1999
|
-
!!
|
|
2000
|
-
!!
|
|
2001
|
-
!!u && /* @__PURE__ */
|
|
2002
|
-
!!d && /* @__PURE__ */
|
|
1969
|
+
!!o && /* @__PURE__ */ V(st, { ...o }),
|
|
1970
|
+
!!s && /* @__PURE__ */ V(ct, { ...s }),
|
|
1971
|
+
!!c && /* @__PURE__ */ V(Qe, { ...c }),
|
|
1972
|
+
!!u && /* @__PURE__ */ V(ot, { ...u }),
|
|
1973
|
+
!!d && /* @__PURE__ */ V(at, { ...d }),
|
|
2003
1974
|
f?.railBottom
|
|
2004
1975
|
]
|
|
2005
1976
|
})]
|
|
@@ -2008,29 +1979,29 @@ function dt({ details: e, contract: r, options: i, variants: a, readiness: o, st
|
|
|
2008
1979
|
]
|
|
2009
1980
|
});
|
|
2010
1981
|
}
|
|
2011
|
-
|
|
1982
|
+
ft.displayName = "ProductOverview";
|
|
2012
1983
|
//#endregion
|
|
2013
1984
|
//#region src/components/features/products/components/product-variant-action-menu.tsx
|
|
2014
|
-
function
|
|
2015
|
-
let f =
|
|
2016
|
-
return p || m || h || g || c ? c ? /* @__PURE__ */
|
|
2017
|
-
className:
|
|
1985
|
+
function pt({ variant: e, index: t = 0, onSelectVariant: n, onEditVariant: a, onDuplicateVariant: o, onDeleteVariant: s, renderVariantActions: c, menuLabel: l, className: u, strings: d }) {
|
|
1986
|
+
let f = r(ke, d), p = n ? () => n(e) : void 0, m = a ? () => a(e) : void 0, h = o ? () => o(e) : void 0, g = s ? () => s(e) : void 0;
|
|
1987
|
+
return p || m || h || g || c ? c ? /* @__PURE__ */ V("div", {
|
|
1988
|
+
className: i("product-variant-action-menu--component flex justify-end", u),
|
|
2018
1989
|
children: c(e, {
|
|
2019
|
-
index:
|
|
1990
|
+
index: t,
|
|
2020
1991
|
onSelect: p,
|
|
2021
1992
|
onEdit: m,
|
|
2022
1993
|
onDuplicate: h,
|
|
2023
1994
|
onDelete: g
|
|
2024
1995
|
})
|
|
2025
|
-
}) : /* @__PURE__ */
|
|
1996
|
+
}) : /* @__PURE__ */ V(ze, {
|
|
2026
1997
|
item: e,
|
|
2027
1998
|
menuLabel: l ?? f.actionsLabel,
|
|
2028
|
-
className:
|
|
1999
|
+
className: i("product-variant-action-menu--component", u),
|
|
2029
2000
|
actions: [
|
|
2030
2001
|
...p ? [{
|
|
2031
2002
|
id: "open",
|
|
2032
2003
|
label: f.viewLabel,
|
|
2033
|
-
icon: /* @__PURE__ */
|
|
2004
|
+
icon: /* @__PURE__ */ V(he, { className: "size-icon-md" }),
|
|
2034
2005
|
onClick: () => p(),
|
|
2035
2006
|
tone: "secondary",
|
|
2036
2007
|
buttonStyle: "ghost"
|
|
@@ -2038,7 +2009,7 @@ function ft({ variant: e, index: r = 0, onSelectVariant: i, onEditVariant: a, on
|
|
|
2038
2009
|
...m ? [{
|
|
2039
2010
|
id: "edit",
|
|
2040
2011
|
label: f.editLabel,
|
|
2041
|
-
icon: /* @__PURE__ */
|
|
2012
|
+
icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
|
|
2042
2013
|
onClick: () => m(),
|
|
2043
2014
|
tone: "secondary",
|
|
2044
2015
|
buttonStyle: "ghost"
|
|
@@ -2046,7 +2017,7 @@ function ft({ variant: e, index: r = 0, onSelectVariant: i, onEditVariant: a, on
|
|
|
2046
2017
|
...h ? [{
|
|
2047
2018
|
id: "duplicate",
|
|
2048
2019
|
label: f.duplicateLabel,
|
|
2049
|
-
icon: /* @__PURE__ */
|
|
2020
|
+
icon: /* @__PURE__ */ V(me, { className: "size-icon-md" }),
|
|
2050
2021
|
onClick: () => h(),
|
|
2051
2022
|
tone: "secondary",
|
|
2052
2023
|
buttonStyle: "ghost"
|
|
@@ -2054,18 +2025,18 @@ function ft({ variant: e, index: r = 0, onSelectVariant: i, onEditVariant: a, on
|
|
|
2054
2025
|
...g ? [{
|
|
2055
2026
|
id: "delete",
|
|
2056
2027
|
label: f.deleteLabel,
|
|
2057
|
-
icon: /* @__PURE__ */
|
|
2028
|
+
icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
|
|
2058
2029
|
onClick: () => g(),
|
|
2059
2030
|
tone: "destructive"
|
|
2060
2031
|
}] : []
|
|
2061
2032
|
]
|
|
2062
2033
|
}) : null;
|
|
2063
2034
|
}
|
|
2064
|
-
|
|
2035
|
+
pt.displayName = "ProductVariantActionMenu";
|
|
2065
2036
|
//#endregion
|
|
2066
2037
|
//#region src/components/features/products/components/product-variant-details.tsx
|
|
2067
|
-
var
|
|
2068
|
-
function
|
|
2038
|
+
var mt = (e) => e != null && e !== !1 && e !== "";
|
|
2039
|
+
function ht(e, t) {
|
|
2069
2040
|
return [
|
|
2070
2041
|
{
|
|
2071
2042
|
label: t.price,
|
|
@@ -2087,19 +2058,19 @@ function mt(e, t) {
|
|
|
2087
2058
|
label: t.updated,
|
|
2088
2059
|
value: e.updatedAt
|
|
2089
2060
|
}
|
|
2090
|
-
].filter((e) =>
|
|
2061
|
+
].filter((e) => mt(e.value));
|
|
2091
2062
|
}
|
|
2092
|
-
function
|
|
2093
|
-
let
|
|
2063
|
+
function gt({ variant: e, metadata: t, optionItems: n = [], media: a, onBack: c, onSelectVariant: u, onEditVariant: d, onDuplicateVariant: f, onDeleteVariant: p, onSelectOption: m, actions: h, headerEnd: g, footerSlot: v, empty: y, renderActions: b, renderMetadata: x, renderOption: S, className: C, strings: w }) {
|
|
2064
|
+
let T = r(Q, w), D = e ? t ?? ht(e, T.metadata) : [], O = !!(e && (u || d || f || p || b)), k = /* @__PURE__ */ H("div", {
|
|
2094
2065
|
className: "product-variant-details--header-actions flex items-center gap-space-md",
|
|
2095
|
-
children: [!!
|
|
2066
|
+
children: [!!c && /* @__PURE__ */ V(s, {
|
|
2096
2067
|
type: "button",
|
|
2097
2068
|
tone: "secondary",
|
|
2098
2069
|
buttonStyle: "ghost",
|
|
2099
|
-
onClick:
|
|
2100
|
-
icon:
|
|
2101
|
-
children:
|
|
2102
|
-
}), !!O && e && /* @__PURE__ */
|
|
2070
|
+
onClick: c,
|
|
2071
|
+
icon: fe,
|
|
2072
|
+
children: T.backLabel
|
|
2073
|
+
}), !!O && e && /* @__PURE__ */ V(pt, {
|
|
2103
2074
|
variant: e,
|
|
2104
2075
|
onSelectVariant: u,
|
|
2105
2076
|
onEditVariant: d,
|
|
@@ -2107,183 +2078,185 @@ function ht({ variant: e, metadata: a, optionItems: o = [], media: c, onBack: l,
|
|
|
2107
2078
|
onDeleteVariant: p,
|
|
2108
2079
|
renderVariantActions: b
|
|
2109
2080
|
})]
|
|
2110
|
-
}),
|
|
2111
|
-
return /* @__PURE__ */
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
titleSuffix: e?.status ? /* @__PURE__ */ L(m, {
|
|
2081
|
+
}), A = e?.options ?? [];
|
|
2082
|
+
return /* @__PURE__ */ V(E, {
|
|
2083
|
+
title: e?.name ?? T.title,
|
|
2084
|
+
titleSuffix: e?.status ? /* @__PURE__ */ V(_, {
|
|
2115
2085
|
tone: e.statusTone ?? "secondary",
|
|
2116
2086
|
children: e.status
|
|
2117
2087
|
}) : void 0,
|
|
2118
|
-
description: e?.description ??
|
|
2119
|
-
actions:
|
|
2120
|
-
headerAction:
|
|
2121
|
-
headerEnd:
|
|
2122
|
-
footerSlot:
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
gap: "xl",
|
|
2088
|
+
description: e?.description ?? T.description,
|
|
2089
|
+
actions: h,
|
|
2090
|
+
headerAction: c || O ? k : void 0,
|
|
2091
|
+
headerEnd: g,
|
|
2092
|
+
footerSlot: v,
|
|
2093
|
+
className: i("product-variant-details--component w-full", C),
|
|
2094
|
+
children: e ? /* @__PURE__ */ H(l, {
|
|
2095
|
+
gap: "2xl",
|
|
2127
2096
|
className: "product-variant-details--body",
|
|
2128
2097
|
children: [
|
|
2129
|
-
!!
|
|
2130
|
-
className: "product-variant-details--media overflow-hidden rounded-
|
|
2131
|
-
children:
|
|
2098
|
+
!!a && /* @__PURE__ */ V("div", {
|
|
2099
|
+
className: "product-variant-details--media overflow-hidden rounded-inner border border-border bg-muted/30",
|
|
2100
|
+
children: a
|
|
2132
2101
|
}),
|
|
2133
|
-
x ? x(e) : /* @__PURE__ */
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2102
|
+
x ? x(e) : D.some(Boolean) && /* @__PURE__ */ H(l, {
|
|
2103
|
+
gap: "md",
|
|
2104
|
+
className: "product-variant-details--facts",
|
|
2105
|
+
children: [/* @__PURE__ */ V(o, {
|
|
2106
|
+
weight: "semibold",
|
|
2107
|
+
children: T.factsTitle
|
|
2108
|
+
}), /* @__PURE__ */ V(se, {
|
|
2109
|
+
items: D,
|
|
2110
|
+
columns: 3,
|
|
2111
|
+
density: "compact",
|
|
2112
|
+
className: "product-variant-details--metadata"
|
|
2113
|
+
})]
|
|
2139
2114
|
}),
|
|
2140
|
-
!!
|
|
2115
|
+
!!A.length && /* @__PURE__ */ H(l, {
|
|
2141
2116
|
gap: "md",
|
|
2142
2117
|
className: "product-variant-details--selected-options",
|
|
2143
|
-
children: [/* @__PURE__ */
|
|
2118
|
+
children: [/* @__PURE__ */ V(o, {
|
|
2144
2119
|
weight: "semibold",
|
|
2145
|
-
children:
|
|
2146
|
-
}), /* @__PURE__ */
|
|
2120
|
+
children: T.selectedOptionsTitle
|
|
2121
|
+
}), /* @__PURE__ */ V("div", {
|
|
2147
2122
|
className: "flex flex-wrap gap-space-sm",
|
|
2148
|
-
children:
|
|
2123
|
+
children: A.map((e, t) => /* @__PURE__ */ V(_, {
|
|
2149
2124
|
tone: "secondary",
|
|
2150
2125
|
children: e
|
|
2151
2126
|
}, t))
|
|
2152
2127
|
})]
|
|
2153
2128
|
}),
|
|
2154
|
-
!!
|
|
2129
|
+
!!n.length && /* @__PURE__ */ H(l, {
|
|
2155
2130
|
gap: "md",
|
|
2156
2131
|
className: "product-variant-details--related-options",
|
|
2157
|
-
children: [/* @__PURE__ */
|
|
2132
|
+
children: [/* @__PURE__ */ V(o, {
|
|
2158
2133
|
weight: "semibold",
|
|
2159
|
-
children:
|
|
2160
|
-
}), /* @__PURE__ */
|
|
2134
|
+
children: T.relatedOptionsTitle
|
|
2135
|
+
}), /* @__PURE__ */ V(M, { children: n.map((e, t) => S ? /* @__PURE__ */ V("div", { children: S(e, t) }, e.id) : /* @__PURE__ */ V(Je, {
|
|
2161
2136
|
item: e,
|
|
2162
|
-
actionLabel:
|
|
2163
|
-
onSelect:
|
|
2137
|
+
actionLabel: T.viewOptionLabel,
|
|
2138
|
+
onSelect: m ? () => m(e) : void 0
|
|
2164
2139
|
}, e.id)) })]
|
|
2165
2140
|
})
|
|
2166
2141
|
]
|
|
2167
|
-
}) :
|
|
2168
|
-
title:
|
|
2169
|
-
description:
|
|
2142
|
+
}) : y ?? /* @__PURE__ */ V($, {
|
|
2143
|
+
title: T.emptyTitle,
|
|
2144
|
+
description: T.emptyDescription
|
|
2170
2145
|
})
|
|
2171
2146
|
});
|
|
2172
2147
|
}
|
|
2173
|
-
|
|
2148
|
+
gt.displayName = "ProductVariantDetails";
|
|
2174
2149
|
//#endregion
|
|
2175
2150
|
//#region src/components/features/products/components/product-variant-editor.tsx
|
|
2176
|
-
var
|
|
2151
|
+
var _t = (e) => e.map((e) => ({
|
|
2177
2152
|
value: e.value,
|
|
2178
2153
|
label: e.label,
|
|
2179
2154
|
disabled: e.disabled
|
|
2180
2155
|
}));
|
|
2181
|
-
function
|
|
2182
|
-
let
|
|
2183
|
-
|
|
2184
|
-
},
|
|
2185
|
-
|
|
2186
|
-
...
|
|
2156
|
+
function vt({ value: e, defaultValue: t, optionFields: n = [], statusOptions: a = [], onValueChange: c, onSubmit: u, onError: d, onCancel: f, onDelete: p, actions: m, headerEnd: h, footerSlot: g, disabled: _ = !1, submitting: v = !1, className: y, strings: w }) {
|
|
2157
|
+
let T = r(Ae, w), D = z(), O = e !== void 0, [k, A] = ue(t ?? {}), [j, M] = ue(!1), N = (O ? e : k) ?? {}, P = v || j, F = _ || P, ee = (e) => {
|
|
2158
|
+
O || A(e), c?.(e);
|
|
2159
|
+
}, I = (e, t) => {
|
|
2160
|
+
ee({
|
|
2161
|
+
...N,
|
|
2187
2162
|
[e]: t
|
|
2188
2163
|
});
|
|
2189
|
-
},
|
|
2190
|
-
|
|
2191
|
-
...
|
|
2164
|
+
}, te = (e, t) => {
|
|
2165
|
+
ee({
|
|
2166
|
+
...N,
|
|
2192
2167
|
options: {
|
|
2193
|
-
...
|
|
2168
|
+
...N.options,
|
|
2194
2169
|
[e.id]: t
|
|
2195
2170
|
}
|
|
2196
2171
|
});
|
|
2197
|
-
},
|
|
2198
|
-
if (e.preventDefault(),
|
|
2199
|
-
|
|
2172
|
+
}, ne = async (e) => {
|
|
2173
|
+
if (e.preventDefault(), u && !P) {
|
|
2174
|
+
M(!0);
|
|
2200
2175
|
try {
|
|
2201
|
-
await
|
|
2176
|
+
await u(N);
|
|
2202
2177
|
} catch (e) {
|
|
2203
|
-
|
|
2178
|
+
d?.(e);
|
|
2204
2179
|
} finally {
|
|
2205
|
-
|
|
2180
|
+
M(!1);
|
|
2206
2181
|
}
|
|
2207
2182
|
}
|
|
2208
|
-
},
|
|
2183
|
+
}, re = /* @__PURE__ */ H("div", {
|
|
2209
2184
|
className: "product-variant-editor--footer flex flex-col-reverse gap-space-md @sm/product-variant-editor:flex-row @sm/product-variant-editor:items-center @sm/product-variant-editor:justify-between",
|
|
2210
|
-
children: [/* @__PURE__ */
|
|
2185
|
+
children: [/* @__PURE__ */ V("div", { children: !!p && /* @__PURE__ */ V(s, {
|
|
2211
2186
|
type: "button",
|
|
2212
2187
|
tone: "destructive",
|
|
2213
2188
|
buttonStyle: "ghost",
|
|
2214
|
-
onClick: () =>
|
|
2215
|
-
disabled:
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
}) }), /* @__PURE__ */ R("div", {
|
|
2189
|
+
onClick: () => p(N),
|
|
2190
|
+
disabled: F,
|
|
2191
|
+
children: T.deleteLabel
|
|
2192
|
+
}) }), /* @__PURE__ */ H("div", {
|
|
2219
2193
|
className: "flex flex-col-reverse gap-space-md @sm/product-variant-editor:flex-row @sm/product-variant-editor:justify-end",
|
|
2220
|
-
children: [!!
|
|
2194
|
+
children: [!!f && /* @__PURE__ */ V(s, {
|
|
2221
2195
|
type: "button",
|
|
2222
2196
|
tone: "secondary",
|
|
2223
2197
|
buttonStyle: "ghost",
|
|
2224
|
-
onClick:
|
|
2225
|
-
disabled:
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2198
|
+
onClick: f,
|
|
2199
|
+
disabled: F,
|
|
2200
|
+
children: T.cancelLabel
|
|
2201
|
+
}), !!u && /* @__PURE__ */ V(s, {
|
|
2202
|
+
tone: "primary",
|
|
2229
2203
|
type: "submit",
|
|
2230
|
-
form:
|
|
2231
|
-
disabled:
|
|
2232
|
-
|
|
2233
|
-
children: j ? w.savingLabel : w.saveLabel
|
|
2204
|
+
form: D,
|
|
2205
|
+
disabled: F,
|
|
2206
|
+
children: P ? T.savingLabel : T.saveLabel
|
|
2234
2207
|
})]
|
|
2235
2208
|
})]
|
|
2236
|
-
}),
|
|
2237
|
-
return /* @__PURE__ */
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2209
|
+
}), ie = !!(p || f || u);
|
|
2210
|
+
return /* @__PURE__ */ V(E, {
|
|
2211
|
+
title: T.title,
|
|
2212
|
+
description: T.description,
|
|
2213
|
+
actions: m,
|
|
2214
|
+
headerEnd: h,
|
|
2215
|
+
footerSlot: g,
|
|
2216
|
+
className: i("product-variant-editor--component @container/product-variant-editor w-full", y),
|
|
2217
|
+
children: /* @__PURE__ */ H(l, {
|
|
2218
|
+
render: /* @__PURE__ */ V("form", {
|
|
2219
|
+
id: D,
|
|
2220
|
+
onSubmit: ne
|
|
2221
|
+
}),
|
|
2222
|
+
gap: "2xl",
|
|
2223
|
+
className: "product-variant-editor--form",
|
|
2251
2224
|
children: [
|
|
2252
|
-
/* @__PURE__ */
|
|
2225
|
+
/* @__PURE__ */ H("section", {
|
|
2253
2226
|
className: "product-variant-editor--section grid gap-space-lg",
|
|
2254
|
-
children: [/* @__PURE__ */
|
|
2227
|
+
children: [/* @__PURE__ */ V(o, {
|
|
2255
2228
|
weight: "semibold",
|
|
2256
|
-
children:
|
|
2257
|
-
}), /* @__PURE__ */
|
|
2229
|
+
children: T.identityTitle
|
|
2230
|
+
}), /* @__PURE__ */ H("div", {
|
|
2258
2231
|
className: "grid gap-space-lg @sm/product-variant-editor:grid-cols-2",
|
|
2259
2232
|
children: [
|
|
2260
|
-
/* @__PURE__ */
|
|
2261
|
-
label:
|
|
2233
|
+
/* @__PURE__ */ V(x, {
|
|
2234
|
+
label: T.fields.name,
|
|
2262
2235
|
required: !0,
|
|
2263
|
-
children: /* @__PURE__ */
|
|
2264
|
-
value:
|
|
2265
|
-
onChange: (e) =>
|
|
2266
|
-
placeholder:
|
|
2267
|
-
disabled:
|
|
2236
|
+
children: /* @__PURE__ */ V(b, {
|
|
2237
|
+
value: N.name ?? "",
|
|
2238
|
+
onChange: (e) => I("name", e.target.value),
|
|
2239
|
+
placeholder: T.placeholders.name,
|
|
2240
|
+
disabled: F
|
|
2268
2241
|
})
|
|
2269
2242
|
}),
|
|
2270
|
-
/* @__PURE__ */
|
|
2271
|
-
label:
|
|
2272
|
-
children: /* @__PURE__ */
|
|
2273
|
-
value:
|
|
2274
|
-
onChange: (e) =>
|
|
2275
|
-
placeholder:
|
|
2276
|
-
disabled:
|
|
2243
|
+
/* @__PURE__ */ V(x, {
|
|
2244
|
+
label: T.fields.sku,
|
|
2245
|
+
children: /* @__PURE__ */ V(b, {
|
|
2246
|
+
value: N.sku ?? "",
|
|
2247
|
+
onChange: (e) => I("sku", e.target.value),
|
|
2248
|
+
placeholder: T.placeholders.sku,
|
|
2249
|
+
disabled: F
|
|
2277
2250
|
})
|
|
2278
2251
|
}),
|
|
2279
|
-
/* @__PURE__ */
|
|
2280
|
-
label:
|
|
2252
|
+
/* @__PURE__ */ V(x, {
|
|
2253
|
+
label: T.fields.description,
|
|
2281
2254
|
className: "@sm/product-variant-editor:col-span-2",
|
|
2282
|
-
children: /* @__PURE__ */
|
|
2283
|
-
value:
|
|
2284
|
-
onChange: (e) =>
|
|
2285
|
-
placeholder:
|
|
2286
|
-
disabled:
|
|
2255
|
+
children: /* @__PURE__ */ V(S, {
|
|
2256
|
+
value: N.description ?? "",
|
|
2257
|
+
onChange: (e) => I("description", e.target.value),
|
|
2258
|
+
placeholder: T.placeholders.description,
|
|
2259
|
+
disabled: F,
|
|
2287
2260
|
autoResize: !0,
|
|
2288
2261
|
minRows: 2
|
|
2289
2262
|
})
|
|
@@ -2291,141 +2264,142 @@ function _t({ value: e, defaultValue: a, optionFields: o = [], statusOptions: s
|
|
|
2291
2264
|
]
|
|
2292
2265
|
})]
|
|
2293
2266
|
}),
|
|
2294
|
-
/* @__PURE__ */
|
|
2267
|
+
/* @__PURE__ */ H("section", {
|
|
2295
2268
|
className: "product-variant-editor--section grid gap-space-lg",
|
|
2296
|
-
children: [/* @__PURE__ */
|
|
2269
|
+
children: [/* @__PURE__ */ V(o, {
|
|
2297
2270
|
weight: "semibold",
|
|
2298
|
-
children:
|
|
2299
|
-
}), /* @__PURE__ */
|
|
2271
|
+
children: T.commercialTitle
|
|
2272
|
+
}), /* @__PURE__ */ H("div", {
|
|
2300
2273
|
className: "grid gap-space-lg @sm/product-variant-editor:grid-cols-2",
|
|
2301
2274
|
children: [
|
|
2302
|
-
/* @__PURE__ */
|
|
2303
|
-
label:
|
|
2304
|
-
children: /* @__PURE__ */
|
|
2305
|
-
value:
|
|
2306
|
-
onChange: (e) =>
|
|
2307
|
-
placeholder:
|
|
2308
|
-
disabled:
|
|
2275
|
+
/* @__PURE__ */ V(x, {
|
|
2276
|
+
label: T.fields.price,
|
|
2277
|
+
children: /* @__PURE__ */ V(b, {
|
|
2278
|
+
value: N.price ?? "",
|
|
2279
|
+
onChange: (e) => I("price", e.target.value),
|
|
2280
|
+
placeholder: T.placeholders.price,
|
|
2281
|
+
disabled: F
|
|
2309
2282
|
})
|
|
2310
2283
|
}),
|
|
2311
|
-
/* @__PURE__ */
|
|
2312
|
-
label:
|
|
2313
|
-
children: /* @__PURE__ */
|
|
2314
|
-
value:
|
|
2315
|
-
onChange: (e) =>
|
|
2316
|
-
placeholder:
|
|
2317
|
-
disabled:
|
|
2284
|
+
/* @__PURE__ */ V(x, {
|
|
2285
|
+
label: T.fields.inventory,
|
|
2286
|
+
children: /* @__PURE__ */ V(b, {
|
|
2287
|
+
value: N.inventory ?? "",
|
|
2288
|
+
onChange: (e) => I("inventory", e.target.value),
|
|
2289
|
+
placeholder: T.placeholders.inventory,
|
|
2290
|
+
disabled: F,
|
|
2318
2291
|
inputMode: "numeric"
|
|
2319
2292
|
})
|
|
2320
2293
|
}),
|
|
2321
|
-
/* @__PURE__ */
|
|
2322
|
-
label:
|
|
2323
|
-
children:
|
|
2324
|
-
options:
|
|
2325
|
-
value:
|
|
2326
|
-
onValueChange: (e) =>
|
|
2327
|
-
placeholder:
|
|
2328
|
-
disabled:
|
|
2329
|
-
"aria-label":
|
|
2330
|
-
}) : /* @__PURE__ */
|
|
2331
|
-
value:
|
|
2332
|
-
onChange: (e) =>
|
|
2333
|
-
placeholder:
|
|
2334
|
-
disabled:
|
|
2294
|
+
/* @__PURE__ */ V(x, {
|
|
2295
|
+
label: T.fields.status,
|
|
2296
|
+
children: a.length > 0 ? /* @__PURE__ */ V(C, {
|
|
2297
|
+
options: _t(a),
|
|
2298
|
+
value: N.status ?? null,
|
|
2299
|
+
onValueChange: (e) => I("status", e ?? ""),
|
|
2300
|
+
placeholder: T.statusPlaceholder,
|
|
2301
|
+
disabled: F,
|
|
2302
|
+
"aria-label": T.fields.status
|
|
2303
|
+
}) : /* @__PURE__ */ V(b, {
|
|
2304
|
+
value: N.status ?? "",
|
|
2305
|
+
onChange: (e) => I("status", e.target.value),
|
|
2306
|
+
placeholder: T.placeholders.status,
|
|
2307
|
+
disabled: F
|
|
2335
2308
|
})
|
|
2336
2309
|
}),
|
|
2337
|
-
/* @__PURE__ */
|
|
2338
|
-
label:
|
|
2339
|
-
children: /* @__PURE__ */
|
|
2340
|
-
value:
|
|
2341
|
-
onChange: (e) =>
|
|
2342
|
-
placeholder:
|
|
2343
|
-
disabled:
|
|
2310
|
+
/* @__PURE__ */ V(x, {
|
|
2311
|
+
label: T.fields.channels,
|
|
2312
|
+
children: /* @__PURE__ */ V(b, {
|
|
2313
|
+
value: N.channels ?? "",
|
|
2314
|
+
onChange: (e) => I("channels", e.target.value),
|
|
2315
|
+
placeholder: T.placeholders.channels,
|
|
2316
|
+
disabled: F
|
|
2344
2317
|
})
|
|
2345
2318
|
})
|
|
2346
2319
|
]
|
|
2347
2320
|
})]
|
|
2348
2321
|
}),
|
|
2349
|
-
!!
|
|
2322
|
+
!!n.length && /* @__PURE__ */ H("section", {
|
|
2350
2323
|
className: "product-variant-editor--section grid gap-space-lg",
|
|
2351
|
-
children: [/* @__PURE__ */
|
|
2324
|
+
children: [/* @__PURE__ */ V(o, {
|
|
2352
2325
|
weight: "semibold",
|
|
2353
|
-
children:
|
|
2354
|
-
}), /* @__PURE__ */
|
|
2326
|
+
children: T.optionsTitle
|
|
2327
|
+
}), /* @__PURE__ */ V("div", {
|
|
2355
2328
|
className: "grid gap-space-lg @sm/product-variant-editor:grid-cols-2",
|
|
2356
|
-
children:
|
|
2357
|
-
let t = e.value ??
|
|
2358
|
-
return /* @__PURE__ */
|
|
2329
|
+
children: n.map((e) => {
|
|
2330
|
+
let t = e.value ?? N.options?.[e.id] ?? "", n = !!e.choices?.length;
|
|
2331
|
+
return /* @__PURE__ */ V(x, {
|
|
2359
2332
|
label: e.label,
|
|
2360
2333
|
helperText: e.helperText,
|
|
2361
|
-
children: n ? /* @__PURE__ */
|
|
2362
|
-
options:
|
|
2334
|
+
children: n ? /* @__PURE__ */ V(C, {
|
|
2335
|
+
options: _t(e.choices ?? []),
|
|
2363
2336
|
value: t || null,
|
|
2364
|
-
onValueChange: (t) =>
|
|
2365
|
-
placeholder: e.placeholder ??
|
|
2366
|
-
disabled:
|
|
2337
|
+
onValueChange: (t) => te(e, t),
|
|
2338
|
+
placeholder: e.placeholder ?? T.optionPlaceholder,
|
|
2339
|
+
disabled: F,
|
|
2367
2340
|
"aria-label": e.label
|
|
2368
|
-
}) : /* @__PURE__ */
|
|
2341
|
+
}) : /* @__PURE__ */ V(b, {
|
|
2369
2342
|
value: t,
|
|
2370
|
-
onChange: (t) =>
|
|
2371
|
-
placeholder: e.placeholder ??
|
|
2372
|
-
disabled:
|
|
2343
|
+
onChange: (t) => te(e, t.target.value),
|
|
2344
|
+
placeholder: e.placeholder ?? T.optionPlaceholder,
|
|
2345
|
+
disabled: F
|
|
2373
2346
|
})
|
|
2374
2347
|
}, e.id);
|
|
2375
2348
|
})
|
|
2376
2349
|
})]
|
|
2377
|
-
})
|
|
2350
|
+
}),
|
|
2351
|
+
g == null && ie && re
|
|
2378
2352
|
]
|
|
2379
2353
|
})
|
|
2380
2354
|
});
|
|
2381
2355
|
}
|
|
2382
|
-
|
|
2356
|
+
vt.displayName = "ProductVariantEditor";
|
|
2383
2357
|
//#endregion
|
|
2384
2358
|
//#region src/components/features/products/components/product-variants-bulk-table.tsx
|
|
2385
|
-
var
|
|
2359
|
+
var yt = [
|
|
2386
2360
|
"variant",
|
|
2387
2361
|
"sku",
|
|
2388
2362
|
"price",
|
|
2389
2363
|
"inventory",
|
|
2390
2364
|
"status"
|
|
2391
|
-
],
|
|
2392
|
-
function
|
|
2365
|
+
], bt = "text", xt = "text", St = "multiple";
|
|
2366
|
+
function Ct(e) {
|
|
2393
2367
|
return typeof e == "string" || typeof e == "number" ? String(e) : "";
|
|
2394
2368
|
}
|
|
2395
|
-
function
|
|
2369
|
+
function wt(e, t) {
|
|
2396
2370
|
let n = e.optionValues?.[t.id];
|
|
2397
2371
|
if (n != null && n !== !1 && n !== "") return n;
|
|
2398
2372
|
let r = e.optionValueIds?.[t.id];
|
|
2399
2373
|
return t.values?.find((e) => e.id === r)?.label ?? void 0;
|
|
2400
2374
|
}
|
|
2401
|
-
function wt(e, t) {
|
|
2402
|
-
return e.name !== void 0 && e.name !== null && e.name !== "" ? e.name : t.filter((e) => e.usedForVariants !== !1).map((t) => Ct(e, t)).filter((e) => e != null && e !== "").map((e) => St(e)).filter(Boolean).join(" / ") || "-";
|
|
2403
|
-
}
|
|
2404
2375
|
function Tt(e, t) {
|
|
2405
|
-
return t.filter((e) => e.usedForVariants !== !1).map((t) =>
|
|
2376
|
+
return e.name !== void 0 && e.name !== null && e.name !== "" ? e.name : t.filter((e) => e.usedForVariants !== !1).map((t) => wt(e, t)).filter((e) => e != null && e !== "").map((e) => Ct(e)).filter(Boolean).join(" / ") || "-";
|
|
2406
2377
|
}
|
|
2407
|
-
function Et(e) {
|
|
2408
|
-
return e.map(
|
|
2378
|
+
function Et(e, t) {
|
|
2379
|
+
return t.filter((e) => e.usedForVariants !== !1).map((t) => wt(e, t)).filter((e) => e != null && e !== "");
|
|
2409
2380
|
}
|
|
2410
|
-
function Dt(e
|
|
2411
|
-
return
|
|
2381
|
+
function Dt(e) {
|
|
2382
|
+
return e.map(Ct).filter(Boolean).join(" / ");
|
|
2412
2383
|
}
|
|
2413
2384
|
function Ot(e, t) {
|
|
2385
|
+
return Ct(wt(e, t)) || "-";
|
|
2386
|
+
}
|
|
2387
|
+
function kt(e, t) {
|
|
2414
2388
|
return e.map((e) => t.get(e)).filter((e) => !!e);
|
|
2415
2389
|
}
|
|
2416
|
-
function
|
|
2390
|
+
function At(e) {
|
|
2417
2391
|
return e == null || e === "" ? "-" : e;
|
|
2418
2392
|
}
|
|
2419
|
-
function
|
|
2393
|
+
function jt(e) {
|
|
2420
2394
|
return e != null && e !== "";
|
|
2421
2395
|
}
|
|
2422
|
-
function
|
|
2396
|
+
function Mt(e) {
|
|
2423
2397
|
return e === "sku" || e === "price" || e === "inventory";
|
|
2424
2398
|
}
|
|
2425
|
-
function
|
|
2426
|
-
return e === "text" || e === "field" ? e : e[t] ??
|
|
2399
|
+
function Nt(e, t) {
|
|
2400
|
+
return e === "text" || e === "field" ? e : e[t] ?? xt;
|
|
2427
2401
|
}
|
|
2428
|
-
function
|
|
2402
|
+
function Pt(e, t, n, r) {
|
|
2429
2403
|
return {
|
|
2430
2404
|
index: e,
|
|
2431
2405
|
field: t,
|
|
@@ -2433,378 +2407,376 @@ function Nt(e, t, n, r) {
|
|
|
2433
2407
|
value: r
|
|
2434
2408
|
};
|
|
2435
2409
|
}
|
|
2436
|
-
function
|
|
2437
|
-
let o =
|
|
2438
|
-
if (
|
|
2439
|
-
let e = !!
|
|
2440
|
-
return /* @__PURE__ */
|
|
2410
|
+
function Ft(e, t, n, r, a) {
|
|
2411
|
+
let o = Ct(e);
|
|
2412
|
+
if (n === "field") {
|
|
2413
|
+
let e = !!r;
|
|
2414
|
+
return /* @__PURE__ */ V(b, {
|
|
2441
2415
|
readOnly: !e,
|
|
2442
2416
|
value: o,
|
|
2443
|
-
onChange: e ? (e) =>
|
|
2417
|
+
onChange: e ? (e) => r(e.currentTarget.value) : void 0,
|
|
2444
2418
|
onBlur: a ? (e) => a(e.currentTarget.value) : void 0,
|
|
2445
2419
|
"aria-label": t,
|
|
2446
|
-
className:
|
|
2420
|
+
className: i("h-control-lg w-full min-w-24 bg-background px-control shadow-xs", !e && "text-muted-foreground")
|
|
2447
2421
|
});
|
|
2448
2422
|
}
|
|
2449
|
-
let s =
|
|
2450
|
-
return /* @__PURE__ */
|
|
2423
|
+
let s = jt(e) ? m : h;
|
|
2424
|
+
return /* @__PURE__ */ V(s, {
|
|
2451
2425
|
className: "min-w-0 whitespace-normal break-words tabular-nums",
|
|
2452
|
-
children:
|
|
2426
|
+
children: At(e)
|
|
2453
2427
|
});
|
|
2454
2428
|
}
|
|
2455
|
-
function
|
|
2456
|
-
let
|
|
2457
|
-
|
|
2429
|
+
function It({ variants: e = [], optionGroups: t = [], groupByOptionId: n, visibleColumns: c = yt, optionCombinationDisplay: u = bt, cellDisplay: d = xt, selectionMode: f, renderOptionCombination: p, renderCell: m, selectedVariantIds: h, defaultSelectedVariantIds: g = [], onSelectedVariantIdsChange: v, onVariantFieldChange: y, onVariantFieldBlur: b, onCreateVariant: x, onGenerateVariants: S, onSelectVariant: C, onEditVariant: w, onDuplicateVariant: D, onDeleteVariant: O, onBulkEdit: k, onBulkApply: A, onBulkDelete: j, renderVariantActions: M, renderBulkActions: N, actions: P, headerEnd: F, footerSlot: ae, empty: oe, surface: se = "card", className: L, strings: ce }) {
|
|
2430
|
+
let z = r(De, ce), de = h !== void 0, [fe, pe] = ue(g), ge = !!(N || k || A || j), U = (f ?? (ge || de || v ? St : "none")) === "multiple", _e = B(() => U ? de ? h : fe : [], [
|
|
2431
|
+
fe,
|
|
2458
2432
|
U,
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
]),
|
|
2462
|
-
if (!
|
|
2463
|
-
let t = new Map((
|
|
2433
|
+
de,
|
|
2434
|
+
h
|
|
2435
|
+
]), ve = B(() => new Map(e.map((e) => [e.id, e])), [e]), K = B(() => kt(_e, ve), [ve, _e]), ye = B(() => new Set(_e), [_e]), J = B(() => new Set(c), [c]), Y = B(() => t.find((e) => e.id === n), [t, n]), be = B(() => new Map(e.map((e, t) => [e.id, t])), [e]), xe = B(() => {
|
|
2436
|
+
if (!Y) return e;
|
|
2437
|
+
let t = new Map((Y.values ?? []).map((e, t) => [e.id, t]));
|
|
2464
2438
|
return [...e].sort((e, n) => {
|
|
2465
|
-
let r = e.optionValueIds?.[
|
|
2466
|
-
return s === c ? (
|
|
2439
|
+
let r = e.optionValueIds?.[Y.id], i = n.optionValueIds?.[Y.id], a = r === void 0 ? void 0 : t.get(r), o = i === void 0 ? void 0 : t.get(i), s = a ?? 2 ** 53 - 1, c = o ?? 2 ** 53 - 1;
|
|
2440
|
+
return s === c ? (be.get(e.id) ?? 0) - (be.get(n.id) ?? 0) : s - c;
|
|
2467
2441
|
});
|
|
2468
2442
|
}, [
|
|
2469
|
-
|
|
2470
|
-
|
|
2443
|
+
Y,
|
|
2444
|
+
be,
|
|
2471
2445
|
e
|
|
2472
|
-
]),
|
|
2473
|
-
if (!
|
|
2446
|
+
]), Se = B(() => {
|
|
2447
|
+
if (!Y) return /* @__PURE__ */ new Map();
|
|
2474
2448
|
let t = /* @__PURE__ */ new Map();
|
|
2475
2449
|
return e.forEach((e) => {
|
|
2476
|
-
let n =
|
|
2450
|
+
let n = Ot(e, Y);
|
|
2477
2451
|
t.set(n, (t.get(n) ?? 0) + 1);
|
|
2478
2452
|
}), t;
|
|
2479
|
-
}, [
|
|
2480
|
-
let t =
|
|
2481
|
-
|
|
2453
|
+
}, [Y, e]), Ce = U && ge, we = e.length > 0, Te = U && we && e.every((e) => ye.has(e.id)), Ee = !!(C || w || D || O || M), X = c.filter((e) => J.has(e)).length + +!!U + +!!Ee, Z = R((e) => {
|
|
2454
|
+
let t = kt(e, ve);
|
|
2455
|
+
de || pe(e), v?.(e, t);
|
|
2482
2456
|
}, [
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
]), Oe =
|
|
2457
|
+
de,
|
|
2458
|
+
v,
|
|
2459
|
+
ve
|
|
2460
|
+
]), Oe = R(() => Z([]), [Z]), ke = R((e, t) => {
|
|
2487
2461
|
if (!U) return;
|
|
2488
|
-
let n = t === !0 ? Array.from(/* @__PURE__ */ new Set([...
|
|
2489
|
-
|
|
2462
|
+
let n = t === !0 ? Array.from(/* @__PURE__ */ new Set([..._e, e.id])) : _e.filter((t) => t !== e.id);
|
|
2463
|
+
Z(n);
|
|
2490
2464
|
}, [
|
|
2491
2465
|
U,
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
]),
|
|
2495
|
-
U &&
|
|
2466
|
+
_e,
|
|
2467
|
+
Z
|
|
2468
|
+
]), Q = R((t) => {
|
|
2469
|
+
U && Z(t === !0 ? e.map((e) => e.id) : []);
|
|
2496
2470
|
}, [
|
|
2497
2471
|
U,
|
|
2498
|
-
|
|
2472
|
+
Z,
|
|
2499
2473
|
e
|
|
2500
|
-
]),
|
|
2501
|
-
selectedRows:
|
|
2502
|
-
selectedIds:
|
|
2474
|
+
]), Ae = {
|
|
2475
|
+
selectedRows: K,
|
|
2476
|
+
selectedIds: _e,
|
|
2503
2477
|
allRows: e,
|
|
2504
|
-
selectedCount:
|
|
2478
|
+
selectedCount: K.length,
|
|
2505
2479
|
totalCount: e.length,
|
|
2506
|
-
allRowsSelected:
|
|
2480
|
+
allRowsSelected: Te,
|
|
2507
2481
|
clearSelection: Oe,
|
|
2508
|
-
setSelectedIds:
|
|
2509
|
-
},
|
|
2482
|
+
setSelectedIds: Z
|
|
2483
|
+
}, je = x || S ? /* @__PURE__ */ H(l, {
|
|
2510
2484
|
direction: "horizontal",
|
|
2511
2485
|
gap: "sm",
|
|
2512
2486
|
justify: "end",
|
|
2513
2487
|
className: "product-variants-bulk-table--header-actions",
|
|
2514
|
-
children: [!!
|
|
2488
|
+
children: [!!S && /* @__PURE__ */ V(s, {
|
|
2515
2489
|
type: "button",
|
|
2516
2490
|
tone: "secondary",
|
|
2517
2491
|
buttonStyle: "outline",
|
|
2518
|
-
onClick:
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
}), !!S && /* @__PURE__ */ L(r, {
|
|
2492
|
+
onClick: S,
|
|
2493
|
+
children: z.generateLabel
|
|
2494
|
+
}), !!x && /* @__PURE__ */ V(s, {
|
|
2522
2495
|
type: "button",
|
|
2523
2496
|
tone: "secondary",
|
|
2524
2497
|
buttonStyle: "ghost",
|
|
2525
|
-
onClick:
|
|
2526
|
-
icon:
|
|
2527
|
-
children:
|
|
2498
|
+
onClick: x,
|
|
2499
|
+
icon: G,
|
|
2500
|
+
children: z.createLabel
|
|
2528
2501
|
})]
|
|
2529
|
-
}) : void 0,
|
|
2502
|
+
}) : void 0, Me = Ce ? /* @__PURE__ */ H(l, {
|
|
2530
2503
|
direction: "horizontal",
|
|
2531
2504
|
gap: "md",
|
|
2532
2505
|
justify: "between",
|
|
2533
|
-
className: "product-variants-bulk-table--bulk-toolbar rounded-radius
|
|
2534
|
-
children: [/* @__PURE__ */
|
|
2506
|
+
className: "product-variants-bulk-table--bulk-toolbar rounded-radius bg-muted/45 px-space-lg py-space-md",
|
|
2507
|
+
children: [/* @__PURE__ */ H(l, {
|
|
2535
2508
|
direction: "horizontal",
|
|
2536
2509
|
gap: "md",
|
|
2537
|
-
children: [/* @__PURE__ */
|
|
2510
|
+
children: [/* @__PURE__ */ V(o, {
|
|
2538
2511
|
size: "xs",
|
|
2539
2512
|
type: "secondary",
|
|
2540
|
-
children:
|
|
2541
|
-
}), !!
|
|
2513
|
+
children: z.selectedLabel(K.length, e.length)
|
|
2514
|
+
}), !!K.length && /* @__PURE__ */ V(s, {
|
|
2542
2515
|
type: "button",
|
|
2543
2516
|
tone: "secondary",
|
|
2544
2517
|
buttonStyle: "ghost",
|
|
2545
2518
|
size: "sm",
|
|
2546
2519
|
onClick: Oe,
|
|
2547
|
-
children:
|
|
2520
|
+
children: z.clearSelectionLabel
|
|
2548
2521
|
})]
|
|
2549
|
-
}), /* @__PURE__ */
|
|
2522
|
+
}), /* @__PURE__ */ H(l, {
|
|
2550
2523
|
direction: "horizontal",
|
|
2551
2524
|
gap: "md",
|
|
2552
2525
|
justify: "end",
|
|
2553
2526
|
children: [
|
|
2554
|
-
!!
|
|
2527
|
+
!!k && /* @__PURE__ */ V(s, {
|
|
2555
2528
|
type: "button",
|
|
2556
2529
|
tone: "secondary",
|
|
2557
2530
|
buttonStyle: "solid",
|
|
2558
|
-
disabled: !
|
|
2559
|
-
onClick: () =>
|
|
2531
|
+
disabled: !K.length,
|
|
2532
|
+
onClick: () => k(K),
|
|
2560
2533
|
className: "bg-background text-foreground hover:bg-background/80",
|
|
2561
|
-
children:
|
|
2534
|
+
children: z.bulkEditLabel
|
|
2562
2535
|
}),
|
|
2563
|
-
!!
|
|
2536
|
+
!!j && /* @__PURE__ */ H(s, {
|
|
2564
2537
|
type: "button",
|
|
2565
2538
|
tone: "secondary",
|
|
2566
2539
|
buttonStyle: "ghost",
|
|
2567
|
-
disabled: !
|
|
2568
|
-
onClick: () =>
|
|
2569
|
-
icon: K,
|
|
2540
|
+
disabled: !K.length,
|
|
2541
|
+
onClick: () => j(K),
|
|
2570
2542
|
className: "text-muted-foreground hover:text-destructive disabled:text-muted-foreground/55",
|
|
2571
2543
|
children: [
|
|
2572
|
-
|
|
2544
|
+
z.bulkDeleteLabel,
|
|
2573
2545
|
" (",
|
|
2574
|
-
|
|
2546
|
+
K.length,
|
|
2575
2547
|
")"
|
|
2576
2548
|
]
|
|
2577
2549
|
}),
|
|
2578
|
-
!!
|
|
2550
|
+
!!A && /* @__PURE__ */ V(s, {
|
|
2579
2551
|
type: "button",
|
|
2580
2552
|
tone: "secondary",
|
|
2581
2553
|
buttonStyle: "ghost",
|
|
2582
|
-
disabled: !
|
|
2583
|
-
onClick: () =>
|
|
2554
|
+
disabled: !K.length,
|
|
2555
|
+
onClick: () => A(K),
|
|
2584
2556
|
className: "text-muted-foreground disabled:text-muted-foreground/55",
|
|
2585
|
-
children:
|
|
2557
|
+
children: z.bulkApplyLabel
|
|
2586
2558
|
}),
|
|
2587
|
-
|
|
2559
|
+
N?.(Ae)
|
|
2588
2560
|
]
|
|
2589
2561
|
})]
|
|
2590
|
-
}) : null,
|
|
2591
|
-
title:
|
|
2592
|
-
description:
|
|
2593
|
-
action:
|
|
2562
|
+
}) : null, Ne = e.length === 0 ? oe ?? /* @__PURE__ */ V($, {
|
|
2563
|
+
title: z.emptyTitle,
|
|
2564
|
+
description: z.emptyDescription,
|
|
2565
|
+
action: S ? /* @__PURE__ */ V(s, {
|
|
2566
|
+
tone: "primary",
|
|
2594
2567
|
type: "button",
|
|
2595
|
-
onClick:
|
|
2596
|
-
|
|
2597
|
-
children: B.generateLabel
|
|
2568
|
+
onClick: S,
|
|
2569
|
+
children: z.generateLabel
|
|
2598
2570
|
}) : void 0
|
|
2599
|
-
}) : /* @__PURE__ */
|
|
2571
|
+
}) : /* @__PURE__ */ H(l, {
|
|
2600
2572
|
gap: "md",
|
|
2601
2573
|
className: "product-variants-bulk-table--body",
|
|
2602
|
-
children: [
|
|
2603
|
-
className: "product-variants-bulk-table--table overflow-hidden rounded-radius
|
|
2604
|
-
children: /* @__PURE__ */
|
|
2574
|
+
children: [Me, /* @__PURE__ */ V("div", {
|
|
2575
|
+
className: "product-variants-bulk-table--table overflow-hidden rounded-radius border border-border bg-background",
|
|
2576
|
+
children: /* @__PURE__ */ H(ie, {
|
|
2605
2577
|
containerClassName: "[scrollbar-gutter:stable] [scrollbar-width:thin] [&::-webkit-scrollbar]:h-2.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-border [&::-webkit-scrollbar-track]:bg-muted/40",
|
|
2606
|
-
className: "
|
|
2578
|
+
className: "w-full border-collapse",
|
|
2607
2579
|
children: [
|
|
2608
|
-
/* @__PURE__ */
|
|
2609
|
-
U && /* @__PURE__ */
|
|
2580
|
+
/* @__PURE__ */ H("colgroup", { children: [
|
|
2581
|
+
U && /* @__PURE__ */ V("col", {
|
|
2610
2582
|
className: "w-14 min-w-14 max-w-14",
|
|
2611
2583
|
style: { width: "3.5rem" }
|
|
2612
2584
|
}),
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2585
|
+
J.has("variant") && /* @__PURE__ */ V("col", {}),
|
|
2586
|
+
J.has("sku") && /* @__PURE__ */ V("col", {}),
|
|
2587
|
+
J.has("price") && /* @__PURE__ */ V("col", {}),
|
|
2588
|
+
J.has("inventory") && /* @__PURE__ */ V("col", {}),
|
|
2589
|
+
J.has("status") && /* @__PURE__ */ V("col", {}),
|
|
2590
|
+
J.has("updated") && /* @__PURE__ */ V("col", {}),
|
|
2591
|
+
Ee && /* @__PURE__ */ V("col", { style: { width: "4.5rem" } })
|
|
2620
2592
|
] }),
|
|
2621
|
-
/* @__PURE__ */
|
|
2593
|
+
/* @__PURE__ */ V(re, { children: /* @__PURE__ */ H(ee, {
|
|
2622
2594
|
className: "h-12 border-b border-border/70 bg-muted/45",
|
|
2623
2595
|
children: [
|
|
2624
|
-
U && /* @__PURE__ */
|
|
2596
|
+
U && /* @__PURE__ */ V(ne, {
|
|
2625
2597
|
className: "w-14 min-w-14 max-w-14 px-0 py-space-md text-center align-middle",
|
|
2626
2598
|
style: { width: "3.5rem" },
|
|
2627
|
-
children: /* @__PURE__ */
|
|
2628
|
-
checked:
|
|
2629
|
-
onCheckedChange:
|
|
2630
|
-
"aria-label":
|
|
2599
|
+
children: /* @__PURE__ */ V(T, {
|
|
2600
|
+
checked: Te,
|
|
2601
|
+
onCheckedChange: Q,
|
|
2602
|
+
"aria-label": z.selectAllLabel,
|
|
2631
2603
|
className: "mx-auto"
|
|
2632
2604
|
})
|
|
2633
2605
|
}),
|
|
2634
|
-
|
|
2606
|
+
J.has("variant") && /* @__PURE__ */ V(ne, {
|
|
2635
2607
|
className: "px-space-lg py-space-md text-left align-middle",
|
|
2636
|
-
children: /* @__PURE__ */
|
|
2608
|
+
children: /* @__PURE__ */ V(a, {
|
|
2637
2609
|
className: "whitespace-normal",
|
|
2638
|
-
children:
|
|
2610
|
+
children: z.headers.variant
|
|
2639
2611
|
})
|
|
2640
2612
|
}),
|
|
2641
|
-
|
|
2613
|
+
J.has("sku") && /* @__PURE__ */ V(ne, {
|
|
2642
2614
|
className: "px-space-lg py-space-md text-left align-middle",
|
|
2643
|
-
children: /* @__PURE__ */
|
|
2615
|
+
children: /* @__PURE__ */ V(a, {
|
|
2644
2616
|
className: "whitespace-normal",
|
|
2645
|
-
children:
|
|
2617
|
+
children: z.headers.sku
|
|
2646
2618
|
})
|
|
2647
2619
|
}),
|
|
2648
|
-
|
|
2620
|
+
J.has("price") && /* @__PURE__ */ V(ne, {
|
|
2649
2621
|
className: "px-space-lg py-space-md text-left align-middle",
|
|
2650
|
-
children: /* @__PURE__ */
|
|
2622
|
+
children: /* @__PURE__ */ V(a, {
|
|
2651
2623
|
className: "whitespace-normal",
|
|
2652
|
-
children:
|
|
2624
|
+
children: z.headers.price
|
|
2653
2625
|
})
|
|
2654
2626
|
}),
|
|
2655
|
-
|
|
2627
|
+
J.has("inventory") && /* @__PURE__ */ V(ne, {
|
|
2656
2628
|
className: "px-space-lg py-space-md text-left align-middle",
|
|
2657
|
-
children: /* @__PURE__ */
|
|
2629
|
+
children: /* @__PURE__ */ V(a, {
|
|
2658
2630
|
className: "whitespace-normal",
|
|
2659
|
-
children:
|
|
2631
|
+
children: z.headers.inventory
|
|
2660
2632
|
})
|
|
2661
2633
|
}),
|
|
2662
|
-
|
|
2634
|
+
J.has("status") && /* @__PURE__ */ V(ne, {
|
|
2663
2635
|
className: "px-space-lg py-space-md text-left align-middle",
|
|
2664
|
-
children: /* @__PURE__ */
|
|
2636
|
+
children: /* @__PURE__ */ V(a, {
|
|
2665
2637
|
className: "whitespace-normal",
|
|
2666
|
-
children:
|
|
2638
|
+
children: z.headers.status
|
|
2667
2639
|
})
|
|
2668
2640
|
}),
|
|
2669
|
-
|
|
2641
|
+
J.has("updated") && /* @__PURE__ */ V(ne, {
|
|
2670
2642
|
className: "px-space-lg py-space-md text-left align-middle",
|
|
2671
|
-
children: /* @__PURE__ */
|
|
2643
|
+
children: /* @__PURE__ */ V(a, {
|
|
2672
2644
|
className: "whitespace-normal",
|
|
2673
|
-
children:
|
|
2645
|
+
children: z.headers.updated
|
|
2674
2646
|
})
|
|
2675
2647
|
}),
|
|
2676
|
-
|
|
2648
|
+
Ee && /* @__PURE__ */ V(ne, {
|
|
2677
2649
|
className: "px-space-lg py-space-md text-right align-middle",
|
|
2678
|
-
children: /* @__PURE__ */
|
|
2650
|
+
children: /* @__PURE__ */ V(a, {
|
|
2679
2651
|
className: "whitespace-normal",
|
|
2680
|
-
children:
|
|
2652
|
+
children: z.headers.actions
|
|
2681
2653
|
})
|
|
2682
2654
|
})
|
|
2683
2655
|
]
|
|
2684
2656
|
}) }),
|
|
2685
|
-
/* @__PURE__ */
|
|
2686
|
-
let
|
|
2687
|
-
index:
|
|
2688
|
-
onSelect:
|
|
2689
|
-
onEdit:
|
|
2690
|
-
onDuplicate:
|
|
2691
|
-
onDelete:
|
|
2657
|
+
/* @__PURE__ */ V(te, { children: xe.map((e, n) => {
|
|
2658
|
+
let r = be.get(e.id) ?? n, i = Y ? Ot(e, Y) : null, a = n > 0 ? xe[n - 1] : void 0, s = Y && a ? Ot(a, Y) : null, c = !!Y && i !== s, f = ye.has(e.id), h = {
|
|
2659
|
+
index: r,
|
|
2660
|
+
onSelect: C ? () => C(e) : void 0,
|
|
2661
|
+
onEdit: w ? () => w(e) : void 0,
|
|
2662
|
+
onDuplicate: D ? () => D(e) : void 0,
|
|
2663
|
+
onDelete: O ? () => O(e) : void 0,
|
|
2692
2664
|
isSelected: f,
|
|
2693
2665
|
onToggleSelected: U ? (t) => ke(e, t) : void 0
|
|
2694
|
-
},
|
|
2666
|
+
}, g = Y ? t.filter((e) => e.id !== Y.id) : t, v = Et(e, g), x = Y ? Tt({
|
|
2695
2667
|
...e,
|
|
2696
2668
|
name: void 0
|
|
2697
|
-
},
|
|
2698
|
-
let a =
|
|
2669
|
+
}, g) : Tt(e, t), S = x === "-" && Y ? Tt(e, t) : x, E = Dt(v), k = E === Ct(S), A = (t, n, i = xt) => {
|
|
2670
|
+
let a = Mt(t) && y ? (i) => y(e, t, i, Pt(r, t, n, i)) : void 0, o = Mt(t) && b ? (i) => b(e, t, i, Pt(r, t, n, i)) : void 0;
|
|
2699
2671
|
return {
|
|
2700
|
-
index:
|
|
2672
|
+
index: r,
|
|
2701
2673
|
column: t,
|
|
2702
|
-
value:
|
|
2674
|
+
value: n,
|
|
2703
2675
|
variantName: S,
|
|
2704
2676
|
optionValues: v,
|
|
2705
|
-
optionLabel:
|
|
2677
|
+
optionLabel: E,
|
|
2706
2678
|
cellDisplay: i,
|
|
2707
2679
|
onValueChange: a,
|
|
2708
2680
|
onBlur: o
|
|
2709
2681
|
};
|
|
2710
2682
|
}, j = (t, n, r, i) => {
|
|
2711
|
-
let a = A(t, n, r), o =
|
|
2683
|
+
let a = A(t, n, r), o = m?.(e, a);
|
|
2712
2684
|
return o === void 0 ? i(a) : o;
|
|
2713
|
-
},
|
|
2714
|
-
optionGroups:
|
|
2685
|
+
}, N = u !== "none" && v.length > 0 && (Y ? !k : u === "tags" || !k), P = u === "none" ? null : p?.(e, {
|
|
2686
|
+
optionGroups: t,
|
|
2715
2687
|
optionValues: v,
|
|
2716
|
-
optionLabel:
|
|
2688
|
+
optionLabel: E,
|
|
2717
2689
|
display: u
|
|
2718
|
-
}),
|
|
2719
|
-
...
|
|
2690
|
+
}), F = [
|
|
2691
|
+
...C ? [{
|
|
2720
2692
|
id: "view",
|
|
2721
|
-
label:
|
|
2722
|
-
icon: /* @__PURE__ */
|
|
2723
|
-
onClick: () =>
|
|
2693
|
+
label: z.viewLabel,
|
|
2694
|
+
icon: /* @__PURE__ */ V(he, { className: "size-icon-md" }),
|
|
2695
|
+
onClick: () => C(e),
|
|
2724
2696
|
tone: "secondary",
|
|
2725
2697
|
buttonStyle: "ghost"
|
|
2726
2698
|
}] : [],
|
|
2727
|
-
...
|
|
2699
|
+
...w ? [{
|
|
2728
2700
|
id: "edit",
|
|
2729
|
-
label:
|
|
2730
|
-
icon: /* @__PURE__ */
|
|
2731
|
-
onClick: () =>
|
|
2701
|
+
label: z.editLabel,
|
|
2702
|
+
icon: /* @__PURE__ */ V(W, { className: "size-icon-md" }),
|
|
2703
|
+
onClick: () => w(e),
|
|
2732
2704
|
tone: "secondary",
|
|
2733
2705
|
buttonStyle: "ghost"
|
|
2734
2706
|
}] : [],
|
|
2735
|
-
...
|
|
2707
|
+
...D ? [{
|
|
2736
2708
|
id: "duplicate",
|
|
2737
|
-
label:
|
|
2738
|
-
icon: /* @__PURE__ */
|
|
2739
|
-
onClick: () =>
|
|
2709
|
+
label: z.duplicateLabel,
|
|
2710
|
+
icon: /* @__PURE__ */ V(me, { className: "size-icon-md" }),
|
|
2711
|
+
onClick: () => D(e),
|
|
2740
2712
|
tone: "secondary",
|
|
2741
2713
|
buttonStyle: "ghost"
|
|
2742
2714
|
}] : [],
|
|
2743
|
-
...
|
|
2715
|
+
...O ? [{
|
|
2744
2716
|
id: "delete",
|
|
2745
|
-
label:
|
|
2746
|
-
icon: /* @__PURE__ */
|
|
2747
|
-
onClick: () =>
|
|
2717
|
+
label: z.deleteLabel,
|
|
2718
|
+
icon: /* @__PURE__ */ V(q, { className: "size-icon-md" }),
|
|
2719
|
+
onClick: () => O(e),
|
|
2748
2720
|
tone: "destructive"
|
|
2749
2721
|
}] : []
|
|
2750
2722
|
];
|
|
2751
|
-
return /* @__PURE__ */
|
|
2723
|
+
return /* @__PURE__ */ H(le, { children: [c && /* @__PURE__ */ V(ee, {
|
|
2752
2724
|
className: "product-variants-bulk-table--group-row border-b border-border/70 bg-muted/30",
|
|
2753
|
-
children: /* @__PURE__ */
|
|
2754
|
-
colSpan:
|
|
2725
|
+
children: /* @__PURE__ */ V(I, {
|
|
2726
|
+
colSpan: X,
|
|
2755
2727
|
className: "px-space-lg py-space-md align-middle",
|
|
2756
|
-
children: /* @__PURE__ */
|
|
2728
|
+
children: /* @__PURE__ */ H(l, {
|
|
2757
2729
|
direction: "horizontal",
|
|
2758
2730
|
gap: "sm",
|
|
2759
2731
|
wrap: !1,
|
|
2760
|
-
children: [/* @__PURE__ */
|
|
2732
|
+
children: [/* @__PURE__ */ V(o, {
|
|
2761
2733
|
tag: "span",
|
|
2762
2734
|
weight: "semibold",
|
|
2763
2735
|
className: "min-w-0 whitespace-normal break-words",
|
|
2764
|
-
children:
|
|
2765
|
-
}), /* @__PURE__ */
|
|
2736
|
+
children: i
|
|
2737
|
+
}), /* @__PURE__ */ V(o, {
|
|
2766
2738
|
tag: "span",
|
|
2767
2739
|
size: "xs",
|
|
2768
2740
|
type: "secondary",
|
|
2769
2741
|
className: "whitespace-nowrap",
|
|
2770
|
-
children:
|
|
2742
|
+
children: z.groupCountLabel(Se.get(i ?? "") ?? 0)
|
|
2771
2743
|
})]
|
|
2772
2744
|
})
|
|
2773
2745
|
})
|
|
2774
|
-
}), /* @__PURE__ */
|
|
2746
|
+
}), /* @__PURE__ */ H(ee, {
|
|
2775
2747
|
className: "h-20 border-b border-border/70 last:border-b-0",
|
|
2776
2748
|
children: [
|
|
2777
|
-
U && /* @__PURE__ */
|
|
2749
|
+
U && /* @__PURE__ */ V(I, {
|
|
2778
2750
|
className: "w-14 min-w-14 max-w-14 px-0 py-space-lg text-center align-middle",
|
|
2779
2751
|
style: { width: "3.5rem" },
|
|
2780
|
-
children: /* @__PURE__ */
|
|
2752
|
+
children: /* @__PURE__ */ V(T, {
|
|
2781
2753
|
checked: f,
|
|
2782
2754
|
onCheckedChange: (t) => ke(e, t),
|
|
2783
|
-
"aria-label":
|
|
2755
|
+
"aria-label": z.selectRowLabel(r),
|
|
2784
2756
|
className: "mx-auto"
|
|
2785
2757
|
})
|
|
2786
2758
|
}),
|
|
2787
|
-
|
|
2759
|
+
J.has("variant") && /* @__PURE__ */ V(I, {
|
|
2788
2760
|
className: "px-space-lg py-space-lg align-middle",
|
|
2789
|
-
children: j("variant", S,
|
|
2761
|
+
children: j("variant", S, xt, () => /* @__PURE__ */ H(l, {
|
|
2790
2762
|
gap: "xs",
|
|
2791
2763
|
children: [
|
|
2792
|
-
/* @__PURE__ */
|
|
2764
|
+
/* @__PURE__ */ V(o, {
|
|
2793
2765
|
weight: "medium",
|
|
2794
2766
|
className: "min-w-0 whitespace-normal break-words",
|
|
2795
2767
|
children: S
|
|
2796
2768
|
}),
|
|
2797
|
-
|
|
2798
|
-
!
|
|
2769
|
+
P,
|
|
2770
|
+
!P && N && u === "text" && /* @__PURE__ */ V(o, {
|
|
2799
2771
|
size: "xs",
|
|
2800
2772
|
type: "secondary",
|
|
2801
2773
|
className: "min-w-0 whitespace-normal break-words",
|
|
2802
|
-
children: v.map((t, n) => /* @__PURE__ */
|
|
2774
|
+
children: v.map((t, n) => /* @__PURE__ */ H("span", { children: [n > 0 ? " / " : null, t] }, `${e.id}-option-text-${n}`))
|
|
2803
2775
|
}),
|
|
2804
|
-
!
|
|
2776
|
+
!P && N && u === "tags" && /* @__PURE__ */ V(l, {
|
|
2805
2777
|
direction: "horizontal",
|
|
2806
2778
|
gap: "xs",
|
|
2807
|
-
children: v.map((t, n) => /* @__PURE__ */
|
|
2779
|
+
children: v.map((t, n) => /* @__PURE__ */ V(_, {
|
|
2808
2780
|
size: "sm",
|
|
2809
2781
|
tone: "secondary",
|
|
2810
2782
|
className: "max-w-full",
|
|
@@ -2814,42 +2786,38 @@ function Ft({ variants: e = [], optionGroups: o = [], groupByOptionId: c, visibl
|
|
|
2814
2786
|
]
|
|
2815
2787
|
}))
|
|
2816
2788
|
}),
|
|
2817
|
-
|
|
2789
|
+
J.has("sku") && /* @__PURE__ */ V(I, {
|
|
2818
2790
|
className: "px-space-lg py-space-md align-middle",
|
|
2819
|
-
children: j("sku", e.sku,
|
|
2791
|
+
children: j("sku", e.sku, Nt(d, "sku"), (t) => Ft(e.sku, `${z.headers.sku}: ${Ct(S)}`, t.cellDisplay, t.onValueChange, t.onBlur))
|
|
2820
2792
|
}),
|
|
2821
|
-
|
|
2793
|
+
J.has("price") && /* @__PURE__ */ V(I, {
|
|
2822
2794
|
className: "px-space-lg py-space-md align-middle",
|
|
2823
|
-
children: j("price", e.price,
|
|
2795
|
+
children: j("price", e.price, Nt(d, "price"), (t) => Ft(e.price, `${z.headers.price}: ${Ct(S)}`, t.cellDisplay, t.onValueChange, t.onBlur))
|
|
2824
2796
|
}),
|
|
2825
|
-
|
|
2797
|
+
J.has("inventory") && /* @__PURE__ */ V(I, {
|
|
2826
2798
|
className: "px-space-lg py-space-md align-middle",
|
|
2827
|
-
children: j("inventory", e.inventory,
|
|
2799
|
+
children: j("inventory", e.inventory, Nt(d, "inventory"), (t) => Ft(e.inventory, `${z.headers.inventory}: ${Ct(S)}`, t.cellDisplay, t.onValueChange, t.onBlur))
|
|
2828
2800
|
}),
|
|
2829
|
-
|
|
2801
|
+
J.has("status") && /* @__PURE__ */ V(I, {
|
|
2830
2802
|
className: "px-space-lg py-space-lg align-middle",
|
|
2831
|
-
children: j("status", e.status,
|
|
2803
|
+
children: j("status", e.status, xt, () => e.status ? /* @__PURE__ */ V(_, {
|
|
2832
2804
|
tone: e.statusTone ?? "secondary",
|
|
2833
2805
|
children: e.status
|
|
2834
|
-
}) : /* @__PURE__ */
|
|
2806
|
+
}) : /* @__PURE__ */ V(o, {
|
|
2835
2807
|
type: "secondary",
|
|
2836
2808
|
children: "-"
|
|
2837
2809
|
}))
|
|
2838
2810
|
}),
|
|
2839
|
-
|
|
2811
|
+
J.has("updated") && /* @__PURE__ */ V(I, {
|
|
2840
2812
|
className: "px-space-lg py-space-lg align-middle",
|
|
2841
|
-
children: j("updated", e.updatedAt,
|
|
2842
|
-
size: "xs",
|
|
2843
|
-
type: "secondary",
|
|
2844
|
-
children: kt(e.updatedAt)
|
|
2845
|
-
}))
|
|
2813
|
+
children: j("updated", e.updatedAt, xt, () => Ft(e.updatedAt, `${z.headers.updated}: ${Ct(S)}`, "text"))
|
|
2846
2814
|
}),
|
|
2847
|
-
|
|
2815
|
+
Ee && /* @__PURE__ */ V(I, {
|
|
2848
2816
|
className: "px-space-lg py-space-lg text-right align-middle",
|
|
2849
|
-
children:
|
|
2817
|
+
children: M ? M(e, h) : /* @__PURE__ */ V(ze, {
|
|
2850
2818
|
item: e,
|
|
2851
|
-
actions:
|
|
2852
|
-
menuLabel:
|
|
2819
|
+
actions: F,
|
|
2820
|
+
menuLabel: z.headers.actions
|
|
2853
2821
|
})
|
|
2854
2822
|
})
|
|
2855
2823
|
]
|
|
@@ -2859,219 +2827,219 @@ function Ft({ variants: e = [], optionGroups: o = [], groupByOptionId: c, visibl
|
|
|
2859
2827
|
})
|
|
2860
2828
|
})]
|
|
2861
2829
|
});
|
|
2862
|
-
return
|
|
2863
|
-
"aria-label":
|
|
2864
|
-
className:
|
|
2865
|
-
children:
|
|
2866
|
-
}) : /* @__PURE__ */
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
className: n("product-variants-bulk-table--component w-full", fe),
|
|
2876
|
-
children: Fe
|
|
2830
|
+
return se === "embedded" ? /* @__PURE__ */ V("section", {
|
|
2831
|
+
"aria-label": z.title,
|
|
2832
|
+
className: i("product-variants-bulk-table--component min-w-0", L),
|
|
2833
|
+
children: Ne
|
|
2834
|
+
}) : /* @__PURE__ */ V(E, {
|
|
2835
|
+
title: z.title,
|
|
2836
|
+
description: z.description,
|
|
2837
|
+
actions: P,
|
|
2838
|
+
headerAction: je,
|
|
2839
|
+
headerEnd: F,
|
|
2840
|
+
footerSlot: ae,
|
|
2841
|
+
className: i("product-variants-bulk-table--component w-full", L),
|
|
2842
|
+
children: Ne
|
|
2877
2843
|
});
|
|
2878
2844
|
}
|
|
2879
|
-
|
|
2845
|
+
It.displayName = "ProductVariantsBulkTable";
|
|
2880
2846
|
//#endregion
|
|
2881
2847
|
//#region src/components/features/products/components/product-variants-manager.tsx
|
|
2882
|
-
function
|
|
2883
|
-
let
|
|
2848
|
+
function Lt({ optionGroups: n = [], variants: a = [], visibleColumns: c, optionCombinationDisplay: d, cellDisplay: f, selectionMode: p, renderOptionCombination: m, renderCell: h, selectedVariantIds: g, defaultSelectedVariantIds: _, onSelectedVariantIdsChange: v, onVariantFieldChange: y, onVariantFieldBlur: b, collapsedOptionIds: x, defaultCollapsedOptionIds: S, onCollapsedOptionIdsChange: w, editingOptionId: T, defaultEditingOptionId: E, onEditingOptionIdChange: k, onCreateOption: A, onEditOption: j, onDeleteOption: M, onAddValue: N, onDeleteValue: P, onOptionNameChange: F, onValueLabelChange: ee, onDoneEditingOption: I, onSaveEditingOption: te, onCancelEditingOption: ne, onToggleUsedForVariants: re, renderOptionActions: ie, renderValue: ae, onCreateVariant: oe, onGenerateVariants: se, onSelectVariant: L, onEditVariant: ce, onDuplicateVariant: le, onDeleteVariant: z, onBulkEdit: de, onBulkApply: fe, onBulkDelete: pe, renderVariantActions: me, renderBulkActions: he, groupByOptionId: ge, defaultGroupByOptionId: W, onGroupByOptionIdChange: _e, onSearchVariants: K, onFilterVariants: q, controlsEnd: ye, actions: J, headerEnd: Y, footerSlot: be, surface: xe = "flat", padding: Se = xe === "flat" ? "none" : "md", headerDivider: Ce = xe !== "flat" && void 0, footerDivider: we = xe !== "flat" && void 0, className: Te, strings: Ee, optionsStrings: X, variantsStrings: Z }) {
|
|
2849
|
+
let { defaultScale: De } = t(), ke = e(void 0, De), Q = r(Oe, Ee), Ae = B(() => n.filter((e) => e.usedForVariants !== !1), [n]), je = Ae[0]?.id ?? null, $ = ge !== void 0, [Me, Ne] = ue(W ?? je), Pe = ge ?? Me ?? je, Fe = B(() => Ae.map((e) => ({
|
|
2884
2850
|
value: e.id,
|
|
2885
2851
|
label: String(typeof e.name == "string" || typeof e.name == "number" ? e.name : e.id)
|
|
2886
|
-
})), [
|
|
2887
|
-
let
|
|
2888
|
-
|
|
2852
|
+
})), [Ae]), Ie = R((e) => {
|
|
2853
|
+
let t = n.find((t) => t.id === e);
|
|
2854
|
+
$ || Ne(e ?? null), _e?.(e, t);
|
|
2889
2855
|
}, [
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
]),
|
|
2856
|
+
$,
|
|
2857
|
+
_e,
|
|
2858
|
+
n
|
|
2859
|
+
]), Le = se || oe ? /* @__PURE__ */ H(l, {
|
|
2894
2860
|
direction: "horizontal",
|
|
2895
2861
|
gap: "sm",
|
|
2896
2862
|
justify: "end",
|
|
2897
2863
|
className: "product-variants-manager--header-actions",
|
|
2898
|
-
children: [!!
|
|
2864
|
+
children: [!!se && /* @__PURE__ */ V(s, {
|
|
2899
2865
|
type: "button",
|
|
2900
2866
|
tone: "secondary",
|
|
2901
2867
|
buttonStyle: "outline",
|
|
2902
|
-
onClick:
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
}), !!ie && /* @__PURE__ */ L(r, {
|
|
2868
|
+
onClick: se,
|
|
2869
|
+
children: Q.generateLabel
|
|
2870
|
+
}), !!oe && /* @__PURE__ */ V(s, {
|
|
2906
2871
|
type: "button",
|
|
2907
2872
|
tone: "secondary",
|
|
2908
2873
|
buttonStyle: "outline",
|
|
2909
|
-
onClick:
|
|
2910
|
-
icon:
|
|
2911
|
-
children:
|
|
2874
|
+
onClick: oe,
|
|
2875
|
+
icon: G,
|
|
2876
|
+
children: Q.createVariantLabel
|
|
2912
2877
|
})]
|
|
2913
2878
|
}) : void 0;
|
|
2914
|
-
return /* @__PURE__ */
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2879
|
+
return /* @__PURE__ */ V(u, {
|
|
2880
|
+
surface: xe,
|
|
2881
|
+
padding: Se,
|
|
2882
|
+
headerDivider: Ce,
|
|
2883
|
+
footerDivider: we,
|
|
2884
|
+
title: Q.title,
|
|
2885
|
+
description: Q.description,
|
|
2886
|
+
actions: J,
|
|
2887
|
+
actionsLabel: Q.actionsLabel,
|
|
2888
|
+
headerAction: Le,
|
|
2889
|
+
headerEnd: Y,
|
|
2890
|
+
footerSlot: be,
|
|
2891
|
+
className: i("product-variants-manager--component w-full", Te),
|
|
2892
|
+
children: /* @__PURE__ */ H(l, {
|
|
2893
|
+
gap: "2xl",
|
|
2926
2894
|
className: "product-variants-manager--body",
|
|
2927
|
-
children: [
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2895
|
+
children: [/* @__PURE__ */ V("section", {
|
|
2896
|
+
className: "product-variants-manager--options min-w-0",
|
|
2897
|
+
children: /* @__PURE__ */ V(rt, {
|
|
2898
|
+
optionGroups: n,
|
|
2899
|
+
collapsedOptionIds: x,
|
|
2900
|
+
defaultCollapsedOptionIds: S,
|
|
2901
|
+
onCollapsedOptionIdsChange: w,
|
|
2902
|
+
editingOptionId: T,
|
|
2903
|
+
defaultEditingOptionId: E,
|
|
2904
|
+
onEditingOptionIdChange: k,
|
|
2905
|
+
surface: "embedded",
|
|
2906
|
+
onCreateOption: A,
|
|
2907
|
+
onEditOption: j,
|
|
2908
|
+
onDeleteOption: M,
|
|
2909
|
+
onAddValue: N,
|
|
2910
|
+
onDeleteValue: P,
|
|
2911
|
+
onOptionNameChange: F,
|
|
2912
|
+
onValueLabelChange: ee,
|
|
2913
|
+
onDoneEditingOption: I,
|
|
2914
|
+
onSaveEditingOption: te,
|
|
2915
|
+
onCancelEditingOption: ne,
|
|
2916
|
+
onToggleUsedForVariants: re,
|
|
2917
|
+
renderOptionActions: ie,
|
|
2918
|
+
renderValue: ae,
|
|
2919
|
+
showHeader: !1,
|
|
2920
|
+
showCollapseControls: !1,
|
|
2921
|
+
showInlineActions: !1,
|
|
2922
|
+
showVariantToggle: !1,
|
|
2923
|
+
strings: {
|
|
2924
|
+
title: Q.optionsTitle,
|
|
2925
|
+
...X
|
|
2926
|
+
}
|
|
2927
|
+
})
|
|
2928
|
+
}), /* @__PURE__ */ H(l, {
|
|
2929
|
+
gap: "md",
|
|
2930
|
+
className: "product-variants-manager--variants-region",
|
|
2931
|
+
children: [/* @__PURE__ */ V("div", {
|
|
2932
|
+
className: "product-variants-manager--controls",
|
|
2933
|
+
children: /* @__PURE__ */ H(l, {
|
|
2965
2934
|
direction: "horizontal",
|
|
2966
2935
|
gap: "md",
|
|
2967
2936
|
justify: "between",
|
|
2968
|
-
children: [/* @__PURE__ */
|
|
2937
|
+
children: [/* @__PURE__ */ H(l, {
|
|
2969
2938
|
direction: "horizontal",
|
|
2970
2939
|
gap: "sm",
|
|
2971
2940
|
wrap: !1,
|
|
2972
2941
|
className: "product-variants-manager--group-by",
|
|
2973
|
-
children: [/* @__PURE__ */
|
|
2942
|
+
children: [/* @__PURE__ */ V(o, {
|
|
2974
2943
|
type: "secondary",
|
|
2975
2944
|
className: "whitespace-nowrap",
|
|
2976
|
-
children:
|
|
2977
|
-
}),
|
|
2978
|
-
options:
|
|
2979
|
-
value:
|
|
2980
|
-
onValueChange:
|
|
2981
|
-
"aria-label":
|
|
2945
|
+
children: Q.groupByLabel
|
|
2946
|
+
}), Fe.length > 0 && /* @__PURE__ */ V(C, {
|
|
2947
|
+
options: Fe,
|
|
2948
|
+
value: Pe,
|
|
2949
|
+
onValueChange: Ie,
|
|
2950
|
+
"aria-label": Q.groupByLabel,
|
|
2982
2951
|
className: "min-w-32 bg-background"
|
|
2983
2952
|
})]
|
|
2984
|
-
}), /* @__PURE__ */
|
|
2953
|
+
}), /* @__PURE__ */ H(l, {
|
|
2985
2954
|
direction: "horizontal",
|
|
2986
2955
|
gap: "sm",
|
|
2987
2956
|
justify: "end",
|
|
2988
2957
|
wrap: !1,
|
|
2989
2958
|
className: "product-variants-manager--controls-end",
|
|
2990
|
-
children: [/* @__PURE__ */
|
|
2991
|
-
className: "product-variants-manager--tool-buttons
|
|
2992
|
-
children: [/* @__PURE__ */
|
|
2959
|
+
children: [/* @__PURE__ */ H("div", {
|
|
2960
|
+
className: i("product-variants-manager--tool-buttons bg-background shadow-xs", D.joinedFrame, O[ke]),
|
|
2961
|
+
children: [/* @__PURE__ */ H(s, {
|
|
2993
2962
|
type: "button",
|
|
2994
2963
|
size: "sm",
|
|
2995
2964
|
iconOnly: !0,
|
|
2996
2965
|
tone: "secondary",
|
|
2997
2966
|
buttonStyle: "ghost",
|
|
2998
|
-
onClick:
|
|
2999
|
-
"aria-label":
|
|
3000
|
-
className: "
|
|
3001
|
-
children: [/* @__PURE__ */
|
|
2967
|
+
onClick: K,
|
|
2968
|
+
"aria-label": Q.searchLabel,
|
|
2969
|
+
className: i(D.joinedItem, D.firstItem, "border-r border-border text-muted-foreground hover:text-foreground"),
|
|
2970
|
+
children: [/* @__PURE__ */ V(ve, {
|
|
3002
2971
|
className: "size-icon-sm",
|
|
3003
2972
|
"aria-hidden": "true"
|
|
3004
|
-
}), /* @__PURE__ */
|
|
2973
|
+
}), /* @__PURE__ */ V(o, {
|
|
3005
2974
|
tag: "span",
|
|
3006
2975
|
size: "pxs",
|
|
3007
2976
|
className: "sr-only",
|
|
3008
|
-
children:
|
|
2977
|
+
children: Q.searchLabel
|
|
3009
2978
|
})]
|
|
3010
|
-
}), /* @__PURE__ */
|
|
2979
|
+
}), /* @__PURE__ */ H(s, {
|
|
3011
2980
|
type: "button",
|
|
3012
2981
|
size: "sm",
|
|
3013
2982
|
iconOnly: !0,
|
|
3014
2983
|
tone: "secondary",
|
|
3015
2984
|
buttonStyle: "ghost",
|
|
3016
|
-
onClick:
|
|
3017
|
-
"aria-label":
|
|
3018
|
-
className: "
|
|
3019
|
-
children: [/* @__PURE__ */
|
|
2985
|
+
onClick: q,
|
|
2986
|
+
"aria-label": Q.filterLabel,
|
|
2987
|
+
className: i(D.joinedItem, D.lastItem, "text-muted-foreground hover:text-foreground"),
|
|
2988
|
+
children: [/* @__PURE__ */ V(U, {
|
|
3020
2989
|
className: "size-icon-sm",
|
|
3021
2990
|
"aria-hidden": "true"
|
|
3022
|
-
}), /* @__PURE__ */
|
|
2991
|
+
}), /* @__PURE__ */ V(o, {
|
|
3023
2992
|
tag: "span",
|
|
3024
2993
|
size: "pxs",
|
|
3025
2994
|
className: "sr-only",
|
|
3026
|
-
children:
|
|
2995
|
+
children: Q.filterLabel
|
|
3027
2996
|
})]
|
|
3028
2997
|
})]
|
|
3029
|
-
}),
|
|
2998
|
+
}), ye]
|
|
3030
2999
|
})]
|
|
3031
3000
|
})
|
|
3032
|
-
}),
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
children: /* @__PURE__ */ L(Ft, {
|
|
3001
|
+
}), /* @__PURE__ */ V("section", {
|
|
3002
|
+
className: "product-variants-manager--variants min-w-0",
|
|
3003
|
+
children: /* @__PURE__ */ V(It, {
|
|
3036
3004
|
variants: a,
|
|
3037
|
-
optionGroups:
|
|
3038
|
-
groupByOptionId:
|
|
3039
|
-
visibleColumns:
|
|
3040
|
-
optionCombinationDisplay:
|
|
3041
|
-
cellDisplay:
|
|
3042
|
-
selectionMode:
|
|
3043
|
-
renderOptionCombination:
|
|
3044
|
-
renderCell:
|
|
3005
|
+
optionGroups: n,
|
|
3006
|
+
groupByOptionId: Pe,
|
|
3007
|
+
visibleColumns: c,
|
|
3008
|
+
optionCombinationDisplay: d,
|
|
3009
|
+
cellDisplay: f,
|
|
3010
|
+
selectionMode: p,
|
|
3011
|
+
renderOptionCombination: m,
|
|
3012
|
+
renderCell: h,
|
|
3045
3013
|
surface: "embedded",
|
|
3046
|
-
selectedVariantIds:
|
|
3047
|
-
defaultSelectedVariantIds:
|
|
3048
|
-
onSelectedVariantIdsChange:
|
|
3049
|
-
onVariantFieldChange:
|
|
3050
|
-
onVariantFieldBlur:
|
|
3051
|
-
onCreateVariant:
|
|
3052
|
-
onGenerateVariants:
|
|
3053
|
-
onSelectVariant:
|
|
3014
|
+
selectedVariantIds: g,
|
|
3015
|
+
defaultSelectedVariantIds: _,
|
|
3016
|
+
onSelectedVariantIdsChange: v,
|
|
3017
|
+
onVariantFieldChange: y,
|
|
3018
|
+
onVariantFieldBlur: b,
|
|
3019
|
+
onCreateVariant: oe,
|
|
3020
|
+
onGenerateVariants: se,
|
|
3021
|
+
onSelectVariant: L,
|
|
3054
3022
|
onEditVariant: ce,
|
|
3055
3023
|
onDuplicateVariant: le,
|
|
3056
|
-
onDeleteVariant:
|
|
3024
|
+
onDeleteVariant: z,
|
|
3057
3025
|
onBulkEdit: de,
|
|
3058
3026
|
onBulkApply: fe,
|
|
3059
|
-
onBulkDelete:
|
|
3060
|
-
renderVariantActions:
|
|
3061
|
-
renderBulkActions:
|
|
3027
|
+
onBulkDelete: pe,
|
|
3028
|
+
renderVariantActions: me,
|
|
3029
|
+
renderBulkActions: he,
|
|
3062
3030
|
strings: {
|
|
3063
|
-
title:
|
|
3064
|
-
generateLabel:
|
|
3065
|
-
...
|
|
3031
|
+
title: Q.variantsTitle,
|
|
3032
|
+
generateLabel: Q.generateLabel,
|
|
3033
|
+
...Z
|
|
3066
3034
|
}
|
|
3067
3035
|
})
|
|
3068
|
-
})
|
|
3069
|
-
]
|
|
3036
|
+
})]
|
|
3037
|
+
})]
|
|
3070
3038
|
})
|
|
3071
3039
|
});
|
|
3072
3040
|
}
|
|
3073
|
-
|
|
3041
|
+
Lt.displayName = "ProductVariantsManager";
|
|
3074
3042
|
//#endregion
|
|
3075
|
-
export {
|
|
3043
|
+
export { Ye as ProductContractOverview, Xe as ProductDetailsCard, Qe as ProductOperationsCard, Ze as ProductOptionActionMenu, rt as ProductOptionsMatrix, it as ProductOptionsSummary, ft as ProductOverview, at as ProductPoliciesCard, ot as ProductQuotePreviewCard, st as ProductReadinessCard, ct as ProductStructureCard, pt as ProductVariantActionMenu, gt as ProductVariantDetails, vt as ProductVariantEditor, It as ProductVariantsBulkTable, Lt as ProductVariantsManager, dt as ProductVariantsTable, Se as defaultProductContractOverviewStrings, xe as defaultProductDetailsCardStrings, be as defaultProductOperationsCardStrings, we as defaultProductOptionActionMenuStrings, Te as defaultProductOptionsMatrixStrings, Ce as defaultProductOptionsSummaryStrings, je as defaultProductOverviewStrings, X as defaultProductPoliciesCardStrings, Ee as defaultProductQuotePreviewCardStrings, J as defaultProductReadinessCardStrings, Y as defaultProductStructureCardStrings, ke as defaultProductVariantActionMenuStrings, Q as defaultProductVariantDetailsStrings, Ae as defaultProductVariantEditorStrings, De as defaultProductVariantsBulkTableStrings, Oe as defaultProductVariantsManagerStrings, Z as defaultProductVariantsTableStrings };
|
|
3076
3044
|
|
|
3077
3045
|
//# sourceMappingURL=products.js.map
|