@sgftech/medusa-plugin-product-variant-licenses 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cache/admin/index.html +12 -0
- package/.cache/admin/public/locales/ar/translation.json +1919 -0
- package/.cache/admin/public/locales/bg/translation.json +2011 -0
- package/.cache/admin/public/locales/bs/translation.json +2011 -0
- package/.cache/admin/public/locales/cs/translation.json +1942 -0
- package/.cache/admin/public/locales/de/translation.json +1924 -0
- package/.cache/admin/public/locales/en/translation.json +2011 -0
- package/.cache/admin/public/locales/es/translation.json +1924 -0
- package/.cache/admin/public/locales/fr/translation.json +1924 -0
- package/.cache/admin/public/locales/hi/translation.json +2011 -0
- package/.cache/admin/public/locales/hr/translation.json +2011 -0
- package/.cache/admin/public/locales/it/translation.json +1922 -0
- package/.cache/admin/public/locales/ja/translation.json +2006 -0
- package/.cache/admin/public/locales/ko/translation.json +2011 -0
- package/.cache/admin/public/locales/pl/translation.json +1919 -0
- package/.cache/admin/public/locales/pt/translation.json +1925 -0
- package/.cache/admin/public/locales/ru/translation.json +1919 -0
- package/.cache/admin/public/locales/sl/translation.json +2010 -0
- package/.cache/admin/public/locales/tm/translation.json +1924 -0
- package/.cache/admin/public/locales/uk/translation.json +1919 -0
- package/.cache/admin/public/locales/vi/translation.json +2011 -0
- package/.cache/admin/public/locales/zh/translation.json +2011 -0
- package/.cache/admin/public/logo.svg +10 -0
- package/.cache/admin/src/App.tsx +61 -0
- package/.cache/admin/src/assets/styles/emoji-picker.css +109 -0
- package/.cache/admin/src/assets/styles/global.css +465 -0
- package/.cache/admin/src/assets/svg/carrot.svg +5 -0
- package/.cache/admin/src/assets/svg/controller.svg +7 -0
- package/.cache/admin/src/assets/svg/flag.svg +4 -0
- package/.cache/admin/src/assets/svg/happy.svg +6 -0
- package/.cache/admin/src/assets/svg/heart.svg +3 -0
- package/.cache/admin/src/assets/svg/lightbulb.svg +5 -0
- package/.cache/admin/src/assets/svg/plane.svg +3 -0
- package/.cache/admin/src/assets/svg/search.svg +3 -0
- package/.cache/admin/src/assets/svg/sprout.svg +6 -0
- package/.cache/admin/src/assets/svg/star.svg +3 -0
- package/.cache/admin/src/components/atoms/avatar/index.tsx +62 -0
- package/.cache/admin/src/components/atoms/back-button/index.tsx +32 -0
- package/.cache/admin/src/components/atoms/checkbox/index.tsx +32 -0
- package/.cache/admin/src/components/atoms/copy-to-clipboard/index.tsx +59 -0
- package/.cache/admin/src/components/atoms/date-picker/custom-header.tsx +44 -0
- package/.cache/admin/src/components/atoms/date-picker/date-picker.tsx +155 -0
- package/.cache/admin/src/components/atoms/date-picker/time-picker.tsx +103 -0
- package/.cache/admin/src/components/atoms/date-picker/types.tsx +6 -0
- package/.cache/admin/src/components/atoms/date-picker/utils.ts +25 -0
- package/.cache/admin/src/components/atoms/fade-wrapper/index.tsx +47 -0
- package/.cache/admin/src/components/atoms/file-upload-field/index.tsx +105 -0
- package/.cache/admin/src/components/atoms/includes-tax-tooltip/index.tsx +25 -0
- package/.cache/admin/src/components/atoms/input-error/index.tsx +72 -0
- package/.cache/admin/src/components/atoms/loading-container/index.tsx +32 -0
- package/.cache/admin/src/components/atoms/notification/index.tsx +62 -0
- package/.cache/admin/src/components/atoms/number-scroller/index.tsx +51 -0
- package/.cache/admin/src/components/atoms/os-shortcut/index.tsx +48 -0
- package/.cache/admin/src/components/atoms/page-description/index.tsx +20 -0
- package/.cache/admin/src/components/atoms/save-notification/error-state.tsx +49 -0
- package/.cache/admin/src/components/atoms/save-notification/index.tsx +94 -0
- package/.cache/admin/src/components/atoms/save-notification/saving-state.tsx +30 -0
- package/.cache/admin/src/components/atoms/save-notification/success-state.tsx +49 -0
- package/.cache/admin/src/components/atoms/settings-card/index.tsx +58 -0
- package/.cache/admin/src/components/atoms/skeleton/index.tsx +25 -0
- package/.cache/admin/src/components/atoms/spacer/index.tsx +9 -0
- package/.cache/admin/src/components/atoms/spinner.tsx +35 -0
- package/.cache/admin/src/components/atoms/switch/index.tsx +30 -0
- package/.cache/admin/src/components/atoms/text-input/index.tsx +19 -0
- package/.cache/admin/src/components/atoms/thumbnail/index.ts +1 -0
- package/.cache/admin/src/components/atoms/thumbnail/thumbnail.tsx +31 -0
- package/.cache/admin/src/components/atoms/toaster-container/index.tsx +33 -0
- package/.cache/admin/src/components/atoms/tooltip/index.tsx +61 -0
- package/.cache/admin/src/components/atoms/two-step-delete/index.tsx +110 -0
- package/.cache/admin/src/components/declarative-toaster/index.tsx +23 -0
- package/.cache/admin/src/components/extensions/route-container/index.tsx +80 -0
- package/.cache/admin/src/components/extensions/route-container/route-error-element.tsx +75 -0
- package/.cache/admin/src/components/extensions/route-container/use-route-container-props.tsx +8 -0
- package/.cache/admin/src/components/extensions/setting-container/index.tsx +14 -0
- package/.cache/admin/src/components/extensions/setting-container/setting-error-element.tsx +77 -0
- package/.cache/admin/src/components/extensions/setting-container/use-setting-container-props.tsx +7 -0
- package/.cache/admin/src/components/extensions/widget-container/index.tsx +32 -0
- package/.cache/admin/src/components/extensions/widget-container/types.ts +77 -0
- package/.cache/admin/src/components/extensions/widget-container/use-widget-container-props.tsx +31 -0
- package/.cache/admin/src/components/extensions/widget-container/widget-error-boundary.tsx +136 -0
- package/.cache/admin/src/components/forms/customer-group/customer-group-general-form/index.tsx +34 -0
- package/.cache/admin/src/components/forms/discount/discount-conditions-form/index.tsx +0 -0
- package/.cache/admin/src/components/forms/discount/discount-configuration-form/index.tsx +159 -0
- package/.cache/admin/src/components/forms/discount/discount-general-form/index.tsx +192 -0
- package/.cache/admin/src/components/forms/general/address-contact-form/index.tsx +87 -0
- package/.cache/admin/src/components/forms/general/address-location-form/index.tsx +129 -0
- package/.cache/admin/src/components/forms/general/metadata-form/index.tsx +371 -0
- package/.cache/admin/src/components/forms/general/prices-form/price-form-input.tsx +92 -0
- package/.cache/admin/src/components/forms/gift-card/denomination-form/index.tsx +183 -0
- package/.cache/admin/src/components/forms/gift-card/gift-card-balance-form/index.tsx +67 -0
- package/.cache/admin/src/components/forms/gift-card/gift-card-ends-at-form/index.tsx +57 -0
- package/.cache/admin/src/components/forms/gift-card/gift-card-receiver-form/index.tsx +43 -0
- package/.cache/admin/src/components/forms/gift-card/gift-card-region-form/index.tsx +78 -0
- package/.cache/admin/src/components/forms/product/customs-form/index.tsx +75 -0
- package/.cache/admin/src/components/forms/product/dimensions-form/index.tsx +74 -0
- package/.cache/admin/src/components/forms/product/discountable-form/index.tsx +36 -0
- package/.cache/admin/src/components/forms/product/general-form/index.tsx +109 -0
- package/.cache/admin/src/components/forms/product/media-form/index.tsx +233 -0
- package/.cache/admin/src/components/forms/product/organize-form/index.tsx +131 -0
- package/.cache/admin/src/components/forms/product/organize-form/use-organize-data.tsx +63 -0
- package/.cache/admin/src/components/forms/product/sales-channels-modal/add-screen.tsx +132 -0
- package/.cache/admin/src/components/forms/product/sales-channels-modal/available-screen.tsx +89 -0
- package/.cache/admin/src/components/forms/product/sales-channels-modal/index.tsx +55 -0
- package/.cache/admin/src/components/forms/product/sales-channels-modal/table.tsx +227 -0
- package/.cache/admin/src/components/forms/product/sales-channels-modal/use-sales-channels-modal.tsx +23 -0
- package/.cache/admin/src/components/forms/product/thumbnail-form/index.tsx +113 -0
- package/.cache/admin/src/components/forms/product/variant-form/create-flow-variant-form/index.tsx +105 -0
- package/.cache/admin/src/components/forms/product/variant-form/edit-flow-variant-form/index.tsx +137 -0
- package/.cache/admin/src/components/forms/product/variant-form/variant-general-form/index.tsx +50 -0
- package/.cache/admin/src/components/forms/product/variant-form/variant-select-options-form/hooks.tsx +74 -0
- package/.cache/admin/src/components/forms/product/variant-form/variant-select-options-form/index.tsx +77 -0
- package/.cache/admin/src/components/forms/product/variant-form/variant-stock-form/index.tsx +241 -0
- package/.cache/admin/src/components/forms/product/variant-inventory-form/edit-flow-variant-form/index.tsx +44 -0
- package/.cache/admin/src/components/forms/product/variant-inventory-form/variant-stock-form/index.tsx +429 -0
- package/.cache/admin/src/components/fundamentals/badge/index.tsx +46 -0
- package/.cache/admin/src/components/fundamentals/button/index.tsx +79 -0
- package/.cache/admin/src/components/fundamentals/details-icon/contact.svg +7 -0
- package/.cache/admin/src/components/fundamentals/details-icon/index.tsx +57 -0
- package/.cache/admin/src/components/fundamentals/feature-toggle.tsx +21 -0
- package/.cache/admin/src/components/fundamentals/icon-badge/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/adjustments-icon.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/alert-icon/index.tsx +43 -0
- package/.cache/admin/src/components/fundamentals/icons/arrow-down-icon.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/arrow-left-icon/index.tsx +35 -0
- package/.cache/admin/src/components/fundamentals/icons/arrow-right-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/arrow-top-right-icon/index.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/arrow-up-icon.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/arrow-uturn-left/index.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/back-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/backspace-icon/index.tsx +42 -0
- package/.cache/admin/src/components/fundamentals/icons/bell-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/bell-noti-icon/index.tsx +41 -0
- package/.cache/admin/src/components/fundamentals/icons/bell-off-icon/index.tsx +57 -0
- package/.cache/admin/src/components/fundamentals/icons/building-tax-icon.tsx +67 -0
- package/.cache/admin/src/components/fundamentals/icons/buildings-icon/index.tsx +64 -0
- package/.cache/admin/src/components/fundamentals/icons/calendar-icon.tsx +54 -0
- package/.cache/admin/src/components/fundamentals/icons/cancel-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/cart-icon/index.tsx +49 -0
- package/.cache/admin/src/components/fundamentals/icons/cash-icon/index.tsx +99 -0
- package/.cache/admin/src/components/fundamentals/icons/channels-icon.tsx +65 -0
- package/.cache/admin/src/components/fundamentals/icons/check-circle-fill-icon/index.tsx +28 -0
- package/.cache/admin/src/components/fundamentals/icons/check-circle-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/check-icon.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/chevron-down.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/chevron-left-icon/index.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/chevron-right-icon/index.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/chevron-up.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/circle-quarter-solid/index.tsx +24 -0
- package/.cache/admin/src/components/fundamentals/icons/clipboard-copy-icon/index.tsx +50 -0
- package/.cache/admin/src/components/fundamentals/icons/clock-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/coins-icon/index.tsx +50 -0
- package/.cache/admin/src/components/fundamentals/icons/corner-down-right-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/cross-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/crosshair-icon/index.tsx +57 -0
- package/.cache/admin/src/components/fundamentals/icons/customer-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/details-icon.tsx +57 -0
- package/.cache/admin/src/components/fundamentals/icons/discord-icon.tsx +26 -0
- package/.cache/admin/src/components/fundamentals/icons/dollar-sign-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/down-left/index.tsx +34 -0
- package/.cache/admin/src/components/fundamentals/icons/download-icon.tsx +42 -0
- package/.cache/admin/src/components/fundamentals/icons/duplicate-icon.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/edit-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/edit-icon.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/ellipsis-vertical-icon/index.tsx +26 -0
- package/.cache/admin/src/components/fundamentals/icons/export-icon/index.tsx +43 -0
- package/.cache/admin/src/components/fundamentals/icons/eye-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/eye-off-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/fast-delivery-icon/index.tsx +64 -0
- package/.cache/admin/src/components/fundamentals/icons/file-icon.tsx +55 -0
- package/.cache/admin/src/components/fundamentals/icons/folder-open-icon/index.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/gear-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/gift-icon/index.tsx +57 -0
- package/.cache/admin/src/components/fundamentals/icons/grip-icon.tsx +64 -0
- package/.cache/admin/src/components/fundamentals/icons/happy-icon/index.tsx +50 -0
- package/.cache/admin/src/components/fundamentals/icons/help-circle.tsx +43 -0
- package/.cache/admin/src/components/fundamentals/icons/image-placeholder-icon/index.tsx +43 -0
- package/.cache/admin/src/components/fundamentals/icons/info-icon/index.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/key-icon.tsx +30 -0
- package/.cache/admin/src/components/fundamentals/icons/list-arrow-icon/index.tsx +57 -0
- package/.cache/admin/src/components/fundamentals/icons/list-icon.tsx +64 -0
- package/.cache/admin/src/components/fundamentals/icons/lock-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/log-out-icon/index.tsx +43 -0
- package/.cache/admin/src/components/fundamentals/icons/long-arrow-right-icon/index.tsx +38 -0
- package/.cache/admin/src/components/fundamentals/icons/mail-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/map-pin-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/medusa-icon/index.tsx +27 -0
- package/.cache/admin/src/components/fundamentals/icons/medusa-vice/index.tsx +39 -0
- package/.cache/admin/src/components/fundamentals/icons/minus-icon/index.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/more-horizontal-icon.tsx +43 -0
- package/.cache/admin/src/components/fundamentals/icons/package-icon/index.tsx +50 -0
- package/.cache/admin/src/components/fundamentals/icons/percent-icon/index.tsx +43 -0
- package/.cache/admin/src/components/fundamentals/icons/plus-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/pointer-icon/index.tsx +35 -0
- package/.cache/admin/src/components/fundamentals/icons/publish-icon/index.tsx +57 -0
- package/.cache/admin/src/components/fundamentals/icons/refresh-icon.tsx +50 -0
- package/.cache/admin/src/components/fundamentals/icons/refund.tsx +57 -0
- package/.cache/admin/src/components/fundamentals/icons/reorder-icon/index.tsx +64 -0
- package/.cache/admin/src/components/fundamentals/icons/sad-face-icon/index.tsx +50 -0
- package/.cache/admin/src/components/fundamentals/icons/sale-icon/index.tsx +50 -0
- package/.cache/admin/src/components/fundamentals/icons/search-icon/index.tsx +27 -0
- package/.cache/admin/src/components/fundamentals/icons/send-icon/index.tsx +33 -0
- package/.cache/admin/src/components/fundamentals/icons/sided-mouth-face/index.tsx +50 -0
- package/.cache/admin/src/components/fundamentals/icons/sorting-icon/index.tsx +54 -0
- package/.cache/admin/src/components/fundamentals/icons/sparkles-icon/index.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/squares-plus/index.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/stop-icon.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/swatch-icon/index.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/tag-dot-icon/index.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/tag-icon/index.tsx +36 -0
- package/.cache/admin/src/components/fundamentals/icons/taxes-icon.tsx +54 -0
- package/.cache/admin/src/components/fundamentals/icons/tile-icon.tsx +50 -0
- package/.cache/admin/src/components/fundamentals/icons/trash-icon.tsx +50 -0
- package/.cache/admin/src/components/fundamentals/icons/triangle-mini-icon/index.tsx +28 -0
- package/.cache/admin/src/components/fundamentals/icons/triangle-right-icon/index.tsx +28 -0
- package/.cache/admin/src/components/fundamentals/icons/truck-icon/index.tsx +43 -0
- package/.cache/admin/src/components/fundamentals/icons/types/icon-type.ts +8 -0
- package/.cache/admin/src/components/fundamentals/icons/u-turn-icon.tsx +29 -0
- package/.cache/admin/src/components/fundamentals/icons/unpublish-icon/index.tsx +57 -0
- package/.cache/admin/src/components/fundamentals/icons/upload-icon/index.tsx +43 -0
- package/.cache/admin/src/components/fundamentals/icons/users-icon/index.tsx +50 -0
- package/.cache/admin/src/components/fundamentals/icons/warning-circle.tsx +81 -0
- package/.cache/admin/src/components/fundamentals/icons/x-circle-icon.tsx +43 -0
- package/.cache/admin/src/components/fundamentals/image-placeholder.tsx +11 -0
- package/.cache/admin/src/components/fundamentals/input-container.tsx +37 -0
- package/.cache/admin/src/components/fundamentals/input-header.tsx +38 -0
- package/.cache/admin/src/components/fundamentals/status-indicator/index.tsx +36 -0
- package/.cache/admin/src/components/helpers/form/form.tsx +187 -0
- package/.cache/admin/src/components/helpers/form/index.ts +1 -0
- package/.cache/admin/src/components/molecules/actionables.tsx +115 -0
- package/.cache/admin/src/components/molecules/activity-card/index.tsx +68 -0
- package/.cache/admin/src/components/molecules/amount-input/amount-and-currency-input.tsx +134 -0
- package/.cache/admin/src/components/molecules/amount-input/amount-input.tsx +91 -0
- package/.cache/admin/src/components/molecules/amount-input/index.ts +4 -0
- package/.cache/admin/src/components/molecules/availability-duration/index.tsx +86 -0
- package/.cache/admin/src/components/molecules/banner-card/index.tsx +74 -0
- package/.cache/admin/src/components/molecules/batch-job-file-card/index.tsx +67 -0
- package/.cache/admin/src/components/molecules/collapsible-tree/index.tsx +186 -0
- package/.cache/admin/src/components/molecules/connected-form.tsx +20 -0
- package/.cache/admin/src/components/molecules/customer-avatar-item/index.tsx +34 -0
- package/.cache/admin/src/components/molecules/customers-groups-summary/index.tsx +33 -0
- package/.cache/admin/src/components/molecules/delimited-list/index.tsx +44 -0
- package/.cache/admin/src/components/molecules/emoji-picker/index.tsx +41 -0
- package/.cache/admin/src/components/molecules/filter-dropdown/container.tsx +99 -0
- package/.cache/admin/src/components/molecules/filter-dropdown/item.tsx +556 -0
- package/.cache/admin/src/components/molecules/filter-dropdown/save-field.tsx +48 -0
- package/.cache/admin/src/components/molecules/filter-menu/filter-menu.tsx +496 -0
- package/.cache/admin/src/components/molecules/filter-menu/index.ts +1 -0
- package/.cache/admin/src/components/molecules/filter-tab/index.tsx +62 -0
- package/.cache/admin/src/components/molecules/form-error-toaster/index.tsx +41 -0
- package/.cache/admin/src/components/molecules/form-toaster/index.tsx +177 -0
- package/.cache/admin/src/components/molecules/generating-input/index.tsx +93 -0
- package/.cache/admin/src/components/molecules/grid-input/index.tsx +15 -0
- package/.cache/admin/src/components/molecules/hot-key-action/index.tsx +23 -0
- package/.cache/admin/src/components/molecules/icon-tooltip/index.tsx +36 -0
- package/.cache/admin/src/components/molecules/indeterminate-checkbox/index.tsx +84 -0
- package/.cache/admin/src/components/molecules/input/index.tsx +165 -0
- package/.cache/admin/src/components/molecules/input-signin/index.tsx +101 -0
- package/.cache/admin/src/components/molecules/item-search/index.tsx +110 -0
- package/.cache/admin/src/components/molecules/json-view/index.tsx +94 -0
- package/.cache/admin/src/components/molecules/location-dropdown/index.tsx +50 -0
- package/.cache/admin/src/components/molecules/modal/focus-modal.tsx +114 -0
- package/.cache/admin/src/components/molecules/modal/index.tsx +167 -0
- package/.cache/admin/src/components/molecules/modal/layered-modal.tsx +163 -0
- package/.cache/admin/src/components/molecules/modal/side-modal.tsx +63 -0
- package/.cache/admin/src/components/molecules/modal/stepped-modal.tsx +227 -0
- package/.cache/admin/src/components/molecules/native-select/index.tsx +68 -0
- package/.cache/admin/src/components/molecules/note-input/index.tsx +76 -0
- package/.cache/admin/src/components/molecules/notification-bell/index.tsx +21 -0
- package/.cache/admin/src/components/molecules/numbered-item/index.tsx +52 -0
- package/.cache/admin/src/components/molecules/order-status/index.tsx +113 -0
- package/.cache/admin/src/components/molecules/rma-select-shipping/index.tsx +54 -0
- package/.cache/admin/src/components/molecules/sales-channels-display/index.tsx +82 -0
- package/.cache/admin/src/components/molecules/sales-channels-list/index.tsx +46 -0
- package/.cache/admin/src/components/molecules/sales-channels-summary/index.tsx +39 -0
- package/.cache/admin/src/components/molecules/search-bar.tsx +49 -0
- package/.cache/admin/src/components/molecules/section/index.tsx +32 -0
- package/.cache/admin/src/components/molecules/select/index.tsx +240 -0
- package/.cache/admin/src/components/molecules/select/next-select/components/containers.tsx +190 -0
- package/.cache/admin/src/components/molecules/select/next-select/components/control.tsx +149 -0
- package/.cache/admin/src/components/molecules/select/next-select/components/index.ts +39 -0
- package/.cache/admin/src/components/molecules/select/next-select/components/input.tsx +36 -0
- package/.cache/admin/src/components/molecules/select/next-select/components/menu.tsx +344 -0
- package/.cache/admin/src/components/molecules/select/next-select/components/multi-value.tsx +118 -0
- package/.cache/admin/src/components/molecules/select/next-select/components/placeholder.tsx +32 -0
- package/.cache/admin/src/components/molecules/select/next-select/components/select-primitives.ts +3 -0
- package/.cache/admin/src/components/molecules/select/next-select/components/single-value.tsx +74 -0
- package/.cache/admin/src/components/molecules/select/next-select/createable-select/index.tsx +40 -0
- package/.cache/admin/src/components/molecules/select/next-select/index.tsx +4 -0
- package/.cache/admin/src/components/molecules/select/next-select/module-augmentation.ts +74 -0
- package/.cache/admin/src/components/molecules/select/next-select/select/index.tsx +63 -0
- package/.cache/admin/src/components/molecules/select/next-select/use-select-props.tsx +85 -0
- package/.cache/admin/src/components/molecules/select/next-select/utils.tsx +83 -0
- package/.cache/admin/src/components/molecules/select/select-components.tsx +313 -0
- package/.cache/admin/src/components/molecules/shipping-option/index.tsx +70 -0
- package/.cache/admin/src/components/molecules/sidebar-company-logo/index.tsx +20 -0
- package/.cache/admin/src/components/molecules/sidebar-menu-item/index.tsx +80 -0
- package/.cache/admin/src/components/molecules/sidebar-team-member/index.tsx +28 -0
- package/.cache/admin/src/components/molecules/status-selector/index.tsx +55 -0
- package/.cache/admin/src/components/molecules/switchable-item/index.tsx +55 -0
- package/.cache/admin/src/components/molecules/table/filtering-option.tsx +96 -0
- package/.cache/admin/src/components/molecules/table/index.tsx +265 -0
- package/.cache/admin/src/components/molecules/table/table-search.tsx +47 -0
- package/.cache/admin/src/components/molecules/table-fileds-filter/index.tsx +200 -0
- package/.cache/admin/src/components/molecules/table-pagination/index.ts +1 -0
- package/.cache/admin/src/components/molecules/table-pagination/table-pagination.tsx +77 -0
- package/.cache/admin/src/components/molecules/table-toaster/index.tsx +27 -0
- package/.cache/admin/src/components/molecules/tag-grid/index.tsx +38 -0
- package/.cache/admin/src/components/molecules/tag-input/index.tsx +232 -0
- package/.cache/admin/src/components/molecules/textarea/index.tsx +114 -0
- package/.cache/admin/src/components/molecules/timeline-events/claim-event/index.tsx +267 -0
- package/.cache/admin/src/components/molecules/timeline-events/event-actionables.tsx +20 -0
- package/.cache/admin/src/components/molecules/timeline-events/event-container.tsx +108 -0
- package/.cache/admin/src/components/molecules/timeline-events/event-item-container.tsx +48 -0
- package/.cache/admin/src/components/molecules/timeline-events/event-type.ts +5 -0
- package/.cache/admin/src/components/molecules/timeline-events/exchange.tsx +336 -0
- package/.cache/admin/src/components/molecules/timeline-events/items-fulfilled.tsx +38 -0
- package/.cache/admin/src/components/molecules/timeline-events/items-shipped.tsx +37 -0
- package/.cache/admin/src/components/molecules/timeline-events/note.tsx +73 -0
- package/.cache/admin/src/components/molecules/timeline-events/notification/index.tsx +66 -0
- package/.cache/admin/src/components/molecules/timeline-events/notification/resend-modal.tsx +99 -0
- package/.cache/admin/src/components/molecules/timeline-events/order-canceled.tsx +20 -0
- package/.cache/admin/src/components/molecules/timeline-events/order-edit/canceled.tsx +26 -0
- package/.cache/admin/src/components/molecules/timeline-events/order-edit/confirmed.tsx +40 -0
- package/.cache/admin/src/components/molecules/timeline-events/order-edit/created.tsx +289 -0
- package/.cache/admin/src/components/molecules/timeline-events/order-edit/declined.tsx +46 -0
- package/.cache/admin/src/components/molecules/timeline-events/order-edit/index.tsx +27 -0
- package/.cache/admin/src/components/molecules/timeline-events/order-edit/payment-required.tsx +77 -0
- package/.cache/admin/src/components/molecules/timeline-events/order-edit/refund-required.tsx +73 -0
- package/.cache/admin/src/components/molecules/timeline-events/order-edit/requested.tsx +62 -0
- package/.cache/admin/src/components/molecules/timeline-events/order-placed.tsx +29 -0
- package/.cache/admin/src/components/molecules/timeline-events/refund.tsx +43 -0
- package/.cache/admin/src/components/molecules/timeline-events/return.tsx +151 -0
- package/.cache/admin/src/components/molecules/tooltip-icon/index.tsx +20 -0
- package/.cache/admin/src/components/molecules/user-menu/index.tsx +76 -0
- package/.cache/admin/src/components/organisms/accordion/index.tsx +113 -0
- package/.cache/admin/src/components/organisms/activity-drawer/index.tsx +87 -0
- package/.cache/admin/src/components/organisms/analytics-config-form/index.tsx +125 -0
- package/.cache/admin/src/components/organisms/analytics-preferences/index.tsx +150 -0
- package/.cache/admin/src/components/organisms/batch-jobs-activity-list/index.tsx +255 -0
- package/.cache/admin/src/components/organisms/batch-jobs-activity-list/utils.ts +43 -0
- package/.cache/admin/src/components/organisms/body-card.tsx +133 -0
- package/.cache/admin/src/components/organisms/confirmation-prompt.tsx +71 -0
- package/.cache/admin/src/components/organisms/currency-input/index.tsx +303 -0
- package/.cache/admin/src/components/organisms/custom-table-header/index.tsx +37 -0
- package/.cache/admin/src/components/organisms/delete-prompt.tsx +96 -0
- package/.cache/admin/src/components/organisms/details-collapsible/index.tsx +60 -0
- package/.cache/admin/src/components/organisms/edit-user-modal/index.tsx +145 -0
- package/.cache/admin/src/components/organisms/error-boundary/index.tsx +203 -0
- package/.cache/admin/src/components/organisms/export-modal/index.tsx +64 -0
- package/.cache/admin/src/components/organisms/file-upload-modal/index.tsx +36 -0
- package/.cache/admin/src/components/organisms/gift-card-banner/index.tsx +104 -0
- package/.cache/admin/src/components/organisms/gift-card-denominations-section/add-denominations-modal.tsx +198 -0
- package/.cache/admin/src/components/organisms/gift-card-denominations-section/denominations-table.tsx +75 -0
- package/.cache/admin/src/components/organisms/gift-card-denominations-section/edit-denominations-modal.tsx +211 -0
- package/.cache/admin/src/components/organisms/gift-card-denominations-section/index.tsx +56 -0
- package/.cache/admin/src/components/organisms/gift-card-denominations-section/use-denominations-columns.tsx +207 -0
- package/.cache/admin/src/components/organisms/help-dialog/index.tsx +103 -0
- package/.cache/admin/src/components/organisms/invite-modal/index.tsx +136 -0
- package/.cache/admin/src/components/organisms/login-card/index.tsx +119 -0
- package/.cache/admin/src/components/organisms/medusa-price-input/index.tsx +53 -0
- package/.cache/admin/src/components/organisms/metadata/index.tsx +150 -0
- package/.cache/admin/src/components/organisms/price-input/index.tsx +64 -0
- package/.cache/admin/src/components/organisms/product-attributes-section/attribute-modal.tsx +153 -0
- package/.cache/admin/src/components/organisms/product-attributes-section/index.tsx +98 -0
- package/.cache/admin/src/components/organisms/product-general-section/channels-modal.tsx +54 -0
- package/.cache/admin/src/components/organisms/product-general-section/general-modal.tsx +185 -0
- package/.cache/admin/src/components/organisms/product-general-section/index.tsx +217 -0
- package/.cache/admin/src/components/organisms/product-media-section/index.tsx +51 -0
- package/.cache/admin/src/components/organisms/product-media-section/media-modal.tsx +151 -0
- package/.cache/admin/src/components/organisms/product-raw-section/index.tsx +28 -0
- package/.cache/admin/src/components/organisms/product-thumbnail-section/index.tsx +96 -0
- package/.cache/admin/src/components/organisms/product-thumbnail-section/thumbnail-modal.tsx +158 -0
- package/.cache/admin/src/components/organisms/product-variant-tree/index.tsx +89 -0
- package/.cache/admin/src/components/organisms/product-variants-section/add-variant-modal.tsx +214 -0
- package/.cache/admin/src/components/organisms/product-variants-section/edit-prices-modal/currency-cell.tsx +243 -0
- package/.cache/admin/src/components/organisms/product-variants-section/edit-prices-modal/edit-prices-actions.tsx +106 -0
- package/.cache/admin/src/components/organisms/product-variants-section/edit-prices-modal/edit-prices-table.tsx +842 -0
- package/.cache/admin/src/components/organisms/product-variants-section/edit-prices-modal/index.tsx +387 -0
- package/.cache/admin/src/components/organisms/product-variants-section/edit-prices-modal/save-prompt.tsx +111 -0
- package/.cache/admin/src/components/organisms/product-variants-section/edit-prices-modal/utils.ts +84 -0
- package/.cache/admin/src/components/organisms/product-variants-section/edit-variant-inventory-modal.tsx +354 -0
- package/.cache/admin/src/components/organisms/product-variants-section/edit-variant-modal.tsx +217 -0
- package/.cache/admin/src/components/organisms/product-variants-section/edit-variants-modal/edit-variant-screen.tsx +153 -0
- package/.cache/admin/src/components/organisms/product-variants-section/edit-variants-modal/index.tsx +204 -0
- package/.cache/admin/src/components/organisms/product-variants-section/edit-variants-modal/use-edit-variants-modal.tsx +20 -0
- package/.cache/admin/src/components/organisms/product-variants-section/edit-variants-modal/variant-card.tsx +170 -0
- package/.cache/admin/src/components/organisms/product-variants-section/index.tsx +241 -0
- package/.cache/admin/src/components/organisms/product-variants-section/options-modal.tsx +273 -0
- package/.cache/admin/src/components/organisms/product-variants-section/options-provider.tsx +47 -0
- package/.cache/admin/src/components/organisms/product-variants-section/table.tsx +234 -0
- package/.cache/admin/src/components/organisms/radio-group/index.tsx +174 -0
- package/.cache/admin/src/components/organisms/raw-json/index.tsx +38 -0
- package/.cache/admin/src/components/organisms/reset-token-card/index.tsx +129 -0
- package/.cache/admin/src/components/organisms/rma-return-product-table/index.tsx +120 -0
- package/.cache/admin/src/components/organisms/rma-select-product-table/index.tsx +316 -0
- package/.cache/admin/src/components/organisms/section/index.tsx +52 -0
- package/.cache/admin/src/components/organisms/sidebar/index.tsx +142 -0
- package/.cache/admin/src/components/organisms/table-container/index.tsx +50 -0
- package/.cache/admin/src/components/organisms/table-container/pagination.tsx +86 -0
- package/.cache/admin/src/components/organisms/table-container/types.ts +12 -0
- package/.cache/admin/src/components/organisms/timeline/index.tsx +224 -0
- package/.cache/admin/src/components/organisms/topbar/index.tsx +62 -0
- package/.cache/admin/src/components/organisms/upload-modal/index.tsx +326 -0
- package/.cache/admin/src/components/private-route/index.tsx +31 -0
- package/.cache/admin/src/components/seo/index.tsx +80 -0
- package/.cache/admin/src/components/templates/add-products-modal/index.tsx +117 -0
- package/.cache/admin/src/components/templates/add-products-modal/product-table-config.tsx +106 -0
- package/.cache/admin/src/components/templates/add-products-modal/utils.ts +32 -0
- package/.cache/admin/src/components/templates/address-form.tsx +191 -0
- package/.cache/admin/src/components/templates/collection-modal/index.tsx +237 -0
- package/.cache/admin/src/components/templates/collection-product-table/add-product-table.tsx +240 -0
- package/.cache/admin/src/components/templates/collection-product-table/index.tsx +198 -0
- package/.cache/admin/src/components/templates/collection-product-table/types.ts +11 -0
- package/.cache/admin/src/components/templates/collection-product-table/use-collection-product-columns.tsx +48 -0
- package/.cache/admin/src/components/templates/collection-product-table/use-sorting-options.tsx +89 -0
- package/.cache/admin/src/components/templates/collection-product-table/use-view-product-columns.tsx +59 -0
- package/.cache/admin/src/components/templates/collection-product-table/utils.tsx +64 -0
- package/.cache/admin/src/components/templates/collection-product-table/view-products-table.tsx +205 -0
- package/.cache/admin/src/components/templates/collections-table/index.tsx +192 -0
- package/.cache/admin/src/components/templates/collections-table/use-collection-actions.tsx +48 -0
- package/.cache/admin/src/components/templates/collections-table/use-collection-column.tsx +54 -0
- package/.cache/admin/src/components/templates/customer-group-table/config.tsx +105 -0
- package/.cache/admin/src/components/templates/customer-group-table/customer-groups-table.tsx +295 -0
- package/.cache/admin/src/components/templates/customer-group-table/customers-list-table.tsx +240 -0
- package/.cache/admin/src/components/templates/customer-group-table/edit-customers-table.tsx +252 -0
- package/.cache/admin/src/components/templates/customer-orders-table/index.tsx +159 -0
- package/.cache/admin/src/components/templates/customer-orders-table/use-customer-orders-columns.tsx +221 -0
- package/.cache/admin/src/components/templates/customer-table/index.tsx +208 -0
- package/.cache/admin/src/components/templates/customer-table/use-customer-columns.tsx +54 -0
- package/.cache/admin/src/components/templates/customer-table/use-customer-filters.tsx +213 -0
- package/.cache/admin/src/components/templates/discount-filter-dropdown/index.tsx +142 -0
- package/.cache/admin/src/components/templates/discount-table/index.tsx +239 -0
- package/.cache/admin/src/components/templates/discount-table/use-copy-promotion.tsx +87 -0
- package/.cache/admin/src/components/templates/discount-table/use-promotion-columns.tsx +186 -0
- package/.cache/admin/src/components/templates/discount-table/use-promotion-filters.tsx +519 -0
- package/.cache/admin/src/components/templates/discount-table/use-promotion-row-actions.tsx +103 -0
- package/.cache/admin/src/components/templates/draft-order-table/index.tsx +168 -0
- package/.cache/admin/src/components/templates/draft-order-table/use-draft-order-column.tsx +94 -0
- package/.cache/admin/src/components/templates/draft-order-table/use-draft-order-filters.ts +213 -0
- package/.cache/admin/src/components/templates/gift-card-filter-dropdown/index.tsx +188 -0
- package/.cache/admin/src/components/templates/gift-card-table/index.tsx +199 -0
- package/.cache/admin/src/components/templates/gift-card-table/use-gift-card-column.tsx +113 -0
- package/.cache/admin/src/components/templates/gift-card-table/use-gift-card-filters.ts +591 -0
- package/.cache/admin/src/components/templates/image-table/index.tsx +165 -0
- package/.cache/admin/src/components/templates/inventory-table/index.tsx +499 -0
- package/.cache/admin/src/components/templates/inventory-table/use-inventory-column.tsx +111 -0
- package/.cache/admin/src/components/templates/inventory-table/use-inventory-filters.ts +467 -0
- package/.cache/admin/src/components/templates/layout.tsx +30 -0
- package/.cache/admin/src/components/templates/login-layout.tsx +62 -0
- package/.cache/admin/src/components/templates/order-filter-dropdown/index.tsx +263 -0
- package/.cache/admin/src/components/templates/order-table/index.tsx +243 -0
- package/.cache/admin/src/components/templates/order-table/use-order-column.tsx +155 -0
- package/.cache/admin/src/components/templates/order-table/use-order-filters.ts +644 -0
- package/.cache/admin/src/components/templates/price-list-table/price-list-filters.tsx +135 -0
- package/.cache/admin/src/components/templates/price-list-table/price-list-table.tsx +203 -0
- package/.cache/admin/src/components/templates/price-list-table/use-copy-price-list.tsx +69 -0
- package/.cache/admin/src/components/templates/price-list-table/use-price-list-actions.tsx +99 -0
- package/.cache/admin/src/components/templates/price-list-table/use-price-list-columns.tsx +80 -0
- package/.cache/admin/src/components/templates/price-list-table/use-price-list-filters.tsx +495 -0
- package/.cache/admin/src/components/templates/price-list-table/utils.tsx +42 -0
- package/.cache/admin/src/components/templates/price-overrides/index.tsx +232 -0
- package/.cache/admin/src/components/templates/price-overrides/price-amount.tsx +76 -0
- package/.cache/admin/src/components/templates/product-table/index.tsx +271 -0
- package/.cache/admin/src/components/templates/product-table/overview.tsx +106 -0
- package/.cache/admin/src/components/templates/product-table/use-copy-product.ts +208 -0
- package/.cache/admin/src/components/templates/product-table/use-filter-tabs.tsx +487 -0
- package/.cache/admin/src/components/templates/product-table/use-product-actions.tsx +133 -0
- package/.cache/admin/src/components/templates/product-table/use-product-column.tsx +146 -0
- package/.cache/admin/src/components/templates/product-table/use-product-filters.ts +604 -0
- package/.cache/admin/src/components/templates/reservations-table/components/reservation-form/index.tsx +172 -0
- package/.cache/admin/src/components/templates/reservations-table/components/reservations-filter/index.tsx +906 -0
- package/.cache/admin/src/components/templates/reservations-table/index.tsx +442 -0
- package/.cache/admin/src/components/templates/reservations-table/new/index.tsx +133 -0
- package/.cache/admin/src/components/templates/reservations-table/use-reservation-filters.ts +331 -0
- package/.cache/admin/src/components/templates/reservations-table/use-reservations-columns.tsx +47 -0
- package/.cache/admin/src/components/templates/search-modal/index.tsx +168 -0
- package/.cache/admin/src/components/templates/search-modal/keyboard-shortcuts.tsx +47 -0
- package/.cache/admin/src/components/templates/search-modal/results/customer-results.tsx +68 -0
- package/.cache/admin/src/components/templates/search-modal/results/discount-results.tsx +63 -0
- package/.cache/admin/src/components/templates/search-modal/results/order-results.tsx +62 -0
- package/.cache/admin/src/components/templates/search-modal/results/product-results.tsx +68 -0
- package/.cache/admin/src/components/templates/search-modal/section-collapsible.tsx +28 -0
- package/.cache/admin/src/components/templates/search-modal/use-keyboard-navigation-list.tsx +117 -0
- package/.cache/admin/src/components/templates/selectable-table/index.tsx +211 -0
- package/.cache/admin/src/components/templates/settings-overview.tsx +25 -0
- package/.cache/admin/src/components/templates/transfer-orders-modal/index.tsx +263 -0
- package/.cache/admin/src/components/templates/two-split-pane.tsx +54 -0
- package/.cache/admin/src/components/templates/user-table.tsx +373 -0
- package/.cache/admin/src/constants/analytics.ts +1 -0
- package/.cache/admin/src/constants/forbidden-routes.ts +59 -0
- package/.cache/admin/src/constants/injection-zones.ts +52 -0
- package/.cache/admin/src/constants/medusa-backend-url.ts +2 -0
- package/.cache/admin/src/constants/query-client.ts +11 -0
- package/.cache/admin/src/domain/categories/components/multiselect/index.tsx +401 -0
- package/.cache/admin/src/domain/categories/utils/transform-response.ts +12 -0
- package/.cache/admin/src/domain/collections/details/index.tsx +284 -0
- package/.cache/admin/src/domain/collections/index.tsx +27 -0
- package/.cache/admin/src/domain/customers/details/edit.tsx +187 -0
- package/.cache/admin/src/domain/customers/details/index.tsx +187 -0
- package/.cache/admin/src/domain/customers/groups/customer-group-modal.tsx +191 -0
- package/.cache/admin/src/domain/customers/groups/details.tsx +314 -0
- package/.cache/admin/src/domain/customers/groups/index.tsx +100 -0
- package/.cache/admin/src/domain/customers/header.tsx +28 -0
- package/.cache/admin/src/domain/customers/index.tsx +74 -0
- package/.cache/admin/src/domain/discounts/details/conditions/add-condition/conditions-provider.tsx +198 -0
- package/.cache/admin/src/domain/discounts/details/conditions/add-condition/index.tsx +30 -0
- package/.cache/admin/src/domain/discounts/details/conditions/edit-condition/add-condition-resources/collections/add-collections.tsx +82 -0
- package/.cache/admin/src/domain/discounts/details/conditions/edit-condition/add-condition-resources/collections/collections-conditions-table.tsx +82 -0
- package/.cache/admin/src/domain/discounts/details/conditions/edit-condition/add-condition-resources/customer-groups/add-customer-groups.tsx +83 -0
- package/.cache/admin/src/domain/discounts/details/conditions/edit-condition/add-condition-resources/customer-groups/customer-groups-conditions-table.tsx +82 -0
- package/.cache/admin/src/domain/discounts/details/conditions/edit-condition/add-condition-resources/product-types/add-types.tsx +84 -0
- package/.cache/admin/src/domain/discounts/details/conditions/edit-condition/add-condition-resources/product-types/type-conditions-table.tsx +82 -0
- package/.cache/admin/src/domain/discounts/details/conditions/edit-condition/add-condition-resources/products/add-products.tsx +79 -0
- package/.cache/admin/src/domain/discounts/details/conditions/edit-condition/add-condition-resources/products/product-conditions-table.tsx +84 -0
- package/.cache/admin/src/domain/discounts/details/conditions/edit-condition/add-condition-resources/tags/add-tags.tsx +80 -0
- package/.cache/admin/src/domain/discounts/details/conditions/edit-condition/add-condition-resources/tags/tags-conditions-table.tsx +80 -0
- package/.cache/admin/src/domain/discounts/details/conditions/edit-condition/add-conditions-screens.tsx +35 -0
- package/.cache/admin/src/domain/discounts/details/conditions/edit-condition/condition-table-actions.tsx +78 -0
- package/.cache/admin/src/domain/discounts/details/conditions/edit-condition/edit-condition-modal.tsx +82 -0
- package/.cache/admin/src/domain/discounts/details/conditions/edit-condition/edit-condition-provider.tsx +148 -0
- package/.cache/admin/src/domain/discounts/details/conditions/index.tsx +84 -0
- package/.cache/admin/src/domain/discounts/details/conditions/use-discount-conditions.tsx +131 -0
- package/.cache/admin/src/domain/discounts/details/configurations/edit-configurations.tsx +134 -0
- package/.cache/admin/src/domain/discounts/details/configurations/index.tsx +62 -0
- package/.cache/admin/src/domain/discounts/details/configurations/use-discount-configurations.tsx +173 -0
- package/.cache/admin/src/domain/discounts/details/general/edit-general.tsx +160 -0
- package/.cache/admin/src/domain/discounts/details/general/index.tsx +207 -0
- package/.cache/admin/src/domain/discounts/details/index.tsx +135 -0
- package/.cache/admin/src/domain/discounts/index.tsx +97 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/add-conditions-modal.tsx +133 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/add-condition-tables/add-condition-footer.tsx +71 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/add-condition-tables/collections.tsx +97 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/add-condition-tables/customer-groups.tsx +93 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/add-condition-tables/products.tsx +89 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/add-condition-tables/tags.tsx +79 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/add-condition-tables/types.tsx +82 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/details-condition-tables/collections.tsx +99 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/details-condition-tables/customer-groups.tsx +93 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/details-condition-tables/details-condition-footer.tsx +64 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/details-condition-tables/products.tsx +89 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/details-condition-tables/tags.tsx +81 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/details-condition-tables/types.tsx +84 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/edit-condition-tables/collections.tsx +95 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/edit-condition-tables/customer-groups.tsx +86 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/edit-condition-tables/edit-condition-footer.tsx +65 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/edit-condition-tables/products.tsx +83 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/edit-condition-tables/tags.tsx +82 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/edit-condition-tables/types.tsx +77 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/shared/collection.tsx +72 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/shared/common.tsx +4 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/shared/condition-operator.tsx +44 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/shared/groups.tsx +69 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/shared/products.tsx +120 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/shared/tags.tsx +64 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/condition-tables/shared/types.tsx +63 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/edit-conditions-modal.tsx +53 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/form/discount-form-context.tsx +224 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/form/mappers.ts +84 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/form/use-form-actions.tsx +44 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/index.tsx +196 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/sections/conditions/condition-item.tsx +248 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/sections/conditions/index.tsx +86 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/sections/configuration.tsx +273 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/sections/discount-allocation.tsx +49 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/sections/discount-type.tsx +65 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/sections/general.tsx +210 -0
- package/.cache/admin/src/domain/discounts/new/discount-form/use-condition-modal-items.tsx +135 -0
- package/.cache/admin/src/domain/discounts/new/index.tsx +14 -0
- package/.cache/admin/src/domain/discounts/types.ts +81 -0
- package/.cache/admin/src/domain/discounts/utils/index.tsx +24 -0
- package/.cache/admin/src/domain/gift-cards/custom-giftcard.tsx +154 -0
- package/.cache/admin/src/domain/gift-cards/details/edit-gift-card-modal.tsx +149 -0
- package/.cache/admin/src/domain/gift-cards/details/index.tsx +210 -0
- package/.cache/admin/src/domain/gift-cards/details/update-balance-modal.tsx +131 -0
- package/.cache/admin/src/domain/gift-cards/index.tsx +31 -0
- package/.cache/admin/src/domain/gift-cards/manage/index.tsx +105 -0
- package/.cache/admin/src/domain/gift-cards/new.tsx +336 -0
- package/.cache/admin/src/domain/gift-cards/overview.tsx +215 -0
- package/.cache/admin/src/domain/inventory/filter-dropdown.tsx +104 -0
- package/.cache/admin/src/domain/inventory/header.tsx +32 -0
- package/.cache/admin/src/domain/inventory/index.tsx +17 -0
- package/.cache/admin/src/domain/inventory/inventory/index.tsx +22 -0
- package/.cache/admin/src/domain/inventory/locations/components/address-form/index.tsx +165 -0
- package/.cache/admin/src/domain/inventory/locations/components/edit-sales-channels/index.tsx +81 -0
- package/.cache/admin/src/domain/inventory/locations/components/general-form/index.tsx +42 -0
- package/.cache/admin/src/domain/inventory/locations/components/location-card/index.tsx +124 -0
- package/.cache/admin/src/domain/inventory/locations/components/sales-channels-form/index.tsx +77 -0
- package/.cache/admin/src/domain/inventory/locations/components/sales-channels-section/index.tsx +31 -0
- package/.cache/admin/src/domain/inventory/locations/edit/index.tsx +146 -0
- package/.cache/admin/src/domain/inventory/locations/index.tsx +59 -0
- package/.cache/admin/src/domain/inventory/locations/new/index.tsx +263 -0
- package/.cache/admin/src/domain/inventory/reservations/index.tsx +22 -0
- package/.cache/admin/src/domain/oauth/index.tsx +29 -0
- package/.cache/admin/src/domain/orders/components/claim-type-form/index.tsx +48 -0
- package/.cache/admin/src/domain/orders/components/items-to-receive-form/index.ts +2 -0
- package/.cache/admin/src/domain/orders/components/items-to-receive-form/items-to-receive-form.tsx +75 -0
- package/.cache/admin/src/domain/orders/components/items-to-receive-form/items-to-receive-table.tsx +62 -0
- package/.cache/admin/src/domain/orders/components/items-to-receive-form/use-items-to-receive-columns.tsx +188 -0
- package/.cache/admin/src/domain/orders/components/items-to-return-form/add-return-reason/add-return-reason-screen.tsx +143 -0
- package/.cache/admin/src/domain/orders/components/items-to-return-form/add-return-reason/index.tsx +94 -0
- package/.cache/admin/src/domain/orders/components/items-to-return-form/index.tsx +93 -0
- package/.cache/admin/src/domain/orders/components/items-to-return-form/items-to-return-table.tsx +86 -0
- package/.cache/admin/src/domain/orders/components/items-to-return-form/use-return-item-columns.tsx +195 -0
- package/.cache/admin/src/domain/orders/components/items-to-send-form/add-additional-items-screen/add-additional-items-screen.tsx +199 -0
- package/.cache/admin/src/domain/orders/components/items-to-send-form/add-additional-items-screen/add-additional-items-table.tsx +90 -0
- package/.cache/admin/src/domain/orders/components/items-to-send-form/add-additional-items-screen/index.ts +1 -0
- package/.cache/admin/src/domain/orders/components/items-to-send-form/add-additional-items-screen/use-add-additional-items-columns.tsx +208 -0
- package/.cache/admin/src/domain/orders/components/items-to-send-form/additional-items-table.tsx +71 -0
- package/.cache/admin/src/domain/orders/components/items-to-send-form/index.tsx +100 -0
- package/.cache/admin/src/domain/orders/components/items-to-send-form/use-additional-items-columns.tsx +178 -0
- package/.cache/admin/src/domain/orders/components/refund-amount-form/index.tsx +128 -0
- package/.cache/admin/src/domain/orders/components/reservation-indicator/reservation-indicator.tsx +152 -0
- package/.cache/admin/src/domain/orders/components/rma-summaries/claim-summary.tsx +196 -0
- package/.cache/admin/src/domain/orders/components/rma-summaries/index.ts +3 -0
- package/.cache/admin/src/domain/orders/components/rma-summaries/receive-return-summary.tsx +126 -0
- package/.cache/admin/src/domain/orders/components/rma-summaries/summary-line-item.tsx +68 -0
- package/.cache/admin/src/domain/orders/components/rma-summaries/summary-shipping-line.tsx +43 -0
- package/.cache/admin/src/domain/orders/components/send-notification-form/index.tsx +57 -0
- package/.cache/admin/src/domain/orders/components/shipping-address-form/index.tsx +66 -0
- package/.cache/admin/src/domain/orders/components/shipping-address-form/shipping-address-form-modal.tsx +120 -0
- package/.cache/admin/src/domain/orders/components/shipping-form/index.tsx +238 -0
- package/.cache/admin/src/domain/orders/components/table-quantity-selector.tsx +93 -0
- package/.cache/admin/src/domain/orders/details/address-modal.tsx +229 -0
- package/.cache/admin/src/domain/orders/details/claim/register-claim-menu.tsx +395 -0
- package/.cache/admin/src/domain/orders/details/create-fulfillment/index.tsx +351 -0
- package/.cache/admin/src/domain/orders/details/create-fulfillment/item-table.tsx +241 -0
- package/.cache/admin/src/domain/orders/details/detail-cards/draft-summary.tsx +279 -0
- package/.cache/admin/src/domain/orders/details/detail-cards/summary.tsx +289 -0
- package/.cache/admin/src/domain/orders/details/email-modal.tsx +102 -0
- package/.cache/admin/src/domain/orders/details/index.tsx +650 -0
- package/.cache/admin/src/domain/orders/details/mark-shipped/index.tsx +273 -0
- package/.cache/admin/src/domain/orders/details/order-line/edit.tsx +330 -0
- package/.cache/admin/src/domain/orders/details/order-line/index.tsx +79 -0
- package/.cache/admin/src/domain/orders/details/receive-return/index.tsx +379 -0
- package/.cache/admin/src/domain/orders/details/refund/index.tsx +243 -0
- package/.cache/admin/src/domain/orders/details/reservation/edit-reservation-modal.tsx +408 -0
- package/.cache/admin/src/domain/orders/details/reservation/reserve-items-modal.tsx +345 -0
- package/.cache/admin/src/domain/orders/details/returns/index.tsx +483 -0
- package/.cache/admin/src/domain/orders/details/rma-sub-modals/address.tsx +208 -0
- package/.cache/admin/src/domain/orders/details/rma-sub-modals/products.tsx +302 -0
- package/.cache/admin/src/domain/orders/details/rma-sub-modals/return-reasons.tsx +183 -0
- package/.cache/admin/src/domain/orders/details/swap/create.tsx +511 -0
- package/.cache/admin/src/domain/orders/details/templates/address.tsx +34 -0
- package/.cache/admin/src/domain/orders/details/templates/display-total.tsx +60 -0
- package/.cache/admin/src/domain/orders/details/templates/fulfillment-status.tsx +63 -0
- package/.cache/admin/src/domain/orders/details/templates/fulfillment.tsx +195 -0
- package/.cache/admin/src/domain/orders/details/templates/index.ts +9 -0
- package/.cache/admin/src/domain/orders/details/templates/order-status.tsx +39 -0
- package/.cache/admin/src/domain/orders/details/templates/payment-actionables.tsx +86 -0
- package/.cache/admin/src/domain/orders/details/templates/payment-details.tsx +59 -0
- package/.cache/admin/src/domain/orders/details/templates/payment-status.tsx +36 -0
- package/.cache/admin/src/domain/orders/details/templates/tracking-link.tsx +18 -0
- package/.cache/admin/src/domain/orders/details/utils/create-filtering.ts +70 -0
- package/.cache/admin/src/domain/orders/details/utils/get-default-values.ts +262 -0
- package/.cache/admin/src/domain/orders/details/utils/use-admin-expand-paramter.ts +45 -0
- package/.cache/admin/src/domain/orders/draft-orders/details.tsx +517 -0
- package/.cache/admin/src/domain/orders/draft-orders/index.tsx +97 -0
- package/.cache/admin/src/domain/orders/edit/context.tsx +54 -0
- package/.cache/admin/src/domain/orders/edit/modal.tsx +478 -0
- package/.cache/admin/src/domain/orders/edit/utils/user.ts +19 -0
- package/.cache/admin/src/domain/orders/edit/variants-table.tsx +354 -0
- package/.cache/admin/src/domain/orders/index.tsx +167 -0
- package/.cache/admin/src/domain/orders/new/components/billing-details.tsx +89 -0
- package/.cache/admin/src/domain/orders/new/components/custom-item-sub-modal.tsx +90 -0
- package/.cache/admin/src/domain/orders/new/components/items.tsx +336 -0
- package/.cache/admin/src/domain/orders/new/components/select-region.tsx +66 -0
- package/.cache/admin/src/domain/orders/new/components/select-shipping.tsx +171 -0
- package/.cache/admin/src/domain/orders/new/components/shipping-details.tsx +274 -0
- package/.cache/admin/src/domain/orders/new/components/summary.tsx +406 -0
- package/.cache/admin/src/domain/orders/new/form/index.tsx +212 -0
- package/.cache/admin/src/domain/orders/new/new-order.tsx +141 -0
- package/.cache/admin/src/domain/orders/utils.ts +30 -0
- package/.cache/admin/src/domain/pricing/components/index.ts +1 -0
- package/.cache/admin/src/domain/pricing/components/product-filter-menu/index.ts +1 -0
- package/.cache/admin/src/domain/pricing/components/product-filter-menu/product-filter-menu.tsx +52 -0
- package/.cache/admin/src/domain/pricing/edit/details/details-drawer.tsx +184 -0
- package/.cache/admin/src/domain/pricing/edit/details/details-section.tsx +356 -0
- package/.cache/admin/src/domain/pricing/edit/details/index.ts +1 -0
- package/.cache/admin/src/domain/pricing/edit/edit.tsx +85 -0
- package/.cache/admin/src/domain/pricing/edit/index.ts +1 -0
- package/.cache/admin/src/domain/pricing/edit/prices/add-products-modal.tsx +695 -0
- package/.cache/admin/src/domain/pricing/edit/prices/edit-prices-modal.tsx +677 -0
- package/.cache/admin/src/domain/pricing/edit/prices/index.ts +1 -0
- package/.cache/admin/src/domain/pricing/edit/prices/prices-section.tsx +648 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-details-form/index.ts +3 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-details-form/price-list-details-form.tsx +753 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-details-form/schema.ts +37 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-details-form/types.ts +20 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-prices-form/helpers.ts +46 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-prices-form/index.ts +6 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-prices-form/price-list-prices-form.tsx +237 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-prices-form/schema.ts +32 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-prices-form/types.ts +12 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-prices-form/use-prices-form-data.tsx +78 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-product-prices-form/helpers.ts +566 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-product-prices-form/index.ts +3 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-product-prices-form/models.ts +187 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-product-prices-form/price-list-product-prices-form.tsx +2151 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-product-prices-form/schema.ts +27 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-product-prices-form/types.ts +91 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-products-form/index.ts +3 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-products-form/price-list-products-form.tsx +482 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-products-form/schema.ts +7 -0
- package/.cache/admin/src/domain/pricing/forms/price-list-products-form/types.ts +4 -0
- package/.cache/admin/src/domain/pricing/index.tsx +16 -0
- package/.cache/admin/src/domain/pricing/new/index.ts +1 -0
- package/.cache/admin/src/domain/pricing/new/new.tsx +769 -0
- package/.cache/admin/src/domain/pricing/overview/index.ts +1 -0
- package/.cache/admin/src/domain/pricing/overview/overview.tsx +481 -0
- package/.cache/admin/src/domain/product-categories/components/product-categories-list.tsx +151 -0
- package/.cache/admin/src/domain/product-categories/components/product-category-list-item-details.tsx +181 -0
- package/.cache/admin/src/domain/product-categories/components/tree-crumbs.tsx +54 -0
- package/.cache/admin/src/domain/product-categories/index.tsx +30 -0
- package/.cache/admin/src/domain/product-categories/modals/add-product-category.tsx +282 -0
- package/.cache/admin/src/domain/product-categories/modals/edit-product-category.tsx +241 -0
- package/.cache/admin/src/domain/product-categories/pages/index.tsx +135 -0
- package/.cache/admin/src/domain/product-categories/styles/product-categories.css +21 -0
- package/.cache/admin/src/domain/product-categories/utils/index.tsx +63 -0
- package/.cache/admin/src/domain/products/batch-job/download-template.ts +18 -0
- package/.cache/admin/src/domain/products/batch-job/import.tsx +235 -0
- package/.cache/admin/src/domain/products/edit/index.tsx +91 -0
- package/.cache/admin/src/domain/products/filter-dropdown.tsx +244 -0
- package/.cache/admin/src/domain/products/index.tsx +29 -0
- package/.cache/admin/src/domain/products/new/add-sales-channels.tsx +123 -0
- package/.cache/admin/src/domain/products/new/add-variants/index.tsx +508 -0
- package/.cache/admin/src/domain/products/new/add-variants/new-variant/index.tsx +380 -0
- package/.cache/admin/src/domain/products/new/index.tsx +518 -0
- package/.cache/admin/src/domain/products/overview/index.tsx +269 -0
- package/.cache/admin/src/domain/publishable-api-keys/index.tsx +33 -0
- package/.cache/admin/src/domain/publishable-api-keys/modals/add-sales-channels.tsx +149 -0
- package/.cache/admin/src/domain/publishable-api-keys/modals/details.tsx +116 -0
- package/.cache/admin/src/domain/publishable-api-keys/modals/manage-sales-channels.tsx +428 -0
- package/.cache/admin/src/domain/publishable-api-keys/pages/index.tsx +294 -0
- package/.cache/admin/src/domain/publishable-api-keys/tables/publishable-api-keys-table.tsx +342 -0
- package/.cache/admin/src/domain/publishable-api-keys/tables/sales-channels-table.tsx +244 -0
- package/.cache/admin/src/domain/sales-channels/form/add-sales-channel.tsx +211 -0
- package/.cache/admin/src/domain/sales-channels/form/edit-sales-channel.tsx +116 -0
- package/.cache/admin/src/domain/sales-channels/index.tsx +30 -0
- package/.cache/admin/src/domain/sales-channels/pages/details.tsx +501 -0
- package/.cache/admin/src/domain/sales-channels/tables/config.tsx +57 -0
- package/.cache/admin/src/domain/sales-channels/tables/placeholder.tsx +33 -0
- package/.cache/admin/src/domain/sales-channels/tables/product.tsx +539 -0
- package/.cache/admin/src/domain/settings/currencies/components/currency-tax-setting.tsx +111 -0
- package/.cache/admin/src/domain/settings/currencies/components/default-store-currency/default-currency-selector.tsx +104 -0
- package/.cache/admin/src/domain/settings/currencies/components/default-store-currency/index.tsx +33 -0
- package/.cache/admin/src/domain/settings/currencies/components/store-currencies/add-currencies-screen.tsx +160 -0
- package/.cache/admin/src/domain/settings/currencies/components/store-currencies/current-currencies-screen.tsx +197 -0
- package/.cache/admin/src/domain/settings/currencies/components/store-currencies/edit-currencies-modal.tsx +46 -0
- package/.cache/admin/src/domain/settings/currencies/components/store-currencies/index.tsx +38 -0
- package/.cache/admin/src/domain/settings/currencies/components/store-currencies/table.tsx +123 -0
- package/.cache/admin/src/domain/settings/currencies/components/store-currencies/use-currency-table-columns.tsx +58 -0
- package/.cache/admin/src/domain/settings/currencies/index.tsx +131 -0
- package/.cache/admin/src/domain/settings/details.tsx +184 -0
- package/.cache/admin/src/domain/settings/index.tsx +196 -0
- package/.cache/admin/src/domain/settings/personal-information/edit-user-information/edit-user-information-modal.tsx +116 -0
- package/.cache/admin/src/domain/settings/personal-information/edit-user-information/index.tsx +67 -0
- package/.cache/admin/src/domain/settings/personal-information/index.tsx +54 -0
- package/.cache/admin/src/domain/settings/personal-information/language-settings/index.tsx +42 -0
- package/.cache/admin/src/domain/settings/personal-information/language-settings/language-menu.tsx +31 -0
- package/.cache/admin/src/domain/settings/personal-information/usage-insights/index.tsx +65 -0
- package/.cache/admin/src/domain/settings/personal-information/usage-insights/usage-insights-modal.tsx +99 -0
- package/.cache/admin/src/domain/settings/regions/components/region-form/region-details-form.tsx +160 -0
- package/.cache/admin/src/domain/settings/regions/components/region-form/region-providers-form.tsx +111 -0
- package/.cache/admin/src/domain/settings/regions/components/region-form/use-store-data.tsx +58 -0
- package/.cache/admin/src/domain/settings/regions/components/shipping-option-card/edit-modal.tsx +170 -0
- package/.cache/admin/src/domain/settings/regions/components/shipping-option-card/index.tsx +127 -0
- package/.cache/admin/src/domain/settings/regions/components/shipping-option-form/index.tsx +332 -0
- package/.cache/admin/src/domain/settings/regions/components/shipping-option-form/use-shipping-option-form-data.tsx +136 -0
- package/.cache/admin/src/domain/settings/regions/edit/general-section/edit-region.modal.tsx +192 -0
- package/.cache/admin/src/domain/settings/regions/edit/general-section/index.tsx +210 -0
- package/.cache/admin/src/domain/settings/regions/edit/index.tsx +55 -0
- package/.cache/admin/src/domain/settings/regions/edit/return-shipping-options/create-return-shipping-option.modal.tsx +110 -0
- package/.cache/admin/src/domain/settings/regions/edit/return-shipping-options/index.tsx +59 -0
- package/.cache/admin/src/domain/settings/regions/edit/shipping-options/create-shipping-option-modal.tsx +107 -0
- package/.cache/admin/src/domain/settings/regions/edit/shipping-options/index.tsx +52 -0
- package/.cache/admin/src/domain/settings/regions/index.tsx +25 -0
- package/.cache/admin/src/domain/settings/regions/new/index.tsx +177 -0
- package/.cache/admin/src/domain/settings/regions/region-overview/index.tsx +95 -0
- package/.cache/admin/src/domain/settings/regions/region-overview/region-card.tsx +49 -0
- package/.cache/admin/src/domain/settings/return-reasons/create-reason-modal.tsx +150 -0
- package/.cache/admin/src/domain/settings/return-reasons/detail.tsx +163 -0
- package/.cache/admin/src/domain/settings/return-reasons/index.tsx +101 -0
- package/.cache/admin/src/domain/settings/taxes/details.tsx +160 -0
- package/.cache/admin/src/domain/settings/taxes/edit-form.tsx +379 -0
- package/.cache/admin/src/domain/settings/taxes/edit-tax-rate-details.tsx +83 -0
- package/.cache/admin/src/domain/settings/taxes/edit.tsx +56 -0
- package/.cache/admin/src/domain/settings/taxes/index.tsx +169 -0
- package/.cache/admin/src/domain/settings/taxes/new.tsx +300 -0
- package/.cache/admin/src/domain/settings/taxes/product-selector.tsx +80 -0
- package/.cache/admin/src/domain/settings/taxes/product-type-selector.tsx +44 -0
- package/.cache/admin/src/domain/settings/taxes/region-form.tsx +178 -0
- package/.cache/admin/src/domain/settings/taxes/selectable-table.tsx +197 -0
- package/.cache/admin/src/domain/settings/taxes/shipping-option-selector.tsx +46 -0
- package/.cache/admin/src/domain/settings/taxes/tax-rate-row.tsx +87 -0
- package/.cache/admin/src/domain/settings/taxes/tax-rule-item.tsx +43 -0
- package/.cache/admin/src/domain/settings/taxes/tax-rule-selector.tsx +161 -0
- package/.cache/admin/src/domain/settings/taxes/use-tax-rate-columns.tsx +50 -0
- package/.cache/admin/src/domain/settings/users/index.tsx +88 -0
- package/.cache/admin/src/extensions/_local-entry.ts +10 -0
- package/.cache/admin/src/extensions/_main-entry.ts +7 -0
- package/.cache/admin/src/fonts/Inter-Medium.ttf +0 -0
- package/.cache/admin/src/fonts/Inter-Regular.ttf +0 -0
- package/.cache/admin/src/fonts/Inter-SemiBold.ttf +0 -0
- package/.cache/admin/src/fonts/RobotoMono-Bold.ttf +0 -0
- package/.cache/admin/src/fonts/RobotoMono-Regular.ttf +0 -0
- package/.cache/admin/src/hooks/use-build-timeline.tsx +676 -0
- package/.cache/admin/src/hooks/use-command-history.tsx +66 -0
- package/.cache/admin/src/hooks/use-computed-height.ts +19 -0
- package/.cache/admin/src/hooks/use-debounce.ts +22 -0
- package/.cache/admin/src/hooks/use-debounced-search-param.tsx +33 -0
- package/.cache/admin/src/hooks/use-detect-change.tsx +50 -0
- package/.cache/admin/src/hooks/use-edit-product-actions.tsx +193 -0
- package/.cache/admin/src/hooks/use-extension-base-props.tsx +25 -0
- package/.cache/admin/src/hooks/use-highlight-search.tsx +33 -0
- package/.cache/admin/src/hooks/use-imperative-dialog.tsx +139 -0
- package/.cache/admin/src/hooks/use-is-me.tsx +12 -0
- package/.cache/admin/src/hooks/use-notification.tsx +20 -0
- package/.cache/admin/src/hooks/use-observe-width.ts +30 -0
- package/.cache/admin/src/hooks/use-on-click-outside.tsx +28 -0
- package/.cache/admin/src/hooks/use-outside-click.ts +19 -0
- package/.cache/admin/src/hooks/use-query-filters.ts +229 -0
- package/.cache/admin/src/hooks/use-scroll.ts +20 -0
- package/.cache/admin/src/hooks/use-selection-column.tsx +39 -0
- package/.cache/admin/src/hooks/use-set-search-params.tsx +24 -0
- package/.cache/admin/src/hooks/use-stock-locations.ts +28 -0
- package/.cache/admin/src/hooks/use-toggle-state.ts +46 -0
- package/.cache/admin/src/hooks/use-window-dimensions.ts +25 -0
- package/.cache/admin/src/i18n/index.ts +119 -0
- package/.cache/admin/src/main.tsx +27 -0
- package/.cache/admin/src/medusa-app.tsx +58 -0
- package/.cache/admin/src/pages/404.tsx +12 -0
- package/.cache/admin/src/pages/a.tsx +86 -0
- package/.cache/admin/src/pages/index.tsx +20 -0
- package/.cache/admin/src/pages/invite.tsx +246 -0
- package/.cache/admin/src/pages/login.tsx +50 -0
- package/.cache/admin/src/pages/reset-password.tsx +151 -0
- package/.cache/admin/src/providers/analytics-provider.tsx +223 -0
- package/.cache/admin/src/providers/feature-flag-provider.tsx +78 -0
- package/.cache/admin/src/providers/import-refresh.tsx +57 -0
- package/.cache/admin/src/providers/medusa-provider.tsx +17 -0
- package/.cache/admin/src/providers/polling-provider.tsx +112 -0
- package/.cache/admin/src/providers/providers.tsx +54 -0
- package/.cache/admin/src/providers/route-provider.tsx +55 -0
- package/.cache/admin/src/providers/setting-provider.tsx +49 -0
- package/.cache/admin/src/providers/skeleton-provider.tsx +32 -0
- package/.cache/admin/src/providers/widget-provider.tsx +38 -0
- package/.cache/admin/src/registries/route-registry.tsx +133 -0
- package/.cache/admin/src/registries/setting-registry.tsx +60 -0
- package/.cache/admin/src/registries/widget-registry.tsx +26 -0
- package/.cache/admin/src/services/analytics.ts +119 -0
- package/.cache/admin/src/types/extensions.ts +151 -0
- package/.cache/admin/src/types/shared.ts +55 -0
- package/.cache/admin/src/types/utils.ts +3 -0
- package/.cache/admin/src/utils/bytes-converter.ts +18 -0
- package/.cache/admin/src/utils/callAll.ts +4 -0
- package/.cache/admin/src/utils/color.ts +12 -0
- package/.cache/admin/src/utils/consolidate-images.ts +15 -0
- package/.cache/admin/src/utils/countries.ts +639 -0
- package/.cache/admin/src/utils/currencies.ts +1087 -0
- package/.cache/admin/src/utils/date-utils.ts +5 -0
- package/.cache/admin/src/utils/email.ts +9 -0
- package/.cache/admin/src/utils/equals-set.ts +11 -0
- package/.cache/admin/src/utils/error-messages.ts +10 -0
- package/.cache/admin/src/utils/extensions.ts +30 -0
- package/.cache/admin/src/utils/extract-customer-name.ts +69 -0
- package/.cache/admin/src/utils/extract-options.ts +26 -0
- package/.cache/admin/src/utils/focus-by-name.ts +3 -0
- package/.cache/admin/src/utils/form-helpers.ts +22 -0
- package/.cache/admin/src/utils/form-validator.ts +71 -0
- package/.cache/admin/src/utils/fulfillment-providers.mapper.ts +26 -0
- package/.cache/admin/src/utils/generate-promotion-code.ts +12 -0
- package/.cache/admin/src/utils/get-admin-path.ts +22 -0
- package/.cache/admin/src/utils/get-error-status.ts +11 -0
- package/.cache/admin/src/utils/get-relative-time.ts +35 -0
- package/.cache/admin/src/utils/handle-form-error.tsx +64 -0
- package/.cache/admin/src/utils/images.ts +33 -0
- package/.cache/admin/src/utils/is-line-item.ts +37 -0
- package/.cache/admin/src/utils/is-nullish-object.ts +14 -0
- package/.cache/admin/src/utils/map-address-to-form.ts +23 -0
- package/.cache/admin/src/utils/nested-form.ts +87 -0
- package/.cache/admin/src/utils/payment-providers-mapper.ts +73 -0
- package/.cache/admin/src/utils/prices.ts +153 -0
- package/.cache/admin/src/utils/product-status-variant.ts +13 -0
- package/.cache/admin/src/utils/remove-nullish.ts +11 -0
- package/.cache/admin/src/utils/sales-channel-compare-operator.ts +13 -0
- package/.cache/admin/src/utils/search-param-utils.ts +86 -0
- package/.cache/admin/src/utils/trim-values.ts +11 -0
- package/.cache/admin/src/utils/validate-email.ts +7 -0
- package/.cache/admin/src/utils/xorObjFields.ts +4 -0
- package/.cache/admin/tsconfig.json +22 -0
- package/.cache/admin-build-manifest.json +29 -0
- package/.eslintrc.js +112 -0
- package/.github/dependabot.yml +21 -0
- package/.github/scripts/wait-for-server-live.sh +29 -0
- package/.github/workflows/test-cli.yml +149 -0
- package/.github/workflows/update-preview-deps-ci.yml +70 -0
- package/.github/workflows/update-preview-deps.yml +70 -0
- package/.vscode/settings.json +2 -0
- package/.yarnrc.yml +1 -0
- package/README.md +70 -0
- package/build/230.c76076a78b7563553415.css +932 -0
- package/build/442f6a4cc2f03aaf41f6.ttf +0 -0
- package/build/68fda0752a470b05a5c5.ttf +0 -0
- package/build/6dcbc9bed1ec438907ee.ttf +0 -0
- package/build/6ed339415e1071e8ebc9.ttf +0 -0
- package/build/e62b16638c71c0eb4505.ttf +0 -0
- package/build/images/icon-minus-gray-fedf0680e4cc60b17e14.svg +16 -0
- package/build/images/icon-plus-gray-4813505451ce489532e3.svg +16 -0
- package/build/index.html +1 -0
- package/build/main.c5035eb0615ccdc82cbf.css +6635 -0
- package/build/public/locales/ar/translation.json +1919 -0
- package/build/public/locales/bg/translation.json +2011 -0
- package/build/public/locales/bs/translation.json +2011 -0
- package/build/public/locales/cs/translation.json +1942 -0
- package/build/public/locales/de/translation.json +1924 -0
- package/build/public/locales/en/translation.json +2011 -0
- package/build/public/locales/es/translation.json +1924 -0
- package/build/public/locales/fr/translation.json +1924 -0
- package/build/public/locales/hi/translation.json +2011 -0
- package/build/public/locales/hr/translation.json +2011 -0
- package/build/public/locales/it/translation.json +1922 -0
- package/build/public/locales/ja/translation.json +2006 -0
- package/build/public/locales/ko/translation.json +2011 -0
- package/build/public/locales/pl/translation.json +1919 -0
- package/build/public/locales/pt/translation.json +1925 -0
- package/build/public/locales/ru/translation.json +1919 -0
- package/build/public/locales/sl/translation.json +2010 -0
- package/build/public/locales/tm/translation.json +1924 -0
- package/build/public/locales/uk/translation.json +1919 -0
- package/build/public/locales/vi/translation.json +2011 -0
- package/build/public/locales/zh/translation.json +2011 -0
- package/build/public/logo.svg +10 -0
- package/data/seed-onboarding.json +141 -0
- package/data/seed.json +1006 -0
- package/datasource.js +18 -0
- package/dist/index.js +1 -0
- package/index.js +50 -0
- package/medusa-config.js +153 -0
- package/package.json +129 -0
- package/src/api/README.md +179 -0
- package/src/index.ts +0 -0
- package/src/jobs/README.md +32 -0
- package/src/loaders/README.md +19 -0
- package/src/migrations/1717765546068-licenseVariant.ts +20 -0
- package/src/migrations/README.md +29 -0
- package/src/models/README.md +46 -0
- package/src/models/product-variant.ts +35 -0
- package/src/repositories/ProductVariant.ts +11 -0
- package/src/services/README.md +49 -0
- package/src/subscribers/README.md +44 -0
- package/tsconfig.admin.json +8 -0
- package/tsconfig.json +30 -0
- package/tsconfig.server.json +8 -0
- package/tsconfig.spec.json +5 -0
|
@@ -0,0 +1,906 @@
|
|
|
1
|
+
import * as RadixCollapsible from "@radix-ui/react-collapsible"
|
|
2
|
+
import * as RadixPopover from "@radix-ui/react-popover"
|
|
3
|
+
|
|
4
|
+
import { DateComparisonOperator, InventoryItemDTO } from "@medusajs/types"
|
|
5
|
+
import React, { useEffect, useState } from "react"
|
|
6
|
+
import { useAdminInventoryItems, useAdminUsers, useMedusa } from "medusa-react"
|
|
7
|
+
|
|
8
|
+
import AdjustmentsIcon from "../../../../fundamentals/icons/adjustments-icon"
|
|
9
|
+
import Button from "../../../../fundamentals/button"
|
|
10
|
+
import { CalendarComponent } from "../../../../atoms/date-picker/date-picker"
|
|
11
|
+
import CalendarIcon from "../../../../fundamentals/icons/calendar-icon"
|
|
12
|
+
import CheckIcon from "../../../../fundamentals/icons/check-icon"
|
|
13
|
+
import CrossIcon from "../../../../fundamentals/icons/cross-icon"
|
|
14
|
+
import FilterDropdownContainer from "../../../../molecules/filter-dropdown/container"
|
|
15
|
+
import InputField from "../../../../molecules/input"
|
|
16
|
+
import Spinner from "../../../../atoms/spinner"
|
|
17
|
+
import Switch from "../../../../atoms/switch"
|
|
18
|
+
import TagDotIcon from "../../../../fundamentals/icons/tag-dot-icon"
|
|
19
|
+
import { User } from "@medusajs/medusa"
|
|
20
|
+
import clsx from "clsx"
|
|
21
|
+
import moment from "moment"
|
|
22
|
+
import { removeNullish } from "../../../../../utils/remove-nullish"
|
|
23
|
+
|
|
24
|
+
type PasswordlessUser = Omit<User, "password_hash">
|
|
25
|
+
|
|
26
|
+
const ReservationsFilters = ({ filters, submitFilters, clearFilters }) => {
|
|
27
|
+
const [tempState, setTempState] = useState(filters)
|
|
28
|
+
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
setTempState(filters)
|
|
31
|
+
}, [filters])
|
|
32
|
+
|
|
33
|
+
const onSubmit = () => {
|
|
34
|
+
const { additionalFilters, ...state } = tempState
|
|
35
|
+
submitFilters({
|
|
36
|
+
...removeNullish(state),
|
|
37
|
+
additionalFilters: removeNullish(additionalFilters),
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const onClear = () => {
|
|
42
|
+
clearFilters()
|
|
43
|
+
tempState({ ...tempState, additionalFilters: {} })
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<div className="flex space-x-1">
|
|
48
|
+
<FilterDropdownContainer
|
|
49
|
+
submitFilters={onSubmit}
|
|
50
|
+
clearFilters={onClear}
|
|
51
|
+
triggerElement={
|
|
52
|
+
<Button variant="secondary" size="small">
|
|
53
|
+
<AdjustmentsIcon size={20} />
|
|
54
|
+
View
|
|
55
|
+
</Button>
|
|
56
|
+
}
|
|
57
|
+
>
|
|
58
|
+
<div className="w-[320px]">
|
|
59
|
+
<SearchableFilterInventoryItem
|
|
60
|
+
title="Inventory item"
|
|
61
|
+
value={tempState.additionalFilters.inventory_item_id}
|
|
62
|
+
setFilter={(val) => {
|
|
63
|
+
setTempState(({ additionalFilters, ...state }) => {
|
|
64
|
+
return {
|
|
65
|
+
...state,
|
|
66
|
+
additionalFilters: {
|
|
67
|
+
...additionalFilters,
|
|
68
|
+
inventory_item_id: val,
|
|
69
|
+
},
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
}}
|
|
73
|
+
/>
|
|
74
|
+
<TextFilterItem
|
|
75
|
+
title="Description"
|
|
76
|
+
value={tempState.additionalFilters.description}
|
|
77
|
+
options={[
|
|
78
|
+
{ label: "Equals", value: "equals" },
|
|
79
|
+
{ label: "Contains", value: "contains" },
|
|
80
|
+
]}
|
|
81
|
+
setFilter={(val) => {
|
|
82
|
+
setTempState((state) => {
|
|
83
|
+
return {
|
|
84
|
+
...state,
|
|
85
|
+
additionalFilters: {
|
|
86
|
+
description: val,
|
|
87
|
+
},
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
}}
|
|
91
|
+
/>
|
|
92
|
+
<DateFilterItem
|
|
93
|
+
title="Creation date"
|
|
94
|
+
value={tempState.additionalFilters.created_at}
|
|
95
|
+
setFilter={(val) => {
|
|
96
|
+
setTempState(({ additionalFilters, ...state }) => {
|
|
97
|
+
return {
|
|
98
|
+
...state,
|
|
99
|
+
additionalFilters: { ...additionalFilters, created_at: val },
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
}}
|
|
103
|
+
/>
|
|
104
|
+
<NumberFilterItem
|
|
105
|
+
title="Quantity"
|
|
106
|
+
value={tempState.additionalFilters.quantity}
|
|
107
|
+
options={[
|
|
108
|
+
{ label: "Over", value: "gt" },
|
|
109
|
+
{ label: "Under", value: "lt" },
|
|
110
|
+
{ label: "Between", value: "between" },
|
|
111
|
+
]}
|
|
112
|
+
setFilter={(val) => {
|
|
113
|
+
setTempState(({ additionalFilters, ...state }) => {
|
|
114
|
+
return {
|
|
115
|
+
...state,
|
|
116
|
+
additionalFilters: { ...additionalFilters, quantity: val },
|
|
117
|
+
}
|
|
118
|
+
})
|
|
119
|
+
}}
|
|
120
|
+
/>
|
|
121
|
+
<CreatedByFilterItem
|
|
122
|
+
title="Created by"
|
|
123
|
+
value={tempState.additionalFilters.created_by}
|
|
124
|
+
setFilter={(val) => {
|
|
125
|
+
setTempState(({ additionalFilters, ...state }) => {
|
|
126
|
+
return {
|
|
127
|
+
...state,
|
|
128
|
+
additionalFilters: { ...additionalFilters, created_by: val },
|
|
129
|
+
}
|
|
130
|
+
})
|
|
131
|
+
}}
|
|
132
|
+
/>
|
|
133
|
+
</div>
|
|
134
|
+
</FilterDropdownContainer>
|
|
135
|
+
</div>
|
|
136
|
+
)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const SearchableFilterInventoryItem = ({
|
|
140
|
+
title,
|
|
141
|
+
setFilter,
|
|
142
|
+
value,
|
|
143
|
+
}: {
|
|
144
|
+
title: string
|
|
145
|
+
value: any
|
|
146
|
+
setFilter: (newFilter: any) => void
|
|
147
|
+
}) => {
|
|
148
|
+
const [selectedItems, setSelectedItems] = useState<Set<InventoryItemDTO>>(
|
|
149
|
+
new Set()
|
|
150
|
+
)
|
|
151
|
+
const [searchTerm, setSearchTerm] = useState<string>("")
|
|
152
|
+
const [query, setQuery] = useState<string | undefined>()
|
|
153
|
+
|
|
154
|
+
const { client } = useMedusa()
|
|
155
|
+
|
|
156
|
+
useEffect(() => {
|
|
157
|
+
const getSelectedItems = async (value: any) => {
|
|
158
|
+
if (value?.length) {
|
|
159
|
+
const { inventory_items } = await client.admin.inventoryItems.list({
|
|
160
|
+
id: [...new Set(value)] as string[],
|
|
161
|
+
})
|
|
162
|
+
setSelectedItems(new Set(inventory_items))
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
getSelectedItems(value)
|
|
167
|
+
}, [client.admin.inventoryItems, value])
|
|
168
|
+
|
|
169
|
+
// Debounced search
|
|
170
|
+
useEffect(() => {
|
|
171
|
+
const delayDebounceFn = setTimeout(() => {
|
|
172
|
+
setSearchTerm(query ?? "")
|
|
173
|
+
}, 400)
|
|
174
|
+
|
|
175
|
+
return () => clearTimeout(delayDebounceFn)
|
|
176
|
+
}, [query])
|
|
177
|
+
|
|
178
|
+
const { inventory_items, isLoading } = useAdminInventoryItems(
|
|
179
|
+
{
|
|
180
|
+
q: searchTerm,
|
|
181
|
+
limit: 7,
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
enabled: !!searchTerm,
|
|
185
|
+
}
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
const toggleInventoryItem = (item: InventoryItemDTO) => {
|
|
189
|
+
const newState = getNewSetState(selectedItems, item)
|
|
190
|
+
|
|
191
|
+
setSelectedItems(newState)
|
|
192
|
+
setFilter([...newState].map((i) => i.id))
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
const selectedIds = React.useMemo(() => {
|
|
196
|
+
return new Set([...selectedItems].map((i) => i.id))
|
|
197
|
+
}, [selectedItems])
|
|
198
|
+
|
|
199
|
+
const reset = () => {
|
|
200
|
+
setSelectedItems(new Set())
|
|
201
|
+
setFilter(undefined)
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return (
|
|
205
|
+
<div className={clsx("w-full border-b")}>
|
|
206
|
+
<CollapsibleWrapper
|
|
207
|
+
title={title}
|
|
208
|
+
defaultOpen={!!value}
|
|
209
|
+
onOpenChange={(open) => {
|
|
210
|
+
if (!open) {
|
|
211
|
+
reset()
|
|
212
|
+
}
|
|
213
|
+
}}
|
|
214
|
+
>
|
|
215
|
+
<div className="gap-y-xsmall mb-2 flex w-full flex-col pt-2">
|
|
216
|
+
<InputField
|
|
217
|
+
value={query}
|
|
218
|
+
className="pr-1"
|
|
219
|
+
prefix={
|
|
220
|
+
selectedItems.size === 0 ? null : (
|
|
221
|
+
<div
|
|
222
|
+
onClick={reset}
|
|
223
|
+
className="bg-grey-10 border-grey-20 text-grey-40 rounded-rounded gap-x-2xsmall mr-xsmall flex cursor-pointer items-center border py-0.5 pr-1 pl-2"
|
|
224
|
+
>
|
|
225
|
+
<span className="text-grey-50">{selectedItems.size}</span>
|
|
226
|
+
<CrossIcon size={16} />
|
|
227
|
+
</div>
|
|
228
|
+
)
|
|
229
|
+
}
|
|
230
|
+
placeholder={selectedItems.size ? "Items selected" : "Find items"}
|
|
231
|
+
onChange={(e) => setQuery(e.target.value)}
|
|
232
|
+
/>
|
|
233
|
+
</div>
|
|
234
|
+
<div className="flex flex-col gap-y-1 pb-2">
|
|
235
|
+
{[...selectedItems].map((item, i) => {
|
|
236
|
+
return (
|
|
237
|
+
<InventoryItemItem
|
|
238
|
+
key={`selected-item-${i}`}
|
|
239
|
+
onClick={() => toggleInventoryItem(item)}
|
|
240
|
+
selected={true}
|
|
241
|
+
item={item}
|
|
242
|
+
/>
|
|
243
|
+
)
|
|
244
|
+
})}
|
|
245
|
+
{searchTerm &&
|
|
246
|
+
(isLoading ? (
|
|
247
|
+
<Spinner />
|
|
248
|
+
) : (
|
|
249
|
+
<>
|
|
250
|
+
{inventory_items
|
|
251
|
+
?.filter((item) => !selectedIds.has(item.id))
|
|
252
|
+
.map((item: InventoryItemDTO, i: number) => (
|
|
253
|
+
<InventoryItemItem
|
|
254
|
+
key={`item-${i}`}
|
|
255
|
+
onClick={() => toggleInventoryItem(item)}
|
|
256
|
+
selected={false}
|
|
257
|
+
item={item}
|
|
258
|
+
/>
|
|
259
|
+
))}
|
|
260
|
+
</>
|
|
261
|
+
))}
|
|
262
|
+
</div>
|
|
263
|
+
</CollapsibleWrapper>
|
|
264
|
+
</div>
|
|
265
|
+
)
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
const InventoryItemItem = ({
|
|
269
|
+
key,
|
|
270
|
+
onClick,
|
|
271
|
+
selected,
|
|
272
|
+
item,
|
|
273
|
+
}: {
|
|
274
|
+
key: string
|
|
275
|
+
onClick: () => void
|
|
276
|
+
selected: boolean
|
|
277
|
+
item: InventoryItemDTO
|
|
278
|
+
}) => (
|
|
279
|
+
<div
|
|
280
|
+
key={key}
|
|
281
|
+
onClick={onClick}
|
|
282
|
+
className="hover:bg-grey-10 rounded-rounded flex items-center py-1.5 px-2"
|
|
283
|
+
>
|
|
284
|
+
<div className="mr-2 flex h-[20px] w-[20px] items-center">
|
|
285
|
+
{selected && <CheckIcon size={16} color="#111827" />}
|
|
286
|
+
</div>
|
|
287
|
+
<div className="inter-small-regular flex w-full items-center justify-between">
|
|
288
|
+
<p className="text-grey-90">{item.title}</p>{" "}
|
|
289
|
+
<p className="text-grey-50">{item.sku}</p>
|
|
290
|
+
</div>
|
|
291
|
+
</div>
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
const CreatedByFilterItem = ({
|
|
295
|
+
title,
|
|
296
|
+
setFilter,
|
|
297
|
+
value,
|
|
298
|
+
}: {
|
|
299
|
+
title: string
|
|
300
|
+
value: any
|
|
301
|
+
setFilter: (newFilter: any) => void
|
|
302
|
+
}) => {
|
|
303
|
+
const [selectedUsers, setSelectedUsers] = useState<Set<PasswordlessUser>>(
|
|
304
|
+
new Set()
|
|
305
|
+
)
|
|
306
|
+
const [searchTerm, setSearchTerm] = useState<string | undefined>()
|
|
307
|
+
const [query, setQuery] = useState<string | undefined>()
|
|
308
|
+
|
|
309
|
+
// Debounced search
|
|
310
|
+
useEffect(() => {
|
|
311
|
+
const delayDebounceFn = setTimeout(() => {
|
|
312
|
+
setSearchTerm(query ?? "")
|
|
313
|
+
}, 400)
|
|
314
|
+
|
|
315
|
+
return () => clearTimeout(delayDebounceFn)
|
|
316
|
+
}, [query])
|
|
317
|
+
|
|
318
|
+
const { users, isLoading } = useAdminUsers({})
|
|
319
|
+
|
|
320
|
+
const [displayUsers, setDisplayUsers] = useState<PasswordlessUser[]>([])
|
|
321
|
+
|
|
322
|
+
useEffect(() => {
|
|
323
|
+
const getSelectedItems = async (value: any) => {
|
|
324
|
+
if (value && users) {
|
|
325
|
+
const selectedUsers = users.filter((u) => value.includes(u.id))
|
|
326
|
+
setSelectedUsers(new Set(selectedUsers))
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
getSelectedItems(value)
|
|
331
|
+
}, [value])
|
|
332
|
+
|
|
333
|
+
useEffect(() => {
|
|
334
|
+
if (searchTerm && users?.length) {
|
|
335
|
+
setDisplayUsers(
|
|
336
|
+
users
|
|
337
|
+
.filter(
|
|
338
|
+
(u) =>
|
|
339
|
+
u.first_name?.toLowerCase().includes(searchTerm) ||
|
|
340
|
+
u.last_name?.toLowerCase().includes(searchTerm)
|
|
341
|
+
)
|
|
342
|
+
.slice(0, 7)
|
|
343
|
+
)
|
|
344
|
+
}
|
|
345
|
+
}, [searchTerm, users])
|
|
346
|
+
|
|
347
|
+
const toggleUser = (user: PasswordlessUser) => {
|
|
348
|
+
const newState = getNewSetState(selectedUsers, user)
|
|
349
|
+
|
|
350
|
+
setSelectedUsers(newState)
|
|
351
|
+
setFilter([...newState].map((u) => u.id))
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
const reset = () => {
|
|
355
|
+
setSelectedUsers(new Set())
|
|
356
|
+
setFilter(undefined)
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
return (
|
|
360
|
+
<div className={clsx("w-full cursor-pointer")}>
|
|
361
|
+
<CollapsibleWrapper
|
|
362
|
+
title={title}
|
|
363
|
+
defaultOpen={!!value}
|
|
364
|
+
onOpenChange={(open) => {
|
|
365
|
+
if (!open) {
|
|
366
|
+
reset()
|
|
367
|
+
}
|
|
368
|
+
}}
|
|
369
|
+
>
|
|
370
|
+
<div className="gap-y-xsmall mb-2 flex w-full flex-col pt-2">
|
|
371
|
+
<InputField
|
|
372
|
+
value={query}
|
|
373
|
+
placeholder="Find user"
|
|
374
|
+
onChange={(e) => setQuery(e.target.value)}
|
|
375
|
+
prefix={
|
|
376
|
+
selectedUsers.size === 0 ? null : (
|
|
377
|
+
<div
|
|
378
|
+
onClick={reset}
|
|
379
|
+
className="bg-grey-10 border-grey-20 text-grey-40 rounded-rounded gap-x-2xsmall mr-xsmall flex cursor-pointer items-center border py-0.5 pr-1 pl-2"
|
|
380
|
+
>
|
|
381
|
+
<span className="text-grey-50">{selectedUsers.size}</span>
|
|
382
|
+
<CrossIcon size={16} />
|
|
383
|
+
</div>
|
|
384
|
+
)
|
|
385
|
+
}
|
|
386
|
+
/>
|
|
387
|
+
</div>
|
|
388
|
+
<div className="flex flex-col gap-y-1 pb-2">
|
|
389
|
+
{[...selectedUsers].map((user, i) => {
|
|
390
|
+
return (
|
|
391
|
+
<CreatedByItem
|
|
392
|
+
key={`selected-user-${i}`}
|
|
393
|
+
onClick={() => toggleUser(user)}
|
|
394
|
+
selected={true}
|
|
395
|
+
user={user}
|
|
396
|
+
/>
|
|
397
|
+
)
|
|
398
|
+
})}
|
|
399
|
+
{!isLoading && searchTerm && (
|
|
400
|
+
<>
|
|
401
|
+
{displayUsers
|
|
402
|
+
?.filter((user) => !selectedUsers.has(user))
|
|
403
|
+
.map((u, i) => (
|
|
404
|
+
<CreatedByItem
|
|
405
|
+
key={`user-${i}`}
|
|
406
|
+
onClick={() => toggleUser(u)}
|
|
407
|
+
selected={false}
|
|
408
|
+
user={u}
|
|
409
|
+
/>
|
|
410
|
+
))}
|
|
411
|
+
</>
|
|
412
|
+
)}
|
|
413
|
+
</div>
|
|
414
|
+
</CollapsibleWrapper>
|
|
415
|
+
</div>
|
|
416
|
+
)
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
const CreatedByItem = ({
|
|
420
|
+
key,
|
|
421
|
+
onClick,
|
|
422
|
+
selected,
|
|
423
|
+
user,
|
|
424
|
+
}: {
|
|
425
|
+
key: string
|
|
426
|
+
onClick: () => void
|
|
427
|
+
selected: boolean
|
|
428
|
+
user: PasswordlessUser
|
|
429
|
+
}) => {
|
|
430
|
+
return (
|
|
431
|
+
<div
|
|
432
|
+
key={key}
|
|
433
|
+
onClick={onClick}
|
|
434
|
+
className="hover:bg-grey-10 inter-small-regular rounded-rounded flex items-center py-1.5 px-2"
|
|
435
|
+
>
|
|
436
|
+
<div className="inter-small-regular mr-2 flex h-[20px] w-[20px] items-center">
|
|
437
|
+
{selected && <CheckIcon size={16} color="#111827" />}
|
|
438
|
+
</div>
|
|
439
|
+
<div>{`${user.first_name} ${user.last_name}`}</div>
|
|
440
|
+
</div>
|
|
441
|
+
)
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
const TextFilterItem = ({
|
|
445
|
+
title,
|
|
446
|
+
setFilter,
|
|
447
|
+
value,
|
|
448
|
+
options,
|
|
449
|
+
}: {
|
|
450
|
+
title: string
|
|
451
|
+
value: any
|
|
452
|
+
options: { value: string; label: string }[]
|
|
453
|
+
setFilter: (newFilter: any) => void
|
|
454
|
+
}) => {
|
|
455
|
+
const [fieldValue, setFieldValue] = useState(value)
|
|
456
|
+
|
|
457
|
+
const [filterType, setFilterType] = useState<{
|
|
458
|
+
value: string
|
|
459
|
+
label: string
|
|
460
|
+
}>(options.find((o) => !!value?.[o.value]) || options[0])
|
|
461
|
+
|
|
462
|
+
const selectFilterType = (newFilter: { value: string; label: string }) => {
|
|
463
|
+
const value = fieldValue?.[filterType.value]
|
|
464
|
+
setFilterType(newFilter)
|
|
465
|
+
setFieldValue({ [newFilter.value]: value })
|
|
466
|
+
setFilter({ [newFilter.value]: value })
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
const updateFieldValue = (val: string) => {
|
|
470
|
+
setFieldValue({ [filterType.value]: val })
|
|
471
|
+
setFilter({ [filterType.value]: val })
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
return (
|
|
475
|
+
<div className={clsx("w-full border-b")}>
|
|
476
|
+
<CollapsibleWrapper
|
|
477
|
+
title={title}
|
|
478
|
+
defaultOpen={!!value}
|
|
479
|
+
onOpenChange={(open) => {
|
|
480
|
+
if (!open) {
|
|
481
|
+
setFilter(undefined)
|
|
482
|
+
}
|
|
483
|
+
}}
|
|
484
|
+
>
|
|
485
|
+
<div className="gap-y-xsmall flex w-full flex-col py-2">
|
|
486
|
+
<PopoverSelect
|
|
487
|
+
options={options}
|
|
488
|
+
value={filterType}
|
|
489
|
+
onChange={selectFilterType}
|
|
490
|
+
/>
|
|
491
|
+
<InputField
|
|
492
|
+
value={fieldValue?.[filterType.value]}
|
|
493
|
+
placeholder="Write something"
|
|
494
|
+
onChange={(e) => updateFieldValue(e.target.value)}
|
|
495
|
+
/>
|
|
496
|
+
</div>
|
|
497
|
+
</CollapsibleWrapper>
|
|
498
|
+
</div>
|
|
499
|
+
)
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
const NumberFilterItem = ({
|
|
503
|
+
title,
|
|
504
|
+
setFilter,
|
|
505
|
+
value,
|
|
506
|
+
options,
|
|
507
|
+
}: {
|
|
508
|
+
title: string
|
|
509
|
+
value: any
|
|
510
|
+
options: { value: string; label: string }[]
|
|
511
|
+
setFilter: (newFilter: any) => void
|
|
512
|
+
}) => {
|
|
513
|
+
const getInitialValue = (value: any) => {
|
|
514
|
+
const keyLength = value ? Object.keys(value).length : 0
|
|
515
|
+
|
|
516
|
+
if (keyLength === 1) {
|
|
517
|
+
return value
|
|
518
|
+
} else if (keyLength === 2) {
|
|
519
|
+
return { gt: value.gt }
|
|
520
|
+
}
|
|
521
|
+
return null
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
const getInitialFilter = (value: any) => {
|
|
525
|
+
const keyLength = value ? Object.keys(value).length : 0
|
|
526
|
+
|
|
527
|
+
if (keyLength === 1) {
|
|
528
|
+
return (
|
|
529
|
+
options.find((o) => o.value === Object.keys(value)[0]) || options[0]
|
|
530
|
+
)
|
|
531
|
+
} else if (keyLength === 2) {
|
|
532
|
+
return { label: "Between", value: "between" }
|
|
533
|
+
}
|
|
534
|
+
return options[0]
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
const [fieldValue, setFieldValue] = useState(getInitialValue(value))
|
|
538
|
+
const [upperBound, setUpperBound] = useState<null | string>(
|
|
539
|
+
getInitialFilter(value).value === "between" ? value.lt : undefined
|
|
540
|
+
)
|
|
541
|
+
|
|
542
|
+
const [filterType, setFilterType] = useState<{
|
|
543
|
+
value: string
|
|
544
|
+
label: string
|
|
545
|
+
}>(getInitialFilter(value))
|
|
546
|
+
|
|
547
|
+
const selectFilterType = (newFilter: { value: string; label: string }) => {
|
|
548
|
+
const value = fieldValue?.[filterType.value]
|
|
549
|
+
switch (newFilter.value) {
|
|
550
|
+
case "lt":
|
|
551
|
+
case "gt":
|
|
552
|
+
setFieldValue({ [newFilter.value]: value })
|
|
553
|
+
setFilter({ [newFilter.value]: value })
|
|
554
|
+
break
|
|
555
|
+
case "between":
|
|
556
|
+
setFieldValue({ ["gt"]: value })
|
|
557
|
+
setFilter({ ["gt"]: value })
|
|
558
|
+
}
|
|
559
|
+
setFilterType(newFilter)
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
const updateFieldValue = (val: string) => {
|
|
563
|
+
switch (filterType.value) {
|
|
564
|
+
case "lt":
|
|
565
|
+
case "gt":
|
|
566
|
+
setFieldValue({ [filterType.value]: val })
|
|
567
|
+
setFilter({ [filterType.value]: val })
|
|
568
|
+
break
|
|
569
|
+
case "between":
|
|
570
|
+
setFieldValue({ ["gt"]: val })
|
|
571
|
+
setFilter({ ["gt"]: val })
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
const setUpperBoundValue = (val: string | null) => {
|
|
576
|
+
setUpperBound(val)
|
|
577
|
+
|
|
578
|
+
const value = fieldValue?.gt
|
|
579
|
+
setFilter({ gt: value, lt: val })
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
const getLowerBoundValue = () => {
|
|
583
|
+
if (filterType.value === "between") {
|
|
584
|
+
return fieldValue?.gt
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
return fieldValue?.[filterType.value]
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
const reset = () => {
|
|
591
|
+
setFilter(undefined)
|
|
592
|
+
setFieldValue(null)
|
|
593
|
+
setUpperBound(null)
|
|
594
|
+
}
|
|
595
|
+
return (
|
|
596
|
+
<div className={clsx("w-full border-b")}>
|
|
597
|
+
<CollapsibleWrapper
|
|
598
|
+
title={title}
|
|
599
|
+
defaultOpen={!!value}
|
|
600
|
+
onOpenChange={(open) => {
|
|
601
|
+
if (!open) {
|
|
602
|
+
reset()
|
|
603
|
+
}
|
|
604
|
+
}}
|
|
605
|
+
>
|
|
606
|
+
<div className="gap-y-xsmall flex w-full flex-col py-2">
|
|
607
|
+
<PopoverSelect
|
|
608
|
+
options={options}
|
|
609
|
+
value={filterType}
|
|
610
|
+
onChange={selectFilterType}
|
|
611
|
+
/>
|
|
612
|
+
<div className="flex items-center gap-x-2">
|
|
613
|
+
<InputField
|
|
614
|
+
value={getLowerBoundValue()}
|
|
615
|
+
placeholder="0"
|
|
616
|
+
type="number"
|
|
617
|
+
onChange={(e) => updateFieldValue(e.target.value)}
|
|
618
|
+
/>
|
|
619
|
+
{filterType.value === "between" && (
|
|
620
|
+
<>
|
|
621
|
+
<span>-</span>
|
|
622
|
+
<InputField
|
|
623
|
+
value={upperBound ?? undefined}
|
|
624
|
+
placeholder="0"
|
|
625
|
+
type="number"
|
|
626
|
+
onChange={(e) => setUpperBoundValue(e.target.value)}
|
|
627
|
+
/>
|
|
628
|
+
</>
|
|
629
|
+
)}
|
|
630
|
+
</div>
|
|
631
|
+
</div>
|
|
632
|
+
</CollapsibleWrapper>
|
|
633
|
+
</div>
|
|
634
|
+
)
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
const DateFilterItem = ({
|
|
638
|
+
title,
|
|
639
|
+
setFilter,
|
|
640
|
+
value,
|
|
641
|
+
}: {
|
|
642
|
+
title: string
|
|
643
|
+
value: any
|
|
644
|
+
setFilter: (newFilter: any) => void
|
|
645
|
+
}) => {
|
|
646
|
+
const options = [
|
|
647
|
+
{ label: "Before", value: "lt" },
|
|
648
|
+
{ label: "After", value: "gt" },
|
|
649
|
+
{ label: "Between", value: "between" },
|
|
650
|
+
]
|
|
651
|
+
|
|
652
|
+
const getInitialFilter = (value: DateComparisonOperator) => {
|
|
653
|
+
const keyLength = value ? Object.keys(value).length : 0
|
|
654
|
+
|
|
655
|
+
if (keyLength === 1) {
|
|
656
|
+
return (
|
|
657
|
+
options.find((o) => o.value === Object.keys(value)[0]) || options[0]
|
|
658
|
+
)
|
|
659
|
+
} else if (keyLength === 2) {
|
|
660
|
+
return { label: "Between", value: "between" }
|
|
661
|
+
}
|
|
662
|
+
return options[0]
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
const getDate1 = (value: DateComparisonOperator) => {
|
|
666
|
+
const initialFilter = getInitialFilter(value)
|
|
667
|
+
|
|
668
|
+
switch (initialFilter.value) {
|
|
669
|
+
case "lt":
|
|
670
|
+
case "gt":
|
|
671
|
+
return value?.[initialFilter.value] ?? null
|
|
672
|
+
case "between":
|
|
673
|
+
return value?.["gt"] ?? null
|
|
674
|
+
}
|
|
675
|
+
return null
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
const getDate2 = (value: DateComparisonOperator) => {
|
|
679
|
+
const initialFilter = getInitialFilter(value)
|
|
680
|
+
|
|
681
|
+
switch (initialFilter.value) {
|
|
682
|
+
case "between":
|
|
683
|
+
return value["lt"] ?? null
|
|
684
|
+
}
|
|
685
|
+
return null
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
const [filterType, setFilterType] = useState<{
|
|
689
|
+
value: string
|
|
690
|
+
label: string
|
|
691
|
+
}>(getInitialFilter(value))
|
|
692
|
+
|
|
693
|
+
const [date1, setDate1] = useState<Date | null>(getDate1(value))
|
|
694
|
+
const [date2, setDate2] = useState<Date | null>(getDate2(value))
|
|
695
|
+
|
|
696
|
+
const setFilterDate = (values: {
|
|
697
|
+
date1: Date | null
|
|
698
|
+
date2: Date | null
|
|
699
|
+
}) => {
|
|
700
|
+
const { date1, date2 } = values
|
|
701
|
+
setDate1(date1)
|
|
702
|
+
setDate2(date2)
|
|
703
|
+
|
|
704
|
+
switch (filterType.value) {
|
|
705
|
+
case "lt":
|
|
706
|
+
case "gt": {
|
|
707
|
+
if (date1) {
|
|
708
|
+
setFilter({
|
|
709
|
+
[filterType.value]: date1,
|
|
710
|
+
})
|
|
711
|
+
setDate2(null)
|
|
712
|
+
}
|
|
713
|
+
break
|
|
714
|
+
}
|
|
715
|
+
case "between":
|
|
716
|
+
if (date1 && date2) {
|
|
717
|
+
setFilter({
|
|
718
|
+
lt: date2,
|
|
719
|
+
gt: date1,
|
|
720
|
+
})
|
|
721
|
+
}
|
|
722
|
+
break
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
const updateFilterType = (newFilter: { value: string; label: string }) => {
|
|
727
|
+
switch (newFilter.value) {
|
|
728
|
+
case "lt":
|
|
729
|
+
case "gt":
|
|
730
|
+
if (date1) {
|
|
731
|
+
setFilter({
|
|
732
|
+
[newFilter.value]: date1,
|
|
733
|
+
})
|
|
734
|
+
setDate2(null)
|
|
735
|
+
}
|
|
736
|
+
break
|
|
737
|
+
case "between":
|
|
738
|
+
if (date1 && date2) {
|
|
739
|
+
setFilter({
|
|
740
|
+
lt: date2,
|
|
741
|
+
gt: date1,
|
|
742
|
+
})
|
|
743
|
+
}
|
|
744
|
+
break
|
|
745
|
+
}
|
|
746
|
+
setFilterType(newFilter)
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
return (
|
|
750
|
+
<div className={clsx("w-full border-b")}>
|
|
751
|
+
<CollapsibleWrapper
|
|
752
|
+
title={title}
|
|
753
|
+
defaultOpen={!!value}
|
|
754
|
+
onOpenChange={(open) => {
|
|
755
|
+
if (!open) {
|
|
756
|
+
setFilter(undefined)
|
|
757
|
+
}
|
|
758
|
+
}}
|
|
759
|
+
>
|
|
760
|
+
<div className="gap-y-xsmall flex w-full flex-col py-2">
|
|
761
|
+
<PopoverSelect
|
|
762
|
+
options={options}
|
|
763
|
+
value={filterType}
|
|
764
|
+
onChange={updateFilterType}
|
|
765
|
+
/>
|
|
766
|
+
|
|
767
|
+
<div className="flex items-center gap-x-2">
|
|
768
|
+
<FilterDatePicker
|
|
769
|
+
date={date1}
|
|
770
|
+
setDate={(date) => setFilterDate({ date1: date, date2 })}
|
|
771
|
+
/>
|
|
772
|
+
{filterType.value === "between" && (
|
|
773
|
+
<>
|
|
774
|
+
<span>-</span>
|
|
775
|
+
<FilterDatePicker
|
|
776
|
+
date={date2}
|
|
777
|
+
setDate={(date) => setFilterDate({ date1, date2: date })}
|
|
778
|
+
/>
|
|
779
|
+
</>
|
|
780
|
+
)}
|
|
781
|
+
</div>
|
|
782
|
+
</div>
|
|
783
|
+
</CollapsibleWrapper>
|
|
784
|
+
</div>
|
|
785
|
+
)
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
const FilterDatePicker = ({
|
|
789
|
+
date,
|
|
790
|
+
setDate,
|
|
791
|
+
side = "right",
|
|
792
|
+
}: {
|
|
793
|
+
date: Date | null
|
|
794
|
+
setDate: (date: Date | null) => void
|
|
795
|
+
side?: "left" | "right"
|
|
796
|
+
}) => (
|
|
797
|
+
<RadixPopover.Root>
|
|
798
|
+
<RadixPopover.Trigger className="w-full">
|
|
799
|
+
<div className="rounded-rounded inter-small-regular bg-grey-5 flex w-full items-center border py-1.5 pl-3 pr-2 text-left">
|
|
800
|
+
<span className="text-grey-40 mr-1.5">
|
|
801
|
+
<CalendarIcon size={20} />
|
|
802
|
+
</span>
|
|
803
|
+
{date ? (
|
|
804
|
+
<p className="mt-0.5">{moment(date).format("MMM DD, YYYY")}</p>
|
|
805
|
+
) : (
|
|
806
|
+
<p className="text-grey-40 mt-0.5">Pick a date</p>
|
|
807
|
+
)}
|
|
808
|
+
</div>
|
|
809
|
+
</RadixPopover.Trigger>
|
|
810
|
+
<RadixPopover.Content
|
|
811
|
+
side={side}
|
|
812
|
+
sideOffset={8}
|
|
813
|
+
className="bg-grey-0 rounded-rounded border p-1"
|
|
814
|
+
>
|
|
815
|
+
<CalendarComponent date={date} onChange={setDate} greyPastDates={false} />
|
|
816
|
+
</RadixPopover.Content>
|
|
817
|
+
</RadixPopover.Root>
|
|
818
|
+
)
|
|
819
|
+
|
|
820
|
+
const PopoverSelect = ({
|
|
821
|
+
value,
|
|
822
|
+
options,
|
|
823
|
+
onChange,
|
|
824
|
+
}: {
|
|
825
|
+
value: { value: string; label: string }
|
|
826
|
+
options: { value: string; label: string }[]
|
|
827
|
+
onChange: (value: { value: string; label: string }) => void
|
|
828
|
+
}) => {
|
|
829
|
+
return (
|
|
830
|
+
<RadixPopover.Root>
|
|
831
|
+
<RadixPopover.Trigger className="w-full">
|
|
832
|
+
<div className="rounded-rounded bg-grey-5 w-full border py-1.5 pl-3 pr-2 text-left">
|
|
833
|
+
{value.label}
|
|
834
|
+
</div>
|
|
835
|
+
</RadixPopover.Trigger>
|
|
836
|
+
<RadixPopover.Content
|
|
837
|
+
side="right"
|
|
838
|
+
align="start"
|
|
839
|
+
sideOffset={2}
|
|
840
|
+
className="bg-grey-0 rounded-rounded w-52 border p-1"
|
|
841
|
+
>
|
|
842
|
+
{options.map((o, i) => (
|
|
843
|
+
<div
|
|
844
|
+
key={i}
|
|
845
|
+
className="hover:bg-grey-5 rounded-rounded mb-1 flex py-1.5 px-2"
|
|
846
|
+
onClick={() => onChange(o)}
|
|
847
|
+
>
|
|
848
|
+
<div className="mr-2 h-[20px] w-[20px]">
|
|
849
|
+
{value.value === o.value && (
|
|
850
|
+
<TagDotIcon size={20} outerColor="#FFF" color="#111827" />
|
|
851
|
+
)}
|
|
852
|
+
</div>
|
|
853
|
+
<p>{o.label}</p>
|
|
854
|
+
</div>
|
|
855
|
+
))}
|
|
856
|
+
</RadixPopover.Content>
|
|
857
|
+
</RadixPopover.Root>
|
|
858
|
+
)
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
const CollapsibleWrapper = ({
|
|
862
|
+
onOpenChange,
|
|
863
|
+
defaultOpen,
|
|
864
|
+
title,
|
|
865
|
+
children,
|
|
866
|
+
}: {
|
|
867
|
+
onOpenChange: (boolean) => void
|
|
868
|
+
defaultOpen: boolean
|
|
869
|
+
title: string
|
|
870
|
+
} & React.HTMLAttributes<HTMLDivElement>) => {
|
|
871
|
+
const [isOpen, setIsOpen] = useState(defaultOpen)
|
|
872
|
+
return (
|
|
873
|
+
<div className={clsx("border-grey-5 w-full border-b")}>
|
|
874
|
+
<RadixCollapsible.Root
|
|
875
|
+
defaultOpen={defaultOpen}
|
|
876
|
+
onOpenChange={(open) => {
|
|
877
|
+
setIsOpen(open)
|
|
878
|
+
onOpenChange(open)
|
|
879
|
+
}}
|
|
880
|
+
className="w-full"
|
|
881
|
+
>
|
|
882
|
+
<RadixCollapsible.Trigger
|
|
883
|
+
className={clsx(
|
|
884
|
+
"text-grey-50 flex w-full cursor-pointer items-center justify-between rounded py-1.5 px-3"
|
|
885
|
+
)}
|
|
886
|
+
>
|
|
887
|
+
<p>{title}</p>
|
|
888
|
+
<Switch checked={isOpen} type="button" className="cursor-pointer" />
|
|
889
|
+
</RadixCollapsible.Trigger>
|
|
890
|
+
<RadixCollapsible.Content className="flex w-full flex-col gap-y-2 px-2">
|
|
891
|
+
{children}
|
|
892
|
+
</RadixCollapsible.Content>
|
|
893
|
+
</RadixCollapsible.Root>
|
|
894
|
+
</div>
|
|
895
|
+
)
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
function getNewSetState<T>(state: Set<T>, value: T) {
|
|
899
|
+
if (state.has(value)) {
|
|
900
|
+
state.delete(value)
|
|
901
|
+
return new Set(state)
|
|
902
|
+
}
|
|
903
|
+
return new Set(state.add(value))
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
export default ReservationsFilters
|