@vendure/dashboard 3.2.0 → 3.2.2
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/LICENSE.md +42 -0
- package/README.md +12 -12
- package/dist/plugin/vite-plugin-admin-api-schema.js +2 -2
- package/dist/plugin/vite-plugin-dashboard-metadata.js +4 -4
- package/dist/plugin/vite-plugin-theme.d.ts +55 -0
- package/dist/plugin/vite-plugin-theme.js +130 -0
- package/dist/plugin/vite-plugin-ui-config.js +2 -2
- package/dist/plugin/vite-plugin-vendure-dashboard.d.ts +2 -1
- package/dist/plugin/vite-plugin-vendure-dashboard.js +2 -0
- package/index.html +15 -15
- package/lingui.config.js +12 -12
- package/package.json +15 -5
- package/src/app/app-providers.tsx +30 -30
- package/src/app/main.tsx +97 -97
- package/src/app/routes/__root.tsx +24 -24
- package/src/app/routes/_authenticated/_administrators/administrators.graphql.ts +79 -79
- package/src/app/routes/_authenticated/_administrators/administrators.tsx +86 -86
- package/src/app/routes/_authenticated/_administrators/administrators_.$id.tsx +155 -155
- package/src/app/routes/_authenticated/_administrators/components/role-permissions-display.tsx +133 -133
- package/src/app/routes/_authenticated/_assets/assets.tsx +19 -19
- package/src/app/routes/_authenticated/_channels/channels.graphql.ts +93 -93
- package/src/app/routes/_authenticated/_channels/channels.tsx +60 -60
- package/src/app/routes/_authenticated/_channels/channels_.$id.tsx +248 -248
- package/src/app/routes/_authenticated/_collections/collections.graphql.ts +133 -133
- package/src/app/routes/_authenticated/_collections/collections.tsx +195 -195
- package/src/app/routes/_authenticated/_collections/collections_.$id.tsx +224 -224
- package/src/app/routes/_authenticated/_collections/components/collection-contents-preview-table.tsx +127 -127
- package/src/app/routes/_authenticated/_collections/components/collection-contents-sheet.tsx +46 -46
- package/src/app/routes/_authenticated/_collections/components/collection-contents-table.tsx +82 -82
- package/src/app/routes/_authenticated/_collections/components/collection-filters-selector.tsx +91 -91
- package/src/app/routes/_authenticated/_countries/countries.graphql.ts +69 -69
- package/src/app/routes/_authenticated/_countries/countries.tsx +67 -67
- package/src/app/routes/_authenticated/_countries/countries_.$id.tsx +122 -122
- package/src/app/routes/_authenticated/_customer-groups/components/customer-group-members-sheet.tsx +44 -44
- package/src/app/routes/_authenticated/_customer-groups/components/customer-group-members-table.tsx +129 -129
- package/src/app/routes/_authenticated/_customer-groups/customer-groups.graphql.ts +71 -71
- package/src/app/routes/_authenticated/_customer-groups/customer-groups.tsx +68 -68
- package/src/app/routes/_authenticated/_customer-groups/customer-groups_.$id.tsx +111 -111
- package/src/app/routes/_authenticated/_customers/components/customer-address-card.tsx +155 -155
- package/src/app/routes/_authenticated/_customers/components/customer-address-form.tsx +344 -344
- package/src/app/routes/_authenticated/_customers/components/customer-group-controls.tsx +4 -4
- package/src/app/routes/_authenticated/_customers/components/customer-history/customer-history-container.tsx +78 -78
- package/src/app/routes/_authenticated/_customers/components/customer-history/customer-history.tsx +77 -77
- package/src/app/routes/_authenticated/_customers/components/customer-history/index.ts +3 -3
- package/src/app/routes/_authenticated/_customers/components/customer-history/use-customer-history.ts +169 -169
- package/src/app/routes/_authenticated/_customers/components/customer-order-table.tsx +88 -88
- package/src/app/routes/_authenticated/_customers/components/customer-status-badge.tsx +33 -33
- package/src/app/routes/_authenticated/_customers/customers.graphql.ts +204 -204
- package/src/app/routes/_authenticated/_customers/customers.tsx +82 -82
- package/src/app/routes/_authenticated/_customers/customers_.$id.tsx +274 -274
- package/src/app/routes/_authenticated/_facets/components/edit-facet-value.tsx +129 -129
- package/src/app/routes/_authenticated/_facets/components/facet-values-sheet.tsx +46 -46
- package/src/app/routes/_authenticated/_facets/components/facet-values-table.tsx +97 -97
- package/src/app/routes/_authenticated/_facets/facets.graphql.ts +104 -104
- package/src/app/routes/_authenticated/_facets/facets.tsx +97 -97
- package/src/app/routes/_authenticated/_facets/facets_.$id.tsx +139 -139
- package/src/app/routes/_authenticated/_global-settings/global-settings.graphql.ts +28 -28
- package/src/app/routes/_authenticated/_global-settings/global-settings.tsx +161 -161
- package/src/app/routes/_authenticated/_orders/components/order-address.tsx +58 -58
- package/src/app/routes/_authenticated/_orders/components/order-history/index.ts +3 -3
- package/src/app/routes/_authenticated/_orders/components/order-history/order-history-container.tsx +72 -72
- package/src/app/routes/_authenticated/_orders/components/order-history/order-history.tsx +96 -96
- package/src/app/routes/_authenticated/_orders/components/order-history/use-order-history.ts +171 -171
- package/src/app/routes/_authenticated/_orders/components/order-table.tsx +169 -169
- package/src/app/routes/_authenticated/_orders/components/order-tax-summary.tsx +38 -38
- package/src/app/routes/_authenticated/_orders/components/payment-details.tsx +61 -61
- package/src/app/routes/_authenticated/_orders/orders.graphql.ts +325 -325
- package/src/app/routes/_authenticated/_orders/orders.tsx +120 -120
- package/src/app/routes/_authenticated/_orders/orders_.$id.tsx +133 -133
- package/src/app/routes/_authenticated/_payment-methods/components/payment-eligibility-checker-selector.tsx +104 -104
- package/src/app/routes/_authenticated/_payment-methods/components/payment-handler-selector.tsx +100 -100
- package/src/app/routes/_authenticated/_payment-methods/payment-methods.graphql.ts +83 -83
- package/src/app/routes/_authenticated/_payment-methods/payment-methods.tsx +64 -64
- package/src/app/routes/_authenticated/_payment-methods/payment-methods_.$id.tsx +183 -183
- package/src/app/routes/_authenticated/_product-variants/components/variant-price-detail.tsx +87 -87
- package/src/app/routes/_authenticated/_product-variants/product-variants.graphql.ts +123 -123
- package/src/app/routes/_authenticated/_product-variants/product-variants.tsx +78 -78
- package/src/app/routes/_authenticated/_product-variants/product-variants_.$id.tsx +331 -331
- package/src/app/routes/_authenticated/_products/components/create-product-variants-dialog.tsx +228 -228
- package/src/app/routes/_authenticated/_products/components/create-product-variants.tsx +462 -462
- package/src/app/routes/_authenticated/_products/components/option-value-input.tsx +95 -95
- package/src/app/routes/_authenticated/_products/components/product-variants-table.tsx +87 -87
- package/src/app/routes/_authenticated/_products/products.graphql.ts +116 -116
- package/src/app/routes/_authenticated/_products/products.tsx +48 -48
- package/src/app/routes/_authenticated/_products/products_.$id.tsx +196 -196
- package/src/app/routes/_authenticated/_profile/profile.graphql.ts +23 -23
- package/src/app/routes/_authenticated/_profile/profile.tsx +122 -122
- package/src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx +107 -107
- package/src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx +107 -107
- package/src/app/routes/_authenticated/_promotions/promotions.graphql.ts +96 -96
- package/src/app/routes/_authenticated/_promotions/promotions.tsx +61 -61
- package/src/app/routes/_authenticated/_promotions/promotions_.$id.tsx +235 -235
- package/src/app/routes/_authenticated/_roles/components/expandable-permissions.tsx +54 -54
- package/src/app/routes/_authenticated/_roles/components/permissions-grid.tsx +116 -116
- package/src/app/routes/_authenticated/_roles/roles.graphql.ts +67 -67
- package/src/app/routes/_authenticated/_roles/roles.tsx +96 -96
- package/src/app/routes/_authenticated/_roles/roles_.$id.tsx +142 -142
- package/src/app/routes/_authenticated/_sellers/sellers.graphql.ts +61 -61
- package/src/app/routes/_authenticated/_sellers/sellers.tsx +51 -51
- package/src/app/routes/_authenticated/_sellers/sellers_.$id.tsx +111 -111
- package/src/app/routes/_authenticated/_shipping-methods/components/fulfillment-handler-selector.tsx +56 -56
- package/src/app/routes/_authenticated/_shipping-methods/components/shipping-calculator-selector.tsx +101 -101
- package/src/app/routes/_authenticated/_shipping-methods/components/shipping-eligibility-checker-selector.tsx +101 -101
- package/src/app/routes/_authenticated/_shipping-methods/components/test-shipping-method-dialog.tsx +32 -32
- package/src/app/routes/_authenticated/_shipping-methods/shipping-methods.graphql.ts +83 -83
- package/src/app/routes/_authenticated/_shipping-methods/shipping-methods.tsx +55 -55
- package/src/app/routes/_authenticated/_shipping-methods/shipping-methods_.$id.tsx +171 -171
- package/src/app/routes/_authenticated/_stock-locations/stock-locations.graphql.ts +62 -62
- package/src/app/routes/_authenticated/_stock-locations/stock-locations.tsx +48 -48
- package/src/app/routes/_authenticated/_stock-locations/stock-locations_.$id.tsx +115 -115
- package/src/app/routes/_authenticated/_system/components/payload-dialog.tsx +34 -34
- package/src/app/routes/_authenticated/_system/healthchecks.tsx +93 -93
- package/src/app/routes/_authenticated/_system/job-queue.graphql.ts +43 -43
- package/src/app/routes/_authenticated/_system/job-queue.tsx +161 -161
- package/src/app/routes/_authenticated/_tax-categories/tax-categories.graphql.ts +63 -63
- package/src/app/routes/_authenticated/_tax-categories/tax-categories.tsx +65 -65
- package/src/app/routes/_authenticated/_tax-categories/tax-categories_.$id.tsx +115 -115
- package/src/app/routes/_authenticated/_tax-rates/tax-rates.graphql.ts +75 -75
- package/src/app/routes/_authenticated/_tax-rates/tax-rates.tsx +108 -108
- package/src/app/routes/_authenticated/_tax-rates/tax-rates_.$id.tsx +148 -148
- package/src/app/routes/_authenticated/_zones/components/zone-countries-sheet.tsx +31 -31
- package/src/app/routes/_authenticated/_zones/components/zone-countries-table.tsx +79 -79
- package/src/app/routes/_authenticated/_zones/zones.graphql.ts +96 -96
- package/src/app/routes/_authenticated/_zones/zones.tsx +57 -57
- package/src/app/routes/_authenticated/_zones/zones_.$id.tsx +103 -103
- package/src/app/routes/_authenticated/index.tsx +194 -194
- package/src/app/routes/_authenticated.tsx +25 -25
- package/src/app/routes/login.tsx +48 -48
- package/src/app/styles.css +82 -82
- package/src/app/tailwindcss-animate.css +275 -275
- package/src/i18n/locales/de.po +1579 -1579
- package/src/i18n/locales/en.po +1579 -1579
- package/src/lib/components/data-display/boolean.tsx +23 -23
- package/src/lib/components/data-display/date-time.tsx +13 -13
- package/src/lib/components/data-display/json.tsx +5 -5
- package/src/lib/components/data-display/money.tsx +15 -15
- package/src/lib/components/data-input/affixed-input.tsx +49 -49
- package/src/lib/components/data-input/customer-group-input.tsx +72 -72
- package/src/lib/components/data-input/datetime-input.tsx +149 -149
- package/src/lib/components/data-input/facet-value-input.tsx +68 -68
- package/src/lib/components/data-input/money-input.tsx +112 -112
- package/src/lib/components/data-input/richt-text-input.tsx +99 -99
- package/src/lib/components/data-table/data-table-column-header.tsx +73 -73
- package/src/lib/components/data-table/data-table-faceted-filter.tsx +172 -172
- package/src/lib/components/data-table/data-table-filter-dialog.tsx +73 -73
- package/src/lib/components/data-table/data-table-pagination.tsx +87 -87
- package/src/lib/components/data-table/data-table-view-options.tsx +53 -53
- package/src/lib/components/data-table/data-table.tsx +218 -218
- package/src/lib/components/layout/app-layout.tsx +42 -42
- package/src/lib/components/layout/app-sidebar.tsx +34 -34
- package/src/lib/components/layout/channel-switcher.tsx +87 -87
- package/src/lib/components/layout/content-language-selector.tsx +41 -41
- package/src/lib/components/layout/generated-breadcrumbs.tsx +82 -82
- package/src/lib/components/layout/language-dialog.tsx +104 -104
- package/src/lib/components/layout/nav-main.tsx +178 -178
- package/src/lib/components/layout/nav-projects.tsx +81 -81
- package/src/lib/components/layout/nav-user.tsx +176 -176
- package/src/lib/components/layout/prerelease-popup.tsx +38 -38
- package/src/lib/components/login/login-form.tsx +173 -173
- package/src/lib/components/shared/alerts.tsx +20 -20
- package/src/lib/components/shared/animated-number.tsx +49 -49
- package/src/lib/components/shared/asset-gallery.tsx +433 -433
- package/src/lib/components/shared/asset-picker-dialog.tsx +71 -71
- package/src/lib/components/shared/asset-preview-dialog.tsx +48 -48
- package/src/lib/components/shared/asset-preview.tsx +345 -345
- package/src/lib/components/shared/assigned-facet-values.tsx +68 -68
- package/src/lib/components/shared/channel-code-label.tsx +7 -7
- package/src/lib/components/shared/channel-selector.tsx +51 -51
- package/src/lib/components/shared/configurable-operation-arg-input.tsx +51 -51
- package/src/lib/components/shared/configurable-operation-input.tsx +133 -133
- package/src/lib/components/shared/confirmation-dialog.tsx +58 -58
- package/src/lib/components/shared/copyable-text.tsx +31 -31
- package/src/lib/components/shared/country-selector.tsx +105 -105
- package/src/lib/components/shared/currency-selector.tsx +33 -33
- package/src/lib/components/shared/custom-fields-form.tsx +86 -86
- package/src/lib/components/shared/customer-address-form.tsx +330 -330
- package/src/lib/components/shared/customer-group-chip.tsx +30 -30
- package/src/lib/components/shared/customer-group-selector.tsx +62 -62
- package/src/lib/components/shared/customer-selector.tsx +107 -107
- package/src/lib/components/shared/detail-page-button.tsx +22 -22
- package/src/lib/components/shared/entity-assets.tsx +340 -340
- package/src/lib/components/shared/error-page.tsx +31 -31
- package/src/lib/components/shared/facet-value-chip.tsx +44 -44
- package/src/lib/components/shared/facet-value-selector.tsx +306 -306
- package/src/lib/components/shared/focal-point-control.tsx +64 -64
- package/src/lib/components/shared/form-field-wrapper.tsx +37 -37
- package/src/lib/components/shared/history-timeline/history-entry.tsx +112 -112
- package/src/lib/components/shared/history-timeline/history-note-checkbox.tsx +28 -28
- package/src/lib/components/shared/history-timeline/history-note-editor.tsx +60 -60
- package/src/lib/components/shared/history-timeline/history-note-input.tsx +39 -39
- package/src/lib/components/shared/history-timeline/history-timeline.tsx +56 -56
- package/src/lib/components/shared/icon-mark.tsx +18 -18
- package/src/lib/components/shared/language-selector.tsx +48 -48
- package/src/lib/components/shared/logo-mark.tsx +24 -24
- package/src/lib/components/shared/multi-select.tsx +159 -159
- package/src/lib/components/shared/option-value-input.tsx +94 -94
- package/src/lib/components/shared/paginated-list-data-table.tsx +520 -520
- package/src/lib/components/shared/permission-guard.tsx +20 -20
- package/src/lib/components/shared/role-code-label.tsx +8 -8
- package/src/lib/components/shared/role-selector.tsx +56 -56
- package/src/lib/components/shared/seller-selector.tsx +107 -107
- package/src/lib/components/shared/tax-category-selector.tsx +65 -65
- package/src/lib/components/shared/translatable-form-field.tsx +74 -74
- package/src/lib/components/shared/vendure-image.tsx +159 -159
- package/src/lib/components/shared/zone-selector.tsx +66 -66
- package/src/lib/components/ui/accordion.tsx +59 -59
- package/src/lib/components/ui/alert-dialog.tsx +128 -128
- package/src/lib/components/ui/alert.tsx +60 -60
- package/src/lib/components/ui/avatar.tsx +38 -38
- package/src/lib/components/ui/badge.tsx +38 -38
- package/src/lib/components/ui/breadcrumb.tsx +102 -102
- package/src/lib/components/ui/button.tsx +51 -51
- package/src/lib/components/ui/calendar.tsx +69 -69
- package/src/lib/components/ui/card.tsx +47 -47
- package/src/lib/components/ui/checkbox.tsx +27 -27
- package/src/lib/components/ui/collapsible.tsx +33 -33
- package/src/lib/components/ui/command.tsx +133 -133
- package/src/lib/components/ui/dialog.tsx +116 -116
- package/src/lib/components/ui/dropdown-menu.tsx +220 -220
- package/src/lib/components/ui/form.tsx +141 -141
- package/src/lib/components/ui/hover-card.tsx +36 -36
- package/src/lib/components/ui/input.tsx +19 -19
- package/src/lib/components/ui/label.tsx +21 -21
- package/src/lib/components/ui/pagination.tsx +127 -127
- package/src/lib/components/ui/popover.tsx +40 -40
- package/src/lib/components/ui/scroll-area.tsx +50 -50
- package/src/lib/components/ui/select.tsx +161 -161
- package/src/lib/components/ui/separator.tsx +26 -26
- package/src/lib/components/ui/sheet.tsx +118 -118
- package/src/lib/components/ui/sidebar.tsx +696 -696
- package/src/lib/components/ui/skeleton.tsx +13 -13
- package/src/lib/components/ui/sonner.tsx +27 -27
- package/src/lib/components/ui/switch.tsx +26 -26
- package/src/lib/components/ui/table.tsx +82 -82
- package/src/lib/components/ui/tabs.tsx +48 -48
- package/src/lib/components/ui/textarea.tsx +18 -18
- package/src/lib/components/ui/tooltip.tsx +51 -51
- package/src/lib/constants.ts +326 -326
- package/src/lib/framework/component-registry/component-registry.tsx +70 -70
- package/src/lib/framework/component-registry/dynamic-component.tsx +58 -58
- package/src/lib/framework/dashboard-widget/base-widget.tsx +97 -97
- package/src/lib/framework/dashboard-widget/latest-orders-widget/index.tsx +96 -96
- package/src/lib/framework/dashboard-widget/latest-orders-widget/latest-orders-widget.graphql.ts +35 -35
- package/src/lib/framework/dashboard-widget/metrics-widget/chart.tsx +24 -24
- package/src/lib/framework/dashboard-widget/metrics-widget/index.tsx +82 -82
- package/src/lib/framework/dashboard-widget/metrics-widget/metrics-widget.graphql.ts +14 -14
- package/src/lib/framework/dashboard-widget/orders-summary/index.tsx +167 -167
- package/src/lib/framework/dashboard-widget/orders-summary/order-summary-widget.graphql.ts +14 -14
- package/src/lib/framework/dashboard-widget/types.ts +22 -22
- package/src/lib/framework/dashboard-widget/widget-extensions.tsx +19 -19
- package/src/lib/framework/defaults.ts +219 -219
- package/src/lib/framework/document-introspection/add-custom-fields.spec.ts +242 -242
- package/src/lib/framework/document-introspection/add-custom-fields.ts +246 -246
- package/src/lib/framework/document-introspection/get-document-structure.spec.ts +310 -310
- package/src/lib/framework/document-introspection/get-document-structure.ts +460 -460
- package/src/lib/framework/document-introspection/hooks.ts +10 -10
- package/src/lib/framework/extension-api/define-dashboard-extension.ts +66 -66
- package/src/lib/framework/extension-api/extension-api-types.ts +58 -58
- package/src/lib/framework/extension-api/use-dashboard-extensions.ts +26 -26
- package/src/lib/framework/form-engine/form-schema-tools.ts +98 -98
- package/src/lib/framework/form-engine/use-generated-form.tsx +116 -116
- package/src/lib/framework/layout-engine/layout-extensions.ts +30 -30
- package/src/lib/framework/layout-engine/location-wrapper.tsx +96 -96
- package/src/lib/framework/layout-engine/page-layout.tsx +272 -272
- package/src/lib/framework/nav-menu/nav-menu-extensions.ts +66 -66
- package/src/lib/framework/page/detail-page-route-loader.tsx +48 -48
- package/src/lib/framework/page/detail-page.tsx +131 -131
- package/src/lib/framework/page/list-page.tsx +166 -166
- package/src/lib/framework/page/page-api.ts +9 -9
- package/src/lib/framework/page/page-types.ts +51 -51
- package/src/lib/framework/page/use-detail-page.ts +217 -217
- package/src/lib/framework/page/use-extended-router.tsx +69 -69
- package/src/lib/framework/registry/global-registry.ts +46 -46
- package/src/lib/framework/registry/registry-types.ts +15 -15
- package/src/lib/graphql/api.ts +61 -61
- package/src/lib/graphql/fragments.tsx +54 -54
- package/src/lib/graphql/graphql-env.d.ts +499 -499
- package/src/lib/graphql/graphql.ts +15 -15
- package/src/lib/hooks/use-auth.tsx +11 -11
- package/src/lib/hooks/use-channel.ts +12 -12
- package/src/lib/hooks/use-custom-field-config.ts +10 -10
- package/src/lib/hooks/use-grouped-permissions.ts +54 -54
- package/src/lib/hooks/use-local-format.ts +119 -119
- package/src/lib/hooks/use-mobile.ts +19 -19
- package/src/lib/hooks/use-page.tsx +10 -10
- package/src/lib/hooks/use-permissions.ts +22 -22
- package/src/lib/hooks/use-server-config.ts +4 -4
- package/src/lib/hooks/use-theme.ts +10 -10
- package/src/lib/hooks/use-user-settings.tsx +12 -12
- package/src/lib/index.ts +149 -149
- package/src/lib/lib/trans.tsx +16 -16
- package/src/lib/lib/utils.ts +60 -60
- package/src/lib/providers/auth.tsx +152 -152
- package/src/lib/providers/channel-provider.tsx +121 -121
- package/src/lib/providers/i18n-provider.tsx +28 -28
- package/src/lib/providers/server-config.tsx +279 -279
- package/src/lib/providers/theme-provider.tsx +54 -54
- package/src/lib/providers/user-settings.tsx +89 -89
- package/src/lib/virtual.d.ts +12 -12
- package/vite/config-loader.ts +181 -181
- package/vite/constants.ts +280 -280
- package/vite/index.ts +1 -1
- package/vite/schema-generator.ts +40 -40
- package/vite/ui-config.ts +60 -60
- package/vite/vite-plugin-admin-api-schema.ts +141 -141
- package/vite/vite-plugin-config-loader.ts +64 -64
- package/vite/vite-plugin-config.ts +42 -42
- package/vite/vite-plugin-dashboard-metadata.ts +58 -58
- package/vite/vite-plugin-gql-tada.ts +62 -62
- package/vite/vite-plugin-theme.ts +195 -195
- package/vite/vite-plugin-ui-config.ts +60 -60
- package/vite/vite-plugin-vendure-dashboard.ts +118 -118
- package/dist/plugin/.vendure-dashboard-temp/dev-config.js +0 -227
- package/dist/plugin/.vendure-dashboard-temp/dev-config.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/api/api-extensions.js +0 -33
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/api/api-extensions.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/api/mv.resolver.js +0 -69
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/api/mv.resolver.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-order-process.js +0 -110
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-order-process.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-order-seller-strategy.js +0 -134
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-order-seller-strategy.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-payment-handler.js +0 -86
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-payment-handler.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-shipping-eligibility-checker.js +0 -49
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-shipping-eligibility-checker.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-shipping-line-assignment-strategy.js +0 -57
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-shipping-line-assignment-strategy.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/constants.js +0 -20
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/constants.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/multivendor.plugin.js +0 -151
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/multivendor.plugin.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/payment/mv-connect-sdk.js +0 -47
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/payment/mv-connect-sdk.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/service/mv.service.js +0 -222
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/service/mv.service.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/types.js +0 -4
- package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/types.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/package.json +0 -3
- package/dist/plugin/.vendure-dashboard-temp/schema.graphql +0 -6378
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/api-extensions.js +0 -103
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/api-extensions.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-entity.resolver.js +0 -105
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-entity.resolver.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-review-admin.resolver.js +0 -183
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-review-admin.resolver.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-review-entity.resolver.js +0 -113
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-review-entity.resolver.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-review-shop.resolver.js +0 -112
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-review-shop.resolver.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/entities/product-review.entity.js +0 -111
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/entities/product-review.entity.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/generated-admin-types.js +0 -616
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/generated-admin-types.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/generated-shop-types.js +0 -563
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/generated-shop-types.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/reviews-plugin.js +0 -135
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/reviews-plugin.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/types.js +0 -4
- package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/types.js.map +0 -1
- package/dist/plugin/.vendure-dashboard-temp/tsconfig.json +0 -10
- package/dist/plugin/vite-plugin-set-root.d.ts +0 -4
- package/dist/plugin/vite-plugin-set-root.js +0 -15
- package/src/app/routeTree.gen.ts +0 -1372
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { Button } from '@/components/ui/button.js';
|
|
2
|
-
import { Textarea } from '@/components/ui/textarea.js';
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { HistoryNoteCheckbox } from './history-note-checkbox.js';
|
|
5
|
-
|
|
6
|
-
interface HistoryNoteInputProps {
|
|
7
|
-
onAddNote: (note: string, isPrivate: boolean) => void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function HistoryNoteInput({ onAddNote }: HistoryNoteInputProps) {
|
|
11
|
-
const [note, setNote] = useState('');
|
|
12
|
-
const [noteIsPrivate, setNoteIsPrivate] = useState(true);
|
|
13
|
-
|
|
14
|
-
const handleAddNote = () => {
|
|
15
|
-
if (note.trim()) {
|
|
16
|
-
onAddNote(note, noteIsPrivate);
|
|
17
|
-
setNote('');
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<div className="border rounded-md p-4">
|
|
23
|
-
<div className="flex flex-col space-y-4">
|
|
24
|
-
<Textarea
|
|
25
|
-
placeholder="Add a note..."
|
|
26
|
-
value={note}
|
|
27
|
-
onChange={e => setNote(e.target.value)}
|
|
28
|
-
className="min-h-[80px] resize-none"
|
|
29
|
-
/>
|
|
30
|
-
<div className="flex items-center justify-between">
|
|
31
|
-
<HistoryNoteCheckbox value={noteIsPrivate} onChange={setNoteIsPrivate} />
|
|
32
|
-
<Button onClick={handleAddNote} disabled={!note.trim()} size="sm">
|
|
33
|
-
Add note
|
|
34
|
-
</Button>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
1
|
+
import { Button } from '@/components/ui/button.js';
|
|
2
|
+
import { Textarea } from '@/components/ui/textarea.js';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { HistoryNoteCheckbox } from './history-note-checkbox.js';
|
|
5
|
+
|
|
6
|
+
interface HistoryNoteInputProps {
|
|
7
|
+
onAddNote: (note: string, isPrivate: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function HistoryNoteInput({ onAddNote }: HistoryNoteInputProps) {
|
|
11
|
+
const [note, setNote] = useState('');
|
|
12
|
+
const [noteIsPrivate, setNoteIsPrivate] = useState(true);
|
|
13
|
+
|
|
14
|
+
const handleAddNote = () => {
|
|
15
|
+
if (note.trim()) {
|
|
16
|
+
onAddNote(note, noteIsPrivate);
|
|
17
|
+
setNote('');
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div className="border rounded-md p-4">
|
|
23
|
+
<div className="flex flex-col space-y-4">
|
|
24
|
+
<Textarea
|
|
25
|
+
placeholder="Add a note..."
|
|
26
|
+
value={note}
|
|
27
|
+
onChange={e => setNote(e.target.value)}
|
|
28
|
+
className="min-h-[80px] resize-none"
|
|
29
|
+
/>
|
|
30
|
+
<div className="flex items-center justify-between">
|
|
31
|
+
<HistoryNoteCheckbox value={noteIsPrivate} onChange={setNoteIsPrivate} />
|
|
32
|
+
<Button onClick={handleAddNote} disabled={!note.trim()} size="sm">
|
|
33
|
+
Add note
|
|
34
|
+
</Button>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { ScrollArea } from '@/components/ui/scroll-area.js';
|
|
2
|
-
import { useState, createContext, useContext } from 'react';
|
|
3
|
-
import { HistoryNoteEditor } from './history-note-editor.js';
|
|
4
|
-
|
|
5
|
-
interface HistoryTimelineProps {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
onEditNote?: (entryId: string, note: string, isPublic: boolean) => void;
|
|
8
|
-
onDeleteNote?: (entryId: string) => void;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// Use context to make the note editing functions available to the child
|
|
12
|
-
// HistoryEntry component
|
|
13
|
-
const HistoryTimelineContext = createContext<{
|
|
14
|
-
editNote: (noteId: string, note: string, isPrivate: boolean) => void;
|
|
15
|
-
deleteNote: (noteId: string) => void;
|
|
16
|
-
}>({ editNote: () => {}, deleteNote: () => {} });
|
|
17
|
-
|
|
18
|
-
type NoteEditorNote = { noteId: string; note: string; isPrivate: boolean };
|
|
19
|
-
|
|
20
|
-
export function useHistoryTimeline() {
|
|
21
|
-
return useContext(HistoryTimelineContext);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function HistoryTimeline({ children, onEditNote, onDeleteNote }: HistoryTimelineProps) {
|
|
25
|
-
const [noteEditorOpen, setNoteEditorOpen] = useState(false);
|
|
26
|
-
const [noteEditorNote, setNoteEditorNote] = useState<NoteEditorNote>({ noteId: '', note: '', isPrivate: true });
|
|
27
|
-
|
|
28
|
-
const editNote = (noteId: string, note: string, isPrivate: boolean) => {
|
|
29
|
-
setNoteEditorNote({ noteId, note, isPrivate });
|
|
30
|
-
setNoteEditorOpen(true);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const deleteNote = (noteId: string) => {
|
|
34
|
-
setNoteEditorNote({ noteId, note: '', isPrivate: true });
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<HistoryTimelineContext.Provider value={{ editNote, deleteNote }}>
|
|
39
|
-
<ScrollArea className=" pr-4">
|
|
40
|
-
<div className="relative">
|
|
41
|
-
<div className="absolute left-5 top-0 bottom-[44px] w-0.5 bg-gray-200" />
|
|
42
|
-
{children}
|
|
43
|
-
</div>
|
|
44
|
-
</ScrollArea>
|
|
45
|
-
<HistoryNoteEditor
|
|
46
|
-
key={noteEditorNote.noteId}
|
|
47
|
-
note={noteEditorNote.note}
|
|
48
|
-
onNoteChange={(...args) => onEditNote?.(...args)}
|
|
49
|
-
open={noteEditorOpen}
|
|
50
|
-
onOpenChange={setNoteEditorOpen}
|
|
51
|
-
noteId={noteEditorNote.noteId}
|
|
52
|
-
isPrivate={noteEditorNote.isPrivate}
|
|
53
|
-
/>
|
|
54
|
-
</HistoryTimelineContext.Provider>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
1
|
+
import { ScrollArea } from '@/components/ui/scroll-area.js';
|
|
2
|
+
import { useState, createContext, useContext } from 'react';
|
|
3
|
+
import { HistoryNoteEditor } from './history-note-editor.js';
|
|
4
|
+
|
|
5
|
+
interface HistoryTimelineProps {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
onEditNote?: (entryId: string, note: string, isPublic: boolean) => void;
|
|
8
|
+
onDeleteNote?: (entryId: string) => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Use context to make the note editing functions available to the child
|
|
12
|
+
// HistoryEntry component
|
|
13
|
+
const HistoryTimelineContext = createContext<{
|
|
14
|
+
editNote: (noteId: string, note: string, isPrivate: boolean) => void;
|
|
15
|
+
deleteNote: (noteId: string) => void;
|
|
16
|
+
}>({ editNote: () => {}, deleteNote: () => {} });
|
|
17
|
+
|
|
18
|
+
type NoteEditorNote = { noteId: string; note: string; isPrivate: boolean };
|
|
19
|
+
|
|
20
|
+
export function useHistoryTimeline() {
|
|
21
|
+
return useContext(HistoryTimelineContext);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function HistoryTimeline({ children, onEditNote, onDeleteNote }: HistoryTimelineProps) {
|
|
25
|
+
const [noteEditorOpen, setNoteEditorOpen] = useState(false);
|
|
26
|
+
const [noteEditorNote, setNoteEditorNote] = useState<NoteEditorNote>({ noteId: '', note: '', isPrivate: true });
|
|
27
|
+
|
|
28
|
+
const editNote = (noteId: string, note: string, isPrivate: boolean) => {
|
|
29
|
+
setNoteEditorNote({ noteId, note, isPrivate });
|
|
30
|
+
setNoteEditorOpen(true);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const deleteNote = (noteId: string) => {
|
|
34
|
+
setNoteEditorNote({ noteId, note: '', isPrivate: true });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<HistoryTimelineContext.Provider value={{ editNote, deleteNote }}>
|
|
39
|
+
<ScrollArea className=" pr-4">
|
|
40
|
+
<div className="relative">
|
|
41
|
+
<div className="absolute left-5 top-0 bottom-[44px] w-0.5 bg-gray-200" />
|
|
42
|
+
{children}
|
|
43
|
+
</div>
|
|
44
|
+
</ScrollArea>
|
|
45
|
+
<HistoryNoteEditor
|
|
46
|
+
key={noteEditorNote.noteId}
|
|
47
|
+
note={noteEditorNote.note}
|
|
48
|
+
onNoteChange={(...args) => onEditNote?.(...args)}
|
|
49
|
+
open={noteEditorOpen}
|
|
50
|
+
onOpenChange={setNoteEditorOpen}
|
|
51
|
+
noteId={noteEditorNote.noteId}
|
|
52
|
+
isPrivate={noteEditorNote.isPrivate}
|
|
53
|
+
/>
|
|
54
|
+
</HistoryTimelineContext.Provider>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export function IconMark(props: React.ComponentProps<'svg'>) {
|
|
2
|
-
return (
|
|
3
|
-
<svg viewBox="0 0 40 28" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
4
|
-
<path
|
|
5
|
-
d="M10.7466 12.6853V21.9481C10.7466 22.1142 10.8389 22.2712 10.9836 22.3527L19.3904 27.1155C19.6921 27.2846 20.0615 27.2846 20.3632 27.1155L28.77 22.3527C28.9178 22.2682 29.007 22.1142 29.007 21.9481V12.6853C29.007 12.3259 28.6099 12.0994 28.2929 12.2806L20.3632 16.7716C20.0615 16.9407 19.6921 16.9407 19.3904 16.7716L11.4607 12.2806C11.1437 12.0994 10.7466 12.3259 10.7466 12.6853Z"
|
|
6
|
-
fill="currentColor"
|
|
7
|
-
/>
|
|
8
|
-
<path
|
|
9
|
-
d="M8.8932 0.749702L0.486371 5.50943C0.184698 5.67856 0 5.99568 0 6.33393V15.8564C0 16.0225 0.0923489 16.1796 0.237029 16.2611L8.41299 20.894C8.73005 21.0752 9.12715 20.8487 9.12715 20.4893V11.5074C9.12715 11.1661 9.31185 10.852 9.61352 10.6829L17.5432 6.19199C17.8603 6.01078 17.8603 5.56077 17.5432 5.38258L9.36726 0.749702C9.2195 0.665138 9.03788 0.665138 8.89012 0.749702H8.8932Z"
|
|
10
|
-
fill="currentColor"
|
|
11
|
-
/>
|
|
12
|
-
<path
|
|
13
|
-
d="M30.86 0.740669L39.2668 5.5004C39.5685 5.66953 39.7532 5.98664 39.7532 6.3249V15.8474C39.7532 16.0135 39.6608 16.1705 39.5162 16.2521L31.3402 20.885C31.0231 21.0662 30.626 20.8397 30.626 20.4803V11.4984C30.626 11.1571 30.4413 10.843 30.1397 10.6739L22.21 6.18295C21.8929 6.00174 21.8929 5.55174 22.21 5.37355L30.3859 0.740669C30.5337 0.656105 30.7153 0.656105 30.8631 0.740669H30.86Z"
|
|
14
|
-
fill="currentColor"
|
|
15
|
-
/>
|
|
16
|
-
</svg>
|
|
17
|
-
);
|
|
18
|
-
}
|
|
1
|
+
export function IconMark(props: React.ComponentProps<'svg'>) {
|
|
2
|
+
return (
|
|
3
|
+
<svg viewBox="0 0 40 28" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
4
|
+
<path
|
|
5
|
+
d="M10.7466 12.6853V21.9481C10.7466 22.1142 10.8389 22.2712 10.9836 22.3527L19.3904 27.1155C19.6921 27.2846 20.0615 27.2846 20.3632 27.1155L28.77 22.3527C28.9178 22.2682 29.007 22.1142 29.007 21.9481V12.6853C29.007 12.3259 28.6099 12.0994 28.2929 12.2806L20.3632 16.7716C20.0615 16.9407 19.6921 16.9407 19.3904 16.7716L11.4607 12.2806C11.1437 12.0994 10.7466 12.3259 10.7466 12.6853Z"
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
/>
|
|
8
|
+
<path
|
|
9
|
+
d="M8.8932 0.749702L0.486371 5.50943C0.184698 5.67856 0 5.99568 0 6.33393V15.8564C0 16.0225 0.0923489 16.1796 0.237029 16.2611L8.41299 20.894C8.73005 21.0752 9.12715 20.8487 9.12715 20.4893V11.5074C9.12715 11.1661 9.31185 10.852 9.61352 10.6829L17.5432 6.19199C17.8603 6.01078 17.8603 5.56077 17.5432 5.38258L9.36726 0.749702C9.2195 0.665138 9.03788 0.665138 8.89012 0.749702H8.8932Z"
|
|
10
|
+
fill="currentColor"
|
|
11
|
+
/>
|
|
12
|
+
<path
|
|
13
|
+
d="M30.86 0.740669L39.2668 5.5004C39.5685 5.66953 39.7532 5.98664 39.7532 6.3249V15.8474C39.7532 16.0135 39.6608 16.1705 39.5162 16.2521L31.3402 20.885C31.0231 21.0662 30.626 20.8397 30.626 20.4803V11.4984C30.626 11.1571 30.4413 10.843 30.1397 10.6739L22.21 6.18295C21.8929 6.00174 21.8929 5.55174 22.21 5.37355L30.3859 0.740669C30.5337 0.656105 30.7153 0.656105 30.8631 0.740669H30.86Z"
|
|
14
|
+
fill="currentColor"
|
|
15
|
+
/>
|
|
16
|
+
</svg>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { api } from '@/graphql/api.js';
|
|
2
|
-
import { graphql } from '@/graphql/graphql.js';
|
|
3
|
-
import { useQuery } from '@tanstack/react-query';
|
|
4
|
-
import { useLocalFormat } from '@/hooks/use-local-format.js';
|
|
5
|
-
import { MultiSelect } from './multi-select.js';
|
|
6
|
-
import { useLingui } from '@/lib/trans.js';
|
|
7
|
-
|
|
8
|
-
const availableGlobalLanguages = graphql(`
|
|
9
|
-
query AvailableGlobalLanguages {
|
|
10
|
-
globalSettings {
|
|
11
|
-
availableLanguages
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
`);
|
|
15
|
-
|
|
16
|
-
export interface LanguageSelectorProps<T extends boolean> {
|
|
17
|
-
value: T extends true ? string[] : string;
|
|
18
|
-
onChange: (value: T extends true ? string[] : string) => void;
|
|
19
|
-
multiple?: T;
|
|
20
|
-
availableLanguageCodes?: string[];
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function LanguageSelector<T extends boolean>(props: LanguageSelectorProps<T>) {
|
|
24
|
-
const { data } = useQuery({
|
|
25
|
-
queryKey: ['availableGlobalLanguages'],
|
|
26
|
-
queryFn: () => api.query(availableGlobalLanguages),
|
|
27
|
-
staleTime: 1000 * 60 * 5, // 5 minutes
|
|
28
|
-
});
|
|
29
|
-
const { formatLanguageName } = useLocalFormat();
|
|
30
|
-
const { value, onChange, multiple, availableLanguageCodes } = props;
|
|
31
|
-
const { i18n } = useLingui();
|
|
32
|
-
|
|
33
|
-
const items = (availableLanguageCodes ?? data?.globalSettings.availableLanguages ?? []).map(language => ({
|
|
34
|
-
value: language,
|
|
35
|
-
label: formatLanguageName(language)
|
|
36
|
-
}));
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<MultiSelect
|
|
40
|
-
value={value}
|
|
41
|
-
onChange={onChange}
|
|
42
|
-
multiple={multiple}
|
|
43
|
-
items={items}
|
|
44
|
-
placeholder={i18n.t('Select a language')}
|
|
45
|
-
searchPlaceholder={i18n.t('Search languages...')}
|
|
46
|
-
/>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
1
|
+
import { api } from '@/graphql/api.js';
|
|
2
|
+
import { graphql } from '@/graphql/graphql.js';
|
|
3
|
+
import { useQuery } from '@tanstack/react-query';
|
|
4
|
+
import { useLocalFormat } from '@/hooks/use-local-format.js';
|
|
5
|
+
import { MultiSelect } from './multi-select.js';
|
|
6
|
+
import { useLingui } from '@/lib/trans.js';
|
|
7
|
+
|
|
8
|
+
const availableGlobalLanguages = graphql(`
|
|
9
|
+
query AvailableGlobalLanguages {
|
|
10
|
+
globalSettings {
|
|
11
|
+
availableLanguages
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`);
|
|
15
|
+
|
|
16
|
+
export interface LanguageSelectorProps<T extends boolean> {
|
|
17
|
+
value: T extends true ? string[] : string;
|
|
18
|
+
onChange: (value: T extends true ? string[] : string) => void;
|
|
19
|
+
multiple?: T;
|
|
20
|
+
availableLanguageCodes?: string[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function LanguageSelector<T extends boolean>(props: LanguageSelectorProps<T>) {
|
|
24
|
+
const { data } = useQuery({
|
|
25
|
+
queryKey: ['availableGlobalLanguages'],
|
|
26
|
+
queryFn: () => api.query(availableGlobalLanguages),
|
|
27
|
+
staleTime: 1000 * 60 * 5, // 5 minutes
|
|
28
|
+
});
|
|
29
|
+
const { formatLanguageName } = useLocalFormat();
|
|
30
|
+
const { value, onChange, multiple, availableLanguageCodes } = props;
|
|
31
|
+
const { i18n } = useLingui();
|
|
32
|
+
|
|
33
|
+
const items = (availableLanguageCodes ?? data?.globalSettings.availableLanguages ?? []).map(language => ({
|
|
34
|
+
value: language,
|
|
35
|
+
label: formatLanguageName(language)
|
|
36
|
+
}));
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<MultiSelect
|
|
40
|
+
value={value}
|
|
41
|
+
onChange={onChange}
|
|
42
|
+
multiple={multiple}
|
|
43
|
+
items={items}
|
|
44
|
+
placeholder={i18n.t('Select a language')}
|
|
45
|
+
searchPlaceholder={i18n.t('Search languages...')}
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export function LogoMark(props: React.ComponentProps<'svg'>) {
|
|
2
|
-
return (
|
|
3
|
-
<svg viewBox="0 0 177 33" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
4
|
-
<path
|
|
5
|
-
d="M65.192 9.73a.729.729 0 0 0-.593-.307h-2.503a.733.733 0 0 0-.685.487l-4.263 12.438-4.33-12.445a.721.721 0 0 0-.684-.486h-2.577a.73.73 0 0 0-.592.307.753.753 0 0 0-.092.662l6.139 17.077c.098.288.37.48.675.48h2.726a.708.708 0 0 0 .675-.48l6.174-17.076a.699.699 0 0 0-.092-.663l.016.01.006-.004ZM83.004 19.262c.026-.272.041-.646.041-1.133 0-1.719-.386-3.3-1.144-4.705a8.804 8.804 0 0 0-3.16-3.357c-1.34-.82-2.865-1.242-4.51-1.242-1.746 0-3.334.428-4.716 1.274-1.382.845-2.469 2.035-3.242 3.53-.767 1.479-1.154 3.175-1.154 5.035 0 1.86.396 3.556 1.17 5.044.782 1.498 1.885 2.689 3.277 3.53 1.391.846 2.995 1.275 4.767 1.275 1.901 0 3.581-.388 4.995-1.166a9.396 9.396 0 0 0 3.423-3.216.739.739 0 0 0-.206-.992l-1.959-1.316c-.165-.109-.361-.15-.561-.109a.728.728 0 0 0-.46.33 5.63 5.63 0 0 1-2.04 2.026c-.84.48-1.934.726-3.259.726-1.581 0-2.789-.521-3.695-1.603a6.478 6.478 0 0 1-1.465-3.3h13.185c.37 0 .685-.282.716-.653v.016l-.003.006Zm-13.647-2.836a6.03 6.03 0 0 1 1.505-2.58c.872-.876 1.968-1.305 3.36-1.305 1.391 0 2.545.371 3.36 1.133.665.627 1.144 1.555 1.407 2.746H69.35l.01.01-.003-.004ZM100.347 12.054a6.516 6.516 0 0 0-2.69-2.423 8.235 8.235 0 0 0-3.598-.803c-1.391 0-2.633.339-3.705 1.002-.437.272-.84.595-1.201.96v-.653a.726.726 0 0 0-.726-.727h-2.469a.728.728 0 0 0-.726.727v17.076c0 .397.32.727.726.727h2.47a.728.728 0 0 0 .725-.727V18.67c0-1.927.396-3.473 1.176-4.58.732-1.044 1.829-1.556 3.334-1.556 2.586 0 3.788 1.38 3.788 4.35v10.329c0 .397.32.727.725.727h2.469a.728.728 0 0 0 .726-.727v-11.42c0-1.421-.336-2.68-.995-3.739h-.029ZM121.243.003h-2.459a.729.729 0 0 0-.726.73v10.082a7.873 7.873 0 0 0-1.54-1.069c-1.125-.601-2.387-.9-3.727-.9-1.744 0-3.331.43-4.717 1.272-1.381.845-2.469 2.026-3.239 3.514-.767 1.473-1.153 3.16-1.153 5.028 0 1.87.393 3.595 1.169 5.077.783 1.495 1.886 2.689 3.277 3.534 1.389.841 2.98 1.27 4.735 1.27 1.325 0 2.568-.304 3.68-.912a7.922 7.922 0 0 0 1.515-1.056v.653c0 .397.323.726.726.726h2.469a.728.728 0 0 0 .726-.726V.73c0-.397-.32-.73-.726-.73l-.01.003Zm-3.185 18.674c0 1.2-.231 2.285-.691 3.226-.453.934-1.062 1.639-1.87 2.15-.798.513-1.686.763-2.713.763-1.027 0-1.876-.247-2.659-.762-.792-.512-1.401-1.226-1.854-2.157-.463-.945-.691-2.036-.691-3.262s.231-2.273.691-3.198c.453-.925 1.062-1.622 1.854-2.141.78-.512 1.655-.762 2.659-.762 1.005 0 1.918.247 2.713.762.789.503 1.417 1.23 1.87 2.15.463.942.691 2.027.691 3.227v.007-.003ZM140.761 9.414h-2.469a.728.728 0 0 0-.726.726v8.533c0 1.927-.396 3.473-1.176 4.58-.732 1.044-1.829 1.556-3.334 1.556-2.583 0-3.788-1.38-3.788-4.35V10.13a.726.726 0 0 0-.726-.726h-2.469a.727.727 0 0 0-.725.726v11.42c0 1.422.336 2.68.995 3.74a6.494 6.494 0 0 0 2.691 2.422 8.263 8.263 0 0 0 3.597.804c1.391 0 2.634-.34 3.705-1.002.437-.272.84-.586 1.211-.96v.653c0 .396.32.726.726.726h2.469a.727.727 0 0 0 .725-.726V10.14a.726.726 0 0 0-.725-.726h.019ZM155.578 9.125a6.292 6.292 0 0 0-1.886-.288c-1.407 0-2.685.397-3.81 1.191-.485.34-.938.746-1.359 1.216v-1.091a.726.726 0 0 0-.726-.727h-2.469a.728.728 0 0 0-.726.727v17.076c0 .397.32.727.726.727h2.469a.728.728 0 0 0 .726-.727v-8.171c0-1.39.247-2.596.741-3.605.485-.982 1.129-1.738 1.911-2.25a4.46 4.46 0 0 1 2.511-.761c.5 0 .947.099 1.359.297.222.109.485.09.691-.042a.731.731 0 0 0 .336-.61V9.82a.718.718 0 0 0-.501-.685l.01-.01h-.003ZM173.399 19.262c.026-.272.042-.637.042-1.133 0-1.719-.387-3.306-1.135-4.705a8.802 8.802 0 0 0-3.16-3.358c-1.341-.819-2.865-1.232-4.51-1.232-1.746 0-3.334.429-4.716 1.274-1.382.845-2.469 2.036-3.242 3.53-.764 1.48-1.154 3.176-1.154 5.035 0 1.86.396 3.556 1.169 5.045.783 1.498 1.886 2.688 3.284 3.53 1.391.845 2.995 1.274 4.767 1.274 1.901 0 3.581-.387 4.995-1.165a9.396 9.396 0 0 0 3.423-3.217.739.739 0 0 0-.206-.992l-1.959-1.316c-.165-.108-.361-.15-.561-.108a.743.743 0 0 0-.459.33 5.592 5.592 0 0 1-2.051 2.025c-.84.48-1.933.727-3.258.727-1.582 0-2.789-.522-3.696-1.604a6.48 6.48 0 0 1-1.464-3.3h13.188a.717.717 0 0 0 .716-.653l-.009.01-.004.003Zm-13.647-2.836a6.039 6.039 0 0 1 1.505-2.58c.872-.877 1.969-1.305 3.36-1.305 1.391 0 2.542.37 3.36 1.133.665.627 1.144 1.555 1.407 2.746h-9.638l.009.01-.003-.004Z"
|
|
6
|
-
fill="currentColor"
|
|
7
|
-
/>
|
|
8
|
-
<path
|
|
9
|
-
fill-rule="evenodd"
|
|
10
|
-
clip-rule="evenodd"
|
|
11
|
-
d="M174.388 4.798a2.148 2.148 0 0 0-2.136 2.157c0 1.191.957 2.158 2.136 2.158a2.149 2.149 0 0 0 2.137-2.158c0-1.19-.958-2.157-2.137-2.157Zm-2.611 2.157c0-1.456 1.169-2.637 2.611-2.637 1.443 0 2.612 1.181 2.612 2.637 0 1.457-1.169 2.638-2.612 2.638-1.442 0-2.611-1.181-2.611-2.638Z"
|
|
12
|
-
fill="currentColor"
|
|
13
|
-
/>
|
|
14
|
-
<path
|
|
15
|
-
d="M174.242 6.738c.146 0 .254-.03.321-.087.063-.054.098-.147.098-.275 0-.128-.035-.218-.098-.272-.064-.055-.172-.08-.321-.08h-.301v.717h.301v-.003Zm-.297.496V8.29h-.714V5.499h1.088c.364 0 .63.06.798.186.171.121.254.316.254.585a.76.76 0 0 1-.13.455.766.766 0 0 1-.399.26.59.59 0 0 1 .263.153c.079.08.155.198.234.361l.39.791h-.758l-.339-.695c-.066-.137-.136-.236-.206-.284a.463.463 0 0 0-.279-.08h-.199l-.003.003ZM11.065 17.572v9.817a.5.5 0 0 0 .244.429l8.655 5.047a1 1 0 0 0 1.002 0l8.655-5.047a.497.497 0 0 0 .245-.429v-9.817a.49.49 0 0 0-.736-.429l-8.164 4.76a1 1 0 0 1-1.002 0l-8.164-4.76a.49.49 0 0 0-.736.43Z"
|
|
16
|
-
fill="currentColor"
|
|
17
|
-
/>
|
|
18
|
-
<path
|
|
19
|
-
d="M9.156 4.923.501 9.967c-.31.18-.501.516-.501.874v10.092a.5.5 0 0 0 .244.429l8.418 4.91a.49.49 0 0 0 .735-.429v-9.519c0-.362.19-.695.501-.874l8.165-4.76a.498.498 0 0 0 0-.857l-8.418-4.91a.482.482 0 0 0-.492 0h.003ZM31.773 4.913l8.656 5.045c.31.179.501.515.501.873v10.092a.5.5 0 0 1-.244.43l-8.418 4.91a.49.49 0 0 1-.735-.43v-9.519c0-.361-.19-.694-.501-.873l-8.165-4.76a.498.498 0 0 1 0-.858l8.418-4.91c.152-.09.34-.09.492 0h-.004Z"
|
|
20
|
-
fill="currentColor"
|
|
21
|
-
/>
|
|
22
|
-
</svg>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
1
|
+
export function LogoMark(props: React.ComponentProps<'svg'>) {
|
|
2
|
+
return (
|
|
3
|
+
<svg viewBox="0 0 177 33" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
4
|
+
<path
|
|
5
|
+
d="M65.192 9.73a.729.729 0 0 0-.593-.307h-2.503a.733.733 0 0 0-.685.487l-4.263 12.438-4.33-12.445a.721.721 0 0 0-.684-.486h-2.577a.73.73 0 0 0-.592.307.753.753 0 0 0-.092.662l6.139 17.077c.098.288.37.48.675.48h2.726a.708.708 0 0 0 .675-.48l6.174-17.076a.699.699 0 0 0-.092-.663l.016.01.006-.004ZM83.004 19.262c.026-.272.041-.646.041-1.133 0-1.719-.386-3.3-1.144-4.705a8.804 8.804 0 0 0-3.16-3.357c-1.34-.82-2.865-1.242-4.51-1.242-1.746 0-3.334.428-4.716 1.274-1.382.845-2.469 2.035-3.242 3.53-.767 1.479-1.154 3.175-1.154 5.035 0 1.86.396 3.556 1.17 5.044.782 1.498 1.885 2.689 3.277 3.53 1.391.846 2.995 1.275 4.767 1.275 1.901 0 3.581-.388 4.995-1.166a9.396 9.396 0 0 0 3.423-3.216.739.739 0 0 0-.206-.992l-1.959-1.316c-.165-.109-.361-.15-.561-.109a.728.728 0 0 0-.46.33 5.63 5.63 0 0 1-2.04 2.026c-.84.48-1.934.726-3.259.726-1.581 0-2.789-.521-3.695-1.603a6.478 6.478 0 0 1-1.465-3.3h13.185c.37 0 .685-.282.716-.653v.016l-.003.006Zm-13.647-2.836a6.03 6.03 0 0 1 1.505-2.58c.872-.876 1.968-1.305 3.36-1.305 1.391 0 2.545.371 3.36 1.133.665.627 1.144 1.555 1.407 2.746H69.35l.01.01-.003-.004ZM100.347 12.054a6.516 6.516 0 0 0-2.69-2.423 8.235 8.235 0 0 0-3.598-.803c-1.391 0-2.633.339-3.705 1.002-.437.272-.84.595-1.201.96v-.653a.726.726 0 0 0-.726-.727h-2.469a.728.728 0 0 0-.726.727v17.076c0 .397.32.727.726.727h2.47a.728.728 0 0 0 .725-.727V18.67c0-1.927.396-3.473 1.176-4.58.732-1.044 1.829-1.556 3.334-1.556 2.586 0 3.788 1.38 3.788 4.35v10.329c0 .397.32.727.725.727h2.469a.728.728 0 0 0 .726-.727v-11.42c0-1.421-.336-2.68-.995-3.739h-.029ZM121.243.003h-2.459a.729.729 0 0 0-.726.73v10.082a7.873 7.873 0 0 0-1.54-1.069c-1.125-.601-2.387-.9-3.727-.9-1.744 0-3.331.43-4.717 1.272-1.381.845-2.469 2.026-3.239 3.514-.767 1.473-1.153 3.16-1.153 5.028 0 1.87.393 3.595 1.169 5.077.783 1.495 1.886 2.689 3.277 3.534 1.389.841 2.98 1.27 4.735 1.27 1.325 0 2.568-.304 3.68-.912a7.922 7.922 0 0 0 1.515-1.056v.653c0 .397.323.726.726.726h2.469a.728.728 0 0 0 .726-.726V.73c0-.397-.32-.73-.726-.73l-.01.003Zm-3.185 18.674c0 1.2-.231 2.285-.691 3.226-.453.934-1.062 1.639-1.87 2.15-.798.513-1.686.763-2.713.763-1.027 0-1.876-.247-2.659-.762-.792-.512-1.401-1.226-1.854-2.157-.463-.945-.691-2.036-.691-3.262s.231-2.273.691-3.198c.453-.925 1.062-1.622 1.854-2.141.78-.512 1.655-.762 2.659-.762 1.005 0 1.918.247 2.713.762.789.503 1.417 1.23 1.87 2.15.463.942.691 2.027.691 3.227v.007-.003ZM140.761 9.414h-2.469a.728.728 0 0 0-.726.726v8.533c0 1.927-.396 3.473-1.176 4.58-.732 1.044-1.829 1.556-3.334 1.556-2.583 0-3.788-1.38-3.788-4.35V10.13a.726.726 0 0 0-.726-.726h-2.469a.727.727 0 0 0-.725.726v11.42c0 1.422.336 2.68.995 3.74a6.494 6.494 0 0 0 2.691 2.422 8.263 8.263 0 0 0 3.597.804c1.391 0 2.634-.34 3.705-1.002.437-.272.84-.586 1.211-.96v.653c0 .396.32.726.726.726h2.469a.727.727 0 0 0 .725-.726V10.14a.726.726 0 0 0-.725-.726h.019ZM155.578 9.125a6.292 6.292 0 0 0-1.886-.288c-1.407 0-2.685.397-3.81 1.191-.485.34-.938.746-1.359 1.216v-1.091a.726.726 0 0 0-.726-.727h-2.469a.728.728 0 0 0-.726.727v17.076c0 .397.32.727.726.727h2.469a.728.728 0 0 0 .726-.727v-8.171c0-1.39.247-2.596.741-3.605.485-.982 1.129-1.738 1.911-2.25a4.46 4.46 0 0 1 2.511-.761c.5 0 .947.099 1.359.297.222.109.485.09.691-.042a.731.731 0 0 0 .336-.61V9.82a.718.718 0 0 0-.501-.685l.01-.01h-.003ZM173.399 19.262c.026-.272.042-.637.042-1.133 0-1.719-.387-3.306-1.135-4.705a8.802 8.802 0 0 0-3.16-3.358c-1.341-.819-2.865-1.232-4.51-1.232-1.746 0-3.334.429-4.716 1.274-1.382.845-2.469 2.036-3.242 3.53-.764 1.48-1.154 3.176-1.154 5.035 0 1.86.396 3.556 1.169 5.045.783 1.498 1.886 2.688 3.284 3.53 1.391.845 2.995 1.274 4.767 1.274 1.901 0 3.581-.387 4.995-1.165a9.396 9.396 0 0 0 3.423-3.217.739.739 0 0 0-.206-.992l-1.959-1.316c-.165-.108-.361-.15-.561-.108a.743.743 0 0 0-.459.33 5.592 5.592 0 0 1-2.051 2.025c-.84.48-1.933.727-3.258.727-1.582 0-2.789-.522-3.696-1.604a6.48 6.48 0 0 1-1.464-3.3h13.188a.717.717 0 0 0 .716-.653l-.009.01-.004.003Zm-13.647-2.836a6.039 6.039 0 0 1 1.505-2.58c.872-.877 1.969-1.305 3.36-1.305 1.391 0 2.542.37 3.36 1.133.665.627 1.144 1.555 1.407 2.746h-9.638l.009.01-.003-.004Z"
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
/>
|
|
8
|
+
<path
|
|
9
|
+
fill-rule="evenodd"
|
|
10
|
+
clip-rule="evenodd"
|
|
11
|
+
d="M174.388 4.798a2.148 2.148 0 0 0-2.136 2.157c0 1.191.957 2.158 2.136 2.158a2.149 2.149 0 0 0 2.137-2.158c0-1.19-.958-2.157-2.137-2.157Zm-2.611 2.157c0-1.456 1.169-2.637 2.611-2.637 1.443 0 2.612 1.181 2.612 2.637 0 1.457-1.169 2.638-2.612 2.638-1.442 0-2.611-1.181-2.611-2.638Z"
|
|
12
|
+
fill="currentColor"
|
|
13
|
+
/>
|
|
14
|
+
<path
|
|
15
|
+
d="M174.242 6.738c.146 0 .254-.03.321-.087.063-.054.098-.147.098-.275 0-.128-.035-.218-.098-.272-.064-.055-.172-.08-.321-.08h-.301v.717h.301v-.003Zm-.297.496V8.29h-.714V5.499h1.088c.364 0 .63.06.798.186.171.121.254.316.254.585a.76.76 0 0 1-.13.455.766.766 0 0 1-.399.26.59.59 0 0 1 .263.153c.079.08.155.198.234.361l.39.791h-.758l-.339-.695c-.066-.137-.136-.236-.206-.284a.463.463 0 0 0-.279-.08h-.199l-.003.003ZM11.065 17.572v9.817a.5.5 0 0 0 .244.429l8.655 5.047a1 1 0 0 0 1.002 0l8.655-5.047a.497.497 0 0 0 .245-.429v-9.817a.49.49 0 0 0-.736-.429l-8.164 4.76a1 1 0 0 1-1.002 0l-8.164-4.76a.49.49 0 0 0-.736.43Z"
|
|
16
|
+
fill="currentColor"
|
|
17
|
+
/>
|
|
18
|
+
<path
|
|
19
|
+
d="M9.156 4.923.501 9.967c-.31.18-.501.516-.501.874v10.092a.5.5 0 0 0 .244.429l8.418 4.91a.49.49 0 0 0 .735-.429v-9.519c0-.362.19-.695.501-.874l8.165-4.76a.498.498 0 0 0 0-.857l-8.418-4.91a.482.482 0 0 0-.492 0h.003ZM31.773 4.913l8.656 5.045c.31.179.501.515.501.873v10.092a.5.5 0 0 1-.244.43l-8.418 4.91a.49.49 0 0 1-.735-.43v-9.519c0-.361-.19-.694-.501-.873l-8.165-4.76a.498.498 0 0 1 0-.858l8.418-4.91c.152-.09.34-.09.492 0h-.004Z"
|
|
20
|
+
fill="currentColor"
|
|
21
|
+
/>
|
|
22
|
+
</svg>
|
|
23
|
+
);
|
|
24
|
+
}
|