umwd-components 0.1.737 → 0.1.739

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 (117) hide show
  1. package/dist/cjs/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  2. package/dist/cjs/node_modules/safe-buffer/index.js +1 -1
  3. package/dist/cjs/src/components/common/csv/CsvDownloader.js +1 -1
  4. package/dist/cjs/src/components/common/media/MediaGrid.js +1 -1
  5. package/dist/cjs/src/components/common/media/UploadMediaForm.js +1 -1
  6. package/dist/cjs/src/components/e-commerce/cart/CartDisplay.js +1 -1
  7. package/dist/cjs/src/components/e-commerce/categories/AddCategoryForm.js +1 -1
  8. package/dist/cjs/src/components/e-commerce/categories/EditCategoryForm.js +1 -1
  9. package/dist/cjs/src/components/e-commerce/checkout/CheckoutForm.js +1 -1
  10. package/dist/cjs/src/components/e-commerce/checkout/Step3.js +1 -1
  11. package/dist/cjs/src/components/e-commerce/customer/CustomerProfileDisplay.js +1 -1
  12. package/dist/cjs/src/components/e-commerce/customer/CustomerProfileEditForm.js +1 -1
  13. package/dist/cjs/src/components/e-commerce/customer/DenseCustomerProfileDisplay.js +1 -1
  14. package/dist/cjs/src/components/e-commerce/enduser/EnduserProfileDisplay.js +1 -1
  15. package/dist/cjs/src/components/e-commerce/enduser/EnduserProfileEditForm.js +1 -1
  16. package/dist/cjs/src/components/e-commerce/invoice/CreateInvoiceForm.js +1 -1
  17. package/dist/cjs/src/components/e-commerce/iro/CreateIROForm.js +1 -1
  18. package/dist/cjs/src/components/e-commerce/iro/ManageIROForm.js +1 -1
  19. package/dist/cjs/src/components/e-commerce/iro/RmaForm.js +1 -1
  20. package/dist/cjs/src/components/e-commerce/iro/TextualManageIROForm.js +1 -1
  21. package/dist/cjs/src/components/e-commerce/opo/CreateOpoForm.js +1 -1
  22. package/dist/cjs/src/components/e-commerce/opo/ManageOpoForm.js +1 -1
  23. package/dist/cjs/src/components/e-commerce/opo/TextualManageOpoForm.js +1 -1
  24. package/dist/cjs/src/components/e-commerce/products/AddProductForm.js +1 -1
  25. package/dist/cjs/src/components/e-commerce/products/EditProductForm.js +1 -1
  26. package/dist/cjs/src/components/e-commerce/products/EditStockForm.js +1 -1
  27. package/dist/cjs/src/components/e-commerce/products/ProductCategoryCard.js +1 -1
  28. package/dist/cjs/src/components/e-commerce/products/SingleProduct.js +1 -1
  29. package/dist/cjs/src/components/layout/Footer.js +1 -1
  30. package/dist/cjs/src/components/logistics/dispatcher/DispatcherProfileDisplay.js +1 -1
  31. package/dist/cjs/src/components/logistics/dispatcher/DispatcherProfileEditForm.js +1 -1
  32. package/dist/cjs/src/components/logistics/ipo/AddIPOForm.js +1 -1
  33. package/dist/cjs/src/components/logistics/ipo/ManageIPOForm.js +1 -1
  34. package/dist/cjs/src/components/logistics/ipo/TextualManageIPOForm.js +1 -1
  35. package/dist/cjs/src/components/logistics/report/PreReportsDisplay.js +1 -1
  36. package/dist/cjs/src/components/logistics/report/ReportsDisplay.js +1 -1
  37. package/dist/cjs/src/components/logistics/vendor/AddVendorForm.js +1 -1
  38. package/dist/cjs/src/components/logistics/vendor/EditVendorForm.js +1 -1
  39. package/dist/cjs/src/components/logistics/vendor/VendorDisplay.js +1 -1
  40. package/dist/cjs/src/components/page-builder/ColumnsSection.js +1 -1
  41. package/dist/cjs/src/components/page-builder/IconSection.js +1 -1
  42. package/dist/cjs/src/components/page-builder/LogoBarSection.js +1 -1
  43. package/dist/cjs/src/components/page-builder/PBPersonaliaSection.js +1 -1
  44. package/dist/cjs/src/components/page-builder/PBTextImageSection.js +1 -1
  45. package/dist/cjs/src/components/page-builder/PictureBarSection.js +1 -1
  46. package/dist/cjs/src/components/page-elements/CategoryBlock.js +1 -1
  47. package/dist/cjs/src/components/page-elements/ColumnsSection.js +1 -1
  48. package/dist/cjs/src/components/page-elements/IconSection.js +1 -1
  49. package/dist/cjs/src/components/page-elements/LogoBarSection.js +1 -1
  50. package/dist/cjs/src/components/page-elements/PersonaliaSection.js +1 -1
  51. package/dist/cjs/src/components/page-elements/PictureBarSection.js +1 -1
  52. package/dist/cjs/src/components/page-elements/ProductBlock.js +1 -1
  53. package/dist/cjs/src/components/page-elements/TextImageSection.js +1 -1
  54. package/dist/cjs/src/components/public-information/PublicInformationForm.js +1 -1
  55. package/dist/cjs/src/data/actions/auth-actions.js +1 -1
  56. package/dist/cjs/src/data/services/get-token.js +1 -1
  57. package/dist/cjs/tsconfig.build.tsbuildinfo +1 -1
  58. package/dist/esm/_virtual/index3.js +2 -2
  59. package/dist/esm/_virtual/index4.js +2 -2
  60. package/dist/esm/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  61. package/dist/esm/node_modules/safe-buffer/index.js +1 -1
  62. package/dist/esm/src/components/common/csv/CsvDownloader.js +5 -5
  63. package/dist/esm/src/components/common/media/MediaGrid.js +1 -1
  64. package/dist/esm/src/components/common/media/UploadMediaForm.js +12 -2
  65. package/dist/esm/src/components/e-commerce/cart/CartDisplay.js +1 -1
  66. package/dist/esm/src/components/e-commerce/categories/AddCategoryForm.js +1 -1
  67. package/dist/esm/src/components/e-commerce/categories/EditCategoryForm.js +1 -1
  68. package/dist/esm/src/components/e-commerce/checkout/CheckoutForm.js +2 -2
  69. package/dist/esm/src/components/e-commerce/checkout/Step3.js +9 -3
  70. package/dist/esm/src/components/e-commerce/customer/CustomerProfileDisplay.js +19 -1
  71. package/dist/esm/src/components/e-commerce/customer/CustomerProfileEditForm.js +1 -1
  72. package/dist/esm/src/components/e-commerce/customer/DenseCustomerProfileDisplay.js +16 -1
  73. package/dist/esm/src/components/e-commerce/enduser/EnduserProfileDisplay.js +4 -1
  74. package/dist/esm/src/components/e-commerce/enduser/EnduserProfileEditForm.js +1 -1
  75. package/dist/esm/src/components/e-commerce/invoice/CreateInvoiceForm.js +3 -3
  76. package/dist/esm/src/components/e-commerce/iro/CreateIROForm.js +1 -1
  77. package/dist/esm/src/components/e-commerce/iro/ManageIROForm.js +2 -2
  78. package/dist/esm/src/components/e-commerce/iro/RmaForm.js +2 -2
  79. package/dist/esm/src/components/e-commerce/iro/TextualManageIROForm.js +3 -3
  80. package/dist/esm/src/components/e-commerce/opo/CreateOpoForm.js +1 -1
  81. package/dist/esm/src/components/e-commerce/opo/ManageOpoForm.js +4 -4
  82. package/dist/esm/src/components/e-commerce/opo/TextualManageOpoForm.js +4 -4
  83. package/dist/esm/src/components/e-commerce/products/AddProductForm.js +3 -3
  84. package/dist/esm/src/components/e-commerce/products/EditProductForm.js +3 -3
  85. package/dist/esm/src/components/e-commerce/products/EditStockForm.js +3 -3
  86. package/dist/esm/src/components/e-commerce/products/ProductCategoryCard.js +10 -2
  87. package/dist/esm/src/components/e-commerce/products/SingleProduct.js +40 -4
  88. package/dist/esm/src/components/layout/Footer.js +24 -9
  89. package/dist/esm/src/components/logistics/dispatcher/DispatcherProfileDisplay.js +10 -1
  90. package/dist/esm/src/components/logistics/dispatcher/DispatcherProfileEditForm.js +1 -1
  91. package/dist/esm/src/components/logistics/ipo/AddIPOForm.js +4 -1
  92. package/dist/esm/src/components/logistics/ipo/ManageIPOForm.js +4 -4
  93. package/dist/esm/src/components/logistics/ipo/TextualManageIPOForm.js +4 -4
  94. package/dist/esm/src/components/logistics/report/PreReportsDisplay.js +1 -1
  95. package/dist/esm/src/components/logistics/report/ReportsDisplay.js +5 -5
  96. package/dist/esm/src/components/logistics/vendor/AddVendorForm.js +23 -4
  97. package/dist/esm/src/components/logistics/vendor/EditVendorForm.js +36 -7
  98. package/dist/esm/src/components/logistics/vendor/VendorDisplay.js +10 -1
  99. package/dist/esm/src/components/page-builder/ColumnsSection.js +4 -1
  100. package/dist/esm/src/components/page-builder/IconSection.js +6 -1
  101. package/dist/esm/src/components/page-builder/LogoBarSection.js +1 -1
  102. package/dist/esm/src/components/page-builder/PBPersonaliaSection.js +11 -2
  103. package/dist/esm/src/components/page-builder/PBTextImageSection.js +8 -2
  104. package/dist/esm/src/components/page-builder/PictureBarSection.js +1 -1
  105. package/dist/esm/src/components/page-elements/CategoryBlock.js +1 -1
  106. package/dist/esm/src/components/page-elements/ColumnsSection.js +4 -1
  107. package/dist/esm/src/components/page-elements/IconSection.js +6 -1
  108. package/dist/esm/src/components/page-elements/LogoBarSection.js +1 -1
  109. package/dist/esm/src/components/page-elements/PersonaliaSection.js +19 -4
  110. package/dist/esm/src/components/page-elements/PictureBarSection.js +1 -1
  111. package/dist/esm/src/components/page-elements/ProductBlock.js +1 -1
  112. package/dist/esm/src/components/page-elements/TextImageSection.js +8 -2
  113. package/dist/esm/src/components/public-information/PublicInformationForm.js +28 -6
  114. package/dist/esm/src/data/actions/auth-actions.js +6 -3
  115. package/dist/esm/src/data/services/get-token.js +1 -1
  116. package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
  117. package/package.json +12 -12
@@ -61,11 +61,25 @@ function AddVendorForm({ productNamesArr, revalidateCallback, handleClose, sx, }
61
61
  });
62
62
  }
63
63
  }, [formState?.strapiErrors]);
64
- return (jsx(Box, { sx: [...(Array.isArray(sx) ? sx : [sx])], children: jsx("form", { action: formAction, children: jsxs(Grid, { container: true, spacing: 2, children: [jsx(Grid, { item: true, xs: 12, children: jsxs(Stack, { spacing: 2, children: [jsx(Typography, { variant: "h3", component: "h1", children: "Add Vendor" }), jsx(Typography, { variant: "body1", children: "Create a new vendor for your business" })] }) }), jsx(Grid, { item: true, xs: 12, children: jsx(ExplanatoryFoldOut, { title: "Vendor", description: "Vendors are businesses that you purchase products from." }) }), jsx(Grid, { item: true, xs: 12, md: 6, children: jsx(BusinessCredentialsFields, { componentName: "business_credentials", componentReference: "common.business-credentials" }) }), jsx(Grid, { item: true, xs: 12, md: 6, children: jsxs(Stack, { spacing: 1, sx: { pt: 1 }, children: [jsx(TextField, { id: "website_url", name: "website_url", label: "Website Url" }), jsx(TextField, { id: "phone_number", name: "phone_number", label: "Phone Number" }), jsx(TextField, { id: "email", name: "email", label: "Email" })] }) }), jsxs(Grid, { item: true, xs: 12, md: 6, children: [jsx(Typography, { variant: "h6", children: "Address" }), jsx(AddressFields, { componentName: "address", componentReference: "common.address" })] }), jsx(Grid, { item: true, xs: 12, children: jsx(Typography, { variant: "h6", children: "Products" }) }), jsx(Grid, { item: true, xs: 12, children: jsx(ProductSelector, { productNames: productNamesArr, currentValue: [] }) }), jsx(Grid, { item: true, xs: 12, children: jsx(Typography, { variant: "h6", children: "Contacts" }) }), newContacts.map((contact, index) => {
65
- return (jsx(Grid, { item: true, xs: 12, sm: 6, md: 4, lg: 3, sx: {
64
+ return (jsx(Box, { sx: [...(Array.isArray(sx) ? sx : [sx])], children: jsx("form", { action: formAction, children: jsxs(Grid, { container: true, spacing: 2, children: [jsx(Grid, { size: 12, children: jsxs(Stack, { spacing: 2, children: [jsx(Typography, { variant: "h3", component: "h1", children: "Add Vendor" }), jsx(Typography, { variant: "body1", children: "Create a new vendor for your business" })] }) }), jsx(Grid, { size: 12, children: jsx(ExplanatoryFoldOut, { title: "Vendor", description: "Vendors are businesses that you purchase products from." }) }), jsx(Grid, { size: {
65
+ xs: 12,
66
+ md: 6
67
+ }, children: jsx(BusinessCredentialsFields, { componentName: "business_credentials", componentReference: "common.business-credentials" }) }), jsx(Grid, { size: {
68
+ xs: 12,
69
+ md: 6
70
+ }, children: jsxs(Stack, { spacing: 1, sx: { pt: 1 }, children: [jsx(TextField, { id: "website_url", name: "website_url", label: "Website Url" }), jsx(TextField, { id: "phone_number", name: "phone_number", label: "Phone Number" }), jsx(TextField, { id: "email", name: "email", label: "Email" })] }) }), jsxs(Grid, { size: {
71
+ xs: 12,
72
+ md: 6
73
+ }, children: [jsx(Typography, { variant: "h6", children: "Address" }), jsx(AddressFields, { componentName: "address", componentReference: "common.address" })] }), jsx(Grid, { size: 12, children: jsx(Typography, { variant: "h6", children: "Products" }) }), jsx(Grid, { size: 12, children: jsx(ProductSelector, { productNames: productNamesArr, currentValue: [] }) }), jsx(Grid, { size: 12, children: jsx(Typography, { variant: "h6", children: "Contacts" }) }), newContacts.map((contact, index) => {
74
+ return (jsx(Grid, { sx: {
66
75
  justifyContent: "center",
67
76
  display: "flex",
68
77
  alignItems: "center",
78
+ }, size: {
79
+ xs: 12,
80
+ sm: 6,
81
+ md: 4,
82
+ lg: 3
69
83
  }, children: jsx(Paper, { sx: {
70
84
  p: 2,
71
85
  width: "100%",
@@ -76,10 +90,15 @@ function AddVendorForm({ productNamesArr, revalidateCallback, handleClose, sx, }
76
90
  }, children: jsx(ContactsFields, { data: contact.data, componentName: contact.componentName, componentReference: "logistics-elements.contact", deleteCallback: () => {
77
91
  handleDeleteContact(index);
78
92
  } }, index) }) }, index));
79
- }), jsx(Grid, { item: true, xs: 12, sm: 6, md: 4, lg: 3, sx: {
93
+ }), jsx(Grid, { sx: {
80
94
  justifyContent: "center",
81
95
  display: "flex",
82
96
  alignItems: "center",
97
+ }, size: {
98
+ xs: 12,
99
+ sm: 6,
100
+ md: 4,
101
+ lg: 3
83
102
  }, children: jsx(Paper, { sx: {
84
103
  p: 2,
85
104
  width: "100%",
@@ -102,7 +121,7 @@ function AddVendorForm({ productNamesArr, revalidateCallback, handleClose, sx, }
102
121
  },
103
122
  },
104
123
  ]);
105
- }, size: "large", children: "Add contact" }) }) }), jsx(Grid, { item: true, xs: 12, children: jsxs(Stack, { direction: "row", spacing: 2, justifyContent: "space-between", alignItems: "center", children: [handleClose && (jsx(Button, { onClick: handleClose, variant: "outlined", children: "Cancel" })), jsx(SubmitButton, { text: "Create Vendor", loadingText: "Creating...", variant: "contained" })] }) })] }) }) }));
124
+ }, size: "large", children: "Add contact" }) }) }), jsx(Grid, { size: 12, children: jsxs(Stack, { direction: "row", spacing: 2, justifyContent: "space-between", alignItems: "center", children: [handleClose && (jsx(Button, { onClick: handleClose, variant: "outlined", children: "Cancel" })), jsx(SubmitButton, { text: "Create Vendor", loadingText: "Creating...", variant: "contained" })] }) })] }) }) }));
106
125
  }
107
126
 
108
127
  export { AddVendorForm };
@@ -81,19 +81,33 @@ function EditVendorForm({ data, productNamesArr, revalidateCallback, handleClose
81
81
  // INFO must utilize the uuid to ensure that the new contacts are unique
82
82
  // this is important to use both the deleteCallback and still not have problems with the key
83
83
  const [newContacts, setNewContacts] = useState([]);
84
- return (jsx(Box, { sx: [...(Array.isArray(sx) ? sx : [sx])], children: jsx("form", { action: formAction, children: jsxs(Grid, { container: true, spacing: 2, children: [jsx(Grid, { item: true, xs: 12, children: jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [jsx(Typography, { variant: "h5", children: "Edit Vendor" }), jsx(NoteTakingComponent, { content: "", related: [
84
+ return (jsx(Box, { sx: [...(Array.isArray(sx) ? sx : [sx])], children: jsx("form", { action: formAction, children: jsxs(Grid, { container: true, spacing: 2, children: [jsx(Grid, { size: 12, children: jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [jsx(Typography, { variant: "h5", children: "Edit Vendor" }), jsx(NoteTakingComponent, { content: "", related: [
85
85
  {
86
86
  id: data.documentId,
87
87
  __type: "api::logistics.vendor-profile",
88
88
  },
89
- ], revalidateCallback: revalidateCallback })] }) }), jsx(Grid, { item: true, xs: 12, children: jsx(ExplanatoryFoldOut, { title: "Vendor", description: "Vendors are businesses that you purchase products from." }) }), jsx(Grid, { item: true, xs: 12, md: 6, children: jsx(BusinessCredentialsFields, { data: business_credentials, componentName: "business_credentials", componentReference: "common.business-credentials" }) }), jsx(Grid, { item: true, xs: 12, md: 6, children: jsxs(Stack, { spacing: 2, children: [jsx(TextField, { id: "website_url", name: "website_url", label: "Website Url", defaultValue: website_url }), jsx(TextField, { id: "phone_number", name: "phone_number", label: "Phone Number", defaultValue: phone_number }), jsx(TextField, { id: "email", name: "email", label: "Email", defaultValue: email })] }) }), jsxs(Grid, { item: true, xs: 12, md: 6, children: [jsx(Typography, { variant: "h6", children: "Address" }), jsx(AddressFields, { data: address, componentName: "address", componentReference: "common.address" })] }), jsxs(Grid, { item: true, xs: 12, sx: { mt: 1 }, children: [jsx(Typography, { variant: "h6", children: "Products" }), jsx(ProductSelector, { productNames: productNamesArr, currentValue: initialProducts.map((prod) => prod.documentId) })] }), jsx(Grid, { item: true, xs: 12, sx: { mt: 1 }, children: jsx(Typography, { variant: "h6", children: "Contacts" }) }), oldContacts?.map((contact, index) => {
89
+ ], revalidateCallback: revalidateCallback })] }) }), jsx(Grid, { size: 12, children: jsx(ExplanatoryFoldOut, { title: "Vendor", description: "Vendors are businesses that you purchase products from." }) }), jsx(Grid, { size: {
90
+ xs: 12,
91
+ md: 6
92
+ }, children: jsx(BusinessCredentialsFields, { data: business_credentials, componentName: "business_credentials", componentReference: "common.business-credentials" }) }), jsx(Grid, { size: {
93
+ xs: 12,
94
+ md: 6
95
+ }, children: jsxs(Stack, { spacing: 2, children: [jsx(TextField, { id: "website_url", name: "website_url", label: "Website Url", defaultValue: website_url }), jsx(TextField, { id: "phone_number", name: "phone_number", label: "Phone Number", defaultValue: phone_number }), jsx(TextField, { id: "email", name: "email", label: "Email", defaultValue: email })] }) }), jsxs(Grid, { size: {
96
+ xs: 12,
97
+ md: 6
98
+ }, children: [jsx(Typography, { variant: "h6", children: "Address" }), jsx(AddressFields, { data: address, componentName: "address", componentReference: "common.address" })] }), jsxs(Grid, { sx: { mt: 1 }, size: 12, children: [jsx(Typography, { variant: "h6", children: "Products" }), jsx(ProductSelector, { productNames: productNamesArr, currentValue: initialProducts.map((prod) => prod.documentId) })] }), jsx(Grid, { sx: { mt: 1 }, size: 12, children: jsx(Typography, { variant: "h6", children: "Contacts" }) }), oldContacts?.map((contact, index) => {
90
99
  console.log("contact", contact);
91
100
  if (contact.data?.first_name) {
92
101
  if (open.includes(contact.data?.first_name)) {
93
- return (jsx(Grid, { item: true, xs: 12, sm: 6, md: 4, lg: 3, sx: {
102
+ return (jsx(Grid, { sx: {
94
103
  justifyContent: "center",
95
104
  display: "flex",
96
105
  alignItems: "center",
106
+ }, size: {
107
+ xs: 12,
108
+ sm: 6,
109
+ md: 4,
110
+ lg: 3
97
111
  }, children: jsx(Paper, { sx: {
98
112
  p: 2,
99
113
  width: "100%",
@@ -109,10 +123,15 @@ function EditVendorForm({ data, productNamesArr, revalidateCallback, handleClose
109
123
  } }) }) }, contact.data?.documentId || index));
110
124
  }
111
125
  else {
112
- return (jsx(Grid, { item: true, xs: 12, sm: 6, md: 4, lg: 3, sx: {
126
+ return (jsx(Grid, { sx: {
113
127
  justifyContent: "center",
114
128
  display: "flex",
115
129
  alignItems: "center",
130
+ }, size: {
131
+ xs: 12,
132
+ sm: 6,
133
+ md: 4,
134
+ lg: 3
116
135
  }, children: jsx(Paper, { sx: {
117
136
  p: 2,
118
137
  width: "100%",
@@ -125,10 +144,15 @@ function EditVendorForm({ data, productNamesArr, revalidateCallback, handleClose
125
144
  }
126
145
  return null;
127
146
  }), newContacts.map((contact, index) => {
128
- return (jsx(Grid, { item: true, xs: 12, sm: 6, md: 4, lg: 3, sx: {
147
+ return (jsx(Grid, { sx: {
129
148
  justifyContent: "center",
130
149
  display: "flex",
131
150
  alignItems: "center",
151
+ }, size: {
152
+ xs: 12,
153
+ sm: 6,
154
+ md: 4,
155
+ lg: 3
132
156
  }, children: jsx(Paper, { sx: {
133
157
  p: 2,
134
158
  width: "100%",
@@ -146,10 +170,15 @@ function EditVendorForm({ data, productNamesArr, revalidateCallback, handleClose
146
170
  };
147
171
  }));
148
172
  } }) }) }, contact.data?.documentId || index));
149
- }), jsx(Grid, { item: true, xs: 12, sm: 6, md: 4, lg: 3, sx: {
173
+ }), jsx(Grid, { sx: {
150
174
  justifyContent: "center",
151
175
  display: "flex",
152
176
  alignItems: "center",
177
+ }, size: {
178
+ xs: 12,
179
+ sm: 6,
180
+ md: 4,
181
+ lg: 3
153
182
  }, children: jsx(Paper, { sx: {
154
183
  p: 2,
155
184
  width: "100%",
@@ -174,7 +203,7 @@ function EditVendorForm({ data, productNamesArr, revalidateCallback, handleClose
174
203
  },
175
204
  },
176
205
  ]);
177
- }, size: "large", children: "Add contact" }) }) }), jsxs(Grid, { item: true, xs: 12, children: [jsx(Typography, { variant: "h6", children: "Notes" }), Array.isArray(notes) && notes.length > 0 ? (jsx(NotesDisplay, { notes: notes })) : (jsx(Typography, { children: "No notes to display" }))] }), " ", jsx(Grid, { item: true, xs: 12, children: jsxs(Stack, { direction: "row", spacing: 2, justifyContent: "space-between", alignItems: "center", sx: { mt: 2 }, children: [handleClose && (jsx(Button, { onClick: handleClose, variant: "outlined", children: "Cancel" })), jsx(SubmitButton, { text: "Update Vendor", loadingText: "Updating..." })] }) })] }) }) }));
206
+ }, size: "large", children: "Add contact" }) }) }), jsxs(Grid, { size: 12, children: [jsx(Typography, { variant: "h6", children: "Notes" }), Array.isArray(notes) && notes.length > 0 ? (jsx(NotesDisplay, { notes: notes })) : (jsx(Typography, { children: "No notes to display" }))] }), " ", jsx(Grid, { size: 12, children: jsxs(Stack, { direction: "row", spacing: 2, justifyContent: "space-between", alignItems: "center", sx: { mt: 2 }, children: [handleClose && (jsx(Button, { onClick: handleClose, variant: "outlined", children: "Cancel" })), jsx(SubmitButton, { text: "Update Vendor", loadingText: "Updating..." })] }) })] }) }) }));
178
207
  }
179
208
 
180
209
  export { EditVendorForm };
@@ -24,7 +24,16 @@ function VendorDisplay({ data, sx }) {
24
24
  // You cannot spread `sx` directly because `SxProps` (typeof sx) can be an array.
25
25
  { p: 2 },
26
26
  ...(Array.isArray(sx) ? sx : [sx]),
27
- ], component: Paper, children: [jsxs(Grid, { container: true, spacing: 2, children: [jsx(Grid, { item: true, xs: 12, children: jsx(Typography, { variant: "h5", children: "Vendor" }) }), jsx(Grid, { item: true, xs: 12, md: 6, children: jsx(BusinessCredentials, { data: business_credentials }) }), jsxs(Grid, { item: true, xs: 12, md: 6, children: [jsxs(Typography, { variant: "body1", children: ["Website Url: ", website_url] }), jsxs(Typography, { variant: "body1", children: ["Phone Number: ", phone_number] }), jsxs(Typography, { variant: "body1", children: ["Email: ", email] })] }), jsxs(Grid, { item: true, xs: 12, md: 6, children: [jsx(Typography, { variant: "h6", children: "Address" }), jsx(Address, { data: address })] })] }), jsxs(Grid, { item: true, xs: 12, sx: { mt: 3 }, children: [jsx(Typography, { variant: "h6", children: "Products" }), jsx(ExplanatoryFoldOut, { title: "Products", sx: { mt: 1 }, children: jsx(Stack, { spacing: 1, children: products.map((product, index) => (jsx(Paper, { sx: { p: 1 }, children: jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [jsxs(Typography, { variant: "h6", children: ["Product: ", product.title, " ", product.product_number] }), jsx(Price, { ...product.price })] }) }, index))) }) })] }), jsxs(Grid, { item: true, xs: 12, sx: { mt: 3 }, children: [jsx(Typography, { variant: "h6", children: "Contacts" }), jsx(ExplanatoryFoldOut, { title: "Contacts", sx: { mt: 1 }, children: jsx(Stack, { spacing: 1, children: contacts.map((contact, index) => (jsx(Paper, { sx: { p: 1 }, children: jsx(Contacts, { data: contact }) }, index))) }) })] })] }));
27
+ ], component: Paper, children: [jsxs(Grid, { container: true, spacing: 2, children: [jsx(Grid, { size: 12, children: jsx(Typography, { variant: "h5", children: "Vendor" }) }), jsx(Grid, { size: {
28
+ xs: 12,
29
+ md: 6
30
+ }, children: jsx(BusinessCredentials, { data: business_credentials }) }), jsxs(Grid, { size: {
31
+ xs: 12,
32
+ md: 6
33
+ }, children: [jsxs(Typography, { variant: "body1", children: ["Website Url: ", website_url] }), jsxs(Typography, { variant: "body1", children: ["Phone Number: ", phone_number] }), jsxs(Typography, { variant: "body1", children: ["Email: ", email] })] }), jsxs(Grid, { size: {
34
+ xs: 12,
35
+ md: 6
36
+ }, children: [jsx(Typography, { variant: "h6", children: "Address" }), jsx(Address, { data: address })] })] }), jsxs(Grid, { sx: { mt: 3 }, size: 12, children: [jsx(Typography, { variant: "h6", children: "Products" }), jsx(ExplanatoryFoldOut, { title: "Products", sx: { mt: 1 }, children: jsx(Stack, { spacing: 1, children: products.map((product, index) => (jsx(Paper, { sx: { p: 1 }, children: jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [jsxs(Typography, { variant: "h6", children: ["Product: ", product.title, " ", product.product_number] }), jsx(Price, { ...product.price })] }) }, index))) }) })] }), jsxs(Grid, { sx: { mt: 3 }, size: 12, children: [jsx(Typography, { variant: "h6", children: "Contacts" }), jsx(ExplanatoryFoldOut, { title: "Contacts", sx: { mt: 1 }, children: jsx(Stack, { spacing: 1, children: contacts.map((contact, index) => (jsx(Paper, { sx: { p: 1 }, children: jsx(Contacts, { data: contact }) }, index))) }) })] })] }));
28
37
  }
29
38
 
30
39
  export { VendorDisplay };
@@ -20,7 +20,10 @@ function ColumnsSection({ data, }) {
20
20
  ...(Array.isArray(sx) ? sx : [sx]),
21
21
  ], children: jsx(Grid, { container: true, spacing: 2, children: column.map((column) => {
22
22
  const Icon = getIcon(column.icon);
23
- return (jsx(Grid, { item: true, xs: 12, md: 6, children: jsxs(Paper, { sx: { p: 2, height: "100%" }, children: [jsxs(Typography, { variant: "h5", sx: {
23
+ return (jsx(Grid, { size: {
24
+ xs: 12,
25
+ md: 6
26
+ }, children: jsxs(Paper, { sx: { p: 2, height: "100%" }, children: [jsxs(Typography, { variant: "h5", sx: {
24
27
  mb: 2,
25
28
  display: "flex",
26
29
  justifyContent: "flex-start",
@@ -16,7 +16,12 @@ function IconSection({ data }) {
16
16
  const { icon, maxWidth, sx = {} } = data;
17
17
  return (jsx(Container, { maxWidth: maxWidth || "lg", sx: { my: 1, ...sx }, children: jsx(Grid, { container: true, spacing: 2, children: icon.map((icon) => {
18
18
  const Icon = getIcon(icon.icon);
19
- return (jsx(Grid, { item: true, xs: 12, sm: 6, md: 4, lg: 3, children: jsx(Card, { sx: {
19
+ return (jsx(Grid, { size: {
20
+ xs: 12,
21
+ sm: 6,
22
+ md: 4,
23
+ lg: 3
24
+ }, children: jsx(Card, { sx: {
20
25
  display: "flex",
21
26
  flexDirection: "column",
22
27
  flex: 1,
@@ -18,7 +18,7 @@ import { StyledLink } from '../StyledLink.js';
18
18
  function LogoBarSection({ data, }) {
19
19
  const { companies, maxWidth = "lg", sx = {}, glass = false } = data;
20
20
  const theme = useTheme();
21
- return (jsx(Container, { maxWidth: maxWidth, sx: { my: 1, ...sx }, children: jsx(Grid, { container: true, spacing: 2, children: jsx(Grid, { item: true, xs: 12, children: jsx(Paper, { sx: {
21
+ return (jsx(Container, { maxWidth: maxWidth, sx: { my: 1, ...sx }, children: jsx(Grid, { container: true, spacing: 2, children: jsx(Grid, { size: 12, children: jsx(Paper, { sx: {
22
22
  p: 2,
23
23
  backdropFilter: "blur(3px)",
24
24
  backgroundColor: setOpacity(theme.palette.background.paper, glass ? 0.1 : 1),
@@ -22,7 +22,13 @@ import { useTheme } from '@mui/material/styles';
22
22
 
23
23
  function Partner(partner, index2) {
24
24
  const theme = useTheme();
25
- return (jsx(Grid, { item: true, xs: 12, md: 6, children: jsx(Paper, { sx: { p: 2, height: "100%" }, children: jsxs(Grid, { container: true, spacing: 3, children: [jsx(Grid, { item: true, xs: 12, sm: 7, children: jsxs(Stack, { spacing: 2, children: [jsx(TextField, { id: "name", label: "Name", defaultValue: partner.name, sx: {
25
+ return (jsx(Grid, { size: {
26
+ xs: 12,
27
+ md: 6
28
+ }, children: jsx(Paper, { sx: { p: 2, height: "100%" }, children: jsxs(Grid, { container: true, spacing: 3, children: [jsx(Grid, { size: {
29
+ xs: 12,
30
+ sm: 7
31
+ }, children: jsxs(Stack, { spacing: 2, children: [jsx(TextField, { id: "name", label: "Name", defaultValue: partner.name, sx: {
26
32
  input: {
27
33
  fontFamily: theme.typography.h5.fontFamily,
28
34
  fontWeight: theme.typography.h5.fontWeight,
@@ -34,7 +40,10 @@ function Partner(partner, index2) {
34
40
  fontWeight: theme.typography.body2.fontWeight,
35
41
  fontSize: theme.typography.body2.fontSize,
36
42
  },
37
- } })] }) }), jsx(Grid, { item: true, xs: 12, sm: 5, children: jsxs(Stack, { spacing: 2, sx: { overflow: "clip" }, justifyContent: "center", alignItems: "stretch", children: [partner.photo?.url && (jsx(StrapiImage, { id: partner.photo.id, url: partner.photo.url, alternativeText: partner.photo.alternativeText, width: partner.photo.width || 200, height: partner.photo.height || 200, style: {
43
+ } })] }) }), jsx(Grid, { size: {
44
+ xs: 12,
45
+ sm: 5
46
+ }, children: jsxs(Stack, { spacing: 2, sx: { overflow: "clip" }, justifyContent: "center", alignItems: "stretch", children: [partner.photo?.url && (jsx(StrapiImage, { id: partner.photo.id, url: partner.photo.url, alternativeText: partner.photo.alternativeText, width: partner.photo.width || 200, height: partner.photo.height || 200, style: {
38
47
  maxWidth: "100%",
39
48
  height: "auto",
40
49
  // borderRadius: "50%", TODO this style was removed because it's specific to AMH, should be added to photo.style
@@ -74,7 +74,10 @@ function PBTextImageSection({ data }) {
74
74
  reading up upon mui-markdown docs is advised */
75
75
  /* TODO Replace with blocks */
76
76
  const theme = useTheme();
77
- return (jsx(Container, { maxWidth: maxWidth || "lg", sx: { my: 1, ...sx }, id: anchor, children: jsxs(Box, { sx: { p: 1, border: "1px dashed #fff" }, children: [title && (jsx(Typography, { variant: "h1", textAlign: "center", sx: { pb: 2 }, children: title })), jsxs(Grid, { container: true, spacing: 2, direction: reverse ? "row-reverse" : "row", children: [jsx(Grid, { item: true, xs: 12, md: image?.url !== undefined ? 8 : 12, children: jsx(Paper, { sx: {
77
+ return (jsx(Container, { maxWidth: maxWidth || "lg", sx: { my: 1, ...sx }, id: anchor, children: jsxs(Box, { sx: { p: 1, border: "1px dashed #fff" }, children: [title && (jsx(Typography, { variant: "h1", textAlign: "center", sx: { pb: 2 }, children: title })), jsxs(Grid, { container: true, spacing: 2, direction: reverse ? "row-reverse" : "row", children: [jsx(Grid, { size: {
78
+ xs: 12,
79
+ md: image?.url !== undefined ? 8 : 12
80
+ }, children: jsx(Paper, { sx: {
78
81
  p: 2,
79
82
  backdropFilter: "blur(3px)",
80
83
  backgroundColor: setOpacity(theme.palette.background.paper, glass ? 0.1 : 1),
@@ -85,7 +88,10 @@ function PBTextImageSection({ data }) {
85
88
  display: "flex",
86
89
  alignItems: "center",
87
90
  justifyContent: "flex-start",
88
- }, children: jsx(TextField, { multiline: true, placeholder: text, value: text, onChange: (e) => console.log(e.target.value), sx: { width: "100%" } }) })) }) }), image?.url !== undefined && (jsx(Grid, { item: true, xs: 12, md: 4, children: jsx(StickyImage, { image: image }) }))] })] }) }));
91
+ }, children: jsx(TextField, { multiline: true, placeholder: text, value: text, onChange: (e) => console.log(e.target.value), sx: { width: "100%" } }) })) }) }), image?.url !== undefined && (jsx(Grid, { size: {
92
+ xs: 12,
93
+ md: 4
94
+ }, children: jsx(StickyImage, { image: image }) }))] })] }) }));
89
95
  }
90
96
 
91
97
  export { PBTextImageSection };
@@ -18,7 +18,7 @@ import { setOpacity } from '../../lib/utils.js';
18
18
  function PictureBarSection({ data, }) {
19
19
  const { pictures, maxWidth = "lg", sx = {}, glass = false } = data;
20
20
  const theme = useTheme();
21
- return (jsx(Container, { maxWidth: maxWidth, sx: { my: 1, ...sx }, children: jsx(Grid, { container: true, spacing: 2, children: jsx(Grid, { item: true, xs: 12, children: jsx(Paper, { sx: {
21
+ return (jsx(Container, { maxWidth: maxWidth, sx: { my: 1, ...sx }, children: jsx(Grid, { container: true, spacing: 2, children: jsx(Grid, { size: 12, children: jsx(Paper, { sx: {
22
22
  p: 2,
23
23
  backdropFilter: "blur(3px)",
24
24
  backgroundColor: setOpacity(theme.palette.background.paper, glass ? 0.1 : 1),
@@ -21,7 +21,7 @@ import MarkdownDisplay from '../common/markdown/MarkdownDisplay.js';
21
21
  function CategoryBlock({ data }) {
22
22
  const { maxWidth = "lg", sx = {}, glass = false, previewAmount = 3 } = data;
23
23
  const theme = useTheme();
24
- return (jsx(Container, { maxWidth: maxWidth, sx: { my: 1, ...sx }, children: jsx(Grid, { container: true, spacing: 2, children: jsx(Grid, { item: true, xs: 12, children: jsx(Paper, { sx: {
24
+ return (jsx(Container, { maxWidth: maxWidth, sx: { my: 1, ...sx }, children: jsx(Grid, { container: true, spacing: 2, children: jsx(Grid, { size: 12, children: jsx(Paper, { sx: {
25
25
  p: 2,
26
26
  backdropFilter: "blur(3px)",
27
27
  backgroundColor: setOpacity(theme.palette.background.paper, glass ? 0.1 : 1),
@@ -20,7 +20,10 @@ function ColumnsSection({ data, }) {
20
20
  ...(Array.isArray(sx) ? sx : [sx]),
21
21
  ], children: jsx(Grid, { container: true, spacing: 2, children: column.map((column) => {
22
22
  const Icon = getIcon(column.icon);
23
- return (jsx(Grid, { item: true, xs: 12, md: 6, children: jsxs(Paper, { sx: { p: 2, height: "100%" }, children: [jsxs(Typography, { variant: "h5", sx: {
23
+ return (jsx(Grid, { size: {
24
+ xs: 12,
25
+ md: 6
26
+ }, children: jsxs(Paper, { sx: { p: 2, height: "100%" }, children: [jsxs(Typography, { variant: "h5", sx: {
24
27
  mb: 2,
25
28
  display: "flex",
26
29
  justifyContent: "flex-start",
@@ -16,7 +16,12 @@ function IconSection({ data }) {
16
16
  const { icon, maxWidth, sx = {} } = data;
17
17
  return (jsx(Container, { maxWidth: maxWidth || "lg", sx: { my: 1, ...sx }, children: jsx(Grid, { container: true, spacing: 2, children: icon.map((icon) => {
18
18
  const Icon = getIcon(icon.icon);
19
- return (jsx(Grid, { item: true, xs: 12, sm: 6, md: 4, lg: 3, children: jsx(Card, { sx: {
19
+ return (jsx(Grid, { size: {
20
+ xs: 12,
21
+ sm: 6,
22
+ md: 4,
23
+ lg: 3
24
+ }, children: jsx(Card, { sx: {
20
25
  display: "flex",
21
26
  flexDirection: "column",
22
27
  flex: 1,
@@ -18,7 +18,7 @@ import { StyledLink } from '../StyledLink.js';
18
18
  function LogoBarSection({ data, }) {
19
19
  const { companies, maxWidth = "lg", sx = {}, glass = false } = data;
20
20
  const theme = useTheme();
21
- return (jsx(Container, { maxWidth: maxWidth, sx: { my: 1, ...sx }, children: jsx(Grid, { container: true, spacing: 2, children: jsx(Grid, { item: true, xs: 12, children: jsx(Paper, { sx: {
21
+ return (jsx(Container, { maxWidth: maxWidth, sx: { my: 1, ...sx }, children: jsx(Grid, { container: true, spacing: 2, children: jsx(Grid, { size: 12, children: jsx(Paper, { sx: {
22
22
  p: 2,
23
23
  backdropFilter: "blur(3px)",
24
24
  backgroundColor: setOpacity(theme.palette.background.paper, glass ? 0.1 : 1),
@@ -70,12 +70,18 @@ import { useTheme } from '@mui/material/styles';
70
70
  //
71
71
  function PartnerDialog({ partner, open, onClose, }) {
72
72
  const theme = useTheme();
73
- return (jsx(Dialog, { open: open, onClose: onClose, "aria-labelledby": "dialog-title", children: jsx(Paper, { sx: { p: 2, height: "100%" }, children: jsxs(Grid, { container: true, spacing: 3, children: [jsxs(Grid, { item: true, xs: 12, sm: 7, children: [jsx(Typography, { variant: "h5", sx: {
73
+ return (jsx(Dialog, { open: open, onClose: onClose, "aria-labelledby": "dialog-title", children: jsx(Paper, { sx: { p: 2, height: "100%" }, children: jsxs(Grid, { container: true, spacing: 3, children: [jsxs(Grid, { size: {
74
+ xs: 12,
75
+ sm: 7
76
+ }, children: [jsx(Typography, { variant: "h5", sx: {
74
77
  mb: 2,
75
78
  display: "flex",
76
79
  justifyContent: "flex-start",
77
80
  alignItems: "center",
78
- }, children: partner.name }), jsx(Typography, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: partner.function })] }), jsx(Grid, { item: true, xs: 12, sm: 5, children: jsxs(Stack, { spacing: 2, sx: { overflow: "clip" }, justifyContent: "center", alignItems: "stretch", children: [partner.photo?.url && (jsx(StrapiImage, { id: partner.photo.id, url: partner.photo.url, alternativeText: partner.photo.alternativeText, width: 200, height: 200, style: {
81
+ }, children: partner.name }), jsx(Typography, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: partner.function })] }), jsx(Grid, { size: {
82
+ xs: 12,
83
+ sm: 5
84
+ }, children: jsxs(Stack, { spacing: 2, sx: { overflow: "clip" }, justifyContent: "center", alignItems: "stretch", children: [partner.photo?.url && (jsx(StrapiImage, { id: partner.photo.id, url: partner.photo.url, alternativeText: partner.photo.alternativeText, width: 200, height: 200, style: {
79
85
  borderRadius: "50%",
80
86
  margin: "auto",
81
87
  ...partner.photo.style,
@@ -107,12 +113,21 @@ function Partner(partner, index) {
107
113
  partner?.text != null ? needsShortening(partner.text, maxLength) : false,
108
114
  [partner.text, maxLength]
109
115
  ); */
110
- return (jsxs(Grid, { item: true, xs: 12, md: 6, children: [jsx(PartnerDialog, { partner: partner, open: open, onClose: handleClose }), jsx(Paper, { sx: { p: 2, height: "100%" }, children: jsxs(Grid, { container: true, spacing: 3, children: [jsxs(Grid, { item: true, xs: 12, sm: 7, children: [jsx(Typography, { variant: "h5", sx: {
116
+ return (jsxs(Grid, { size: {
117
+ xs: 12,
118
+ md: 6
119
+ }, children: [jsx(PartnerDialog, { partner: partner, open: open, onClose: handleClose }), jsx(Paper, { sx: { p: 2, height: "100%" }, children: jsxs(Grid, { container: true, spacing: 3, children: [jsxs(Grid, { size: {
120
+ xs: 12,
121
+ sm: 7
122
+ }, children: [jsx(Typography, { variant: "h5", sx: {
111
123
  mb: 2,
112
124
  display: "flex",
113
125
  justifyContent: "flex-start",
114
126
  alignItems: "center",
115
- }, children: partner.name }), jsx(Typography, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: partner.function })] }), jsx(Grid, { item: true, xs: 12, sm: 5, children: jsxs(Stack, { spacing: 2, sx: { overflow: "clip" }, justifyContent: "center", alignItems: "stretch", children: [partner.photo?.url && (jsx(StrapiImage, { id: partner.photo.id, url: partner.photo.url, alternativeText: partner.photo.alternativeText, width: partner.photo.width || 200, height: partner.photo.height || 200, style: {
127
+ }, children: partner.name }), jsx(Typography, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: partner.function })] }), jsx(Grid, { size: {
128
+ xs: 12,
129
+ sm: 5
130
+ }, children: jsxs(Stack, { spacing: 2, sx: { overflow: "clip" }, justifyContent: "center", alignItems: "stretch", children: [partner.photo?.url && (jsx(StrapiImage, { id: partner.photo.id, url: partner.photo.url, alternativeText: partner.photo.alternativeText, width: partner.photo.width || 200, height: partner.photo.height || 200, style: {
116
131
  maxWidth: "100%",
117
132
  height: "auto",
118
133
  // borderRadius: "50%", TODO this style was removed because it's specific to AMH, should be added to photo.style
@@ -18,7 +18,7 @@ import { setOpacity } from '../../lib/utils.js';
18
18
  function PictureBarSection({ data, }) {
19
19
  const { pictures, maxWidth = "lg", sx = {}, glass = false } = data;
20
20
  const theme = useTheme();
21
- return (jsx(Container, { maxWidth: maxWidth, sx: { my: 1, ...sx }, children: jsx(Grid, { container: true, spacing: 2, children: jsx(Grid, { item: true, xs: 12, children: jsx(Paper, { sx: {
21
+ return (jsx(Container, { maxWidth: maxWidth, sx: { my: 1, ...sx }, children: jsx(Grid, { container: true, spacing: 2, children: jsx(Grid, { size: 12, children: jsx(Paper, { sx: {
22
22
  p: 2,
23
23
  backdropFilter: "blur(3px)",
24
24
  backgroundColor: setOpacity(theme.palette.background.paper, glass ? 0.1 : 1),
@@ -16,7 +16,7 @@ import { setOpacity } from '../../lib/utils.js';
16
16
  function ProductBlock({ data }) {
17
17
  const { maxWidth = "lg", sx = {}, glass = false } = data;
18
18
  const theme = useTheme();
19
- return (jsx(Container, { maxWidth: maxWidth, sx: { my: 1, ...sx }, children: jsx(Grid, { container: true, spacing: 2, children: jsx(Grid, { item: true, xs: 12, children: jsx(Paper, { sx: {
19
+ return (jsx(Container, { maxWidth: maxWidth, sx: { my: 1, ...sx }, children: jsx(Grid, { container: true, spacing: 2, children: jsx(Grid, { size: 12, children: jsx(Paper, { sx: {
20
20
  p: 2,
21
21
  backdropFilter: "blur(3px)",
22
22
  backgroundColor: setOpacity(theme.palette.background.paper, glass ? 0.1 : 1),
@@ -73,7 +73,10 @@ function TextImageSection({ data }) {
73
73
  reading up upon mui-markdown docs is advised */
74
74
  /* TODO Replace with blocks */
75
75
  const theme = useTheme();
76
- return (jsxs(Container, { maxWidth: maxWidth ? maxWidth : "lg", sx: { my: 1, ...sx }, id: anchor, children: [title && (jsx(Typography, { variant: "h1", textAlign: "center", sx: { pb: 2 }, children: title })), jsxs(Grid, { container: true, spacing: 2, direction: reverse ? "row-reverse" : "row", children: [jsx(Grid, { item: true, xs: 12, md: image?.url !== undefined ? 8 : 12, children: jsx(Paper, { sx: {
76
+ return (jsxs(Container, { maxWidth: maxWidth ? maxWidth : "lg", sx: { my: 1, ...sx }, id: anchor, children: [title && (jsx(Typography, { variant: "h1", textAlign: "center", sx: { pb: 2 }, children: title })), jsxs(Grid, { container: true, spacing: 2, direction: reverse ? "row-reverse" : "row", children: [jsx(Grid, { size: {
77
+ xs: 12,
78
+ md: image?.url !== undefined ? 8 : 12
79
+ }, children: jsx(Paper, { sx: {
77
80
  p: 2,
78
81
  backdropFilter: "blur(3px)",
79
82
  backgroundColor: setOpacity(theme.palette.background.paper, glass ? 0.1 : 1),
@@ -84,7 +87,10 @@ function TextImageSection({ data }) {
84
87
  display: "flex",
85
88
  alignItems: "center",
86
89
  justifyContent: "flex-start",
87
- }, children: jsx(MuiMarkdown, { children: text }) })) }) }), image?.url !== undefined && (jsx(Grid, { item: true, xs: 12, md: 4, children: jsx(StickyImage, { image: image }) }))] })] }));
90
+ }, children: jsx(MuiMarkdown, { children: text }) })) }) }), image?.url !== undefined && (jsx(Grid, { size: {
91
+ xs: 12,
92
+ md: 4
93
+ }, children: jsx(StickyImage, { image: image }) }))] })] }));
88
94
  }
89
95
 
90
96
  export { TextImageSection };
@@ -59,10 +59,20 @@ function PublicInformationForm({ publicInformation, sx, }) {
59
59
  // You cannot spread `sx` directly because `SxProps` (typeof sx) can be an array.
60
60
  { p: 2 },
61
61
  ...(Array.isArray(sx) ? sx : [sx]),
62
- ], component: Paper, children: jsx("form", { action: formAction, children: jsxs(Grid, { container: true, spacing: 2, children: [jsx(Grid, { item: true, xs: 12, children: jsx(Typography, { variant: "h5", children: "Edit Public Information" }) }), jsx(Grid, { item: true, xs: 12, children: jsxs(Stack, { spacing: 2, children: [jsx(TextField, { id: "title", name: "title", label: "Title", defaultValue: title }), jsx(TextField, { id: "description", name: "description", label: "Description", defaultValue: description }), jsx(TextField, { id: "email", name: "email", label: "email", defaultValue: email }), jsx(TextField, { id: "phone_number", name: "phone_number", label: "phone_number", defaultValue: phone_number })] }) }), jsx(Grid, { item: true, xs: 12, lg: 6, children: jsxs(Stack, { spacing: 2, children: [jsx(Typography, { variant: "h6", children: "Company Address" }), jsx(Divider, {}), jsx(AddressFields, { componentName: "address", componentReference: "common.address", data: address })] }) }), jsx(Grid, { item: true, xs: 12, lg: 6, children: jsxs(Stack, { spacing: 2, children: [jsx(Typography, { variant: "h6", children: "Business Credentials" }), jsx(Divider, {}), jsx(BusinessCredentialsFields, { componentName: "business_credentials", componentReference: "business.credentials", data: business_credentials })] }) }), jsx(Grid, { item: true, xs: 12, sx: { mt: 1 }, children: jsx(Typography, { variant: "h6", children: "Socials" }) }), oldSocials.map((social, index) => {
62
+ ], component: Paper, children: jsx("form", { action: formAction, children: jsxs(Grid, { container: true, spacing: 2, children: [jsx(Grid, { size: 12, children: jsx(Typography, { variant: "h5", children: "Edit Public Information" }) }), jsx(Grid, { size: 12, children: jsxs(Stack, { spacing: 2, children: [jsx(TextField, { id: "title", name: "title", label: "Title", defaultValue: title }), jsx(TextField, { id: "description", name: "description", label: "Description", defaultValue: description }), jsx(TextField, { id: "email", name: "email", label: "email", defaultValue: email }), jsx(TextField, { id: "phone_number", name: "phone_number", label: "phone_number", defaultValue: phone_number })] }) }), jsx(Grid, { size: {
63
+ xs: 12,
64
+ lg: 6
65
+ }, children: jsxs(Stack, { spacing: 2, children: [jsx(Typography, { variant: "h6", children: "Company Address" }), jsx(Divider, {}), jsx(AddressFields, { componentName: "address", componentReference: "common.address", data: address })] }) }), jsx(Grid, { size: {
66
+ xs: 12,
67
+ lg: 6
68
+ }, children: jsxs(Stack, { spacing: 2, children: [jsx(Typography, { variant: "h6", children: "Business Credentials" }), jsx(Divider, {}), jsx(BusinessCredentialsFields, { componentName: "business_credentials", componentReference: "business.credentials", data: business_credentials })] }) }), jsx(Grid, { sx: { mt: 1 }, size: 12, children: jsx(Typography, { variant: "h6", children: "Socials" }) }), oldSocials.map((social, index) => {
63
69
  if (social.data?.name) {
64
70
  if (open.includes(social.data.name)) {
65
- return (jsx(Grid, { item: true, xs: 12, md: 6, lg: 4, children: jsx(SocialsFields, { data: social.data, componentName: `socials[${index}]`, componentReference: "common.social", deleteCallback: () => {
71
+ return (jsx(Grid, { size: {
72
+ xs: 12,
73
+ md: 6,
74
+ lg: 4
75
+ }, children: jsx(SocialsFields, { data: social.data, componentName: `socials[${index}]`, componentReference: "common.social", deleteCallback: () => {
66
76
  setOldSocials(oldSocials.filter((_, i) => i !== index));
67
77
  /* setOpen(
68
78
  open.filter((openId) => openId !== social.data?.id)
@@ -70,12 +80,20 @@ function PublicInformationForm({ publicInformation, sx, }) {
70
80
  } }) }, index));
71
81
  }
72
82
  else {
73
- return (jsxs(Grid, { item: true, xs: 12, md: 6, lg: 4, children: [jsx("input", { type: "hidden", name: `socials[${index}].documentId`, value: social.data.documentId }), jsx("input", { type: "hidden", name: `socials[${index}].name`, value: social.data.name }), jsx("input", { type: "hidden", name: `socials[${index}].url`, value: social.data.url }), jsx("input", { type: "hidden", name: `socials[${index}].icon`, value: social.data.icon }), jsx(SocialsDisplay, { data: { ...social.data, onClick: onClickHandler } })] }, index));
83
+ return (jsxs(Grid, { size: {
84
+ xs: 12,
85
+ md: 6,
86
+ lg: 4
87
+ }, children: [jsx("input", { type: "hidden", name: `socials[${index}].documentId`, value: social.data.documentId }), jsx("input", { type: "hidden", name: `socials[${index}].name`, value: social.data.name }), jsx("input", { type: "hidden", name: `socials[${index}].url`, value: social.data.url }), jsx("input", { type: "hidden", name: `socials[${index}].icon`, value: social.data.icon }), jsx(SocialsDisplay, { data: { ...social.data, onClick: onClickHandler } })] }, index));
74
88
  }
75
89
  }
76
90
  return null;
77
91
  }), newSocials.map((social, index) => {
78
- return (jsx(Grid, { item: true, xs: 12, md: 6, lg: 4, children: jsx(SocialsFields, { data: social.data, componentName: social.componentName, componentReference: "common.social", deleteCallback: () => {
92
+ return (jsx(Grid, { size: {
93
+ xs: 12,
94
+ md: 6,
95
+ lg: 4
96
+ }, children: jsx(SocialsFields, { data: social.data, componentName: social.componentName, componentReference: "common.social", deleteCallback: () => {
79
97
  setNewSocials(newSocials
80
98
  .filter((_, i) => i !== index)
81
99
  .map((_, i) => {
@@ -85,7 +103,11 @@ function PublicInformationForm({ publicInformation, sx, }) {
85
103
  };
86
104
  }));
87
105
  } }) }, social.data?.uuid));
88
- }), jsx(Grid, { item: true, xs: 12, md: 6, lg: 4, justifyContent: "center", alignItems: "center", children: jsx(IconButton, { onClick: () => {
106
+ }), jsx(Grid, { justifyContent: "center", alignItems: "center", size: {
107
+ xs: 12,
108
+ md: 6,
109
+ lg: 4
110
+ }, children: jsx(IconButton, { onClick: () => {
89
111
  setNewSocials([
90
112
  ...newSocials,
91
113
  {
@@ -98,7 +120,7 @@ function PublicInformationForm({ publicInformation, sx, }) {
98
120
  },
99
121
  },
100
122
  ]);
101
- }, children: jsx(AddIcon, {}) }) }), jsx(Grid, { item: true, xs: 12, children: jsxs(Stack, { direction: "row-reverse", spacing: 2, alignItems: "center", sx: {
123
+ }, children: jsx(AddIcon, {}) }) }), jsx(Grid, { size: 12, children: jsxs(Stack, { direction: "row-reverse", spacing: 2, alignItems: "center", sx: {
102
124
  py: 1,
103
125
  }, children: [jsx(SubmitButton, { text: "save changes", loadingText: "loading" }), formState?.strapiErrors && (jsx(StrapiErrors, { error: formState?.strapiErrors })), formState?.message && (jsx(Alert, { severity: "error", children: formState?.message }))] }) })] }) }) }));
104
126
  }
@@ -54,7 +54,8 @@ async function registerUserAction(prevState, formData) {
54
54
  : "Ops! Something went wrong. Please try again.",
55
55
  };
56
56
  }
57
- cookies().set("jwt", responseData.jwt, config);
57
+ const cookieStore = await cookies();
58
+ cookieStore.set("jwt", responseData.jwt, config);
58
59
  if (!formData.get("redirect")) {
59
60
  return redirect("/dashboard");
60
61
  }
@@ -113,7 +114,8 @@ async function loginUserAction(prevState, formData) {
113
114
  };
114
115
  }
115
116
  // Set the JWT cookie and redirect the user
116
- cookies().set("jwt", responseData.jwt, config);
117
+ const cookieStore = await cookies();
118
+ cookieStore.set("jwt", responseData.jwt, config);
117
119
  const redirectURL = formData.get("redirect")?.toString() ?? null;
118
120
  const successRedirectURL = `${redirectURL ? redirectURL : "/dashboard"}?login=success`;
119
121
  redirect(successRedirectURL);
@@ -204,7 +206,8 @@ async function resetPasswordAction(prevState, formData) {
204
206
  };
205
207
  }
206
208
  async function logoutAction() {
207
- cookies().set("jwt", "", { ...config, maxAge: 0 });
209
+ const cookieStore = await cookies();
210
+ cookieStore.set("jwt", "", { ...config, maxAge: 0 });
208
211
  redirect("/");
209
212
  }
210
213
 
@@ -8,7 +8,7 @@
8
8
  import { cookies } from 'next/headers';
9
9
 
10
10
  async function getAuthToken() {
11
- const cookieStore = cookies();
11
+ const cookieStore = await cookies();
12
12
  const token = cookieStore.get("jwt")?.value;
13
13
  return token ?? null;
14
14
  }