@griddo/ax 1.56.8 → 1.57.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/config/griddo-config.js +1 -0
  2. package/package.json +2 -2
  3. package/src/components/ActionMenu/index.tsx +1 -1
  4. package/src/components/Fields/ComponentArray/MixableComponentArray/index.tsx +7 -1
  5. package/src/components/Fields/ComponentArray/MixableComponentArray/style.tsx +29 -24
  6. package/src/components/Fields/ComponentArray/SameComponentArray/index.tsx +7 -1
  7. package/src/components/Fields/ComponentArray/SameComponentArray/style.tsx +29 -24
  8. package/src/components/Fields/DateField/index.tsx +3 -2
  9. package/src/components/Fields/ReferenceField/AutoPanel/AutoItem/index.tsx +1 -1
  10. package/src/components/Fields/ReferenceField/AutoPanel/index.tsx +1 -1
  11. package/src/components/Fields/ReferenceField/ItemList/Item/index.tsx +1 -1
  12. package/src/components/Fields/UrlField/index.tsx +12 -1
  13. package/src/components/Fields/Wysiwyg/config.tsx +80 -56
  14. package/src/components/Fields/Wysiwyg/index.tsx +23 -6
  15. package/src/components/FloatingMenu/index.tsx +9 -6
  16. package/src/components/FloatingMenu/style.tsx +8 -6
  17. package/src/components/Gallery/GalleryFilters/Orientation/index.tsx +1 -1
  18. package/src/components/Gallery/GalleryFilters/SortBy/index.tsx +1 -1
  19. package/src/components/InformativeMenu/index.tsx +3 -2
  20. package/src/components/InformativeMenu/style.tsx +0 -1
  21. package/src/components/MainWrapper/AppBar/index.tsx +8 -7
  22. package/src/components/MainWrapper/AppBar/style.tsx +7 -0
  23. package/src/components/MenuItem/style.tsx +1 -0
  24. package/src/components/Modal/style.tsx +14 -13
  25. package/src/components/Nav/index.tsx +8 -3
  26. package/src/components/Nav/style.tsx +5 -0
  27. package/src/components/SearchField/index.tsx +43 -14
  28. package/src/components/SearchField/style.tsx +23 -10
  29. package/src/components/SideModal/index.tsx +24 -8
  30. package/src/components/SideModal/style.tsx +13 -2
  31. package/src/components/SubNav/style.tsx +3 -2
  32. package/src/containers/Navigation/Defaults/actions.tsx +26 -24
  33. package/src/containers/Navigation/Defaults/reducer.tsx +2 -2
  34. package/src/containers/PageEditor/actions.tsx +9 -8
  35. package/src/containers/Settings/Social/actions.tsx +9 -31
  36. package/src/containers/Settings/Social/constants.tsx +2 -3
  37. package/src/containers/Settings/Social/interfaces.tsx +2 -7
  38. package/src/containers/Settings/Social/reducer.tsx +3 -14
  39. package/src/containers/Sites/actions.tsx +3 -63
  40. package/src/containers/Sites/constants.tsx +0 -1
  41. package/src/containers/Sites/interfaces.tsx +0 -6
  42. package/src/containers/Sites/reducer.tsx +1 -29
  43. package/src/forms/editor.tsx +2 -0
  44. package/src/forms/validators.tsx +2 -0
  45. package/src/helpers/dates.tsx +23 -24
  46. package/src/helpers/index.tsx +2 -0
  47. package/src/helpers/objects.tsx +17 -2
  48. package/src/helpers/schemas.tsx +7 -4
  49. package/src/hooks/forms.tsx +23 -24
  50. package/src/modules/App/Routing/NavMenu/NavItem/index.tsx +10 -5
  51. package/src/modules/App/Routing/NavMenu/NavItem/style.tsx +13 -9
  52. package/src/modules/App/Routing/NavMenu/index.tsx +39 -37
  53. package/src/modules/App/Routing/NavMenu/style.tsx +9 -3
  54. package/src/modules/Categories/CategoriesList/CategoryItem/index.tsx +1 -1
  55. package/src/modules/Categories/CategoriesList/CategoryNav/NavItem/index.tsx +6 -3
  56. package/src/modules/Categories/CategoriesList/CategoryNav/NavItem/style.tsx +5 -1
  57. package/src/modules/Content/ContentFilters/index.tsx +6 -3
  58. package/src/modules/Content/ContentFilters/style.tsx +6 -1
  59. package/src/modules/Content/HeaderMenus/Live/index.tsx +1 -1
  60. package/src/modules/Content/HeaderMenus/Name/index.tsx +10 -4
  61. package/src/modules/Content/HeaderMenus/Status/index.tsx +7 -3
  62. package/src/modules/Content/HeaderMenus/Translations/index.tsx +1 -1
  63. package/src/modules/Content/HeaderMenus/Types/index.tsx +1 -1
  64. package/src/modules/Content/OptionTable/index.tsx +6 -3
  65. package/src/modules/Content/OptionTable/style.tsx +4 -0
  66. package/src/modules/Content/PageItem/index.tsx +3 -3
  67. package/src/modules/Content/index.tsx +5 -3
  68. package/src/modules/GlobalEditor/index.tsx +37 -14
  69. package/src/modules/Navigation/Defaults/DefaultsEditor/index.tsx +33 -13
  70. package/src/modules/Navigation/Defaults/Item/atoms.tsx +1 -1
  71. package/src/modules/Navigation/Defaults/Nav/index.tsx +8 -3
  72. package/src/modules/Navigation/Defaults/Nav/style.tsx +4 -0
  73. package/src/modules/Navigation/Defaults/index.tsx +4 -0
  74. package/src/modules/Navigation/Menus/List/Nav/index.tsx +8 -3
  75. package/src/modules/Navigation/Menus/List/Nav/style.tsx +4 -0
  76. package/src/modules/Navigation/Menus/List/index.tsx +3 -1
  77. package/src/modules/Navigation/Menus/List/style.tsx +9 -1
  78. package/src/modules/PageEditor/index.tsx +38 -14
  79. package/src/modules/Settings/ContentTypes/DataPacks/AddModal/Filter/index.tsx +1 -1
  80. package/src/modules/Settings/ContentTypes/DataPacks/AddModal/SortFilter/index.tsx +1 -1
  81. package/src/modules/Settings/ContentTypes/DataPacks/Nav/index.tsx +11 -6
  82. package/src/modules/Settings/ContentTypes/DataPacks/Nav/style.tsx +6 -1
  83. package/src/modules/Settings/Globals/index.tsx +19 -31
  84. package/src/modules/Settings/Languages/LanguagePanel/Form/index.tsx +1 -1
  85. package/src/modules/Settings/Languages/Table/Item/index.tsx +1 -1
  86. package/src/modules/Settings/Social/index.tsx +35 -91
  87. package/src/modules/Sites/SitesList/SiteModal/index.tsx +12 -27
  88. package/src/modules/Sites/SitesList/index.tsx +15 -15
  89. package/src/modules/StructuredData/StructuredDataList/ContentFilters/index.tsx +3 -1
  90. package/src/modules/StructuredData/StructuredDataList/ContentFilters/style.tsx +6 -1
  91. package/src/modules/StructuredData/StructuredDataList/GlobalPageItem/index.tsx +3 -3
  92. package/src/modules/StructuredData/StructuredDataList/HeaderMenus/Live/index.tsx +1 -1
  93. package/src/modules/StructuredData/StructuredDataList/HeaderMenus/Name/index.tsx +10 -4
  94. package/src/modules/StructuredData/StructuredDataList/HeaderMenus/Site/index.tsx +1 -1
  95. package/src/modules/StructuredData/StructuredDataList/HeaderMenus/Status/index.tsx +7 -3
  96. package/src/modules/StructuredData/StructuredDataList/HeaderMenus/Translations/index.tsx +1 -1
  97. package/src/modules/StructuredData/StructuredDataList/HeaderMenus/Types/index.tsx +1 -1
  98. package/src/modules/StructuredData/StructuredDataList/OptionTable/index.tsx +6 -3
  99. package/src/modules/StructuredData/StructuredDataList/OptionTable/style.tsx +4 -0
  100. package/src/modules/StructuredData/StructuredDataList/StructuredDataItem/index.tsx +1 -1
  101. package/src/modules/Users/UserList/HeaderMenus/Name/index.tsx +13 -5
  102. package/src/schemas/index.tsx +7 -0
  103. package/src/schemas/pages/GlobalPage.tsx +166 -0
  104. package/src/schemas/pages/Page.tsx +181 -0
  105. package/src/schemas/pages/index.tsx +4 -0
  106. package/src/types/index.tsx +8 -14
  107. package/tsconfig.paths.json +2 -1
  108. package/public/img/schemas/Accordion/thumbnails/thumbnail@1x.png +0 -0
  109. package/public/img/schemas/Accordion/thumbnails/thumbnail@2x.png +0 -0
  110. package/public/img/schemas/AddressCollection/thumbnails/thumbnail@1x.png +0 -0
  111. package/public/img/schemas/AddressCollection/thumbnails/thumbnail@2x.png +0 -0
  112. package/public/img/schemas/BasicBoxedCard/thumbnails/thumbnail@1x.png +0 -0
  113. package/public/img/schemas/BasicBoxedCard/thumbnails/thumbnail@2x.png +0 -0
  114. package/public/img/schemas/BasicCard/thumbnails/thumbnail@1x.png +0 -0
  115. package/public/img/schemas/BasicCard/thumbnails/thumbnail@2x.png +0 -0
  116. package/public/img/schemas/BasicContent/layouts/layout001@1x.png +0 -0
  117. package/public/img/schemas/BasicContent/layouts/layout001@2x.png +0 -0
  118. package/public/img/schemas/BasicContent/layouts/layout002@1x.png +0 -0
  119. package/public/img/schemas/BasicContent/layouts/layout002@2x.png +0 -0
  120. package/public/img/schemas/BasicContent/layouts/layout003@1x.png +0 -0
  121. package/public/img/schemas/BasicContent/layouts/layout003@2x.png +0 -0
  122. package/public/img/schemas/BasicContent/layouts/layout004@1x.png +0 -0
  123. package/public/img/schemas/BasicContent/layouts/layout004@2x.png +0 -0
  124. package/public/img/schemas/BasicContent/layouts/layout005@1x.png +0 -0
  125. package/public/img/schemas/BasicContent/layouts/layout005@2x.png +0 -0
  126. package/public/img/schemas/BasicContent/layouts/layout006@1x.png +0 -0
  127. package/public/img/schemas/BasicContent/layouts/layout006@2x.png +0 -0
  128. package/public/img/schemas/BasicContent/layouts/layout007@1x.png +0 -0
  129. package/public/img/schemas/BasicContent/layouts/layout007@2x.png +0 -0
  130. package/public/img/schemas/BasicContent/thumbnails/thumbnail@1x.png +0 -0
  131. package/public/img/schemas/BasicContent/thumbnails/thumbnail@2x.png +0 -0
  132. package/public/img/schemas/BasicIconCard/thumbnails/thumbnail@1x.png +0 -0
  133. package/public/img/schemas/BasicIconCard/thumbnails/thumbnail@2x.png +0 -0
  134. package/public/img/schemas/CardCollection/layouts/layout001@1x.png +0 -0
  135. package/public/img/schemas/CardCollection/layouts/layout001@2x.png +0 -0
  136. package/public/img/schemas/CardCollection/layouts/layout002@1x.png +0 -0
  137. package/public/img/schemas/CardCollection/layouts/layout002@2x.png +0 -0
  138. package/public/img/schemas/CardCollection/layouts/layout003@1x.png +0 -0
  139. package/public/img/schemas/CardCollection/layouts/layout003@2x.png +0 -0
  140. package/public/img/schemas/CardCollection/layouts/layout004@1x.png +0 -0
  141. package/public/img/schemas/CardCollection/layouts/layout004@2x.png +0 -0
  142. package/public/img/schemas/CardCollection/layouts/layout005@1x.png +0 -0
  143. package/public/img/schemas/CardCollection/layouts/layout005@2x.png +0 -0
  144. package/public/img/schemas/CardCollection/thumbnails/thumbnail@1x.png +0 -0
  145. package/public/img/schemas/CardCollection/thumbnails/thumbnail@2x.png +0 -0
  146. package/public/img/schemas/DownloadCollection/thumbnails/thumbnail@1x.png +0 -0
  147. package/public/img/schemas/DownloadCollection/thumbnails/thumbnail@2x.png +0 -0
  148. package/public/img/schemas/EventCard/layouts/layout001@1x.png +0 -0
  149. package/public/img/schemas/EventCard/layouts/layout001@2x.png +0 -0
  150. package/public/img/schemas/EventCard/layouts/layout002@1x.png +0 -0
  151. package/public/img/schemas/EventCard/layouts/layout002@2x.png +0 -0
  152. package/public/img/schemas/EventCard/thumbnails/thumbnail@1x.png +0 -0
  153. package/public/img/schemas/EventCard/thumbnails/thumbnail@2x.png +0 -0
  154. package/public/img/schemas/EventsDistributor/thumbnails/thumbnail@1x.png +0 -0
  155. package/public/img/schemas/EventsDistributor/thumbnails/thumbnail@2x.png +0 -0
  156. package/public/img/schemas/FeaturedAudiovisual/layouts/layout001@1x.png +0 -0
  157. package/public/img/schemas/FeaturedAudiovisual/layouts/layout001@2x.png +0 -0
  158. package/public/img/schemas/FeaturedAudiovisual/layouts/layout002@1x.png +0 -0
  159. package/public/img/schemas/FeaturedAudiovisual/layouts/layout002@2x.png +0 -0
  160. package/public/img/schemas/FeaturedAudiovisual/layouts/layout003@1x.png +0 -0
  161. package/public/img/schemas/FeaturedAudiovisual/layouts/layout003@2x.png +0 -0
  162. package/public/img/schemas/FeaturedAudiovisual/layouts/layout004@1x.png +0 -0
  163. package/public/img/schemas/FeaturedAudiovisual/layouts/layout004@2x.png +0 -0
  164. package/public/img/schemas/FeaturedAudiovisual/layouts/layout005@1x.png +0 -0
  165. package/public/img/schemas/FeaturedAudiovisual/layouts/layout005@2x.png +0 -0
  166. package/public/img/schemas/FeaturedAudiovisual/layouts/layout006@1x.png +0 -0
  167. package/public/img/schemas/FeaturedAudiovisual/layouts/layout006@2x.png +0 -0
  168. package/public/img/schemas/FeaturedAudiovisual/layouts/layout007@1x.png +0 -0
  169. package/public/img/schemas/FeaturedAudiovisual/layouts/layout007@2x.png +0 -0
  170. package/public/img/schemas/FeaturedAudiovisual/layouts/layout008@1x.png +0 -0
  171. package/public/img/schemas/FeaturedAudiovisual/layouts/layout008@2x.png +0 -0
  172. package/public/img/schemas/FeaturedAudiovisual/layouts/layout009@1x.png +0 -0
  173. package/public/img/schemas/FeaturedAudiovisual/layouts/layout009@2x.png +0 -0
  174. package/public/img/schemas/FeaturedAudiovisual/layouts/layout010@1x.png +0 -0
  175. package/public/img/schemas/FeaturedAudiovisual/layouts/layout010@2x.png +0 -0
  176. package/public/img/schemas/FeaturedAudiovisual/layouts/layout011@1x.png +0 -0
  177. package/public/img/schemas/FeaturedAudiovisual/layouts/layout011@2x.png +0 -0
  178. package/public/img/schemas/FeaturedAudiovisual/layouts/layout012@1x.png +0 -0
  179. package/public/img/schemas/FeaturedAudiovisual/layouts/layout012@2x.png +0 -0
  180. package/public/img/schemas/FeaturedAudiovisual/thumbnails/thumbnail@1x.png +0 -0
  181. package/public/img/schemas/FeaturedAudiovisual/thumbnails/thumbnail@2x.png +0 -0
  182. package/public/img/schemas/FeaturedBlock/layouts/layout001@1x.png +0 -0
  183. package/public/img/schemas/FeaturedBlock/layouts/layout001@2x.png +0 -0
  184. package/public/img/schemas/FeaturedBlock/layouts/layout002@1x.png +0 -0
  185. package/public/img/schemas/FeaturedBlock/layouts/layout002@2x.png +0 -0
  186. package/public/img/schemas/FeaturedProgram/thumbnails/thumbnail@1x.png +0 -0
  187. package/public/img/schemas/FeaturedProgram/thumbnails/thumbnail@2x.png +0 -0
  188. package/public/img/schemas/FeaturedText/thumbnails/thumbnail@1x.png +0 -0
  189. package/public/img/schemas/FeaturedText/thumbnails/thumbnail@2x.png +0 -0
  190. package/public/img/schemas/FeedbackForm/thumbnails/thumbnail@1x.png +0 -0
  191. package/public/img/schemas/FeedbackForm/thumbnails/thumbnail@2x.png +0 -0
  192. package/public/img/schemas/HeroCarousel/thumbnails/thumbnail@1x.png +0 -0
  193. package/public/img/schemas/HeroCarousel/thumbnails/thumbnail@2x.png +0 -0
  194. package/public/img/schemas/HeroImage/thumbnails/thumbnail@1x.png +0 -0
  195. package/public/img/schemas/HeroImage/thumbnails/thumbnail@2x.png +0 -0
  196. package/public/img/schemas/IconCard/thumbnails/thumbnail@1x.png +0 -0
  197. package/public/img/schemas/IconCard/thumbnails/thumbnail@2x.png +0 -0
  198. package/public/img/schemas/IconCenteredCard/thumbnails/thumbnail@1x.png +0 -0
  199. package/public/img/schemas/IconCenteredCard/thumbnails/thumbnail@2x.png +0 -0
  200. package/public/img/schemas/Image/thumbnails/thumbnail@1x.png +0 -0
  201. package/public/img/schemas/Image/thumbnails/thumbnail@2x.png +0 -0
  202. package/public/img/schemas/ImageCard/thumbnails/thumbnail@1x.png +0 -0
  203. package/public/img/schemas/ImageCard/thumbnails/thumbnail@2x.png +0 -0
  204. package/public/img/schemas/Intro/thumbnails/thumbnail@1x.png +0 -0
  205. package/public/img/schemas/Intro/thumbnails/thumbnail@2x.png +0 -0
  206. package/public/img/schemas/LogoCard/thumbnails/thumbnail@1x.png +0 -0
  207. package/public/img/schemas/LogoCard/thumbnails/thumbnail@2x.png +0 -0
  208. package/public/img/schemas/NewsDistributor/thumbnails/thumbnail@1x.png +0 -0
  209. package/public/img/schemas/NewsDistributor/thumbnails/thumbnail@2x.png +0 -0
  210. package/public/img/schemas/PersonDistributor/thumbnails/thumbnail@1x.png +0 -0
  211. package/public/img/schemas/PersonDistributor/thumbnails/thumbnail@2x.png +0 -0
  212. package/public/img/schemas/PublicationDistributor/thumbnails/thumbnail@1x.png +0 -0
  213. package/public/img/schemas/PublicationDistributor/thumbnails/thumbnail@2x.png +0 -0
  214. package/public/img/schemas/SchoolFooter/thumbnails/thumbnail@1x.png +0 -0
  215. package/public/img/schemas/SchoolFooter/thumbnails/thumbnail@2x.png +0 -0
  216. package/public/img/schemas/Slider/thumbnails/thumbnail@1x.png +0 -0
  217. package/public/img/schemas/Slider/thumbnails/thumbnail@2x.png +0 -0
  218. package/public/img/schemas/Testimonial/layouts/layout001@1x.png +0 -0
  219. package/public/img/schemas/Testimonial/layouts/layout001@2x.png +0 -0
  220. package/public/img/schemas/Testimonial/layouts/layout002@1x.png +0 -0
  221. package/public/img/schemas/Testimonial/layouts/layout002@2x.png +0 -0
  222. package/public/img/schemas/Testimonial/thumbnails/thumbnail@1x.png +0 -0
  223. package/public/img/schemas/Testimonial/thumbnails/thumbnail@2x.png +0 -0
  224. package/public/img/schemas/TextBluePanel/layouts/layout001@1x.png +0 -0
  225. package/public/img/schemas/TextBluePanel/layouts/layout001@2x.png +0 -0
  226. package/public/img/schemas/TextBluePanel/layouts/layout002@1x.png +0 -0
  227. package/public/img/schemas/TextBluePanel/layouts/layout002@2x.png +0 -0
  228. package/public/img/schemas/TextBluePanel/thumbnails/thumbnail@1x.png +0 -0
  229. package/public/img/schemas/TextBluePanel/thumbnails/thumbnail@2x.png +0 -0
  230. package/public/img/schemas/Video/thumbnails/thumbnail@1x.png +0 -0
  231. package/public/img/schemas/Video/thumbnails/thumbnail@2x.png +0 -0
  232. package/public/img/schemas/imgHeros.png +0 -0
  233. package/public/img/schemas/imgStandard.jpg +0 -0
  234. package/public/img/schemas/templates/BasicTemplate/thumbnails/thumbnail@1x.png +0 -0
  235. package/public/img/schemas/templates/BasicTemplate/thumbnails/thumbnail@2x.png +0 -0
  236. package/public/img/schemas/templates/Error404/thumbnails/thumbnail@1x.png +0 -0
  237. package/public/img/schemas/templates/Error404/thumbnails/thumbnail@2x.png +0 -0
  238. package/public/img/schemas/templates/NewsList/thumbnails/thumbnail@1x.png +0 -0
  239. package/public/img/schemas/templates/NewsList/thumbnails/thumbnail@2x.png +0 -0
  240. package/public/img/schemas/themes/LinkStyle.png +0 -0
  241. package/public/img/schemas/themes/LinkStyle@2x.png +0 -0
  242. package/public/img/schemas/themes/PrimaryStyle.png +0 -0
  243. package/public/img/schemas/themes/PrimaryStyle@2x.png +0 -0
  244. package/public/img/schemas/themes/STYLE01.png +0 -0
  245. package/public/img/schemas/themes/STYLE02.png +0 -0
  246. package/public/img/schemas/themes/STYLE03.png +0 -0
  247. package/public/img/schemas/themes/STYLE04.png +0 -0
  248. package/public/img/schemas/themes/STYLE05.png +0 -0
  249. package/public/img/schemas/themes/STYLE06.png +0 -0
  250. package/public/img/schemas/themes/SecondaryStyle.png +0 -0
  251. package/public/img/schemas/themes/SecondaryStyle@2x.png +0 -0
  252. package/src/components/MainWrapper/AppBar/SearchField/index.tsx +0 -54
  253. package/src/components/MainWrapper/AppBar/SearchField/style.tsx +0 -55
@@ -50,6 +50,7 @@ const griddoAxAliases = {
50
50
  "@ax/modules": path.resolve(__dirname, "../src/modules"),
51
51
  "@ax/routes": path.resolve(__dirname, "../src/routes"),
52
52
  "@ax/types": path.resolve(__dirname, "../src/types"),
53
+ "@ax/schemas": path.resolve(__dirname, "../src/schemas"),
53
54
  ...getComponentsLibAliases(),
54
55
  };
55
56
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@griddo/ax",
3
3
  "description": "Griddo Author Experience",
4
- "version": "1.56.8",
4
+ "version": "1.57.1",
5
5
  "authors": [
6
6
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
7
7
  "Carlos Torres <carlos.torres@secuoyas.com>",
@@ -233,5 +233,5 @@
233
233
  "publishConfig": {
234
234
  "access": "public"
235
235
  },
236
- "gitHead": "92ca21d7829d2b4c929e8a639bd8a535825bc1cc"
236
+ "gitHead": "d2c7cc4c8608680dd4aff1aaf312e3cf10c78cdd"
237
237
  }
@@ -33,7 +33,7 @@ const ActionMenu = (props: IProps): JSX.Element => {
33
33
  return (
34
34
  <S.Wrapper className={className}>
35
35
  <Tooltip content={tooltip} hideOnClick>
36
- <FloatingMenu Button={MoreInfoButton} isWide={true}>
36
+ <FloatingMenu Button={MoreInfoButton}>
37
37
  <S.ActionMenu>{options.map((item: IOption) => ActionMenuItem(item))}</S.ActionMenu>
38
38
  </FloatingMenu>
39
39
  </Tooltip>
@@ -23,6 +23,7 @@ const MixableComponentArray = (props: IMixableComponentArrayProps): JSX.Element
23
23
  activatedModules,
24
24
  objKey,
25
25
  field,
26
+ mandatory,
26
27
  } = props;
27
28
 
28
29
  const type = getTypefromKey(objKey);
@@ -54,9 +55,13 @@ const MixableComponentArray = (props: IMixableComponentArrayProps): JSX.Element
54
55
 
55
56
  const showAddItemButton = !maxItems || fixedValue.length < maxItems;
56
57
 
58
+ const Asterisk = () => (mandatory ? <S.Asterisk>*</S.Asterisk> : null);
59
+
57
60
  return (
58
61
  <S.Wrapper>
59
- <S.Title>{title}</S.Title>
62
+ <S.Title>
63
+ {title} <Asterisk />
64
+ </S.Title>
60
65
  <S.ItemRow>
61
66
  <S.Subtitle>{fixedValue && fixedValue.length} items</S.Subtitle>
62
67
  {showAddItemButton && !disabled && (
@@ -115,6 +120,7 @@ export interface IMixableComponentArrayProps {
115
120
  activatedModules: string[];
116
121
  objKey: string;
117
122
  field: any;
123
+ mandatory?: boolean;
118
124
  }
119
125
 
120
126
  export default MixableComponentArray;
@@ -1,50 +1,55 @@
1
1
  import styled from "styled-components";
2
2
 
3
- export const Wrapper = styled.div`
4
- `;
3
+ const Wrapper = styled.div``;
5
4
 
6
- export const Title = styled.p`
7
- ${p => p.theme.textStyle.headingXXS};
8
- color: ${p => p.theme.color.textMediumEmphasis};
9
- padding-bottom: ${p => p.theme.spacing.xs};
10
- border-bottom: 1px solid ${p => p.theme.color.uiLine};
5
+ const Title = styled.p`
6
+ ${(p) => p.theme.textStyle.headingXXS};
7
+ color: ${(p) => p.theme.color.textMediumEmphasis};
8
+ padding-bottom: ${(p) => p.theme.spacing.xs};
9
+ border-bottom: 1px solid ${(p) => p.theme.color.uiLine};
11
10
  `;
12
11
 
13
- export const Component = styled.button`
14
- ${p => p.theme.textStyle.fieldLabel};
15
- color: ${p => p.theme.color.textHighEmphasis};
12
+ const Component = styled.button`
13
+ ${(p) => p.theme.textStyle.fieldLabel};
14
+ color: ${(p) => p.theme.color.textHighEmphasis};
16
15
  display: block;
17
- height: ${p => p.theme.spacing.l};
18
- background: ${p => p.theme.color.uiBackground02};
16
+ height: ${(p) => p.theme.spacing.l};
17
+ background: ${(p) => p.theme.color.uiBackground02};
19
18
  border: 1px solid transparent;
20
19
  width: 100%;
21
20
  text-align: left;
22
21
  cursor: pointer;
23
- margin-bottom: ${p => p.theme.spacing.xs};
24
- padding: 0 ${p => p.theme.spacing.s};
25
- border-radius: ${p => p.theme.radii.s};
26
- box-shadow: ${p => p.theme.shadow.field};
22
+ margin-bottom: ${(p) => p.theme.spacing.xs};
23
+ padding: 0 ${(p) => p.theme.spacing.s};
24
+ border-radius: ${(p) => p.theme.radii.s};
25
+ box-shadow: ${(p) => p.theme.shadow.field};
27
26
 
28
27
  &:hover {
29
- background: ${p => p.theme.color.overlayHoverPrimary};
28
+ background: ${(p) => p.theme.color.overlayHoverPrimary};
30
29
  }
31
30
 
32
31
  &:focus,
33
32
  &:active {
34
- background: ${p => p.theme.color.overlayFocusPrimary};
35
- border: 1px solid ${p => p.theme.color.interactive01};
33
+ background: ${(p) => p.theme.color.overlayFocusPrimary};
34
+ border: 1px solid ${(p) => p.theme.color.interactive01};
36
35
  outline: none;
37
36
  }
38
37
  `;
39
38
 
40
- export const ItemRow = styled.div`
39
+ const ItemRow = styled.div`
41
40
  display: flex;
42
41
  justify-content: space-between;
43
42
  align-items: center;
44
- margin-bottom: ${p => p.theme.spacing.xs};
43
+ margin-bottom: ${(p) => p.theme.spacing.xs};
44
+ `;
45
+
46
+ const Subtitle = styled.span`
47
+ ${(p) => p.theme.textStyle.uiXS};
48
+ color: ${(p) => p.theme.color.textLowEmphasis};
45
49
  `;
46
50
 
47
- export const Subtitle = styled.span`
48
- ${p => p.theme.textStyle.uiXS};
49
- color: ${p => p.theme.color.textLowEmphasis};
51
+ const Asterisk = styled.span`
52
+ color: ${(p) => p.theme.color.error};
50
53
  `;
54
+
55
+ export { Wrapper, Title, Component, ItemRow, Subtitle, Asterisk };
@@ -23,6 +23,7 @@ const SameComponentArray = (props: ISameComponentArrayProps): JSX.Element => {
23
23
  activatedModules,
24
24
  objKey,
25
25
  field,
26
+ mandatory,
26
27
  } = props;
27
28
 
28
29
  const type = getTypefromKey(objKey);
@@ -53,9 +54,13 @@ const SameComponentArray = (props: ISameComponentArrayProps): JSX.Element => {
53
54
 
54
55
  const showAddItemButton = !maxItems || value.length < maxItems;
55
56
 
57
+ const Asterisk = () => (mandatory ? <S.Asterisk>*</S.Asterisk> : null);
58
+
56
59
  return (
57
60
  <S.Wrapper>
58
- <S.Title>{title}</S.Title>
61
+ <S.Title>
62
+ {title} <Asterisk />
63
+ </S.Title>
59
64
  <S.ItemRow>
60
65
  <S.Subtitle>{value && value.length} items</S.Subtitle>
61
66
  {showAddItemButton && !disabled && (
@@ -110,6 +115,7 @@ export interface ISameComponentArrayProps {
110
115
  activatedModules: string[];
111
116
  objKey: string;
112
117
  field: any;
118
+ mandatory?: boolean;
113
119
  }
114
120
 
115
121
  export default SameComponentArray;
@@ -1,50 +1,55 @@
1
1
  import styled from "styled-components";
2
2
 
3
- export const Wrapper = styled.div`
4
- `;
3
+ const Wrapper = styled.div``;
5
4
 
6
- export const Title = styled.p`
7
- ${p => p.theme.textStyle.headingXXS};
8
- color: ${p => p.theme.color.textMediumEmphasis};
9
- padding-bottom: ${p => p.theme.spacing.xs};
10
- border-bottom: 1px solid ${p => p.theme.color.uiLine};
5
+ const Title = styled.p`
6
+ ${(p) => p.theme.textStyle.headingXXS};
7
+ color: ${(p) => p.theme.color.textMediumEmphasis};
8
+ padding-bottom: ${(p) => p.theme.spacing.xs};
9
+ border-bottom: 1px solid ${(p) => p.theme.color.uiLine};
11
10
  `;
12
11
 
13
- export const Component = styled.button`
14
- ${p => p.theme.textStyle.fieldLabel};
15
- color: ${p => p.theme.color.textHighEmphasis};
12
+ const Component = styled.button`
13
+ ${(p) => p.theme.textStyle.fieldLabel};
14
+ color: ${(p) => p.theme.color.textHighEmphasis};
16
15
  display: block;
17
- height: ${p => p.theme.spacing.l};
18
- background: ${p => p.theme.color.uiBackground02};
16
+ height: ${(p) => p.theme.spacing.l};
17
+ background: ${(p) => p.theme.color.uiBackground02};
19
18
  border: 1px solid transparent;
20
19
  width: 100%;
21
20
  text-align: left;
22
21
  cursor: pointer;
23
- margin-bottom: ${p => p.theme.spacing.xs};
24
- padding: 0 ${p => p.theme.spacing.s};
25
- border-radius: ${p => p.theme.radii.s};
26
- box-shadow: ${p => p.theme.shadow.field};
22
+ margin-bottom: ${(p) => p.theme.spacing.xs};
23
+ padding: 0 ${(p) => p.theme.spacing.s};
24
+ border-radius: ${(p) => p.theme.radii.s};
25
+ box-shadow: ${(p) => p.theme.shadow.field};
27
26
 
28
27
  &:hover {
29
- background: ${p => p.theme.color.overlayHoverPrimary};
28
+ background: ${(p) => p.theme.color.overlayHoverPrimary};
30
29
  }
31
30
 
32
31
  &:focus,
33
32
  &:active {
34
- background: ${p => p.theme.color.overlayFocusPrimary};
35
- border: 1px solid ${p => p.theme.color.interactive01};
33
+ background: ${(p) => p.theme.color.overlayFocusPrimary};
34
+ border: 1px solid ${(p) => p.theme.color.interactive01};
36
35
  outline: none;
37
36
  }
38
37
  `;
39
38
 
40
- export const ItemRow = styled.div`
39
+ const ItemRow = styled.div`
41
40
  display: flex;
42
41
  justify-content: space-between;
43
42
  align-items: center;
44
- margin-bottom: ${p => p.theme.spacing.xs};
43
+ margin-bottom: ${(p) => p.theme.spacing.xs};
44
+ `;
45
+
46
+ const Subtitle = styled.span`
47
+ ${(p) => p.theme.textStyle.uiXS};
48
+ color: ${(p) => p.theme.color.textLowEmphasis};
45
49
  `;
46
50
 
47
- export const Subtitle = styled.span`
48
- ${p => p.theme.textStyle.uiXS};
49
- color: ${p => p.theme.color.textLowEmphasis};
51
+ const Asterisk = styled.span`
52
+ color: ${(p) => p.theme.color.error};
50
53
  `;
54
+
55
+ export { Wrapper, Title, Component, ItemRow, Subtitle, Asterisk };
@@ -32,8 +32,9 @@ const DateField = (props: IDateFieldProps): JSX.Element => {
32
32
 
33
33
  const currentDate = new Date();
34
34
  const defaultValue = mandatory ? dateToString(currentDate) : null;
35
+ const stringDate = value && typeof value === "number" ? dateToString(new Date(value * 1000)) : value;
35
36
 
36
- const dateValue = value && (isValidDate(value) || isValidDateRange(value)) ? value : defaultValue;
37
+ const dateValue = stringDate && (isValidDate(stringDate) || isValidDateRange(stringDate)) ? stringDate : defaultValue;
37
38
 
38
39
  const isRange = dateValue && dateValue.split(" - ").length > 1;
39
40
  const { isOpen, toggleModal } = useModal();
@@ -46,7 +47,7 @@ const DateField = (props: IDateFieldProps): JSX.Element => {
46
47
  end: dateValue ? stringToDate(dateValue) : null,
47
48
  };
48
49
 
49
- const dateFormat = "yyyy/MM/dd";
50
+ const dateFormat = "dd/MM/yyyy";
50
51
 
51
52
  const minDate = futureDate ? initialDate.start : null;
52
53
  const maxDate = pastDate ? initialDate.start : null;
@@ -52,7 +52,7 @@ const AutoItem = (props: IProps) => {
52
52
  const ActionMenu = (props: any) => {
53
53
  const { source } = props;
54
54
  return (
55
- <FloatingMenu Button={MoreInfoButton} isWide={false}>
55
+ <FloatingMenu Button={MoreInfoButton}>
56
56
  <S.ActionMenu>{editMenu.options.map((item: any, i: number) => actionMenuItem(item, source))}</S.ActionMenu>
57
57
  </FloatingMenu>
58
58
  );
@@ -134,7 +134,7 @@ const AutoPanel = (props: IProps): JSX.Element => {
134
134
 
135
135
  const addSource =
136
136
  state.sourceTitles.length > 1 ? (
137
- <FloatingMenu Button={addSourceButton} isWide={false}>
137
+ <FloatingMenu Button={addSourceButton}>
138
138
  {sourceMenu(state.sourceTitles)}
139
139
  </FloatingMenu>
140
140
  ) : null;
@@ -47,7 +47,7 @@ const Item = (props: IProps) => {
47
47
  };
48
48
 
49
49
  const ActionMenu = () => (
50
- <FloatingMenu Button={MoreInfoButton} isWide={false}>
50
+ <FloatingMenu Button={MoreInfoButton}>
51
51
  <S.ActionMenu>{editMenu.options.map((item: any, i: number) => actionMenuItem(item))}</S.ActionMenu>
52
52
  </FloatingMenu>
53
53
  );
@@ -25,6 +25,7 @@ const UrlField = (props: IUrlFieldProps): JSX.Element => {
25
25
  if (isReqOk(response.status)) {
26
26
  const { data } = response;
27
27
  setInternalPageName(data.title);
28
+ if (!value?.title) handleTitleChange(data.title);
28
29
 
29
30
  const anchors: ISelectOption[] = findAnchorsFromPage(data);
30
31
  setAnchorOptions(anchors);
@@ -58,13 +59,15 @@ const UrlField = (props: IUrlFieldProps): JSX.Element => {
58
59
 
59
60
  const handleSetPage = (page: IPage) => {
60
61
  toggleModal();
61
- onChange({ ...value, href: null, linkTo: page.id });
62
+ onChange({ ...value, href: null, linkTo: page.id, linkToURL: page.fullUrl });
62
63
  handleValidation && handleValidation(page.id.toString(), validators);
63
64
  handlePanel && handlePanel(isOpen);
64
65
  };
65
66
 
66
67
  const handleChange = (newValue: string) => onChange({ ...value, href: newValue });
67
68
 
69
+ const handleTitleChange = (newValue: string) => onChange({ ...value, title: newValue });
70
+
68
71
  const handleNewTabChange = (newValue: boolean) => onChange({ ...value, newTab: newValue });
69
72
 
70
73
  const handleNoFollowChange = (newValue: boolean) => onChange({ ...value, noFollow: newValue });
@@ -98,6 +101,13 @@ const UrlField = (props: IUrlFieldProps): JSX.Element => {
98
101
  }
99
102
 
100
103
  const advancedFields = [
104
+ {
105
+ type: "TextField" as Field,
106
+ name: "title",
107
+ title: "Title",
108
+ value: value ? value.title : "",
109
+ onChange: handleTitleChange,
110
+ },
101
111
  {
102
112
  type: "UniqueCheck" as Field,
103
113
  name: "newTab",
@@ -139,6 +149,7 @@ const UrlField = (props: IUrlFieldProps): JSX.Element => {
139
149
  key={adField.name}
140
150
  options={adField.options}
141
151
  name={adField.name}
152
+ title={adField.title}
142
153
  fieldType={adField.type}
143
154
  value={adField.value}
144
155
  onChange={adField.onChange}
@@ -1,60 +1,84 @@
1
1
  const buttonsFull = {
2
- moreText: {
3
- buttons: ["bold", "italic", "paragraphFormat", "formatUL", "quote", "alignCenter"],
4
- buttonsVisible: 6,
5
- },
6
- moreText2: {
7
- buttons: ["insertLink", "insertImage", "insertVideo", "clearFormatting", "fullscreen"],
8
- buttonsVisible: 5,
9
- },
10
- moreMisc: {
11
- buttons: [
12
- "underline",
13
- "textColor",
14
- "formatOLSimple",
15
- "specialCharacters",
16
- "insertHR",
17
- "alignLeft",
18
- "alignRight",
19
- "alignJustify",
20
- "outdent",
21
- "indent",
22
- "undo",
23
- "redo",
24
- "selectAll",
25
- "html",
26
- ],
27
- align: "right",
28
- buttonsVisible: 0,
29
- },
30
- };
2
+ moreText: {
3
+ buttons: ["bold", "italic", "paragraphFormat", "formatUL", "quote", "alignCenter"],
4
+ buttonsVisible: 6,
5
+ },
6
+ moreText2: {
7
+ buttons: ["insertLink", "insertImage", "insertVideo", "clearFormatting", "fullscreen"],
8
+ buttonsVisible: 5,
9
+ },
10
+ moreMisc: {
11
+ buttons: [
12
+ "underline",
13
+ "textColor",
14
+ "formatOLSimple",
15
+ "specialCharacters",
16
+ "insertHR",
17
+ "alignLeft",
18
+ "alignRight",
19
+ "alignJustify",
20
+ "outdent",
21
+ "indent",
22
+ "undo",
23
+ "redo",
24
+ "selectAll",
25
+ "html",
26
+ ],
27
+ align: "right",
28
+ buttonsVisible: 0,
29
+ },
30
+ };
31
31
 
32
- const buttons = [["bold", "italic", "paragraphFormat", "formatUL", "quote", "alignLeft", "alignCenter", "insertLink", "|", "fullscreen"]];
32
+ const buttons = [
33
+ [
34
+ "bold",
35
+ "italic",
36
+ "paragraphFormat",
37
+ "formatUL",
38
+ "quote",
39
+ "alignLeft",
40
+ "alignCenter",
41
+ "insertLink",
42
+ "|",
43
+ "fullscreen",
44
+ ],
45
+ ];
33
46
 
34
- const wysiwygConfig = {
35
- key: process.env.REACT_APP_FROALA_KEY,
36
- // pastePlain: false,
37
- pasteDeniedAttrs: ["class", "id", "style", "dir"],
38
- listAdvancedTypes: false,
39
- attribution: false,
40
- paragraphFormat: {
41
- N: "Normal",
42
- H1: "Heading 1",
43
- H2: "Heading 2",
44
- H3: "Heading 3",
45
- H4: "Heading 4",
46
- },
47
- imageEditButtons: ["imageReplace", "imageAlign", "imageCaption", "imageRemove", "|", "imageLink", "linkOpen", "linkEdit", "linkRemove", "-", "imageDisplay", "imageAlt"],
48
- imageResize: false,
49
- linkEditButtons: ["linkOpen", "linkEdit", "linkRemove"],
50
- videoInsertButtons: ["videoBack", "|", "videoByURL", "videoEmbed"],
51
- imageUpload: true,
52
- imageAllowedTypes: ["jpeg", "jpg", "png", "svg"],
53
- imageMaxSize: 20 * 1024 * 1024,
54
- imageUploadMethod: "POST",
55
- imageUploadURL: `${process.env.REACT_APP_API_ENDPOINT}/images/wysiwyg`,
56
- imageManagerLoadURL: `${process.env.REACT_APP_API_ENDPOINT}/images/wysiwyg`,
57
- requestWithCORS: false,
58
- };
47
+ const wysiwygConfig = {
48
+ key: process.env.REACT_APP_FROALA_KEY,
49
+ // pastePlain: false,
50
+ pasteDeniedAttrs: ["class", "id", "style", "dir"],
51
+ listAdvancedTypes: false,
52
+ attribution: false,
53
+ paragraphFormat: {
54
+ N: "Normal",
55
+ H1: "Heading 1",
56
+ H2: "Heading 2",
57
+ H3: "Heading 3",
58
+ H4: "Heading 4",
59
+ },
60
+ imageEditButtons: [
61
+ "imageReplace",
62
+ "imageAlign",
63
+ "imageCaption",
64
+ "imageRemove",
65
+ "|",
66
+ "imageLink",
67
+ "linkOpen",
68
+ "linkEdit",
69
+ "linkRemove",
70
+ "-",
71
+ "imageDisplay",
72
+ "imageAlt",
73
+ ],
74
+ imageResize: false,
75
+ linkEditButtons: ["linkOpen", "linkEdit", "linkRemove"],
76
+ videoInsertButtons: ["videoBack", "|", "videoByURL", "videoEmbed"],
77
+ imageUpload: true,
78
+ imageAllowedTypes: ["jpeg", "jpg", "png", "svg"],
79
+ imageMaxSize: 20 * 1024 * 1024,
80
+ imageManagerLoadURL: `${process.env.REACT_APP_API_ENDPOINT}/images/wysiwyg`,
81
+ requestWithCORS: false,
82
+ };
59
83
 
60
- export { buttonsFull, buttons, wysiwygConfig }
84
+ export { buttonsFull, buttons, wysiwygConfig };
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { connect } from "react-redux";
3
3
  import FroalaEditor from "react-froala-wysiwyg";
4
4
  import { decodeEntities } from "@ax/helpers";
5
- import { IImage, ISite } from "@ax/types";
5
+ import { IImage, ISite, IRootState } from "@ax/types";
6
6
  import { galleryActions } from "@ax/containers/Gallery";
7
7
 
8
8
  import { wysiwygConfig, buttons, buttonsFull } from "./config";
@@ -10,9 +10,20 @@ import "./vendors";
10
10
  import * as S from "./style";
11
11
 
12
12
  const Wysiwyg = (props: IProps): JSX.Element => {
13
- const { value, error, onChange, placeholder, full = true, disabled, handleValidation, site, uploadImage } = props;
13
+ const {
14
+ value,
15
+ error,
16
+ onChange,
17
+ placeholder,
18
+ full = true,
19
+ disabled,
20
+ handleValidation,
21
+ site,
22
+ token,
23
+ uploadImage,
24
+ } = props;
14
25
 
15
- const imageSite = site ? site.id : "global"
26
+ const imageSite = site ? site.id : "global";
16
27
 
17
28
  const handleChange = (model: string) => {
18
29
  onChange(model);
@@ -23,6 +34,9 @@ const Wysiwyg = (props: IProps): JSX.Element => {
23
34
  const dynamicConfig = {
24
35
  placeholderText: placeholder,
25
36
  toolbarButtons: full ? buttonsFull : buttons,
37
+ requestHeaders: {
38
+ Authorization: `bearer ${token}`,
39
+ },
26
40
  events: {
27
41
  initialized() {
28
42
  const editor: any = this;
@@ -34,9 +48,8 @@ const Wysiwyg = (props: IProps): JSX.Element => {
34
48
  },
35
49
  "image.beforeUpload": async function (images: FileList) {
36
50
  const editor: any = this;
37
- const editorImage = editor.image.get();
38
51
  const { url } = await uploadImage(images[0], imageSite);
39
- editor.image.insert(url, null, null, editorImage);
52
+ editor.image.insert(url, true, null, editor.image.get(), null);
40
53
  return false;
41
54
  },
42
55
  blur: function () {
@@ -72,6 +85,10 @@ interface IWysiwygProps {
72
85
  site: ISite;
73
86
  }
74
87
 
88
+ const mapStateToProps = (state: IRootState) => ({
89
+ token: state.app.token,
90
+ });
91
+
75
92
  interface IDispatchProps {
76
93
  uploadImage: (imageFile: File, site: number | string) => Promise<IImage>;
77
94
  }
@@ -82,4 +99,4 @@ const mapDispatchToProps = {
82
99
 
83
100
  type IProps = IWysiwygProps & IDispatchProps;
84
101
 
85
- export default connect(null, mapDispatchToProps)(Wysiwyg);
102
+ export default connect(mapStateToProps, mapDispatchToProps)(Wysiwyg);
@@ -7,7 +7,6 @@ import * as S from "./style";
7
7
  const FloatingMenu = (props: IProps) => {
8
8
  const {
9
9
  children,
10
- isWide,
11
10
  isInAppBar,
12
11
  Button,
13
12
  position = "right",
@@ -51,17 +50,22 @@ const FloatingMenu = (props: IProps) => {
51
50
  const handleMouseEnter = (e: React.MouseEvent<HTMLDivElement>) =>
52
51
  reactiveToHover && !isOpen ? handleClick(e) : null;
53
52
 
53
+ const handleMouseLeave = (e: React.MouseEvent<HTMLDivElement>) =>
54
+ reactiveToHover && isOpen && setOpen(false);
55
+
54
56
  useHandleClickOutside(isOpen, handleClickOutside);
55
57
 
56
58
  return (
57
- <S.Wrapper ref={wrapper} onClick={handleClick} onMouseEnter={handleMouseEnter}>
59
+ <S.Wrapper ref={wrapper} onClick={handleClick} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>
58
60
  <S.ButtonWrapper ref={button}>
59
61
  <Button />
60
62
  </S.ButtonWrapper>
61
63
  {isOpen && (
62
- <S.Menu isWide={isWide} isInAppBar={isInAppBar} position={position} ref={menuOptions}>
63
- {children}
64
- </S.Menu>
64
+ <S.MenuWrapper isInAppBar={isInAppBar} ref={menuOptions} position={position}>
65
+ <S.Menu>
66
+ {children}
67
+ </S.Menu>
68
+ </S.MenuWrapper>
65
69
  )}
66
70
  </S.Wrapper>
67
71
  );
@@ -70,7 +74,6 @@ const FloatingMenu = (props: IProps) => {
70
74
  interface IProps {
71
75
  children: any;
72
76
  Button: any;
73
- isWide: boolean;
74
77
  isInAppBar?: boolean;
75
78
  position?: string;
76
79
  closeOnSelect?: boolean;
@@ -7,17 +7,19 @@ export const ButtonWrapper = styled.div`
7
7
  align-items: center;
8
8
  `;
9
9
 
10
- export const Menu = styled.div<{ isWide: boolean; isInAppBar?: boolean; position: string }>`
10
+ export const MenuWrapper = styled.div<{ isInAppBar?: boolean, position: string }>`
11
11
  position: absolute;
12
+ z-index: 3;
13
+ padding-top: ${(p) => (p.isInAppBar ? p.theme.spacing.s : p.theme.spacing.xs)};
14
+ margin-right: ${(p) => (p.isInAppBar ? p.theme.spacing.s : "0")};
12
15
  ${(p) => p.position}: 0;
16
+ `;
17
+
18
+ export const Menu = styled.div`
13
19
  padding: ${(p) => p.theme.spacing.xs} 0;
14
20
  max-width: ${(p) => `calc(${p.theme.spacing.l} * 5)`};
15
- min-width: ${(p) => `calc(${p.theme.spacing.l} * 3)`};
16
- z-index: 3;
21
+ min-width: ${(p) => `calc(${p.theme.spacing.m} * 7)`};
17
22
  background: ${(p) => p.theme.color.uiBackground02};
18
23
  box-shadow: ${(p) => p.theme.shadow.shadowL};
19
24
  border-radius: ${(p) => p.theme.spacing.xxs};
20
- margin-right: ${(p) => (p.isInAppBar ? p.theme.spacing.s : "0")};
21
- margin-top: ${(p) => (p.isInAppBar ? p.theme.spacing.s : p.theme.spacing.xs)};
22
- white-space: nowrap;
23
25
  `;
@@ -34,7 +34,7 @@ const Orientation = ({ filterItems }: IOrientationProps): JSX.Element => {
34
34
  );
35
35
 
36
36
  return (
37
- <FloatingMenu isWide={true} Button={Header} position="center" closeOnSelect={true}>
37
+ <FloatingMenu Button={Header} position="center" closeOnSelect={true}>
38
38
  <ListTitle>Filter by orientation</ListTitle>
39
39
  <ListItem isSelected={selectedValue.includes("all")} onClick={() => setQuery("all")}>All</ListItem>
40
40
  <ListItem isSelected={selectedValue.includes("landscape")} onClick={() => setQuery("landscape")}>Horizontal</ListItem>
@@ -31,7 +31,7 @@ const SortBy = ({ sortItems, sortedState }: ISortByProps): JSX.Element => {
31
31
  );
32
32
 
33
33
  return (
34
- <FloatingMenu isWide={true} Button={Header} position="center">
34
+ <FloatingMenu Button={Header} position="center">
35
35
  <ListTitle>Name Sorting</ListTitle>
36
36
  <ListItem isSelected={sortedByName && isAscending} onClick={sortAscendingName}>Ascendent</ListItem>
37
37
  <ListItem isSelected={sortedByName && !isAscending} onClick={sortDescendingName}>Descendent</ListItem>