@blaze-cms/plugin-data-ui 0.146.0-node18.1 → 0.146.0-rc-eagle.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/CHANGELOG.md +30 -16
  2. package/README.md +57 -0
  3. package/lib/components/EntityDataListing/EntityDataListing.js +21 -19
  4. package/lib/components/EntityDataListing/EntityDataListing.js.map +1 -1
  5. package/lib/components/EntityDataListing/index.js +2 -3
  6. package/lib/components/EntityDataListing/index.js.map +1 -1
  7. package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js +18 -20
  8. package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -1
  9. package/lib/components/EntityManager/Entity/EntitiyNavLinks/index.js +2 -3
  10. package/lib/components/EntityManager/Entity/EntitiyNavLinks/index.js.map +1 -1
  11. package/lib/components/EntityManager/Entity/Entity.js +289 -452
  12. package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
  13. package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js +62 -66
  14. package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  15. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +34 -50
  16. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  17. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js +2 -3
  18. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
  19. package/lib/components/EntityManager/Entity/EntityHeader/index.js +2 -3
  20. package/lib/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
  21. package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js +20 -26
  22. package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js.map +1 -1
  23. package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +20 -18
  24. package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
  25. package/lib/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js +34 -32
  26. package/lib/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -1
  27. package/lib/components/EntityManager/Entity/SideBarRelations/index.js +104 -150
  28. package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  29. package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +24 -24
  30. package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
  31. package/lib/components/EntityManager/Entity/actions-handlers/create/index.js +2 -3
  32. package/lib/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
  33. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js +42 -56
  34. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  35. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js +29 -45
  36. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
  37. package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js +2 -3
  38. package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
  39. package/lib/components/EntityManager/Entity/actions-handlers/index.js +7 -8
  40. package/lib/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
  41. package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js +2 -3
  42. package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
  43. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js +36 -57
  44. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  45. package/lib/components/EntityManager/Entity/actions-handlers/update/index.js +2 -3
  46. package/lib/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
  47. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js +47 -66
  48. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
  49. package/lib/components/EntityManager/Entity/index.js +2 -3
  50. package/lib/components/EntityManager/Entity/index.js.map +1 -1
  51. package/lib/components/EntityManager/EntityManager.js +91 -166
  52. package/lib/components/EntityManager/EntityManager.js.map +1 -1
  53. package/lib/components/EntityManager/index.js +2 -3
  54. package/lib/components/EntityManager/index.js.map +1 -1
  55. package/lib/components/EntityManager/utils/RecordEditContext/index.js +3 -4
  56. package/lib/components/EntityManager/utils/RecordEditContext/index.js.map +1 -1
  57. package/lib/components/EntityManager/utils/data-mappers.js +34 -46
  58. package/lib/components/EntityManager/utils/data-mappers.js.map +1 -1
  59. package/lib/components/EntityManager/utils/entity.js +35 -73
  60. package/lib/components/EntityManager/utils/entity.js.map +1 -1
  61. package/lib/components/EntityManager/utils/entityAvailableActions.js +51 -110
  62. package/lib/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
  63. package/lib/components/EntityManager/utils/is-form-empty.js +6 -10
  64. package/lib/components/EntityManager/utils/is-form-empty.js.map +1 -1
  65. package/lib/components/EntityManager/utils/query.js +17 -10
  66. package/lib/components/EntityManager/utils/query.js.map +1 -1
  67. package/lib/components/InfoBoxes/InfoBoxTooltip.js +43 -0
  68. package/lib/components/InfoBoxes/InfoBoxTooltip.js.map +1 -0
  69. package/lib/components/InfoBoxes/InfoBoxes.js +19 -20
  70. package/lib/components/InfoBoxes/InfoBoxes.js.map +1 -1
  71. package/lib/components/InfoBoxes/container/InfoBoxContainer.js +26 -38
  72. package/lib/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -1
  73. package/lib/components/InfoBoxes/helpers/build-dynamic-query.js +21 -17
  74. package/lib/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
  75. package/lib/components/InfoBoxes/hooks/useData.js +33 -30
  76. package/lib/components/InfoBoxes/hooks/useData.js.map +1 -1
  77. package/lib/components/InfoBoxes/hooks/useInfoBox.js +10 -10
  78. package/lib/components/InfoBoxes/hooks/useInfoBox.js.map +1 -1
  79. package/lib/components/InfoBoxes/index.js +2 -3
  80. package/lib/components/InfoBoxes/index.js.map +1 -1
  81. package/lib/components/InfoBoxes/presentational/InfoBox.js +28 -32
  82. package/lib/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
  83. package/lib/components/InfoBoxes/presentational/InfoBoxLabel.js +11 -12
  84. package/lib/components/InfoBoxes/presentational/InfoBoxLabel.js.map +1 -1
  85. package/lib/components/InfoBoxes/presentational/InfoBoxValue.js +12 -12
  86. package/lib/components/InfoBoxes/presentational/InfoBoxValue.js.map +1 -1
  87. package/lib/components/ListingTable/ListingTable.js +163 -303
  88. package/lib/components/ListingTable/ListingTable.js.map +1 -1
  89. package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js +61 -40
  90. package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  91. package/lib/components/ListingTable/ListingTableContent/index.js +2 -3
  92. package/lib/components/ListingTable/ListingTableContent/index.js.map +1 -1
  93. package/lib/components/ListingTable/SearchFilter/SearchContainer.js +215 -0
  94. package/lib/components/ListingTable/SearchFilter/SearchContainer.js.map +1 -0
  95. package/lib/components/ListingTable/SearchFilter/SearchFilter.js +48 -0
  96. package/lib/components/ListingTable/SearchFilter/SearchFilter.js.map +1 -0
  97. package/lib/components/ListingTable/SearchFilter/helpers.js +105 -0
  98. package/lib/components/ListingTable/SearchFilter/helpers.js.map +1 -0
  99. package/lib/components/ListingTable/SearchFilter/querys.js +13 -0
  100. package/lib/components/ListingTable/SearchFilter/querys.js.map +1 -0
  101. package/lib/components/ListingTable/TableActions/TableActions.js +27 -31
  102. package/lib/components/ListingTable/TableActions/TableActions.js.map +1 -1
  103. package/lib/components/ListingTable/TableActions/index.js +2 -3
  104. package/lib/components/ListingTable/TableActions/index.js.map +1 -1
  105. package/lib/components/ListingTable/index.js +2 -3
  106. package/lib/components/ListingTable/index.js.map +1 -1
  107. package/lib/components/ListingTable/mappers/populate-rows.js +104 -120
  108. package/lib/components/ListingTable/mappers/populate-rows.js.map +1 -1
  109. package/lib/components/ListingTable/service/index.js +66 -84
  110. package/lib/components/ListingTable/service/index.js.map +1 -1
  111. package/lib/components/Tabs/index.js +26 -42
  112. package/lib/components/Tabs/index.js.map +1 -1
  113. package/lib/components/hooks/useCallbackDebounce.js +5 -9
  114. package/lib/components/hooks/useCallbackDebounce.js.map +1 -1
  115. package/lib/constants.js +31 -29
  116. package/lib/constants.js.map +1 -1
  117. package/lib/icons/ContentIcon.js +17 -20
  118. package/lib/icons/ContentIcon.js.map +1 -1
  119. package/lib/icons/SettingsIcon.js +12 -15
  120. package/lib/icons/SettingsIcon.js.map +1 -1
  121. package/lib/icons/TaxonomyIcon.js +15 -18
  122. package/lib/icons/TaxonomyIcon.js.map +1 -1
  123. package/lib/icons/UsersIcon.js +11 -14
  124. package/lib/icons/UsersIcon.js.map +1 -1
  125. package/lib/icons/index.js +8 -9
  126. package/lib/icons/index.js.map +1 -1
  127. package/lib/index.js +81 -121
  128. package/lib/index.js.map +1 -1
  129. package/lib/utils/add-content-menu-items.js +67 -93
  130. package/lib/utils/add-content-menu-items.js.map +1 -1
  131. package/lib/utils/build-create-entity-mutation.js +12 -9
  132. package/lib/utils/build-create-entity-mutation.js.map +1 -1
  133. package/lib/utils/build-delete-entity-mutation.js +11 -8
  134. package/lib/utils/build-delete-entity-mutation.js.map +1 -1
  135. package/lib/utils/build-listing-query.js +20 -17
  136. package/lib/utils/build-listing-query.js.map +1 -1
  137. package/lib/utils/build-update-data-query.js +15 -9
  138. package/lib/utils/build-update-data-query.js.map +1 -1
  139. package/lib/utils/build-update-publish-unpublish-mutation.js +15 -8
  140. package/lib/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  141. package/lib/utils/get-default-query-params.js +7 -6
  142. package/lib/utils/get-default-query-params.js.map +1 -1
  143. package/lib/utils/hoc/withContext.js +4 -6
  144. package/lib/utils/hoc/withContext.js.map +1 -1
  145. package/lib/utils/hooks/useToggle.js +4 -12
  146. package/lib/utils/hooks/useToggle.js.map +1 -1
  147. package/lib/utils/index.js +2 -3
  148. package/lib/utils/index.js.map +1 -1
  149. package/package.json +16 -16
  150. package/src/components/EntityManager/Entity/Entity.js +34 -39
  151. package/src/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +8 -1
  152. package/src/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +2 -0
  153. package/src/components/EntityManager/Entity/SideBarRelations/index.js +51 -17
  154. package/src/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +5 -3
  155. package/src/components/EntityManager/utils/entity.js +13 -2
  156. package/src/components/InfoBoxes/InfoBoxTooltip.js +32 -0
  157. package/src/components/InfoBoxes/helpers/build-dynamic-query.js +2 -0
  158. package/src/components/InfoBoxes/presentational/InfoBox.js +4 -2
  159. package/src/components/ListingTable/ListingTable.js +13 -18
  160. package/src/components/ListingTable/ListingTableContent/ListingTableContent.js +43 -25
  161. package/src/components/ListingTable/SearchFilter/SearchContainer.js +228 -0
  162. package/src/components/ListingTable/SearchFilter/SearchFilter.js +38 -0
  163. package/src/components/ListingTable/SearchFilter/helpers.js +99 -0
  164. package/src/components/ListingTable/SearchFilter/querys.js +9 -0
  165. package/src/components/ListingTable/mappers/populate-rows.js +3 -0
  166. package/src/components/ListingTable/service/index.js +2 -2
  167. package/src/components/Tabs/index.js +17 -21
  168. package/src/constants.js +9 -1
  169. package/src/index.js +9 -7
  170. package/src/utils/build-listing-query.js +4 -4
  171. package/src/utils/hoc/withContext.js +5 -4
  172. package/lib-es/components/EntityDataListing/EntityDataListing.js +0 -33
  173. package/lib-es/components/EntityDataListing/EntityDataListing.js.map +0 -1
  174. package/lib-es/components/EntityDataListing/index.js +0 -3
  175. package/lib-es/components/EntityDataListing/index.js.map +0 -1
  176. package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js +0 -30
  177. package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +0 -1
  178. package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/index.js +0 -3
  179. package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/index.js.map +0 -1
  180. package/lib-es/components/EntityManager/Entity/Entity.js +0 -460
  181. package/lib-es/components/EntityManager/Entity/Entity.js.map +0 -1
  182. package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js +0 -103
  183. package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +0 -1
  184. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +0 -42
  185. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +0 -1
  186. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js +0 -3
  187. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +0 -1
  188. package/lib-es/components/EntityManager/Entity/EntityHeader/index.js +0 -3
  189. package/lib-es/components/EntityManager/Entity/EntityHeader/index.js.map +0 -1
  190. package/lib-es/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js +0 -30
  191. package/lib-es/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js.map +0 -1
  192. package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +0 -27
  193. package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +0 -1
  194. package/lib-es/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js +0 -49
  195. package/lib-es/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +0 -1
  196. package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js +0 -117
  197. package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js.map +0 -1
  198. package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +0 -30
  199. package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +0 -1
  200. package/lib-es/components/EntityManager/Entity/actions-handlers/create/index.js +0 -5
  201. package/lib-es/components/EntityManager/Entity/actions-handlers/create/index.js.map +0 -1
  202. package/lib-es/components/EntityManager/Entity/actions-handlers/create/submit.js +0 -46
  203. package/lib-es/components/EntityManager/Entity/actions-handlers/create/submit.js.map +0 -1
  204. package/lib-es/components/EntityManager/Entity/actions-handlers/delete/delete.js +0 -32
  205. package/lib-es/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +0 -1
  206. package/lib-es/components/EntityManager/Entity/actions-handlers/delete/index.js +0 -5
  207. package/lib-es/components/EntityManager/Entity/actions-handlers/delete/index.js.map +0 -1
  208. package/lib-es/components/EntityManager/Entity/actions-handlers/index.js +0 -12
  209. package/lib-es/components/EntityManager/Entity/actions-handlers/index.js.map +0 -1
  210. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/index.js +0 -5
  211. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/index.js.map +0 -1
  212. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/publish.js +0 -39
  213. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +0 -1
  214. package/lib-es/components/EntityManager/Entity/actions-handlers/update/index.js +0 -5
  215. package/lib-es/components/EntityManager/Entity/actions-handlers/update/index.js.map +0 -1
  216. package/lib-es/components/EntityManager/Entity/actions-handlers/update/submit.js +0 -53
  217. package/lib-es/components/EntityManager/Entity/actions-handlers/update/submit.js.map +0 -1
  218. package/lib-es/components/EntityManager/Entity/index.js +0 -3
  219. package/lib-es/components/EntityManager/Entity/index.js.map +0 -1
  220. package/lib-es/components/EntityManager/EntityManager.js +0 -133
  221. package/lib-es/components/EntityManager/EntityManager.js.map +0 -1
  222. package/lib-es/components/EntityManager/index.js +0 -3
  223. package/lib-es/components/EntityManager/index.js.map +0 -1
  224. package/lib-es/components/EntityManager/utils/RecordEditContext/index.js +0 -6
  225. package/lib-es/components/EntityManager/utils/RecordEditContext/index.js.map +0 -1
  226. package/lib-es/components/EntityManager/utils/data-mappers.js +0 -55
  227. package/lib-es/components/EntityManager/utils/data-mappers.js.map +0 -1
  228. package/lib-es/components/EntityManager/utils/entity.js +0 -66
  229. package/lib-es/components/EntityManager/utils/entity.js.map +0 -1
  230. package/lib-es/components/EntityManager/utils/entityAvailableActions.js +0 -56
  231. package/lib-es/components/EntityManager/utils/entityAvailableActions.js.map +0 -1
  232. package/lib-es/components/EntityManager/utils/is-form-empty.js +0 -9
  233. package/lib-es/components/EntityManager/utils/is-form-empty.js.map +0 -1
  234. package/lib-es/components/EntityManager/utils/query.js +0 -23
  235. package/lib-es/components/EntityManager/utils/query.js.map +0 -1
  236. package/lib-es/components/InfoBoxes/InfoBoxes.js +0 -28
  237. package/lib-es/components/InfoBoxes/InfoBoxes.js.map +0 -1
  238. package/lib-es/components/InfoBoxes/container/InfoBoxContainer.js +0 -38
  239. package/lib-es/components/InfoBoxes/container/InfoBoxContainer.js.map +0 -1
  240. package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js +0 -26
  241. package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js.map +0 -1
  242. package/lib-es/components/InfoBoxes/hooks/useData.js +0 -39
  243. package/lib-es/components/InfoBoxes/hooks/useData.js.map +0 -1
  244. package/lib-es/components/InfoBoxes/hooks/useInfoBox.js +0 -17
  245. package/lib-es/components/InfoBoxes/hooks/useInfoBox.js.map +0 -1
  246. package/lib-es/components/InfoBoxes/index.js +0 -3
  247. package/lib-es/components/InfoBoxes/index.js.map +0 -1
  248. package/lib-es/components/InfoBoxes/presentational/InfoBox.js +0 -37
  249. package/lib-es/components/InfoBoxes/presentational/InfoBox.js.map +0 -1
  250. package/lib-es/components/InfoBoxes/presentational/InfoBoxLabel.js +0 -12
  251. package/lib-es/components/InfoBoxes/presentational/InfoBoxLabel.js.map +0 -1
  252. package/lib-es/components/InfoBoxes/presentational/InfoBoxValue.js +0 -30
  253. package/lib-es/components/InfoBoxes/presentational/InfoBoxValue.js.map +0 -1
  254. package/lib-es/components/ListingTable/ListingTable.js +0 -207
  255. package/lib-es/components/ListingTable/ListingTable.js.map +0 -1
  256. package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js +0 -54
  257. package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +0 -1
  258. package/lib-es/components/ListingTable/ListingTableContent/index.js +0 -3
  259. package/lib-es/components/ListingTable/ListingTableContent/index.js.map +0 -1
  260. package/lib-es/components/ListingTable/TableActions/TableActions.js +0 -34
  261. package/lib-es/components/ListingTable/TableActions/TableActions.js.map +0 -1
  262. package/lib-es/components/ListingTable/TableActions/index.js +0 -3
  263. package/lib-es/components/ListingTable/TableActions/index.js.map +0 -1
  264. package/lib-es/components/ListingTable/index.js +0 -3
  265. package/lib-es/components/ListingTable/index.js.map +0 -1
  266. package/lib-es/components/ListingTable/mappers/populate-rows.js +0 -137
  267. package/lib-es/components/ListingTable/mappers/populate-rows.js.map +0 -1
  268. package/lib-es/components/ListingTable/service/index.js +0 -86
  269. package/lib-es/components/ListingTable/service/index.js.map +0 -1
  270. package/lib-es/components/Tabs/index.js +0 -39
  271. package/lib-es/components/Tabs/index.js.map +0 -1
  272. package/lib-es/components/hooks/useCallbackDebounce.js +0 -12
  273. package/lib-es/components/hooks/useCallbackDebounce.js.map +0 -1
  274. package/lib-es/constants.js +0 -39
  275. package/lib-es/constants.js.map +0 -1
  276. package/lib-es/icons/ContentIcon.js +0 -80
  277. package/lib-es/icons/ContentIcon.js.map +0 -1
  278. package/lib-es/icons/SettingsIcon.js +0 -36
  279. package/lib-es/icons/SettingsIcon.js.map +0 -1
  280. package/lib-es/icons/TaxonomyIcon.js +0 -60
  281. package/lib-es/icons/TaxonomyIcon.js.map +0 -1
  282. package/lib-es/icons/UsersIcon.js +0 -33
  283. package/lib-es/icons/UsersIcon.js.map +0 -1
  284. package/lib-es/icons/index.js +0 -6
  285. package/lib-es/icons/index.js.map +0 -1
  286. package/lib-es/index.js +0 -84
  287. package/lib-es/index.js.map +0 -1
  288. package/lib-es/utils/add-content-menu-items.js +0 -72
  289. package/lib-es/utils/add-content-menu-items.js.map +0 -1
  290. package/lib-es/utils/build-create-entity-mutation.js +0 -21
  291. package/lib-es/utils/build-create-entity-mutation.js.map +0 -1
  292. package/lib-es/utils/build-delete-entity-mutation.js +0 -18
  293. package/lib-es/utils/build-delete-entity-mutation.js.map +0 -1
  294. package/lib-es/utils/build-listing-query.js +0 -28
  295. package/lib-es/utils/build-listing-query.js.map +0 -1
  296. package/lib-es/utils/build-update-data-query.js +0 -24
  297. package/lib-es/utils/build-update-data-query.js.map +0 -1
  298. package/lib-es/utils/build-update-publish-unpublish-mutation.js +0 -22
  299. package/lib-es/utils/build-update-publish-unpublish-mutation.js.map +0 -1
  300. package/lib-es/utils/get-default-query-params.js +0 -17
  301. package/lib-es/utils/get-default-query-params.js.map +0 -1
  302. package/lib-es/utils/hoc/withContext.js +0 -8
  303. package/lib-es/utils/hoc/withContext.js.map +0 -1
  304. package/lib-es/utils/hooks/useToggle.js +0 -8
  305. package/lib-es/utils/hooks/useToggle.js.map +0 -1
  306. package/lib-es/utils/index.js +0 -3
  307. package/lib-es/utils/index.js.map +0 -1
@@ -1,22 +1,14 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/es.object.define-property.js");
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
- exports["default"] = void 0;
9
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
6
+ exports.default = void 0;
10
7
  var _react = require("react");
11
8
  function useToggle(initialValue) {
12
- var _useState = (0, _react.useState)(initialValue),
13
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
14
- toggleValue = _useState2[0],
15
- setToggleValue = _useState2[1];
16
- var toggler = (0, _react.useCallback)(function () {
17
- return setToggleValue(!toggleValue);
18
- }, [toggleValue]);
9
+ const [toggleValue, setToggleValue] = (0, _react.useState)(initialValue);
10
+ const toggler = (0, _react.useCallback)(() => setToggleValue(!toggleValue), [toggleValue]);
19
11
  return [toggleValue, toggler];
20
12
  }
21
- var _default = exports["default"] = useToggle;
13
+ var _default = exports.default = useToggle;
22
14
  //# sourceMappingURL=useToggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useToggle.js","names":["_react","require","useToggle","initialValue","_useState","useState","_useState2","_slicedToArray2","toggleValue","setToggleValue","toggler","useCallback","_default","exports"],"sources":["../../../src/utils/hooks/useToggle.js"],"sourcesContent":["import { useState, useCallback } from 'react';\n\nfunction useToggle(initialValue) {\n const [toggleValue, setToggleValue] = useState(initialValue);\n const toggler = useCallback(() => setToggleValue(!toggleValue), [toggleValue]);\n\n return [toggleValue, toggler];\n}\n\nexport default useToggle;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,SAASC,SAASA,CAACC,YAAY,EAAE;EAC/B,IAAAC,SAAA,GAAsC,IAAAC,eAAQ,EAACF,YAAY,CAAC;IAAAG,UAAA,OAAAC,eAAA,aAAAH,SAAA;IAArDI,WAAW,GAAAF,UAAA;IAAEG,cAAc,GAAAH,UAAA;EAClC,IAAMI,OAAO,GAAG,IAAAC,kBAAW,EAAC;IAAA,OAAMF,cAAc,CAAC,CAACD,WAAW,CAAC;EAAA,GAAE,CAACA,WAAW,CAAC,CAAC;EAE9E,OAAO,CAACA,WAAW,EAAEE,OAAO,CAAC;AAC/B;AAAC,IAAAE,QAAA,GAAAC,OAAA,cAEcX,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"useToggle.js","names":["_react","require","useToggle","initialValue","toggleValue","setToggleValue","useState","toggler","useCallback","_default","exports","default"],"sources":["../../../src/utils/hooks/useToggle.js"],"sourcesContent":["import { useState, useCallback } from 'react';\n\nfunction useToggle(initialValue) {\n const [toggleValue, setToggleValue] = useState(initialValue);\n const toggler = useCallback(() => setToggleValue(!toggleValue), [toggleValue]);\n\n return [toggleValue, toggler];\n}\n\nexport default useToggle;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,SAASC,SAASA,CAACC,YAAY,EAAE;EAC/B,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAACH,YAAY,CAAC;EAC5D,MAAMI,OAAO,GAAG,IAAAC,kBAAW,EAAC,MAAMH,cAAc,CAAC,CAACD,WAAW,CAAC,EAAE,CAACA,WAAW,CAAC,CAAC;EAE9E,OAAO,CAACA,WAAW,EAAEG,OAAO,CAAC;AAC/B;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcT,SAAS","ignoreList":[]}
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/es.object.define-property.js");
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  Object.defineProperty(exports, "buildUpdatePublishUnpublishMutation", {
9
8
  enumerable: true,
10
- get: function get() {
11
- return _buildUpdatePublishUnpublishMutation["default"];
9
+ get: function () {
10
+ return _buildUpdatePublishUnpublishMutation.default;
12
11
  }
13
12
  });
14
13
  var _buildUpdatePublishUnpublishMutation = _interopRequireDefault(require("./build-update-publish-unpublish-mutation"));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_buildUpdatePublishUnpublishMutation","_interopRequireDefault","require"],"sources":["../../src/utils/index.js"],"sourcesContent":["import buildUpdatePublishUnpublishMutation from './build-update-publish-unpublish-mutation';\n\nexport { buildUpdatePublishUnpublishMutation };\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,oCAAA,GAAAC,sBAAA,CAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_buildUpdatePublishUnpublishMutation","_interopRequireDefault","require"],"sources":["../../src/utils/index.js"],"sourcesContent":["import buildUpdatePublishUnpublishMutation from './build-update-publish-unpublish-mutation';\n\nexport { buildUpdatePublishUnpublishMutation };\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,oCAAA,GAAAC,sBAAA,CAAAC,OAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@blaze-cms/plugin-data-ui",
3
- "version": "0.146.0-node18.1",
3
+ "version": "0.146.0-rc-eagle.0",
4
4
  "description": "Blaze plugin data ui",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-es/index.js",
7
- "sideEffects": false,
7
+ "source": "src/index.js",
8
8
  "directories": {
9
9
  "src": "src/"
10
10
  },
@@ -27,28 +27,28 @@
27
27
  },
28
28
  "license": "GPL-3.0",
29
29
  "dependencies": {
30
- "@blaze-cms/admin-ui-utils": "0.146.0-node18.0",
31
- "@blaze-cms/core-errors": "0.146.0-node18.0",
32
- "@blaze-cms/plugin-render-hooks-ui": "0.146.0-node18.1",
33
- "@blaze-cms/react-form-builder": "0.146.0-node18.0",
34
- "@blaze-cms/react-page-builder": "0.146.0-node18.1",
35
- "@blaze-cms/setup-ui": "0.146.0-node18.0",
36
- "@blaze-cms/versioning-ui": "0.146.0-node18.0",
30
+ "@blaze-cms/admin-ui-utils": "0.146.0-rc-eagle.0",
31
+ "@blaze-cms/core-errors": "0.146.0-rc-eagle.0",
32
+ "@blaze-cms/plugin-render-hooks-ui": "0.146.0-rc-eagle.0",
33
+ "@blaze-cms/react-form-builder": "0.146.0-rc-eagle.0",
34
+ "@blaze-cms/react-page-builder": "0.146.0-rc-eagle.0",
35
+ "@blaze-cms/setup-ui": "0.146.0-rc-eagle.0",
36
+ "@blaze-cms/versioning-ui": "0.146.0-rc-eagle.0",
37
37
  "@blaze-react/button": "0.8.0-alpha.82",
38
38
  "@blaze-react/more": "0.5.19",
39
- "@blaze-react/multiselect": "0.8.0-alpha.78",
39
+ "@blaze-react/multiselect": "0.8.0-alpha.103",
40
40
  "@blaze-react/pagination": "0.8.0-alpha.76",
41
- "@blaze-react/select": "0.8.0-alpha.80",
41
+ "@blaze-react/select": "0.8.0-alpha.100",
42
42
  "@blaze-react/tab": "^0.7.0",
43
43
  "@blaze-react/table": "0.8.0-alpha.74",
44
44
  "@blaze-react/toaster": "^0.7.0",
45
+ "@blaze-react/tooltip": "0.8.0-alpha.100",
45
46
  "@blaze-react/utils": "0.5.15",
46
- "core-js": "^3.2.1",
47
47
  "lodash.differencewith": "^4.5.0",
48
48
  "lodash.has": "^4.5.2",
49
49
  "lodash.isempty": "^4.4.0",
50
50
  "lodash.isequal": "^4.5.0",
51
- "lodash.omit": "^4.5.0",
51
+ "lodash.omit": "^4.18.0",
52
52
  "lodash.unionby": "^4.8.0",
53
53
  "lodash.upperfirst": "^4.3.1",
54
54
  "react-helmet": "^6.1.0",
@@ -56,17 +56,17 @@
56
56
  "uuid": "^3.3.3"
57
57
  },
58
58
  "devDependencies": {
59
- "@blaze-cms/core-ui": "0.146.0-node18.1"
59
+ "@blaze-cms/core-ui": "0.146.0-rc-eagle.0"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "@apollo/client": "3.x",
63
63
  "prop-types": "^15.7.2",
64
- "react": "^18.2.0",
64
+ "react": ">= 18",
65
65
  "react-router-dom": "^5.0.1"
66
66
  },
67
67
  "eslintIgnore": [
68
68
  "lib/*",
69
69
  "lib-es/*"
70
70
  ],
71
- "gitHead": "1b5ba49d185e912846cec402d39a44ef2623ca1c"
71
+ "gitHead": "ddfab9ac3d59438939268c106917b092e4071071"
72
72
  }
@@ -4,16 +4,14 @@ import { withRouter, Prompt } from 'react-router-dom';
4
4
  import { useApolloClient } from '@apollo/client';
5
5
  import PropTypes from 'prop-types';
6
6
  import { RenderHook } from '@blaze-cms/plugin-render-hooks-ui';
7
- import { getQuery, GET_CURRENT_TAB_ID } from '@blaze-cms/admin-ui-utils';
7
+ import { getQuery } from '@blaze-cms/admin-ui-utils';
8
8
  import { FormBuilder, parseFormValues } from '@blaze-cms/react-form-builder';
9
9
  import { DeleteAction, CopyDataFromAction } from '@blaze-cms/admin';
10
10
  import { useToasts } from '@blaze-react/toaster';
11
11
  import cloneDeep from 'lodash.clonedeep';
12
12
  import { getPageName } from '../utils/data-mappers';
13
- import isFormEmpty from '../utils/is-form-empty';
14
13
  import availableActions from './actions-handlers';
15
14
  import SideBarRelations from './SideBarRelations';
16
- import Tabs from '../../Tabs';
17
15
  import useCallbackDebounce from '../../hooks/useCallbackDebounce';
18
16
 
19
17
  import {
@@ -51,8 +49,6 @@ const Entity = ({
51
49
  onViewUrl,
52
50
  refetchRecord
53
51
  }) => {
54
- const client = useApolloClient();
55
- const [, setCurrentTabId] = useState(null);
56
52
  const [formValues, setFormValues] = useState(null);
57
53
  const [entitySchema, setEntitySchema] = useState(null);
58
54
  const [entityData, setEntityData] = useState(null);
@@ -73,10 +69,14 @@ const Entity = ({
73
69
  const [newUpdatedDate, setNewUpdatedDate] = useState(null);
74
70
  const [saveButtonText, setSaveButtonText] = useState(SAVE_BUTTON_TEXTS.save);
75
71
  const [externalUpdateTime, setExternalUpdateTime] = useState(null);
72
+ const [suppressPrompt, setSuppressPrompt] = useState(false);
73
+ const [isRightSidebarOpen, setIsRightSidebarOpen] = useState(true);
74
+ const handleToggleRightSidebar = () => setIsRightSidebarOpen(!isRightSidebarOpen);
76
75
 
77
76
  const isCreatePage = history.location.pathname.includes('create');
78
77
  const [isNewEntity, setIsNewEntity] = useState(isCreatePage);
79
78
 
79
+ const client = useApolloClient();
80
80
  const shouldUpdateState =
81
81
  !entityIdentifier ||
82
82
  checkFulfilConditions(entity, schema, previousQuery, !entityData) ||
@@ -133,7 +133,8 @@ const Entity = ({
133
133
  client.writeQuery({
134
134
  query: getQuery('GET_CURRENT_ENTITY'),
135
135
  data: {
136
- currentEntity: schema.id
136
+ currentEntity: schema.id,
137
+ currentItemId: entity ? entity.id : null
137
138
  }
138
139
  });
139
140
  }
@@ -248,13 +249,12 @@ const Entity = ({
248
249
  const [updatedEntity = null] = fields.filter(({ id }) => id === 'name');
249
250
  updatedEntity && setPageTitle(updatedEntity.value);
250
251
 
251
- const isValidAndNewValueSet = isValid && isNewValueSet;
252
252
  const isNotValidOrNotNewValueSet = !isValid || !isNewValueSet;
253
253
  if (componentIsMounted.current) {
254
254
  setIsFormValid(isValid);
255
255
  }
256
256
 
257
- if (isValidAndNewValueSet && componentIsMounted.current) {
257
+ if (isValid && isNewValueSet && componentIsMounted.current) {
258
258
  setIsSaveButtonAvailable(true);
259
259
  setSaveButtonText(SAVE_BUTTON_TEXTS.save);
260
260
  }
@@ -270,10 +270,12 @@ const Entity = ({
270
270
 
271
271
  const onSubmit = event => {
272
272
  event && event.preventDefault();
273
-
274
273
  if (!isSaveButtonAvailable) return null;
275
- const parsedFormValues = parseFormValues(formValues);
276
274
 
275
+ if (isCreatePage) {
276
+ setSuppressPrompt(true);
277
+ }
278
+ const parsedFormValues = parseFormValues(formValues);
277
279
  const updatedFormValues = newUpdatedDate
278
280
  ? { ...formData.values, update: newUpdatedDate }
279
281
  : { ...formData.values };
@@ -411,13 +413,9 @@ const Entity = ({
411
413
 
412
414
  const pageName = formData && formData.values && formData.values.name;
413
415
 
414
- const hasNewFormValues = checkFulfilConditions(isNewEntity, !isFormEmpty(formValues));
415
- const hasToDisplayPrompt = isSaveButtonAvailable || hasNewFormValues;
416
+ const hasToDisplayPrompt = isSaveButtonAvailable && !suppressPrompt;
416
417
 
417
418
  const showSideBarRelations = checkFulfilConditions(schema, formData);
418
- const showPageBuilderTabs =
419
- schema?.interfaces?.includes('page-builder/page-builder-template') ||
420
- schema?.interfaces?.includes('page-builder/page-builder');
421
419
 
422
420
  return (
423
421
  <RecordEditContextProvider value={{ externalUpdateTime, updated: formData?.values?.updated }}>
@@ -458,7 +456,8 @@ const Entity = ({
458
456
  />
459
457
  )}
460
458
 
461
- <div className="page__content--fixed">
459
+ <div
460
+ className={`page__content${!isRightSidebarOpen ? ' right-sidebar-collapsed' : ''}`}>
462
461
  <div className="page__content">
463
462
  <div className="content">
464
463
  <RenderHook
@@ -467,28 +466,19 @@ const Entity = ({
467
466
  schema={schema}
468
467
  />
469
468
  <InfoBoxes id={entity.id} schema={schema} />
470
- <Tabs
471
- enabled={showPageBuilderTabs}
472
- onTabChange={tabId => {
473
- client.writeQuery({
474
- query: GET_CURRENT_TAB_ID,
475
- data: { currentTabId: tabId }
476
- });
477
- setCurrentTabId(tabId);
478
- }}>
479
- <FormBuilder
480
- getIsFormValid={setIsFormValid}
481
- getFormValues={getFormValues}
482
- schema={schema}
483
- data={clonedFormData}
484
- onChange={onChangeFormValues}
485
- shouldCopyData={shouldCopyData}
486
- updateCopyData={updateCopyData}
487
- formValues={formValues}
488
- isNewEntity={isNewEntity}
489
- onExternalUpdate={setExternalUpdateTime}
490
- />
491
- </Tabs>
469
+ <FormBuilder
470
+ getIsFormValid={setIsFormValid}
471
+ getFormValues={getFormValues}
472
+ schema={schema}
473
+ data={clonedFormData}
474
+ onChange={onChangeFormValues}
475
+ shouldCopyData={shouldCopyData}
476
+ updateCopyData={updateCopyData}
477
+ formValues={formValues}
478
+ isNewEntity={isNewEntity}
479
+ onExternalUpdate={setExternalUpdateTime}
480
+ mode={isNewEntity ? 'create' : 'update'}
481
+ />
492
482
  <RenderHook
493
483
  hookKey={`entity:${action}:main:bottom`}
494
484
  entity={entity}
@@ -499,13 +489,18 @@ const Entity = ({
499
489
  </div>
500
490
  </div>
501
491
 
502
- <div className="column column--one-third page-sidebar page-sidebar--relations">
492
+ <div
493
+ className={`column column--one-third page-sidebar page-sidebar--relations${
494
+ !isRightSidebarOpen ? ' sidebar--collapsed' : ''
495
+ }`}>
503
496
  {showSideBarRelations && (
504
497
  <SideBarRelations
505
498
  entity={entity}
506
499
  formData={formData.values}
507
500
  schema={schema}
508
501
  onChange={onChangeSideBarRelations}
502
+ isOpen={isRightSidebarOpen}
503
+ onToggle={handleToggleRightSidebar}
509
504
  />
510
505
  )}
511
506
  </div>
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import Button from '@blaze-react/button';
4
4
  import { useMutation } from '@apollo/client';
5
5
  import { getMutation } from '@blaze-cms/admin-ui-utils';
6
+ import { DEBUG_PARAM } from '../../../../../constants';
6
7
 
7
8
  const HeaderPreviewButton = ({ itemId, itemEntity }) => {
8
9
  const [createPreviewToken] = useMutation(getMutation('PREVIEW_TOKEN_MUTATION'));
@@ -23,7 +24,13 @@ const HeaderPreviewButton = ({ itemId, itemEntity }) => {
23
24
  }
24
25
  });
25
26
 
26
- if (url) window.open(url, '_blank');
27
+ if (url) {
28
+ const delimiter = url.includes('?') ? '&' : '?';
29
+ const debugParam = process.env.BLAZE_DISABLE_URL_DEBUG_PARAM
30
+ ? ''
31
+ : `${delimiter}${DEBUG_PARAM}`;
32
+ window.open(`${url}${debugParam}`, '_blank');
33
+ }
27
34
  // eslint-disable-next-line no-empty
28
35
  } catch (err) {}
29
36
  };
@@ -18,6 +18,8 @@ export default function buildDynamicQuery({ id, schema, displayProperties }) {
18
18
  label
19
19
  value
20
20
  showLabel
21
+ tooltipIcon
22
+ tooltipContent
21
23
  }`
22
24
  );
23
25
 
@@ -1,6 +1,7 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import uuidv1 from 'uuid/v1';
4
+ import Accordion from '@blaze-react/accordion';
4
5
  import { useApolloClient } from '@apollo/client';
5
6
  import { getQuery } from '@blaze-cms/admin-ui-utils';
6
7
  import { formFieldTypes } from '@blaze-cms/react-form-builder';
@@ -10,10 +11,16 @@ import { PUBLISHED, UNPUBLISHED } from '../../../../constants';
10
11
  import CustomSidebarInfoContainer from './container/CustomSidebarInfoContainer';
11
12
  import EntityNavLinks from '../EntitiyNavLinks';
12
13
 
13
- const SideBarRelations = ({ schema, onChange, formData, entity }) => {
14
+ const SideBarRelations = ({ schema, onChange, formData, entity, isOpen, onToggle }) => {
14
15
  const { relation: RelationComponent } = formFieldTypes;
15
- const { formattedStatus, formattedUpdated, formattedCreated, formattedPublished, status } =
16
- formData;
16
+ const {
17
+ formattedStatus,
18
+ formattedUpdated,
19
+ formattedCreated,
20
+ formattedPublished,
21
+ updatedBy,
22
+ status
23
+ } = formData;
17
24
  const client = useApolloClient();
18
25
 
19
26
  const [relationsComponents, setRelationsComponents] = useState(null);
@@ -58,7 +65,16 @@ const SideBarRelations = ({ schema, onChange, formData, entity }) => {
58
65
  });
59
66
 
60
67
  return (
61
- <div className="sidebar" data-testid="sideBarRelations-main-div">
68
+ <div
69
+ className={classnames('sidebar', { 'sidebar--collapsed': !isOpen })}
70
+ data-testid="sideBarRelations-main-div">
71
+ <div
72
+ className="sidebar__toggle-button"
73
+ onClick={onToggle}
74
+ role="button"
75
+ aria-label={isOpen ? 'Collapse sidebar' : 'Expand sidebar'}>
76
+ <i className="material-icons">{isOpen ? 'keyboard_arrow_right' : 'keyboard_arrow_left'}</i>
77
+ </div>
62
78
  <div className="sidebar__content">
63
79
  <div className="sidebar__status">
64
80
  {formattedCreated && (
@@ -82,6 +98,11 @@ const SideBarRelations = ({ schema, onChange, formData, entity }) => {
82
98
  <p>
83
99
  Updated: <span>{formattedUpdated}</span>
84
100
  </p>
101
+ {updatedBy && (
102
+ <p>
103
+ Updated by: <span>{updatedBy.name}</span>
104
+ </p>
105
+ )}
85
106
  </>
86
107
  )}
87
108
 
@@ -95,16 +116,26 @@ const SideBarRelations = ({ schema, onChange, formData, entity }) => {
95
116
  <VersionsList itemEntity={itemEntity} itemId={itemId} interfaces={interfaces} />
96
117
  <EntityNavLinks schema={schema} />
97
118
 
98
- {relationsComponents &&
99
- relationsComponents.map(({ id, staticData, schema: entitySchema }) => (
100
- <RelationComponent
101
- formData={formData}
102
- schema={entitySchema}
103
- key={id}
104
- staticData={staticData}
105
- onSelect={onChange}
106
- />
107
- ))}
119
+ {relationsComponents && (
120
+ <Accordion isOpen>
121
+ <Accordion.Header>
122
+ <b>Classification</b>
123
+ </Accordion.Header>
124
+ <Accordion.Content>
125
+ <Accordion.ContentDetails>
126
+ {relationsComponents.map(({ id, staticData, schema: entitySchema }) => (
127
+ <RelationComponent
128
+ formData={formData}
129
+ schema={entitySchema}
130
+ key={id}
131
+ staticData={staticData}
132
+ onSelect={onChange}
133
+ />
134
+ ))}
135
+ </Accordion.ContentDetails>
136
+ </Accordion.Content>
137
+ </Accordion>
138
+ )}
108
139
  </div>
109
140
  </div>
110
141
  );
@@ -114,11 +145,14 @@ SideBarRelations.propTypes = {
114
145
  schema: PropTypes.object.isRequired,
115
146
  onChange: PropTypes.func.isRequired,
116
147
  formData: PropTypes.object.isRequired,
117
- entity: PropTypes.object
148
+ entity: PropTypes.object,
149
+ isOpen: PropTypes.bool,
150
+ onToggle: PropTypes.func
118
151
  };
119
-
120
152
  SideBarRelations.defaultProps = {
121
- entity: {}
153
+ entity: {},
154
+ isOpen: true,
155
+ onToggle: () => {}
122
156
  };
123
157
 
124
158
  export default SideBarRelations;
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import InfoBoxValue from '../../../../InfoBoxes/presentational/InfoBoxValue';
4
4
  import InfoBoxLabel from '../../../../InfoBoxes/presentational/InfoBoxLabel';
5
+ import InfoBoxTooltip from '../../../../InfoBoxes/InfoBoxTooltip';
5
6
 
6
7
  const CustomSidebarInfo = ({ items, customSidebarInfoKey }) => {
7
8
  if (!items) return null;
@@ -12,10 +13,11 @@ const CustomSidebarInfo = ({ items, customSidebarInfoKey }) => {
12
13
  if (!info.label || !info.value) return null;
13
14
 
14
15
  return (
15
- <p>
16
+ <p key={`${customSidebarInfoKey}-${info.label.toLowerCase()}`}>
16
17
  <InfoBoxLabel item={info} />
17
18
  <span>
18
19
  <InfoBoxValue item={info} />
20
+ <InfoBoxTooltip info={info} position="left" />
19
21
  </span>
20
22
  </p>
21
23
  );
@@ -30,9 +32,9 @@ const CustomSidebarInfo = ({ items, customSidebarInfoKey }) => {
30
32
  );
31
33
  };
32
34
 
33
- export default CustomSidebarInfo;
34
-
35
35
  CustomSidebarInfo.propTypes = {
36
36
  customSidebarInfoKey: PropTypes.string.isRequired,
37
37
  items: PropTypes.array.isRequired
38
38
  };
39
+
40
+ export default CustomSidebarInfo;
@@ -1,5 +1,10 @@
1
1
  import has from 'lodash.has';
2
- import { ENTITY_PUBLISHED, KEY_TO_CHECK, SELECT_DEFAULT_VALUE } from '../../../constants';
2
+ import {
3
+ DEBUG_PARAM,
4
+ ENTITY_PUBLISHED,
5
+ KEY_TO_CHECK,
6
+ SELECT_DEFAULT_VALUE
7
+ } from '../../../constants';
3
8
 
4
9
  function canViewPage(formData, entity, schema, entityIsPublished) {
5
10
  return (
@@ -28,7 +33,13 @@ function validateSideBarRelations(updatedFormValues, requiredChildField) {
28
33
 
29
34
  async function onViewUrlClick(getFullUrl) {
30
35
  const fullUrl = await getFullUrl();
31
- if (fullUrl) window.open(fullUrl, '_blank');
36
+ if (fullUrl) {
37
+ const delimiter = fullUrl.includes('?') ? '&' : '?';
38
+ const debugParam = process.env.BLAZE_DISABLE_URL_DEBUG_PARAM
39
+ ? ''
40
+ : `${delimiter}${DEBUG_PARAM}`;
41
+ window.open(`${fullUrl}${debugParam}`, '_blank');
42
+ }
32
43
  }
33
44
 
34
45
  function getUpdatedFormValues({ id, value, requiredChildField, formValues }) {
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import Tooltip from '@blaze-react/tooltip';
4
+
5
+ const InfoBoxTooltip = ({ info, ...tooltipProps }) => {
6
+ const { tooltipContent, tooltipIcon } = info;
7
+ if (!tooltipContent) return null;
8
+
9
+ const renderTooltipIcon = icon => {
10
+ if (!icon) return null;
11
+ return <i className={`${icon} info-box--icon`} />;
12
+ };
13
+
14
+ return (
15
+ <Tooltip
16
+ tooltipContent={tooltipContent}
17
+ trigger="click"
18
+ className="info-box--tooltip"
19
+ {...tooltipProps}>
20
+ {renderTooltipIcon(tooltipIcon)}
21
+ </Tooltip>
22
+ );
23
+ };
24
+
25
+ InfoBoxTooltip.propTypes = {
26
+ info: PropTypes.shape({
27
+ tooltipContent: PropTypes.node,
28
+ tooltipIcon: PropTypes.string
29
+ }).isRequired
30
+ };
31
+
32
+ export default InfoBoxTooltip;
@@ -17,6 +17,8 @@ export default function buildDynamicQuery({ id, schema, properties }) {
17
17
  value
18
18
  showLabel
19
19
  url
20
+ tooltipIcon
21
+ tooltipContent
20
22
  }`
21
23
  );
22
24
 
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import InfoBoxValue from './InfoBoxValue';
4
4
  import InfoBoxLabel from './InfoBoxLabel';
5
+ import InfoBoxTooltip from '../InfoBoxTooltip';
5
6
 
6
7
  const InfoBox = ({ items, infoBoxKey }) => {
7
8
  if (!items) return null;
@@ -18,6 +19,7 @@ const InfoBox = ({ items, infoBoxKey }) => {
18
19
  </div>
19
20
  <div className="info-box--value">
20
21
  <InfoBoxValue item={info} />
22
+ <InfoBoxTooltip info={info} />
21
23
  </div>
22
24
  </div>
23
25
  );
@@ -32,9 +34,9 @@ const InfoBox = ({ items, infoBoxKey }) => {
32
34
  );
33
35
  };
34
36
 
35
- export default InfoBox;
36
-
37
37
  InfoBox.propTypes = {
38
38
  infoBoxKey: PropTypes.string.isRequired,
39
39
  items: PropTypes.array.isRequired
40
40
  };
41
+
42
+ export default InfoBox;
@@ -1,12 +1,12 @@
1
1
  import React, { useEffect, useState, Fragment } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import More from '@blaze-react/more';
4
3
  import { useApolloClient } from '@apollo/client';
5
4
  import { withRouter, Link, useLocation } from 'react-router-dom';
6
5
  import { PageHeader, DeleteAction, CardPrompt } from '@blaze-cms/admin';
7
6
  import { useToasts } from '@blaze-react/toaster';
8
7
  import { RenderHook } from '@blaze-cms/plugin-render-hooks-ui';
9
8
  import ListingTableContent from './ListingTableContent';
9
+ import SearchFilter from './SearchFilter/SearchFilter';
10
10
  import availableActions from '../EntityManager/Entity/actions-handlers';
11
11
  import { fetchData } from './service';
12
12
  import { populateRows, formatRows, getParsedRowData } from './mappers/populate-rows';
@@ -38,7 +38,7 @@ const ListingTable = ({ match, entitySchema, history }) => {
38
38
  ...queryParams,
39
39
  offset: currentPage * queryParamsDefault.limit - queryParamsDefault.limit
40
40
  };
41
- await doQuery(listFilters, updatedQueryParams);
41
+ await doQuery([], updatedQueryParams);
42
42
  setPreviousSchema({ id: entitySchema.id });
43
43
  }
44
44
  })();
@@ -169,22 +169,9 @@ const ListingTable = ({ match, entitySchema, history }) => {
169
169
  )}
170
170
  <PageHeader title={entitySchema.displayName} subtitle="">
171
171
  {createAction.active && !showAddButton && (
172
- <>
173
- <Link
174
- data-testid="addEntity"
175
- className="button button--small"
176
- to={`${match.url}/create`}>
177
- Add
178
- </Link>
179
- <PageHeader.Actions>
180
- <More>
181
- <More.Avatar isMoreMenu>
182
- <span className="material-icons">more_vert</span>
183
- </More.Avatar>
184
- <More.Content isMoreMenu />
185
- </More>
186
- </PageHeader.Actions>
187
- </>
172
+ <Link data-testid="addEntity" className="button button--small" to={`${match.url}/create`}>
173
+ Add
174
+ </Link>
188
175
  )}
189
176
  </PageHeader>
190
177
  {showAddButton ? (
@@ -204,6 +191,11 @@ const ListingTable = ({ match, entitySchema, history }) => {
204
191
  listFilters={listFilters}
205
192
  setListFilters={updateListingFilters}
206
193
  />
194
+ <SearchFilter
195
+ schema={entitySchema}
196
+ listFilters={listFilters}
197
+ setListFilters={updateListingFilters}
198
+ />
207
199
  <ListingTableContent
208
200
  totalItems={totalItems}
209
201
  currentPage={currentPage}
@@ -211,6 +203,9 @@ const ListingTable = ({ match, entitySchema, history }) => {
211
203
  handleOnPageChange={handleOnPageChange}
212
204
  tableData={tableData}
213
205
  onCloseCardPrompt={onCloseCardPrompt}
206
+ schema={entitySchema}
207
+ listFilters={listFilters}
208
+ setListFilters={updateListingFilters}
214
209
  />
215
210
  </>
216
211
  )}