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