@vendure/admin-ui 2.0.0-next.2 → 2.0.0-next.21

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 (341) hide show
  1. package/catalog/catalog.module.d.ts +15 -11
  2. package/catalog/components/assign-to-channel-dialog/assign-to-channel-dialog.component.d.ts +22 -0
  3. package/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component.d.ts +41 -0
  4. package/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.graphql.d.ts +4 -0
  5. package/catalog/components/collection-contents/collection-contents.component.d.ts +10 -2
  6. package/catalog/components/collection-detail/collection-detail.component.d.ts +13 -4
  7. package/catalog/components/collection-list/collection-list-bulk-actions.d.ts +6 -0
  8. package/catalog/components/collection-list/collection-list.component.d.ts +9 -5
  9. package/catalog/components/collection-tree/array-to-tree.d.ts +1 -1
  10. package/catalog/components/collection-tree/collection-tree-node.component.d.ts +14 -6
  11. package/catalog/components/collection-tree/collection-tree.component.d.ts +4 -1
  12. package/catalog/components/facet-list/facet-list-bulk-actions.d.ts +5 -0
  13. package/catalog/components/facet-list/facet-list.component.d.ts +2 -1
  14. package/catalog/components/generate-product-variants/generate-product-variants.component.d.ts +3 -3
  15. package/catalog/components/option-value-input/option-value-input.component.d.ts +21 -9
  16. package/catalog/components/product-detail/product-detail.component.d.ts +1 -1
  17. package/catalog/components/product-list/product-list-bulk-actions.d.ts +6 -0
  18. package/catalog/components/product-list/product-list.component.d.ts +4 -2
  19. package/catalog/components/product-variants-editor/product-variants-editor.component.d.ts +22 -12
  20. package/catalog/components/product-variants-list/product-variants-list.component.d.ts +1 -0
  21. package/catalog/public_api.d.ts +6 -1
  22. package/core/common/component-registry-types.d.ts +1 -1
  23. package/core/common/generated-types.d.ts +3184 -195
  24. package/core/common/utilities/bulk-action-utils.d.ts +19 -0
  25. package/core/common/utilities/configurable-operation-utils.d.ts +7 -2
  26. package/core/common/utilities/selection-manager.d.ts +30 -0
  27. package/core/common/version.d.ts +1 -1
  28. package/core/components/app-shell/app-shell.component.d.ts +1 -0
  29. package/core/data/definitions/collection-definitions.d.ts +4 -0
  30. package/core/data/definitions/facet-definitions.d.ts +3 -0
  31. package/core/data/definitions/order-definitions.d.ts +14 -0
  32. package/core/data/definitions/product-definitions.d.ts +2 -0
  33. package/core/data/providers/collection-data.service.d.ts +7 -0
  34. package/core/data/providers/facet-data.service.d.ts +3 -0
  35. package/core/data/providers/order-data.service.d.ts +18 -0
  36. package/core/data/providers/product-data.service.d.ts +2 -0
  37. package/core/providers/bulk-action-registry/bulk-action-registry.service.d.ts +9 -0
  38. package/core/providers/bulk-action-registry/bulk-action-types.d.ts +149 -0
  39. package/core/providers/bulk-action-registry/register-bulk-action.d.ts +53 -0
  40. package/core/providers/local-storage/local-storage.service.d.ts +1 -0
  41. package/core/providers/modal/modal.types.d.ts +2 -0
  42. package/core/providers/nav-builder/nav-builder-types.d.ts +1 -0
  43. package/core/public_api.d.ts +24 -1
  44. package/core/shared/components/asset-gallery/asset-gallery.component.d.ts +27 -3
  45. package/core/shared/components/bulk-action-menu/bulk-action-menu.component.d.ts +32 -0
  46. package/core/shared/components/configurable-input/configurable-input.component.d.ts +8 -3
  47. package/core/shared/components/custom-field-control/custom-field-control.component.d.ts +6 -2
  48. package/core/shared/components/data-table/data-table.component.d.ts +29 -7
  49. package/core/shared/components/dropdown/dropdown-menu.component.d.ts +2 -1
  50. package/core/shared/components/facet-value-selector/facet-value-selector.component.d.ts +3 -2
  51. package/core/shared/components/product-multi-selector-dialog/product-multi-selector-dialog.component.d.ts +38 -0
  52. package/{catalog → core/shared}/components/product-search-input/product-search-input.component.d.ts +1 -1
  53. package/core/shared/components/radio-card/radio-card-fieldset.component.d.ts +24 -0
  54. package/core/shared/components/radio-card/radio-card.component.d.ts +22 -0
  55. package/core/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.component.d.ts +31 -0
  56. package/core/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.service.d.ts +34 -0
  57. package/core/shared/components/rich-text-editor/prosemirror/custom-nodes.d.ts +4 -0
  58. package/core/shared/components/rich-text-editor/prosemirror/inputrules.d.ts +5 -5
  59. package/core/shared/components/rich-text-editor/prosemirror/menu/links.d.ts +1 -1
  60. package/core/shared/components/rich-text-editor/prosemirror/menu/menu-common.d.ts +12 -0
  61. package/core/shared/components/rich-text-editor/prosemirror/menu/menu-plugin.d.ts +9 -0
  62. package/core/shared/components/rich-text-editor/prosemirror/menu/sub-menu-with-icon.d.ts +14 -0
  63. package/core/shared/components/rich-text-editor/prosemirror/plugins/image-plugin.d.ts +7 -0
  64. package/core/shared/components/rich-text-editor/prosemirror/plugins/link-select-plugin.d.ts +1 -1
  65. package/core/shared/components/rich-text-editor/prosemirror/plugins/raw-editor-plugin.d.ts +7 -0
  66. package/core/shared/components/rich-text-editor/prosemirror/plugins/tables-plugin.d.ts +13 -0
  67. package/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.d.ts +7 -3
  68. package/core/shared/components/rich-text-editor/prosemirror/types.d.ts +0 -2
  69. package/core/shared/components/rich-text-editor/raw-html-dialog/raw-html-dialog.component.d.ts +21 -0
  70. package/core/shared/components/rich-text-editor/rich-text-editor.component.d.ts +6 -2
  71. package/core/shared/components/select-toggle/select-toggle.component.d.ts +2 -1
  72. package/core/shared/dynamic-form-inputs/code-editor-form-input/base-code-editor-form-input.component.d.ts +30 -0
  73. package/core/shared/dynamic-form-inputs/code-editor-form-input/html-editor-form-input.component.d.ts +22 -0
  74. package/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.d.ts +5 -17
  75. package/core/shared/dynamic-form-inputs/combination-mode-form-input/combination-mode-form-input.component.d.ts +28 -0
  76. package/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.d.ts +2 -0
  77. package/core/shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component.d.ts +23 -0
  78. package/core/shared/dynamic-form-inputs/register-dynamic-input-components.d.ts +5 -1
  79. package/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.d.ts +6 -3
  80. package/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.d.ts +10 -2
  81. package/core/shared/pipes/custom-field-description.pipe.d.ts +11 -0
  82. package/core/shared/pipes/custom-field-label.pipe.d.ts +4 -10
  83. package/core/shared/shared.module.d.ts +68 -57
  84. package/customer/components/customer-group-list/customer-group-list.component.d.ts +6 -4
  85. package/customer/components/customer-group-member-list/customer-group-member-list.component.d.ts +11 -4
  86. package/esm2020/catalog/catalog.module.mjs +31 -10
  87. package/esm2020/catalog/components/apply-facet-dialog/apply-facet-dialog.component.mjs +1 -1
  88. package/esm2020/catalog/components/assets/assets.component.mjs +2 -2
  89. package/esm2020/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.mjs +4 -1
  90. package/esm2020/catalog/components/assign-to-channel-dialog/assign-to-channel-dialog.component.mjs +50 -0
  91. package/esm2020/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component.mjs +84 -0
  92. package/esm2020/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.graphql.mjs +69 -0
  93. package/esm2020/catalog/components/collection-contents/collection-contents.component.mjs +61 -13
  94. package/esm2020/catalog/components/collection-detail/collection-detail.component.mjs +70 -32
  95. package/esm2020/catalog/components/collection-list/collection-list-bulk-actions.mjs +143 -0
  96. package/esm2020/catalog/components/collection-list/collection-list.component.mjs +46 -12
  97. package/esm2020/catalog/components/collection-tree/array-to-tree.mjs +3 -3
  98. package/esm2020/catalog/components/collection-tree/collection-tree-node.component.mjs +36 -10
  99. package/esm2020/catalog/components/collection-tree/collection-tree.component.mjs +9 -4
  100. package/esm2020/catalog/components/facet-detail/facet-detail.component.mjs +3 -3
  101. package/esm2020/catalog/components/facet-list/facet-list-bulk-actions.mjs +202 -0
  102. package/esm2020/catalog/components/facet-list/facet-list.component.mjs +14 -5
  103. package/esm2020/catalog/components/generate-product-variants/generate-product-variants.component.mjs +12 -4
  104. package/esm2020/catalog/components/option-value-input/option-value-input.component.mjs +70 -11
  105. package/esm2020/catalog/components/product-detail/product-detail.component.mjs +36 -24
  106. package/esm2020/catalog/components/product-list/product-list-bulk-actions.mjs +168 -0
  107. package/esm2020/catalog/components/product-list/product-list.component.mjs +13 -9
  108. package/esm2020/catalog/components/product-variants-editor/product-variants-editor.component.mjs +130 -19
  109. package/esm2020/catalog/components/product-variants-list/product-variants-list.component.mjs +9 -3
  110. package/esm2020/catalog/providers/routing/collection-resolver.mjs +2 -1
  111. package/esm2020/catalog/public_api.mjs +7 -2
  112. package/esm2020/core/app.component.module.mjs +1 -1
  113. package/esm2020/core/common/base-detail.component.mjs +1 -1
  114. package/esm2020/core/common/component-registry-types.mjs +1 -1
  115. package/esm2020/core/common/deactivate-aware.mjs +1 -1
  116. package/esm2020/core/common/generated-types.mjs +31 -1
  117. package/esm2020/core/common/introspection-result.mjs +296 -189
  118. package/esm2020/core/common/utilities/bulk-action-utils.mjs +35 -0
  119. package/esm2020/core/common/utilities/configurable-operation-utils.mjs +37 -10
  120. package/esm2020/core/common/utilities/selection-manager.mjs +96 -0
  121. package/esm2020/core/common/version.mjs +2 -2
  122. package/esm2020/core/components/app-shell/app-shell.component.mjs +6 -5
  123. package/esm2020/core/components/breadcrumb/breadcrumb.component.mjs +2 -2
  124. package/esm2020/core/components/channel-switcher/channel-switcher.component.mjs +1 -1
  125. package/esm2020/core/components/main-nav/main-nav.component.mjs +3 -3
  126. package/esm2020/core/components/user-menu/user-menu.component.mjs +1 -1
  127. package/esm2020/core/core.module.mjs +1 -1
  128. package/esm2020/core/data/definitions/collection-definitions.mjs +47 -1
  129. package/esm2020/core/data/definitions/facet-definitions.mjs +31 -1
  130. package/esm2020/core/data/definitions/order-definitions.mjs +583 -455
  131. package/esm2020/core/data/definitions/product-definitions.mjs +23 -1
  132. package/esm2020/core/data/definitions/shared-definitions.mjs +29 -28
  133. package/esm2020/core/data/providers/collection-data.service.mjs +20 -2
  134. package/esm2020/core/data/providers/customer-data.service.mjs +6 -1
  135. package/esm2020/core/data/providers/facet-data.service.mjs +18 -2
  136. package/esm2020/core/data/providers/order-data.service.mjs +43 -2
  137. package/esm2020/core/data/providers/product-data.service.mjs +10 -2
  138. package/esm2020/core/data/providers/promotion-data.service.mjs +1 -1
  139. package/esm2020/core/data/utils/remove-readonly-custom-fields.mjs +8 -1
  140. package/esm2020/core/providers/bulk-action-registry/bulk-action-registry.service.mjs +28 -0
  141. package/esm2020/core/providers/bulk-action-registry/bulk-action-types.mjs +2 -0
  142. package/esm2020/core/providers/bulk-action-registry/register-bulk-action.mjs +63 -0
  143. package/esm2020/core/providers/dashboard-widget/dashboard-widget.service.mjs +1 -4
  144. package/esm2020/core/providers/local-storage/local-storage.service.mjs +1 -1
  145. package/esm2020/core/providers/modal/modal.service.mjs +2 -1
  146. package/esm2020/core/providers/modal/modal.types.mjs +1 -1
  147. package/esm2020/core/providers/nav-builder/nav-builder-types.mjs +1 -1
  148. package/esm2020/core/public_api.mjs +25 -2
  149. package/esm2020/core/shared/components/action-bar/action-bar.component.mjs +7 -15
  150. package/esm2020/core/shared/components/address-form/address-form.component.mjs +3 -3
  151. package/esm2020/core/shared/components/asset-gallery/asset-gallery.component.mjs +34 -51
  152. package/esm2020/core/shared/components/asset-preview/asset-preview.component.mjs +4 -4
  153. package/esm2020/core/shared/components/asset-preview-links/asset-preview-links.component.mjs +1 -1
  154. package/esm2020/core/shared/components/bulk-action-menu/bulk-action-menu.component.mjs +97 -0
  155. package/esm2020/core/shared/components/configurable-input/configurable-input.component.mjs +22 -10
  156. package/esm2020/core/shared/components/custom-field-control/custom-field-control.component.mjs +18 -10
  157. package/esm2020/core/shared/components/data-table/data-table.component.mjs +64 -14
  158. package/esm2020/core/shared/components/datetime-picker/datetime-picker.component.mjs +1 -1
  159. package/esm2020/core/shared/components/dropdown/dropdown-menu.component.mjs +26 -23
  160. package/esm2020/core/shared/components/dropdown/dropdown-trigger.directive.mjs +1 -1
  161. package/esm2020/core/shared/components/entity-info/entity-info.component.mjs +1 -1
  162. package/esm2020/core/shared/components/facet-value-selector/facet-value-selector.component.mjs +13 -6
  163. package/esm2020/core/shared/components/formatted-address/formatted-address.component.mjs +3 -3
  164. package/esm2020/core/shared/components/help-tooltip/help-tooltip.component.mjs +2 -2
  165. package/esm2020/core/shared/components/history-entry-detail/history-entry-detail.component.mjs +1 -1
  166. package/esm2020/core/shared/components/language-selector/language-selector.component.mjs +3 -3
  167. package/esm2020/core/shared/components/object-tree/object-tree.component.mjs +1 -1
  168. package/esm2020/core/shared/components/order-state-label/order-state-label.component.mjs +2 -1
  169. package/esm2020/core/shared/components/product-multi-selector-dialog/product-multi-selector-dialog.component.mjs +135 -0
  170. package/esm2020/core/shared/components/product-search-input/product-search-input.component.mjs +108 -0
  171. package/esm2020/core/shared/components/product-variant-selector/product-variant-selector.component.mjs +2 -2
  172. package/esm2020/core/shared/components/radio-card/radio-card-fieldset.component.mjs +54 -0
  173. package/esm2020/core/shared/components/radio-card/radio-card.component.mjs +53 -0
  174. package/esm2020/core/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component.mjs +3 -3
  175. package/esm2020/core/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.component.mjs +136 -0
  176. package/esm2020/core/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.service.mjs +46 -0
  177. package/esm2020/core/shared/components/rich-text-editor/prosemirror/custom-nodes.mjs +57 -0
  178. package/esm2020/core/shared/components/rich-text-editor/prosemirror/menu/links.mjs +4 -4
  179. package/esm2020/core/shared/components/rich-text-editor/prosemirror/menu/menu-common.mjs +22 -1
  180. package/esm2020/core/shared/components/rich-text-editor/prosemirror/menu/menu-plugin.mjs +12 -0
  181. package/esm2020/core/shared/components/rich-text-editor/prosemirror/menu/menu.mjs +73 -18
  182. package/esm2020/core/shared/components/rich-text-editor/prosemirror/menu/sub-menu-with-icon.mjs +16 -0
  183. package/esm2020/core/shared/components/rich-text-editor/prosemirror/plugins/image-plugin.mjs +100 -0
  184. package/esm2020/core/shared/components/rich-text-editor/prosemirror/plugins/raw-editor-plugin.mjs +96 -0
  185. package/esm2020/core/shared/components/rich-text-editor/prosemirror/plugins/tables-plugin.mjs +166 -0
  186. package/esm2020/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.mjs +47 -18
  187. package/esm2020/core/shared/components/rich-text-editor/prosemirror/types.mjs +1 -1
  188. package/esm2020/core/shared/components/rich-text-editor/raw-html-dialog/raw-html-dialog.component.mjs +59 -0
  189. package/esm2020/core/shared/components/rich-text-editor/rich-text-editor.component.mjs +22 -10
  190. package/esm2020/core/shared/components/select-toggle/select-toggle.component.mjs +6 -3
  191. package/esm2020/core/shared/components/simple-dialog/simple-dialog.component.mjs +3 -3
  192. package/esm2020/core/shared/components/ui-extension-point/ui-extension-point.component.mjs +1 -1
  193. package/esm2020/core/shared/dynamic-form-inputs/code-editor-form-input/base-code-editor-form-input.component.mjs +57 -0
  194. package/esm2020/core/shared/dynamic-form-inputs/code-editor-form-input/html-editor-form-input.component.mjs +63 -0
  195. package/esm2020/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.mjs +48 -83
  196. package/esm2020/core/shared/dynamic-form-inputs/combination-mode-form-input/combination-mode-form-input.component.mjs +45 -0
  197. package/esm2020/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.mjs +3 -3
  198. package/esm2020/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.mjs +12 -3
  199. package/esm2020/core/shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component.mjs +48 -0
  200. package/esm2020/core/shared/dynamic-form-inputs/register-dynamic-input-components.mjs +7 -1
  201. package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.mjs +11 -9
  202. package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/generic/relation-generic-input.component.mjs +1 -1
  203. package/esm2020/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.mjs +21 -11
  204. package/esm2020/core/shared/pipes/custom-field-description.pipe.mjs +30 -0
  205. package/esm2020/core/shared/pipes/custom-field-label.pipe.mjs +7 -19
  206. package/esm2020/core/shared/pipes/locale-currency.pipe.mjs +10 -2
  207. package/esm2020/core/shared/pipes/state-i18n-token.pipe.mjs +2 -1
  208. package/esm2020/core/shared/shared.module.mjs +49 -5
  209. package/esm2020/customer/components/address-card/address-card.component.mjs +1 -1
  210. package/esm2020/customer/components/customer-detail/customer-detail.component.mjs +1 -1
  211. package/esm2020/customer/components/customer-group-list/customer-group-list.component.mjs +33 -18
  212. package/esm2020/customer/components/customer-group-member-list/customer-group-member-list.component.mjs +3 -3
  213. package/esm2020/customer/components/customer-history/customer-history.component.mjs +1 -1
  214. package/esm2020/customer/components/customer-list/customer-list.component.mjs +3 -3
  215. package/esm2020/dashboard/components/dashboard/dashboard.component.mjs +2 -2
  216. package/esm2020/dashboard/components/dashboard-widget/dashboard-widget.component.mjs +2 -2
  217. package/esm2020/dashboard/dashboard.module.mjs +6 -2
  218. package/esm2020/dashboard/widgets/latest-orders-widget/latest-orders-widget.component.mjs +1 -1
  219. package/esm2020/dashboard/widgets/order-summary-widget/order-summary-widget.component.mjs +2 -2
  220. package/esm2020/login/components/login/login.component.mjs +3 -3
  221. package/esm2020/marketing/components/promotion-detail/promotion-detail.component.mjs +3 -3
  222. package/esm2020/marketing/components/promotion-list/promotion-list.component.mjs +1 -1
  223. package/esm2020/order/components/cancel-order-dialog/cancel-order-dialog.component.mjs +1 -1
  224. package/esm2020/order/components/coupon-code-selector/coupon-code-selector.component.mjs +42 -0
  225. package/esm2020/order/components/draft-order-detail/draft-order-detail.component.mjs +187 -0
  226. package/esm2020/order/components/draft-order-variant-selector/draft-order-variant-selector.component.mjs +59 -0
  227. package/esm2020/order/components/fulfill-order-dialog/fulfill-order-dialog.component.mjs +7 -3
  228. package/esm2020/order/components/fulfillment-card/fulfillment-card.component.mjs +1 -1
  229. package/esm2020/order/components/fulfillment-detail/fulfillment-detail.component.mjs +8 -17
  230. package/esm2020/order/components/line-fulfillment/line-fulfillment.component.mjs +8 -22
  231. package/esm2020/order/components/order-custom-fields-card/order-custom-fields-card.component.mjs +30 -6
  232. package/esm2020/order/components/order-detail/order-detail.component.mjs +80 -40
  233. package/esm2020/order/components/order-editor/order-editor.component.mjs +15 -14
  234. package/esm2020/order/components/order-edits-preview-dialog/order-edits-preview-dialog.component.mjs +1 -1
  235. package/esm2020/order/components/order-history/order-history.component.mjs +1 -1
  236. package/esm2020/order/components/order-list/order-list.component.mjs +40 -17
  237. package/esm2020/order/components/order-payment-card/order-payment-card.component.mjs +3 -3
  238. package/esm2020/order/components/order-table/order-table.component.mjs +29 -6
  239. package/esm2020/order/components/refund-order-dialog/refund-order-dialog.component.mjs +2 -2
  240. package/esm2020/order/components/select-address-dialog/select-address-dialog.component.mjs +89 -0
  241. package/esm2020/order/components/select-address-dialog/select-address-dialog.graphql.mjs +14 -0
  242. package/esm2020/order/components/select-customer-dialog/select-customer-dialog.component.mjs +59 -0
  243. package/esm2020/order/components/select-shipping-method-dialog/select-shipping-method-dialog.component.mjs +31 -0
  244. package/esm2020/order/order.module.mjs +20 -2
  245. package/esm2020/order/order.routes.mjs +23 -4
  246. package/esm2020/order/providers/routing/order-resolver.mjs +29 -11
  247. package/esm2020/order/providers/routing/order.guard.mjs +37 -0
  248. package/esm2020/order/public_api.mjs +9 -1
  249. package/esm2020/settings/components/administrator-list/administrator-list.component.mjs +1 -1
  250. package/esm2020/settings/components/channel-list/channel-list.component.mjs +1 -1
  251. package/esm2020/settings/components/country-list/country-list.component.mjs +3 -3
  252. package/esm2020/settings/components/payment-method-detail/payment-method-detail.component.mjs +1 -1
  253. package/esm2020/settings/components/payment-method-list/payment-method-list.component.mjs +1 -1
  254. package/esm2020/settings/components/permission-grid/permission-grid.component.mjs +1 -1
  255. package/esm2020/settings/components/profile/profile.component.mjs +3 -3
  256. package/esm2020/settings/components/role-list/role-list.component.mjs +1 -1
  257. package/esm2020/settings/components/shipping-method-detail/shipping-method-detail.component.mjs +4 -2
  258. package/esm2020/settings/components/shipping-method-list/shipping-method-list.component.mjs +1 -1
  259. package/esm2020/settings/components/tax-category-list/tax-category-list.component.mjs +1 -1
  260. package/esm2020/settings/components/tax-rate-list/tax-rate-list.component.mjs +1 -1
  261. package/esm2020/settings/components/zone-detail-dialog/zone-detail-dialog.component.mjs +2 -2
  262. package/esm2020/settings/components/zone-list/zone-list.component.mjs +3 -3
  263. package/esm2020/settings/components/zone-member-list/zone-member-list.component.mjs +3 -3
  264. package/esm2020/system/components/health-check/health-check.component.mjs +2 -2
  265. package/esm2020/system/components/job-list/job-list.component.mjs +1 -1
  266. package/fesm2015/vendure-admin-ui-catalog.mjs +1206 -228
  267. package/fesm2015/vendure-admin-ui-catalog.mjs.map +1 -1
  268. package/fesm2015/vendure-admin-ui-core.mjs +9451 -7332
  269. package/fesm2015/vendure-admin-ui-core.mjs.map +1 -1
  270. package/fesm2015/vendure-admin-ui-customer.mjs +36 -23
  271. package/fesm2015/vendure-admin-ui-customer.mjs.map +1 -1
  272. package/fesm2015/vendure-admin-ui-dashboard.mjs +11 -7
  273. package/fesm2015/vendure-admin-ui-dashboard.mjs.map +1 -1
  274. package/fesm2015/vendure-admin-ui-login.mjs +2 -2
  275. package/fesm2015/vendure-admin-ui-login.mjs.map +1 -1
  276. package/fesm2015/vendure-admin-ui-marketing.mjs +3 -3
  277. package/fesm2015/vendure-admin-ui-marketing.mjs.map +1 -1
  278. package/fesm2015/vendure-admin-ui-order.mjs +1184 -599
  279. package/fesm2015/vendure-admin-ui-order.mjs.map +1 -1
  280. package/fesm2015/vendure-admin-ui-settings.mjs +21 -19
  281. package/fesm2015/vendure-admin-ui-settings.mjs.map +1 -1
  282. package/fesm2015/vendure-admin-ui-system.mjs +3 -3
  283. package/fesm2020/vendure-admin-ui-catalog.mjs +1190 -230
  284. package/fesm2020/vendure-admin-ui-catalog.mjs.map +1 -1
  285. package/fesm2020/vendure-admin-ui-core.mjs +9539 -7437
  286. package/fesm2020/vendure-admin-ui-core.mjs.map +1 -1
  287. package/fesm2020/vendure-admin-ui-customer.mjs +36 -23
  288. package/fesm2020/vendure-admin-ui-customer.mjs.map +1 -1
  289. package/fesm2020/vendure-admin-ui-dashboard.mjs +11 -7
  290. package/fesm2020/vendure-admin-ui-dashboard.mjs.map +1 -1
  291. package/fesm2020/vendure-admin-ui-login.mjs +2 -2
  292. package/fesm2020/vendure-admin-ui-login.mjs.map +1 -1
  293. package/fesm2020/vendure-admin-ui-marketing.mjs +3 -3
  294. package/fesm2020/vendure-admin-ui-marketing.mjs.map +1 -1
  295. package/fesm2020/vendure-admin-ui-order.mjs +1194 -614
  296. package/fesm2020/vendure-admin-ui-order.mjs.map +1 -1
  297. package/fesm2020/vendure-admin-ui-settings.mjs +21 -19
  298. package/fesm2020/vendure-admin-ui-settings.mjs.map +1 -1
  299. package/fesm2020/vendure-admin-ui-system.mjs +3 -3
  300. package/order/components/coupon-code-selector/coupon-code-selector.component.d.ts +21 -0
  301. package/order/components/draft-order-detail/draft-order-detail.component.d.ts +52 -0
  302. package/order/components/draft-order-variant-selector/draft-order-variant-selector.component.d.ts +24 -0
  303. package/order/components/order-custom-fields-card/order-custom-fields-card.component.d.ts +4 -2
  304. package/order/components/order-editor/order-editor.component.d.ts +1 -6
  305. package/order/components/order-list/order-list.component.d.ts +2 -0
  306. package/order/components/order-table/order-table.component.d.ts +12 -2
  307. package/order/components/select-address-dialog/select-address-dialog.component.d.ts +27 -0
  308. package/order/components/select-address-dialog/select-address-dialog.graphql.d.ts +1 -0
  309. package/order/components/select-customer-dialog/select-customer-dialog.component.d.ts +25 -0
  310. package/order/components/select-shipping-method-dialog/select-shipping-method-dialog.component.d.ts +19 -0
  311. package/order/order.module.d.ts +9 -3
  312. package/order/providers/routing/order-resolver.d.ts +8 -3
  313. package/order/providers/routing/order.guard.d.ts +12 -0
  314. package/order/public_api.d.ts +8 -0
  315. package/package.json +13 -12
  316. package/settings/components/zone-member-list/zone-member-list.component.d.ts +3 -1
  317. package/static/i18n-messages/cs.json +50 -3
  318. package/static/i18n-messages/de.json +53 -3
  319. package/static/i18n-messages/en.json +55 -8
  320. package/static/i18n-messages/es.json +50 -3
  321. package/static/i18n-messages/fr.json +50 -3
  322. package/static/i18n-messages/it.json +50 -3
  323. package/static/i18n-messages/pl.json +50 -3
  324. package/static/i18n-messages/pt_BR.json +50 -3
  325. package/static/i18n-messages/pt_PT.json +50 -3
  326. package/static/i18n-messages/ru.json +50 -3
  327. package/static/i18n-messages/uk.json +50 -3
  328. package/static/i18n-messages/zh_Hans.json +50 -3
  329. package/static/i18n-messages/zh_Hant.json +50 -3
  330. package/static/styles/_variables.scss +4 -0
  331. package/static/styles/global/_forms.scss +8 -7
  332. package/static/styles/global/_overrides.scss +11 -1
  333. package/static/styles/global/_sass-overrides.scss +3 -0
  334. package/static/styles/global/_utilities.scss +14 -0
  335. package/static/styles/styles.scss +1 -0
  336. package/static/styles/theme/default.scss +13 -1
  337. package/static/styles/ui-extension-theme.scss +1 -0
  338. package/static/theme.min.css +1 -1
  339. package/core/shared/components/rich-text-editor/prosemirror/menu/images.d.ts +0 -4
  340. package/esm2020/catalog/components/product-search-input/product-search-input.component.mjs +0 -107
  341. package/esm2020/core/shared/components/rich-text-editor/prosemirror/menu/images.mjs +0 -36
@@ -0,0 +1,187 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { FormGroup } from '@angular/forms';
3
+ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
4
+ import { BaseDetailComponent, DeletionResult, } from '@vendure/admin-ui/core';
5
+ import { combineLatest, Subject } from 'rxjs';
6
+ import { switchMap, take } from 'rxjs/operators';
7
+ import { SelectAddressDialogComponent } from '../select-address-dialog/select-address-dialog.component';
8
+ import { SelectCustomerDialogComponent } from '../select-customer-dialog/select-customer-dialog.component';
9
+ import { SelectShippingMethodDialogComponent } from '../select-shipping-method-dialog/select-shipping-method-dialog.component';
10
+ import * as i0 from "@angular/core";
11
+ import * as i1 from "@angular/router";
12
+ import * as i2 from "@vendure/admin-ui/core";
13
+ import * as i3 from "../../providers/order-transition.service";
14
+ import * as i4 from "../draft-order-variant-selector/draft-order-variant-selector.component";
15
+ import * as i5 from "../order-table/order-table.component";
16
+ import * as i6 from "../coupon-code-selector/coupon-code-selector.component";
17
+ import * as i7 from "../order-custom-fields-card/order-custom-fields-card.component";
18
+ import * as i8 from "@angular/common";
19
+ import * as i9 from "@clr/angular";
20
+ import * as i10 from "@ngx-translate/core";
21
+ export class DraftOrderDetailComponent extends BaseDetailComponent {
22
+ constructor(router, route, serverConfigService, changeDetector, dataService, notificationService, modalService, orderTransitionService) {
23
+ super(route, router, serverConfigService, dataService);
24
+ this.changeDetector = changeDetector;
25
+ this.dataService = dataService;
26
+ this.notificationService = notificationService;
27
+ this.modalService = modalService;
28
+ this.orderTransitionService = orderTransitionService;
29
+ this.detailForm = new FormGroup({});
30
+ this.fetchHistory = new Subject();
31
+ this.displayCouponCodeInput = false;
32
+ }
33
+ ngOnInit() {
34
+ this.init();
35
+ this.orderLineCustomFields = this.getCustomFieldConfig('OrderLine');
36
+ this.eligibleShippingMethods$ = this.entity$.pipe(switchMap(order => this.dataService.order
37
+ .getDraftOrderEligibleShippingMethods(order.id)
38
+ .mapSingle(({ eligibleShippingMethodsForDraftOrder }) => eligibleShippingMethodsForDraftOrder)));
39
+ this.customFields = this.getCustomFieldConfig('Order');
40
+ this.orderLineCustomFields = this.getCustomFieldConfig('OrderLine');
41
+ }
42
+ ngOnDestroy() {
43
+ this.destroy();
44
+ }
45
+ addItemToOrder(event) {
46
+ this.dataService.order.addItemToDraftOrder(this.id, event).subscribe(result => {
47
+ if (result.addItemToDraftOrder.__typename !== 'Order') {
48
+ this.notificationService.error(result.addItemToDraftOrder.message);
49
+ }
50
+ });
51
+ }
52
+ adjustOrderLine(event) {
53
+ this.dataService.order
54
+ .adjustDraftOrderLine(this.id, { orderLineId: event.lineId, quantity: event.quantity })
55
+ .subscribe(result => {
56
+ if (result.adjustDraftOrderLine.__typename !== 'Order') {
57
+ this.notificationService.error(result.adjustDraftOrderLine.message);
58
+ }
59
+ });
60
+ }
61
+ removeOrderLine(event) {
62
+ this.dataService.order.removeDraftOrderLine(this.id, event.lineId).subscribe(result => {
63
+ if (result.removeDraftOrderLine.__typename !== 'Order') {
64
+ this.notificationService.error(result.removeDraftOrderLine.message);
65
+ }
66
+ });
67
+ }
68
+ getOrderAddressLines(orderAddress) {
69
+ if (!orderAddress) {
70
+ return [];
71
+ }
72
+ return Object.values(orderAddress)
73
+ .filter(val => val !== 'OrderAddress')
74
+ .filter(line => !!line);
75
+ }
76
+ setCustomer() {
77
+ this.modalService.fromComponent(SelectCustomerDialogComponent).subscribe(result => {
78
+ if (this.hasId(result)) {
79
+ this.dataService.order
80
+ .setCustomerForDraftOrder(this.id, { customerId: result.id })
81
+ .subscribe();
82
+ }
83
+ else if (result) {
84
+ this.dataService.order.setCustomerForDraftOrder(this.id, { input: result }).subscribe();
85
+ }
86
+ });
87
+ }
88
+ setShippingAddress() {
89
+ this.entity$
90
+ .pipe(take(1), switchMap(order => {
91
+ return this.modalService.fromComponent(SelectAddressDialogComponent, {
92
+ locals: {
93
+ customerId: order.customer?.id,
94
+ currentAddress: order.shippingAddress ?? undefined,
95
+ },
96
+ });
97
+ }))
98
+ .subscribe(result => {
99
+ if (result) {
100
+ this.dataService.order.setDraftOrderShippingAddress(this.id, result).subscribe();
101
+ }
102
+ });
103
+ }
104
+ setBillingAddress() {
105
+ this.entity$
106
+ .pipe(take(1), switchMap(order => {
107
+ return this.modalService.fromComponent(SelectAddressDialogComponent, {
108
+ locals: {
109
+ customerId: order.customer?.id,
110
+ currentAddress: order.billingAddress ?? undefined,
111
+ },
112
+ });
113
+ }))
114
+ .subscribe(result => {
115
+ if (result) {
116
+ this.dataService.order.setDraftOrderBillingAddress(this.id, result).subscribe();
117
+ }
118
+ });
119
+ }
120
+ applyCouponCode(couponCode) {
121
+ this.dataService.order.applyCouponCodeToDraftOrder(this.id, couponCode).subscribe();
122
+ }
123
+ removeCouponCode(couponCode) {
124
+ this.dataService.order.removeCouponCodeFromDraftOrder(this.id, couponCode).subscribe();
125
+ }
126
+ setShippingMethod() {
127
+ combineLatest(this.entity$, this.eligibleShippingMethods$)
128
+ .pipe(take(1), switchMap(([order, methods]) => this.modalService.fromComponent(SelectShippingMethodDialogComponent, {
129
+ locals: {
130
+ eligibleShippingMethods: methods,
131
+ currencyCode: order.currencyCode,
132
+ currentSelectionId: order.shippingLines?.[0]?.shippingMethod.id,
133
+ },
134
+ })))
135
+ .subscribe(result => {
136
+ if (result) {
137
+ this.dataService.order.setDraftOrderShippingMethod(this.id, result).subscribe();
138
+ }
139
+ });
140
+ }
141
+ updateCustomFields(customFieldsValue) {
142
+ this.dataService.order
143
+ .updateOrderCustomFields({
144
+ id: this.id,
145
+ customFields: customFieldsValue,
146
+ })
147
+ .subscribe();
148
+ }
149
+ deleteOrder() {
150
+ this.dataService.order.deleteDraftOrder(this.id).subscribe(({ deleteDraftOrder }) => {
151
+ if (deleteDraftOrder.result === DeletionResult.DELETED) {
152
+ this.notificationService.success(_('common.notify-delete-success'), {
153
+ entity: 'Order',
154
+ });
155
+ this.router.navigate(['/orders']);
156
+ }
157
+ else if (deleteDraftOrder.message) {
158
+ this.notificationService.error(deleteDraftOrder.message);
159
+ }
160
+ });
161
+ }
162
+ completeOrder() {
163
+ this.dataService.order
164
+ .transitionToState(this.id, 'ArrangingPayment')
165
+ .subscribe(({ transitionOrderToState }) => {
166
+ if (transitionOrderToState?.__typename === 'Order') {
167
+ this.router.navigate(['/orders', this.id]);
168
+ }
169
+ else if (transitionOrderToState?.__typename === 'OrderStateTransitionError') {
170
+ this.notificationService.error(transitionOrderToState.transitionError);
171
+ }
172
+ });
173
+ }
174
+ hasId(input) {
175
+ return typeof input === 'object' && !!input.id;
176
+ }
177
+ setFormValues(entity) {
178
+ // empty
179
+ }
180
+ }
181
+ DraftOrderDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DraftOrderDetailComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.ServerConfigService }, { token: i0.ChangeDetectorRef }, { token: i2.DataService }, { token: i2.NotificationService }, { token: i2.ModalService }, { token: i3.OrderTransitionService }], target: i0.ɵɵFactoryTarget.Component });
182
+ DraftOrderDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: DraftOrderDetailComponent, selector: "vdr-draft-order-detail", usesInheritance: true, ngImport: i0, template: "<vdr-action-bar *ngIf=\"entity$ | async as order\">\r\n <vdr-ab-left>\r\n <div class=\"flex clr-align-items-center\">\r\n <vdr-entity-info [entity]=\"entity$ | async\"></vdr-entity-info>\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </div>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"completeOrder()\"\r\n [disabled]=\"!order.customer || !order.lines.length || !order.shippingLines.length\"\r\n >\r\n <clr-icon shape=\"check\"></clr-icon>\r\n {{ 'order.complete-draft-order' | translate }}\r\n </button>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button type=\"button\" class=\"btn\" vdrDropdownItem (click)=\"deleteOrder()\">\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'order.delete-draft-order' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </vdr-ab-right>\r\n</vdr-action-bar>\r\n\r\n<div *ngIf=\"entity$ | async as order\">\r\n <div class=\"clr-row\">\r\n <div class=\"clr-col-lg-8\">\r\n <vdr-draft-order-variant-selector\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n [currencyCode]=\"order.currencyCode\"\r\n (addItem)=\"addItemToOrder($event)\"\r\n ></vdr-draft-order-variant-selector>\r\n <vdr-order-table\r\n [order]=\"order\"\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n [isDraft]=\"true\"\r\n (adjust)=\"adjustOrderLine($event)\"\r\n (remove)=\"removeOrderLine($event)\"\r\n ></vdr-order-table>\r\n <div class=\"flex\">\r\n <button\r\n *ngIf=\"order.couponCodes.length === 0 && !displayCouponCodeInput\"\r\n class=\"btn btn-link btn-sm mr2\"\r\n (click)=\"displayCouponCodeInput = !displayCouponCodeInput\"\r\n >\r\n {{ 'order.set-coupon-codes' | translate }}\r\n </button>\r\n <div *ngIf=\"order.couponCodes.length || displayCouponCodeInput\">\r\n <label>{{ 'order.set-coupon-codes' | translate }}</label>\r\n <vdr-coupon-code-selector\r\n [couponCodes]=\"order.couponCodes\"\r\n (addCouponCode)=\"applyCouponCode($event)\"\r\n (removeCouponCode)=\"removeCouponCode($event)\"\r\n ></vdr-coupon-code-selector>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"order.taxSummary.length\">\r\n <h4>{{ 'order.tax-summary' | translate }}</h4>\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'common.description' | translate }}</th>\r\n <th>{{ 'order.tax-rate' | translate }}</th>\r\n <th>{{ 'order.tax-base' | translate }}</th>\r\n <th>{{ 'order.tax-total' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of order.taxSummary\">\r\n <td>{{ row.description }}</td>\r\n <td>{{ row.taxRate / 100 | percent }}</td>\r\n <td>{{ row.taxBase | localeCurrency: order.currencyCode }}</td>\r\n <td>{{ row.taxTotal | localeCurrency: order.currencyCode }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n </div>\r\n <div class=\"clr-col-lg-4 order-cards\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <clr-icon *ngIf=\"!order.customer\" shape=\"unknown-status\" class=\"is-warning\"></clr-icon>\r\n <clr-icon *ngIf=\"order.customer\" shape=\"check\" class=\"is-success\"></clr-icon>\r\n {{ 'order.customer' | translate }}\r\n </div>\r\n <div class=\"card-block\">\r\n <div class=\"card-text\">\r\n <vdr-customer-label\r\n class=\"block mb2\"\r\n *ngIf=\"order.customer\"\r\n [customer]=\"order.customer\"\r\n ></vdr-customer-label>\r\n <button class=\"btn btn-link btn-sm\" (click)=\"setCustomer()\">\r\n {{ 'order.set-customer-for-order' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"card-block\">\r\n <h4 class=\"card-title\">\r\n <clr-icon\r\n *ngIf=\"!order.billingAddress.streetLine1\"\r\n shape=\"unknown-status\"\r\n class=\"is-warning\"\r\n ></clr-icon>\r\n <clr-icon\r\n *ngIf=\"order.billingAddress.streetLine1\"\r\n shape=\"check\"\r\n class=\"is-success\"\r\n ></clr-icon>\r\n {{ 'order.billing-address' | translate }}\r\n </h4>\r\n <div class=\"card-text\">\r\n <vdr-formatted-address\r\n class=\"block mb2\"\r\n *ngIf=\"order.billingAddress\"\r\n [address]=\"order.billingAddress\"\r\n ></vdr-formatted-address>\r\n <button class=\"btn btn-link btn-sm\" (click)=\"setBillingAddress()\">\r\n {{ 'order.set-billing-address' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <clr-icon\r\n *ngIf=\"!order.shippingAddress.streetLine1 || !order.shippingLines.length\"\r\n shape=\"unknown-status\"\r\n class=\"is-warning\"\r\n ></clr-icon>\r\n <clr-icon\r\n *ngIf=\"order.shippingAddress.streetLine1 && order.shippingLines.length\"\r\n shape=\"check\"\r\n class=\"is-success\"\r\n ></clr-icon>\r\n {{ 'order.shipping' | translate }}\r\n </div>\r\n <div class=\"card-block\">\r\n <div class=\"card-text\">\r\n <vdr-formatted-address\r\n class=\"block mb2\"\r\n *ngIf=\"order.shippingAddress\"\r\n [address]=\"order.shippingAddress\"\r\n ></vdr-formatted-address>\r\n <button class=\"btn btn-link btn-sm\" (click)=\"setShippingAddress()\">\r\n {{ 'order.set-shipping-address' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"card-block\">\r\n <div class=\"card-text\">\r\n <div *ngFor=\"let shippingLine of order.shippingLines\">\r\n {{ shippingLine.shippingMethod.name }}\r\n </div>\r\n <button class=\"btn btn-link btn-sm\" (click)=\"setShippingMethod()\">\r\n {{ 'order.set-shipping-method' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <vdr-order-custom-fields-card\r\n [customFieldsConfig]=\"customFields\"\r\n [customFieldValues]=\"order.customFields\"\r\n (updateClick)=\"updateCustomFields($event)\"\r\n ></vdr-order-custom-fields-card>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], components: [{ type: i2.ActionBarComponent, selector: "vdr-action-bar" }, { type: i2.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { type: i2.EntityInfoComponent, selector: "vdr-entity-info", inputs: ["small", "entity"] }, { type: i2.OrderStateLabelComponent, selector: "vdr-order-state-label", inputs: ["state"] }, { type: i2.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { type: i2.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { type: i2.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }, { type: i4.DraftOrderVariantSelectorComponent, selector: "vdr-draft-order-variant-selector", inputs: ["currencyCode", "orderLineCustomFields"], outputs: ["addItem"] }, { type: i5.OrderTableComponent, selector: "vdr-order-table", inputs: ["order", "orderLineCustomFields", "isDraft"], outputs: ["adjust", "remove"] }, { type: i6.CouponCodeSelectorComponent, selector: "vdr-coupon-code-selector", inputs: ["couponCodes", "control"], outputs: ["addCouponCode", "removeCouponCode"] }, { type: i2.CustomerLabelComponent, selector: "vdr-customer-label", inputs: ["customer"] }, { type: i2.FormattedAddressComponent, selector: "vdr-formatted-address", inputs: ["address"] }, { type: i7.OrderCustomFieldsCardComponent, selector: "vdr-order-custom-fields-card", inputs: ["customFieldsConfig", "customFieldValues"], outputs: ["updateClick"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.ClrIconCustomTag, selector: "clr-icon" }, { type: i2.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { type: i2.DropdownItemDirective, selector: "[vdrDropdownItem]" }, { type: i9.ClrLabel, selector: "label", inputs: ["for"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i8.AsyncPipe, "translate": i10.TranslatePipe, "percent": i8.PercentPipe, "localeCurrency": i2.LocaleCurrencyPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DraftOrderDetailComponent, decorators: [{
184
+ type: Component,
185
+ args: [{ selector: 'vdr-draft-order-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-action-bar *ngIf=\"entity$ | async as order\">\r\n <vdr-ab-left>\r\n <div class=\"flex clr-align-items-center\">\r\n <vdr-entity-info [entity]=\"entity$ | async\"></vdr-entity-info>\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </div>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"completeOrder()\"\r\n [disabled]=\"!order.customer || !order.lines.length || !order.shippingLines.length\"\r\n >\r\n <clr-icon shape=\"check\"></clr-icon>\r\n {{ 'order.complete-draft-order' | translate }}\r\n </button>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button type=\"button\" class=\"btn\" vdrDropdownItem (click)=\"deleteOrder()\">\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'order.delete-draft-order' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </vdr-ab-right>\r\n</vdr-action-bar>\r\n\r\n<div *ngIf=\"entity$ | async as order\">\r\n <div class=\"clr-row\">\r\n <div class=\"clr-col-lg-8\">\r\n <vdr-draft-order-variant-selector\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n [currencyCode]=\"order.currencyCode\"\r\n (addItem)=\"addItemToOrder($event)\"\r\n ></vdr-draft-order-variant-selector>\r\n <vdr-order-table\r\n [order]=\"order\"\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n [isDraft]=\"true\"\r\n (adjust)=\"adjustOrderLine($event)\"\r\n (remove)=\"removeOrderLine($event)\"\r\n ></vdr-order-table>\r\n <div class=\"flex\">\r\n <button\r\n *ngIf=\"order.couponCodes.length === 0 && !displayCouponCodeInput\"\r\n class=\"btn btn-link btn-sm mr2\"\r\n (click)=\"displayCouponCodeInput = !displayCouponCodeInput\"\r\n >\r\n {{ 'order.set-coupon-codes' | translate }}\r\n </button>\r\n <div *ngIf=\"order.couponCodes.length || displayCouponCodeInput\">\r\n <label>{{ 'order.set-coupon-codes' | translate }}</label>\r\n <vdr-coupon-code-selector\r\n [couponCodes]=\"order.couponCodes\"\r\n (addCouponCode)=\"applyCouponCode($event)\"\r\n (removeCouponCode)=\"removeCouponCode($event)\"\r\n ></vdr-coupon-code-selector>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"order.taxSummary.length\">\r\n <h4>{{ 'order.tax-summary' | translate }}</h4>\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'common.description' | translate }}</th>\r\n <th>{{ 'order.tax-rate' | translate }}</th>\r\n <th>{{ 'order.tax-base' | translate }}</th>\r\n <th>{{ 'order.tax-total' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of order.taxSummary\">\r\n <td>{{ row.description }}</td>\r\n <td>{{ row.taxRate / 100 | percent }}</td>\r\n <td>{{ row.taxBase | localeCurrency: order.currencyCode }}</td>\r\n <td>{{ row.taxTotal | localeCurrency: order.currencyCode }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n </div>\r\n <div class=\"clr-col-lg-4 order-cards\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <clr-icon *ngIf=\"!order.customer\" shape=\"unknown-status\" class=\"is-warning\"></clr-icon>\r\n <clr-icon *ngIf=\"order.customer\" shape=\"check\" class=\"is-success\"></clr-icon>\r\n {{ 'order.customer' | translate }}\r\n </div>\r\n <div class=\"card-block\">\r\n <div class=\"card-text\">\r\n <vdr-customer-label\r\n class=\"block mb2\"\r\n *ngIf=\"order.customer\"\r\n [customer]=\"order.customer\"\r\n ></vdr-customer-label>\r\n <button class=\"btn btn-link btn-sm\" (click)=\"setCustomer()\">\r\n {{ 'order.set-customer-for-order' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"card-block\">\r\n <h4 class=\"card-title\">\r\n <clr-icon\r\n *ngIf=\"!order.billingAddress.streetLine1\"\r\n shape=\"unknown-status\"\r\n class=\"is-warning\"\r\n ></clr-icon>\r\n <clr-icon\r\n *ngIf=\"order.billingAddress.streetLine1\"\r\n shape=\"check\"\r\n class=\"is-success\"\r\n ></clr-icon>\r\n {{ 'order.billing-address' | translate }}\r\n </h4>\r\n <div class=\"card-text\">\r\n <vdr-formatted-address\r\n class=\"block mb2\"\r\n *ngIf=\"order.billingAddress\"\r\n [address]=\"order.billingAddress\"\r\n ></vdr-formatted-address>\r\n <button class=\"btn btn-link btn-sm\" (click)=\"setBillingAddress()\">\r\n {{ 'order.set-billing-address' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <clr-icon\r\n *ngIf=\"!order.shippingAddress.streetLine1 || !order.shippingLines.length\"\r\n shape=\"unknown-status\"\r\n class=\"is-warning\"\r\n ></clr-icon>\r\n <clr-icon\r\n *ngIf=\"order.shippingAddress.streetLine1 && order.shippingLines.length\"\r\n shape=\"check\"\r\n class=\"is-success\"\r\n ></clr-icon>\r\n {{ 'order.shipping' | translate }}\r\n </div>\r\n <div class=\"card-block\">\r\n <div class=\"card-text\">\r\n <vdr-formatted-address\r\n class=\"block mb2\"\r\n *ngIf=\"order.shippingAddress\"\r\n [address]=\"order.shippingAddress\"\r\n ></vdr-formatted-address>\r\n <button class=\"btn btn-link btn-sm\" (click)=\"setShippingAddress()\">\r\n {{ 'order.set-shipping-address' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"card-block\">\r\n <div class=\"card-text\">\r\n <div *ngFor=\"let shippingLine of order.shippingLines\">\r\n {{ shippingLine.shippingMethod.name }}\r\n </div>\r\n <button class=\"btn btn-link btn-sm\" (click)=\"setShippingMethod()\">\r\n {{ 'order.set-shipping-method' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <vdr-order-custom-fields-card\r\n [customFieldsConfig]=\"customFields\"\r\n [customFieldValues]=\"order.customFields\"\r\n (updateClick)=\"updateCustomFields($event)\"\r\n ></vdr-order-custom-fields-card>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""] }]
186
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.ServerConfigService }, { type: i0.ChangeDetectorRef }, { type: i2.DataService }, { type: i2.NotificationService }, { type: i2.ModalService }, { type: i3.OrderTransitionService }]; } });
187
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhZnQtb3JkZXItZGV0YWlsLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy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AgICAgICAgICAgIHRoaXMubm90aWZpY2F0aW9uU2VydmljZS5lcnJvcigocmVzdWx0LmFkanVzdERyYWZ0T3JkZXJMaW5lIGFzIGFueSkubWVzc2FnZSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHJlbW92ZU9yZGVyTGluZShldmVudDogeyBsaW5lSWQ6IHN0cmluZyB9KSB7XHJcbiAgICAgICAgdGhpcy5kYXRhU2VydmljZS5vcmRlci5yZW1vdmVEcmFmdE9yZGVyTGluZSh0aGlzLmlkLCBldmVudC5saW5lSWQpLnN1YnNjcmliZShyZXN1bHQgPT4ge1xyXG4gICAgICAgICAgICBpZiAocmVzdWx0LnJlbW92ZURyYWZ0T3JkZXJMaW5lLl9fdHlwZW5hbWUgIT09ICdPcmRlcicpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMubm90aWZpY2F0aW9uU2VydmljZS5lcnJvcigocmVzdWx0LnJlbW92ZURyYWZ0T3JkZXJMaW5lIGFzIGFueSkubWVzc2FnZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBnZXRPcmRlckFkZHJlc3NMaW5lcyhvcmRlckFkZHJlc3M/OiB7IFtrZXk6IHN0cmluZ106IHN0cmluZyB9KTogc3RyaW5nW10ge1xyXG4gICAgICAgIGlmICghb3JkZXJBZGRyZXNzKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBbXTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIE9iamVjdC52YWx1ZXMob3JkZXJBZGRyZXNzKVxyXG4gICAgICAgICAgICAuZmlsdGVyKHZhbCA9PiB2YWwgIT09ICdPcmRlckFkZHJlc3MnKVxyXG4gICAgICAgICAgICAuZmlsdGVyKGxpbmUgPT4gISFsaW5lKTtcclxuICAgIH1cclxuXHJcbiAgICBzZXRDdXN0b21lcigpIHtcclxuICAgICAgICB0aGlzLm1vZGFsU2VydmljZS5mcm9tQ29tcG9uZW50KFNlbGVjdEN1c3RvbWVyRGlhbG9nQ29tcG9uZW50KS5zdWJzY3JpYmUocmVzdWx0ID0+IHtcclxuICAgICAgICAgICAgaWYgKHRoaXMuaGFzSWQocmVzdWx0KSkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5kYXRhU2VydmljZS5vcmRlclxyXG4gICAgICAgICAgICAgICAgICAgIC5zZXRDdXN0b21lckZvckRyYWZ0T3JkZXIodGhpcy5pZCwgeyBjdXN0b21lcklkOiByZXN1bHQuaWQgfSlcclxuICAgICAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKCk7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzdWx0KSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmRhdGFTZXJ2aWNlLm9yZGVyLnNldEN1c3RvbWVyRm9yRHJhZnRPcmRlcih0aGlzLmlkLCB7IGlucHV0OiByZXN1bHQgfSkuc3Vic2NyaWJlKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBzZXRTaGlwcGluZ0FkZHJlc3MoKSB7XHJcbiAgICAgICAgdGhpcy5lbnRpdHkkXHJcbiAgICAgICAgICAgIC5waXBlKFxyXG4gICAgICAgICAgICAgICAgdGFrZSgxKSxcclxuICAgICAgICAgICAgICAgIHN3aXRjaE1hcChvcmRlciA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMubW9kYWxTZXJ2aWNlLmZyb21Db21wb25lbnQoU2VsZWN0QWRkcmVzc0RpYWxvZ0NvbXBvbmVudCwge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2NhbHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1c3RvbWVySWQ6IG9yZGVyLmN1c3RvbWVyPy5pZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRBZGRyZXNzOiBvcmRlci5zaGlwcGluZ0FkZHJlc3MgPz8gdW5kZWZpbmVkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSksXHJcbiAgICAgICAgICAgIClcclxuICAgICAgICAgICAgLnN1YnNjcmliZShyZXN1bHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZGF0YVNlcnZpY2Uub3JkZXIuc2V0RHJhZnRPcmRlclNoaXBwaW5nQWRkcmVzcyh0aGlzLmlkLCByZXN1bHQpLnN1YnNjcmliZSgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBzZXRCaWxsaW5nQWRkcmVzcygpIHtcclxuICAgICAgICB0aGlzLmVudGl0eSRcclxuICAgICAgICAgICAgLnBpcGUoXHJcbiAgICAgICAgICAgICAgICB0YWtlKDEpLFxyXG4gICAgICAgICAgICAgICAgc3dpdGNoTWFwKG9yZGVyID0+IHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5tb2RhbFNlcnZpY2UuZnJvbUNvbXBvbmVudChTZWxlY3RBZGRyZXNzRGlhbG9nQ29tcG9uZW50LCB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvY2Fsczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VzdG9tZXJJZDogb3JkZXIuY3VzdG9tZXI/LmlkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudEFkZHJlc3M6IG9yZGVyLmJpbGxpbmdBZGRyZXNzID8/IHVuZGVmaW5lZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0pLFxyXG4gICAgICAgICAgICApXHJcbi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ICAgICAgICAgICAgICAgICAgIGxvY2Fsczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxpZ2libGVTaGlwcGluZ01ldGhvZHM6IG1ldGhvZHMsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW5jeUNvZGU6IG9yZGVyLmN1cnJlbmN5Q29kZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTZWxlY3Rpb25JZDogb3JkZXIuc2hpcHBpbmdMaW5lcz8uWzBdPy5zaGlwcGluZ01ldGhvZC5pZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICB9KSxcclxuICAgICAgICAgICAgICAgICksXHJcbiAgICAgICAgICAgIClcclxuICAgICAgICAgICAgLnN1YnNjcmliZShyZXN1bHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZGF0YVNlcnZpY2Uub3JkZXIuc2V0RHJhZnRPcmRlclNoaXBwaW5nTWV0aG9kKHRoaXMuaWQsIHJlc3VsdCkuc3Vic2NyaWJlKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHVwZGF0ZUN1c3RvbUZpZWxkcyhjdXN0b21GaWVsZHNWYWx1ZTogYW55KSB7XHJcbiAgICAgICAgdGhpcy5kYXRhU2VydmljZS5vcmRlclxyXG4gICAgICAgICAgICAudXBkYXRlT3JkZXJDdXN0b21GaWVsZHMoe1xyXG4gICAgICAgICAgICAgICAgaWQ6IHRoaXMuaWQsXHJcbiAgICAgICAgICAgICAgICBjdXN0b21GaWVsZHM6IGN1c3RvbUZpZWxkc1ZhbHVlLFxyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAuc3Vic2NyaWJlKCk7XHJcbiAgICB9XHJcblxyXG4gICAgZGVsZXRlT3JkZXIoKSB7XHJcbiAgICAgICAgdGhpcy5kYXRhU2VydmljZS5vcmRlci5kZWxldGVEcmFmdE9yZGVyKHRoaXMuaWQpLnN1YnNjcmliZSgoeyBkZWxldGVEcmFmdE9yZGVyIH0pID0+IHtcclxuICAgICAgICAgICAgaWYgKGRlbGV0ZURyYWZ0T3JkZXIucmVzdWx0ID09PSBEZWxldGlvblJlc3VsdC5ERUxFVEVEKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm5vdGlmaWNhdGlvblNlcnZpY2Uuc3VjY2VzcyhfKCdjb21tb24ubm90aWZ5LWRlbGV0ZS1zdWNjZXNzJyksIHtcclxuICAgICAgICAgICAgICAgICAgICBlbnRpdHk6ICdPcmRlcicsXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIHRoaXMucm91dGVyLm5hdmlnYXRlKFsnL29yZGVycyddKTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChkZWxldGVEcmFmdE9yZGVyLm1lc3NhZ2UpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMubm90aWZpY2F0aW9uU2VydmljZS5lcnJvcihkZWxldGVEcmFmdE9yZGVyLm1lc3NhZ2UpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgY29tcGxldGVPcmRlcigpIHtcclxuICAgICAgICB0aGlzLmRhdGFTZXJ2aWNlLm9yZGVyXHJcbiAgICAgICAgICAgIC50cmFuc2l0aW9uVG9TdGF0ZSh0aGlzLmlkLCAnQXJyYW5naW5nUGF5bWVudCcpXHJcbiAgICAgICAgICAgIC5zdWJzY3JpYmUoKHsgdHJhbnNpdGlvbk9yZGVyVG9TdGF0ZSB9KSA9PiB7XHJcbiAgICAgICAgICAgICAgICBpZiAodHJhbnNpdGlvbk9yZGVyVG9TdGF0ZT8uX190eXBlbmFtZSA9PT0gJ09yZGVyJykge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucm91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nZXJcIj48L2Nsci1pY29uPlxyXG4gICAgICAgICAgICAgICAgICAgIHt7ICdvcmRlci5kZWxldGUtZHJhZnQtb3JkZXInIHwgdHJhbnNsYXRlIH19XHJcbiAgICAgICAgICAgICAgICA8L2J1dHRvbj5cclxuICAgICAgICAgICAgPC92ZHItZHJvcGRvd24tbWVudT5cclxuICAgICAgICA8L3Zkci1kcm9wZG93bj5cclxuICAgIDwvdmRyLWFiLXJpZ2h0PlxyXG48L3Zkci1hY3Rpb24tYmFyPlxyXG5cclxuPGRpdiAqbmdJZj1cImVudGl0eSQgfCBhc3luYyBhcyBvcmRlclwiPlxyXG4gICAgPGRpdiBjbGFzcz1cImNsci1yb3dcIj5cclxuICAgICAgICA8ZGl2IGNsYXNzPVwiY2xyLWNvbC1sZy04XCI+XHJcbiAgICAgICAgICAgIDx2ZHItZHJhZnQtb3JkZXItdmFyaWFudC1zZWxlY3RvclxyXG4gICAgICAgICAgICAgICAgW29yZGVyTGluZUN1c3RvbUZpZWxkc109XCJvcmRlckxpbmVDdXN0b21GaWVsZHNcIlxyXG4gICAgICAgICAgICAgICAgW2N1cnJlbmN5Q29kZV09XCJvcmRlci5jdXJyZW5jeUNvZGVcIlxyXG4gICAgICAgICAgICAgICAgKGFkZEl0ZW0pPVwiYWRkSXRlbVRvT3JkZXIoJGV2ZW50KVwiXHJcbiAgICAgICAgICAgID48L3Zkci1kcmFmdC1vcmRlci12YXJpYW50LXNlbGVjdG9yPlxyXG4gICAgICAgICAgICA8dmRyLW9yZGVyLXRhYmxlXHJcbiAgICAgICAgICAgICAgICBbb3JkZXJdPVwib3JkZXJcIlxyXG4gICAgICAgICAgICAgICAgW29yZGVyTGluZUN1c3RvbUZpZWxkc109XCJvcmRlckxpbmVDdXN0b21GaWVsZHNcIlxyXG4gICAgICAgICAgICAgICAgW2lzRHJhZnRdPVwidHJ1ZVwiXHJcbiAgICAgICAgICAgICAgICAoYWRqdXN0KT1cImFkanVzdE9yZGVyTGluZSgkZXZlbnQpXCJcclxuICAgICAgICAgICAgICAgIChyZW1vdmUpPVwicmVtb3ZlT3JkZXJMaW5lKCRldmVudClcIlxyXG4gICAgICAgICAgICA+PC92ZHItb3JkZXItdGFibGU+XHJcbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJmbGV4XCI+XHJcbiAgICAgICAgICAgICAgICA8YnV0dG9uXHJcbiAgICAgICAgICAgICAgICAgICAgKm5nSWY9XCJvcmRlci5jb3Vwb25Db2Rlcy5sZW5ndGggPT09IDAgJiYgIWRpc3BsYXlDb3Vwb25Db2RlSW5wdXRcIlxyXG4gICAgICAgICAgICAgICAgICAgIGNsYXNzPVwiYnRuIGJ0bi1saW5rIGJ0bi1zbSBtcjJcIlxyXG4gICAgICAgICAgICAgICAgICAgIChjbGljayk9XCJkaXNwbGF5Q291cG9uQ29kZUlucHV0ID0gIWRpc3BsYXlDb3Vwb25Db2RlSW5wdXRcIlxyXG4gICAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgICAgIHt7ICdvcmRlci5zZXQtY291cG9uLWNvZGVzJyB8IHRyYW5zbGF0ZSB9fVxyXG4gICAgICAgICAgICAgICAgPC9idXR0b24+XHJcbiAgICAgICAgICAgICAgICA8ZGl2ICpuZ0lmPVwib3JkZXIuY291cG9uQ29kZXMubGVuZ3RoIHx8IGRpc3BsYXlDb3Vwb25Db2RlSW5wdXRcIj5cclxuICAgICAgICAgICAgICAgICAgICA8bGFiZWw+e3sgJ29yZGVyLnNldC1jb3Vwb24tY29kZXMnIHwgdHJhbnNsYXRlIH19PC9sYWJlbD5cclxuICAgICAgICAgICAgICAgICAgICA8dmRyLWNvdXBvbi1jb2RlLXNlbGVjdG9yXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFtjb3Vwb25Db2Rlc109XCJvcmRlci5jb3Vwb25Db2Rlc1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIChhZGRDb3Vwb25Db2RlKT1cImFwcGx5Q291cG9uQ29kZSgkZXZlbnQpXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgKHJlbW92ZUNvdXBvbkNvZGUpPVwicmVtb3ZlQ291cG9uQ29kZSgkZXZlbnQpXCJcclxuICAgICAgICAgICAgICAgICAgICA+PC92ZHItY291cG9uLWNvZGUtc2VsZWN0b3I+XHJcbiAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCJvcmRlci50YXhTdW1tYXJ5Lmxlbmd0aFwiPlxyXG4gICAgICAgICAgICAgICAgPGg0Pnt7ICdvcmRlci50YXgtc3VtbWFyeScgfCB0cmFuc2xhdGUgfX08L2g0PlxyXG4gICAgICAgICAgICAgICAgPHRhYmxlIGNsYXNzPVwidGFibGVcIj5cclxuICAgICAgICAgICAgICAgICAgICA8dGhlYWQ+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDx0cj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0aD57eyAnY29tbW9uLmRlc2NyaXB0aW9uJyB8IHRyYW5zbGF0ZSB9fTwvdGg+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGg+e3sgJ29yZGVyLnRheC1yYXRlJyB8IHRyYW5zbGF0ZSB9fTwvdGg+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGg+e3sgJ29yZGVyLnRheC1iYXNlJyB8IHRyYW5zbGF0ZSB9fTwvdGg+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGg+e3sgJ29yZGVyLnRheC10b3RhbCcgfCB0cmFuc2xhdGUgfX08L3RoPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L3RyPlxyXG4gICAgICAgICAgICAgICAgICAgIDwvdGhlYWQ+XHJcbiAgICAgICAgICAgICAgICAgICAgPHRib2R5PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8dHIgKm5nRm9yPVwibGV0IHJvdyBvZiBvcmRlci50YXhTdW1tYXJ5XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+e3sgcm93LmRlc2NyaXB0aW9uIH19PC90ZD5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZD57eyByb3cudGF4UmF0ZSAvIDEwMCB8IHBlcmNlbnQgfX08L3RkPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkPnt7IHJvdy50YXhCYXNlIHwgbG9jYWxlQ3VycmVuY3k6IG9yZGVyLmN1cnJlbmN5Q29kZSB9fTwvdGQ+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+e3sgcm93LnRheFRvdGFsIHwgbG9jYWxlQ3VycmVuY3k6IG9yZGVyLmN1cnJlbmN5Q29kZSB9fTwvdGQ+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+XHJcbiAgICAgICAgICAgICAgICAgICAgPC90Ym9keT5cclxuICAgICAgICAgICAgICAgIDwvdGFibGU+XHJcbiAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgICAgIDxkaXYgY2xhc3M9XCJjbHItY29sLWxnLTQgb3JkZXItY2FyZHNcIj5cclxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImNhcmRcIj5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJjYXJkLWhlYWRlclwiPlxyXG4gICAgICAgICAgICAgICAgICAgIDxjbHItaWNvbiAqbmdJZj1cIiFvcmRlci5jdXN0b21lclwiIHNoYXBlPVwidW5rbm93bi1zdGF0dXNcIiBjbGFzcz1cImlzLXdhcm5pbmdcIj48L2Nsci1pY29uPlxyXG4gICAgICAgICAgICAgICAgICAgIDxjbHItaWNvbiAqbmdJZj1cIm9yZGVyLmN1c3RvbWVyXCIgc2hhcGU9XCJjaGVja1wiIGNsYXNzPVwiaXMtc3VjY2Vzc1wiPjwvY2xyLWljb24+XHJcbiAgICAgICAgICAgICAgICAgICAge3sgJ29yZGVyLmN1c3RvbWVyJyB8IHRyYW5zbGF0ZSB9fVxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiY2FyZC1ibG9ja1wiPlxyXG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJjYXJkLXRleHRcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPHZkci1jdXN0b21lci1sYWJlbFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M9XCJibG9jayBtYjJcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5nSWY9XCJvcmRlci5jdXN0b21lclwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbY3VzdG9tZXJdPVwib3JkZXIuY3VzdG9tZXJcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA+PC92ZHItY3VzdG9tZXItbGFiZWw+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gY2xhc3M9XCJidG4gYnRuLWxpbmsgYnRuLXNtXCIgKGNsaWNrKT1cInNldEN1c3RvbWVyKClcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHt7ICdvcmRlci5zZXQtY3VzdG9tZXItZm9yLW9yZGVyJyB8IHRyYW5zbGF0ZSB9fVxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2J1dHRvbj5cclxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImNhcmQtYmxvY2tcIj5cclxuICAgICAgICAgICAgICAgICAgICA8aDQgY2xhc3M9XCJjYXJkLXRpdGxlXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxjbHItaWNvblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5nSWY9XCIhb3JkZXIuYmlsbGluZ0FkZHJlc3Muc3RyZWV0TGluZTFcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hhcGU9XCJ1bmtub3duLXN0YXR1c1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzcz1cImlzLXdhcm5pbmdcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA+PC9jbHItaWNvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGNsci1pY29uXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbmdJZj1cIm9yZGVyLmJpbGxpbmdBZGRyZXNzLnN0cmVldExpbmUxXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNoYXBlPVwiY2hlY2tcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M9XCJpcy1zdWNjZXNzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgPjwvY2xyLWljb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHt7ICdvcmRlci5iaWxsaW5nLWFkZHJlc3MnIHwgdHJhbnNsYXRlIH19XHJcbiAgICAgICAgICAgICAgICAgICAgPC9oND5cclxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiY2FyZC10ZXh0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDx2ZHItZm9ybWF0dGVkLWFkZHJlc3NcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzPVwiYmxvY2sgbWIyXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuZ0lmPVwib3JkZXIuYmlsbGluZ0FkZHJlc3NcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgW2FkZHJlc3NdPVwib3JkZXIuYmlsbGluZ0FkZHJlc3NcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA+PC92ZHItZm9ybWF0dGVkLWFkZHJlc3M+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gY2xhc3M9XCJidG4gYnRuLWxpbmsgYnRuLXNtXCIgKGNsaWNrKT1cInNldEJpbGxpbmdBZGRyZXNzKClcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHt7ICdvcmRlci5zZXQtYmlsbGluZy1hZGRyZXNzJyB8IHRyYW5zbGF0ZSB9fVxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2J1dHRvbj5cclxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImNhcmRcIj5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJjYXJkLWhlYWRlclwiPlxyXG4gICAgICAgICAgICAgICAgICAgIDxjbHItaWNvblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAqbmdJZj1cIiFvcmRlci5zaGlwcGluZ0FkZHJlc3Muc3RyZWV0TGluZTEgfHwgIW9yZGVyLnNoaXBwaW5nTGluZXMubGVuZ3RoXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2hhcGU9XCJ1bmtub3duLXN0YXR1c1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzPVwiaXMtd2FybmluZ1wiXHJcbiAgICAgICAgICAgICAgICAgICAgPjwvY2xyLWljb24+XHJcbiAgICAgICAgICAgICAgICAgICAgPGNsci1pY29uXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICpuZ0lmPVwib3JkZXIuc2hpcHBpbmdBZGRyZXNzLnN0cmVldExpbmUxICYmIG9yZGVyLnNoaXBwaW5nTGluZXMubGVuZ3RoXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2hhcGU9XCJjaGVja1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzPVwiaXMtc3VjY2Vzc1wiXHJcbiAgICAgICAgICAgICAgICAgICAgPjwvY2xyLWljb24+XHJcbiAgICAgICAgICAgICAgICAgICAge3sgJ29yZGVyLnNoaXBwaW5nJyB8IHRyYW5zbGF0ZSB9fVxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiY2FyZC1ibG9ja1wiPlxyXG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJjYXJkLXRleHRcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPHZkci1mb3JtYXR0ZWQtYWRkcmVzc1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M9XCJibG9jayBtYjJcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5nSWY9XCJvcmRlci5zaGlwcGluZ0FkZHJlc3NcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgW2FkZHJlc3NdPVwib3JkZXIuc2hpcHBpbmdBZGRyZXNzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgPjwvdmRyLWZvcm1hdHRlZC1hZGRyZXNzPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIGNsYXNzPVwiYnRuIGJ0bi1saW5rIGJ0bi1zbVwiIChjbGljayk9XCJzZXRTaGlwcGluZ0FkZHJlc3MoKVwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge3sgJ29yZGVyLnNldC1zaGlwcGluZy1hZGRyZXNzJyB8IHRyYW5zbGF0ZSB9fVxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2J1dHRvbj5cclxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImNhcmQtYmxvY2tcIj5cclxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiY2FyZC10ZXh0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgKm5nRm9yPVwibGV0IHNoaXBwaW5nTGluZSBvZiBvcmRlci5zaGlwcGluZ0xpbmVzXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7eyBzaGlwcGluZ0xpbmUuc2hpcHBpbmdNZXRob2QubmFtZSB9fVxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzcz1cImJ0biBidG4tbGluayBidG4tc21cIiAoY2xpY2spPVwic2V0U2hpcHBpbmdNZXRob2QoKVwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge3sgJ29yZGVyLnNldC1zaGlwcGluZy1tZXRob2QnIHwgdHJhbnNsYXRlIH19XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICA8dmRyLW9yZGVyLWN1c3RvbS1maWVsZHMtY2FyZFxyXG4gICAgICAgICAgICAgICAgW2N1c3RvbUZpZWxkc0NvbmZpZ109XCJjdXN0b21GaWVsZHNcIlxyXG4gICAgICAgICAgICAgICAgW2N1c3RvbUZpZWxkVmFsdWVzXT1cIm9yZGVyLmN1c3RvbUZpZWxkc1wiXHJcbiAgICAgICAgICAgICAgICAodXBkYXRlQ2xpY2spPVwidXBkYXRlQ3VzdG9tRmllbGRzKCRldmVudClcIlxyXG4gICAgICAgICAgICA+PC92ZHItb3JkZXItY3VzdG9tLWZpZWxkcy1jYXJkPlxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgPC9kaXY+XHJcbjwvZGl2PlxyXG4iXX0=
@@ -0,0 +1,59 @@
1
+ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
2
+ import { FormControl, FormGroup } from '@angular/forms';
3
+ import { Subject } from 'rxjs';
4
+ import { switchMap } from 'rxjs/operators';
5
+ import * as i0 from "@angular/core";
6
+ import * as i1 from "@vendure/admin-ui/core";
7
+ import * as i2 from "@angular/common";
8
+ import * as i3 from "@angular/forms";
9
+ import * as i4 from "@ngx-translate/core";
10
+ export class DraftOrderVariantSelectorComponent {
11
+ constructor(dataService) {
12
+ this.dataService = dataService;
13
+ this.addItem = new EventEmitter();
14
+ this.customFieldsFormGroup = new FormGroup({});
15
+ this.selectedVariantId$ = new Subject();
16
+ this.quantity = 1;
17
+ }
18
+ ngOnInit() {
19
+ this.selectedVariant$ = this.selectedVariantId$.pipe(switchMap(id => {
20
+ if (id) {
21
+ return this.dataService.product
22
+ .getProductVariant(id)
23
+ .mapSingle(({ productVariant }) => productVariant);
24
+ }
25
+ else {
26
+ return [undefined];
27
+ }
28
+ }));
29
+ for (const customField of this.orderLineCustomFields) {
30
+ this.customFieldsFormGroup.addControl(customField.name, new FormControl(''));
31
+ }
32
+ }
33
+ addItemClick(selectedVariant) {
34
+ if (selectedVariant) {
35
+ this.addItem.emit({
36
+ productVariantId: selectedVariant.id,
37
+ quantity: this.quantity,
38
+ customFields: this.orderLineCustomFields.length
39
+ ? this.customFieldsFormGroup.value
40
+ : undefined,
41
+ });
42
+ this.selectedVariantId$.next(undefined);
43
+ this.customFieldsFormGroup.reset();
44
+ }
45
+ }
46
+ }
47
+ DraftOrderVariantSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DraftOrderVariantSelectorComponent, deps: [{ token: i1.DataService }], target: i0.ɵɵFactoryTarget.Component });
48
+ DraftOrderVariantSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: DraftOrderVariantSelectorComponent, selector: "vdr-draft-order-variant-selector", inputs: { currencyCode: "currencyCode", orderLineCustomFields: "orderLineCustomFields" }, outputs: { addItem: "addItem" }, ngImport: i0, template: "<div class=\"card\">\r\n <div class=\"card-block\">\r\n <h4 class=\"card-title\">{{ 'order.add-item-to-order' | translate }}</h4>\r\n <vdr-product-variant-selector\r\n (productSelected)=\"selectedVariantId$.next($event.productVariantId)\"\r\n ></vdr-product-variant-selector>\r\n </div>\r\n <div class=\"card-block\" *ngIf=\"selectedVariant$ | async as selectedVariant\">\r\n <div class=\"variant-details\">\r\n <img class=\"mr2\" [src]=\"selectedVariant.featuredAsset || selectedVariant.product.featuredAsset | assetPreview: 32\">\r\n <div class=\"details\">\r\n <div>{{ selectedVariant?.name }}</div>\r\n <div class=\"small\">{{ selectedVariant?.sku }}</div>\r\n </div>\r\n <div class=\"details ml4\">\r\n <div class=\"small\">\r\n {{ 'catalog.stock-on-hand' | translate }}: {{ selectedVariant.stockOnHand }}\r\n </div>\r\n <div class=\"small\">\r\n {{ 'catalog.stock-allocated' | translate }}: {{ selectedVariant.stockAllocated }}\r\n </div>\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <div class=\"details\">\r\n <div>{{ selectedVariant?.priceWithTax | localeCurrency: currencyCode }}</div>\r\n <div class=\"small\" [title]=\"'order.net-price' | translate\">\r\n {{ selectedVariant?.price | localeCurrency: currencyCode }}\r\n </div>\r\n </div>\r\n <div>\r\n <input [disabled]=\"!selectedVariant\" type=\"number\" min=\"0\" [(ngModel)]=\"quantity\" />\r\n </div>\r\n <button\r\n [disabled]=\"!selectedVariant\"\r\n class=\"btn btn-small btn-primary\"\r\n (click)=\"addItemClick(selectedVariant)\"\r\n >\r\n {{ 'order.add-item-to-order' | translate }}\r\n </button>\r\n </div>\r\n <ng-container *ngIf=\"orderLineCustomFields.length\">\r\n <div class=\"custom-field\" *ngFor=\"let field of orderLineCustomFields\">\r\n <vdr-custom-field-control\r\n [compact]=\"true\"\r\n [readonly]=\"false\"\r\n [customField]=\"field\"\r\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\r\n ></vdr-custom-field-control>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n", styles: [".variant-details{display:flex;align-items:center}.variant-details img{border-radius:var(--border-radius-img);width:32px;height:32px}.variant-details .details{font-size:.65rem;line-height:.7rem}.variant-details input{width:48px;margin:0 6px}.variant-details .small{font-size:11px;color:var(--color-text-300)}\n"], components: [{ type: i1.ProductVariantSelectorComponent, selector: "vdr-product-variant-selector", outputs: ["productSelected"] }, { type: i1.CustomFieldControlComponent, selector: "vdr-custom-field-control", inputs: ["entityName", "customFieldsFormGroup", "customField", "compact", "showLabel", "readonly"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { type: i3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4.TranslatePipe, "async": i2.AsyncPipe, "assetPreview": i1.AssetPreviewPipe, "localeCurrency": i1.LocaleCurrencyPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DraftOrderVariantSelectorComponent, decorators: [{
50
+ type: Component,
51
+ args: [{ selector: 'vdr-draft-order-variant-selector', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"card\">\r\n <div class=\"card-block\">\r\n <h4 class=\"card-title\">{{ 'order.add-item-to-order' | translate }}</h4>\r\n <vdr-product-variant-selector\r\n (productSelected)=\"selectedVariantId$.next($event.productVariantId)\"\r\n ></vdr-product-variant-selector>\r\n </div>\r\n <div class=\"card-block\" *ngIf=\"selectedVariant$ | async as selectedVariant\">\r\n <div class=\"variant-details\">\r\n <img class=\"mr2\" [src]=\"selectedVariant.featuredAsset || selectedVariant.product.featuredAsset | assetPreview: 32\">\r\n <div class=\"details\">\r\n <div>{{ selectedVariant?.name }}</div>\r\n <div class=\"small\">{{ selectedVariant?.sku }}</div>\r\n </div>\r\n <div class=\"details ml4\">\r\n <div class=\"small\">\r\n {{ 'catalog.stock-on-hand' | translate }}: {{ selectedVariant.stockOnHand }}\r\n </div>\r\n <div class=\"small\">\r\n {{ 'catalog.stock-allocated' | translate }}: {{ selectedVariant.stockAllocated }}\r\n </div>\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <div class=\"details\">\r\n <div>{{ selectedVariant?.priceWithTax | localeCurrency: currencyCode }}</div>\r\n <div class=\"small\" [title]=\"'order.net-price' | translate\">\r\n {{ selectedVariant?.price | localeCurrency: currencyCode }}\r\n </div>\r\n </div>\r\n <div>\r\n <input [disabled]=\"!selectedVariant\" type=\"number\" min=\"0\" [(ngModel)]=\"quantity\" />\r\n </div>\r\n <button\r\n [disabled]=\"!selectedVariant\"\r\n class=\"btn btn-small btn-primary\"\r\n (click)=\"addItemClick(selectedVariant)\"\r\n >\r\n {{ 'order.add-item-to-order' | translate }}\r\n </button>\r\n </div>\r\n <ng-container *ngIf=\"orderLineCustomFields.length\">\r\n <div class=\"custom-field\" *ngFor=\"let field of orderLineCustomFields\">\r\n <vdr-custom-field-control\r\n [compact]=\"true\"\r\n [readonly]=\"false\"\r\n [customField]=\"field\"\r\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\r\n ></vdr-custom-field-control>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n", styles: [".variant-details{display:flex;align-items:center}.variant-details img{border-radius:var(--border-radius-img);width:32px;height:32px}.variant-details .details{font-size:.65rem;line-height:.7rem}.variant-details input{width:48px;margin:0 6px}.variant-details .small{font-size:11px;color:var(--color-text-300)}\n"] }]
52
+ }], ctorParameters: function () { return [{ type: i1.DataService }]; }, propDecorators: { currencyCode: [{
53
+ type: Input
54
+ }], orderLineCustomFields: [{
55
+ type: Input
56
+ }], addItem: [{
57
+ type: Output
58
+ }] } });
59
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhZnQtb3JkZXItdmFyaWFudC1zZWxlY3Rvci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL29yZGVyL3NyYy9jb21wb25lbnRzL2RyYWZ0LW9yZGVyLXZhcmlhbnQtc2VsZWN0b3IvZHJhZnQtb3JkZXItdmFyaWFudC1zZWxlY3Rvci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL29yZGVyL3NyYy9jb21wb25lbnRzL2RyYWZ0LW9yZGVyLXZhcmlhbnQtc2VsZWN0b3IvZHJhZnQtb3JkZXItdmFyaWFudC1zZWxlY3Rvci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQVUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3hHLE9BQU8sRUFBRSxXQUFXLEVBQUUsU0FBUyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFeEQsT0FBTyxFQUFjLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUMzQyxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7Ozs7OztBQVEzQyxNQUFNLE9BQU8sa0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uZGVmaW5lZD4oKTtcclxuICAgIHF1YW50aXR5ID0gMTtcclxuICAgIGNvbnN0cnVjdG9yKHByaXZhdGUgZGF0YVNlcnZpY2U6IERhdGFTZXJ2aWNlKSB7fVxyXG5cclxuICAgIG5nT25Jbml0KCk6IHZvaWQge1xyXG4gICAgICAgIHRoaXMuc2VsZWN0ZWRWYXJpYW50JCA9IHRoaXMuc2VsZWN0ZWRWYXJpYW50SWQkLnBpcGUoXHJcbiAgICAgICAgICAgIHN3aXRjaE1hcChpZCA9PiB7XHJcbiAgICAgICAgICAgICAgICBpZiAoaWQpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kYXRhU2VydmljZS5wcm9kdWN0XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC5nZXRQcm9kdWN0VmFyaWFudChpZClcclxuICAgICAgICAgICAgICAgICAgICAgICAgLm1hcFNpbmdsZSgoeyBwcm9kdWN0VmFyaWFudCB9KSA9PiBwcm9kdWN0VmFyaWFudCk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBbdW5kZWZpbmVkXTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSksXHJcbiAgICAgICAgKTtcclxuICAgICAgICBmb3IgKGNvbnN0IGN1c3RvbUZpZWxkIG9mIHRoaXMub3JkZXJMaW5lQ3VzdG9tRmllbGRzKSB7XHJcbiAgICAgICAgICAgIHRoaXMuY3VzdG9tRmllbGRzRm9ybUdyb3VwLmFkZENvbnRyb2woY3VzdG9tRmllbGQubmFtZSwgbmV3IEZvcm1Db250cm9sKCcnKSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGFkZEl0ZW1DbGljayhzZWxlY3RlZFZhcmlhbnQ6IEdldFByb2R1Y3RWYXJpYW50UXVlcnlbJ3Byb2R1Y3RWYXJpYW50J10pIHtcclxuICAgICAgICBpZiAoc2VsZWN0ZWRW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ICAgICA8L2Rpdj5cclxuICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwib3JkZXJMaW5lQ3VzdG9tRmllbGRzLmxlbmd0aFwiPlxyXG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiY3VzdG9tLWZpZWxkXCIgKm5nRm9yPVwibGV0IGZpZWxkIG9mIG9yZGVyTGluZUN1c3RvbUZpZWxkc1wiPlxyXG4gICAgICAgICAgICAgICAgPHZkci1jdXN0b20tZmllbGQtY29udHJvbFxyXG4gICAgICAgICAgICAgICAgICAgIFtjb21wYWN0XT1cInRydWVcIlxyXG4gICAgICAgICAgICAgICAgICAgIFtyZWFkb25seV09XCJmYWxzZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgW2N1c3RvbUZpZWxkXT1cImZpZWxkXCJcclxuICAgICAgICAgICAgICAgICAgICBbY3VzdG9tRmllbGRzRm9ybUdyb3VwXT1cImN1c3RvbUZpZWxkc0Zvcm1Hcm91cFwiXHJcbiAgICAgICAgICAgICAgICA+PC92ZHItY3VzdG9tLWZpZWxkLWNvbnRyb2w+XHJcbiAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgIDwvbmctY29udGFpbmVyPlxyXG4gICAgPC9kaXY+XHJcbjwvZGl2PlxyXG4iXX0=
@@ -42,7 +42,11 @@ export class FulfillOrderDialogComponent {
42
42
  return effectiveTracInventory ? Math.min(unfulfilledCount, stockOnHand) : unfulfilledCount;
43
43
  }
44
44
  getUnfulfilledCount(line) {
45
- const fulfilled = line.items.reduce((sum, item) => sum + (item.fulfillment ? 1 : 0), 0);
45
+ const fulfilled = line.fulfillments
46
+ ?.map(f => f.summary)
47
+ .flat()
48
+ .filter(row => row.orderLine.id === line.id)
49
+ .reduce((sum, row) => sum + row.quantity, 0) ?? 0;
46
50
  return line.quantity - fulfilled;
47
51
  }
48
52
  canSubmit() {
@@ -65,9 +69,9 @@ export class FulfillOrderDialogComponent {
65
69
  }
66
70
  }
67
71
  FulfillOrderDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FulfillOrderDialogComponent, deps: [{ token: i1.DataService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
68
- FulfillOrderDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FulfillOrderDialogComponent, selector: "vdr-fulfill-order-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ 'order.fulfill-order' | translate }}</ng-template>\r\n\r\n<div class=\"fulfillment-wrapper\">\r\n <div class=\"order-table\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'order.product-name' | translate }}</th>\r\n <th>{{ 'order.product-sku' | translate }}</th>\r\n <th>{{ 'order.unfulfilled' | translate }}</th>\r\n <th>{{ 'catalog.stock-on-hand' | translate }}</th>\r\n <th>{{ 'order.fulfill' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tr\r\n *ngFor=\"let line of order.lines\"\r\n class=\"order-line\"\r\n [class.ignore]=\"getUnfulfilledCount(line) === 0\"\r\n >\r\n <td class=\"align-middle thumb\">\r\n <img *ngIf=\"line.featuredAsset\" [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\r\n </td>\r\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\r\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\r\n <td class=\"align-middle quantity\">{{ getUnfulfilledCount(line) }}</td>\r\n <td class=\"align-middle quantity\">{{ line.productVariant.stockOnHand }}</td>\r\n <td class=\"align-middle fulfil\">\r\n <input\r\n *ngIf=\"fulfillmentQuantities[line.id]\"\r\n [disabled]=\"getUnfulfilledCount(line) === 0\"\r\n [(ngModel)]=\"fulfillmentQuantities[line.id].fulfillCount\"\r\n type=\"number\"\r\n [max]=\"fulfillmentQuantities[line.id].max\"\r\n min=\"0\"\r\n />\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div class=\"shipping-details\">\r\n <vdr-formatted-address [address]=\"order.shippingAddress\"></vdr-formatted-address>\r\n <h6>{{ 'order.shipping-method' | translate }}</h6>\r\n {{ order.shippingLines[0]?.shippingMethod?.name }}\r\n <strong>{{ order.shipping | localeCurrency: order.currencyCode }}</strong>\r\n <vdr-configurable-input\r\n [operationDefinition]=\"fulfillmentHandlerDef\"\r\n [operation]=\"fulfillmentHandler\"\r\n [formControl]=\"fulfillmentHandlerControl\"\r\n [removable]=\"false\"\r\n ></vdr-configurable-input>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"select()\" [disabled]=\"!canSubmit()\" class=\"btn btn-primary\">\r\n {{ 'order.create-fulfillment' | translate }}\r\n </button>\r\n</ng-template>\r\n", styles: [":host{height:100%;display:flex;min-height:64vh}.fulfillment-wrapper{flex:1}@media screen and (min-width: 768px){.fulfillment-wrapper{display:flex;flex-direction:row}}.fulfillment-wrapper .shipping-details{margin-top:24px}@media screen and (min-width: 768px){.fulfillment-wrapper .shipping-details{margin-top:0;margin-left:24px;width:250px}}.fulfillment-wrapper .shipping-details clr-input-container{margin-top:24px}.fulfillment-wrapper .order-table{flex:1;overflow-y:auto}.fulfillment-wrapper .order-table table{margin-top:0}.fulfillment-wrapper tr.ignore{color:var(--color-grey-300)}\n"], components: [{ type: i1.FormattedAddressComponent, selector: "vdr-formatted-address", inputs: ["address"] }, { type: i1.ConfigurableInputComponent, selector: "vdr-configurable-input", inputs: ["operation", "operationDefinition", "readonly", "removable"], outputs: ["remove"] }], directives: [{ type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { type: i3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i3.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }], pipes: { "translate": i4.TranslatePipe, "assetPreview": i1.AssetPreviewPipe, "localeCurrency": i1.LocaleCurrencyPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
72
+ FulfillOrderDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FulfillOrderDialogComponent, selector: "vdr-fulfill-order-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ 'order.fulfill-order' | translate }}</ng-template>\r\n\r\n<div class=\"fulfillment-wrapper\">\r\n <div class=\"order-table\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'order.product-name' | translate }}</th>\r\n <th>{{ 'order.product-sku' | translate }}</th>\r\n <th>{{ 'order.unfulfilled' | translate }}</th>\r\n <th>{{ 'catalog.stock-on-hand' | translate }}</th>\r\n <th>{{ 'order.fulfill' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tr\r\n *ngFor=\"let line of order.lines\"\r\n class=\"order-line\"\r\n [class.ignore]=\"getUnfulfilledCount(line) === 0\"\r\n >\r\n <td class=\"align-middle thumb\">\r\n <img *ngIf=\"line.featuredAsset\" [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\r\n </td>\r\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\r\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\r\n <td class=\"align-middle quantity\">{{ getUnfulfilledCount(line) }}</td>\r\n <td class=\"align-middle quantity\">{{ line.productVariant.stockOnHand }}</td>\r\n <td class=\"align-middle fulfil\">\r\n <input\r\n *ngIf=\"fulfillmentQuantities[line.id]\"\r\n [disabled]=\"getUnfulfilledCount(line) === 0\"\r\n [(ngModel)]=\"fulfillmentQuantities[line.id].fulfillCount\"\r\n type=\"number\"\r\n [max]=\"fulfillmentQuantities[line.id].max\"\r\n min=\"0\"\r\n />\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div class=\"shipping-details\">\r\n <vdr-formatted-address [address]=\"order.shippingAddress\"></vdr-formatted-address>\r\n <h6>{{ 'order.shipping-method' | translate }}</h6>\r\n {{ order.shippingLines[0]?.shippingMethod?.name }}\r\n <strong>{{ order.shipping | localeCurrency: order.currencyCode }}</strong>\r\n <vdr-configurable-input\r\n [operationDefinition]=\"fulfillmentHandlerDef\"\r\n [operation]=\"fulfillmentHandler\"\r\n [formControl]=\"fulfillmentHandlerControl\"\r\n [removable]=\"false\"\r\n ></vdr-configurable-input>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"select()\" [disabled]=\"!canSubmit()\" class=\"btn btn-primary\">\r\n {{ 'order.create-fulfillment' | translate }}\r\n </button>\r\n</ng-template>\r\n", styles: [":host{height:100%;display:flex;min-height:64vh}.fulfillment-wrapper{flex:1}@media screen and (min-width: 768px){.fulfillment-wrapper{display:flex;flex-direction:row}}.fulfillment-wrapper .shipping-details{margin-top:24px}@media screen and (min-width: 768px){.fulfillment-wrapper .shipping-details{margin-top:0;margin-left:24px;width:250px}}.fulfillment-wrapper .shipping-details clr-input-container{margin-top:24px}.fulfillment-wrapper .order-table{flex:1;overflow-y:auto}.fulfillment-wrapper .order-table table{margin-top:0}.fulfillment-wrapper tr.ignore{color:var(--color-grey-300)}\n"], components: [{ type: i1.FormattedAddressComponent, selector: "vdr-formatted-address", inputs: ["address"] }, { type: i1.ConfigurableInputComponent, selector: "vdr-configurable-input", inputs: ["operation", "operationDefinition", "readonly", "removable", "position"], outputs: ["remove"] }], directives: [{ type: i1.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { type: i3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i3.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }], pipes: { "translate": i4.TranslatePipe, "assetPreview": i1.AssetPreviewPipe, "localeCurrency": i1.LocaleCurrencyPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
69
73
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FulfillOrderDialogComponent, decorators: [{
70
74
  type: Component,
71
75
  args: [{ selector: 'vdr-fulfill-order-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ 'order.fulfill-order' | translate }}</ng-template>\r\n\r\n<div class=\"fulfillment-wrapper\">\r\n <div class=\"order-table\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'order.product-name' | translate }}</th>\r\n <th>{{ 'order.product-sku' | translate }}</th>\r\n <th>{{ 'order.unfulfilled' | translate }}</th>\r\n <th>{{ 'catalog.stock-on-hand' | translate }}</th>\r\n <th>{{ 'order.fulfill' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tr\r\n *ngFor=\"let line of order.lines\"\r\n class=\"order-line\"\r\n [class.ignore]=\"getUnfulfilledCount(line) === 0\"\r\n >\r\n <td class=\"align-middle thumb\">\r\n <img *ngIf=\"line.featuredAsset\" [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\r\n </td>\r\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\r\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\r\n <td class=\"align-middle quantity\">{{ getUnfulfilledCount(line) }}</td>\r\n <td class=\"align-middle quantity\">{{ line.productVariant.stockOnHand }}</td>\r\n <td class=\"align-middle fulfil\">\r\n <input\r\n *ngIf=\"fulfillmentQuantities[line.id]\"\r\n [disabled]=\"getUnfulfilledCount(line) === 0\"\r\n [(ngModel)]=\"fulfillmentQuantities[line.id].fulfillCount\"\r\n type=\"number\"\r\n [max]=\"fulfillmentQuantities[line.id].max\"\r\n min=\"0\"\r\n />\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div class=\"shipping-details\">\r\n <vdr-formatted-address [address]=\"order.shippingAddress\"></vdr-formatted-address>\r\n <h6>{{ 'order.shipping-method' | translate }}</h6>\r\n {{ order.shippingLines[0]?.shippingMethod?.name }}\r\n <strong>{{ order.shipping | localeCurrency: order.currencyCode }}</strong>\r\n <vdr-configurable-input\r\n [operationDefinition]=\"fulfillmentHandlerDef\"\r\n [operation]=\"fulfillmentHandler\"\r\n [formControl]=\"fulfillmentHandlerControl\"\r\n [removable]=\"false\"\r\n ></vdr-configurable-input>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"select()\" [disabled]=\"!canSubmit()\" class=\"btn btn-primary\">\r\n {{ 'order.create-fulfillment' | translate }}\r\n </button>\r\n</ng-template>\r\n", styles: [":host{height:100%;display:flex;min-height:64vh}.fulfillment-wrapper{flex:1}@media screen and (min-width: 768px){.fulfillment-wrapper{display:flex;flex-direction:row}}.fulfillment-wrapper .shipping-details{margin-top:24px}@media screen and (min-width: 768px){.fulfillment-wrapper .shipping-details{margin-top:0;margin-left:24px;width:250px}}.fulfillment-wrapper .shipping-details clr-input-container{margin-top:24px}.fulfillment-wrapper .order-table{flex:1;overflow-y:auto}.fulfillment-wrapper .order-table table{margin-top:0}.fulfillment-wrapper tr.ignore{color:var(--color-grey-300)}\n"] }]
72
76
  }], ctorParameters: function () { return [{ type: i1.DataService }, { type: i0.ChangeDetectorRef }]; } });
73
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVsZmlsbC1vcmRlci1kaWFsb2cuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4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LCBnbG9iYWxTZXR0aW5ncy50cmFja0ludmVudG9yeSk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgIC4uLnJlc3VsdCxcclxuICAgICAgICAgICAgICAgICAgICBbbGluZS5pZF06IHsgZnVsZmlsbENvdW50LCBtYXg6IGZ1bGZpbGxDb3VudCB9LFxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfSwge30pO1xyXG4gICAgICAgICAgICB0aGlzLmNoYW5nZURldGVjdG9yLm1hcmtGb3JDaGVjaygpO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLmRhdGFTZXJ2aWNlLnNoaXBwaW5nTWV0aG9kXHJcbiAgICAgICAgICAgIC5nZXRTaGlwcGluZ01ldGhvZE9wZXJhdGlvbnMoKVxyXG4gICAgICAgICAgICAubWFwU2luZ2xlKGRhdGEgPT4gZGF0YS5mdWxmaWxsbWVudEhhbmRsZXJzKVxyXG4gICAgICAgICAgICAuc3Vic2NyaWJlKGhhbmRsZXJzID0+IHtcclxuICAgICAgICAgICAgICAgIHRoaXMuZnVsZmlsbG1lbnRIYW5kbGVyRGVmID1cclxuICAgICAgICAgICAgICAgICAgICBoYW5kbGVycy5maW5kKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBoID0+IGguY29kZSA9PT0gdGhpcy5vcmRlci5zaGlwcGluZ0xpbmVzWzBdPy5zaGlwcGluZ01ldGhvZD8uZnVsZmlsbG1lbnRIYW5kbGVyQ29kZSxcclxuICAgICAgICAgICAgICAgICAgICApIHx8IGhhbmRsZXJzWzBdO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5mdWxmaWxsbWVudEhhbmRsZXIgPSBjb25maWd1cmFibGVEZWZpbml0aW9uVG9JbnN0YW5jZSh0aGlzLmZ1bGZpbGxtZW50SGFuZGxlckRlZik7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmZ1bGZpbGxtZW50SGFuZGxlckNv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nVsZmlsbG1lbnQgPyAxIDogMCksIDApO1xyXG4gICAgICAgIHJldHVybiBsaW5lLnF1YW50aXR5IC0gZnVsZmlsbGVkO1xyXG4gICAgfVxyXG5cclxuICAgIGNhblN1Ym1pdCgpOiBib29sZWFuIHtcclxuICAgICAgICBjb25zdCB0b3RhbENvdW50ID0gT2JqZWN0LnZhbHVlcyh0aGlzLmZ1bGZpbGxtZW50UXVhbnRpdGllcykucmVkdWNlKFxyXG4gICAgICAgICAgICAodG90YWwsIHsgZnVsZmlsbENvdW50IH0pID0+IHRvdGFsICsgZnVsZmlsbENvdW50LFxyXG4gICAgICAgICAgICAwLFxyXG4gICAgICAgICk7XHJcbiAgICAgICAgY29uc3QgZm9ybUlzVmFsaWQgPVxyXG4gICAgICAgICAgICBjb25maWd1cmFibGVPcGVyYXRpb25WYWx1ZUlzVmFsaWQoXHJcbiAgICAgICAgICAgICAgICB0aGlzLmZ1bGZpbGxtZW50SGFuZGxlckRlZixcclxuICAgICAgICAgICAgICAgIHRoaXMuZnVsZmlsbG1lbnRIYW5kbGVyQ29udHJvbC52YWx1ZSxcclxuICAgICAgICAgICAgKSAmJiB0aGlzLmZ1bGZpbGxtZW50SGFuZGxlckNvbnRyb2wudmFsaWQ7XHJcbiAgICAgICAgcmV0dXJuIGZvcm1Jc1ZhbGlkICYmIDAgPCB0b3RhbENvdW50O1xyXG4gICAgfVxyXG5cclxuICAgIHNlbGVjdCgpIHtcclxuICAgICAgICBjb25zdCBsaW5lcyA9IE9iamVjdC5lbnRyaWVzKHRoaXMuZnVsZmlsbG1lbnRRdWFudGl0aWVzKS5tYXAoKFtvcmRlckxpbmVJZCwgeyBmdWxmaWxsQ291bnQgfV0pID0+ICh7XHJcbiAgICAgICAgICAgIG9yZGVyTGluZUlkLFxyXG4gICAgICAgICAgICBxdWFudGl0eTogZnVsZmlsbENvdW50LFxyXG4gICAgICAgIH0pKTtcclxuICAgICAgICB0aGlzLnJlc29sdmVXaXRoKHtcclxuICAgICAgICAgICAgbGluZXMsXHJcbiAgICAgICAgICAgIGhhbmRsZXI6IHRvQ29uZmlndXJhYmxlT3BlcmF0aW9uSW5wdXQoXHJcbiAgICAgICAgICAgICAgICB0aGlzLmZ1bGZpbGxtZW50SGFuZGxlcixcclxuICAgICAgICAgICAgICAgIHRoaXMuZnVsZmlsbG1lbnRIYW5kbGVyQ29udHJvbC52YWx1ZSxcclxuICAgICAgICAgICAgKSxcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBjYW5jZWwoKSB7XHJcbiAgICAgICAgdGhpcy5yZXNvbHZlV2l0aCgpO1xyXG4gICAgfVxyXG59XHJcbiIsIjxuZy10ZW1wbGF0ZSB2ZHJEaWFsb2dUaXRsZT57eyAnb3JkZXIuZnVsZmlsbC1vcmRlcicgfCB0cmFuc2xhdGUgfX08L25nLXRlbXBsYXRlPlxyXG5cclxuPGRpdiBjbGFzcz1cImZ1bGZpbGxtZW50LXdyYXBwZXJcIj5cclxuICAgIDxkaXYgY2xhc3M9XCJvcmRlci10YWJsZVwiPlxyXG4gICAgICAgIDx0YWJsZSBjbGFzcz1cInRhYmxlXCI+XHJcbiAgICAgICAgICAgIDx0aGVhZD5cclxuICAgICAgICAgICAgICAgIDx0cj5cclxuICAgICAgICAgICAgICAgICAgICA8dGg+PC90aD5cclxuICAgICAgICAgICAgICAgICAgICA8dGg+e3sgJ29yZGVyLnByb2R1Y3QtbmFtZScgfCB0cmFuc2xhdGUgfX08L3RoPlxyXG4gICAgICAgICAgICAgICAgICAgIDx0aD57eyAnb3JkZXIucHJvZHVjdC1za3UnIHwgdHJhbnNsYXRlIH19PC90aD5cclxuICAgICAgICAgICAgICAgICAgICA8dGg+e3sgJ29yZGVyLnVuZnVsZmlsbGVkJyB8IHRyYW5zbGF0ZSB9fTwvdGg+XHJcbiAgICAgICAgICAgICAgICAgICAgPHRoPnt7ICdjYXRhbG9nLnN0b2NrLW9uLWhhbmQnIHwgdHJhbnNsYXRlIH19PC90aD5cclxuICA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nN0b2NrT25IYW5kIH19PC90ZD5cclxuICAgICAgICAgICAgICAgIDx0ZCBjbGFzcz1cImFsaWduLW1pZGRsZSBmdWxmaWxcIj5cclxuICAgICAgICAgICAgICAgICAgICA8aW5wdXRcclxuICAgICAgICAgICAgICAgICAgICAgICAgKm5nSWY9XCJmdWxmaWxsbWVudFF1YW50aXRpZXNbbGluZS5pZF1cIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBbZGlzYWJsZWRdPVwiZ2V0VW5mdWxmaWxsZWRDb3VudChsaW5lKSA9PT0gMFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFsobmdNb2RlbCldPVwiZnVsZmlsbG1lbnRRdWFudGl0aWVzW2xpbmUuaWRdLmZ1bGZpbGxDb3VudFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU9XCJudW1iZXJcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBbbWF4XT1cImZ1bGZpbGxtZW50UXVhbnRpdGllc1tsaW5lLmlkXS5tYXhcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBtaW49XCIwXCJcclxuICAgICAgICAgICAgICAgICAgICAvPlxyXG4gICAgICAgICAgICAgICAgPC90ZD5cclxuICAgICAgICAgICAgPC90cj5cclxuICAgICAgICA8L3RhYmxlPlxyXG4gICAgPC9kaXY+XHJcbiAgICA8ZGl2IGNsYXNzPVwic2hpcHBpbmctZGV0YWlsc1wiPlxyXG4gICAgICAgIDx2ZHItZm9ybWF0dGVkLWFkZHJlc3MgW2FkZHJlc3NdPVwib3JkZXIuc2hpcHBpbmdBZGRyZXNzXCI+PC92ZHItZm9ybWF0dGVkLWFkZHJlc3M+XHJcbiAgICAgICAgPGg2Pnt7ICdvcmRlci5zaGlwcGluZy1tZXRob2QnIHwgdHJhbnNsYXRlIH19PC9oNj5cclxuICAgICAgICB7eyBvcmRlci5zaGlwcGluZ0xpbmVzWzBdPy5zaGlwcGluZ01ldGhvZD8ubmFtZSB9fVxyXG4gIC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ZCkgOiB1bmZ1bGZpbGxlZENvdW50O1xyXG4gICAgfVxyXG5cclxuICAgIGdldFVuZnVsZmlsbGVkQ291bnQobGluZTogT3JkZXJEZXRhaWxGcmFnbWVudFsnbGluZXMnXVtudW1iZXJdKTogbnVtYmVyIHtcclxuICAgICAgICBjb25zdCBmdWxmaWxsZWQgPVxyXG4gICAgICAgICAgICBsaW5lLmZ1bGZpbGxtZW50c1xyXG4gICAgICAgICAgICAgICAgPy5tYXAoZiA9PiBmLnN1bW1hcnkpXHJcbiAgICAgICAgICAgICAgICAuZmxhdCgpXHJcbiAgICAgICAgICAgICAgICAuZmlsdGVyKHJvdyA9PiByb3cub3JkZXJMaW5lLmlkID09PSBsaW5lLmlkKVxyXG4gICAgICAgICAgICAgICAgLnJlZHVjZSgoc3VtLCByb3cpID0+IHN1bSArIHJvdy5xdWFudGl0eSwgMCkgPz8gMDtcclxuICAgICAgICByZXR1cm4gbGluZS5xdWFudGl0eSAtIGZ1bGZpbGxlZDtcclxuICAgIH1cclxuXHJcbiAgICBjYW5TdWJtaXQoKTogYm9vbGVhbiB7XHJcbiAgICAgICAgY29uc3QgdG90YWxDb3VudCA9IE9iamVjdC52YWx1ZXModGhpcy5mdWxmaWxsbWVudFF1YW50aXRpZXMpLnJlZHVjZShcclxuICAgICAgICAgICAgKHRvdGFsLCB7IGZ1bGZpbGxDb3VudCB9KSA9PiB0b3RhbCArIGZ1bGZpbGxDb3VudCxcclxuICAgICAgICAgICAgMCxcclxuICAgICAgICApO1xyXG4gICAgICAgIGNvbnN0IGZvcm1Jc1ZhbGlkID1cclxuICAgICAgICAgICAgY29uZmlndXJhYmxlT3BlcmF0aW9uVmFsdWVJc1ZhbGlkKFxyXG4gICAgICAgICAgICAgICAgdGhpcy5mdWxmaWxsbWVudEhhbmRsZXJEZWYsXHJcbiAgICAgICAgICAgICAgICB0aGlzLmZ1bGZpbGxtZW50SGFuZGxlckNvbnRyb2wudmFsdWUsXHJcbiAgICAgICAgICAgICkgJiYg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ICAgICAgICA8dGhlYWQ+XHJcbiAgICAgICAgICAgICAgICA8dHI+XHJcbiAgICAgICAgICAgICAgICAgICAgPHRoPjwvdGg+XHJcbiAgICAgICAgICAgICAgICAgICAgPHRoPnt7ICdvcmRlci5wcm9kdWN0LW5hbWUnIHwgdHJhbnNsYXRlIH19PC90aD5cclxuICAgICAgICAgICAgICAgICAgICA8dGg+e3sgJ29yZGVyLnByb2R1Y3Qtc2t1JyB8IHRyYW5zbGF0ZSB9fTwvdGg+XHJcbiAgICAgICAgICAgICAgICAgICAgPHRoPnt7ICdvcmRlci51bmZ1bGZpbGxlZCcgfCB0cmFuc2xhdGUgfX08L3RoPlxyXG4gICAgICAgICAgICAgICAgICAgIDx0aD57eyAnY2F0YWxvZy5zdG9jay1vbi1oYW5kJyB8IHRyYW5zbGF0ZSB9fTwvdGg+XHJcbiAgICAgICAgICAgICAgICAgICAgPHRoPnt7ICdvcmRlci5mdWxmaWxsJyB8IHRyYW5zbGF0ZSB9fTwvdGg+XHJcbiAgICAgICAgICAgICAgICA8L3RyPlxyXG4gICAgICAgICAgICA8L3RoZWFkPlxyXG4gICAgICAgICAgICA8dHJcclxuICAgICAgICAgICAgICAgICpuZ0Zvcj1cImxldCBsaW5lIG9mIG9yZGVyLmxpbmVzXCJcclxuICAgICAgICAgICAgICAgIGNsYXNzPVwib3JkZXItbGluZVwiXHJcbiAgICAgICAgICAgICAgICBbY2xhc3MuaWdub3JlXT1cImdldFVuZnVsZmlsbGVkQ291bnQobGluZSkgPT09IDBcIlxyXG4gICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICA8dGQgY2xhc3M9XCJhbGlnbi1taWRkbGUgdGh1bWJcIj5cclxuICAgICAgICAgICAgICAgICAgICA8aW1nICpuZ0lmPVwibGluZS5mZWF0dXJlZEFzc2V0XCIgW3NyY109XCJsaW5lLmZlYXR1cmVkQXNzZXQgfCBhc3NldFByZXZpZXc6ICd0aW55J1wiIC8+XHJcbiAgICAgICAgICAgICAgICA8L3RkPlxyXG4gICAgICAgICAgICAgICAgPHRkIGNsYXNzPVwiYWxpZ24tbWlkZGxlIG5hbWVcIj57eyBsaW5lLnByb2R1Y3RWYXJpYW50Lm5hbWUgfX08L3RkPlxyXG4gICAgICAgICAgICAgICAgPHRkIGNsYXNzPVwiYWxpZ24tbWlkZGxlIHNrdVwiPnt7IGxpbmUucHJvZHVjdFZhcmlhbnQuc2t1IH19PC90ZD5cclxuICAgICAgICAgICAgICAgIDx0ZCBjbGFzcz1cImFsaWduLW1pZGRsZSBxdWFudGl0eVwiPnt7IGdldFVuZnVsZmlsbGVkQ291bnQobGluZSkgfX08L3RkPlxyXG4gICAgICAgICAgICAgICAgPHRkIGNsYXNzPVwiYWxpZ24tbWlkZGxlIHF1YW50aXR5XCI+e3sgbGluZS5wcm9kdWN0VmFyaWFudC5zdG9ja09uSGFuZCB9fTwvdGQ+XHJcbiAgICAgICAgICAgICAgICA8dGQgY2xhc3M9XCJhbGlnbi1taWRkbGUgZnVsZmlsXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPGlucHV0XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICpuZ0lmPVwiZnVsZmlsbG1lbnRRdWFudGl0aWVzW2xpbmUuaWRdXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgW2Rpc2FibGVkXT1cImdldFVuZnVsZmlsbGVkQ291bnQobGluZSkgPT09IDBcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBbKG5nTW9kZWwpXT1cImZ1bGZpbGxtZW50UXVhbnRpdGllc1tsaW5lLmlkXS5mdWxmaWxsQ291bnRcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlPVwibnVtYmVyXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgW21heF09XCJmdWxmaWxsbWVudFF1YW50aXRpZXNbbGluZS5pZF0ubWF4XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgbWluPVwiMFwiXHJcbiAgICAgICAgICAgICAgICAgICAgLz5cclx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5jZWwoKVwiPnt7ICdjb21tb24uY2FuY2VsJyB8IHRyYW5zbGF0ZSB9fTwvYnV0dG9uPlxyXG4gICAgPGJ1dHRvbiB0eXBlPVwic3VibWl0XCIgKGNsaWNrKT1cInNlbGVjdCgpXCIgW2Rpc2FibGVkXT1cIiFjYW5TdWJtaXQoKVwiIGNsYXNzPVwiYnRuIGJ0bi1wcmltYXJ5XCI+XHJcbiAgICAgICAge3sgJ29yZGVyLmNyZWF0ZS1mdWxmaWxsbWVudCcgfCB0cmFuc2xhdGUgfX1cclxuICAgIDwvYnV0dG9uPlxyXG48L25nLXRlbXBsYXRlPlxyXG4iXX0=
@@ -34,7 +34,7 @@ export class FulfillmentCardComponent {
34
34
  }
35
35
  }
36
36
  FulfillmentCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FulfillmentCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
37
- FulfillmentCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FulfillmentCardComponent, selector: "vdr-fulfillment-card", inputs: { fulfillment: "fulfillment", order: "order" }, outputs: { transitionState: "transitionState" }, ngImport: i0, template: "<div class=\"card\">\r\n <div class=\"card-header fulfillment-header\">\r\n <div>{{ 'order.fulfillment' | translate }}</div>\r\n <div class=\"fulfillment-state\">\r\n <vdr-fulfillment-state-label [state]=\"fulfillment?.state\"></vdr-fulfillment-state-label>\r\n </div>\r\n </div>\r\n <div class=\"card-block\">\r\n <vdr-fulfillment-detail\r\n *ngIf=\"!!fulfillment\"\r\n [fulfillmentId]=\"fulfillment?.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </div>\r\n <div class=\"card-footer\" *ngIf=\"fulfillment?.nextStates.length\">\r\n <ng-container *ngIf=\"nextSuggestedState() as suggestedState\">\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"transitionState.emit(suggestedState)\">\r\n {{ 'order.set-fulfillment-state' | translate: { state: (suggestedState | stateI18nToken | translate) } }}\r\n </button>\r\n </ng-container>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <ng-container *ngFor=\"let nextState of nextOtherStates()\">\r\n <button\r\n type=\"button\"\r\n class=\"btn\"\r\n vdrDropdownItem\r\n (click)=\"transitionState.emit(nextState)\"\r\n >\r\n <ng-container *ngIf=\"nextState !== 'Cancelled'; else cancel\">\r\n <clr-icon shape=\"step-forward-2\"></clr-icon>\r\n {{ 'order.transition-to-state' | translate: { state: (nextState | stateI18nToken | translate) } }}\r\n </ng-container>\r\n <ng-template #cancel>\r\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\r\n {{ 'order.cancel-fulfillment' | translate }}\r\n </ng-template>\r\n </button>\r\n </ng-container>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n</div>\r\n", styles: [".fulfillment-header{display:flex;justify-content:space-between;align-items:center}.card-footer{display:flex;align-items:center;justify-content:flex-end}\n"], components: [{ type: i1.FulfillmentStateLabelComponent, selector: "vdr-fulfillment-state-label", inputs: ["state"] }, { type: i2.FulfillmentDetailComponent, selector: "vdr-fulfillment-detail", inputs: ["fulfillmentId", "order"] }, { type: i3.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { type: i3.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { type: i5.ClrIconCustomTag, selector: "clr-icon" }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.DropdownItemDirective, selector: "[vdrDropdownItem]" }], pipes: { "translate": i6.TranslatePipe, "stateI18nToken": i3.StateI18nTokenPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
37
+ FulfillmentCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FulfillmentCardComponent, selector: "vdr-fulfillment-card", inputs: { fulfillment: "fulfillment", order: "order" }, outputs: { transitionState: "transitionState" }, ngImport: i0, template: "<div class=\"card\">\r\n <div class=\"card-header fulfillment-header\">\r\n <div>{{ 'order.fulfillment' | translate }}</div>\r\n <div class=\"fulfillment-state\">\r\n <vdr-fulfillment-state-label [state]=\"fulfillment?.state\"></vdr-fulfillment-state-label>\r\n </div>\r\n </div>\r\n <div class=\"card-block\">\r\n <vdr-fulfillment-detail\r\n *ngIf=\"!!fulfillment\"\r\n [fulfillmentId]=\"fulfillment?.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </div>\r\n <div class=\"card-footer\" *ngIf=\"fulfillment?.nextStates.length\">\r\n <ng-container *ngIf=\"nextSuggestedState() as suggestedState\">\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"transitionState.emit(suggestedState)\">\r\n {{ 'order.set-fulfillment-state' | translate: { state: (suggestedState | stateI18nToken | translate) } }}\r\n </button>\r\n </ng-container>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <ng-container *ngFor=\"let nextState of nextOtherStates()\">\r\n <button\r\n type=\"button\"\r\n class=\"btn\"\r\n vdrDropdownItem\r\n (click)=\"transitionState.emit(nextState)\"\r\n >\r\n <ng-container *ngIf=\"nextState !== 'Cancelled'; else cancel\">\r\n <clr-icon shape=\"step-forward-2\"></clr-icon>\r\n {{ 'order.transition-to-state' | translate: { state: (nextState | stateI18nToken | translate) } }}\r\n </ng-container>\r\n <ng-template #cancel>\r\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\r\n {{ 'order.cancel-fulfillment' | translate }}\r\n </ng-template>\r\n </button>\r\n </ng-container>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n</div>\r\n", styles: [".fulfillment-header{display:flex;justify-content:space-between;align-items:center}.card-footer{display:flex;align-items:center;justify-content:flex-end}\n"], components: [{ type: i1.FulfillmentStateLabelComponent, selector: "vdr-fulfillment-state-label", inputs: ["state"] }, { type: i2.FulfillmentDetailComponent, selector: "vdr-fulfillment-detail", inputs: ["fulfillmentId", "order"] }, { type: i3.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { type: i3.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { type: i5.ClrIconCustomTag, selector: "clr-icon" }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.DropdownItemDirective, selector: "[vdrDropdownItem]" }], pipes: { "translate": i6.TranslatePipe, "stateI18nToken": i3.StateI18nTokenPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
38
38
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FulfillmentCardComponent, decorators: [{
39
39
  type: Component,
40
40
  args: [{ selector: 'vdr-fulfillment-card', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"card\">\r\n <div class=\"card-header fulfillment-header\">\r\n <div>{{ 'order.fulfillment' | translate }}</div>\r\n <div class=\"fulfillment-state\">\r\n <vdr-fulfillment-state-label [state]=\"fulfillment?.state\"></vdr-fulfillment-state-label>\r\n </div>\r\n </div>\r\n <div class=\"card-block\">\r\n <vdr-fulfillment-detail\r\n *ngIf=\"!!fulfillment\"\r\n [fulfillmentId]=\"fulfillment?.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </div>\r\n <div class=\"card-footer\" *ngIf=\"fulfillment?.nextStates.length\">\r\n <ng-container *ngIf=\"nextSuggestedState() as suggestedState\">\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"transitionState.emit(suggestedState)\">\r\n {{ 'order.set-fulfillment-state' | translate: { state: (suggestedState | stateI18nToken | translate) } }}\r\n </button>\r\n </ng-container>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <ng-container *ngFor=\"let nextState of nextOtherStates()\">\r\n <button\r\n type=\"button\"\r\n class=\"btn\"\r\n vdrDropdownItem\r\n (click)=\"transitionState.emit(nextState)\"\r\n >\r\n <ng-container *ngIf=\"nextState !== 'Cancelled'; else cancel\">\r\n <clr-icon shape=\"step-forward-2\"></clr-icon>\r\n {{ 'order.transition-to-state' | translate: { state: (nextState | stateI18nToken | translate) } }}\r\n </ng-container>\r\n <ng-template #cancel>\r\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\r\n {{ 'order.cancel-fulfillment' | translate }}\r\n </ng-template>\r\n </button>\r\n </ng-container>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n</div>\r\n", styles: [".fulfillment-header{display:flex;justify-content:space-between;align-items:center}.card-footer{display:flex;align-items:center;justify-content:flex-end}\n"] }]