@vendure/admin-ui 1.3.2 → 1.4.0

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 (255) hide show
  1. package/bundles/vendure-admin-ui-catalog.umd.js +87 -162
  2. package/bundles/vendure-admin-ui-catalog.umd.js.map +1 -1
  3. package/bundles/vendure-admin-ui-core.umd.js +2058 -426
  4. package/bundles/vendure-admin-ui-core.umd.js.map +1 -1
  5. package/bundles/vendure-admin-ui-customer.umd.js +79 -57
  6. package/bundles/vendure-admin-ui-customer.umd.js.map +1 -1
  7. package/bundles/vendure-admin-ui-marketing.umd.js +11 -1
  8. package/bundles/vendure-admin-ui-marketing.umd.js.map +1 -1
  9. package/bundles/vendure-admin-ui-order.umd.js +10 -2
  10. package/bundles/vendure-admin-ui-order.umd.js.map +1 -1
  11. package/bundles/vendure-admin-ui-settings.umd.js +156 -153
  12. package/bundles/vendure-admin-ui-settings.umd.js.map +1 -1
  13. package/catalog/components/collection-detail/collection-detail.component.d.ts +0 -1
  14. package/catalog/components/collection-list/collection-list.component.d.ts +3 -0
  15. package/catalog/components/facet-detail/facet-detail.component.d.ts +0 -1
  16. package/catalog/components/facet-list/facet-list.component.d.ts +3 -5
  17. package/catalog/components/product-detail/product-detail.component.d.ts +0 -1
  18. package/catalog/vendure-admin-ui-catalog.metadata.json +1 -1
  19. package/core/app.component.d.ts +1 -0
  20. package/core/common/base-detail.component.d.ts +42 -1
  21. package/core/common/base-entity-resolver.d.ts +28 -1
  22. package/core/common/base-list.component.d.ts +75 -1
  23. package/core/common/component-registry-types.d.ts +46 -0
  24. package/core/common/generated-types.d.ts +286 -27
  25. package/core/common/utilities/get-default-ui-language.d.ts +1 -0
  26. package/core/common/version.d.ts +1 -1
  27. package/core/components/app-shell/app-shell.component.d.ts +1 -1
  28. package/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.d.ts +17 -4
  29. package/core/components/user-menu/user-menu.component.d.ts +1 -1
  30. package/core/data/client-state/client-defaults.d.ts +1 -1
  31. package/core/data/definitions/client-definitions.d.ts +3 -1
  32. package/core/data/definitions/customer-definitions.d.ts +1 -0
  33. package/core/data/definitions/settings-definitions.d.ts +1 -0
  34. package/core/data/providers/client-data.service.d.ts +3 -1
  35. package/core/data/providers/data.service.d.ts +54 -12
  36. package/core/data/providers/settings-data.service.d.ts +3 -0
  37. package/core/data/query-result.d.ts +11 -2
  38. package/core/providers/custom-detail-component/custom-detail-component-types.d.ts +25 -0
  39. package/core/providers/custom-detail-component/custom-detail-component.service.d.ts +15 -0
  40. package/core/providers/custom-field-component/custom-field-component.service.d.ts +3 -3
  41. package/core/providers/local-storage/local-storage.service.d.ts +1 -0
  42. package/core/providers/modal/modal.service.d.ts +41 -12
  43. package/core/providers/nav-builder/nav-builder-types.d.ts +19 -1
  44. package/core/providers/nav-builder/nav-builder.service.d.ts +14 -10
  45. package/core/providers/notification/notification.service.d.ts +37 -0
  46. package/core/public_api.d.ts +8 -0
  47. package/core/shared/components/action-bar-items/action-bar-items.component.d.ts +2 -1
  48. package/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.d.ts +18 -0
  49. package/core/shared/components/asset-preview/asset-preview.component.d.ts +0 -1
  50. package/core/shared/components/channel-assignment-control/channel-assignment-control.component.d.ts +2 -0
  51. package/core/shared/components/chip/chip.component.d.ts +20 -0
  52. package/core/shared/components/currency-input/currency-input.component.d.ts +11 -0
  53. package/core/shared/components/custom-detail-component-host/custom-detail-component-host.component.d.ts +17 -0
  54. package/core/shared/components/data-table/data-table.component.d.ts +59 -0
  55. package/core/shared/components/datetime-picker/datetime-picker.component.d.ts +17 -0
  56. package/core/shared/components/dropdown/dropdown.component.d.ts +25 -0
  57. package/core/shared/components/extension-host/extension-host.service.d.ts +3 -1
  58. package/core/shared/components/facet-value-selector/facet-value-selector.component.d.ts +22 -0
  59. package/core/shared/components/modal-dialog/modal-dialog.component.d.ts +1 -1
  60. package/core/shared/components/object-tree/object-tree.component.d.ts +8 -0
  61. package/core/shared/components/order-state-label/order-state-label.component.d.ts +10 -0
  62. package/core/shared/components/product-selector/product-selector.component.d.ts +12 -0
  63. package/core/shared/components/rich-text-editor/rich-text-editor.component.d.ts +12 -1
  64. package/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.d.ts +21 -0
  65. package/core/shared/components/ui-extension-point/ui-extension-point.component.d.ts +15 -0
  66. package/core/shared/directives/if-multichannel.directive.d.ts +14 -0
  67. package/core/shared/directives/if-permissions.directive.d.ts +3 -0
  68. package/core/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.d.ts +7 -0
  69. package/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.d.ts +32 -0
  70. package/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.d.ts +7 -0
  71. package/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.d.ts +8 -0
  72. package/core/shared/dynamic-form-inputs/date-form-input/date-form-input.component.d.ts +10 -0
  73. package/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.d.ts +8 -0
  74. package/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.d.ts +12 -0
  75. package/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.d.ts +7 -0
  76. package/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.d.ts +8 -0
  77. package/core/shared/dynamic-form-inputs/register-dynamic-input-components.d.ts +40 -3
  78. package/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.d.ts +9 -0
  79. package/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.d.ts +16 -0
  80. package/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.d.ts +9 -0
  81. package/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.d.ts +12 -3
  82. package/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.d.ts +7 -0
  83. package/core/shared/pipes/asset-preview.pipe.d.ts +14 -0
  84. package/core/shared/pipes/duration.pipe.d.ts +8 -0
  85. package/core/shared/pipes/file-size.pipe.d.ts +8 -0
  86. package/core/shared/pipes/has-permission.pipe.d.ts +3 -1
  87. package/core/shared/pipes/locale-currency-name.pipe.d.ts +8 -0
  88. package/core/shared/pipes/locale-currency.pipe.d.ts +12 -0
  89. package/core/shared/pipes/locale-date.pipe.d.ts +7 -0
  90. package/core/shared/pipes/locale-language-name.pipe.d.ts +9 -1
  91. package/core/shared/pipes/locale-region-name.pipe.d.ts +18 -0
  92. package/core/shared/pipes/time-ago.pipe.d.ts +8 -0
  93. package/core/vendure-admin-ui-core.metadata.json +1 -1
  94. package/customer/components/customer-detail/customer-detail.component.d.ts +2 -3
  95. package/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.d.ts +14 -3
  96. package/customer/vendure-admin-ui-customer.metadata.json +1 -1
  97. package/esm2015/catalog/catalog.module.js +29 -28
  98. package/esm2015/catalog/components/asset-detail/asset-detail.component.js +2 -10
  99. package/esm2015/catalog/components/collection-detail/collection-detail.component.js +3 -16
  100. package/esm2015/catalog/components/collection-list/collection-list.component.js +23 -5
  101. package/esm2015/catalog/components/collection-tree/collection-tree-node.component.js +1 -1
  102. package/esm2015/catalog/components/collection-tree/collection-tree.component.js +1 -1
  103. package/esm2015/catalog/components/facet-detail/facet-detail.component.js +3 -15
  104. package/esm2015/catalog/components/facet-list/facet-list.component.js +24 -9
  105. package/esm2015/catalog/components/product-assets/product-assets.component.js +2 -2
  106. package/esm2015/catalog/components/product-detail/product-detail.component.js +5 -27
  107. package/esm2015/catalog/components/product-variants-list/product-variants-list.component.js +3 -3
  108. package/esm2015/catalog/components/update-product-option-dialog/update-product-option-dialog.component.js +2 -2
  109. package/esm2015/catalog/components/variant-price-detail/variant-price-detail.component.js +2 -2
  110. package/esm2015/core/app.component.js +20 -2
  111. package/esm2015/core/common/base-detail.component.js +53 -1
  112. package/esm2015/core/common/base-entity-resolver.js +29 -2
  113. package/esm2015/core/common/base-list.component.js +76 -2
  114. package/esm2015/core/common/component-registry-types.js +1 -1
  115. package/esm2015/core/common/generated-types.js +1 -1
  116. package/esm2015/core/common/introspection-result.js +249 -183
  117. package/esm2015/core/common/utilities/get-default-ui-language.js +9 -1
  118. package/esm2015/core/common/version.js +2 -2
  119. package/esm2015/core/components/app-shell/app-shell.component.js +12 -7
  120. package/esm2015/core/components/main-nav/main-nav.component.js +2 -2
  121. package/esm2015/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.js +281 -5
  122. package/esm2015/core/components/user-menu/user-menu.component.js +3 -3
  123. package/esm2015/core/data/client-state/client-defaults.js +5 -2
  124. package/esm2015/core/data/client-state/client-resolvers.js +32 -33
  125. package/esm2015/core/data/definitions/client-definitions.js +18 -3
  126. package/esm2015/core/data/definitions/customer-definitions.js +21 -25
  127. package/esm2015/core/data/definitions/settings-definitions.js +50 -5
  128. package/esm2015/core/data/providers/client-data.service.js +15 -4
  129. package/esm2015/core/data/providers/data.service.js +44 -2
  130. package/esm2015/core/data/providers/settings-data.service.js +12 -4
  131. package/esm2015/core/data/query-result.js +14 -4
  132. package/esm2015/core/providers/custom-detail-component/custom-detail-component-types.js +2 -0
  133. package/esm2015/core/providers/custom-detail-component/custom-detail-component.service.js +44 -0
  134. package/esm2015/core/providers/custom-field-component/custom-field-component.service.js +6 -6
  135. package/esm2015/core/providers/local-storage/local-storage.service.js +1 -1
  136. package/esm2015/core/providers/modal/modal.service.js +20 -12
  137. package/esm2015/core/providers/nav-builder/nav-builder-types.js +1 -1
  138. package/esm2015/core/providers/nav-builder/nav-builder.service.js +15 -11
  139. package/esm2015/core/providers/notification/notification.service.js +24 -1
  140. package/esm2015/core/public_api.js +9 -1
  141. package/esm2015/core/shared/components/action-bar/action-bar.component.js +1 -1
  142. package/esm2015/core/shared/components/action-bar-items/action-bar-items.component.js +3 -3
  143. package/esm2015/core/shared/components/address-form/address-form.component.js +2 -2
  144. package/esm2015/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.js +19 -1
  145. package/esm2015/core/shared/components/asset-preview/asset-preview.component.js +2 -6
  146. package/esm2015/core/shared/components/channel-assignment-control/channel-assignment-control.component.js +36 -22
  147. package/esm2015/core/shared/components/chip/chip.component.js +12 -1
  148. package/esm2015/core/shared/components/currency-input/currency-input.component.js +12 -1
  149. package/esm2015/core/shared/components/custom-detail-component-host/custom-detail-component-host.component.js +44 -0
  150. package/esm2015/core/shared/components/data-table/data-table.component.js +60 -1
  151. package/esm2015/core/shared/components/datetime-picker/datetime-picker.component.js +17 -1
  152. package/esm2015/core/shared/components/dropdown/dropdown.component.js +26 -1
  153. package/esm2015/core/shared/components/extension-host/extension-host.component.js +3 -3
  154. package/esm2015/core/shared/components/extension-host/extension-host.service.js +16 -2
  155. package/esm2015/core/shared/components/facet-value-selector/facet-value-selector.component.js +23 -1
  156. package/esm2015/core/shared/components/modal-dialog/modal-dialog.component.js +2 -2
  157. package/esm2015/core/shared/components/object-tree/object-tree.component.js +11 -3
  158. package/esm2015/core/shared/components/order-state-label/order-state-label.component.js +11 -1
  159. package/esm2015/core/shared/components/product-selector/product-selector.component.js +13 -1
  160. package/esm2015/core/shared/components/rich-text-editor/rich-text-editor.component.js +14 -3
  161. package/esm2015/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.js +48 -0
  162. package/esm2015/core/shared/components/title-input/title-input.component.js +1 -1
  163. package/esm2015/core/shared/components/ui-extension-point/ui-extension-point.component.js +31 -0
  164. package/esm2015/core/shared/directives/if-multichannel.directive.js +15 -1
  165. package/esm2015/core/shared/directives/if-permissions.directive.js +4 -1
  166. package/esm2015/core/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.js +8 -1
  167. package/esm2015/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.js +125 -0
  168. package/esm2015/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.js +8 -1
  169. package/esm2015/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.js +9 -1
  170. package/esm2015/core/shared/dynamic-form-inputs/date-form-input/date-form-input.component.js +21 -2
  171. package/esm2015/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.js +2 -1
  172. package/esm2015/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.js +9 -1
  173. package/esm2015/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.js +29 -2
  174. package/esm2015/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.js +8 -1
  175. package/esm2015/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.js +9 -1
  176. package/esm2015/core/shared/dynamic-form-inputs/register-dynamic-input-components.js +42 -2
  177. package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.js +10 -1
  178. package/esm2015/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.js +20 -0
  179. package/esm2015/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.js +14 -2
  180. package/esm2015/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.js +17 -2
  181. package/esm2015/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.js +8 -1
  182. package/esm2015/core/shared/pipes/asset-preview.pipe.js +15 -1
  183. package/esm2015/core/shared/pipes/duration.pipe.js +9 -1
  184. package/esm2015/core/shared/pipes/file-size.pipe.js +9 -1
  185. package/esm2015/core/shared/pipes/has-permission.pipe.js +4 -2
  186. package/esm2015/core/shared/pipes/locale-base.pipe.js +7 -4
  187. package/esm2015/core/shared/pipes/locale-currency-name.pipe.js +9 -1
  188. package/esm2015/core/shared/pipes/locale-currency.pipe.js +13 -1
  189. package/esm2015/core/shared/pipes/locale-date.pipe.js +8 -1
  190. package/esm2015/core/shared/pipes/locale-language-name.pipe.js +10 -2
  191. package/esm2015/core/shared/pipes/locale-region-name.pipe.js +48 -0
  192. package/esm2015/core/shared/pipes/time-ago.pipe.js +9 -1
  193. package/esm2015/core/shared/shared.module.js +13 -1
  194. package/esm2015/customer/components/customer-detail/customer-detail.component.js +5 -16
  195. package/esm2015/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.js +32 -3
  196. package/esm2015/customer/components/customer-group-list/customer-group-list.component.js +22 -18
  197. package/esm2015/marketing/components/promotion-detail/promotion-detail.component.js +9 -2
  198. package/esm2015/order/components/order-detail/order-detail.component.js +11 -3
  199. package/esm2015/settings/components/admin-detail/admin-detail.component.js +3 -14
  200. package/esm2015/settings/components/channel-detail/channel-detail.component.js +3 -14
  201. package/esm2015/settings/components/country-detail/country-detail.component.js +11 -3
  202. package/esm2015/settings/components/country-list/country-list.component.js +19 -7
  203. package/esm2015/settings/components/global-settings/global-settings.component.js +3 -14
  204. package/esm2015/settings/components/payment-method-detail/payment-method-detail.component.js +9 -2
  205. package/esm2015/settings/components/profile/profile.component.js +3 -14
  206. package/esm2015/settings/components/shipping-method-detail/shipping-method-detail.component.js +3 -16
  207. package/esm2015/settings/components/tax-category-detail/tax-category-detail.component.js +13 -3
  208. package/esm2015/settings/components/tax-rate-detail/tax-rate-detail.component.js +9 -2
  209. package/esm2015/settings/components/zone-detail-dialog/zone-detail-dialog.component.js +32 -3
  210. package/esm2015/settings/components/zone-list/zone-list.component.js +19 -8
  211. package/fesm2015/vendure-admin-ui-catalog.js +83 -102
  212. package/fesm2015/vendure-admin-ui-catalog.js.map +1 -1
  213. package/fesm2015/vendure-admin-ui-core.js +1900 -362
  214. package/fesm2015/vendure-admin-ui-core.js.map +1 -1
  215. package/fesm2015/vendure-admin-ui-customer.js +54 -34
  216. package/fesm2015/vendure-admin-ui-customer.js.map +1 -1
  217. package/fesm2015/vendure-admin-ui-marketing.js +8 -1
  218. package/fesm2015/vendure-admin-ui-marketing.js.map +1 -1
  219. package/fesm2015/vendure-admin-ui-order.js +10 -2
  220. package/fesm2015/vendure-admin-ui-order.js.map +1 -1
  221. package/fesm2015/vendure-admin-ui-settings.js +110 -85
  222. package/fesm2015/vendure-admin-ui-settings.js.map +1 -1
  223. package/marketing/components/promotion-detail/promotion-detail.component.d.ts +2 -1
  224. package/marketing/vendure-admin-ui-marketing.metadata.json +1 -1
  225. package/order/vendure-admin-ui-order.metadata.json +1 -1
  226. package/package.json +6 -5
  227. package/settings/components/admin-detail/admin-detail.component.d.ts +0 -1
  228. package/settings/components/channel-detail/channel-detail.component.d.ts +0 -1
  229. package/settings/components/country-detail/country-detail.component.d.ts +2 -1
  230. package/settings/components/country-list/country-list.component.d.ts +7 -2
  231. package/settings/components/global-settings/global-settings.component.d.ts +0 -1
  232. package/settings/components/payment-method-detail/payment-method-detail.component.d.ts +2 -1
  233. package/settings/components/profile/profile.component.d.ts +0 -1
  234. package/settings/components/shipping-method-detail/shipping-method-detail.component.d.ts +0 -1
  235. package/settings/components/tax-category-detail/tax-category-detail.component.d.ts +2 -1
  236. package/settings/components/tax-rate-detail/tax-rate-detail.component.d.ts +2 -1
  237. package/settings/components/zone-detail-dialog/zone-detail-dialog.component.d.ts +14 -3
  238. package/settings/components/zone-list/zone-list.component.d.ts +6 -2
  239. package/settings/vendure-admin-ui-settings.metadata.json +1 -1
  240. package/static/i18n-messages/cs.json +7 -0
  241. package/static/i18n-messages/de.json +7 -0
  242. package/static/i18n-messages/en.json +7 -0
  243. package/static/i18n-messages/es.json +8 -1
  244. package/static/i18n-messages/fr.json +7 -0
  245. package/static/i18n-messages/it.json +7 -0
  246. package/static/i18n-messages/pl.json +7 -0
  247. package/static/i18n-messages/pt_BR.json +7 -0
  248. package/static/i18n-messages/pt_PT.json +7 -0
  249. package/static/i18n-messages/ru.json +7 -0
  250. package/static/i18n-messages/uk.json +7 -0
  251. package/static/i18n-messages/zh_Hans.json +7 -0
  252. package/static/i18n-messages/zh_Hant.json +7 -0
  253. package/static/styles/theme/dark.scss +9 -0
  254. package/static/styles/theme/default.scss +8 -0
  255. package/static/theme.min.css +1 -1
@@ -5,6 +5,14 @@ import { Observable } from 'rxjs';
5
5
  import { FormInputComponent, InputComponentConfig } from '../../../common/component-registry-types';
6
6
  import { FacetWithValues } from '../../../common/generated-types';
7
7
  import { DataService } from '../../../data/providers/data.service';
8
+ /**
9
+ * @description
10
+ * Allows the selection of multiple FacetValues via an autocomplete select input.
11
+ * Should be used with `ID` type **list** fields which represent FacetValue IDs.
12
+ *
13
+ * @docsCategory custom-input-components
14
+ * @docsPage default-inputs
15
+ */
8
16
  export declare class FacetValueFormInputComponent implements FormInputComponent, OnInit {
9
17
  private dataService;
10
18
  static readonly id: DefaultFormComponentId;
@@ -1,9 +1,21 @@
1
1
  import { FormControl } from '@angular/forms';
2
2
  import { DefaultFormComponentConfig, DefaultFormComponentId } from '@vendure/common/lib/shared-types';
3
3
  import { FormInputComponent } from '../../../common/component-registry-types';
4
+ /**
5
+ * @description
6
+ * Displays a number input. Default input for `int` and `float` type fields.
7
+ *
8
+ * @docsCategory custom-input-components
9
+ * @docsPage default-inputs
10
+ */
4
11
  export declare class NumberFormInputComponent implements FormInputComponent {
5
12
  static readonly id: DefaultFormComponentId;
6
13
  readonly: boolean;
7
14
  formControl: FormControl;
8
15
  config: DefaultFormComponentConfig<'number-form-input'>;
16
+ get prefix(): string | undefined;
17
+ get suffix(): string | undefined;
18
+ get min(): number | undefined;
19
+ get max(): number | undefined;
20
+ get step(): number | undefined;
9
21
  }
@@ -1,6 +1,13 @@
1
1
  import { FormControl } from '@angular/forms';
2
2
  import { DefaultFormComponentId } from '@vendure/common/lib/shared-types';
3
3
  import { FormInputComponent, InputComponentConfig } from '../../../common/component-registry-types';
4
+ /**
5
+ * @description
6
+ * Displays a password text input. Should be used with `string` type fields.
7
+ *
8
+ * @docsCategory custom-input-components
9
+ * @docsPage default-inputs
10
+ */
4
11
  export declare class PasswordFormInputComponent implements FormInputComponent {
5
12
  static readonly id: DefaultFormComponentId;
6
13
  readonly: boolean;
@@ -5,6 +5,14 @@ import { Observable } from 'rxjs';
5
5
  import { FormInputComponent, InputComponentConfig } from '../../../common/component-registry-types';
6
6
  import { GetProductVariant, ProductSelectorSearch } from '../../../common/generated-types';
7
7
  import { DataService } from '../../../data/providers/data.service';
8
+ /**
9
+ * @description
10
+ * Allows the selection of multiple ProductVariants via an autocomplete select input.
11
+ * Should be used with `ID` type **list** fields which represent ProductVariant IDs.
12
+ *
13
+ * @docsCategory custom-input-components
14
+ * @docsPage default-inputs
15
+ */
8
16
  export declare class ProductSelectorFormInputComponent implements FormInputComponent, OnInit {
9
17
  private dataService;
10
18
  static readonly id: DefaultFormComponentId;
@@ -1,16 +1,18 @@
1
1
  import { FactoryProvider, Type } from '@angular/core';
2
2
  import { FormInputComponent } from '../../common/component-registry-types';
3
3
  import { CustomFieldControl, CustomFieldEntityName } from '../../providers/custom-field-component/custom-field-component.service';
4
+ import { JsonEditorFormInputComponent } from './code-editor-form-input/json-editor-form-input.component';
4
5
  import { CurrencyFormInputComponent } from './currency-form-input/currency-form-input.component';
5
6
  import { CustomerGroupFormInputComponent } from './customer-group-form-input/customer-group-form-input.component';
6
7
  import { FacetValueFormInputComponent } from './facet-value-form-input/facet-value-form-input.component';
8
+ import { PasswordFormInputComponent } from './password-form-input/password-form-input.component';
7
9
  import { ProductSelectorFormInputComponent } from './product-selector-form-input/product-selector-form-input.component';
8
- import { TextFormInputComponent } from './text-form-input/text-form-input.component';
9
- export declare const defaultFormInputs: (typeof ProductSelectorFormInputComponent | typeof CustomerGroupFormInputComponent | typeof TextFormInputComponent | typeof CurrencyFormInputComponent | typeof FacetValueFormInputComponent)[];
10
+ export declare const defaultFormInputs: (typeof ProductSelectorFormInputComponent | typeof CustomerGroupFormInputComponent | typeof PasswordFormInputComponent | typeof CurrencyFormInputComponent | typeof FacetValueFormInputComponent | typeof JsonEditorFormInputComponent)[];
10
11
  /**
11
12
  * @description
12
13
  * Registers a custom FormInputComponent which can be used to control the argument inputs
13
- * of a {@link ConfigurableOperationDef} (e.g. CollectionFilter, ShippingMethod etc)
14
+ * of a {@link ConfigurableOperationDef} (e.g. CollectionFilter, ShippingMethod etc) or for
15
+ * a custom field.
14
16
  *
15
17
  * @example
16
18
  * ```TypeScript
@@ -23,10 +25,41 @@ export declare const defaultFormInputs: (typeof ProductSelectorFormInputComponen
23
25
  * })
24
26
  * export class MyUiExtensionModule {}
25
27
  * ```
28
+ *
29
+ * This input component can then be used in a custom field:
30
+ *
31
+ * @example
32
+ * ```TypeScript
33
+ * const config = {
34
+ * // ...
35
+ * customFields: {
36
+ * ProductVariant: [
37
+ * {
38
+ * name: 'rrp',
39
+ * type: 'int',
40
+ * ui: { component: 'my-custom-input' },
41
+ * },
42
+ * ]
43
+ * }
44
+ * }
45
+ * ```
46
+ *
47
+ * or with an argument of a {@link ConfigurableOperationDef}:
48
+ *
49
+ * @example
50
+ * ```TypeScript
51
+ * args: {
52
+ * rrp: { type: 'int', ui: { component: 'my-custom-input' } },
53
+ * }
54
+ * ```
55
+ *
56
+ * @docsCategory custom-input-components
26
57
  */
27
58
  export declare function registerFormInputComponent(id: string, component: Type<FormInputComponent>): FactoryProvider;
28
59
  /**
29
60
  * @description
61
+ * **Deprecated** use `registerFormInputComponent()` in combination with the customField `ui` config instead.
62
+ *
30
63
  * Registers a custom component to act as the form input control for the given custom field.
31
64
  * This should be used in the NgModule `providers` array of your ui extension module.
32
65
  *
@@ -41,6 +74,10 @@ export declare function registerFormInputComponent(id: string, component: Type<F
41
74
  * })
42
75
  * export class MyUiExtensionModule {}
43
76
  * ```
77
+ *
78
+ * @deprecated use `registerFormInputComponent()` in combination with the customField `ui` config instead.
79
+ *
80
+ * @docsCategory custom-input-components
44
81
  */
45
82
  export declare function registerCustomFieldComponent(entity: CustomFieldEntityName, fieldName: string, component: Type<CustomFieldControl>): FactoryProvider;
46
83
  /**
@@ -2,6 +2,15 @@ import { FormControl } from '@angular/forms';
2
2
  import { DefaultFormComponentId } from '@vendure/common/lib/shared-types';
3
3
  import { FormInputComponent } from '../../../common/component-registry-types';
4
4
  import { RelationCustomFieldConfig } from '../../../common/generated-types';
5
+ /**
6
+ * @description
7
+ * The default input component for `relation` type custom fields. Allows the selection
8
+ * of a ProductVariant, Product, Customer or Asset. For other entity types, a custom
9
+ * implementation will need to be defined. See {@link registerFormInputComponent}.
10
+ *
11
+ * @docsCategory custom-input-components
12
+ * @docsPage default-inputs
13
+ */
5
14
  export declare class RelationFormInputComponent implements FormInputComponent {
6
15
  static readonly id: DefaultFormComponentId;
7
16
  readonly: boolean;
@@ -0,0 +1,16 @@
1
+ import { FormControl } from '@angular/forms';
2
+ import { DefaultFormComponentConfig, DefaultFormComponentId } from '@vendure/common/lib/shared-types';
3
+ import { FormInputComponent } from '../../../common/component-registry-types';
4
+ /**
5
+ * @description
6
+ * Uses the {@link RichTextEditorComponent} as in input for `text` type fields.
7
+ *
8
+ * @docsCategory custom-input-components
9
+ * @docsPage default-inputs
10
+ */
11
+ export declare class RichTextFormInputComponent implements FormInputComponent {
12
+ static readonly id: DefaultFormComponentId;
13
+ readonly: boolean;
14
+ formControl: FormControl;
15
+ config: DefaultFormComponentConfig<'rich-text-form-input'>;
16
+ }
@@ -2,9 +2,18 @@ import { FormControl } from '@angular/forms';
2
2
  import { DefaultFormComponentConfig, DefaultFormComponentId } from '@vendure/common/lib/shared-types';
3
3
  import { FormInputComponent } from '../../../common/component-registry-types';
4
4
  import { CustomFieldConfigFragment } from '../../../common/generated-types';
5
+ /**
6
+ * @description
7
+ * Uses a select input to allow the selection of a string value. Should be used with
8
+ * `string` type fields with options.
9
+ *
10
+ * @docsCategory custom-input-components
11
+ * @docsPage default-inputs
12
+ */
5
13
  export declare class SelectFormInputComponent implements FormInputComponent {
6
14
  static readonly id: DefaultFormComponentId;
7
15
  readonly: boolean;
8
16
  formControl: FormControl;
9
17
  config: DefaultFormComponentConfig<'select-form-input'> & CustomFieldConfigFragment;
18
+ get options(): any;
10
19
  }
@@ -1,9 +1,18 @@
1
1
  import { FormControl } from '@angular/forms';
2
- import { DefaultFormComponentId } from '@vendure/common/lib/shared-types';
3
- import { FormInputComponent, InputComponentConfig } from '../../../common/component-registry-types';
2
+ import { DefaultFormComponentConfig, DefaultFormComponentId } from '@vendure/common/lib/shared-types';
3
+ import { FormInputComponent } from '../../../common/component-registry-types';
4
+ /**
5
+ * @description
6
+ * Uses a regular text form input. This is the default input for `string` and `localeString` type fields.
7
+ *
8
+ * @docsCategory custom-input-components
9
+ * @docsPage default-inputs
10
+ */
4
11
  export declare class TextFormInputComponent implements FormInputComponent {
5
12
  static readonly id: DefaultFormComponentId;
6
13
  readonly: boolean;
7
14
  formControl: FormControl;
8
- config: InputComponentConfig;
15
+ config: DefaultFormComponentConfig<'text-form-input'>;
16
+ get prefix(): string | undefined;
17
+ get suffix(): string | undefined;
9
18
  }
@@ -1,6 +1,13 @@
1
1
  import { FormControl } from '@angular/forms';
2
2
  import { DefaultFormComponentConfig, DefaultFormComponentId } from '@vendure/common/lib/shared-types';
3
3
  import { FormInputComponent } from '../../../common/component-registry-types';
4
+ /**
5
+ * @description
6
+ * Uses textarea form input. This is the default input for `text` type fields.
7
+ *
8
+ * @docsCategory custom-input-components
9
+ * @docsPage default-inputs
10
+ */
4
11
  export declare class TextareaFormInputComponent implements FormInputComponent {
5
12
  static readonly id: DefaultFormComponentId;
6
13
  readonly: boolean;
@@ -1,5 +1,19 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import { AssetFragment } from '../../common/generated-types';
3
+ /**
4
+ * @description
5
+ * Given an Asset object (an object with `preview` and optionally `focalPoint` properties), this pipe
6
+ * returns a string with query parameters designed to work with the image resize capabilities of the
7
+ * AssetServerPlugin.
8
+ *
9
+ * @example
10
+ * ```HTML
11
+ * <img [src]="asset | assetPreview:'tiny'" />
12
+ * <img [src]="asset | assetPreview:150" />
13
+ * ```
14
+ *
15
+ * @docsCategory pipes
16
+ */
3
17
  export declare class AssetPreviewPipe implements PipeTransform {
4
18
  transform(asset?: AssetFragment, preset?: string | number): string;
5
19
  }
@@ -1,8 +1,16 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import { I18nService } from '../../providers/i18n/i18n.service';
3
3
  /**
4
+ * @description
4
5
  * Displays a number of milliseconds in a more human-readable format,
5
6
  * e.g. "12ms", "33s", "2:03m"
7
+ *
8
+ * @example
9
+ * ```TypeScript
10
+ * {{ timeInMs | duration }}
11
+ * ```
12
+ *
13
+ * @docsCategory pipes
6
14
  */
7
15
  export declare class DurationPipe implements PipeTransform {
8
16
  private i18nService;
@@ -1,6 +1,14 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  /**
3
+ * @description
3
4
  * Formats a number into a human-readable file size string.
5
+ *
6
+ * @example
7
+ * ```TypeScript
8
+ * {{ fileSizeInBytes | filesize }}
9
+ * ```
10
+ *
11
+ * @docsCategory pipes
4
12
  */
5
13
  export declare class FileSizePipe implements PipeTransform {
6
14
  transform(value: number, useSiUnits?: boolean): any;
@@ -1,13 +1,15 @@
1
1
  import { ChangeDetectorRef, OnDestroy, PipeTransform } from '@angular/core';
2
2
  import { DataService } from '../../data/providers/data.service';
3
3
  /**
4
+ * @description
4
5
  * A pipe which checks the provided permission against all the permissions of the current user.
5
6
  * Returns `true` if the current user has that permission.
6
7
  *
7
8
  * @example
8
- * ```
9
+ * ```HTML
9
10
  * <button [disabled]="!('UpdateCatalog' | hasPermission)">Save Changes</button>
10
11
  * ```
12
+ * @docsCategory pipes
11
13
  */
12
14
  export declare class HasPermissionPipe implements PipeTransform, OnDestroy {
13
15
  private dataService;
@@ -2,7 +2,15 @@ import { ChangeDetectorRef, PipeTransform } from '@angular/core';
2
2
  import { DataService } from '../../data/providers/data.service';
3
3
  import { LocaleBasePipe } from './locale-base.pipe';
4
4
  /**
5
+ * @description
5
6
  * Displays a human-readable name for a given ISO 4217 currency code.
7
+ *
8
+ * @example
9
+ * ```HTML
10
+ * {{ order.currencyCode | localeCurrencyName }}
11
+ * ```
12
+ *
13
+ * @docsCategory pipes
6
14
  */
7
15
  export declare class LocaleCurrencyNamePipe extends LocaleBasePipe implements PipeTransform {
8
16
  constructor(dataService?: DataService, changeDetectorRef?: ChangeDetectorRef);
@@ -1,6 +1,18 @@
1
1
  import { ChangeDetectorRef, PipeTransform } from '@angular/core';
2
2
  import { DataService } from '../../data/providers/data.service';
3
3
  import { LocaleBasePipe } from './locale-base.pipe';
4
+ /**
5
+ * @description
6
+ * Formats a Vendure monetary value (in cents) into the correct format for the configured currency and display
7
+ * locale.
8
+ *
9
+ * @example
10
+ * ```HTML
11
+ * {{ variant.priceWithTax | localeCurrency }}
12
+ * ```
13
+ *
14
+ * @docsCategory pipes
15
+ */
4
16
  export declare class LocaleCurrencyPipe extends LocaleBasePipe implements PipeTransform {
5
17
  constructor(dataService?: DataService, changeDetectorRef?: ChangeDetectorRef);
6
18
  transform(value: unknown, ...args: unknown[]): string | unknown;
@@ -5,6 +5,13 @@ import { LocaleBasePipe } from './locale-base.pipe';
5
5
  * @description
6
6
  * A replacement of the Angular DatePipe which makes use of the Intl API
7
7
  * to format dates according to the selected UI language.
8
+ *
9
+ * @example
10
+ * ```HTML
11
+ * {{ order.orderPlacedAt | localeDate }}
12
+ * ```
13
+ *
14
+ * @docsCategory pipes
8
15
  */
9
16
  export declare class LocaleDatePipe extends LocaleBasePipe implements PipeTransform {
10
17
  constructor(dataService?: DataService, changeDetectorRef?: ChangeDetectorRef);
@@ -2,7 +2,15 @@ import { ChangeDetectorRef, PipeTransform } from '@angular/core';
2
2
  import { DataService } from '../../data/providers/data.service';
3
3
  import { LocaleBasePipe } from './locale-base.pipe';
4
4
  /**
5
- * Displays a human-readable name for a given ISO 4217 currency code.
5
+ * @description
6
+ * Displays a human-readable name for a given ISO 639-1 language code.
7
+ *
8
+ * @example
9
+ * ```HTML
10
+ * {{ 'zh_Hant' | localeLanguageName }}
11
+ * ```
12
+ *
13
+ * @docsCategory pipes
6
14
  */
7
15
  export declare class LocaleLanguageNamePipe extends LocaleBasePipe implements PipeTransform {
8
16
  constructor(dataService?: DataService, changeDetectorRef?: ChangeDetectorRef);
@@ -0,0 +1,18 @@
1
+ import { ChangeDetectorRef, PipeTransform } from '@angular/core';
2
+ import { DataService } from '../../data/providers/data.service';
3
+ import { LocaleBasePipe } from './locale-base.pipe';
4
+ /**
5
+ * @description
6
+ * Displays a human-readable name for a given region.
7
+ *
8
+ * @example
9
+ * ```HTML
10
+ * {{ 'GB' | localeRegionName }}
11
+ * ```
12
+ *
13
+ * @docsCategory pipes
14
+ */
15
+ export declare class LocaleRegionNamePipe extends LocaleBasePipe implements PipeTransform {
16
+ constructor(dataService?: DataService, changeDetectorRef?: ChangeDetectorRef);
17
+ transform(value: any, locale?: unknown): string;
18
+ }
@@ -1,7 +1,15 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import { I18nService } from '../../providers/i18n/i18n.service';
3
3
  /**
4
+ * @description
4
5
  * Converts a date into the format "3 minutes ago", "5 hours ago" etc.
6
+ *
7
+ * @example
8
+ * ```HTML
9
+ * {{ order.orderPlacedAt | timeAgo }}
10
+ * ```
11
+ *
12
+ * @docsCategory pipes
5
13
  */
6
14
  export declare class TimeAgoPipe implements PipeTransform {
7
15
  private i18nService;