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