@medusajs/dashboard 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/README.md +30 -0
- package/dist/app.js +70256 -0
- package/index.html +13 -0
- package/package.json +70 -0
- package/public/locales/$schema.json +315 -0
- package/public/locales/en-US/translation.json +1682 -0
- package/public/vite.svg +1 -0
- package/src/app.tsx +23 -0
- package/src/assets/fonts/Inter-Medium.ttf +0 -0
- package/src/assets/fonts/Inter-Regular.ttf +0 -0
- package/src/assets/fonts/RobotoMono-Medium.ttf +0 -0
- package/src/assets/fonts/RobotoMono-Regular.ttf +0 -0
- package/src/components/authentication/protected-route/index.ts +1 -0
- package/src/components/authentication/protected-route/protected-route.tsx +30 -0
- package/src/components/authentication/require-auth/index.ts +1 -0
- package/src/components/authentication/require-auth/require-auth.tsx +34 -0
- package/src/components/common/action-menu/action-menu.tsx +88 -0
- package/src/components/common/action-menu/index.ts +1 -0
- package/src/components/common/badge-list-summary/badge-list-summary.tsx +73 -0
- package/src/components/common/badge-list-summary/index.ts +1 -0
- package/src/components/common/chip-group/chip-group.tsx +111 -0
- package/src/components/common/chip-group/index.ts +1 -0
- package/src/components/common/conditional-tooltip/conditional-tooltip.tsx +19 -0
- package/src/components/common/conditional-tooltip/index.ts +1 -0
- package/src/components/common/customer-info/customer-info.tsx +200 -0
- package/src/components/common/customer-info/index.ts +1 -0
- package/src/components/common/date/index.ts +11 -0
- package/src/components/common/divider/divider.tsx +31 -0
- package/src/components/common/divider/index.ts +1 -0
- package/src/components/common/empty-table-content/empty-table-content.tsx +101 -0
- package/src/components/common/empty-table-content/index.ts +1 -0
- package/src/components/common/file-upload/file-upload.tsx +137 -0
- package/src/components/common/file-upload/index.ts +1 -0
- package/src/components/common/form/form.tsx +209 -0
- package/src/components/common/form/index.ts +1 -0
- package/src/components/common/generic-forward-ref/generic-forward-ref.tsx +7 -0
- package/src/components/common/generic-forward-ref/index.ts +1 -0
- package/src/components/common/inline-link/index.ts +1 -0
- package/src/components/common/inline-link/inline-link.tsx +21 -0
- package/src/components/common/json-view-section/index.ts +1 -0
- package/src/components/common/json-view-section/json-view-section.tsx +127 -0
- package/src/components/common/list-summary/index.ts +1 -0
- package/src/components/common/list-summary/list-summary.tsx +66 -0
- package/src/components/common/logo-box/index.ts +1 -0
- package/src/components/common/logo-box/logo-box.tsx +74 -0
- package/src/components/common/section/index.ts +1 -0
- package/src/components/common/section/section-row.tsx +37 -0
- package/src/components/common/skeleton/index.ts +1 -0
- package/src/components/common/skeleton/skeleton.tsx +227 -0
- package/src/components/common/sortable-list/index.ts +1 -0
- package/src/components/common/sortable-list/sortable-list.tsx +228 -0
- package/src/components/common/tax-badge/tax-badge.tsx +23 -0
- package/src/components/common/thumbnail/index.ts +1 -0
- package/src/components/common/thumbnail/thumbnail.tsx +22 -0
- package/src/components/common/user-link/index.ts +1 -0
- package/src/components/common/user-link/user-link.tsx +34 -0
- package/src/components/filtering/filter-group/filter-group.tsx +54 -0
- package/src/components/filtering/filter-group/index.ts +1 -0
- package/src/components/filtering/order-by/index.ts +1 -0
- package/src/components/filtering/order-by/order-by.tsx +148 -0
- package/src/components/filtering/query/index.ts +1 -0
- package/src/components/filtering/query/query.tsx +57 -0
- package/src/components/forms/address-form/address-form.tsx +213 -0
- package/src/components/forms/address-form/index.ts +1 -0
- package/src/components/forms/email-form/email-form.tsx +42 -0
- package/src/components/forms/email-form/index.ts +1 -0
- package/src/components/forms/metadata/index.ts +1 -0
- package/src/components/forms/metadata/metadata.tsx +157 -0
- package/src/components/forms/transfer-ownership-form/index.ts +1 -0
- package/src/components/forms/transfer-ownership-form/transfer-ownership-form.tsx +261 -0
- package/src/components/grid/constants.ts +11 -0
- package/src/components/grid/data-grid/data-grid-root/data-grid-root.tsx +649 -0
- package/src/components/grid/data-grid/data-grid-root/index.ts +1 -0
- package/src/components/grid/data-grid/data-grid-skeleton/data-grid-skeleton.tsx +52 -0
- package/src/components/grid/data-grid/data-grid-skeleton/index.ts +1 -0
- package/src/components/grid/data-grid/data-grid.tsx +19 -0
- package/src/components/grid/data-grid/index.ts +1 -0
- package/src/components/grid/grid-cells/common/boolean-cell/boolean-cell.tsx +23 -0
- package/src/components/grid/grid-cells/common/boolean-cell/index.ts +1 -0
- package/src/components/grid/grid-cells/common/currency-cell/currency-cell.tsx +57 -0
- package/src/components/grid/grid-cells/common/currency-cell/index.ts +1 -0
- package/src/components/grid/grid-cells/common/readonly-cell/index.ts +1 -0
- package/src/components/grid/grid-cells/common/readonly-cell/readonly-cell.tsx +14 -0
- package/src/components/grid/grid-cells/common/text-cell/index.ts +1 -0
- package/src/components/grid/grid-cells/common/text-cell/text-cell.tsx +24 -0
- package/src/components/grid/grid-cells/common/void-cell/index.ts +1 -0
- package/src/components/grid/grid-cells/common/void-cell/void-cell.tsx +14 -0
- package/src/components/grid/types.ts +11 -0
- package/src/components/inputs/chip-input/chip-input.tsx +187 -0
- package/src/components/inputs/chip-input/index.ts +1 -0
- package/src/components/inputs/combobox/combobox.tsx +343 -0
- package/src/components/inputs/combobox/index.ts +1 -0
- package/src/components/inputs/country-select/country-select.tsx +67 -0
- package/src/components/inputs/country-select/index.ts +1 -0
- package/src/components/inputs/handle-input/handle-input.tsx +24 -0
- package/src/components/inputs/handle-input/index.ts +1 -0
- package/src/components/inputs/percentage-input/index.ts +1 -0
- package/src/components/inputs/percentage-input/percentage-input.tsx +32 -0
- package/src/components/layout/main-layout/index.ts +1 -0
- package/src/components/layout/main-layout/main-layout.tsx +217 -0
- package/src/components/layout/nav-item/index.ts +1 -0
- package/src/components/layout/nav-item/nav-item.tsx +157 -0
- package/src/components/layout/notifications/index.ts +1 -0
- package/src/components/layout/notifications/notifications.tsx +40 -0
- package/src/components/layout/public-layout/index.ts +1 -0
- package/src/components/layout/public-layout/public-layout.tsx +14 -0
- package/src/components/layout/settings-layout/index.ts +1 -0
- package/src/components/layout/settings-layout/settings-layout.tsx +164 -0
- package/src/components/layout/shell/index.ts +1 -0
- package/src/components/layout/shell/shell.tsx +392 -0
- package/src/components/layout/split-view/index.ts +1 -0
- package/src/components/layout/split-view/split-view.tsx +103 -0
- package/src/components/localization/localized-date-picker/index.ts +1 -0
- package/src/components/localization/localized-date-picker/localized-date-picker.tsx +37 -0
- package/src/components/localization/localized-table-pagination/index.ts +1 -0
- package/src/components/localization/localized-table-pagination/localized-table-pagination.tsx +26 -0
- package/src/components/route-modal/index.ts +3 -0
- package/src/components/route-modal/route-drawer/index.ts +1 -0
- package/src/components/route-modal/route-drawer/route-drawer.tsx +59 -0
- package/src/components/route-modal/route-focus-modal/index.ts +1 -0
- package/src/components/route-modal/route-focus-modal/route-focus-modal.tsx +58 -0
- package/src/components/route-modal/route-form/index.ts +1 -0
- package/src/components/route-modal/route-form/route-form.tsx +72 -0
- package/src/components/route-modal/route-modal-provider/index.ts +1 -0
- package/src/components/route-modal/route-modal-provider/route-provider.tsx +41 -0
- package/src/components/search/index.ts +1 -0
- package/src/components/search/search.tsx +277 -0
- package/src/components/table/data-table/data-table-filter/context.tsx +19 -0
- package/src/components/table/data-table/data-table-filter/data-table-filter.tsx +287 -0
- package/src/components/table/data-table/data-table-filter/date-filter.tsx +357 -0
- package/src/components/table/data-table/data-table-filter/index.ts +1 -0
- package/src/components/table/data-table/data-table-filter/number-filter.tsx +372 -0
- package/src/components/table/data-table/data-table-filter/select-filter.tsx +262 -0
- package/src/components/table/data-table/data-table-filter/string-filter.tsx +188 -0
- package/src/components/table/data-table/data-table-filter/types.ts +8 -0
- package/src/components/table/data-table/data-table-order-by/data-table-order-by.tsx +157 -0
- package/src/components/table/data-table/data-table-order-by/index.ts +1 -0
- package/src/components/table/data-table/data-table-query/data-table-query.tsx +34 -0
- package/src/components/table/data-table/data-table-query/index.ts +1 -0
- package/src/components/table/data-table/data-table-root/data-table-root.tsx +332 -0
- package/src/components/table/data-table/data-table-root/index.ts +1 -0
- package/src/components/table/data-table/data-table-search/data-table-search.tsx +57 -0
- package/src/components/table/data-table/data-table-search/index.ts +1 -0
- package/src/components/table/data-table/data-table.tsx +88 -0
- package/src/components/table/data-table/hooks.tsx +73 -0
- package/src/components/table/data-table/index.ts +2 -0
- package/src/components/table/table-cells/common/code-cell/code-cell.tsx +26 -0
- package/src/components/table/table-cells/common/code-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/created-at-cell/created-at-cell.tsx +46 -0
- package/src/components/table/table-cells/common/created-at-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/date-cell/date-cell.tsx +46 -0
- package/src/components/table/table-cells/common/date-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/email-cell/email-cell.tsx +28 -0
- package/src/components/table/table-cells/common/email-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/money-amount-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/money-amount-cell/money-amount-cell.tsx +38 -0
- package/src/components/table/table-cells/common/name-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/name-cell/name-cell.tsx +31 -0
- package/src/components/table/table-cells/common/placeholder-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/placeholder-cell/placeholder-cell.tsx +7 -0
- package/src/components/table/table-cells/common/status-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/status-cell/status-cell.tsx +32 -0
- package/src/components/table/table-cells/common/text-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/text-cell/text-cell.tsx +29 -0
- package/src/components/table/table-cells/customer/account-cell/account-cell.tsx +27 -0
- package/src/components/table/table-cells/customer/first-seen-cell/first-seen-cell.tsx +25 -0
- package/src/components/table/table-cells/customer/first-seen-cell/index.ts +1 -0
- package/src/components/table/table-cells/discount/code-cell/code-cell.tsx +28 -0
- package/src/components/table/table-cells/discount/code-cell/index.ts +1 -0
- package/src/components/table/table-cells/discount/description-cell/description-cell.tsx +25 -0
- package/src/components/table/table-cells/discount/description-cell/index.ts +1 -0
- package/src/components/table/table-cells/discount/redemption-cell/index.ts +1 -0
- package/src/components/table/table-cells/discount/redemption-cell/redemption-cell.tsx +23 -0
- package/src/components/table/table-cells/discount/status-cell/index.ts +1 -0
- package/src/components/table/table-cells/discount/status-cell/status-cell.tsx +45 -0
- package/src/components/table/table-cells/discount/value-cell/index.ts +1 -0
- package/src/components/table/table-cells/discount/value-cell/value-cell.tsx +35 -0
- package/src/components/table/table-cells/order/country-cell/country-cell.tsx +28 -0
- package/src/components/table/table-cells/order/country-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/customer-cell/customer-cell.tsx +27 -0
- package/src/components/table/table-cells/order/customer-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/display-id-cell/display-id-cell.tsx +24 -0
- package/src/components/table/table-cells/order/display-id-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/fulfillment-status-cell/fulfillment-status-cell.tsx +33 -0
- package/src/components/table/table-cells/order/fulfillment-status-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/payment-status-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/payment-status-cell/payment-status-cell.tsx +29 -0
- package/src/components/table/table-cells/order/sales-channel-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/sales-channel-cell/sales-channel-cell.tsx +30 -0
- package/src/components/table/table-cells/order/total-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/total-cell/total-cell.tsx +28 -0
- package/src/components/table/table-cells/product/collection-cell/collection-cell.tsx +30 -0
- package/src/components/table/table-cells/product/collection-cell/index.ts +1 -0
- package/src/components/table/table-cells/product/product-cell/index.ts +1 -0
- package/src/components/table/table-cells/product/product-cell/product-cell.tsx +29 -0
- package/src/components/table/table-cells/product/product-status-cell/index.ts +1 -0
- package/src/components/table/table-cells/product/product-status-cell/product-status-cell.tsx +31 -0
- package/src/components/table/table-cells/product/sales-channels-cell/index.ts +1 -0
- package/src/components/table/table-cells/product/sales-channels-cell/sales-channels-cell.tsx +65 -0
- package/src/components/table/table-cells/product/variant-cell/index.ts +1 -0
- package/src/components/table/table-cells/product/variant-cell/variant-cell.tsx +34 -0
- package/src/components/table/table-cells/promotion/status-cell/index.ts +1 -0
- package/src/components/table/table-cells/promotion/status-cell/status-cell.tsx +28 -0
- package/src/components/table/table-cells/region/countries-cell/countries-cell.tsx +39 -0
- package/src/components/table/table-cells/region/countries-cell/index.ts +1 -0
- package/src/components/table/table-cells/region/fulfillment-providers-cell/fulfillment-providers-cell.tsx +49 -0
- package/src/components/table/table-cells/region/fulfillment-providers-cell/index.ts +1 -0
- package/src/components/table/table-cells/region/payment-providers-cell/index.ts +1 -0
- package/src/components/table/table-cells/region/payment-providers-cell/payment-providers-cell.tsx +36 -0
- package/src/components/table/table-cells/region/region-cell/index.ts +1 -0
- package/src/components/table/table-cells/region/region-cell/region-cell.tsx +23 -0
- package/src/components/table/table-cells/sales-channel/description-cell/description-cell.tsx +28 -0
- package/src/components/table/table-cells/sales-channel/description-cell/index.ts +1 -0
- package/src/components/table/table-cells/sales-channel/name-cell/index.ts +1 -0
- package/src/components/table/table-cells/sales-channel/name-cell/name-cell.tsx +28 -0
- package/src/components/table/table-cells/shipping-option/admin-only-cell/admin-only-cell.tsx +25 -0
- package/src/components/table/table-cells/shipping-option/admin-only-cell/index.ts +1 -0
- package/src/components/table/table-cells/shipping-option/is-return-cell/index.ts +1 -0
- package/src/components/table/table-cells/shipping-option/is-return-cell/is-return-cell.tsx +27 -0
- package/src/components/table/table-cells/shipping-option/price-type-cell/index.ts +1 -0
- package/src/components/table/table-cells/shipping-option/price-type-cell/price-type-cell.tsx +34 -0
- package/src/components/table/table-cells/shipping-option/shipping-option-cell/index.ts +1 -0
- package/src/components/table/table-cells/shipping-option/shipping-option-cell/shipping-option-cell.tsx +28 -0
- package/src/components/table/table-cells/shipping-option/shipping-price-cell/shipping-price-cell.tsx +31 -0
- package/src/components/table/table-cells/shipping-option/subtotal-requirement-cell/index.ts +1 -0
- package/src/components/table/table-cells/shipping-option/subtotal-requirement-cell/subtotal-requirement-cell.tsx +43 -0
- package/src/components/table/table-cells/taxes/type-cell/index.ts +1 -0
- package/src/components/table/table-cells/taxes/type-cell/type-cell.tsx +33 -0
- package/src/components/utilities/error-boundary/error-boundary.tsx +59 -0
- package/src/components/utilities/error-boundary/index.ts +1 -0
- package/src/components/utilities/i18n/i18n.tsx +23 -0
- package/src/components/utilities/i18n/index.ts +1 -0
- package/src/hooks/api/api-keys.tsx +163 -0
- package/src/hooks/api/auth.tsx +22 -0
- package/src/hooks/api/campaigns.tsx +125 -0
- package/src/hooks/api/categories.tsx +53 -0
- package/src/hooks/api/collections.tsx +123 -0
- package/src/hooks/api/currencies.tsx +39 -0
- package/src/hooks/api/customer-groups.tsx +185 -0
- package/src/hooks/api/customers.tsx +109 -0
- package/src/hooks/api/fulfillment-providers.tsx +24 -0
- package/src/hooks/api/inventory.tsx +219 -0
- package/src/hooks/api/invites.tsx +94 -0
- package/src/hooks/api/orders.ts +40 -0
- package/src/hooks/api/payments.ts +24 -0
- package/src/hooks/api/price-lists.tsx +140 -0
- package/src/hooks/api/product-types.tsx +40 -0
- package/src/hooks/api/products.tsx +259 -0
- package/src/hooks/api/promotions.tsx +280 -0
- package/src/hooks/api/regions.tsx +97 -0
- package/src/hooks/api/reservations.tsx +119 -0
- package/src/hooks/api/sales-channels.tsx +208 -0
- package/src/hooks/api/shipping-options.ts +91 -0
- package/src/hooks/api/shipping-profiles.tsx +99 -0
- package/src/hooks/api/stock-locations.tsx +258 -0
- package/src/hooks/api/store.tsx +48 -0
- package/src/hooks/api/tags.tsx +39 -0
- package/src/hooks/api/tax-rates.tsx +119 -0
- package/src/hooks/api/tax-regions.tsx +97 -0
- package/src/hooks/api/users.tsx +104 -0
- package/src/hooks/api/workflow-executions.tsx +55 -0
- package/src/hooks/table/columns/use-campaign-table-columns.tsx +73 -0
- package/src/hooks/table/columns/use-category-table-columns.tsx +114 -0
- package/src/hooks/table/columns/use-customer-group-table-columns.tsx +34 -0
- package/src/hooks/table/columns/use-customer-table-columns.tsx +51 -0
- package/src/hooks/table/columns/use-discount-table-columns.tsx +65 -0
- package/src/hooks/table/columns/use-order-table-columns.tsx +142 -0
- package/src/hooks/table/columns/use-product-table-columns.tsx +59 -0
- package/src/hooks/table/columns/use-region-table-columns.tsx +40 -0
- package/src/hooks/table/columns/use-sales-channel-table-columns.tsx +46 -0
- package/src/hooks/table/columns/use-shipping-option-table-columns.tsx +107 -0
- package/src/hooks/table/columns/use-tax-rates-table-columns.tsx +55 -0
- package/src/hooks/table/columns-v2/use-promotion-table-columns.tsx +49 -0
- package/src/hooks/table/filters/use-customer-group-table-filters.tsx +21 -0
- package/src/hooks/table/filters/use-customer-table-filters.tsx +69 -0
- package/src/hooks/table/filters/use-discount-table-filters.tsx +51 -0
- package/src/hooks/table/filters/use-order-table-filters.tsx +156 -0
- package/src/hooks/table/filters/use-product-table-filters.tsx +192 -0
- package/src/hooks/table/filters/use-promotion-table-filters.tsx +13 -0
- package/src/hooks/table/filters/use-region-table-filters.tsx +19 -0
- package/src/hooks/table/filters/use-sales-channel-table-filters.tsx +17 -0
- package/src/hooks/table/filters/use-shipping-option-table-filters.tsx +39 -0
- package/src/hooks/table/filters/use-tax-rate-table-filters.tsx +19 -0
- package/src/hooks/table/filters-v2/use-promotion-table-filters.tsx +13 -0
- package/src/hooks/table/query/use-campaign-table-query.tsx +31 -0
- package/src/hooks/table/query/use-customer-group-table-query.tsx +34 -0
- package/src/hooks/table/query/use-customer-table-query.tsx +44 -0
- package/src/hooks/table/query/use-discount-table-query.tsx +45 -0
- package/src/hooks/table/query/use-order-table-query.tsx +55 -0
- package/src/hooks/table/query/use-product-table-query.tsx +69 -0
- package/src/hooks/table/query/use-region-table-query.tsx +33 -0
- package/src/hooks/table/query/use-sales-channel-table-query.tsx +33 -0
- package/src/hooks/table/query/use-shipping-option-table-query.tsx +48 -0
- package/src/hooks/table/query/use-tax-rate-table-query.tsx +33 -0
- package/src/hooks/table/query/use-tax-region-table-query copy.tsx +32 -0
- package/src/hooks/table/query/use-user-invite-table-query.tsx +32 -0
- package/src/hooks/table/query-v2/use-promotion-table-query.tsx +32 -0
- package/src/hooks/use-combobox-data.tsx +91 -0
- package/src/hooks/use-command-history.tsx +67 -0
- package/src/hooks/use-data-table.tsx +132 -0
- package/src/hooks/use-date.tsx +46 -0
- package/src/hooks/use-debounced-search.tsx +29 -0
- package/src/hooks/use-handle-table-scroll.tsx +24 -0
- package/src/hooks/use-media-query.tsx +14 -0
- package/src/hooks/use-query-params.tsx +24 -0
- package/src/i18n/config.ts +19 -0
- package/src/i18n/languages.ts +11 -0
- package/src/i18n/translations/$schema.json +315 -0
- package/src/i18n/translations/en.json +1682 -0
- package/src/i18n/translations/index.ts +7 -0
- package/src/i18n/types.ts +15 -0
- package/src/i18next.d.ts +7 -0
- package/src/index.css +48 -0
- package/src/lib/addresses.ts +87 -0
- package/src/lib/api-v2/auth.ts +65 -0
- package/src/lib/api-v2/campaign.ts +57 -0
- package/src/lib/api-v2/currencies.ts +37 -0
- package/src/lib/api-v2/index.ts +3 -0
- package/src/lib/api-v2/types/auth.ts +13 -0
- package/src/lib/api-v2/types/common.ts +5 -0
- package/src/lib/api-v2/types/store.ts +7 -0
- package/src/lib/cast-number.ts +6 -0
- package/src/lib/client/api-keys.ts +63 -0
- package/src/lib/client/auth.ts +22 -0
- package/src/lib/client/campaigns.ts +48 -0
- package/src/lib/client/categories.ts +27 -0
- package/src/lib/client/client.ts +59 -0
- package/src/lib/client/collections.ts +44 -0
- package/src/lib/client/common.ts +108 -0
- package/src/lib/client/currencies.ts +15 -0
- package/src/lib/client/customer-groups.ts +83 -0
- package/src/lib/client/customers.ts +35 -0
- package/src/lib/client/fulfillment-providers.ts +13 -0
- package/src/lib/client/index.ts +1 -0
- package/src/lib/client/inventory.ts +108 -0
- package/src/lib/client/invites.ts +38 -0
- package/src/lib/client/orders.ts +15 -0
- package/src/lib/client/payments.ts +13 -0
- package/src/lib/client/price-lists.ts +57 -0
- package/src/lib/client/product-types.ts +15 -0
- package/src/lib/client/products.ts +89 -0
- package/src/lib/client/promotions.ts +119 -0
- package/src/lib/client/regions.ts +35 -0
- package/src/lib/client/reservations.ts +41 -0
- package/src/lib/client/sales-channels.ts +78 -0
- package/src/lib/client/shipping-options.ts +41 -0
- package/src/lib/client/shipping-profiles.ts +35 -0
- package/src/lib/client/stock-locations.ts +106 -0
- package/src/lib/client/stores.ts +25 -0
- package/src/lib/client/tags.ts +18 -0
- package/src/lib/client/taxes.ts +59 -0
- package/src/lib/client/users.ts +31 -0
- package/src/lib/client/workflow-executions.ts +27 -0
- package/src/lib/common.ts +16 -0
- package/src/lib/countries.ts +1765 -0
- package/src/lib/currencies.ts +734 -0
- package/src/lib/discounts.ts +32 -0
- package/src/lib/format-provider.ts +18 -0
- package/src/lib/is-axios-error.ts +5 -0
- package/src/lib/medusa.ts +19 -0
- package/src/lib/metadata.ts +84 -0
- package/src/lib/money-amount-helpers.ts +95 -0
- package/src/lib/order-helpers.ts +52 -0
- package/src/lib/percentage-helpers.ts +27 -0
- package/src/lib/promotions.ts +31 -0
- package/src/lib/query-key-factory.ts +54 -0
- package/src/lib/rma.ts +75 -0
- package/src/lib/schemas.ts +36 -0
- package/src/lib/shipping-options.ts +17 -0
- package/src/lib/validation.ts +47 -0
- package/src/main.tsx +9 -0
- package/src/module.d.ts +39 -0
- package/src/providers/feature-provider/feature-context.tsx +8 -0
- package/src/providers/feature-provider/feature-provider.tsx +33 -0
- package/src/providers/feature-provider/index.ts +2 -0
- package/src/providers/feature-provider/types.ts +16 -0
- package/src/providers/feature-provider/use-feature.tsx +10 -0
- package/src/providers/router-provider/index.ts +1 -0
- package/src/providers/router-provider/route-extensions.tsx +18 -0
- package/src/providers/router-provider/route-map.tsx +1022 -0
- package/src/providers/router-provider/router-provider.tsx +14 -0
- package/src/providers/router-provider/settings-extensions.tsx +19 -0
- package/src/providers/search-provider/index.ts +2 -0
- package/src/providers/search-provider/search-context.tsx +9 -0
- package/src/providers/search-provider/search-provider.tsx +38 -0
- package/src/providers/search-provider/use-search.tsx +10 -0
- package/src/providers/sidebar-provider/index.ts +2 -0
- package/src/providers/sidebar-provider/sidebar-context.tsx +9 -0
- package/src/providers/sidebar-provider/sidebar-provider.tsx +31 -0
- package/src/providers/sidebar-provider/use-sidebar.tsx +12 -0
- package/src/providers/theme-provider/index.ts +3 -0
- package/src/providers/theme-provider/theme-context.tsx +10 -0
- package/src/providers/theme-provider/theme-provider.tsx +54 -0
- package/src/providers/theme-provider/use-theme.tsx +10 -0
- package/src/routes/categories/details/details.tsx +30 -0
- package/src/routes/categories/details/index.ts +1 -0
- package/src/routes/categories/list/index.ts +1 -0
- package/src/routes/categories/list/list.tsx +30 -0
- package/src/routes/discounts/common/components/conditions-drawer/conditions-drawer.tsx +664 -0
- package/src/routes/discounts/common/components/conditions-drawer/index.ts +1 -0
- package/src/routes/discounts/common/constants.ts +7 -0
- package/src/routes/discounts/common/hooks/columns/use-customer-group-conditions-table-columns.tsx +46 -0
- package/src/routes/discounts/common/hooks/columns/use-product-collection-conditions-table-columns.tsx +60 -0
- package/src/routes/discounts/common/hooks/columns/use-product-conditions-table-columns.tsx +46 -0
- package/src/routes/discounts/common/hooks/columns/use-product-tag-conditions-table-columns.tsx +48 -0
- package/src/routes/discounts/common/hooks/columns/use-product-type-conditions-table-columns.tsx +49 -0
- package/src/routes/discounts/common/hooks/filters/use-customer-group-conditions-table-filters.tsx +17 -0
- package/src/routes/discounts/common/hooks/filters/use-product-collection-conditions-table-filters.tsx +17 -0
- package/src/routes/discounts/common/hooks/filters/use-product-tag-conditions-table-filters.tsx +17 -0
- package/src/routes/discounts/common/hooks/filters/use-product-type-conditions-table-filters.tsx +17 -0
- package/src/routes/discounts/common/hooks/query/use-product-collection-conditions-table-query.tsx +42 -0
- package/src/routes/discounts/common/hooks/query/use-product-tag-conditions-table-query.tsx +39 -0
- package/src/routes/discounts/common/hooks/query/use-product-type-conditions-table-query.tsx +29 -0
- package/src/routes/discounts/common/types.ts +10 -0
- package/src/routes/discounts/discount-create/components/create-discount-form/create-discount-details.tsx +680 -0
- package/src/routes/discounts/discount-create/components/create-discount-form/create-discount-form.tsx +206 -0
- package/src/routes/discounts/discount-create/components/create-discount-form/index.ts +1 -0
- package/src/routes/discounts/discount-create/components/create-discount-form/types.ts +5 -0
- package/src/routes/discounts/discount-create/discount-create.tsx +10 -0
- package/src/routes/discounts/discount-create/index.ts +1 -0
- package/src/routes/discounts/discount-detail/components/details-section/details-section.tsx +96 -0
- package/src/routes/discounts/discount-detail/components/details-section/index.ts +1 -0
- package/src/routes/discounts/discount-detail/components/discount-conditions-section/discount-conditions-section.tsx +132 -0
- package/src/routes/discounts/discount-detail/components/discount-conditions-section/index.ts +1 -0
- package/src/routes/discounts/discount-detail/components/discount-configurations-section/discount-configurations-section.tsx +89 -0
- package/src/routes/discounts/discount-detail/components/discount-configurations-section/index.ts +1 -0
- package/src/routes/discounts/discount-detail/components/discount-general-section/discount-general-section.tsx +109 -0
- package/src/routes/discounts/discount-detail/components/discount-general-section/index.ts +1 -0
- package/src/routes/discounts/discount-detail/components/discount-redemptions-section/index.ts +1 -0
- package/src/routes/discounts/discount-detail/components/discount-redemptions-section/redemptions-section.tsx +40 -0
- package/src/routes/discounts/discount-detail/discount-detail.tsx +72 -0
- package/src/routes/discounts/discount-detail/index.ts +2 -0
- package/src/routes/discounts/discount-detail/loader.ts +32 -0
- package/src/routes/discounts/discount-edit-conditions/components/edit-discount-form/edit-discount-conditions-form.tsx +583 -0
- package/src/routes/discounts/discount-edit-conditions/components/edit-discount-form/index.ts +1 -0
- package/src/routes/discounts/discount-edit-conditions/discount-edit-conditions.tsx +26 -0
- package/src/routes/discounts/discount-edit-conditions/index.ts +1 -0
- package/src/routes/discounts/discount-edit-configuration/components/edit-discount-form/edit-discount-configuration-form.tsx +510 -0
- package/src/routes/discounts/discount-edit-configuration/components/edit-discount-form/index.ts +1 -0
- package/src/routes/discounts/discount-edit-configuration/discount-edit-configuration.tsx +29 -0
- package/src/routes/discounts/discount-edit-configuration/index.ts +1 -0
- package/src/routes/discounts/discount-edit-details/components/edit-discount-form/edit-discount-details-form.tsx +237 -0
- package/src/routes/discounts/discount-edit-details/components/edit-discount-form/index.ts +1 -0
- package/src/routes/discounts/discount-edit-details/discount-edit-details.tsx +29 -0
- package/src/routes/discounts/discount-edit-details/index.ts +1 -0
- package/src/routes/discounts/discount-list/components/discount-list-table/discount-list-table.tsx +145 -0
- package/src/routes/discounts/discount-list/components/discount-list-table/index.ts +1 -0
- package/src/routes/discounts/discount-list/discount-list.tsx +20 -0
- package/src/routes/discounts/discount-list/index.ts +2 -0
- package/src/routes/discounts/discount-list/loader.ts +24 -0
- package/src/routes/draft-orders/common/edit-address-form/edit-address-form.tsx +98 -0
- package/src/routes/draft-orders/common/edit-address-form/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-billing-address/draft-order-billing-address.tsx +50 -0
- package/src/routes/draft-orders/draft-order-billing-address/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/constants.ts +130 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/context.ts +5 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-details/create-draft-order-address-details.tsx +276 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-details/create-draft-order-customer-details.tsx +164 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-details/create-draft-order-details.tsx +34 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-details/create-draft-order-items-details.tsx +321 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-details/create-draft-order-region-details.tsx +114 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-details/create-draft-order-shipping-method-details.tsx +185 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-details/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-drawer/add-custom-item-drawer.tsx +125 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-drawer/add-variant-drawer.tsx +245 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-drawer/create-draft-order-drawer.tsx +14 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-drawer/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-form.tsx +455 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-summary/create-draft-order-custom-items-summary.tsx +62 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-summary/create-draft-order-customer-summary.tsx +105 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-summary/create-draft-order-fields-summary.tsx +42 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-summary/create-draft-order-summary.tsx +30 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-summary/create-draft-order-total-summary.tsx +121 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-summary/create-draft-order-variant-items-summary.tsx +83 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/create-draft-order-summary/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/hooks.ts +14 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-create/components/create-draft-order-form/types.ts +46 -0
- package/src/routes/draft-orders/draft-order-create/draft-order-create.tsx +10 -0
- package/src/routes/draft-orders/draft-order-create/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-detail/components/draft-order-customer-section/draft-order-customer-section.tsx +71 -0
- package/src/routes/draft-orders/draft-order-detail/components/draft-order-customer-section/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-detail/components/draft-order-general-section/draft-order-general-section.tsx +228 -0
- package/src/routes/draft-orders/draft-order-detail/components/draft-order-general-section/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-detail/components/draft-order-summary-section/draft-order-summary-section.tsx +364 -0
- package/src/routes/draft-orders/draft-order-detail/components/draft-order-summary-section/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-detail/draft-order-detail.tsx +43 -0
- package/src/routes/draft-orders/draft-order-detail/index.ts +2 -0
- package/src/routes/draft-orders/draft-order-detail/loader.ts +21 -0
- package/src/routes/draft-orders/draft-order-email/components/edit-draft-order-email-form/edit-draft-order-email-form.tsx +66 -0
- package/src/routes/draft-orders/draft-order-email/components/edit-draft-order-email-form/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-email/draft-order-email.tsx +28 -0
- package/src/routes/draft-orders/draft-order-email/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-list/components/draft-order-list-table/draft-order-list-table.tsx +69 -0
- package/src/routes/draft-orders/draft-order-list/components/draft-order-list-table/draft-order-table-actions.tsx +59 -0
- package/src/routes/draft-orders/draft-order-list/components/draft-order-list-table/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-list/components/draft-order-list-table/use-draft-order-table-columns.tsx +81 -0
- package/src/routes/draft-orders/draft-order-list/components/draft-order-list-table/use-draft-order-table-filters.tsx +36 -0
- package/src/routes/draft-orders/draft-order-list/components/draft-order-list-table/use-draft-order-table-query.tsx +31 -0
- package/src/routes/draft-orders/draft-order-list/draft-order-list.tsx +11 -0
- package/src/routes/draft-orders/draft-order-list/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-shipping-address/draft-order-shipping-address.tsx +50 -0
- package/src/routes/draft-orders/draft-order-shipping-address/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-transfer-ownership/components/transfer-draft-order-ownership-form/index.ts +1 -0
- package/src/routes/draft-orders/draft-order-transfer-ownership/components/transfer-draft-order-ownership-form/transfer-draft-order-ownership-form.tsx +72 -0
- package/src/routes/draft-orders/draft-order-transfer-ownership/draft-order-transfer-ownership.tsx +28 -0
- package/src/routes/draft-orders/draft-order-transfer-ownership/index.ts +1 -0
- package/src/routes/gift-cards/gift-card-create/components/create-gift-card-form/create-gift-card-form.tsx +301 -0
- package/src/routes/gift-cards/gift-card-create/components/create-gift-card-form/index.ts +1 -0
- package/src/routes/gift-cards/gift-card-create/gift-card-create.tsx +10 -0
- package/src/routes/gift-cards/gift-card-create/index.ts +1 -0
- package/src/routes/gift-cards/gift-card-detail/components/gift-card-general-section/gift-card-general-section.tsx +194 -0
- package/src/routes/gift-cards/gift-card-detail/components/gift-card-general-section/index.ts +1 -0
- package/src/routes/gift-cards/gift-card-detail/gift-card-detail.tsx +33 -0
- package/src/routes/gift-cards/gift-card-detail/index.ts +2 -0
- package/src/routes/gift-cards/gift-card-detail/loader.ts +21 -0
- package/src/routes/gift-cards/gift-card-edit/components/edit-gift-card-form/edit-gift-card-form.tsx +270 -0
- package/src/routes/gift-cards/gift-card-edit/components/edit-gift-card-form/index.ts +1 -0
- package/src/routes/gift-cards/gift-card-edit/gift-card-edit.tsx +26 -0
- package/src/routes/gift-cards/gift-card-edit/index.ts +1 -0
- package/src/routes/gift-cards/gift-card-list/components/gift-card-list-table/gift-card-list-table.tsx +68 -0
- package/src/routes/gift-cards/gift-card-list/components/gift-card-list-table/index.ts +1 -0
- package/src/routes/gift-cards/gift-card-list/components/gift-card-list-table/use-gift-card-table-columns.tsx +136 -0
- package/src/routes/gift-cards/gift-card-list/components/gift-card-list-table/use-gift-card-table-filters.tsx +21 -0
- package/src/routes/gift-cards/gift-card-list/components/gift-card-list-table/use-gift-card-table-query.tsx +19 -0
- package/src/routes/gift-cards/gift-card-list/gift-card-list.tsx +11 -0
- package/src/routes/gift-cards/gift-card-list/index.ts +1 -0
- package/src/routes/home/home.tsx +13 -0
- package/src/routes/home/index.ts +1 -0
- package/src/routes/inventory/inventory-list/components/inventory-list-table/index.ts +1 -0
- package/src/routes/inventory/inventory-list/components/inventory-list-table/inventory-actions.tsx +52 -0
- package/src/routes/inventory/inventory-list/components/inventory-list-table/inventory-list-table.tsx +64 -0
- package/src/routes/inventory/inventory-list/components/inventory-list-table/use-inventory-table-columns.tsx +118 -0
- package/src/routes/inventory/inventory-list/components/inventory-list-table/use-inventory-table-filters.tsx +82 -0
- package/src/routes/inventory/inventory-list/components/inventory-list-table/use-inventory-table-query.tsx +57 -0
- package/src/routes/inventory/inventory-list/index.ts +1 -0
- package/src/routes/inventory/inventory-list/inventory-list.tsx +9 -0
- package/src/routes/invite/index.ts +1 -0
- package/src/routes/invite/invite.tsx +387 -0
- package/src/routes/login/index.ts +1 -0
- package/src/routes/login/login.tsx +141 -0
- package/src/routes/no-match/index.ts +1 -0
- package/src/routes/no-match/no-match.tsx +3 -0
- package/src/routes/orders/common/edit-address-form/edit-order-address-form.tsx +96 -0
- package/src/routes/orders/common/edit-address-form/index.ts +1 -0
- package/src/routes/orders/order-billing-address/index.ts +1 -0
- package/src/routes/orders/order-billing-address/order-billing-address.tsx +50 -0
- package/src/routes/orders/order-create-return/components/order-create-return-form/constants.ts +16 -0
- package/src/routes/orders/order-create-return/components/order-create-return-form/index.ts +1 -0
- package/src/routes/orders/order-create-return/components/order-create-return-form/order-create-return-details/index.ts +1 -0
- package/src/routes/orders/order-create-return/components/order-create-return-form/order-create-return-details/order-create-return-details.tsx +501 -0
- package/src/routes/orders/order-create-return/components/order-create-return-form/order-create-return-details/return-item.tsx +138 -0
- package/src/routes/orders/order-create-return/components/order-create-return-form/order-create-return-form.tsx +286 -0
- package/src/routes/orders/order-create-return/components/order-create-return-form/order-create-return-item-table/index.ts +1 -0
- package/src/routes/orders/order-create-return/components/order-create-return-form/order-create-return-item-table/order-create-return-item-table.tsx +277 -0
- package/src/routes/orders/order-create-return/components/order-create-return-form/order-create-return-item-table/use-return-item-table-columns.tsx +103 -0
- package/src/routes/orders/order-create-return/components/order-create-return-form/order-create-return-item-table/use-return-item-table-filters.tsx +31 -0
- package/src/routes/orders/order-create-return/components/order-create-return-form/order-create-return-item-table/use-return-item-table-query.tsx +61 -0
- package/src/routes/orders/order-create-return/index.ts +1 -0
- package/src/routes/orders/order-create-return/order-create-return.tsx +26 -0
- package/src/routes/orders/order-detail/components/order-activity-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/order-activity-section/order-activity-section.tsx +25 -0
- package/src/routes/orders/order-detail/components/order-activity-section/order-note-form.tsx +112 -0
- package/src/routes/orders/order-detail/components/order-activity-section/order-timeline.tsx +405 -0
- package/src/routes/orders/order-detail/components/order-customer-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/order-customer-section/order-customer-section.tsx +69 -0
- package/src/routes/orders/order-detail/components/order-fulfillment-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/order-fulfillment-section/order-fulfillment-section.tsx +324 -0
- package/src/routes/orders/order-detail/components/order-general-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/order-general-section/order-general-section.tsx +114 -0
- package/src/routes/orders/order-detail/components/order-payment-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/order-payment-section/order-payment-section.tsx +284 -0
- package/src/routes/orders/order-detail/components/order-summary-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx +244 -0
- package/src/routes/orders/order-detail/constants.ts +2 -0
- package/src/routes/orders/order-detail/index.ts +2 -0
- package/src/routes/orders/order-detail/loader.ts +25 -0
- package/src/routes/orders/order-detail/order-detail.tsx +56 -0
- package/src/routes/orders/order-edit/components/order-edit-form/index.tsx +1 -0
- package/src/routes/orders/order-edit/components/order-edit-form/order-edit-form.tsx +359 -0
- package/src/routes/orders/order-edit/components/order-edit-form/order-edit-item.tsx +112 -0
- package/src/routes/orders/order-edit/components/variant-table/index.tsx +1 -0
- package/src/routes/orders/order-edit/components/variant-table/use-variant-table-columns.tsx +98 -0
- package/src/routes/orders/order-edit/components/variant-table/use-variant-table-filters.tsx +17 -0
- package/src/routes/orders/order-edit/components/variant-table/use-variant-table-query.tsx +32 -0
- package/src/routes/orders/order-edit/components/variant-table/variant-table.tsx +164 -0
- package/src/routes/orders/order-edit/index.ts +2 -0
- package/src/routes/orders/order-edit/loader.ts +25 -0
- package/src/routes/orders/order-edit/order-edit.tsx +77 -0
- package/src/routes/orders/order-email/components/edit-order-email-form/edit-order-email-form.tsx +65 -0
- package/src/routes/orders/order-email/components/edit-order-email-form/index.ts +1 -0
- package/src/routes/orders/order-email/index.ts +1 -0
- package/src/routes/orders/order-email/order-email.tsx +31 -0
- package/src/routes/orders/order-list/components/order-list-table/index.ts +1 -0
- package/src/routes/orders/order-list/components/order-list-table/order-list-table.tsx +68 -0
- package/src/routes/orders/order-list/index.ts +1 -0
- package/src/routes/orders/order-list/order-list.tsx +9 -0
- package/src/routes/orders/order-refund/components/order-refund-form/index.ts +1 -0
- package/src/routes/orders/order-refund/components/order-refund-form/order-refund-form.tsx +262 -0
- package/src/routes/orders/order-refund/index.ts +1 -0
- package/src/routes/orders/order-refund/order-refund.tsx +40 -0
- package/src/routes/orders/order-refund/schema.ts +18 -0
- package/src/routes/orders/order-shipping-address/index.ts +1 -0
- package/src/routes/orders/order-shipping-address/order-shipping-address.tsx +50 -0
- package/src/routes/orders/order-transfer-ownership/components/transfer-order-ownership-form/index.ts +1 -0
- package/src/routes/orders/order-transfer-ownership/components/transfer-order-ownership-form/transfer-order-ownership-form.tsx +72 -0
- package/src/routes/orders/order-transfer-ownership/index.ts +1 -0
- package/src/routes/orders/order-transfer-ownership/order-transfer-ownership.tsx +28 -0
- package/src/routes/reservations/reservation-detail/components/reservation-general-section/index.ts +1 -0
- package/src/routes/reservations/reservation-detail/components/reservation-general-section/reservation-general-section.tsx +28 -0
- package/src/routes/reservations/reservation-detail/index.ts +1 -0
- package/src/routes/reservations/reservation-detail/reservation-detail.tsx +25 -0
- package/src/routes/reservations/reservation-list/components/reservation-list-table/index.ts +1 -0
- package/src/routes/reservations/reservation-list/components/reservation-list-table/reservation-actions.tsx +64 -0
- package/src/routes/reservations/reservation-list/components/reservation-list-table/reservation-list-table.tsx +71 -0
- package/src/routes/reservations/reservation-list/components/reservation-list-table/use-reservation-table-columns.tsx +104 -0
- package/src/routes/reservations/reservation-list/components/reservation-list-table/use-reservation-table-filters.tsx +35 -0
- package/src/routes/reservations/reservation-list/components/reservation-list-table/use-reservation-table-query.tsx +32 -0
- package/src/routes/reservations/reservation-list/constants.ts +1 -0
- package/src/routes/reservations/reservation-list/index.ts +1 -0
- package/src/routes/reservations/reservation-list/reservation-list.tsx +9 -0
- package/src/routes/reset-password/reset-password-request/index.ts +1 -0
- package/src/routes/reset-password/reset-password-request/reset-password.tsx +143 -0
- package/src/routes/reset-password/reset-password-token/index.ts +1 -0
- package/src/routes/reset-password/reset-password-token/reset-password-token.tsx +258 -0
- package/src/routes/return-reasons/return-reason-create/components/create-return-reason-form/create-return-reason-form.tsx +130 -0
- package/src/routes/return-reasons/return-reason-create/components/create-return-reason-form/index.ts +1 -0
- package/src/routes/return-reasons/return-reason-create/index.ts +1 -0
- package/src/routes/return-reasons/return-reason-create/return-reason-create.tsx +10 -0
- package/src/routes/return-reasons/return-reason-edit/components/edit-return-reason-form/edit-return-reason-form.tsx +119 -0
- package/src/routes/return-reasons/return-reason-edit/components/edit-return-reason-form/index.ts +1 -0
- package/src/routes/return-reasons/return-reason-edit/index.ts +1 -0
- package/src/routes/return-reasons/return-reason-edit/return-reason-edit.tsx +28 -0
- package/src/routes/return-reasons/return-reason-list/components/return-reason-callout/index.ts +1 -0
- package/src/routes/return-reasons/return-reason-list/components/return-reason-callout/return-reason-callout.tsx +21 -0
- package/src/routes/return-reasons/return-reason-list/components/return-reason-overview/index.ts +1 -0
- package/src/routes/return-reasons/return-reason-list/components/return-reason-overview/return-reason-overview.tsx +121 -0
- package/src/routes/return-reasons/return-reason-list/index.ts +1 -0
- package/src/routes/return-reasons/return-reason-list/return-reason-list.tsx +13 -0
- package/src/routes/settings/index.ts +1 -0
- package/src/routes/settings/settings.tsx +15 -0
- package/src/types/api-payloads.ts +137 -0
- package/src/types/api-responses.ts +226 -0
- package/src/v2-routes/api-key-management/api-key-management-create/api-key-management-create.tsx +15 -0
- package/src/v2-routes/api-key-management/api-key-management-create/components/api-key-create-form/api-key-create-form.tsx +211 -0
- package/src/v2-routes/api-key-management/api-key-management-create/components/api-key-create-form/index.ts +1 -0
- package/src/v2-routes/api-key-management/api-key-management-create/index.ts +1 -0
- package/src/v2-routes/api-key-management/api-key-management-detail/api-key-management-detail.tsx +50 -0
- package/src/v2-routes/api-key-management/api-key-management-detail/components/api-key-general-section/api-key-general-section.tsx +244 -0
- package/src/v2-routes/api-key-management/api-key-management-detail/components/api-key-general-section/index.ts +1 -0
- package/src/v2-routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/api-key-sales-channel-section.tsx +275 -0
- package/src/v2-routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/index.ts +1 -0
- package/src/v2-routes/api-key-management/api-key-management-detail/index.ts +2 -0
- package/src/v2-routes/api-key-management/api-key-management-detail/loader.ts +21 -0
- package/src/v2-routes/api-key-management/api-key-management-edit/api-key-management-edit.tsx +26 -0
- package/src/v2-routes/api-key-management/api-key-management-edit/components/edit-api-key-form/edit-api-key-form.tsx +93 -0
- package/src/v2-routes/api-key-management/api-key-management-edit/components/edit-api-key-form/index.ts +1 -0
- package/src/v2-routes/api-key-management/api-key-management-edit/index.ts +1 -0
- package/src/v2-routes/api-key-management/api-key-management-list/api-key-management-list.tsx +16 -0
- package/src/v2-routes/api-key-management/api-key-management-list/components/api-key-management-list-table/api-key-management-list-table.tsx +81 -0
- package/src/v2-routes/api-key-management/api-key-management-list/components/api-key-management-list-table/api-key-row-actions.tsx +132 -0
- package/src/v2-routes/api-key-management/api-key-management-list/components/api-key-management-list-table/index.ts +1 -0
- package/src/v2-routes/api-key-management/api-key-management-list/components/api-key-management-list-table/use-api-key-management-table-columns.tsx +100 -0
- package/src/v2-routes/api-key-management/api-key-management-list/components/api-key-management-list-table/use-api-key-management-table-filters.tsx +18 -0
- package/src/v2-routes/api-key-management/api-key-management-list/components/api-key-management-list-table/use-api-key-management-table-query.tsx +34 -0
- package/src/v2-routes/api-key-management/api-key-management-list/index.ts +1 -0
- package/src/v2-routes/api-key-management/api-key-management-sales-channels/api-key-management-sales-channels.tsx +32 -0
- package/src/v2-routes/api-key-management/api-key-management-sales-channels/components/api-key-sales-channels-form/api-key-sales-channels-form.tsx +226 -0
- package/src/v2-routes/api-key-management/api-key-management-sales-channels/components/api-key-sales-channels-form/index.ts +1 -0
- package/src/v2-routes/api-key-management/api-key-management-sales-channels/index.ts +1 -0
- package/src/v2-routes/api-key-management/common/constants.ts +4 -0
- package/src/v2-routes/api-key-management/common/utils.ts +62 -0
- package/src/v2-routes/campaigns/add-campaign-promotions/add-campaign-promotions.tsx +19 -0
- package/src/v2-routes/campaigns/add-campaign-promotions/components/add-campaign-promotions-form.tsx +223 -0
- package/src/v2-routes/campaigns/add-campaign-promotions/components/index.ts +1 -0
- package/src/v2-routes/campaigns/add-campaign-promotions/index.ts +1 -0
- package/src/v2-routes/campaigns/campaign-budget-edit/campaign-budget-edit.tsx +27 -0
- package/src/v2-routes/campaigns/campaign-budget-edit/components/edit-campaign-budget-form/edit-campaign-budget-form.tsx +201 -0
- package/src/v2-routes/campaigns/campaign-budget-edit/components/edit-campaign-budget-form/index.ts +1 -0
- package/src/v2-routes/campaigns/campaign-budget-edit/index.ts +1 -0
- package/src/v2-routes/campaigns/campaign-create/campaign-create.tsx +10 -0
- package/src/v2-routes/campaigns/campaign-create/components/create-campaign-form/create-campaign-form.tsx +387 -0
- package/src/v2-routes/campaigns/campaign-create/components/create-campaign-form/index.ts +1 -0
- package/src/v2-routes/campaigns/campaign-create/index.ts +1 -0
- package/src/v2-routes/campaigns/campaign-detail/campaign-detail.tsx +48 -0
- package/src/v2-routes/campaigns/campaign-detail/components/campaign-budget/campaign-budget.tsx +75 -0
- package/src/v2-routes/campaigns/campaign-detail/components/campaign-budget/index.ts +1 -0
- package/src/v2-routes/campaigns/campaign-detail/components/campaign-general-section/campaign-general-section.tsx +161 -0
- package/src/v2-routes/campaigns/campaign-detail/components/campaign-general-section/index.ts +1 -0
- package/src/v2-routes/campaigns/campaign-detail/components/campaign-promotion-section/campaign-promotion-section.tsx +236 -0
- package/src/v2-routes/campaigns/campaign-detail/components/campaign-promotion-section/index.ts +1 -0
- package/src/v2-routes/campaigns/campaign-detail/components/campaign-spend/campaign-spend.tsx +55 -0
- package/src/v2-routes/campaigns/campaign-detail/components/campaign-spend/index.ts +1 -0
- package/src/v2-routes/campaigns/campaign-detail/index.ts +2 -0
- package/src/v2-routes/campaigns/campaign-detail/loader.ts +24 -0
- package/src/v2-routes/campaigns/campaign-edit/campaign-edit.tsx +27 -0
- package/src/v2-routes/campaigns/campaign-edit/components/edit-campaign-form/edit-campaign-form.tsx +239 -0
- package/src/v2-routes/campaigns/campaign-edit/components/edit-campaign-form/index.ts +1 -0
- package/src/v2-routes/campaigns/campaign-edit/index.ts +1 -0
- package/src/v2-routes/campaigns/campaign-list/campaign-list.tsx +11 -0
- package/src/v2-routes/campaigns/campaign-list/components/campaign-list-table.tsx +155 -0
- package/src/v2-routes/campaigns/campaign-list/components/index.ts +1 -0
- package/src/v2-routes/campaigns/campaign-list/index.ts +1 -0
- package/src/v2-routes/campaigns/common/utils/campaign-status.ts +31 -0
- package/src/v2-routes/categories/category-detail/category-detail.tsx +51 -0
- package/src/v2-routes/categories/category-detail/components/category-general-section/category-general-section.tsx +53 -0
- package/src/v2-routes/categories/category-detail/components/category-general-section/index.ts +1 -0
- package/src/v2-routes/categories/category-detail/components/category-organization-section/category-organization-section.tsx +196 -0
- package/src/v2-routes/categories/category-detail/components/category-organization-section/index.ts +1 -0
- package/src/v2-routes/categories/category-detail/components/category-product-section/category-product-section.tsx +71 -0
- package/src/v2-routes/categories/category-detail/components/category-product-section/index.ts +1 -0
- package/src/v2-routes/categories/category-detail/index.ts +2 -0
- package/src/v2-routes/categories/category-detail/loader.ts +21 -0
- package/src/v2-routes/categories/category-list/category-list.tsx +9 -0
- package/src/v2-routes/categories/category-list/components/category-list-table/category-list-table.tsx +124 -0
- package/src/v2-routes/categories/category-list/components/category-list-table/index.ts +1 -0
- package/src/v2-routes/categories/category-list/index.ts +1 -0
- package/src/v2-routes/categories/common/hooks/use-category-table-query.tsx +23 -0
- package/src/v2-routes/categories/common/utils.ts +71 -0
- package/src/v2-routes/collections/collection-add-products/collection-add-products.tsx +22 -0
- package/src/v2-routes/collections/collection-add-products/components/add-products-to-collection-form/add-products-to-collection-form.tsx +322 -0
- package/src/v2-routes/collections/collection-add-products/components/add-products-to-collection-form/index.ts +1 -0
- package/src/v2-routes/collections/collection-add-products/index.ts +1 -0
- package/src/v2-routes/collections/collection-create/collection-create.tsx +10 -0
- package/src/v2-routes/collections/collection-create/components/create-collection-form/create-collection-form.tsx +112 -0
- package/src/v2-routes/collections/collection-create/components/create-collection-form/index.ts +1 -0
- package/src/v2-routes/collections/collection-create/index.ts +1 -0
- package/src/v2-routes/collections/collection-detail/collection-detail.tsx +38 -0
- package/src/v2-routes/collections/collection-detail/components/collection-general-section/collection-general-section.tsx +70 -0
- package/src/v2-routes/collections/collection-detail/components/collection-general-section/index.ts +1 -0
- package/src/v2-routes/collections/collection-detail/components/collection-product-section/collection-product-section.tsx +245 -0
- package/src/v2-routes/collections/collection-detail/components/collection-product-section/index.ts +1 -0
- package/src/v2-routes/collections/collection-detail/index.ts +2 -0
- package/src/v2-routes/collections/collection-detail/loader.ts +21 -0
- package/src/v2-routes/collections/collection-edit/collection-edit.tsx +27 -0
- package/src/v2-routes/collections/collection-edit/components/edit-collection-form/edit-collection-form.tsx +112 -0
- package/src/v2-routes/collections/collection-edit/components/edit-collection-form/index.ts +1 -0
- package/src/v2-routes/collections/collection-edit/index.ts +1 -0
- package/src/v2-routes/collections/collection-list/collection-list.tsx +11 -0
- package/src/v2-routes/collections/collection-list/components/collection-list-table/collection-list-table.tsx +67 -0
- package/src/v2-routes/collections/collection-list/components/collection-list-table/index.ts +1 -0
- package/src/v2-routes/collections/collection-list/components/collection-list-table/use-collection-table-columns.tsx +94 -0
- package/src/v2-routes/collections/collection-list/components/collection-list-table/use-collection-table-filters.tsx +21 -0
- package/src/v2-routes/collections/collection-list/components/collection-list-table/use-collection-table-query.tsx +33 -0
- package/src/v2-routes/collections/collection-list/index.ts +1 -0
- package/src/v2-routes/customer-groups/customer-group-add-customers/components/add-customers-form/add-customers-form.tsx +242 -0
- package/src/v2-routes/customer-groups/customer-group-add-customers/components/add-customers-form/index.ts +1 -0
- package/src/v2-routes/customer-groups/customer-group-add-customers/customer-group-add-customers.tsx +13 -0
- package/src/v2-routes/customer-groups/customer-group-add-customers/index.ts +1 -0
- package/src/v2-routes/customer-groups/customer-group-create/components/create-customer-group-form/create-customer-group-form.tsx +107 -0
- package/src/v2-routes/customer-groups/customer-group-create/components/create-customer-group-form/index.ts +1 -0
- package/src/v2-routes/customer-groups/customer-group-create/customer-group-create.tsx +10 -0
- package/src/v2-routes/customer-groups/customer-group-create/index.ts +1 -0
- package/src/v2-routes/customer-groups/customer-group-detail/components/customer-group-customer-section/customer-group-customer-section.tsx +250 -0
- package/src/v2-routes/customer-groups/customer-group-detail/components/customer-group-customer-section/index.ts +1 -0
- package/src/v2-routes/customer-groups/customer-group-detail/components/customer-group-general-section/customer-group-general-section.tsx +93 -0
- package/src/v2-routes/customer-groups/customer-group-detail/components/customer-group-general-section/index.ts +1 -0
- package/src/v2-routes/customer-groups/customer-group-detail/customer-group-detail.tsx +38 -0
- package/src/v2-routes/customer-groups/customer-group-detail/index.ts +2 -0
- package/src/v2-routes/customer-groups/customer-group-detail/loader.ts +25 -0
- package/src/v2-routes/customer-groups/customer-group-edit/components/edit-customer-group-form/edit-customer-group-form.tsx +90 -0
- package/src/v2-routes/customer-groups/customer-group-edit/components/edit-customer-group-form/index.ts +1 -0
- package/src/v2-routes/customer-groups/customer-group-edit/customer-group-edit.tsx +28 -0
- package/src/v2-routes/customer-groups/customer-group-edit/index.ts +1 -0
- package/src/v2-routes/customer-groups/customer-group-list/components/customer-group-list-table/customer-group-list-table.tsx +161 -0
- package/src/v2-routes/customer-groups/customer-group-list/components/customer-group-list-table/index.ts +1 -0
- package/src/v2-routes/customer-groups/customer-group-list/customer-group-list.tsx +11 -0
- package/src/v2-routes/customer-groups/customer-group-list/index.ts +1 -0
- package/src/v2-routes/customers/customer-create/components/create-customer-form/create-customer-form.tsx +178 -0
- package/src/v2-routes/customers/customer-create/components/create-customer-form/index.ts +1 -0
- package/src/v2-routes/customers/customer-create/customer-create.tsx +10 -0
- package/src/v2-routes/customers/customer-create/index.ts +1 -0
- package/src/v2-routes/customers/customer-detail/components/customer-general-section/customer-general-section.tsx +130 -0
- package/src/v2-routes/customers/customer-detail/components/customer-general-section/index.ts +1 -0
- package/src/v2-routes/customers/customer-detail/components/customer-group-section/customer-group-section.tsx +129 -0
- package/src/v2-routes/customers/customer-detail/components/customer-group-section/index.ts +1 -0
- package/src/v2-routes/customers/customer-detail/components/customer-order-section/customer-order-section.tsx +121 -0
- package/src/v2-routes/customers/customer-detail/components/customer-order-section/index.ts +1 -0
- package/src/v2-routes/customers/customer-detail/customer-detail.tsx +37 -0
- package/src/v2-routes/customers/customer-detail/index.ts +2 -0
- package/src/v2-routes/customers/customer-detail/loader.ts +20 -0
- package/src/v2-routes/customers/customer-edit/components/edit-customer-form/edit-customer-form.tsx +191 -0
- package/src/v2-routes/customers/customer-edit/components/edit-customer-form/index.ts +1 -0
- package/src/v2-routes/customers/customer-edit/customer-edit.tsx +26 -0
- package/src/v2-routes/customers/customer-edit/index.ts +1 -0
- package/src/v2-routes/customers/customer-list/components/customer-list-table/customer-list-table.tsx +121 -0
- package/src/v2-routes/customers/customer-list/components/customer-list-table/index.ts +1 -0
- package/src/v2-routes/customers/customer-list/customer-list.tsx +11 -0
- package/src/v2-routes/customers/customer-list/index.ts +1 -0
- package/src/v2-routes/customers/customer-transfer-ownership/components/transfer-customer-order-ownership-form/index.ts +1 -0
- package/src/v2-routes/customers/customer-transfer-ownership/components/transfer-customer-order-ownership-form/transfer-customer-order-ownership-form.tsx +72 -0
- package/src/v2-routes/customers/customer-transfer-ownership/customer-transfer-ownership.tsx +28 -0
- package/src/v2-routes/customers/customer-transfer-ownership/index.ts +1 -0
- package/src/v2-routes/home/home.tsx +12 -0
- package/src/v2-routes/home/index.ts +1 -0
- package/src/v2-routes/inventory/inventory-detail/components/adjust-inventory/adjust-inventory-drawer.tsx +55 -0
- package/src/v2-routes/inventory/inventory-detail/components/adjust-inventory/components/adjust-inventory-form.tsx +164 -0
- package/src/v2-routes/inventory/inventory-detail/components/adjust-inventory/index.ts +1 -0
- package/src/v2-routes/inventory/inventory-detail/components/edit-inventory-item/components/edit-item-form.tsx +114 -0
- package/src/v2-routes/inventory/inventory-detail/components/edit-inventory-item/edit-item-drawer.tsx +33 -0
- package/src/v2-routes/inventory/inventory-detail/components/edit-inventory-item/index.ts +1 -0
- package/src/v2-routes/inventory/inventory-detail/components/edit-inventory-item-attributes/components/edit-item-attributes-form.tsx +261 -0
- package/src/v2-routes/inventory/inventory-detail/components/edit-inventory-item-attributes/edit-item-attributes-drawer.tsx +33 -0
- package/src/v2-routes/inventory/inventory-detail/components/edit-inventory-item-attributes/index.ts +1 -0
- package/src/v2-routes/inventory/inventory-detail/components/inventory-item-attributes/attributes-section.tsx +49 -0
- package/src/v2-routes/inventory/inventory-detail/components/inventory-item-general-section.tsx +80 -0
- package/src/v2-routes/inventory/inventory-detail/components/inventory-item-location-levels.tsx +27 -0
- package/src/v2-routes/inventory/inventory-detail/components/inventory-item-reservations.tsx +27 -0
- package/src/v2-routes/inventory/inventory-detail/components/location-levels-table/location-actions.tsx +60 -0
- package/src/v2-routes/inventory/inventory-detail/components/location-levels-table/location-list-table.tsx +55 -0
- package/src/v2-routes/inventory/inventory-detail/components/location-levels-table/use-location-list-table-columns.tsx +97 -0
- package/src/v2-routes/inventory/inventory-detail/components/location-levels-table/use-location-list-table-query.tsx +44 -0
- package/src/v2-routes/inventory/inventory-detail/components/manage-locations/components/location-item.tsx +42 -0
- package/src/v2-routes/inventory/inventory-detail/components/manage-locations/components/manage-locations-form.tsx +193 -0
- package/src/v2-routes/inventory/inventory-detail/components/manage-locations/index.ts +1 -0
- package/src/v2-routes/inventory/inventory-detail/components/manage-locations/manage-locations-drawer.tsx +39 -0
- package/src/v2-routes/inventory/inventory-detail/components/reservations-table/reservation-actions.tsx +64 -0
- package/src/v2-routes/inventory/inventory-detail/components/reservations-table/reservation-list-table.tsx +51 -0
- package/src/v2-routes/inventory/inventory-detail/components/reservations-table/use-reservation-list-table-columns.tsx +107 -0
- package/src/v2-routes/inventory/inventory-detail/components/reservations-table/use-reservation-list-table-query.tsx +35 -0
- package/src/v2-routes/inventory/inventory-detail/index.ts +2 -0
- package/src/v2-routes/inventory/inventory-detail/inventory-detail.tsx +66 -0
- package/src/v2-routes/inventory/inventory-detail/loader.ts +23 -0
- package/src/v2-routes/inventory/inventory-list/components/inventory-actions.tsx +53 -0
- package/src/v2-routes/inventory/inventory-list/components/inventory-list-table.tsx +67 -0
- package/src/v2-routes/inventory/inventory-list/components/use-inventory-table-columns.tsx +96 -0
- package/src/v2-routes/inventory/inventory-list/components/use-inventory-table-filters.tsx +82 -0
- package/src/v2-routes/inventory/inventory-list/components/use-inventory-table-query.tsx +57 -0
- package/src/v2-routes/inventory/inventory-list/index.ts +1 -0
- package/src/v2-routes/inventory/inventory-list/inventory-list.tsx +11 -0
- package/src/v2-routes/invite/index.ts +1 -0
- package/src/v2-routes/invite/invite.tsx +396 -0
- package/src/v2-routes/login/index.ts +1 -0
- package/src/v2-routes/login/login.tsx +146 -0
- package/src/v2-routes/orders/order-detail/components/order-activity-section/index.ts +1 -0
- package/src/v2-routes/orders/order-detail/components/order-activity-section/order-activity-section.tsx +25 -0
- package/src/v2-routes/orders/order-detail/components/order-activity-section/order-note-form.tsx +111 -0
- package/src/v2-routes/orders/order-detail/components/order-activity-section/order-timeline.tsx +404 -0
- package/src/v2-routes/orders/order-detail/components/order-customer-section/index.ts +1 -0
- package/src/v2-routes/orders/order-detail/components/order-customer-section/order-customer-section.tsx +69 -0
- package/src/v2-routes/orders/order-detail/components/order-fulfillment-section/index.ts +1 -0
- package/src/v2-routes/orders/order-detail/components/order-fulfillment-section/order-fulfillment-section.tsx +340 -0
- package/src/v2-routes/orders/order-detail/components/order-general-section/index.ts +1 -0
- package/src/v2-routes/orders/order-detail/components/order-general-section/order-general-section.tsx +118 -0
- package/src/v2-routes/orders/order-detail/components/order-payment-section/index.ts +1 -0
- package/src/v2-routes/orders/order-detail/components/order-payment-section/order-payment-section.tsx +284 -0
- package/src/v2-routes/orders/order-detail/components/order-summary-section/index.ts +1 -0
- package/src/v2-routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx +246 -0
- package/src/v2-routes/orders/order-detail/constants.ts +30 -0
- package/src/v2-routes/orders/order-detail/index.ts +2 -0
- package/src/v2-routes/orders/order-detail/loader.ts +26 -0
- package/src/v2-routes/orders/order-detail/order-detail.tsx +57 -0
- package/src/v2-routes/orders/order-list/components/order-list-table/index.ts +1 -0
- package/src/v2-routes/orders/order-list/components/order-list-table/order-list-table.tsx +67 -0
- package/src/v2-routes/orders/order-list/const.ts +17 -0
- package/src/v2-routes/orders/order-list/index.ts +1 -0
- package/src/v2-routes/orders/order-list/order-list.tsx +9 -0
- package/src/v2-routes/pricing/common/constants.ts +15 -0
- package/src/v2-routes/pricing/common/hooks/use-price-list-grid-columns.tsx +77 -0
- package/src/v2-routes/pricing/common/schemas.ts +31 -0
- package/src/v2-routes/pricing/common/utils.ts +55 -0
- package/src/v2-routes/pricing/pricing-configuration/components/price-list-configuration-form/index.ts +1 -0
- package/src/v2-routes/pricing/pricing-configuration/components/price-list-configuration-form/price-list-configuration-form.tsx +197 -0
- package/src/v2-routes/pricing/pricing-configuration/index.ts +1 -0
- package/src/v2-routes/pricing/pricing-configuration/pricing-configuration.tsx +28 -0
- package/src/v2-routes/pricing/pricing-create/components/pricing-create-form/index.ts +1 -0
- package/src/v2-routes/pricing/pricing-create/components/pricing-create-form/pricing-create-form.tsx +362 -0
- package/src/v2-routes/pricing/pricing-create/components/pricing-create-form/pricing-details-form.tsx +554 -0
- package/src/v2-routes/pricing/pricing-create/components/pricing-create-form/pricing-prices-form.tsx +119 -0
- package/src/v2-routes/pricing/pricing-create/components/pricing-create-form/pricing-products-form.tsx +175 -0
- package/src/v2-routes/pricing/pricing-create/components/pricing-create-form/schema.ts +54 -0
- package/src/v2-routes/pricing/pricing-create/index.ts +1 -0
- package/src/v2-routes/pricing/pricing-create/pricing-create.tsx +10 -0
- package/src/v2-routes/pricing/pricing-detail/components/pricing-configuration-section/index.ts +1 -0
- package/src/v2-routes/pricing/pricing-detail/components/pricing-configuration-section/pricing-configuration-section.tsx +90 -0
- package/src/v2-routes/pricing/pricing-detail/components/pricing-general-section/index.ts +1 -0
- package/src/v2-routes/pricing/pricing-detail/components/pricing-general-section/pricing-general-section.tsx +110 -0
- package/src/v2-routes/pricing/pricing-detail/components/pricing-product-section/index.ts +1 -0
- package/src/v2-routes/pricing/pricing-detail/components/pricing-product-section/pricing-product-section.tsx +217 -0
- package/src/v2-routes/pricing/pricing-detail/index.ts +2 -0
- package/src/v2-routes/pricing/pricing-detail/loader.ts +20 -0
- package/src/v2-routes/pricing/pricing-detail/pricing-detail.tsx +37 -0
- package/src/v2-routes/pricing/pricing-edit/components/edit-price-list-form/edit-price-list-form.tsx +131 -0
- package/src/v2-routes/pricing/pricing-edit/components/edit-price-list-form/index.ts +1 -0
- package/src/v2-routes/pricing/pricing-edit/index.ts +1 -0
- package/src/v2-routes/pricing/pricing-edit/pricing-edit.tsx +28 -0
- package/src/v2-routes/pricing/pricing-list/components/pricing-list-table/index.ts +1 -0
- package/src/v2-routes/pricing/pricing-list/components/pricing-list-table/pricing-list-table.tsx +69 -0
- package/src/v2-routes/pricing/pricing-list/components/pricing-list-table/pricing-table-actions.tsx +61 -0
- package/src/v2-routes/pricing/pricing-list/components/pricing-list-table/use-pricing-table-columns.tsx +43 -0
- package/src/v2-routes/pricing/pricing-list/components/pricing-list-table/use-pricing-table-filters.tsx +18 -0
- package/src/v2-routes/pricing/pricing-list/components/pricing-list-table/use-pricing-table-query.tsx +23 -0
- package/src/v2-routes/pricing/pricing-list/index.ts +1 -0
- package/src/v2-routes/pricing/pricing-list/pricing-list.tsx +11 -0
- package/src/v2-routes/pricing/pricing-products/index.ts +1 -0
- package/src/v2-routes/pricing/pricing-products/pricing-products.tsx +5 -0
- package/src/v2-routes/pricing/pricing-products-prices/components/pricing-products-prices-form/index.ts +1 -0
- package/src/v2-routes/pricing/pricing-products-prices/components/pricing-products-prices-form/pricing-products-prices-form.tsx +388 -0
- package/src/v2-routes/pricing/pricing-products-prices/index.ts +1 -0
- package/src/v2-routes/pricing/pricing-products-prices/pricing-products-prices.tsx +43 -0
- package/src/v2-routes/products/common/components/category-combobox/category-combobox.tsx +380 -0
- package/src/v2-routes/products/common/components/category-combobox/index.ts +1 -0
- package/src/v2-routes/products/common/variant-pricing-form.tsx +95 -0
- package/src/v2-routes/products/product-attributes/components/product-attributes-form/index.ts +1 -0
- package/src/v2-routes/products/product-attributes/components/product-attributes-form/product-attributes-form.tsx +265 -0
- package/src/v2-routes/products/product-attributes/index.ts +1 -0
- package/src/v2-routes/products/product-attributes/product-attributes.tsx +27 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-details-attribute-section/index.ts +1 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-details-attribute-section/product-create-details-attribute-section.tsx +155 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-details-context/index.ts +2 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-details-context/product-create-details-context.tsx +9 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-details-context/use-product-create-details-context.tsx +14 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-details-general-section/index.ts +1 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-details-general-section/product-create-general-section.tsx +106 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-details-media-section/index.ts +1 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-details-media-section/product-create-details-media-section.tsx +69 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-details-organize-section/index.ts +1 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-details-organize-section/product-create-details-organize-section.tsx +193 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/index.ts +1 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx +428 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-sales-channel-drawer/index.ts +1 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/components/product-create-sales-channel-drawer/product-create-sales-channel-drawer.tsx +198 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/index.ts +1 -0
- package/src/v2-routes/products/product-create/components/product-create-details-form/product-create-details-form.tsx +61 -0
- package/src/v2-routes/products/product-create/components/product-create-form/index.ts +1 -0
- package/src/v2-routes/products/product-create/components/product-create-form/product-create-form.tsx +189 -0
- package/src/v2-routes/products/product-create/constants.ts +78 -0
- package/src/v2-routes/products/product-create/index.ts +1 -0
- package/src/v2-routes/products/product-create/product-create.tsx +10 -0
- package/src/v2-routes/products/product-create/types.ts +4 -0
- package/src/v2-routes/products/product-create/utils.ts +51 -0
- package/src/v2-routes/products/product-create-option/components/create-product-option-form/create-product-option-form.tsx +118 -0
- package/src/v2-routes/products/product-create-option/components/create-product-option-form/index.ts +1 -0
- package/src/v2-routes/products/product-create-option/index.ts +1 -0
- package/src/v2-routes/products/product-create-option/product-create-option.tsx +26 -0
- package/src/v2-routes/products/product-create-variant/components/create-product-variant-form/create-product-variant-form.tsx +482 -0
- package/src/v2-routes/products/product-create-variant/components/create-product-variant-form/index.ts +1 -0
- package/src/v2-routes/products/product-create-variant/index.ts +1 -0
- package/src/v2-routes/products/product-create-variant/product-create-variant.tsx +26 -0
- package/src/v2-routes/products/product-detail/components/product-attribute-section/index.ts +1 -0
- package/src/v2-routes/products/product-detail/components/product-attribute-section/product-attribute-section.tsx +48 -0
- package/src/v2-routes/products/product-detail/components/product-general-section/index.ts +1 -0
- package/src/v2-routes/products/product-detail/components/product-general-section/product-general-section.tsx +101 -0
- package/src/v2-routes/products/product-detail/components/product-media-section/index.ts +1 -0
- package/src/v2-routes/products/product-detail/components/product-media-section/product-media-section.tsx +185 -0
- package/src/v2-routes/products/product-detail/components/product-option-section/index.ts +1 -0
- package/src/v2-routes/products/product-detail/components/product-option-section/product-option-section.tsx +113 -0
- package/src/v2-routes/products/product-detail/components/product-organization-section/index.ts +1 -0
- package/src/v2-routes/products/product-detail/components/product-organization-section/product-organization-section.tsx +95 -0
- package/src/v2-routes/products/product-detail/components/product-sales-channel-section/index.ts +1 -0
- package/src/v2-routes/products/product-detail/components/product-sales-channel-section/product-sales-channel-section.tsx +106 -0
- package/src/v2-routes/products/product-detail/components/product-variant-section/index.ts +1 -0
- package/src/v2-routes/products/product-detail/components/product-variant-section/product-variant-section.tsx +94 -0
- package/src/v2-routes/products/product-detail/components/product-variant-section/use-variant-table-columns.tsx +152 -0
- package/src/v2-routes/products/product-detail/components/product-variant-section/use-variant-table-filters.tsx +58 -0
- package/src/v2-routes/products/product-detail/components/product-variant-section/use-variant-table-query.tsx +51 -0
- package/src/v2-routes/products/product-detail/index.ts +2 -0
- package/src/v2-routes/products/product-detail/loader.ts +22 -0
- package/src/v2-routes/products/product-detail/product-detail.tsx +94 -0
- package/src/v2-routes/products/product-edit/components/edit-product-form/edit-product-form.tsx +260 -0
- package/src/v2-routes/products/product-edit/components/edit-product-form/index.ts +1 -0
- package/src/v2-routes/products/product-edit/index.ts +1 -0
- package/src/v2-routes/products/product-edit/product-edit.tsx +27 -0
- package/src/v2-routes/products/product-edit-option/components/edit-product-option-form/edit-product-option-form.tsx +120 -0
- package/src/v2-routes/products/product-edit-option/components/edit-product-option-form/index.ts +1 -0
- package/src/v2-routes/products/product-edit-option/index.ts +1 -0
- package/src/v2-routes/products/product-edit-option/product-edit-option.tsx +34 -0
- package/src/v2-routes/products/product-edit-variant/components/product-edit-variant-form/index.ts +1 -0
- package/src/v2-routes/products/product-edit-variant/components/product-edit-variant-form/product-edit-variant-form.tsx +506 -0
- package/src/v2-routes/products/product-edit-variant/index.ts +1 -0
- package/src/v2-routes/products/product-edit-variant/loader.ts +34 -0
- package/src/v2-routes/products/product-edit-variant/product-edit-variant.tsx +53 -0
- package/src/v2-routes/products/product-list/components/product-list-table/index.ts +1 -0
- package/src/v2-routes/products/product-list/components/product-list-table/product-list-table.tsx +166 -0
- package/src/v2-routes/products/product-list/index.ts +2 -0
- package/src/v2-routes/products/product-list/loader.ts +23 -0
- package/src/v2-routes/products/product-list/product-list.tsx +9 -0
- package/src/v2-routes/products/product-media/components/edit-product-media-form/edit-product-media-form.tsx +414 -0
- package/src/v2-routes/products/product-media/components/edit-product-media-form/index.ts +1 -0
- package/src/v2-routes/products/product-media/components/product-media-gallery/index.ts +1 -0
- package/src/v2-routes/products/product-media/components/product-media-gallery/product-media-gallery.tsx +310 -0
- package/src/v2-routes/products/product-media/components/product-media-view/index.ts +1 -0
- package/src/v2-routes/products/product-media/components/product-media-view/product-media-view-context.tsx +9 -0
- package/src/v2-routes/products/product-media/components/product-media-view/product-media-view.tsx +55 -0
- package/src/v2-routes/products/product-media/components/product-media-view/use-product-media-view.tsx +14 -0
- package/src/v2-routes/products/product-media/index.ts +1 -0
- package/src/v2-routes/products/product-media/product-media.tsx +22 -0
- package/src/v2-routes/products/product-organization/components/product-organization-form/index.ts +1 -0
- package/src/v2-routes/products/product-organization/components/product-organization-form/product-organization-form.tsx +204 -0
- package/src/v2-routes/products/product-organization/index.ts +1 -0
- package/src/v2-routes/products/product-organization/product-organization.tsx +27 -0
- package/src/v2-routes/products/product-prices/index.ts +1 -0
- package/src/v2-routes/products/product-prices/pricing-edit.tsx +85 -0
- package/src/v2-routes/products/product-prices/product-prices.tsx +21 -0
- package/src/v2-routes/products/product-sales-channels/components/edit-sales-channels-form/edit-sales-channels-form.tsx +194 -0
- package/src/v2-routes/products/product-sales-channels/components/edit-sales-channels-form/index.ts +1 -0
- package/src/v2-routes/products/product-sales-channels/index.ts +1 -0
- package/src/v2-routes/products/product-sales-channels/product-sales-channels.tsx +20 -0
- package/src/v2-routes/profile/profile-detail/components/profile-general-section/index.ts +1 -0
- package/src/v2-routes/profile/profile-detail/components/profile-general-section/profile-general-section.tsx +66 -0
- package/src/v2-routes/profile/profile-detail/index.ts +1 -0
- package/src/v2-routes/profile/profile-detail/profile-detail.tsx +26 -0
- package/src/v2-routes/profile/profile-edit/components/edit-profile-form/edit-profile-form.tsx +202 -0
- package/src/v2-routes/profile/profile-edit/index.ts +1 -0
- package/src/v2-routes/profile/profile-edit/profile-edit.tsx +26 -0
- package/src/v2-routes/promotions/common/edit-rules/components/edit-rules-form/edit-rules-form.tsx +423 -0
- package/src/v2-routes/promotions/common/edit-rules/components/edit-rules-form/index.ts +1 -0
- package/src/v2-routes/promotions/common/edit-rules/components/edit-rules-form/utils.ts +52 -0
- package/src/v2-routes/promotions/common/edit-rules/components/edit-rules-wrapper/edit-rules-wrapper.tsx +137 -0
- package/src/v2-routes/promotions/common/edit-rules/components/edit-rules-wrapper/index.ts +1 -0
- package/src/v2-routes/promotions/common/edit-rules/edit-rules.tsx +63 -0
- package/src/v2-routes/promotions/common/edit-rules/index.ts +1 -0
- package/src/v2-routes/promotions/promotion-add-campaign/components/add-campaign-promotion-form/add-campaign-promotion-form.tsx +189 -0
- package/src/v2-routes/promotions/promotion-add-campaign/components/add-campaign-promotion-form/campaign-details.tsx +116 -0
- package/src/v2-routes/promotions/promotion-add-campaign/components/add-campaign-promotion-form/index.ts +1 -0
- package/src/v2-routes/promotions/promotion-add-campaign/index.ts +1 -0
- package/src/v2-routes/promotions/promotion-add-campaign/promotion-add-campaign.tsx +36 -0
- package/src/v2-routes/promotions/promotion-create/components/create-promotion-form/constants.ts +11 -0
- package/src/v2-routes/promotions/promotion-create/components/create-promotion-form/create-promotion-form.tsx +780 -0
- package/src/v2-routes/promotions/promotion-create/components/create-promotion-form/form-schema.ts +36 -0
- package/src/v2-routes/promotions/promotion-create/components/create-promotion-form/index.ts +1 -0
- package/src/v2-routes/promotions/promotion-create/components/create-promotion-form/templates.ts +62 -0
- package/src/v2-routes/promotions/promotion-create/index.ts +1 -0
- package/src/v2-routes/promotions/promotion-create/promotion-create.tsx +46 -0
- package/src/v2-routes/promotions/promotion-detail/components/campaign-section/campaign-section.tsx +116 -0
- package/src/v2-routes/promotions/promotion-detail/components/campaign-section/index.ts +1 -0
- package/src/v2-routes/promotions/promotion-detail/components/promotion-conditions-section/index.ts +1 -0
- package/src/v2-routes/promotions/promotion-detail/components/promotion-conditions-section/promotion-conditions-section.tsx +92 -0
- package/src/v2-routes/promotions/promotion-detail/components/promotion-general-section/index.ts +1 -0
- package/src/v2-routes/promotions/promotion-detail/components/promotion-general-section/promotion-general-section.tsx +160 -0
- package/src/v2-routes/promotions/promotion-detail/index.ts +2 -0
- package/src/v2-routes/promotions/promotion-detail/loader.ts +21 -0
- package/src/v2-routes/promotions/promotion-detail/promotion-detail.tsx +59 -0
- package/src/v2-routes/promotions/promotion-edit-details/components/edit-promotion-form/edit-promotion-details-form.tsx +310 -0
- package/src/v2-routes/promotions/promotion-edit-details/components/edit-promotion-form/index.ts +1 -0
- package/src/v2-routes/promotions/promotion-edit-details/index.ts +1 -0
- package/src/v2-routes/promotions/promotion-edit-details/promotion-edit-details.tsx +30 -0
- package/src/v2-routes/promotions/promotion-list/components/promotion-list-table/index.ts +1 -0
- package/src/v2-routes/promotions/promotion-list/components/promotion-list-table/promotion-list-table.tsx +155 -0
- package/src/v2-routes/promotions/promotion-list/index.ts +2 -0
- package/src/v2-routes/promotions/promotion-list/loader.ts +34 -0
- package/src/v2-routes/promotions/promotion-list/promotions-list.tsx +9 -0
- package/src/v2-routes/regions/common/constants.ts +4 -0
- package/src/v2-routes/regions/common/hooks/use-countries.tsx +67 -0
- package/src/v2-routes/regions/common/hooks/use-country-table-columns.tsx +25 -0
- package/src/v2-routes/regions/common/hooks/use-country-table-query.tsx +25 -0
- package/src/v2-routes/regions/region-add-countries/components/add-countries-form/add-countries-form.tsx +207 -0
- package/src/v2-routes/regions/region-add-countries/components/add-countries-form/index.ts +1 -0
- package/src/v2-routes/regions/region-add-countries/index.ts +1 -0
- package/src/v2-routes/regions/region-add-countries/region-add-countries.tsx +27 -0
- package/src/v2-routes/regions/region-create/components/create-region-form/create-region-form.tsx +481 -0
- package/src/v2-routes/regions/region-create/components/create-region-form/index.ts +1 -0
- package/src/v2-routes/regions/region-create/index.ts +1 -0
- package/src/v2-routes/regions/region-create/region-create.tsx +29 -0
- package/src/v2-routes/regions/region-detail/components/region-country-section/index.ts +1 -0
- package/src/v2-routes/regions/region-detail/components/region-country-section/region-country-section.tsx +254 -0
- package/src/v2-routes/regions/region-detail/components/region-general-section/index.ts +1 -0
- package/src/v2-routes/regions/region-detail/components/region-general-section/region-general-section.tsx +118 -0
- package/src/v2-routes/regions/region-detail/index.ts +2 -0
- package/src/v2-routes/regions/region-detail/loader.ts +22 -0
- package/src/v2-routes/regions/region-detail/region-detail.tsx +45 -0
- package/src/v2-routes/regions/region-edit/components/edit-region-form/edit-region-form.tsx +168 -0
- package/src/v2-routes/regions/region-edit/components/edit-region-form/index.ts +1 -0
- package/src/v2-routes/regions/region-edit/index.ts +1 -0
- package/src/v2-routes/regions/region-edit/region-edit.tsx +61 -0
- package/src/v2-routes/regions/region-list/components/region-list-table/index.ts +1 -0
- package/src/v2-routes/regions/region-list/components/region-list-table/region-list-table.tsx +163 -0
- package/src/v2-routes/regions/region-list/index.ts +1 -0
- package/src/v2-routes/regions/region-list/region-list.tsx +11 -0
- package/src/v2-routes/reservations/reservation-detail/components/edit-reservation/components/edit-reservation-form.tsx +208 -0
- package/src/v2-routes/reservations/reservation-detail/components/edit-reservation/components/index.tsx +1 -0
- package/src/v2-routes/reservations/reservation-detail/components/edit-reservation/edit-reservation-modal.tsx +53 -0
- package/src/v2-routes/reservations/reservation-detail/components/edit-reservation/index.ts +1 -0
- package/src/v2-routes/reservations/reservation-detail/components/reservation-general-section/index.ts +1 -0
- package/src/v2-routes/reservations/reservation-detail/components/reservation-general-section/reservation-general-section.tsx +89 -0
- package/src/v2-routes/reservations/reservation-detail/index.ts +2 -0
- package/src/v2-routes/reservations/reservation-detail/loader.ts +20 -0
- package/src/v2-routes/reservations/reservation-detail/reservation-edit.tsx +53 -0
- package/src/v2-routes/reservations/reservation-list/components/reservation-list-table/index.ts +1 -0
- package/src/v2-routes/reservations/reservation-list/components/reservation-list-table/reservation-actions.tsx +57 -0
- package/src/v2-routes/reservations/reservation-list/components/reservation-list-table/reservation-list-table.tsx +62 -0
- package/src/v2-routes/reservations/reservation-list/components/reservation-list-table/use-reservation-table-columns.tsx +104 -0
- package/src/v2-routes/reservations/reservation-list/components/reservation-list-table/use-reservation-table-filters.tsx +35 -0
- package/src/v2-routes/reservations/reservation-list/components/reservation-list-table/use-reservation-table-query.tsx +32 -0
- package/src/v2-routes/reservations/reservation-list/constants.ts +1 -0
- package/src/v2-routes/reservations/reservation-list/create-reservation/components/create-reservation-form/create-reservation-form.tsx +286 -0
- package/src/v2-routes/reservations/reservation-list/create-reservation/components/create-reservation-form/index.ts +1 -0
- package/src/v2-routes/reservations/reservation-list/create-reservation/create-reservation-modal.tsx +10 -0
- package/src/v2-routes/reservations/reservation-list/create-reservation/index.ts +1 -0
- package/src/v2-routes/reservations/reservation-list/index.ts +1 -0
- package/src/v2-routes/reservations/reservation-list/reservation-list.tsx +11 -0
- package/src/v2-routes/sales-channels/sales-channel-add-products/components/add-products-to-sales-channel-form.tsx +243 -0
- package/src/v2-routes/sales-channels/sales-channel-add-products/components/index.ts +1 -0
- package/src/v2-routes/sales-channels/sales-channel-add-products/index.ts +1 -0
- package/src/v2-routes/sales-channels/sales-channel-add-products/sales-channel-add-products.tsx +26 -0
- package/src/v2-routes/sales-channels/sales-channel-create/components/create-sales-channel-form/create-sales-channel-form.tsx +157 -0
- package/src/v2-routes/sales-channels/sales-channel-create/components/create-sales-channel-form/index.ts +1 -0
- package/src/v2-routes/sales-channels/sales-channel-create/index.ts +1 -0
- package/src/v2-routes/sales-channels/sales-channel-create/sales-channel-create.tsx +10 -0
- package/src/v2-routes/sales-channels/sales-channel-detail/components/sales-channel-general-section/index.ts +1 -0
- package/src/v2-routes/sales-channels/sales-channel-detail/components/sales-channel-general-section/sales-channel-general-section.tsx +105 -0
- package/src/v2-routes/sales-channels/sales-channel-detail/components/sales-channel-product-section/index.ts +1 -0
- package/src/v2-routes/sales-channels/sales-channel-detail/components/sales-channel-product-section/sales-channel-product-section.tsx +265 -0
- package/src/v2-routes/sales-channels/sales-channel-detail/index.ts +2 -0
- package/src/v2-routes/sales-channels/sales-channel-detail/loader.ts +21 -0
- package/src/v2-routes/sales-channels/sales-channel-detail/sales-channel-detail.tsx +31 -0
- package/src/v2-routes/sales-channels/sales-channel-edit/components/edit-sales-channel-form/edit-sales-channel-form.tsx +142 -0
- package/src/v2-routes/sales-channels/sales-channel-edit/components/edit-sales-channel-form/index.ts +1 -0
- package/src/v2-routes/sales-channels/sales-channel-edit/index.ts +1 -0
- package/src/v2-routes/sales-channels/sales-channel-edit/sales-channel-edit.tsx +36 -0
- package/src/v2-routes/sales-channels/sales-channel-list/components/index.ts +1 -0
- package/src/v2-routes/sales-channels/sales-channel-list/components/sales-channel-list-table.tsx +160 -0
- package/src/v2-routes/sales-channels/sales-channel-list/index.ts +1 -0
- package/src/v2-routes/sales-channels/sales-channel-list/sales-channel-list.tsx +11 -0
- package/src/v2-routes/settings/index.ts +1 -0
- package/src/v2-routes/settings/settings.tsx +15 -0
- package/src/v2-routes/shipping/location-add-sales-channels/components/edit-sales-channels-form/edit-sales-channels-form.tsx +195 -0
- package/src/v2-routes/shipping/location-add-sales-channels/components/edit-sales-channels-form/index.ts +1 -0
- package/src/v2-routes/shipping/location-add-sales-channels/index.ts +1 -0
- package/src/v2-routes/shipping/location-add-sales-channels/location-add-sales-channels.tsx +30 -0
- package/src/v2-routes/shipping/location-create/components/create-location-form/create-location-form.tsx +248 -0
- package/src/v2-routes/shipping/location-create/components/create-location-form/index.ts +1 -0
- package/src/v2-routes/shipping/location-create/index.ts +1 -0
- package/src/v2-routes/shipping/location-create/location-create.tsx +10 -0
- package/src/v2-routes/shipping/location-details/components/location-general-section/index.ts +1 -0
- package/src/v2-routes/shipping/location-details/components/location-general-section/location-general-section.tsx +640 -0
- package/src/v2-routes/shipping/location-details/components/location-sales-channels-section/index.ts +1 -0
- package/src/v2-routes/shipping/location-details/components/location-sales-channels-section/locations-sales-channels-section.tsx +79 -0
- package/src/v2-routes/shipping/location-details/index.ts +2 -0
- package/src/v2-routes/shipping/location-details/loader.ts +27 -0
- package/src/v2-routes/shipping/location-details/location-details.tsx +55 -0
- package/src/v2-routes/shipping/location-edit/components/edit-location-form/edit-location-form.tsx +237 -0
- package/src/v2-routes/shipping/location-edit/components/edit-location-form/index.ts +1 -0
- package/src/v2-routes/shipping/location-edit/index.ts +1 -0
- package/src/v2-routes/shipping/location-edit/location-edit.tsx +36 -0
- package/src/v2-routes/shipping/location-list/components/location/index.ts +1 -0
- package/src/v2-routes/shipping/location-list/components/location/location.tsx +212 -0
- package/src/v2-routes/shipping/location-list/const.ts +3 -0
- package/src/v2-routes/shipping/location-list/index.ts +2 -0
- package/src/v2-routes/shipping/location-list/loader.ts +25 -0
- package/src/v2-routes/shipping/location-list/location-list.tsx +47 -0
- package/src/v2-routes/shipping/service-zone-create/components/create-service-zone-form/create-service-zone-form.tsx +359 -0
- package/src/v2-routes/shipping/service-zone-create/components/create-service-zone-form/index.ts +1 -0
- package/src/v2-routes/shipping/service-zone-create/index.ts +2 -0
- package/src/v2-routes/shipping/service-zone-create/loader.ts +24 -0
- package/src/v2-routes/shipping/service-zone-create/service-zone-create.tsx +29 -0
- package/src/v2-routes/shipping/service-zone-edit/components/edit-region-form/edit-service-zone-form.tsx +114 -0
- package/src/v2-routes/shipping/service-zone-edit/components/edit-region-form/index.ts +1 -0
- package/src/v2-routes/shipping/service-zone-edit/index.ts +1 -0
- package/src/v2-routes/shipping/service-zone-edit/service-zone-edit.tsx +50 -0
- package/src/v2-routes/shipping/shipping-option-edit/components/edit-region-form/edit-shipping-option-form.tsx +278 -0
- package/src/v2-routes/shipping/shipping-option-edit/components/edit-region-form/index.ts +1 -0
- package/src/v2-routes/shipping/shipping-option-edit/index.ts +1 -0
- package/src/v2-routes/shipping/shipping-option-edit/shipping-option-edit.tsx +44 -0
- package/src/v2-routes/shipping/shipping-options-create/components/create-shipping-options-form/create-shipping-options-form.tsx +476 -0
- package/src/v2-routes/shipping/shipping-options-create/components/create-shipping-options-form/create-shipping-options-prices-form.tsx +152 -0
- package/src/v2-routes/shipping/shipping-options-create/components/create-shipping-options-form/index.ts +1 -0
- package/src/v2-routes/shipping/shipping-options-create/index.ts +2 -0
- package/src/v2-routes/shipping/shipping-options-create/loader.ts +25 -0
- package/src/v2-routes/shipping/shipping-options-create/shipping-options-create.tsx +30 -0
- package/src/v2-routes/shipping-profiles/shipping-profile-create/components/create-shipping-profile-form/create-shipping-profile-form.tsx +129 -0
- package/src/v2-routes/shipping-profiles/shipping-profile-create/components/create-shipping-profile-form/index.ts +1 -0
- package/src/v2-routes/shipping-profiles/shipping-profile-create/index.ts +1 -0
- package/src/v2-routes/shipping-profiles/shipping-profile-create/shipping-profile-create.tsx +12 -0
- package/src/v2-routes/shipping-profiles/shipping-profile-detail/components/shipping-profile-general-section/index.ts +1 -0
- package/src/v2-routes/shipping-profiles/shipping-profile-detail/components/shipping-profile-general-section/shipping-profile-general-section.tsx +80 -0
- package/src/v2-routes/shipping-profiles/shipping-profile-detail/index.ts +1 -0
- package/src/v2-routes/shipping-profiles/shipping-profile-detail/shipping-profile-detail.tsx +36 -0
- package/src/v2-routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/index.ts +1 -0
- package/src/v2-routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/shipping-options-row-actions.tsx +68 -0
- package/src/v2-routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/shipping-profile-list-table.tsx +68 -0
- package/src/v2-routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/use-shipping-profile-table-columns.tsx +31 -0
- package/src/v2-routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/use-shipping-profile-table-filters.tsx +33 -0
- package/src/v2-routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/use-shipping-profile-table-query.tsx +30 -0
- package/src/v2-routes/shipping-profiles/shipping-profiles-list/index.ts +1 -0
- package/src/v2-routes/shipping-profiles/shipping-profiles-list/shipping-profile-list.tsx +11 -0
- package/src/v2-routes/store/common/hooks/use-currencies-table-columns.tsx +24 -0
- package/src/v2-routes/store/common/hooks/use-currencies-table-query.tsx +21 -0
- package/src/v2-routes/store/store-add-currencies/components/add-currencies-form/add-currencies-form.tsx +229 -0
- package/src/v2-routes/store/store-add-currencies/index.ts +1 -0
- package/src/v2-routes/store/store-add-currencies/store-add-currencies.tsx +17 -0
- package/src/v2-routes/store/store-detail/components/store-currency-section/store-currencies-section.tsx/index.ts +1 -0
- package/src/v2-routes/store/store-detail/components/store-currency-section/store-currencies-section.tsx/store-currency-section.tsx +292 -0
- package/src/v2-routes/store/store-detail/components/store-general-section/index.ts +1 -0
- package/src/v2-routes/store/store-detail/components/store-general-section/store-general-section.tsx +80 -0
- package/src/v2-routes/store/store-detail/index.ts +2 -0
- package/src/v2-routes/store/store-detail/loader.ts +19 -0
- package/src/v2-routes/store/store-detail/store-detail.tsx +37 -0
- package/src/v2-routes/store/store-edit/components/edit-store-form/edit-store-form.tsx +152 -0
- package/src/v2-routes/store/store-edit/index.ts +1 -0
- package/src/v2-routes/store/store-edit/store-edit.tsx +25 -0
- package/src/v2-routes/taxes/common/components/conditions-drawer/conditions-drawer.tsx +663 -0
- package/src/v2-routes/taxes/common/components/conditions-drawer/index.ts +1 -0
- package/src/v2-routes/taxes/common/components/tax-region-create-form/index.ts +1 -0
- package/src/v2-routes/taxes/common/components/tax-region-create-form/tax-region-create-form.tsx +250 -0
- package/src/v2-routes/taxes/common/constants.ts +11 -0
- package/src/v2-routes/taxes/common/hooks/columns/use-customer-group-conditions-table-columns.tsx +46 -0
- package/src/v2-routes/taxes/common/hooks/columns/use-product-collection-conditions-table-columns.tsx +60 -0
- package/src/v2-routes/taxes/common/hooks/columns/use-product-conditions-table-columns.tsx +46 -0
- package/src/v2-routes/taxes/common/hooks/columns/use-product-tag-conditions-table-columns.tsx +48 -0
- package/src/v2-routes/taxes/common/hooks/columns/use-product-type-conditions-table-columns.tsx +49 -0
- package/src/v2-routes/taxes/common/hooks/filters/use-customer-group-conditions-table-filters.tsx +17 -0
- package/src/v2-routes/taxes/common/hooks/filters/use-product-collection-conditions-table-filters.tsx +17 -0
- package/src/v2-routes/taxes/common/hooks/filters/use-product-tag-conditions-table-filters.tsx +17 -0
- package/src/v2-routes/taxes/common/hooks/filters/use-product-type-conditions-table-filters.tsx +17 -0
- package/src/v2-routes/taxes/common/hooks/query/use-product-collection-conditions-table-query.tsx +42 -0
- package/src/v2-routes/taxes/common/hooks/query/use-product-tag-conditions-table-query.tsx +39 -0
- package/src/v2-routes/taxes/common/hooks/query/use-product-type-conditions-table-query.tsx +29 -0
- package/src/v2-routes/taxes/common/types.ts +12 -0
- package/src/v2-routes/taxes/tax-province-create/index.ts +3 -0
- package/src/v2-routes/taxes/tax-province-create/tax-province-create.tsx +36 -0
- package/src/v2-routes/taxes/tax-rate-create/components/condition/condition.tsx +53 -0
- package/src/v2-routes/taxes/tax-rate-create/components/condition/index.ts +1 -0
- package/src/v2-routes/taxes/tax-rate-create/components/index.ts +2 -0
- package/src/v2-routes/taxes/tax-rate-create/components/tax-rate-create-form/index.ts +1 -0
- package/src/v2-routes/taxes/tax-rate-create/components/tax-rate-create-form/tax-rate-create-form.tsx +480 -0
- package/src/v2-routes/taxes/tax-rate-create/index.ts +3 -0
- package/src/v2-routes/taxes/tax-rate-create/tax-rate-create.tsx +21 -0
- package/src/v2-routes/taxes/tax-rate-edit/components/index.ts +1 -0
- package/src/v2-routes/taxes/tax-rate-edit/components/tax-rate-edit-form/index.ts +1 -0
- package/src/v2-routes/taxes/tax-rate-edit/components/tax-rate-edit-form/tax-rate-edit-form.tsx +488 -0
- package/src/v2-routes/taxes/tax-rate-edit/index.ts +4 -0
- package/src/v2-routes/taxes/tax-rate-edit/loader.ts +21 -0
- package/src/v2-routes/taxes/tax-rate-edit/tax-rate-edit.tsx +34 -0
- package/src/v2-routes/taxes/tax-region-create/index.ts +3 -0
- package/src/v2-routes/taxes/tax-region-create/tax-region-create.tsx +21 -0
- package/src/v2-routes/taxes/tax-region-detail/components/index.ts +2 -0
- package/src/v2-routes/taxes/tax-region-detail/components/tax-rate-list/index.ts +1 -0
- package/src/v2-routes/taxes/tax-region-detail/components/tax-rate-list/tax-rate-list.tsx +214 -0
- package/src/v2-routes/taxes/tax-region-detail/components/tax-region-general-detail/index.ts +1 -0
- package/src/v2-routes/taxes/tax-region-detail/components/tax-region-general-detail/tax-region-general-detail.tsx +41 -0
- package/src/v2-routes/taxes/tax-region-detail/index.ts +4 -0
- package/src/v2-routes/taxes/tax-region-detail/loader.ts +21 -0
- package/src/v2-routes/taxes/tax-region-detail/tax-region-detail.tsx +30 -0
- package/src/v2-routes/taxes/tax-region-list/components/region-list-table/index.ts +1 -0
- package/src/v2-routes/taxes/tax-region-list/components/region-list-table/tax-region-list-table.tsx +131 -0
- package/src/v2-routes/taxes/tax-region-list/index.ts +1 -0
- package/src/v2-routes/taxes/tax-region-list/tax-region-list.tsx +11 -0
- package/src/v2-routes/users/user-detail/components/user-general-section/index.ts +1 -0
- package/src/v2-routes/users/user-detail/components/user-general-section/user-general-section.tsx +88 -0
- package/src/v2-routes/users/user-detail/index.ts +2 -0
- package/src/v2-routes/users/user-detail/loader.ts +21 -0
- package/src/v2-routes/users/user-detail/user-detail.tsx +39 -0
- package/src/v2-routes/users/user-edit/components/edit-user-form/edit-user-form.tsx +99 -0
- package/src/v2-routes/users/user-edit/components/edit-user-form/index.ts +1 -0
- package/src/v2-routes/users/user-edit/index.ts +1 -0
- package/src/v2-routes/users/user-edit/user-edit.tsx +25 -0
- package/src/v2-routes/users/user-invite/components/invite-user-form/invite-user-form.tsx +306 -0
- package/src/v2-routes/users/user-invite/index.ts +1 -0
- package/src/v2-routes/users/user-invite/user-invite.tsx +10 -0
- package/src/v2-routes/users/user-list/components/user-list-table/index.ts +1 -0
- package/src/v2-routes/users/user-list/components/user-list-table/use-user-table-columns.tsx +42 -0
- package/src/v2-routes/users/user-list/components/user-list-table/use-user-table-query.tsx +24 -0
- package/src/v2-routes/users/user-list/components/user-list-table/user-list-table.tsx +66 -0
- package/src/v2-routes/users/user-list/components/user-list-table/user-row-actions.tsx +24 -0
- package/src/v2-routes/users/user-list/index.ts +1 -0
- package/src/v2-routes/users/user-list/user-list.tsx +11 -0
- package/src/v2-routes/workflow-executions/constants.ts +26 -0
- package/src/v2-routes/workflow-executions/types.ts +95 -0
- package/src/v2-routes/workflow-executions/utils.ts +101 -0
- package/src/v2-routes/workflow-executions/workflow-execution-detail/components/workflow-execution-general-section/index.ts +1 -0
- package/src/v2-routes/workflow-executions/workflow-execution-detail/components/workflow-execution-general-section/workflow-execution-general-section.tsx +118 -0
- package/src/v2-routes/workflow-executions/workflow-execution-detail/components/workflow-execution-history-section/index.ts +1 -0
- package/src/v2-routes/workflow-executions/workflow-execution-detail/components/workflow-execution-history-section/workflow-execution-history-section.tsx +324 -0
- package/src/v2-routes/workflow-executions/workflow-execution-detail/components/workflow-execution-payload-section/index.ts +1 -0
- package/src/v2-routes/workflow-executions/workflow-execution-detail/components/workflow-execution-payload-section/workflow-execution-payload-section.tsx +24 -0
- package/src/v2-routes/workflow-executions/workflow-execution-detail/components/workflow-execution-timeline-section/index.ts +1 -0
- package/src/v2-routes/workflow-executions/workflow-execution-detail/components/workflow-execution-timeline-section/workflow-execution-timeline-section.tsx +435 -0
- package/src/v2-routes/workflow-executions/workflow-execution-detail/index.ts +1 -0
- package/src/v2-routes/workflow-executions/workflow-execution-detail/loader.ts +21 -0
- package/src/v2-routes/workflow-executions/workflow-execution-detail/workflow-detail.tsx +33 -0
- package/src/v2-routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/index.ts +1 -0
- package/src/v2-routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-columns.tsx +72 -0
- package/src/v2-routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-query.tsx +25 -0
- package/src/v2-routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-list-table.tsx +73 -0
- package/src/v2-routes/workflow-executions/workflow-execution-list/index.ts +1 -0
- package/src/v2-routes/workflow-executions/workflow-execution-list/workflow-execution-list.tsx +9 -0
- package/src/vite-env.d.ts +13 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export type WorkflowExecutionStep = {
|
|
2
|
+
id: string
|
|
3
|
+
invoke: {
|
|
4
|
+
state: TransactionStepState
|
|
5
|
+
status: TransactionStepStatus
|
|
6
|
+
}
|
|
7
|
+
definition: {
|
|
8
|
+
async?: boolean
|
|
9
|
+
compensateAsync?: boolean
|
|
10
|
+
noCompensation?: boolean
|
|
11
|
+
continueOnPermanentFailure?: boolean
|
|
12
|
+
maxRetries?: number
|
|
13
|
+
noWait?: boolean
|
|
14
|
+
retryInterval?: number
|
|
15
|
+
retryIntervalAwaiting?: number
|
|
16
|
+
saveResponse?: boolean
|
|
17
|
+
timeout?: number
|
|
18
|
+
}
|
|
19
|
+
compensate: {
|
|
20
|
+
state: TransactionStepState
|
|
21
|
+
status: TransactionStepStatus
|
|
22
|
+
}
|
|
23
|
+
depth: number
|
|
24
|
+
startedAt: number
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type StepInvoke = {
|
|
28
|
+
output: {
|
|
29
|
+
output: unknown
|
|
30
|
+
compensateInput: unknown
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type StepError = {
|
|
35
|
+
error: Record<string, unknown>
|
|
36
|
+
action: string
|
|
37
|
+
handlerType: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type WorkflowExecutionContext = {
|
|
41
|
+
data: {
|
|
42
|
+
invoke: Record<string, StepInvoke>
|
|
43
|
+
payload?: unknown
|
|
44
|
+
}
|
|
45
|
+
compensate: Record<string, unknown>
|
|
46
|
+
errors: StepError[]
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type WorflowExecutionExecution = {
|
|
50
|
+
steps: Record<string, WorkflowExecutionStep>
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Re-implements WorkflowExecutionDTO as it is currently only exported from `@medusajs/workflows-sdk`.
|
|
55
|
+
* Also adds type definitions for fields that have vague types, such as `execution` and `context`.
|
|
56
|
+
*/
|
|
57
|
+
export interface WorkflowExecutionDTO {
|
|
58
|
+
id: string
|
|
59
|
+
workflow_id: string
|
|
60
|
+
transaction_id: string
|
|
61
|
+
execution: WorflowExecutionExecution | null
|
|
62
|
+
context: WorkflowExecutionContext | null
|
|
63
|
+
state: any
|
|
64
|
+
created_at: Date
|
|
65
|
+
updated_at: Date
|
|
66
|
+
deleted_at: Date
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export enum TransactionStepStatus {
|
|
70
|
+
IDLE = "idle",
|
|
71
|
+
OK = "ok",
|
|
72
|
+
WAITING = "waiting_response",
|
|
73
|
+
TEMPORARY_FAILURE = "temp_failure",
|
|
74
|
+
PERMANENT_FAILURE = "permanent_failure",
|
|
75
|
+
}
|
|
76
|
+
export enum TransactionState {
|
|
77
|
+
NOT_STARTED = "not_started",
|
|
78
|
+
INVOKING = "invoking",
|
|
79
|
+
WAITING_TO_COMPENSATE = "waiting_to_compensate",
|
|
80
|
+
COMPENSATING = "compensating",
|
|
81
|
+
DONE = "done",
|
|
82
|
+
REVERTED = "reverted",
|
|
83
|
+
FAILED = "failed",
|
|
84
|
+
}
|
|
85
|
+
export enum TransactionStepState {
|
|
86
|
+
NOT_STARTED = "not_started",
|
|
87
|
+
INVOKING = "invoking",
|
|
88
|
+
COMPENSATING = "compensating",
|
|
89
|
+
DONE = "done",
|
|
90
|
+
REVERTED = "reverted",
|
|
91
|
+
FAILED = "failed",
|
|
92
|
+
DORMANT = "dormant",
|
|
93
|
+
SKIPPED = "skipped",
|
|
94
|
+
TIMEOUT = "timeout",
|
|
95
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { AdminGetWorkflowExecutionsParams } from "@medusajs/medusa"
|
|
2
|
+
import { TFunction } from "i18next"
|
|
3
|
+
import {
|
|
4
|
+
STEP_ERROR_STATES,
|
|
5
|
+
STEP_INACTIVE_STATES,
|
|
6
|
+
STEP_IN_PROGRESS_STATES,
|
|
7
|
+
TRANSACTION_ERROR_STATES,
|
|
8
|
+
TRANSACTION_IN_PROGRESS_STATES,
|
|
9
|
+
} from "./constants"
|
|
10
|
+
import { TransactionState, TransactionStepState } from "./types"
|
|
11
|
+
|
|
12
|
+
export const adminExecutionKey = {
|
|
13
|
+
detail: (id: string) => ["workflow_executions", "detail", id],
|
|
14
|
+
list: (query?: AdminGetWorkflowExecutionsParams) => [
|
|
15
|
+
"workflow_executions",
|
|
16
|
+
"list",
|
|
17
|
+
{ query },
|
|
18
|
+
],
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const getTransactionStateColor = (
|
|
22
|
+
state: TransactionState
|
|
23
|
+
): "green" | "orange" | "red" => {
|
|
24
|
+
let statusColor: "green" | "red" | "orange" = "green"
|
|
25
|
+
|
|
26
|
+
if (TRANSACTION_ERROR_STATES.includes(state)) {
|
|
27
|
+
statusColor = "red"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (TRANSACTION_IN_PROGRESS_STATES.includes(state)) {
|
|
31
|
+
statusColor = "orange"
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return statusColor
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const getTransactionState = (
|
|
38
|
+
t: TFunction<"translation", any>,
|
|
39
|
+
state: TransactionState
|
|
40
|
+
) => {
|
|
41
|
+
switch (state) {
|
|
42
|
+
case TransactionState.DONE:
|
|
43
|
+
return t("workflowExecutions.state.done")
|
|
44
|
+
case TransactionState.FAILED:
|
|
45
|
+
return t("workflowExecutions.state.failed")
|
|
46
|
+
case TransactionState.REVERTED:
|
|
47
|
+
return t("workflowExecutions.state.reverted")
|
|
48
|
+
case TransactionState.INVOKING:
|
|
49
|
+
return t("workflowExecutions.state.invoking")
|
|
50
|
+
case TransactionState.WAITING_TO_COMPENSATE:
|
|
51
|
+
return t("workflowExecutions.transaction.state.waitingToCompensate")
|
|
52
|
+
case TransactionState.COMPENSATING:
|
|
53
|
+
return t("workflowExecutions.state.compensating")
|
|
54
|
+
case TransactionState.NOT_STARTED:
|
|
55
|
+
return t("workflowExecutions.state.notStarted")
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const getStepStateColor = (state: TransactionStepState) => {
|
|
60
|
+
let statusColor: "green" | "red" | "orange" | "grey" = "green"
|
|
61
|
+
|
|
62
|
+
if (STEP_ERROR_STATES.includes(state)) {
|
|
63
|
+
statusColor = "red"
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (STEP_INACTIVE_STATES.includes(state)) {
|
|
67
|
+
statusColor = "grey"
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (STEP_IN_PROGRESS_STATES.includes(state)) {
|
|
71
|
+
statusColor = "orange"
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return statusColor
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const getStepState = (
|
|
78
|
+
t: TFunction<"translation", any>,
|
|
79
|
+
state: TransactionStepState
|
|
80
|
+
) => {
|
|
81
|
+
switch (state) {
|
|
82
|
+
case TransactionStepState.DONE:
|
|
83
|
+
return t("workflowExecutions.state.done")
|
|
84
|
+
case TransactionStepState.FAILED:
|
|
85
|
+
return t("workflowExecutions.state.failed")
|
|
86
|
+
case TransactionStepState.REVERTED:
|
|
87
|
+
return t("workflowExecutions.state.reverted")
|
|
88
|
+
case TransactionStepState.INVOKING:
|
|
89
|
+
return t("workflowExecutions.state.invoking")
|
|
90
|
+
case TransactionStepState.COMPENSATING:
|
|
91
|
+
return t("workflowExecutions.state.compensating")
|
|
92
|
+
case TransactionStepState.NOT_STARTED:
|
|
93
|
+
return t("workflowExecutions.state.notStarted")
|
|
94
|
+
case TransactionStepState.SKIPPED:
|
|
95
|
+
return t("workflowExecutions.step.state.skipped")
|
|
96
|
+
case TransactionStepState.DORMANT:
|
|
97
|
+
return t("workflowExecutions.step.state.dormant")
|
|
98
|
+
case TransactionStepState.TIMEOUT:
|
|
99
|
+
return t("workflowExecutions.step.state.timeout")
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./workflow-execution-general-section"
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Badge,
|
|
3
|
+
Container,
|
|
4
|
+
Copy,
|
|
5
|
+
Heading,
|
|
6
|
+
StatusBadge,
|
|
7
|
+
Text,
|
|
8
|
+
clx,
|
|
9
|
+
} from "@medusajs/ui"
|
|
10
|
+
import { useTranslation } from "react-i18next"
|
|
11
|
+
import {
|
|
12
|
+
TransactionStepState,
|
|
13
|
+
WorkflowExecutionDTO,
|
|
14
|
+
WorkflowExecutionStep,
|
|
15
|
+
} from "../../../types"
|
|
16
|
+
import { getTransactionState, getTransactionStateColor } from "../../../utils"
|
|
17
|
+
|
|
18
|
+
type WorkflowExecutionGeneralSectionProps = {
|
|
19
|
+
execution: WorkflowExecutionDTO
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const WorkflowExecutionGeneralSection = ({
|
|
23
|
+
execution,
|
|
24
|
+
}: WorkflowExecutionGeneralSectionProps) => {
|
|
25
|
+
const { t } = useTranslation()
|
|
26
|
+
|
|
27
|
+
const cleanId = execution.id.replace("wf_exec_", "")
|
|
28
|
+
const translatedState = getTransactionState(t, execution.state)
|
|
29
|
+
const stateColor = getTransactionStateColor(execution.state)
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<Container className="divide-y p-0">
|
|
33
|
+
<div className="flex items-center justify-between px-6 py-4">
|
|
34
|
+
<div className="flex items-center gap-x-0.5">
|
|
35
|
+
<Heading>{cleanId}</Heading>
|
|
36
|
+
<Copy content={cleanId} className="text-ui-fg-muted" />
|
|
37
|
+
</div>
|
|
38
|
+
<StatusBadge color={stateColor}>{translatedState}</StatusBadge>
|
|
39
|
+
</div>
|
|
40
|
+
<div className="text-ui-fg-subtle grid grid-cols-2 px-6 py-4">
|
|
41
|
+
<Text size="small" leading="compact" weight="plus">
|
|
42
|
+
{t("workflowExecutions.workflowIdLabel")}
|
|
43
|
+
</Text>
|
|
44
|
+
<Badge size="2xsmall" className="w-fit">
|
|
45
|
+
{execution.workflow_id}
|
|
46
|
+
</Badge>
|
|
47
|
+
</div>
|
|
48
|
+
<div className="text-ui-fg-subtle grid grid-cols-2 px-6 py-4">
|
|
49
|
+
<Text size="small" leading="compact" weight="plus">
|
|
50
|
+
{t("workflowExecutions.transactionIdLabel")}
|
|
51
|
+
</Text>
|
|
52
|
+
<Badge size="2xsmall" className="w-fit">
|
|
53
|
+
{execution.transaction_id}
|
|
54
|
+
</Badge>
|
|
55
|
+
</div>
|
|
56
|
+
<div className="text-ui-fg-subtle grid grid-cols-2 px-6 py-4">
|
|
57
|
+
<Text size="small" leading="compact" weight="plus">
|
|
58
|
+
{t("workflowExecutions.progressLabel")}
|
|
59
|
+
</Text>
|
|
60
|
+
<Progress steps={execution.execution?.steps} />
|
|
61
|
+
</div>
|
|
62
|
+
</Container>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const ROOT_PREFIX = "_root"
|
|
67
|
+
|
|
68
|
+
const Progress = ({
|
|
69
|
+
steps,
|
|
70
|
+
}: {
|
|
71
|
+
steps?: Record<string, WorkflowExecutionStep> | null
|
|
72
|
+
}) => {
|
|
73
|
+
const { t } = useTranslation()
|
|
74
|
+
|
|
75
|
+
if (!steps) {
|
|
76
|
+
return (
|
|
77
|
+
<Text size="small" leading="compact" className="text-ui-fg-subtle">
|
|
78
|
+
{t("workflowExecutions.stepsCompletedLabel", {
|
|
79
|
+
completed: 0,
|
|
80
|
+
total: 0,
|
|
81
|
+
})}
|
|
82
|
+
</Text>
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const actionableSteps = Object.values(steps).filter(
|
|
87
|
+
(step) => step.id !== ROOT_PREFIX
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
const completedSteps = actionableSteps.filter(
|
|
91
|
+
(step) => step.invoke.state === TransactionStepState.DONE
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<div className="flex w-fit items-center gap-x-2">
|
|
96
|
+
<div className="flex items-center gap-x-[3px]">
|
|
97
|
+
{actionableSteps.map((step) => (
|
|
98
|
+
<div
|
|
99
|
+
key={step.id}
|
|
100
|
+
className={clx(
|
|
101
|
+
"bg-ui-bg-switch-off shadow-details-switch-background h-3 w-1.5 rounded-full",
|
|
102
|
+
{
|
|
103
|
+
"bg-ui-fg-muted":
|
|
104
|
+
step.invoke.state === TransactionStepState.DONE,
|
|
105
|
+
}
|
|
106
|
+
)}
|
|
107
|
+
/>
|
|
108
|
+
))}
|
|
109
|
+
</div>
|
|
110
|
+
<Text size="small" leading="compact" className="text-ui-fg-subtle">
|
|
111
|
+
{t("workflowExecutions.stepsCompletedLabel", {
|
|
112
|
+
completed: completedSteps.length,
|
|
113
|
+
count: actionableSteps.length,
|
|
114
|
+
})}
|
|
115
|
+
</Text>
|
|
116
|
+
</div>
|
|
117
|
+
)
|
|
118
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./workflow-execution-history-section"
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { Spinner, TriangleDownMini } from "@medusajs/icons"
|
|
2
|
+
import {
|
|
3
|
+
CodeBlock,
|
|
4
|
+
Container,
|
|
5
|
+
Heading,
|
|
6
|
+
IconButton,
|
|
7
|
+
Text,
|
|
8
|
+
clx,
|
|
9
|
+
} from "@medusajs/ui"
|
|
10
|
+
import * as Collapsible from "@radix-ui/react-collapsible"
|
|
11
|
+
import { format } from "date-fns"
|
|
12
|
+
import { useEffect, useRef, useState } from "react"
|
|
13
|
+
import { useTranslation } from "react-i18next"
|
|
14
|
+
import { useLocation } from "react-router-dom"
|
|
15
|
+
import {
|
|
16
|
+
STEP_ERROR_STATES,
|
|
17
|
+
STEP_INACTIVE_STATES,
|
|
18
|
+
STEP_IN_PROGRESS_STATES,
|
|
19
|
+
STEP_OK_STATES,
|
|
20
|
+
} from "../../../constants"
|
|
21
|
+
import {
|
|
22
|
+
StepError,
|
|
23
|
+
StepInvoke,
|
|
24
|
+
TransactionStepState,
|
|
25
|
+
TransactionStepStatus,
|
|
26
|
+
WorkflowExecutionDTO,
|
|
27
|
+
WorkflowExecutionStep,
|
|
28
|
+
} from "../../../types"
|
|
29
|
+
|
|
30
|
+
type WorkflowExecutionHistorySectionProps = {
|
|
31
|
+
execution: WorkflowExecutionDTO
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const WorkflowExecutionHistorySection = ({
|
|
35
|
+
execution,
|
|
36
|
+
}: WorkflowExecutionHistorySectionProps) => {
|
|
37
|
+
const { t } = useTranslation()
|
|
38
|
+
|
|
39
|
+
const map = Object.values(execution.execution?.steps || {})
|
|
40
|
+
const steps = map.filter((step) => step.id !== "_root")
|
|
41
|
+
|
|
42
|
+
// check if any of the steps have a .invoke.state of "permanent_failure" and if that is the case then return its id
|
|
43
|
+
const unreachableStepId = steps.find(
|
|
44
|
+
(step) => step.invoke.status === TransactionStepStatus.PERMANENT_FAILURE
|
|
45
|
+
)?.id
|
|
46
|
+
|
|
47
|
+
// return an array of step ids of all steps that come after the unreachable step if there is one
|
|
48
|
+
const unreachableSteps = unreachableStepId
|
|
49
|
+
? steps
|
|
50
|
+
.filter(
|
|
51
|
+
(step) =>
|
|
52
|
+
step.id !== unreachableStepId && step.id.includes(unreachableStepId)
|
|
53
|
+
)
|
|
54
|
+
.map((step) => step.id)
|
|
55
|
+
: []
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<Container className="divide-y p-0">
|
|
59
|
+
<div className="flex items-center justify-between px-6 py-4">
|
|
60
|
+
<Heading level="h2">
|
|
61
|
+
{t("workflowExecutions.history.sectionTitle")}
|
|
62
|
+
</Heading>
|
|
63
|
+
</div>
|
|
64
|
+
<div className="flex flex-col gap-y-0.5 px-6 py-4">
|
|
65
|
+
{steps.map((step, index) => {
|
|
66
|
+
const stepId = step.id.split(".").pop()
|
|
67
|
+
|
|
68
|
+
if (!stepId) {
|
|
69
|
+
return null
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const context = execution.context?.data.invoke[stepId]
|
|
73
|
+
const error = execution.context?.errors.find(
|
|
74
|
+
(e) => e.action === stepId
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<Event
|
|
79
|
+
key={step.id}
|
|
80
|
+
step={step}
|
|
81
|
+
stepInvokeContext={context}
|
|
82
|
+
stepError={error}
|
|
83
|
+
isLast={index === steps.length - 1}
|
|
84
|
+
isUnreachable={unreachableSteps.includes(step.id)}
|
|
85
|
+
/>
|
|
86
|
+
)
|
|
87
|
+
})}
|
|
88
|
+
</div>
|
|
89
|
+
</Container>
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const Event = ({
|
|
94
|
+
step,
|
|
95
|
+
stepInvokeContext,
|
|
96
|
+
stepError,
|
|
97
|
+
isLast,
|
|
98
|
+
isUnreachable,
|
|
99
|
+
}: {
|
|
100
|
+
step: WorkflowExecutionStep
|
|
101
|
+
stepInvokeContext: StepInvoke | undefined
|
|
102
|
+
stepError?: StepError | undefined
|
|
103
|
+
isLast: boolean
|
|
104
|
+
isUnreachable?: boolean
|
|
105
|
+
}) => {
|
|
106
|
+
const [open, setOpen] = useState(false)
|
|
107
|
+
|
|
108
|
+
const ref = useRef<HTMLDivElement>(null)
|
|
109
|
+
const { hash } = useLocation()
|
|
110
|
+
|
|
111
|
+
const { t } = useTranslation()
|
|
112
|
+
|
|
113
|
+
const stepId = step.id.split(".").pop()!
|
|
114
|
+
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
if (hash === `#${stepId}`) {
|
|
117
|
+
setOpen(true)
|
|
118
|
+
}
|
|
119
|
+
}, [hash, stepId])
|
|
120
|
+
|
|
121
|
+
const identifier = step.id.split(".").pop()
|
|
122
|
+
|
|
123
|
+
stepInvokeContext
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
<div
|
|
127
|
+
className="grid grid-cols-[20px_1fr] items-start gap-x-2 px-2"
|
|
128
|
+
id={stepId}
|
|
129
|
+
>
|
|
130
|
+
<div className="grid h-full grid-rows-[20px_1fr] items-center justify-center gap-y-0.5">
|
|
131
|
+
<div className="flex size-5 items-center justify-center">
|
|
132
|
+
<div className="bg-ui-bg-base shadow-borders-base flex size-2.5 items-center justify-center rounded-full">
|
|
133
|
+
<div
|
|
134
|
+
className={clx("size-1.5 rounded-full", {
|
|
135
|
+
"bg-ui-tag-green-icon": STEP_OK_STATES.includes(
|
|
136
|
+
step.invoke.state
|
|
137
|
+
),
|
|
138
|
+
"bg-ui-tag-orange-icon": STEP_IN_PROGRESS_STATES.includes(
|
|
139
|
+
step.invoke.state
|
|
140
|
+
),
|
|
141
|
+
"bg-ui-tag-red-icon": STEP_ERROR_STATES.includes(
|
|
142
|
+
step.invoke.state
|
|
143
|
+
),
|
|
144
|
+
"bg-ui-tag-neutral-icon": STEP_INACTIVE_STATES.includes(
|
|
145
|
+
step.invoke.state
|
|
146
|
+
),
|
|
147
|
+
})}
|
|
148
|
+
/>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
<div className="flex h-full flex-col items-center">
|
|
152
|
+
<div
|
|
153
|
+
aria-hidden
|
|
154
|
+
role="presentation"
|
|
155
|
+
className={clx({
|
|
156
|
+
"bg-ui-border-base h-full min-h-[14px] w-px": !isLast,
|
|
157
|
+
})}
|
|
158
|
+
/>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
<Collapsible.Root open={open} onOpenChange={setOpen}>
|
|
162
|
+
<Collapsible.Trigger asChild>
|
|
163
|
+
<div className="group flex cursor-pointer items-start justify-between outline-none">
|
|
164
|
+
<Text size="small" leading="compact" weight="plus">
|
|
165
|
+
{identifier}
|
|
166
|
+
</Text>
|
|
167
|
+
<div className="flex items-center gap-x-2">
|
|
168
|
+
<StepState
|
|
169
|
+
state={step.invoke.state}
|
|
170
|
+
startedAt={step.startedAt}
|
|
171
|
+
isUnreachable={isUnreachable}
|
|
172
|
+
/>
|
|
173
|
+
<IconButton size="2xsmall" variant="transparent">
|
|
174
|
+
<TriangleDownMini className="text-ui-fg-muted transition-transform group-data-[state=open]:rotate-180" />
|
|
175
|
+
</IconButton>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</Collapsible.Trigger>
|
|
179
|
+
<Collapsible.Content ref={ref}>
|
|
180
|
+
<div className="flex flex-col gap-y-2 pb-4 pt-2">
|
|
181
|
+
<div className="text-ui-fg-subtle flex flex-col gap-y-2">
|
|
182
|
+
<Text size="small" leading="compact">
|
|
183
|
+
{t("workflowExecutions.history.definitionLabel")}
|
|
184
|
+
</Text>
|
|
185
|
+
<CodeBlock
|
|
186
|
+
snippets={[
|
|
187
|
+
{
|
|
188
|
+
code: JSON.stringify(step.definition, null, 2),
|
|
189
|
+
label: t("workflowExecutions.history.definitionLabel"),
|
|
190
|
+
language: "json",
|
|
191
|
+
hideLineNumbers: true,
|
|
192
|
+
},
|
|
193
|
+
]}
|
|
194
|
+
>
|
|
195
|
+
<CodeBlock.Body />
|
|
196
|
+
</CodeBlock>
|
|
197
|
+
</div>
|
|
198
|
+
{stepInvokeContext && (
|
|
199
|
+
<div className="text-ui-fg-subtle flex flex-col gap-y-2">
|
|
200
|
+
<Text size="small" leading="compact">
|
|
201
|
+
{t("workflowExecutions.history.outputLabel")}
|
|
202
|
+
</Text>
|
|
203
|
+
<CodeBlock
|
|
204
|
+
snippets={[
|
|
205
|
+
{
|
|
206
|
+
code: JSON.stringify(
|
|
207
|
+
stepInvokeContext.output.output,
|
|
208
|
+
null,
|
|
209
|
+
2
|
|
210
|
+
),
|
|
211
|
+
label: t("workflowExecutions.history.outputLabel"),
|
|
212
|
+
language: "json",
|
|
213
|
+
hideLineNumbers: true,
|
|
214
|
+
},
|
|
215
|
+
]}
|
|
216
|
+
>
|
|
217
|
+
<CodeBlock.Body />
|
|
218
|
+
</CodeBlock>
|
|
219
|
+
</div>
|
|
220
|
+
)}
|
|
221
|
+
{!!stepInvokeContext?.output.compensateInput &&
|
|
222
|
+
step.compensate.state === TransactionStepState.REVERTED && (
|
|
223
|
+
<div className="text-ui-fg-subtle flex flex-col gap-y-2">
|
|
224
|
+
<Text size="small" leading="compact">
|
|
225
|
+
{t("workflowExecutions.history.compensateInputLabel")}
|
|
226
|
+
</Text>
|
|
227
|
+
<CodeBlock
|
|
228
|
+
snippets={[
|
|
229
|
+
{
|
|
230
|
+
code: JSON.stringify(
|
|
231
|
+
stepInvokeContext.output.compensateInput,
|
|
232
|
+
null,
|
|
233
|
+
2
|
|
234
|
+
),
|
|
235
|
+
label: t(
|
|
236
|
+
"workflowExecutions.history.compensateInputLabel"
|
|
237
|
+
),
|
|
238
|
+
language: "json",
|
|
239
|
+
hideLineNumbers: true,
|
|
240
|
+
},
|
|
241
|
+
]}
|
|
242
|
+
>
|
|
243
|
+
<CodeBlock.Body />
|
|
244
|
+
</CodeBlock>
|
|
245
|
+
</div>
|
|
246
|
+
)}
|
|
247
|
+
{stepError && (
|
|
248
|
+
<div className="text-ui-fg-subtle flex flex-col gap-y-2">
|
|
249
|
+
<Text size="small" leading="compact">
|
|
250
|
+
{t("workflowExecutions.history.errorLabel")}
|
|
251
|
+
</Text>
|
|
252
|
+
<CodeBlock
|
|
253
|
+
snippets={[
|
|
254
|
+
{
|
|
255
|
+
code: JSON.stringify(
|
|
256
|
+
{
|
|
257
|
+
error: stepError.error,
|
|
258
|
+
handlerType: stepError.handlerType,
|
|
259
|
+
},
|
|
260
|
+
null,
|
|
261
|
+
2
|
|
262
|
+
),
|
|
263
|
+
label: t("workflowExecutions.history.errorLabel"),
|
|
264
|
+
language: "json",
|
|
265
|
+
hideLineNumbers: true,
|
|
266
|
+
},
|
|
267
|
+
]}
|
|
268
|
+
>
|
|
269
|
+
<CodeBlock.Body />
|
|
270
|
+
</CodeBlock>
|
|
271
|
+
</div>
|
|
272
|
+
)}
|
|
273
|
+
</div>
|
|
274
|
+
</Collapsible.Content>
|
|
275
|
+
</Collapsible.Root>
|
|
276
|
+
</div>
|
|
277
|
+
)
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const StepState = ({
|
|
281
|
+
state,
|
|
282
|
+
startedAt,
|
|
283
|
+
isUnreachable,
|
|
284
|
+
}: {
|
|
285
|
+
state: TransactionStepState
|
|
286
|
+
startedAt?: number | null
|
|
287
|
+
isUnreachable?: boolean
|
|
288
|
+
}) => {
|
|
289
|
+
const { t } = useTranslation()
|
|
290
|
+
|
|
291
|
+
const isFailed = state === TransactionStepState.FAILED
|
|
292
|
+
const isRunning = state === TransactionStepState.INVOKING
|
|
293
|
+
|
|
294
|
+
if (isUnreachable) {
|
|
295
|
+
return null
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
if (isRunning) {
|
|
299
|
+
return (
|
|
300
|
+
<div className="flex items-center gap-x-1">
|
|
301
|
+
<Text size="small" leading="compact" className="text-ui-fg-subtle">
|
|
302
|
+
{t("workflowExecutions.history.runningState")}
|
|
303
|
+
</Text>
|
|
304
|
+
<Spinner className="text-ui-fg-interactive animate-spin" />
|
|
305
|
+
</div>
|
|
306
|
+
)
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (isFailed) {
|
|
310
|
+
return (
|
|
311
|
+
<Text size="small" leading="compact" className="text-ui-fg-subtle">
|
|
312
|
+
{t("workflowExecutions.history.failedState")}
|
|
313
|
+
</Text>
|
|
314
|
+
)
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
if (startedAt) {
|
|
318
|
+
return (
|
|
319
|
+
<Text size="small" leading="compact" className="text-ui-fg-muted">
|
|
320
|
+
{format(startedAt, "dd MMM yyyy HH:mm:ss")}
|
|
321
|
+
</Text>
|
|
322
|
+
)
|
|
323
|
+
}
|
|
324
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./workflow-execution-payload-section"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JsonViewSection } from "../../../../../components/common/json-view-section"
|
|
2
|
+
import { WorkflowExecutionDTO } from "../../../types"
|
|
3
|
+
|
|
4
|
+
type WorkflowExecutionPayloadSectionProps = {
|
|
5
|
+
execution: WorkflowExecutionDTO
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const WorkflowExecutionPayloadSection = ({
|
|
9
|
+
execution,
|
|
10
|
+
}: WorkflowExecutionPayloadSectionProps) => {
|
|
11
|
+
let payload = execution.context?.data?.payload
|
|
12
|
+
|
|
13
|
+
if (!payload) {
|
|
14
|
+
return null
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// payloads may be a primitive, so we need to wrap them in an object
|
|
18
|
+
// to ensure the JsonViewSection component can render them.
|
|
19
|
+
if (typeof payload !== "object") {
|
|
20
|
+
payload = { input: payload }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return <JsonViewSection title="Payload" data={payload as object} />
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./workflow-execution-timeline-section"
|