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