providers.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import { addNavMenuSection, registerDataTableComponent } from '@vendure/admin-ui/core';
  2. import {
  3. registerReactFormInputComponent,
  4. registerReactCustomDetailComponent,
  5. registerReactDataTableComponent,
  6. } from '@vendure/admin-ui/react';
  7. import { CustomTableComponent } from './components/custom-table.component';
  8. import { CustomColumnComponent } from './components/CustomColumnComponent';
  9. import { CustomDetailComponent } from './components/CustomDetailComponent';
  10. import { ReactNumberInput } from './components/ReactNumberInput';
  11. export default [
  12. addNavMenuSection(
  13. {
  14. id: 'greeter',
  15. label: 'My Extensions',
  16. items: [
  17. {
  18. id: 'greeter',
  19. label: 'Greeter',
  20. routerLink: ['/extensions/example/greet'],
  21. icon: 'cursor-hand-open',
  22. },
  23. {
  24. id: 'products',
  25. label: 'Products',
  26. routerLink: ['/extensions/example/products'],
  27. icon: 'checkbox-list',
  28. },
  29. ],
  30. },
  31. 'settings',
  32. ),
  33. registerReactFormInputComponent('react-number-input', ReactNumberInput),
  34. registerReactCustomDetailComponent({
  35. component: CustomDetailComponent,
  36. locationId: 'product-detail',
  37. props: {
  38. foo: 'bar',
  39. },
  40. }),
  41. registerDataTableComponent({
  42. component: CustomTableComponent,
  43. tableId: 'product-list',
  44. columnId: 'slug',
  45. }),
  46. registerReactDataTableComponent({
  47. component: CustomColumnComponent,
  48. tableId: 'product-list',
  49. columnId: 'id',
  50. props: {
  51. foo: 'bar',
  52. },
  53. }),
  54. ];