@vendure/dashboard 3.2.0 → 3.2.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.
Files changed (381) hide show
  1. package/LICENSE.md +42 -0
  2. package/README.md +12 -12
  3. package/index.html +15 -15
  4. package/lingui.config.js +12 -12
  5. package/package.json +11 -2
  6. package/src/app/app-providers.tsx +30 -30
  7. package/src/app/main.tsx +97 -97
  8. package/src/app/routes/__root.tsx +24 -24
  9. package/src/app/routes/_authenticated/_administrators/administrators.graphql.ts +79 -79
  10. package/src/app/routes/_authenticated/_administrators/administrators.tsx +86 -86
  11. package/src/app/routes/_authenticated/_administrators/administrators_.$id.tsx +155 -155
  12. package/src/app/routes/_authenticated/_administrators/components/role-permissions-display.tsx +133 -133
  13. package/src/app/routes/_authenticated/_assets/assets.tsx +19 -19
  14. package/src/app/routes/_authenticated/_channels/channels.graphql.ts +93 -93
  15. package/src/app/routes/_authenticated/_channels/channels.tsx +60 -60
  16. package/src/app/routes/_authenticated/_channels/channels_.$id.tsx +248 -248
  17. package/src/app/routes/_authenticated/_collections/collections.graphql.ts +133 -133
  18. package/src/app/routes/_authenticated/_collections/collections.tsx +195 -195
  19. package/src/app/routes/_authenticated/_collections/collections_.$id.tsx +224 -224
  20. package/src/app/routes/_authenticated/_collections/components/collection-contents-preview-table.tsx +127 -127
  21. package/src/app/routes/_authenticated/_collections/components/collection-contents-sheet.tsx +46 -46
  22. package/src/app/routes/_authenticated/_collections/components/collection-contents-table.tsx +82 -82
  23. package/src/app/routes/_authenticated/_collections/components/collection-filters-selector.tsx +91 -91
  24. package/src/app/routes/_authenticated/_countries/countries.graphql.ts +69 -69
  25. package/src/app/routes/_authenticated/_countries/countries.tsx +67 -67
  26. package/src/app/routes/_authenticated/_countries/countries_.$id.tsx +122 -122
  27. package/src/app/routes/_authenticated/_customer-groups/components/customer-group-members-sheet.tsx +44 -44
  28. package/src/app/routes/_authenticated/_customer-groups/components/customer-group-members-table.tsx +129 -129
  29. package/src/app/routes/_authenticated/_customer-groups/customer-groups.graphql.ts +71 -71
  30. package/src/app/routes/_authenticated/_customer-groups/customer-groups.tsx +68 -68
  31. package/src/app/routes/_authenticated/_customer-groups/customer-groups_.$id.tsx +111 -111
  32. package/src/app/routes/_authenticated/_customers/components/customer-address-card.tsx +155 -155
  33. package/src/app/routes/_authenticated/_customers/components/customer-address-form.tsx +344 -344
  34. package/src/app/routes/_authenticated/_customers/components/customer-group-controls.tsx +4 -4
  35. package/src/app/routes/_authenticated/_customers/components/customer-history/customer-history-container.tsx +78 -78
  36. package/src/app/routes/_authenticated/_customers/components/customer-history/customer-history.tsx +77 -77
  37. package/src/app/routes/_authenticated/_customers/components/customer-history/index.ts +3 -3
  38. package/src/app/routes/_authenticated/_customers/components/customer-history/use-customer-history.ts +169 -169
  39. package/src/app/routes/_authenticated/_customers/components/customer-order-table.tsx +88 -88
  40. package/src/app/routes/_authenticated/_customers/components/customer-status-badge.tsx +33 -33
  41. package/src/app/routes/_authenticated/_customers/customers.graphql.ts +204 -204
  42. package/src/app/routes/_authenticated/_customers/customers.tsx +82 -82
  43. package/src/app/routes/_authenticated/_customers/customers_.$id.tsx +274 -274
  44. package/src/app/routes/_authenticated/_facets/components/edit-facet-value.tsx +129 -129
  45. package/src/app/routes/_authenticated/_facets/components/facet-values-sheet.tsx +46 -46
  46. package/src/app/routes/_authenticated/_facets/components/facet-values-table.tsx +97 -97
  47. package/src/app/routes/_authenticated/_facets/facets.graphql.ts +104 -104
  48. package/src/app/routes/_authenticated/_facets/facets.tsx +97 -97
  49. package/src/app/routes/_authenticated/_facets/facets_.$id.tsx +139 -139
  50. package/src/app/routes/_authenticated/_global-settings/global-settings.graphql.ts +28 -28
  51. package/src/app/routes/_authenticated/_global-settings/global-settings.tsx +161 -161
  52. package/src/app/routes/_authenticated/_orders/components/order-address.tsx +58 -58
  53. package/src/app/routes/_authenticated/_orders/components/order-history/index.ts +3 -3
  54. package/src/app/routes/_authenticated/_orders/components/order-history/order-history-container.tsx +72 -72
  55. package/src/app/routes/_authenticated/_orders/components/order-history/order-history.tsx +96 -96
  56. package/src/app/routes/_authenticated/_orders/components/order-history/use-order-history.ts +171 -171
  57. package/src/app/routes/_authenticated/_orders/components/order-table.tsx +169 -169
  58. package/src/app/routes/_authenticated/_orders/components/order-tax-summary.tsx +38 -38
  59. package/src/app/routes/_authenticated/_orders/components/payment-details.tsx +61 -61
  60. package/src/app/routes/_authenticated/_orders/orders.graphql.ts +325 -325
  61. package/src/app/routes/_authenticated/_orders/orders.tsx +120 -120
  62. package/src/app/routes/_authenticated/_orders/orders_.$id.tsx +133 -133
  63. package/src/app/routes/_authenticated/_payment-methods/components/payment-eligibility-checker-selector.tsx +104 -104
  64. package/src/app/routes/_authenticated/_payment-methods/components/payment-handler-selector.tsx +100 -100
  65. package/src/app/routes/_authenticated/_payment-methods/payment-methods.graphql.ts +83 -83
  66. package/src/app/routes/_authenticated/_payment-methods/payment-methods.tsx +64 -64
  67. package/src/app/routes/_authenticated/_payment-methods/payment-methods_.$id.tsx +183 -183
  68. package/src/app/routes/_authenticated/_product-variants/components/variant-price-detail.tsx +87 -87
  69. package/src/app/routes/_authenticated/_product-variants/product-variants.graphql.ts +123 -123
  70. package/src/app/routes/_authenticated/_product-variants/product-variants.tsx +78 -78
  71. package/src/app/routes/_authenticated/_product-variants/product-variants_.$id.tsx +331 -331
  72. package/src/app/routes/_authenticated/_products/components/create-product-variants-dialog.tsx +228 -228
  73. package/src/app/routes/_authenticated/_products/components/create-product-variants.tsx +462 -462
  74. package/src/app/routes/_authenticated/_products/components/option-value-input.tsx +95 -95
  75. package/src/app/routes/_authenticated/_products/components/product-variants-table.tsx +87 -87
  76. package/src/app/routes/_authenticated/_products/products.graphql.ts +116 -116
  77. package/src/app/routes/_authenticated/_products/products.tsx +48 -48
  78. package/src/app/routes/_authenticated/_products/products_.$id.tsx +196 -196
  79. package/src/app/routes/_authenticated/_profile/profile.graphql.ts +23 -23
  80. package/src/app/routes/_authenticated/_profile/profile.tsx +122 -122
  81. package/src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx +107 -107
  82. package/src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx +107 -107
  83. package/src/app/routes/_authenticated/_promotions/promotions.graphql.ts +96 -96
  84. package/src/app/routes/_authenticated/_promotions/promotions.tsx +61 -61
  85. package/src/app/routes/_authenticated/_promotions/promotions_.$id.tsx +235 -235
  86. package/src/app/routes/_authenticated/_roles/components/expandable-permissions.tsx +54 -54
  87. package/src/app/routes/_authenticated/_roles/components/permissions-grid.tsx +116 -116
  88. package/src/app/routes/_authenticated/_roles/roles.graphql.ts +67 -67
  89. package/src/app/routes/_authenticated/_roles/roles.tsx +96 -96
  90. package/src/app/routes/_authenticated/_roles/roles_.$id.tsx +142 -142
  91. package/src/app/routes/_authenticated/_sellers/sellers.graphql.ts +61 -61
  92. package/src/app/routes/_authenticated/_sellers/sellers.tsx +51 -51
  93. package/src/app/routes/_authenticated/_sellers/sellers_.$id.tsx +111 -111
  94. package/src/app/routes/_authenticated/_shipping-methods/components/fulfillment-handler-selector.tsx +56 -56
  95. package/src/app/routes/_authenticated/_shipping-methods/components/shipping-calculator-selector.tsx +101 -101
  96. package/src/app/routes/_authenticated/_shipping-methods/components/shipping-eligibility-checker-selector.tsx +101 -101
  97. package/src/app/routes/_authenticated/_shipping-methods/components/test-shipping-method-dialog.tsx +32 -32
  98. package/src/app/routes/_authenticated/_shipping-methods/shipping-methods.graphql.ts +83 -83
  99. package/src/app/routes/_authenticated/_shipping-methods/shipping-methods.tsx +55 -55
  100. package/src/app/routes/_authenticated/_shipping-methods/shipping-methods_.$id.tsx +171 -171
  101. package/src/app/routes/_authenticated/_stock-locations/stock-locations.graphql.ts +62 -62
  102. package/src/app/routes/_authenticated/_stock-locations/stock-locations.tsx +48 -48
  103. package/src/app/routes/_authenticated/_stock-locations/stock-locations_.$id.tsx +115 -115
  104. package/src/app/routes/_authenticated/_system/components/payload-dialog.tsx +34 -34
  105. package/src/app/routes/_authenticated/_system/healthchecks.tsx +93 -93
  106. package/src/app/routes/_authenticated/_system/job-queue.graphql.ts +43 -43
  107. package/src/app/routes/_authenticated/_system/job-queue.tsx +161 -161
  108. package/src/app/routes/_authenticated/_tax-categories/tax-categories.graphql.ts +63 -63
  109. package/src/app/routes/_authenticated/_tax-categories/tax-categories.tsx +65 -65
  110. package/src/app/routes/_authenticated/_tax-categories/tax-categories_.$id.tsx +115 -115
  111. package/src/app/routes/_authenticated/_tax-rates/tax-rates.graphql.ts +75 -75
  112. package/src/app/routes/_authenticated/_tax-rates/tax-rates.tsx +108 -108
  113. package/src/app/routes/_authenticated/_tax-rates/tax-rates_.$id.tsx +148 -148
  114. package/src/app/routes/_authenticated/_zones/components/zone-countries-sheet.tsx +31 -31
  115. package/src/app/routes/_authenticated/_zones/components/zone-countries-table.tsx +79 -79
  116. package/src/app/routes/_authenticated/_zones/zones.graphql.ts +96 -96
  117. package/src/app/routes/_authenticated/_zones/zones.tsx +57 -57
  118. package/src/app/routes/_authenticated/_zones/zones_.$id.tsx +103 -103
  119. package/src/app/routes/_authenticated/index.tsx +194 -194
  120. package/src/app/routes/_authenticated.tsx +25 -25
  121. package/src/app/routes/login.tsx +48 -48
  122. package/src/app/styles.css +82 -82
  123. package/src/app/tailwindcss-animate.css +275 -275
  124. package/src/i18n/locales/de.po +1579 -1579
  125. package/src/i18n/locales/en.po +1579 -1579
  126. package/src/lib/components/data-display/boolean.tsx +23 -23
  127. package/src/lib/components/data-display/date-time.tsx +13 -13
  128. package/src/lib/components/data-display/json.tsx +5 -5
  129. package/src/lib/components/data-display/money.tsx +15 -15
  130. package/src/lib/components/data-input/affixed-input.tsx +49 -49
  131. package/src/lib/components/data-input/customer-group-input.tsx +72 -72
  132. package/src/lib/components/data-input/datetime-input.tsx +149 -149
  133. package/src/lib/components/data-input/facet-value-input.tsx +68 -68
  134. package/src/lib/components/data-input/money-input.tsx +112 -112
  135. package/src/lib/components/data-input/richt-text-input.tsx +99 -99
  136. package/src/lib/components/data-table/data-table-column-header.tsx +73 -73
  137. package/src/lib/components/data-table/data-table-faceted-filter.tsx +172 -172
  138. package/src/lib/components/data-table/data-table-filter-dialog.tsx +73 -73
  139. package/src/lib/components/data-table/data-table-pagination.tsx +87 -87
  140. package/src/lib/components/data-table/data-table-view-options.tsx +53 -53
  141. package/src/lib/components/data-table/data-table.tsx +218 -218
  142. package/src/lib/components/layout/app-layout.tsx +42 -42
  143. package/src/lib/components/layout/app-sidebar.tsx +34 -34
  144. package/src/lib/components/layout/channel-switcher.tsx +87 -87
  145. package/src/lib/components/layout/content-language-selector.tsx +41 -41
  146. package/src/lib/components/layout/generated-breadcrumbs.tsx +82 -82
  147. package/src/lib/components/layout/language-dialog.tsx +104 -104
  148. package/src/lib/components/layout/nav-main.tsx +178 -178
  149. package/src/lib/components/layout/nav-projects.tsx +81 -81
  150. package/src/lib/components/layout/nav-user.tsx +176 -176
  151. package/src/lib/components/layout/prerelease-popup.tsx +38 -38
  152. package/src/lib/components/login/login-form.tsx +173 -173
  153. package/src/lib/components/shared/alerts.tsx +20 -20
  154. package/src/lib/components/shared/animated-number.tsx +49 -49
  155. package/src/lib/components/shared/asset-gallery.tsx +433 -433
  156. package/src/lib/components/shared/asset-picker-dialog.tsx +71 -71
  157. package/src/lib/components/shared/asset-preview-dialog.tsx +48 -48
  158. package/src/lib/components/shared/asset-preview.tsx +345 -345
  159. package/src/lib/components/shared/assigned-facet-values.tsx +68 -68
  160. package/src/lib/components/shared/channel-code-label.tsx +7 -7
  161. package/src/lib/components/shared/channel-selector.tsx +51 -51
  162. package/src/lib/components/shared/configurable-operation-arg-input.tsx +51 -51
  163. package/src/lib/components/shared/configurable-operation-input.tsx +133 -133
  164. package/src/lib/components/shared/confirmation-dialog.tsx +58 -58
  165. package/src/lib/components/shared/copyable-text.tsx +31 -31
  166. package/src/lib/components/shared/country-selector.tsx +105 -105
  167. package/src/lib/components/shared/currency-selector.tsx +33 -33
  168. package/src/lib/components/shared/custom-fields-form.tsx +86 -86
  169. package/src/lib/components/shared/customer-address-form.tsx +330 -330
  170. package/src/lib/components/shared/customer-group-chip.tsx +30 -30
  171. package/src/lib/components/shared/customer-group-selector.tsx +62 -62
  172. package/src/lib/components/shared/customer-selector.tsx +107 -107
  173. package/src/lib/components/shared/detail-page-button.tsx +22 -22
  174. package/src/lib/components/shared/entity-assets.tsx +340 -340
  175. package/src/lib/components/shared/error-page.tsx +31 -31
  176. package/src/lib/components/shared/facet-value-chip.tsx +44 -44
  177. package/src/lib/components/shared/facet-value-selector.tsx +306 -306
  178. package/src/lib/components/shared/focal-point-control.tsx +64 -64
  179. package/src/lib/components/shared/form-field-wrapper.tsx +37 -37
  180. package/src/lib/components/shared/history-timeline/history-entry.tsx +112 -112
  181. package/src/lib/components/shared/history-timeline/history-note-checkbox.tsx +28 -28
  182. package/src/lib/components/shared/history-timeline/history-note-editor.tsx +60 -60
  183. package/src/lib/components/shared/history-timeline/history-note-input.tsx +39 -39
  184. package/src/lib/components/shared/history-timeline/history-timeline.tsx +56 -56
  185. package/src/lib/components/shared/icon-mark.tsx +18 -18
  186. package/src/lib/components/shared/language-selector.tsx +48 -48
  187. package/src/lib/components/shared/logo-mark.tsx +24 -24
  188. package/src/lib/components/shared/multi-select.tsx +159 -159
  189. package/src/lib/components/shared/option-value-input.tsx +94 -94
  190. package/src/lib/components/shared/paginated-list-data-table.tsx +520 -520
  191. package/src/lib/components/shared/permission-guard.tsx +20 -20
  192. package/src/lib/components/shared/role-code-label.tsx +8 -8
  193. package/src/lib/components/shared/role-selector.tsx +56 -56
  194. package/src/lib/components/shared/seller-selector.tsx +107 -107
  195. package/src/lib/components/shared/tax-category-selector.tsx +65 -65
  196. package/src/lib/components/shared/translatable-form-field.tsx +74 -74
  197. package/src/lib/components/shared/vendure-image.tsx +159 -159
  198. package/src/lib/components/shared/zone-selector.tsx +66 -66
  199. package/src/lib/components/ui/accordion.tsx +59 -59
  200. package/src/lib/components/ui/alert-dialog.tsx +128 -128
  201. package/src/lib/components/ui/alert.tsx +60 -60
  202. package/src/lib/components/ui/avatar.tsx +38 -38
  203. package/src/lib/components/ui/badge.tsx +38 -38
  204. package/src/lib/components/ui/breadcrumb.tsx +102 -102
  205. package/src/lib/components/ui/button.tsx +51 -51
  206. package/src/lib/components/ui/calendar.tsx +69 -69
  207. package/src/lib/components/ui/card.tsx +47 -47
  208. package/src/lib/components/ui/checkbox.tsx +27 -27
  209. package/src/lib/components/ui/collapsible.tsx +33 -33
  210. package/src/lib/components/ui/command.tsx +133 -133
  211. package/src/lib/components/ui/dialog.tsx +116 -116
  212. package/src/lib/components/ui/dropdown-menu.tsx +220 -220
  213. package/src/lib/components/ui/form.tsx +141 -141
  214. package/src/lib/components/ui/hover-card.tsx +36 -36
  215. package/src/lib/components/ui/input.tsx +19 -19
  216. package/src/lib/components/ui/label.tsx +21 -21
  217. package/src/lib/components/ui/pagination.tsx +127 -127
  218. package/src/lib/components/ui/popover.tsx +40 -40
  219. package/src/lib/components/ui/scroll-area.tsx +50 -50
  220. package/src/lib/components/ui/select.tsx +161 -161
  221. package/src/lib/components/ui/separator.tsx +26 -26
  222. package/src/lib/components/ui/sheet.tsx +118 -118
  223. package/src/lib/components/ui/sidebar.tsx +696 -696
  224. package/src/lib/components/ui/skeleton.tsx +13 -13
  225. package/src/lib/components/ui/sonner.tsx +27 -27
  226. package/src/lib/components/ui/switch.tsx +26 -26
  227. package/src/lib/components/ui/table.tsx +82 -82
  228. package/src/lib/components/ui/tabs.tsx +48 -48
  229. package/src/lib/components/ui/textarea.tsx +18 -18
  230. package/src/lib/components/ui/tooltip.tsx +51 -51
  231. package/src/lib/constants.ts +326 -326
  232. package/src/lib/framework/component-registry/component-registry.tsx +70 -70
  233. package/src/lib/framework/component-registry/dynamic-component.tsx +58 -58
  234. package/src/lib/framework/dashboard-widget/base-widget.tsx +97 -97
  235. package/src/lib/framework/dashboard-widget/latest-orders-widget/index.tsx +96 -96
  236. package/src/lib/framework/dashboard-widget/latest-orders-widget/latest-orders-widget.graphql.ts +35 -35
  237. package/src/lib/framework/dashboard-widget/metrics-widget/chart.tsx +24 -24
  238. package/src/lib/framework/dashboard-widget/metrics-widget/index.tsx +82 -82
  239. package/src/lib/framework/dashboard-widget/metrics-widget/metrics-widget.graphql.ts +14 -14
  240. package/src/lib/framework/dashboard-widget/orders-summary/index.tsx +167 -167
  241. package/src/lib/framework/dashboard-widget/orders-summary/order-summary-widget.graphql.ts +14 -14
  242. package/src/lib/framework/dashboard-widget/types.ts +22 -22
  243. package/src/lib/framework/dashboard-widget/widget-extensions.tsx +19 -19
  244. package/src/lib/framework/defaults.ts +219 -219
  245. package/src/lib/framework/document-introspection/add-custom-fields.spec.ts +242 -242
  246. package/src/lib/framework/document-introspection/add-custom-fields.ts +246 -246
  247. package/src/lib/framework/document-introspection/get-document-structure.spec.ts +310 -310
  248. package/src/lib/framework/document-introspection/get-document-structure.ts +460 -460
  249. package/src/lib/framework/document-introspection/hooks.ts +10 -10
  250. package/src/lib/framework/extension-api/define-dashboard-extension.ts +66 -66
  251. package/src/lib/framework/extension-api/extension-api-types.ts +58 -58
  252. package/src/lib/framework/extension-api/use-dashboard-extensions.ts +26 -26
  253. package/src/lib/framework/form-engine/form-schema-tools.ts +98 -98
  254. package/src/lib/framework/form-engine/use-generated-form.tsx +116 -116
  255. package/src/lib/framework/layout-engine/layout-extensions.ts +30 -30
  256. package/src/lib/framework/layout-engine/location-wrapper.tsx +96 -96
  257. package/src/lib/framework/layout-engine/page-layout.tsx +272 -272
  258. package/src/lib/framework/nav-menu/nav-menu-extensions.ts +66 -66
  259. package/src/lib/framework/page/detail-page-route-loader.tsx +48 -48
  260. package/src/lib/framework/page/detail-page.tsx +131 -131
  261. package/src/lib/framework/page/list-page.tsx +166 -166
  262. package/src/lib/framework/page/page-api.ts +9 -9
  263. package/src/lib/framework/page/page-types.ts +51 -51
  264. package/src/lib/framework/page/use-detail-page.ts +217 -217
  265. package/src/lib/framework/page/use-extended-router.tsx +69 -69
  266. package/src/lib/framework/registry/global-registry.ts +46 -46
  267. package/src/lib/framework/registry/registry-types.ts +15 -15
  268. package/src/lib/graphql/api.ts +61 -61
  269. package/src/lib/graphql/fragments.tsx +54 -54
  270. package/src/lib/graphql/graphql-env.d.ts +499 -499
  271. package/src/lib/graphql/graphql.ts +15 -15
  272. package/src/lib/hooks/use-auth.tsx +11 -11
  273. package/src/lib/hooks/use-channel.ts +12 -12
  274. package/src/lib/hooks/use-custom-field-config.ts +10 -10
  275. package/src/lib/hooks/use-grouped-permissions.ts +54 -54
  276. package/src/lib/hooks/use-local-format.ts +119 -119
  277. package/src/lib/hooks/use-mobile.ts +19 -19
  278. package/src/lib/hooks/use-page.tsx +10 -10
  279. package/src/lib/hooks/use-permissions.ts +22 -22
  280. package/src/lib/hooks/use-server-config.ts +4 -4
  281. package/src/lib/hooks/use-theme.ts +10 -10
  282. package/src/lib/hooks/use-user-settings.tsx +12 -12
  283. package/src/lib/index.ts +149 -149
  284. package/src/lib/lib/trans.tsx +16 -16
  285. package/src/lib/lib/utils.ts +60 -60
  286. package/src/lib/providers/auth.tsx +152 -152
  287. package/src/lib/providers/channel-provider.tsx +121 -121
  288. package/src/lib/providers/i18n-provider.tsx +28 -28
  289. package/src/lib/providers/server-config.tsx +279 -279
  290. package/src/lib/providers/theme-provider.tsx +54 -54
  291. package/src/lib/providers/user-settings.tsx +89 -89
  292. package/src/lib/virtual.d.ts +12 -12
  293. package/vite/config-loader.ts +181 -181
  294. package/vite/constants.ts +280 -280
  295. package/vite/index.ts +1 -1
  296. package/vite/schema-generator.ts +40 -40
  297. package/vite/ui-config.ts +60 -60
  298. package/vite/vite-plugin-admin-api-schema.ts +141 -141
  299. package/vite/vite-plugin-config-loader.ts +64 -64
  300. package/vite/vite-plugin-config.ts +42 -42
  301. package/vite/vite-plugin-dashboard-metadata.ts +58 -58
  302. package/vite/vite-plugin-gql-tada.ts +62 -62
  303. package/vite/vite-plugin-theme.ts +195 -195
  304. package/vite/vite-plugin-ui-config.ts +60 -60
  305. package/vite/vite-plugin-vendure-dashboard.ts +118 -118
  306. package/dist/plugin/.vendure-dashboard-temp/dev-config.js +0 -227
  307. package/dist/plugin/.vendure-dashboard-temp/dev-config.js.map +0 -1
  308. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/api/api-extensions.js +0 -33
  309. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/api/api-extensions.js.map +0 -1
  310. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/api/mv.resolver.js +0 -69
  311. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/api/mv.resolver.js.map +0 -1
  312. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-order-process.js +0 -110
  313. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-order-process.js.map +0 -1
  314. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-order-seller-strategy.js +0 -134
  315. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-order-seller-strategy.js.map +0 -1
  316. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-payment-handler.js +0 -86
  317. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-payment-handler.js.map +0 -1
  318. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-shipping-eligibility-checker.js +0 -49
  319. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-shipping-eligibility-checker.js.map +0 -1
  320. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-shipping-line-assignment-strategy.js +0 -57
  321. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/config/mv-shipping-line-assignment-strategy.js.map +0 -1
  322. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/constants.js +0 -20
  323. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/constants.js.map +0 -1
  324. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/multivendor.plugin.js +0 -151
  325. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/multivendor.plugin.js.map +0 -1
  326. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/payment/mv-connect-sdk.js +0 -47
  327. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/payment/mv-connect-sdk.js.map +0 -1
  328. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/service/mv.service.js +0 -222
  329. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/service/mv.service.js.map +0 -1
  330. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/types.js +0 -4
  331. package/dist/plugin/.vendure-dashboard-temp/example-plugins/multivendor-plugin/types.js.map +0 -1
  332. package/dist/plugin/.vendure-dashboard-temp/package.json +0 -3
  333. package/dist/plugin/.vendure-dashboard-temp/schema.graphql +0 -6378
  334. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/api-extensions.js +0 -103
  335. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/api-extensions.js.map +0 -1
  336. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-entity.resolver.js +0 -105
  337. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-entity.resolver.js.map +0 -1
  338. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-review-admin.resolver.js +0 -183
  339. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-review-admin.resolver.js.map +0 -1
  340. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-review-entity.resolver.js +0 -113
  341. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-review-entity.resolver.js.map +0 -1
  342. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-review-shop.resolver.js +0 -112
  343. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/api/product-review-shop.resolver.js.map +0 -1
  344. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/entities/product-review.entity.js +0 -111
  345. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/entities/product-review.entity.js.map +0 -1
  346. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/generated-admin-types.js +0 -616
  347. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/generated-admin-types.js.map +0 -1
  348. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/generated-shop-types.js +0 -563
  349. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/generated-shop-types.js.map +0 -1
  350. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/reviews-plugin.js +0 -135
  351. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/reviews-plugin.js.map +0 -1
  352. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/types.js +0 -4
  353. package/dist/plugin/.vendure-dashboard-temp/test-plugins/reviews/types.js.map +0 -1
  354. package/dist/plugin/.vendure-dashboard-temp/tsconfig.json +0 -10
  355. package/dist/plugin/config-loader.d.ts +0 -27
  356. package/dist/plugin/config-loader.js +0 -141
  357. package/dist/plugin/constants.d.ts +0 -5
  358. package/dist/plugin/constants.js +0 -277
  359. package/dist/plugin/index.d.ts +0 -1
  360. package/dist/plugin/index.js +0 -1
  361. package/dist/plugin/schema-generator.d.ts +0 -5
  362. package/dist/plugin/schema-generator.js +0 -24
  363. package/dist/plugin/ui-config.d.ts +0 -3
  364. package/dist/plugin/ui-config.js +0 -35
  365. package/dist/plugin/vite-plugin-admin-api-schema.d.ts +0 -24
  366. package/dist/plugin/vite-plugin-admin-api-schema.js +0 -82
  367. package/dist/plugin/vite-plugin-config-loader.d.ts +0 -17
  368. package/dist/plugin/vite-plugin-config-loader.js +0 -56
  369. package/dist/plugin/vite-plugin-config.d.ts +0 -4
  370. package/dist/plugin/vite-plugin-config.js +0 -38
  371. package/dist/plugin/vite-plugin-dashboard-metadata.d.ts +0 -9
  372. package/dist/plugin/vite-plugin-dashboard-metadata.js +0 -52
  373. package/dist/plugin/vite-plugin-gql-tada.d.ts +0 -6
  374. package/dist/plugin/vite-plugin-gql-tada.js +0 -51
  375. package/dist/plugin/vite-plugin-set-root.d.ts +0 -4
  376. package/dist/plugin/vite-plugin-set-root.js +0 -15
  377. package/dist/plugin/vite-plugin-ui-config.d.ts +0 -15
  378. package/dist/plugin/vite-plugin-ui-config.js +0 -43
  379. package/dist/plugin/vite-plugin-vendure-dashboard.d.ts +0 -35
  380. package/dist/plugin/vite-plugin-vendure-dashboard.js +0 -81
  381. package/src/app/routeTree.gen.ts +0 -1372
@@ -1,69 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "MultivendorResolver", {
6
- enumerable: true,
7
- get: function() {
8
- return MultivendorResolver;
9
- }
10
- });
11
- const _graphql = require("@nestjs/graphql");
12
- const _core = require("@vendure/core");
13
- const _mvservice = require("../service/mv.service");
14
- function _define_property(obj, key, value) {
15
- if (key in obj) {
16
- Object.defineProperty(obj, key, {
17
- value: value,
18
- enumerable: true,
19
- configurable: true,
20
- writable: true
21
- });
22
- } else {
23
- obj[key] = value;
24
- }
25
- return obj;
26
- }
27
- function _ts_decorate(decorators, target, key, desc) {
28
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
29
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
30
- else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
31
- return c > 3 && r && Object.defineProperty(target, key, r), r;
32
- }
33
- function _ts_metadata(k, v) {
34
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
35
- }
36
- function _ts_param(paramIndex, decorator) {
37
- return function(target, key) {
38
- decorator(target, key, paramIndex);
39
- };
40
- }
41
- class MultivendorResolver {
42
- registerNewSeller(ctx, args) {
43
- return this.multivendorService.registerNewSeller(ctx, args.input);
44
- }
45
- constructor(multivendorService){
46
- _define_property(this, "multivendorService", void 0);
47
- this.multivendorService = multivendorService;
48
- }
49
- }
50
- _ts_decorate([
51
- (0, _graphql.Mutation)(),
52
- (0, _core.Transaction)(),
53
- (0, _core.Allow)(_core.Permission.Public),
54
- _ts_param(0, (0, _core.Ctx)()),
55
- _ts_param(1, (0, _graphql.Args)()),
56
- _ts_metadata("design:type", Function),
57
- _ts_metadata("design:paramtypes", [
58
- typeof _core.RequestContext === "undefined" ? Object : _core.RequestContext,
59
- Object
60
- ]),
61
- _ts_metadata("design:returntype", void 0)
62
- ], MultivendorResolver.prototype, "registerNewSeller", null);
63
- MultivendorResolver = _ts_decorate([
64
- (0, _graphql.Resolver)(),
65
- _ts_metadata("design:type", Function),
66
- _ts_metadata("design:paramtypes", [
67
- typeof _mvservice.MultivendorService === "undefined" ? Object : _mvservice.MultivendorService
68
- ])
69
- ], MultivendorResolver);
@@ -1 +0,0 @@
1
- "{\"version\":3,\"sources\":[\"C:\\\\Development\\\\vendure\\\\vendure\\\\packages\\\\dev-server\\\\example-plugins\\\\multivendor-plugin\\\\api\\\\mv.resolver.ts\"],\"sourcesContent\":[\"import { Args, Mutation, Resolver } from '@nestjs/graphql';\\r\\nimport { Allow, Ctx, Permission, RequestContext, Transaction } from '@vendure/core';\\r\\n\\r\\nimport { MultivendorService } from '../service/mv.service';\\r\\nimport { CreateSellerInput } from '../types';\\r\\n\\r\\n@Resolver()\\r\\nexport class MultivendorResolver {\\r\\n constructor(private multivendorService: MultivendorService) {}\\r\\n\\r\\n @Mutation()\\r\\n @Transaction()\\r\\n @Allow(Permission.Public)\\r\\n registerNewSeller(\\r\\n @Ctx() ctx: RequestContext,\\r\\n @Args() args: { input: { shopName: string; seller: CreateSellerInput } },\\r\\n ) {\\r\\n return this.multivendorService.registerNewSeller(ctx, args.input);\\r\\n }\\r\\n}\\r\\n\"],\"names\":[\"MultivendorResolver\",\"registerNewSeller\",\"ctx\",\"args\",\"multivendorService\",\"input\",\"constructor\",\"Public\"],\"mappings\":\";;;;+BAOaA;;;eAAAA;;;yBAP4B;sBAC2B;2BAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAI5B,MAAMA;IAMTC,kBACI,AAAOC,GAAmB,EAC1B,AAAQC,IAAgE,EAC1E;QACE,OAAO,IAAI,CAACC,kBAAkB,CAACH,iBAAiB,CAACC,KAAKC,KAAKE,KAAK;IACpE;IAVAC,YAAY,AAAQF,kBAAsC,CAAE;;aAAxCA,qBAAAA;IAAyC;AAWjE;;;;sCAPsBG\"}"
@@ -1,110 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "multivendorOrderProcess", {
6
- enumerable: true,
7
- get: function() {
8
- return multivendorOrderProcess;
9
- }
10
- });
11
- const _generatedtypes = require("@vendure/common/lib/generated-types");
12
- const _core = require("@vendure/core");
13
- let connection;
14
- let orderService;
15
- let channelService;
16
- let requestContextService;
17
- const multivendorOrderProcess = {
18
- init (injector) {
19
- connection = injector.get(_core.TransactionalConnection);
20
- orderService = injector.get(_core.OrderService);
21
- channelService = injector.get(_core.ChannelService);
22
- requestContextService = injector.get(_core.RequestContextService);
23
- },
24
- async onTransitionStart (fromState, toState, data) {
25
- const { ctx, order } = data;
26
- if (fromState === 'AddingItems' && toState === 'ArrangingPayment') {
27
- for (const line of data.order.lines){
28
- if (!line.shippingLineId) {
29
- return 'not all lines have shipping';
30
- }
31
- }
32
- }
33
- // Aggregate orders are allowed to transition to these states without validating
34
- // fulfillments, since aggregate orders do not have fulfillments, but will get
35
- // transitioned based on the status of the sellerOrders' fulfillments.
36
- if (order.type !== _generatedtypes.OrderType.Aggregate) {
37
- if (toState === 'PartiallyShipped') {
38
- const orderWithFulfillments = await findOrderWithFulfillments(ctx, order.id);
39
- if (!(0, _core.orderItemsArePartiallyShipped)(orderWithFulfillments)) {
40
- return `message.cannot-transition-unless-some-order-items-shipped`;
41
- }
42
- }
43
- if (toState === 'Shipped') {
44
- const orderWithFulfillments = await findOrderWithFulfillments(ctx, order.id);
45
- if (!(0, _core.orderItemsAreShipped)(orderWithFulfillments)) {
46
- return `message.cannot-transition-unless-all-order-items-shipped`;
47
- }
48
- }
49
- if (toState === 'PartiallyDelivered') {
50
- const orderWithFulfillments = await findOrderWithFulfillments(ctx, order.id);
51
- if (!(0, _core.orderItemsArePartiallyDelivered)(orderWithFulfillments)) {
52
- return `message.cannot-transition-unless-some-order-items-delivered`;
53
- }
54
- }
55
- if (toState === 'Delivered') {
56
- const orderWithFulfillments = await findOrderWithFulfillments(ctx, order.id);
57
- if (!(0, _core.orderItemsAreDelivered)(orderWithFulfillments)) {
58
- return `message.cannot-transition-unless-all-order-items-delivered`;
59
- }
60
- }
61
- }
62
- },
63
- async onTransitionEnd (fromState, toState, data) {
64
- const { ctx, order } = data;
65
- if (order.type === _generatedtypes.OrderType.Seller) {
66
- const aggregateOrder = await orderService.getAggregateOrder(ctx, order);
67
- if (aggregateOrder) {
68
- // Create a new RequestContext on the default Channel, since the current
69
- // RequestContext may be scoped to the Seller channel, and will not be able to
70
- // update the AggregateOrder.
71
- const defaultChannel = await channelService.getDefaultChannel();
72
- const defaultChannelCtx = await requestContextService.create({
73
- apiType: 'admin',
74
- channelOrToken: defaultChannel,
75
- req: ctx.req,
76
- languageCode: ctx.languageCode,
77
- user: ctx.activeUserId ? new _core.User({
78
- id: ctx.activeUserId
79
- }) : undefined
80
- });
81
- // This part is responsible for automatically updating the state of the aggregate Order
82
- // based on the fulfillment state of all the associated seller Orders.
83
- const otherSellerOrders = (await orderService.getSellerOrders(ctx, aggregateOrder)).filter((so)=>!(0, _core.idsAreEqual)(so.id, order.id));
84
- const sellerOrderStates = [
85
- ...otherSellerOrders.map((so)=>so.state),
86
- toState
87
- ];
88
- if (sellerOrderStates.every((state)=>state === 'Shipped')) {
89
- await orderService.transitionToState(defaultChannelCtx, aggregateOrder.id, 'Shipped');
90
- } else if (sellerOrderStates.every((state)=>state === 'Delivered')) {
91
- await orderService.transitionToState(defaultChannelCtx, aggregateOrder.id, 'Delivered');
92
- } else if (sellerOrderStates.some((state)=>state === 'Delivered')) {
93
- await orderService.transitionToState(defaultChannelCtx, aggregateOrder.id, 'PartiallyDelivered');
94
- } else if (sellerOrderStates.some((state)=>state === 'Shipped')) {
95
- await orderService.transitionToState(defaultChannelCtx, aggregateOrder.id, 'PartiallyShipped');
96
- }
97
- }
98
- }
99
- }
100
- };
101
- async function findOrderWithFulfillments(ctx, id) {
102
- return await connection.getEntityOrThrow(ctx, _core.Order, id, {
103
- relations: [
104
- 'lines',
105
- 'fulfillments',
106
- 'fulfillments.lines',
107
- 'fulfillments.lines.fulfillment'
108
- ]
109
- });
110
- }
@@ -1 +0,0 @@
1
- "{\"version\":3,\"sources\":[\"C:\\\\Development\\\\vendure\\\\vendure\\\\packages\\\\dev-server\\\\example-plugins\\\\multivendor-plugin\\\\config\\\\mv-order-process.ts\"],\"sourcesContent\":[\"import { OrderType } from '@vendure/common/lib/generated-types';\\nimport { ID } from '@vendure/common/lib/shared-types';\\nimport {\\n ChannelService,\\n CustomOrderProcess,\\n idsAreEqual,\\n Order,\\n orderItemsAreDelivered,\\n orderItemsArePartiallyDelivered,\\n orderItemsArePartiallyShipped,\\n orderItemsAreShipped,\\n OrderService,\\n RequestContext,\\n RequestContextService,\\n TransactionalConnection,\\n User,\\n} from '@vendure/core';\\n\\nlet connection: TransactionalConnection;\\nlet orderService: OrderService;\\nlet channelService: ChannelService;\\nlet requestContextService: RequestContextService;\\n\\nexport const multivendorOrderProcess: CustomOrderProcess<any> = {\\n init(injector) {\\n connection = injector.get(TransactionalConnection);\\n orderService = injector.get(OrderService);\\n channelService = injector.get(ChannelService);\\n requestContextService = injector.get(RequestContextService);\\n },\\n\\n async onTransitionStart(fromState, toState, data) {\\n const { ctx, order } = data;\\n if (fromState === 'AddingItems' && toState === 'ArrangingPayment') {\\n for (const line of data.order.lines) {\\n if (!line.shippingLineId) {\\n return 'not all lines have shipping';\\n }\\n }\\n }\\n\\n // Aggregate orders are allowed to transition to these states without validating\\n // fulfillments, since aggregate orders do not have fulfillments, but will get\\n // transitioned based on the status of the sellerOrders' fulfillments.\\n if (order.type !== OrderType.Aggregate) {\\n if (toState === 'PartiallyShipped') {\\n const orderWithFulfillments = await findOrderWithFulfillments(ctx, order.id);\\n if (!orderItemsArePartiallyShipped(orderWithFulfillments)) {\\n return `message.cannot-transition-unless-some-order-items-shipped`;\\n }\\n }\\n if (toState === 'Shipped') {\\n const orderWithFulfillments = await findOrderWithFulfillments(ctx, order.id);\\n if (!orderItemsAreShipped(orderWithFulfillments)) {\\n return `message.cannot-transition-unless-all-order-items-shipped`;\\n }\\n }\\n if (toState === 'PartiallyDelivered') {\\n const orderWithFulfillments = await findOrderWithFulfillments(ctx, order.id);\\n if (!orderItemsArePartiallyDelivered(orderWithFulfillments)) {\\n return `message.cannot-transition-unless-some-order-items-delivered`;\\n }\\n }\\n if (toState === 'Delivered') {\\n const orderWithFulfillments = await findOrderWithFulfillments(ctx, order.id);\\n if (!orderItemsAreDelivered(orderWithFulfillments)) {\\n return `message.cannot-transition-unless-all-order-items-delivered`;\\n }\\n }\\n }\\n },\\n async onTransitionEnd(fromState, toState, data) {\\n const { ctx, order } = data;\\n if (order.type === OrderType.Seller) {\\n const aggregateOrder = await orderService.getAggregateOrder(ctx, order);\\n if (aggregateOrder) {\\n // Create a new RequestContext on the default Channel, since the current\\n // RequestContext may be scoped to the Seller channel, and will not be able to\\n // update the AggregateOrder.\\n const defaultChannel = await channelService.getDefaultChannel();\\n const defaultChannelCtx = await requestContextService.create({\\n apiType: 'admin',\\n channelOrToken: defaultChannel,\\n req: ctx.req,\\n languageCode: ctx.languageCode,\\n user: ctx.activeUserId ? new User({ id: ctx.activeUserId }) : undefined,\\n });\\n\\n // This part is responsible for automatically updating the state of the aggregate Order\\n // based on the fulfillment state of all the associated seller Orders.\\n const otherSellerOrders = (await orderService.getSellerOrders(ctx, aggregateOrder)).filter(\\n so => !idsAreEqual(so.id, order.id),\\n );\\n\\n const sellerOrderStates = [...otherSellerOrders.map(so => so.state), toState];\\n if (sellerOrderStates.every(state => state === 'Shipped')) {\\n await orderService.transitionToState(defaultChannelCtx, aggregateOrder.id, 'Shipped');\\n } else if (sellerOrderStates.every(state => state === 'Delivered')) {\\n await orderService.transitionToState(defaultChannelCtx, aggregateOrder.id, 'Delivered');\\n } else if (sellerOrderStates.some(state => state === 'Delivered')) {\\n await orderService.transitionToState(\\n defaultChannelCtx,\\n aggregateOrder.id,\\n 'PartiallyDelivered',\\n );\\n } else if (sellerOrderStates.some(state => state === 'Shipped')) {\\n await orderService.transitionToState(\\n defaultChannelCtx,\\n aggregateOrder.id,\\n 'PartiallyShipped',\\n );\\n }\\n }\\n }\\n },\\n};\\n\\nasync function findOrderWithFulfillments(ctx: RequestContext, id: ID): Promise<Order> {\\n return await connection.getEntityOrThrow(ctx, Order, id, {\\n relations: ['lines', 'fulfillments', 'fulfillments.lines', 'fulfillments.lines.fulfillment'],\\n });\\n}\\n\"],\"names\":[\"multivendorOrderProcess\",\"connection\",\"orderService\",\"channelService\",\"requestContextService\",\"init\",\"injector\",\"get\",\"TransactionalConnection\",\"OrderService\",\"ChannelService\",\"RequestContextService\",\"onTransitionStart\",\"fromState\",\"toState\",\"data\",\"ctx\",\"order\",\"line\",\"lines\",\"shippingLineId\",\"type\",\"OrderType\",\"Aggregate\",\"orderWithFulfillments\",\"findOrderWithFulfillments\",\"id\",\"orderItemsArePartiallyShipped\",\"orderItemsAreShipped\",\"orderItemsArePartiallyDelivered\",\"orderItemsAreDelivered\",\"onTransitionEnd\",\"Seller\",\"aggregateOrder\",\"getAggregateOrder\",\"defaultChannel\",\"getDefaultChannel\",\"defaultChannelCtx\",\"create\",\"apiType\",\"channelOrToken\",\"req\",\"languageCode\",\"user\",\"activeUserId\",\"User\",\"undefined\",\"otherSellerOrders\",\"getSellerOrders\",\"filter\",\"so\",\"idsAreEqual\",\"sellerOrderStates\",\"map\",\"state\",\"every\",\"transitionToState\",\"some\",\"getEntityOrThrow\",\"Order\",\"relations\"],\"mappings\":\"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\"}"
@@ -1,134 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "MultivendorSellerStrategy", {
6
- enumerable: true,
7
- get: function() {
8
- return MultivendorSellerStrategy;
9
- }
10
- });
11
- const _core = require("@vendure/core");
12
- const _constants = require("../constants");
13
- function _define_property(obj, key, value) {
14
- if (key in obj) {
15
- Object.defineProperty(obj, key, {
16
- value: value,
17
- enumerable: true,
18
- configurable: true,
19
- writable: true
20
- });
21
- } else {
22
- obj[key] = value;
23
- }
24
- return obj;
25
- }
26
- class MultivendorSellerStrategy {
27
- init(injector) {
28
- this.entityHydrator = injector.get(_core.EntityHydrator);
29
- this.channelService = injector.get(_core.ChannelService);
30
- this.paymentService = injector.get(_core.PaymentService);
31
- this.paymentMethodService = injector.get(_core.PaymentMethodService);
32
- this.connection = injector.get(_core.TransactionalConnection);
33
- this.orderService = injector.get(_core.OrderService);
34
- this.options = injector.get(_constants.MULTIVENDOR_PLUGIN_OPTIONS);
35
- }
36
- async setOrderLineSellerChannel(ctx, orderLine) {
37
- await this.entityHydrator.hydrate(ctx, orderLine.productVariant, {
38
- relations: [
39
- 'channels'
40
- ]
41
- });
42
- const defaultChannel = await this.channelService.getDefaultChannel();
43
- // If a ProductVariant is assigned to exactly 2 Channels, then one is the default Channel
44
- // and the other is the seller's Channel.
45
- if (orderLine.productVariant.channels.length === 2) {
46
- const sellerChannel = orderLine.productVariant.channels.find((c)=>!(0, _core.idsAreEqual)(c.id, defaultChannel.id));
47
- if (sellerChannel) {
48
- return sellerChannel;
49
- }
50
- }
51
- }
52
- async splitOrder(ctx, order) {
53
- const partialOrders = new Map();
54
- for (const line of order.lines){
55
- const sellerChannelId = line.sellerChannelId;
56
- if (sellerChannelId) {
57
- let partialOrder = partialOrders.get(sellerChannelId);
58
- if (!partialOrder) {
59
- partialOrder = {
60
- channelId: sellerChannelId,
61
- shippingLines: [],
62
- lines: [],
63
- state: 'ArrangingPayment'
64
- };
65
- partialOrders.set(sellerChannelId, partialOrder);
66
- }
67
- partialOrder.lines.push(line);
68
- }
69
- }
70
- for (const partialOrder of partialOrders.values()){
71
- const shippingLineIds = new Set(partialOrder.lines.map((l)=>l.shippingLineId));
72
- partialOrder.shippingLines = order.shippingLines.filter((shippingLine)=>shippingLineIds.has(shippingLine.id));
73
- }
74
- return [
75
- ...partialOrders.values()
76
- ];
77
- }
78
- async afterSellerOrdersCreated(ctx, aggregateOrder, sellerOrders) {
79
- const paymentMethod = await this.connection.rawConnection.getRepository(_core.PaymentMethod).findOne({
80
- where: {
81
- code: _constants.CONNECTED_PAYMENT_METHOD_CODE
82
- }
83
- });
84
- if (!paymentMethod) {
85
- return;
86
- }
87
- const defaultChannel = await this.channelService.getDefaultChannel();
88
- for (const sellerOrder of sellerOrders){
89
- const sellerChannel = sellerOrder.channels.find((c)=>!(0, _core.idsAreEqual)(c.id, defaultChannel.id));
90
- if (!sellerChannel) {
91
- throw new _core.InternalServerError(`Could not determine Seller Channel for Order ${sellerOrder.code}`);
92
- }
93
- sellerOrder.surcharges = [
94
- await this.createPlatformFeeSurcharge(ctx, sellerOrder)
95
- ];
96
- await this.orderService.applyPriceAdjustments(ctx, sellerOrder);
97
- await this.entityHydrator.hydrate(ctx, sellerChannel, {
98
- relations: [
99
- 'seller'
100
- ]
101
- });
102
- const result = await this.orderService.addPaymentToOrder(ctx, sellerOrder.id, {
103
- method: paymentMethod.code,
104
- metadata: {
105
- transfer_group: aggregateOrder.code,
106
- connectedAccountId: sellerChannel.seller?.customFields.connectedAccountId
107
- }
108
- });
109
- if ((0, _core.isGraphQlErrorResult)(result)) {
110
- throw new _core.InternalServerError(result.message);
111
- }
112
- }
113
- }
114
- async createPlatformFeeSurcharge(ctx, sellerOrder) {
115
- const platformFee = Math.round(sellerOrder.totalWithTax * -(this.options.platformFeePercent / 100));
116
- return this.connection.getRepository(ctx, _core.Surcharge).save(new _core.Surcharge({
117
- taxLines: [],
118
- sku: this.options.platformFeeSKU,
119
- description: 'Platform fee',
120
- listPrice: platformFee,
121
- listPriceIncludesTax: true,
122
- order: sellerOrder
123
- }));
124
- }
125
- constructor(){
126
- _define_property(this, "entityHydrator", void 0);
127
- _define_property(this, "channelService", void 0);
128
- _define_property(this, "paymentService", void 0);
129
- _define_property(this, "paymentMethodService", void 0);
130
- _define_property(this, "connection", void 0);
131
- _define_property(this, "orderService", void 0);
132
- _define_property(this, "options", void 0);
133
- }
134
- }
@@ -1 +0,0 @@
1
- "{\"version\":3,\"sources\":[\"C:\\\\Development\\\\vendure\\\\vendure\\\\packages\\\\dev-server\\\\example-plugins\\\\multivendor-plugin\\\\config\\\\mv-order-seller-strategy.ts\"],\"sourcesContent\":[\"import {\\r\\n ChannelService,\\r\\n EntityHydrator,\\r\\n ID,\\r\\n idsAreEqual,\\r\\n Injector,\\r\\n InternalServerError,\\r\\n isGraphQlErrorResult,\\r\\n Order,\\r\\n OrderLine,\\r\\n OrderSellerStrategy,\\r\\n OrderService,\\r\\n PaymentMethod,\\r\\n PaymentMethodService,\\r\\n PaymentService,\\r\\n RequestContext,\\r\\n SplitOrderContents,\\r\\n Surcharge,\\r\\n TransactionalConnection,\\r\\n} from '@vendure/core';\\r\\n\\r\\nimport { CONNECTED_PAYMENT_METHOD_CODE, MULTIVENDOR_PLUGIN_OPTIONS } from '../constants';\\r\\nimport { MultivendorPluginOptions } from '../types';\\r\\n\\r\\ndeclare module '@vendure/core/dist/entity/custom-entity-fields' {\\r\\n interface CustomSellerFields {\\r\\n connectedAccountId: string;\\r\\n }\\r\\n}\\r\\n\\r\\nexport class MultivendorSellerStrategy implements OrderSellerStrategy {\\r\\n private entityHydrator: EntityHydrator;\\r\\n private channelService: ChannelService;\\r\\n private paymentService: PaymentService;\\r\\n private paymentMethodService: PaymentMethodService;\\r\\n private connection: TransactionalConnection;\\r\\n private orderService: OrderService;\\r\\n private options: MultivendorPluginOptions;\\r\\n\\r\\n init(injector: Injector) {\\r\\n this.entityHydrator = injector.get(EntityHydrator);\\r\\n this.channelService = injector.get(ChannelService);\\r\\n this.paymentService = injector.get(PaymentService);\\r\\n this.paymentMethodService = injector.get(PaymentMethodService);\\r\\n this.connection = injector.get(TransactionalConnection);\\r\\n this.orderService = injector.get(OrderService);\\r\\n this.options = injector.get(MULTIVENDOR_PLUGIN_OPTIONS);\\r\\n }\\r\\n\\r\\n async setOrderLineSellerChannel(ctx: RequestContext, orderLine: OrderLine) {\\r\\n await this.entityHydrator.hydrate(ctx, orderLine.productVariant, { relations: ['channels'] });\\r\\n const defaultChannel = await this.channelService.getDefaultChannel();\\r\\n\\r\\n // If a ProductVariant is assigned to exactly 2 Channels, then one is the default Channel\\r\\n // and the other is the seller's Channel.\\r\\n if (orderLine.productVariant.channels.length === 2) {\\r\\n const sellerChannel = orderLine.productVariant.channels.find(\\r\\n c => !idsAreEqual(c.id, defaultChannel.id),\\r\\n );\\r\\n if (sellerChannel) {\\r\\n return sellerChannel;\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n async splitOrder(ctx: RequestContext, order: Order): Promise<SplitOrderContents[]> {\\r\\n const partialOrders = new Map<ID, SplitOrderContents>();\\r\\n for (const line of order.lines) {\\r\\n const sellerChannelId = line.sellerChannelId;\\r\\n if (sellerChannelId) {\\r\\n let partialOrder = partialOrders.get(sellerChannelId);\\r\\n if (!partialOrder) {\\r\\n partialOrder = {\\r\\n channelId: sellerChannelId,\\r\\n shippingLines: [],\\r\\n lines: [],\\r\\n state: 'ArrangingPayment',\\r\\n };\\r\\n partialOrders.set(sellerChannelId, partialOrder);\\r\\n }\\r\\n partialOrder.lines.push(line);\\r\\n }\\r\\n }\\r\\n\\r\\n for (const partialOrder of partialOrders.values()) {\\r\\n const shippingLineIds = new Set(partialOrder.lines.map(l => l.shippingLineId));\\r\\n partialOrder.shippingLines = order.shippingLines.filter(shippingLine =>\\r\\n shippingLineIds.has(shippingLine.id),\\r\\n );\\r\\n }\\r\\n\\r\\n return [...partialOrders.values()];\\r\\n }\\r\\n\\r\\n async afterSellerOrdersCreated(ctx: RequestContext, aggregateOrder: Order, sellerOrders: Order[]) {\\r\\n const paymentMethod = await this.connection.rawConnection.getRepository(PaymentMethod).findOne({\\r\\n where: {\\r\\n code: CONNECTED_PAYMENT_METHOD_CODE,\\r\\n },\\r\\n });\\r\\n if (!paymentMethod) {\\r\\n return;\\r\\n }\\r\\n const defaultChannel = await this.channelService.getDefaultChannel();\\r\\n for (const sellerOrder of sellerOrders) {\\r\\n const sellerChannel = sellerOrder.channels.find(c => !idsAreEqual(c.id, defaultChannel.id));\\r\\n if (!sellerChannel) {\\r\\n throw new InternalServerError(\\r\\n `Could not determine Seller Channel for Order ${sellerOrder.code}`,\\r\\n );\\r\\n }\\r\\n sellerOrder.surcharges = [await this.createPlatformFeeSurcharge(ctx, sellerOrder)];\\r\\n await this.orderService.applyPriceAdjustments(ctx, sellerOrder);\\r\\n await this.entityHydrator.hydrate(ctx, sellerChannel, { relations: ['seller'] });\\r\\n const result = await this.orderService.addPaymentToOrder(ctx, sellerOrder.id, {\\r\\n method: paymentMethod.code,\\r\\n metadata: {\\r\\n transfer_group: aggregateOrder.code,\\r\\n connectedAccountId: sellerChannel.seller?.customFields.connectedAccountId,\\r\\n },\\r\\n });\\r\\n if (isGraphQlErrorResult(result)) {\\r\\n throw new InternalServerError(result.message);\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n private async createPlatformFeeSurcharge(ctx: RequestContext, sellerOrder: Order) {\\r\\n const platformFee = Math.round(sellerOrder.totalWithTax * -(this.options.platformFeePercent / 100));\\r\\n return this.connection.getRepository(ctx, Surcharge).save(\\r\\n new Surcharge({\\r\\n taxLines: [],\\r\\n sku: this.options.platformFeeSKU,\\r\\n description: 'Platform fee',\\r\\n listPrice: platformFee,\\r\\n listPriceIncludesTax: true,\\r\\n order: sellerOrder,\\r\\n }),\\r\\n );\\r\\n }\\r\\n}\\r\\n\"],\"names\":[\"MultivendorSellerStrategy\",\"init\",\"injector\",\"entityHydrator\",\"get\",\"EntityHydrator\",\"channelService\",\"ChannelService\",\"paymentService\",\"PaymentService\",\"paymentMethodService\",\"PaymentMethodService\",\"connection\",\"TransactionalConnection\",\"orderService\",\"OrderService\",\"options\",\"MULTIVENDOR_PLUGIN_OPTIONS\",\"setOrderLineSellerChannel\",\"ctx\",\"orderLine\",\"hydrate\",\"productVariant\",\"relations\",\"defaultChannel\",\"getDefaultChannel\",\"channels\",\"length\",\"sellerChannel\",\"find\",\"c\",\"idsAreEqual\",\"id\",\"splitOrder\",\"order\",\"partialOrders\",\"Map\",\"line\",\"lines\",\"sellerChannelId\",\"partialOrder\",\"channelId\",\"shippingLines\",\"state\",\"set\",\"push\",\"values\",\"shippingLineIds\",\"Set\",\"map\",\"l\",\"shippingLineId\",\"filter\",\"shippingLine\",\"has\",\"afterSellerOrdersCreated\",\"aggregateOrder\",\"sellerOrders\",\"paymentMethod\",\"rawConnection\",\"getRepository\",\"PaymentMethod\",\"findOne\",\"where\",\"code\",\"CONNECTED_PAYMENT_METHOD_CODE\",\"sellerOrder\",\"InternalServerError\",\"surcharges\",\"createPlatformFeeSurcharge\",\"applyPriceAdjustments\",\"result\",\"addPaymentToOrder\",\"method\",\"metadata\",\"transfer_group\",\"connectedAccountId\",\"seller\",\"customFields\",\"isGraphQlErrorResult\",\"message\",\"platformFee\",\"Math\",\"round\",\"totalWithTax\",\"platformFeePercent\",\"Surcharge\",\"save\",\"taxLines\",\"sku\",\"platformFeeSKU\",\"description\",\"listPrice\",\"listPriceIncludesTax\"],\"mappings\":\"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\"}"
@@ -1,86 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "multivendorPaymentMethodHandler", {
6
- enumerable: true,
7
- get: function() {
8
- return multivendorPaymentMethodHandler;
9
- }
10
- });
11
- const _generatedtypes = require("@vendure/common/lib/generated-types");
12
- const _core = require("@vendure/core");
13
- const _mvconnectsdk = require("../payment/mv-connect-sdk");
14
- const sdk = new _mvconnectsdk.MyConnectSdk({
15
- apiKey: 'MY_API_KEY'
16
- });
17
- const multivendorPaymentMethodHandler = new _core.PaymentMethodHandler({
18
- code: 'mv-connect-payment-method',
19
- description: [
20
- {
21
- languageCode: _core.LanguageCode.en,
22
- value: 'Multivendor Payment Provider'
23
- }
24
- ],
25
- args: {},
26
- createPayment: async (ctx, order, amount, args, metadata)=>{
27
- if (order.type === _generatedtypes.OrderType.Seller) {
28
- try {
29
- // Create a Transfer payment to the Seller's account
30
- const result = await sdk.createTransfer({
31
- amount,
32
- currency: order.currencyCode,
33
- connectedAccountId: metadata.connectedAccountId,
34
- transfer_group: metadata.transfer_group
35
- });
36
- return {
37
- amount,
38
- state: 'Settled',
39
- transactionId: result.transactionId,
40
- metadata
41
- };
42
- } catch (err) {
43
- return {
44
- amount,
45
- state: 'Declined',
46
- metadata: {
47
- errorMessage: err.message
48
- }
49
- };
50
- }
51
- } else {
52
- try {
53
- // Create a payment to the platform's account,
54
- // and set the `transfer_group` option to later link
55
- // with the Seller transfers after the Seller orders
56
- // have been created.
57
- const result = await sdk.createPayment({
58
- amount,
59
- currency: order.currencyCode,
60
- transfer_group: order.code
61
- });
62
- return {
63
- amount,
64
- state: 'Settled',
65
- transactionId: result.transactionId,
66
- metadata: {
67
- transfer_group: order.code
68
- }
69
- };
70
- } catch (err) {
71
- return {
72
- amount,
73
- state: 'Declined',
74
- metadata: {
75
- errorMessage: err.message
76
- }
77
- };
78
- }
79
- }
80
- },
81
- settlePayment: async (ctx, order, payment, args)=>{
82
- return {
83
- success: true
84
- };
85
- }
86
- });
@@ -1 +0,0 @@
1
- "{\"version\":3,\"sources\":[\"C:\\\\Development\\\\vendure\\\\vendure\\\\packages\\\\dev-server\\\\example-plugins\\\\multivendor-plugin\\\\config\\\\mv-payment-handler.ts\"],\"sourcesContent\":[\"import { OrderType } from '@vendure/common/lib/generated-types';\\r\\nimport {\\r\\n CreatePaymentResult,\\r\\n LanguageCode,\\r\\n PaymentMethodHandler,\\r\\n SettlePaymentErrorResult,\\r\\n SettlePaymentResult,\\r\\n} from '@vendure/core';\\r\\n\\r\\nimport { MyConnectSdk } from '../payment/mv-connect-sdk';\\r\\n\\r\\nconst sdk = new MyConnectSdk({ apiKey: 'MY_API_KEY' });\\r\\n\\r\\nexport const multivendorPaymentMethodHandler = new PaymentMethodHandler({\\r\\n code: 'mv-connect-payment-method',\\r\\n description: [\\r\\n {\\r\\n languageCode: LanguageCode.en,\\r\\n value: 'Multivendor Payment Provider',\\r\\n },\\r\\n ],\\r\\n args: {},\\r\\n createPayment: async (ctx, order, amount, args, metadata) => {\\r\\n if (order.type === OrderType.Seller) {\\r\\n try {\\r\\n // Create a Transfer payment to the Seller's account\\r\\n const result = await sdk.createTransfer({\\r\\n amount,\\r\\n currency: order.currencyCode,\\r\\n connectedAccountId: metadata.connectedAccountId,\\r\\n transfer_group: metadata.transfer_group,\\r\\n });\\r\\n return {\\r\\n amount,\\r\\n state: 'Settled' as const,\\r\\n transactionId: result.transactionId,\\r\\n metadata,\\r\\n };\\r\\n } catch (err: any) {\\r\\n return {\\r\\n amount,\\r\\n state: 'Declined' as const,\\r\\n metadata: {\\r\\n errorMessage: err.message,\\r\\n },\\r\\n };\\r\\n }\\r\\n } else {\\r\\n try {\\r\\n // Create a payment to the platform's account,\\r\\n // and set the `transfer_group` option to later link\\r\\n // with the Seller transfers after the Seller orders\\r\\n // have been created.\\r\\n const result = await sdk.createPayment({\\r\\n amount,\\r\\n currency: order.currencyCode,\\r\\n transfer_group: order.code,\\r\\n });\\r\\n return {\\r\\n amount,\\r\\n state: 'Settled' as const,\\r\\n transactionId: result.transactionId,\\r\\n metadata: {\\r\\n transfer_group: order.code,\\r\\n },\\r\\n };\\r\\n } catch (err: any) {\\r\\n return {\\r\\n amount,\\r\\n state: 'Declined' as const,\\r\\n metadata: {\\r\\n errorMessage: err.message,\\r\\n },\\r\\n };\\r\\n }\\r\\n }\\r\\n },\\r\\n settlePayment: async (ctx, order, payment, args) => {\\r\\n return { success: true };\\r\\n },\\r\\n});\\r\\n\"],\"names\":[\"multivendorPaymentMethodHandler\",\"sdk\",\"MyConnectSdk\",\"apiKey\",\"PaymentMethodHandler\",\"code\",\"description\",\"languageCode\",\"LanguageCode\",\"en\",\"value\",\"args\",\"createPayment\",\"ctx\",\"order\",\"amount\",\"metadata\",\"type\",\"OrderType\",\"Seller\",\"result\",\"createTransfer\",\"currency\",\"currencyCode\",\"connectedAccountId\",\"transfer_group\",\"state\",\"transactionId\",\"err\",\"errorMessage\",\"message\",\"settlePayment\",\"payment\",\"success\"],\"mappings\":\";;;;+BAaaA;;;eAAAA;;;gCAba;sBAOnB;8BAEsB;AAE7B,MAAMC,MAAM,IAAIC,0BAAY,CAAC;IAAEC,QAAQ;AAAa;AAE7C,MAAMH,kCAAkC,IAAII,0BAAoB,CAAC;IACpEC,MAAM;IACNC,aAAa;QACT;YACIC,cAAcC,kBAAY,CAACC,EAAE;YAC7BC,OAAO;QACX;KACH;IACDC,MAAM,CAAC;IACPC,eAAe,OAAOC,KAAKC,OAAOC,QAAQJ,MAAMK;QAC5C,IAAIF,MAAMG,IAAI,KAAKC,yBAAS,CAACC,MAAM,EAAE;YACjC,IAAI;gBACA,oDAAoD;gBACpD,MAAMC,SAAS,MAAMnB,IAAIoB,cAAc,CAAC;oBACpCN;oBACAO,UAAUR,MAAMS,YAAY;oBAC5BC,oBAAoBR,SAASQ,kBAAkB;oBAC/CC,gBAAgBT,SAASS,cAAc;gBAC3C;gBACA,OAAO;oBACHV;oBACAW,OAAO;oBACPC,eAAeP,OAAOO,aAAa;oBACnCX;gBACJ;YACJ,EAAE,OAAOY,KAAU;gBACf,OAAO;oBACHb;oBACAW,OAAO;oBACPV,UAAU;wBACNa,cAAcD,IAAIE,OAAO;oBAC7B;gBACJ;YACJ;QACJ,OAAO;YACH,IAAI;gBACA,8CAA8C;gBAC9C,oDAAoD;gBACpD,oDAAoD;gBACpD,qBAAqB;gBACrB,MAAMV,SAAS,MAAMnB,IAAIW,aAAa,CAAC;oBACnCG;oBACAO,UAAUR,MAAMS,YAAY;oBAC5BE,gBAAgBX,MAAMT,IAAI;gBAC9B;gBACA,OAAO;oBACHU;oBACAW,OAAO;oBACPC,eAAeP,OAAOO,aAAa;oBACnCX,UAAU;wBACNS,gBAAgBX,MAAMT,IAAI;oBAC9B;gBACJ;YACJ,EAAE,OAAOuB,KAAU;gBACf,OAAO;oBACHb;oBACAW,OAAO;oBACPV,UAAU;wBACNa,cAAcD,IAAIE,OAAO;oBAC7B;gBACJ;YACJ;QACJ;IACJ;IACAC,eAAe,OAAOlB,KAAKC,OAAOkB,SAASrB;QACvC,OAAO;YAAEsB,SAAS;QAAK;IAC3B;AACJ\"}"
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "multivendorShippingEligibilityChecker", {
6
- enumerable: true,
7
- get: function() {
8
- return multivendorShippingEligibilityChecker;
9
- }
10
- });
11
- const _generatedtypes = require("@vendure/common/lib/generated-types");
12
- const _sharedconstants = require("@vendure/common/lib/shared-constants");
13
- const _core = require("@vendure/core");
14
- let entityHydrator;
15
- const multivendorShippingEligibilityChecker = new _core.ShippingEligibilityChecker({
16
- code: 'multivendor-shipping-eligibility-checker',
17
- description: [
18
- {
19
- languageCode: _generatedtypes.LanguageCode.en,
20
- value: 'Multivendor Shipping Eligibility Checker'
21
- }
22
- ],
23
- args: {},
24
- init (injector) {
25
- entityHydrator = injector.get(_core.EntityHydrator);
26
- },
27
- check: async (ctx, order, args, method)=>{
28
- await entityHydrator.hydrate(ctx, method, {
29
- relations: [
30
- 'channels'
31
- ]
32
- });
33
- await entityHydrator.hydrate(ctx, order, {
34
- relations: [
35
- 'lines.sellerChannel'
36
- ]
37
- });
38
- const sellerChannel = method.channels.find((c)=>c.code !== _sharedconstants.DEFAULT_CHANNEL_CODE);
39
- if (!sellerChannel) {
40
- return false;
41
- }
42
- for (const line of order.lines){
43
- if (line.sellerChannelId && (0, _core.idsAreEqual)(line.sellerChannelId, sellerChannel.id)) {
44
- return true;
45
- }
46
- }
47
- return false;
48
- }
49
- });
@@ -1 +0,0 @@
1
- "{\"version\":3,\"sources\":[\"C:\\\\Development\\\\vendure\\\\vendure\\\\packages\\\\dev-server\\\\example-plugins\\\\multivendor-plugin\\\\config\\\\mv-shipping-eligibility-checker.ts\"],\"sourcesContent\":[\"import { LanguageCode } from '@vendure/common/lib/generated-types';\\nimport { DEFAULT_CHANNEL_CODE } from '@vendure/common/lib/shared-constants';\\nimport { EntityHydrator, idsAreEqual, ShippingEligibilityChecker } from '@vendure/core';\\n\\nlet entityHydrator: EntityHydrator;\\n\\n/**\\n * @description\\n * Shipping method is eligible if at least one OrderLine is associated with the Seller's Channel.\\n */\\nexport const multivendorShippingEligibilityChecker = new ShippingEligibilityChecker({\\n code: 'multivendor-shipping-eligibility-checker',\\n description: [{ languageCode: LanguageCode.en, value: 'Multivendor Shipping Eligibility Checker' }],\\n args: {},\\n init(injector) {\\n entityHydrator = injector.get(EntityHydrator);\\n },\\n check: async (ctx, order, args, method) => {\\n await entityHydrator.hydrate(ctx, method, { relations: ['channels'] });\\n await entityHydrator.hydrate(ctx, order, { relations: ['lines.sellerChannel'] });\\n const sellerChannel = method.channels.find(c => c.code !== DEFAULT_CHANNEL_CODE);\\n if (!sellerChannel) {\\n return false;\\n }\\n for (const line of order.lines) {\\n if (line.sellerChannelId && idsAreEqual(line.sellerChannelId, sellerChannel.id)) {\\n return true;\\n }\\n }\\n return false;\\n },\\n});\\n\"],\"names\":[\"multivendorShippingEligibilityChecker\",\"entityHydrator\",\"ShippingEligibilityChecker\",\"code\",\"description\",\"languageCode\",\"LanguageCode\",\"en\",\"value\",\"args\",\"init\",\"injector\",\"get\",\"EntityHydrator\",\"check\",\"ctx\",\"order\",\"method\",\"hydrate\",\"relations\",\"sellerChannel\",\"channels\",\"find\",\"c\",\"DEFAULT_CHANNEL_CODE\",\"line\",\"lines\",\"sellerChannelId\",\"idsAreEqual\",\"id\"],\"mappings\":\";;;;+BAUaA;;;eAAAA;;;gCAVgB;iCACQ;sBACmC;AAExE,IAAIC;AAMG,MAAMD,wCAAwC,IAAIE,gCAA0B,CAAC;IAChFC,MAAM;IACNC,aAAa;QAAC;YAAEC,cAAcC,4BAAY,CAACC,EAAE;YAAEC,OAAO;QAA2C;KAAE;IACnGC,MAAM,CAAC;IACPC,MAAKC,QAAQ;QACTV,iBAAiBU,SAASC,GAAG,CAACC,oBAAc;IAChD;IACAC,OAAO,OAAOC,KAAKC,OAAOP,MAAMQ;QAC5B,MAAMhB,eAAeiB,OAAO,CAACH,KAAKE,QAAQ;YAAEE,WAAW;gBAAC;aAAW;QAAC;QACpE,MAAMlB,eAAeiB,OAAO,CAACH,KAAKC,OAAO;YAAEG,WAAW;gBAAC;aAAsB;QAAC;QAC9E,MAAMC,gBAAgBH,OAAOI,QAAQ,CAACC,IAAI,CAACC,CAAAA,IAAKA,EAAEpB,IAAI,KAAKqB,qCAAoB;QAC/E,IAAI,CAACJ,eAAe;YAChB,OAAO;QACX;QACA,KAAK,MAAMK,QAAQT,MAAMU,KAAK,CAAE;YAC5B,IAAID,KAAKE,eAAe,IAAIC,IAAAA,iBAAW,EAACH,KAAKE,eAAe,EAAEP,cAAcS,EAAE,GAAG;gBAC7E,OAAO;YACX;QACJ;QACA,OAAO;IACX;AACJ\"}"
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "MultivendorShippingLineAssignmentStrategy", {
6
- enumerable: true,
7
- get: function() {
8
- return MultivendorShippingLineAssignmentStrategy;
9
- }
10
- });
11
- const _core = require("@vendure/core");
12
- function _define_property(obj, key, value) {
13
- if (key in obj) {
14
- Object.defineProperty(obj, key, {
15
- value: value,
16
- enumerable: true,
17
- configurable: true,
18
- writable: true
19
- });
20
- } else {
21
- obj[key] = value;
22
- }
23
- return obj;
24
- }
25
- class MultivendorShippingLineAssignmentStrategy {
26
- init(injector) {
27
- this.entityHydrator = injector.get(_core.EntityHydrator);
28
- this.channelService = injector.get(_core.ChannelService);
29
- }
30
- async assignShippingLineToOrderLines(ctx, shippingLine, order) {
31
- // First we need to ensure the required relations are available
32
- // to work with.
33
- const defaultChannel = await this.channelService.getDefaultChannel();
34
- await this.entityHydrator.hydrate(ctx, shippingLine, {
35
- relations: [
36
- 'shippingMethod.channels'
37
- ]
38
- });
39
- const { channels } = shippingLine.shippingMethod;
40
- // We assume that, if a ShippingMethod is assigned to exactly 2 Channels,
41
- // then one is the default Channel and the other is the seller's Channel.
42
- if (channels.length === 2) {
43
- const sellerChannel = channels.find((c)=>!(0, _core.idsAreEqual)(c.id, defaultChannel.id));
44
- if (sellerChannel) {
45
- // Once we have established the seller's Channel, we can filter the OrderLines
46
- // that belong to that Channel. The `sellerChannelId` was previously established
47
- // in the `OrderSellerStrategy.setOrderLineSellerChannel()` method.
48
- return order.lines.filter((line)=>(0, _core.idsAreEqual)(line.sellerChannelId, sellerChannel.id));
49
- }
50
- }
51
- return order.lines;
52
- }
53
- constructor(){
54
- _define_property(this, "entityHydrator", void 0);
55
- _define_property(this, "channelService", void 0);
56
- }
57
- }
@@ -1 +0,0 @@
1
- "{\"version\":3,\"sources\":[\"C:\\\\Development\\\\vendure\\\\vendure\\\\packages\\\\dev-server\\\\example-plugins\\\\multivendor-plugin\\\\config\\\\mv-shipping-line-assignment-strategy.ts\"],\"sourcesContent\":[\"import {\\r\\n ChannelService,\\r\\n EntityHydrator,\\r\\n idsAreEqual,\\r\\n Injector,\\r\\n Order,\\r\\n OrderSellerStrategy,\\r\\n RequestContext,\\r\\n ShippingLine,\\r\\n ShippingLineAssignmentStrategy,\\r\\n} from '@vendure/core';\\r\\n\\r\\nexport class MultivendorShippingLineAssignmentStrategy implements ShippingLineAssignmentStrategy {\\r\\n private entityHydrator: EntityHydrator;\\r\\n private channelService: ChannelService;\\r\\n\\r\\n init(injector: Injector) {\\r\\n this.entityHydrator = injector.get(EntityHydrator);\\r\\n this.channelService = injector.get(ChannelService);\\r\\n }\\r\\n\\r\\n async assignShippingLineToOrderLines(ctx: RequestContext, shippingLine: ShippingLine, order: Order) {\\r\\n // First we need to ensure the required relations are available\\r\\n // to work with.\\r\\n const defaultChannel = await this.channelService.getDefaultChannel();\\r\\n await this.entityHydrator.hydrate(ctx, shippingLine, { relations: ['shippingMethod.channels'] });\\r\\n const { channels } = shippingLine.shippingMethod;\\r\\n\\r\\n // We assume that, if a ShippingMethod is assigned to exactly 2 Channels,\\r\\n // then one is the default Channel and the other is the seller's Channel.\\r\\n if (channels.length === 2) {\\r\\n const sellerChannel = channels.find(c => !idsAreEqual(c.id, defaultChannel.id));\\r\\n if (sellerChannel) {\\r\\n // Once we have established the seller's Channel, we can filter the OrderLines\\r\\n // that belong to that Channel. The `sellerChannelId` was previously established\\r\\n // in the `OrderSellerStrategy.setOrderLineSellerChannel()` method.\\r\\n return order.lines.filter(line => idsAreEqual(line.sellerChannelId, sellerChannel.id));\\r\\n }\\r\\n }\\r\\n return order.lines;\\r\\n }\\r\\n}\\r\\n\"],\"names\":[\"MultivendorShippingLineAssignmentStrategy\",\"init\",\"injector\",\"entityHydrator\",\"get\",\"EntityHydrator\",\"channelService\",\"ChannelService\",\"assignShippingLineToOrderLines\",\"ctx\",\"shippingLine\",\"order\",\"defaultChannel\",\"getDefaultChannel\",\"hydrate\",\"relations\",\"channels\",\"shippingMethod\",\"length\",\"sellerChannel\",\"find\",\"c\",\"idsAreEqual\",\"id\",\"lines\",\"filter\",\"line\",\"sellerChannelId\"],\"mappings\":\";;;;+BAYaA;;;eAAAA;;;sBAFN;;;;;;;;;;;;;;AAEA,MAAMA;IAITC,KAAKC,QAAkB,EAAE;QACrB,IAAI,CAACC,cAAc,GAAGD,SAASE,GAAG,CAACC,oBAAc;QACjD,IAAI,CAACC,cAAc,GAAGJ,SAASE,GAAG,CAACG,oBAAc;IACrD;IAEA,MAAMC,+BAA+BC,GAAmB,EAAEC,YAA0B,EAAEC,KAAY,EAAE;QAChG,+DAA+D;QAC/D,gBAAgB;QAChB,MAAMC,iBAAiB,MAAM,IAAI,CAACN,cAAc,CAACO,iBAAiB;QAClE,MAAM,IAAI,CAACV,cAAc,CAACW,OAAO,CAACL,KAAKC,cAAc;YAAEK,WAAW;gBAAC;aAA0B;QAAC;QAC9F,MAAM,EAAEC,QAAQ,EAAE,GAAGN,aAAaO,cAAc;QAEhD,yEAAyE;QACzE,yEAAyE;QACzE,IAAID,SAASE,MAAM,KAAK,GAAG;YACvB,MAAMC,gBAAgBH,SAASI,IAAI,CAACC,CAAAA,IAAK,CAACC,IAAAA,iBAAW,EAACD,EAAEE,EAAE,EAAEX,eAAeW,EAAE;YAC7E,IAAIJ,eAAe;gBACf,8EAA8E;gBAC9E,gFAAgF;gBAChF,mEAAmE;gBACnE,OAAOR,MAAMa,KAAK,CAACC,MAAM,CAACC,CAAAA,OAAQJ,IAAAA,iBAAW,EAACI,KAAKC,eAAe,EAAER,cAAcI,EAAE;YACxF;QACJ;QACA,OAAOZ,MAAMa,KAAK;IACtB;;QA3BA,uBAAQrB,kBAAR,KAAA;QACA,uBAAQG,kBAAR,KAAA;;AA2BJ\"}"
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: all[name]
9
- });
10
- }
11
- _export(exports, {
12
- CONNECTED_PAYMENT_METHOD_CODE: function() {
13
- return CONNECTED_PAYMENT_METHOD_CODE;
14
- },
15
- MULTIVENDOR_PLUGIN_OPTIONS: function() {
16
- return MULTIVENDOR_PLUGIN_OPTIONS;
17
- }
18
- });
19
- const CONNECTED_PAYMENT_METHOD_CODE = 'connected-payment-method';
20
- const MULTIVENDOR_PLUGIN_OPTIONS = Symbol('MULTIVENDOR_PLUGIN_OPTIONS');
@@ -1 +0,0 @@
1
- "{\"version\":3,\"sources\":[\"C:\\\\Development\\\\vendure\\\\vendure\\\\packages\\\\dev-server\\\\example-plugins\\\\multivendor-plugin\\\\constants.ts\"],\"sourcesContent\":[\"export const CONNECTED_PAYMENT_METHOD_CODE = 'connected-payment-method';\\r\\nexport const MULTIVENDOR_PLUGIN_OPTIONS = Symbol('MULTIVENDOR_PLUGIN_OPTIONS');\\r\\n\"],\"names\":[\"CONNECTED_PAYMENT_METHOD_CODE\",\"MULTIVENDOR_PLUGIN_OPTIONS\",\"Symbol\"],\"mappings\":\";;;;;;;;;;;IAAaA,6BAA6B;eAA7BA;;IACAC,0BAA0B;eAA1BA;;;AADN,MAAMD,gCAAgC;AACtC,MAAMC,6BAA6BC,OAAO\"}"