@blaze-cms/plugin-data-ui 0.146.0-translations.6 → 0.147.0-rc-eagle.2

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 (273) hide show
  1. package/README.md +57 -0
  2. package/lib/components/EntityDataListing/EntityDataListing.js +21 -19
  3. package/lib/components/EntityDataListing/EntityDataListing.js.map +1 -1
  4. package/lib/components/EntityDataListing/index.js +2 -3
  5. package/lib/components/EntityDataListing/index.js.map +1 -1
  6. package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js +18 -19
  7. package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -1
  8. package/lib/components/EntityManager/Entity/EntitiyNavLinks/index.js +2 -3
  9. package/lib/components/EntityManager/Entity/EntitiyNavLinks/index.js.map +1 -1
  10. package/lib/components/EntityManager/Entity/Entity.js +289 -452
  11. package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
  12. package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js +62 -66
  13. package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  14. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +34 -50
  15. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  16. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js +2 -3
  17. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
  18. package/lib/components/EntityManager/Entity/EntityHeader/index.js +2 -3
  19. package/lib/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
  20. package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js +20 -26
  21. package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js.map +1 -1
  22. package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +20 -17
  23. package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
  24. package/lib/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js +34 -32
  25. package/lib/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -1
  26. package/lib/components/EntityManager/Entity/SideBarRelations/index.js +104 -150
  27. package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  28. package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +24 -24
  29. package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
  30. package/lib/components/EntityManager/Entity/actions-handlers/create/index.js +2 -3
  31. package/lib/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
  32. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js +42 -56
  33. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  34. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js +29 -45
  35. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
  36. package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js +2 -3
  37. package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
  38. package/lib/components/EntityManager/Entity/actions-handlers/index.js +7 -8
  39. package/lib/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
  40. package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js +2 -3
  41. package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
  42. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js +36 -57
  43. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  44. package/lib/components/EntityManager/Entity/actions-handlers/update/index.js +2 -3
  45. package/lib/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
  46. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js +47 -66
  47. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
  48. package/lib/components/EntityManager/Entity/index.js +2 -3
  49. package/lib/components/EntityManager/Entity/index.js.map +1 -1
  50. package/lib/components/EntityManager/EntityManager.js +91 -166
  51. package/lib/components/EntityManager/EntityManager.js.map +1 -1
  52. package/lib/components/EntityManager/index.js +2 -3
  53. package/lib/components/EntityManager/index.js.map +1 -1
  54. package/lib/components/EntityManager/utils/RecordEditContext/index.js +3 -4
  55. package/lib/components/EntityManager/utils/RecordEditContext/index.js.map +1 -1
  56. package/lib/components/EntityManager/utils/data-mappers.js +34 -46
  57. package/lib/components/EntityManager/utils/data-mappers.js.map +1 -1
  58. package/lib/components/EntityManager/utils/entity.js +35 -73
  59. package/lib/components/EntityManager/utils/entity.js.map +1 -1
  60. package/lib/components/EntityManager/utils/entityAvailableActions.js +51 -110
  61. package/lib/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
  62. package/lib/components/EntityManager/utils/is-form-empty.js +6 -10
  63. package/lib/components/EntityManager/utils/is-form-empty.js.map +1 -1
  64. package/lib/components/EntityManager/utils/query.js +17 -10
  65. package/lib/components/EntityManager/utils/query.js.map +1 -1
  66. package/lib/components/InfoBoxes/InfoBoxTooltip.js +43 -0
  67. package/lib/components/InfoBoxes/InfoBoxTooltip.js.map +1 -0
  68. package/lib/components/InfoBoxes/InfoBoxes.js +19 -19
  69. package/lib/components/InfoBoxes/InfoBoxes.js.map +1 -1
  70. package/lib/components/InfoBoxes/container/InfoBoxContainer.js +26 -38
  71. package/lib/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -1
  72. package/lib/components/InfoBoxes/helpers/build-dynamic-query.js +21 -16
  73. package/lib/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
  74. package/lib/components/InfoBoxes/hooks/useData.js +33 -30
  75. package/lib/components/InfoBoxes/hooks/useData.js.map +1 -1
  76. package/lib/components/InfoBoxes/hooks/useInfoBox.js +10 -10
  77. package/lib/components/InfoBoxes/hooks/useInfoBox.js.map +1 -1
  78. package/lib/components/InfoBoxes/index.js +2 -3
  79. package/lib/components/InfoBoxes/index.js.map +1 -1
  80. package/lib/components/InfoBoxes/presentational/InfoBox.js +28 -32
  81. package/lib/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
  82. package/lib/components/InfoBoxes/presentational/InfoBoxLabel.js +11 -12
  83. package/lib/components/InfoBoxes/presentational/InfoBoxLabel.js.map +1 -1
  84. package/lib/components/InfoBoxes/presentational/InfoBoxValue.js +12 -12
  85. package/lib/components/InfoBoxes/presentational/InfoBoxValue.js.map +1 -1
  86. package/lib/components/ListingTable/ListingTable.js +163 -303
  87. package/lib/components/ListingTable/ListingTable.js.map +1 -1
  88. package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js +61 -40
  89. package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  90. package/lib/components/ListingTable/ListingTableContent/index.js +2 -3
  91. package/lib/components/ListingTable/ListingTableContent/index.js.map +1 -1
  92. package/lib/components/ListingTable/SearchFilter/SearchContainer.js +215 -0
  93. package/lib/components/ListingTable/SearchFilter/SearchContainer.js.map +1 -0
  94. package/lib/components/ListingTable/SearchFilter/SearchFilter.js +48 -0
  95. package/lib/components/ListingTable/SearchFilter/SearchFilter.js.map +1 -0
  96. package/lib/components/ListingTable/SearchFilter/helpers.js +105 -0
  97. package/lib/components/ListingTable/SearchFilter/helpers.js.map +1 -0
  98. package/lib/components/ListingTable/SearchFilter/querys.js +13 -0
  99. package/lib/components/ListingTable/SearchFilter/querys.js.map +1 -0
  100. package/lib/components/ListingTable/TableActions/TableActions.js +27 -31
  101. package/lib/components/ListingTable/TableActions/TableActions.js.map +1 -1
  102. package/lib/components/ListingTable/TableActions/index.js +2 -3
  103. package/lib/components/ListingTable/TableActions/index.js.map +1 -1
  104. package/lib/components/ListingTable/index.js +2 -3
  105. package/lib/components/ListingTable/index.js.map +1 -1
  106. package/lib/components/ListingTable/mappers/populate-rows.js +104 -120
  107. package/lib/components/ListingTable/mappers/populate-rows.js.map +1 -1
  108. package/lib/components/ListingTable/service/index.js +66 -83
  109. package/lib/components/ListingTable/service/index.js.map +1 -1
  110. package/lib/components/Tabs/index.js +26 -42
  111. package/lib/components/Tabs/index.js.map +1 -1
  112. package/lib/components/hooks/useCallbackDebounce.js +5 -9
  113. package/lib/components/hooks/useCallbackDebounce.js.map +1 -1
  114. package/lib/constants.js +31 -29
  115. package/lib/constants.js.map +1 -1
  116. package/lib/icons/ContentIcon.js +17 -20
  117. package/lib/icons/ContentIcon.js.map +1 -1
  118. package/lib/icons/SettingsIcon.js +12 -15
  119. package/lib/icons/SettingsIcon.js.map +1 -1
  120. package/lib/icons/TaxonomyIcon.js +15 -18
  121. package/lib/icons/TaxonomyIcon.js.map +1 -1
  122. package/lib/icons/UsersIcon.js +11 -14
  123. package/lib/icons/UsersIcon.js.map +1 -1
  124. package/lib/icons/index.js +8 -9
  125. package/lib/icons/index.js.map +1 -1
  126. package/lib/index.js +81 -121
  127. package/lib/index.js.map +1 -1
  128. package/lib/utils/add-content-menu-items.js +67 -93
  129. package/lib/utils/add-content-menu-items.js.map +1 -1
  130. package/lib/utils/build-create-entity-mutation.js +12 -9
  131. package/lib/utils/build-create-entity-mutation.js.map +1 -1
  132. package/lib/utils/build-delete-entity-mutation.js +11 -8
  133. package/lib/utils/build-delete-entity-mutation.js.map +1 -1
  134. package/lib/utils/build-listing-query.js +20 -17
  135. package/lib/utils/build-listing-query.js.map +1 -1
  136. package/lib/utils/build-update-data-query.js +15 -9
  137. package/lib/utils/build-update-data-query.js.map +1 -1
  138. package/lib/utils/build-update-publish-unpublish-mutation.js +15 -8
  139. package/lib/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  140. package/lib/utils/get-default-query-params.js +7 -6
  141. package/lib/utils/get-default-query-params.js.map +1 -1
  142. package/lib/utils/hoc/withContext.js +4 -6
  143. package/lib/utils/hoc/withContext.js.map +1 -1
  144. package/lib/utils/hooks/useToggle.js +4 -12
  145. package/lib/utils/hooks/useToggle.js.map +1 -1
  146. package/lib/utils/index.js +2 -3
  147. package/lib/utils/index.js.map +1 -1
  148. package/lib-es/components/EntityDataListing/EntityDataListing.js.map +1 -1
  149. package/lib-es/components/EntityDataListing/index.js.map +1 -1
  150. package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -1
  151. package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/index.js.map +1 -1
  152. package/lib-es/components/EntityManager/Entity/Entity.js +21 -28
  153. package/lib-es/components/EntityManager/Entity/Entity.js.map +1 -1
  154. package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  155. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +6 -1
  156. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  157. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
  158. package/lib-es/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
  159. package/lib-es/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js.map +1 -1
  160. package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +2 -0
  161. package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
  162. package/lib-es/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -1
  163. package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js +26 -7
  164. package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  165. package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +8 -2
  166. package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
  167. package/lib-es/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
  168. package/lib-es/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  169. package/lib-es/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
  170. package/lib-es/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
  171. package/lib-es/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
  172. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
  173. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  174. package/lib-es/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
  175. package/lib-es/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
  176. package/lib-es/components/EntityManager/Entity/index.js.map +1 -1
  177. package/lib-es/components/EntityManager/EntityManager.js.map +1 -1
  178. package/lib-es/components/EntityManager/index.js.map +1 -1
  179. package/lib-es/components/EntityManager/utils/RecordEditContext/index.js.map +1 -1
  180. package/lib-es/components/EntityManager/utils/data-mappers.js.map +1 -1
  181. package/lib-es/components/EntityManager/utils/entity.js +6 -2
  182. package/lib-es/components/EntityManager/utils/entity.js.map +1 -1
  183. package/lib-es/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
  184. package/lib-es/components/EntityManager/utils/is-form-empty.js.map +1 -1
  185. package/lib-es/components/EntityManager/utils/query.js.map +1 -1
  186. package/lib-es/components/InfoBoxes/InfoBoxTooltip.js +36 -0
  187. package/lib-es/components/InfoBoxes/InfoBoxTooltip.js.map +1 -0
  188. package/lib-es/components/InfoBoxes/InfoBoxes.js.map +1 -1
  189. package/lib-es/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -1
  190. package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js +2 -0
  191. package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
  192. package/lib-es/components/InfoBoxes/hooks/useData.js.map +1 -1
  193. package/lib-es/components/InfoBoxes/hooks/useInfoBox.js.map +1 -1
  194. package/lib-es/components/InfoBoxes/index.js.map +1 -1
  195. package/lib-es/components/InfoBoxes/presentational/InfoBox.js +4 -1
  196. package/lib-es/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
  197. package/lib-es/components/InfoBoxes/presentational/InfoBoxLabel.js.map +1 -1
  198. package/lib-es/components/InfoBoxes/presentational/InfoBoxValue.js.map +1 -1
  199. package/lib-es/components/ListingTable/ListingTable.js +12 -11
  200. package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
  201. package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js +34 -16
  202. package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  203. package/lib-es/components/ListingTable/ListingTableContent/index.js.map +1 -1
  204. package/lib-es/components/ListingTable/SearchFilter/SearchContainer.js +207 -0
  205. package/lib-es/components/ListingTable/SearchFilter/SearchContainer.js.map +1 -0
  206. package/lib-es/components/ListingTable/SearchFilter/SearchFilter.js +40 -0
  207. package/lib-es/components/ListingTable/SearchFilter/SearchFilter.js.map +1 -0
  208. package/lib-es/components/ListingTable/SearchFilter/helpers.js +96 -0
  209. package/lib-es/components/ListingTable/SearchFilter/helpers.js.map +1 -0
  210. package/lib-es/components/ListingTable/SearchFilter/querys.js +8 -0
  211. package/lib-es/components/ListingTable/SearchFilter/querys.js.map +1 -0
  212. package/lib-es/components/ListingTable/TableActions/TableActions.js.map +1 -1
  213. package/lib-es/components/ListingTable/TableActions/index.js.map +1 -1
  214. package/lib-es/components/ListingTable/index.js.map +1 -1
  215. package/lib-es/components/ListingTable/mappers/populate-rows.js +3 -0
  216. package/lib-es/components/ListingTable/mappers/populate-rows.js.map +1 -1
  217. package/lib-es/components/ListingTable/service/index.js +3 -2
  218. package/lib-es/components/ListingTable/service/index.js.map +1 -1
  219. package/lib-es/components/Tabs/index.js +6 -7
  220. package/lib-es/components/Tabs/index.js.map +1 -1
  221. package/lib-es/components/hooks/useCallbackDebounce.js.map +1 -1
  222. package/lib-es/constants.js +4 -1
  223. package/lib-es/constants.js.map +1 -1
  224. package/lib-es/icons/ContentIcon.js.map +1 -1
  225. package/lib-es/icons/SettingsIcon.js.map +1 -1
  226. package/lib-es/icons/TaxonomyIcon.js.map +1 -1
  227. package/lib-es/icons/UsersIcon.js.map +1 -1
  228. package/lib-es/icons/index.js.map +1 -1
  229. package/lib-es/index.js +11 -3
  230. package/lib-es/index.js.map +1 -1
  231. package/lib-es/utils/add-content-menu-items.js.map +1 -1
  232. package/lib-es/utils/build-create-entity-mutation.js.map +1 -1
  233. package/lib-es/utils/build-delete-entity-mutation.js.map +1 -1
  234. package/lib-es/utils/build-listing-query.js +4 -4
  235. package/lib-es/utils/build-listing-query.js.map +1 -1
  236. package/lib-es/utils/build-update-data-query.js.map +1 -1
  237. package/lib-es/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  238. package/lib-es/utils/get-default-query-params.js.map +1 -1
  239. package/lib-es/utils/hoc/withContext.js +1 -1
  240. package/lib-es/utils/hoc/withContext.js.map +1 -1
  241. package/lib-es/utils/hooks/useToggle.js.map +1 -1
  242. package/lib-es/utils/index.js.map +1 -1
  243. package/package.json +28 -22
  244. package/src/components/EntityManager/Entity/Entity.js +72 -80
  245. package/src/components/EntityManager/Entity/EntityHeader/EntityHeader.js +1 -2
  246. package/src/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +8 -1
  247. package/src/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +2 -0
  248. package/src/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js +9 -7
  249. package/src/components/EntityManager/Entity/SideBarRelations/index.js +82 -59
  250. package/src/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +5 -3
  251. package/src/components/EntityManager/EntityManager.js +52 -45
  252. package/src/components/EntityManager/utils/entity.js +13 -2
  253. package/src/components/InfoBoxes/InfoBoxTooltip.js +32 -0
  254. package/src/components/InfoBoxes/container/InfoBoxContainer.js +3 -6
  255. package/src/components/InfoBoxes/helpers/build-dynamic-query.js +2 -0
  256. package/src/components/InfoBoxes/hooks/useData.js +6 -1
  257. package/src/components/InfoBoxes/presentational/InfoBox.js +4 -2
  258. package/src/components/ListingTable/ListingTable.js +23 -31
  259. package/src/components/ListingTable/ListingTableContent/ListingTableContent.js +43 -27
  260. package/src/components/ListingTable/SearchFilter/SearchContainer.js +228 -0
  261. package/src/components/ListingTable/SearchFilter/SearchFilter.js +38 -0
  262. package/src/components/ListingTable/SearchFilter/helpers.js +99 -0
  263. package/src/components/ListingTable/SearchFilter/querys.js +9 -0
  264. package/src/components/ListingTable/mappers/populate-rows.js +3 -0
  265. package/src/components/ListingTable/service/index.js +3 -4
  266. package/src/components/Tabs/index.js +17 -21
  267. package/src/constants.js +9 -1
  268. package/src/index.js +9 -7
  269. package/src/utils/build-listing-query.js +4 -4
  270. package/src/utils/hoc/withContext.js +5 -4
  271. package/CHANGELOG.md +0 -1939
  272. package/babel.config.js +0 -3
  273. package/jest.config.js +0 -5
@@ -1,11 +1,10 @@
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
- exports["default"] = void 0;
7
+ exports.default = void 0;
9
8
  var _EntityHeader = _interopRequireDefault(require("./EntityHeader"));
10
- var _default = exports["default"] = _EntityHeader["default"];
9
+ var _default = exports.default = _EntityHeader.default;
11
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_EntityHeader","_interopRequireDefault","require","_default","exports","EntityHeader"],"sources":["../../../../../src/components/EntityManager/Entity/EntityHeader/index.js"],"sourcesContent":["import EntityHeader from './EntityHeader';\n\nexport default EntityHeader;\n"],"mappings":";;;;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0C,IAAAC,QAAA,GAAAC,OAAA,cAE3BC,wBAAY"}
1
+ {"version":3,"file":"index.js","names":["_EntityHeader","_interopRequireDefault","require","_default","exports","default","EntityHeader"],"sources":["../../../../../src/components/EntityManager/Entity/EntityHeader/index.js"],"sourcesContent":["import EntityHeader from './EntityHeader';\n\nexport default EntityHeader;\n"],"mappings":";;;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0C,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE3BC,qBAAY","ignoreList":[]}
@@ -1,43 +1,37 @@
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
- exports["default"] = void 0;
9
- require("core-js/modules/es.object.keys.js");
10
- require("core-js/modules/es.array.flat-map.js");
11
- require("core-js/modules/es.array.unscopables.flat-map.js");
12
- require("core-js/modules/es.object.to-string.js");
13
- require("core-js/modules/es.object.values.js");
7
+ exports.default = void 0;
14
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
15
9
  var _react = _interopRequireDefault(require("react"));
16
- var _useCustomSidebarData2 = _interopRequireDefault(require("../hooks/useCustomSidebarData"));
10
+ var _useCustomSidebarData = _interopRequireDefault(require("../hooks/useCustomSidebarData"));
17
11
  var _CustomSidebarInfo = _interopRequireDefault(require("../presentational/CustomSidebarInfo"));
18
- var CustomSibebarInfoContainer = function CustomSibebarInfoContainer(_ref) {
19
- var id = _ref.id,
20
- schema = _ref.schema,
21
- displayProperties = _ref.displayProperties;
22
- var _useCustomSidebarData = (0, _useCustomSidebarData2["default"])({
23
- id: id,
24
- schema: schema,
25
- displayProperties: displayProperties
26
- }),
27
- data = _useCustomSidebarData.data;
28
- if (!data || !Object.keys(data) || Object.keys(data).length === 0) return null;
29
- var items = Object.values(data).flatMap(function (item) {
30
- return Object.values(item);
12
+ const CustomSibebarInfoContainer = ({
13
+ id,
14
+ schema,
15
+ displayProperties
16
+ }) => {
17
+ const {
18
+ data
19
+ } = (0, _useCustomSidebarData.default)({
20
+ id,
21
+ schema,
22
+ displayProperties
31
23
  });
32
- return /*#__PURE__*/_react["default"].createElement(_CustomSidebarInfo["default"], {
24
+ if (!data || !Object.keys(data) || Object.keys(data).length === 0) return null;
25
+ const items = Object.values(data).flatMap(item => Object.values(item));
26
+ return /*#__PURE__*/_react.default.createElement(_CustomSidebarInfo.default, {
33
27
  items: items,
34
28
  customSidebarInfoKey: displayProperties.key
35
29
  });
36
30
  };
37
- var _default = exports["default"] = CustomSibebarInfoContainer;
31
+ var _default = exports.default = CustomSibebarInfoContainer;
38
32
  CustomSibebarInfoContainer.propTypes = {
39
- id: _propTypes["default"].string.isRequired,
40
- displayProperties: _propTypes["default"].object.isRequired,
41
- schema: _propTypes["default"].object.isRequired
33
+ id: _propTypes.default.string.isRequired,
34
+ displayProperties: _propTypes.default.object.isRequired,
35
+ schema: _propTypes.default.object.isRequired
42
36
  };
43
37
  //# sourceMappingURL=CustomSidebarInfoContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CustomSidebarInfoContainer.js","names":["_propTypes","_interopRequireDefault","require","_react","_useCustomSidebarData2","_CustomSidebarInfo","CustomSibebarInfoContainer","_ref","id","schema","displayProperties","_useCustomSidebarData","useCustomSidebarData","data","Object","keys","length","items","values","flatMap","item","createElement","customSidebarInfoKey","key","_default","exports","propTypes","PropTypes","string","isRequired","object"],"sources":["../../../../../../src/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport useCustomSidebarData from '../hooks/useCustomSidebarData';\nimport CustomSidebarInfo from '../presentational/CustomSidebarInfo';\n\nconst CustomSibebarInfoContainer = ({ id, schema, displayProperties }) => {\n const { data } = useCustomSidebarData({ id, schema, displayProperties });\n\n if (!data || !Object.keys(data) || Object.keys(data).length === 0) return null;\n\n const items = Object.values(data).flatMap(item => Object.values(item));\n\n return <CustomSidebarInfo items={items} customSidebarInfoKey={displayProperties.key} />;\n};\n\nexport default CustomSibebarInfoContainer;\n\nCustomSibebarInfoContainer.propTypes = {\n id: PropTypes.string.isRequired,\n displayProperties: PropTypes.object.isRequired,\n schema: PropTypes.object.isRequired\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,sBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,kBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAMI,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAAAC,IAAA,EAA0C;EAAA,IAApCC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,iBAAiB,GAAAH,IAAA,CAAjBG,iBAAiB;EACjE,IAAAC,qBAAA,GAAiB,IAAAC,iCAAoB,EAAC;MAAEJ,EAAE,EAAFA,EAAE;MAAEC,MAAM,EAANA,MAAM;MAAEC,iBAAiB,EAAjBA;IAAkB,CAAC,CAAC;IAAhEG,IAAI,GAAAF,qBAAA,CAAJE,IAAI;EAEZ,IAAI,CAACA,IAAI,IAAI,CAACC,MAAM,CAACC,IAAI,CAACF,IAAI,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACF,IAAI,CAAC,CAACG,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;EAE9E,IAAMC,KAAK,GAAGH,MAAM,CAACI,MAAM,CAACL,IAAI,CAAC,CAACM,OAAO,CAAC,UAAAC,IAAI;IAAA,OAAIN,MAAM,CAACI,MAAM,CAACE,IAAI,CAAC;EAAA,EAAC;EAEtE,oBAAOjB,MAAA,YAAAkB,aAAA,CAAChB,kBAAA,WAAiB;IAACY,KAAK,EAAEA,KAAM;IAACK,oBAAoB,EAAEZ,iBAAiB,CAACa;EAAI,CAAE,CAAC;AACzF,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEanB,0BAA0B;AAEzCA,0BAA0B,CAACoB,SAAS,GAAG;EACrClB,EAAE,EAAEmB,qBAAS,CAACC,MAAM,CAACC,UAAU;EAC/BnB,iBAAiB,EAAEiB,qBAAS,CAACG,MAAM,CAACD,UAAU;EAC9CpB,MAAM,EAAEkB,qBAAS,CAACG,MAAM,CAACD;AAC3B,CAAC"}
1
+ {"version":3,"file":"CustomSidebarInfoContainer.js","names":["_propTypes","_interopRequireDefault","require","_react","_useCustomSidebarData","_CustomSidebarInfo","CustomSibebarInfoContainer","id","schema","displayProperties","data","useCustomSidebarData","Object","keys","length","items","values","flatMap","item","default","createElement","customSidebarInfoKey","key","_default","exports","propTypes","PropTypes","string","isRequired","object"],"sources":["../../../../../../src/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport useCustomSidebarData from '../hooks/useCustomSidebarData';\nimport CustomSidebarInfo from '../presentational/CustomSidebarInfo';\n\nconst CustomSibebarInfoContainer = ({ id, schema, displayProperties }) => {\n const { data } = useCustomSidebarData({ id, schema, displayProperties });\n\n if (!data || !Object.keys(data) || Object.keys(data).length === 0) return null;\n\n const items = Object.values(data).flatMap(item => Object.values(item));\n\n return <CustomSidebarInfo items={items} customSidebarInfoKey={displayProperties.key} />;\n};\n\nexport default CustomSibebarInfoContainer;\n\nCustomSibebarInfoContainer.propTypes = {\n id: PropTypes.string.isRequired,\n displayProperties: PropTypes.object.isRequired,\n schema: PropTypes.object.isRequired\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,qBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,kBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,MAAMI,0BAA0B,GAAGA,CAAC;EAAEC,EAAE;EAAEC,MAAM;EAAEC;AAAkB,CAAC,KAAK;EACxE,MAAM;IAAEC;EAAK,CAAC,GAAG,IAAAC,6BAAoB,EAAC;IAAEJ,EAAE;IAAEC,MAAM;IAAEC;EAAkB,CAAC,CAAC;EAExE,IAAI,CAACC,IAAI,IAAI,CAACE,MAAM,CAACC,IAAI,CAACH,IAAI,CAAC,IAAIE,MAAM,CAACC,IAAI,CAACH,IAAI,CAAC,CAACI,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;EAE9E,MAAMC,KAAK,GAAGH,MAAM,CAACI,MAAM,CAACN,IAAI,CAAC,CAACO,OAAO,CAACC,IAAI,IAAIN,MAAM,CAACI,MAAM,CAACE,IAAI,CAAC,CAAC;EAEtE,oBAAOf,MAAA,CAAAgB,OAAA,CAAAC,aAAA,CAACf,kBAAA,CAAAc,OAAiB;IAACJ,KAAK,EAAEA,KAAM;IAACM,oBAAoB,EAAEZ,iBAAiB,CAACa;EAAI,CAAE,CAAC;AACzF,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAL,OAAA,GAEab,0BAA0B;AAEzCA,0BAA0B,CAACmB,SAAS,GAAG;EACrClB,EAAE,EAAEmB,kBAAS,CAACC,MAAM,CAACC,UAAU;EAC/BnB,iBAAiB,EAAEiB,kBAAS,CAACG,MAAM,CAACD,UAAU;EAC9CpB,MAAM,EAAEkB,kBAAS,CAACG,MAAM,CAACD;AAC3B,CAAC","ignoreList":[]}
@@ -1,31 +1,34 @@
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"] = buildDynamicQuery;
9
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
10
- require("core-js/modules/es.array.is-array.js");
11
- require("core-js/modules/es.array.map.js");
6
+ exports.default = buildDynamicQuery;
12
7
  var _client = require("@apollo/client");
13
8
  var _coreErrors = require("@blaze-cms/core-errors");
14
- var _templateObject;
15
- function buildDynamicQuery(_ref) {
16
- var id = _ref.id,
17
- schema = _ref.schema,
18
- displayProperties = _ref.displayProperties;
9
+ function buildDynamicQuery({
10
+ id,
11
+ schema,
12
+ displayProperties
13
+ }) {
19
14
  if (!schema || !schema.actions || !schema.actions.get || !schema.properties) {
20
15
  throw new _coreErrors.BlazeError('DataEntity query requires get action, properties and fields from entity schema');
21
16
  }
22
17
  if (displayProperties.adminMainInfoProperty && Array.isArray(displayProperties.adminMainInfoProperty)) {
23
- var fields = displayProperties.adminMainInfoProperty.map(function (infoProperty) {
24
- return "".concat(infoProperty, " {\n label\n value\n showLabel\n }");
25
- });
26
- return (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["query getInfoBoxData($id: String!){\n ", "( id: $id ) {\n id\n ", "\n __typename\n }\n }"])), schema.actions.get, fields.map(function (field) {
27
- return field;
28
- }));
18
+ const fields = displayProperties.adminMainInfoProperty.map(infoProperty => `${infoProperty} {
19
+ label
20
+ value
21
+ showLabel
22
+ tooltipIcon
23
+ tooltipContent
24
+ }`);
25
+ return (0, _client.gql)`query getInfoBoxData($id: String!){
26
+ ${schema.actions.get}( id: $id ) {
27
+ id
28
+ ${fields.map(field => field)}
29
+ __typename
30
+ }
31
+ }`;
29
32
  }
30
33
  return null;
31
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"build-dynamic-query.js","names":["_client","require","_coreErrors","_templateObject","buildDynamicQuery","_ref","id","schema","displayProperties","actions","get","properties","BlazeError","adminMainInfoProperty","Array","isArray","fields","map","infoProperty","concat","gql","_taggedTemplateLiteral2","field"],"sources":["../../../../../../src/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\n\nexport default function buildDynamicQuery({ id, schema, displayProperties }) {\n if (!schema || !schema.actions || !schema.actions.get || !schema.properties) {\n throw new BlazeError(\n 'DataEntity query requires get action, properties and fields from entity schema'\n );\n }\n\n if (\n displayProperties.adminMainInfoProperty &&\n Array.isArray(displayProperties.adminMainInfoProperty)\n ) {\n const fields = displayProperties.adminMainInfoProperty.map(\n infoProperty =>\n `${infoProperty} {\n label\n value\n showLabel\n }`\n );\n\n return gql`query getInfoBoxData($id: String!){\n ${schema.actions.get}( id: $id ) {\n id\n ${fields.map(field => field)}\n __typename\n }\n }`;\n }\n\n return null;\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAoD,IAAAE,eAAA;AAErC,SAASC,iBAAiBA,CAAAC,IAAA,EAAoC;EAAA,IAAjCC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,iBAAiB,GAAAH,IAAA,CAAjBG,iBAAiB;EACvE,IAAI,CAACD,MAAM,IAAI,CAACA,MAAM,CAACE,OAAO,IAAI,CAACF,MAAM,CAACE,OAAO,CAACC,GAAG,IAAI,CAACH,MAAM,CAACI,UAAU,EAAE;IAC3E,MAAM,IAAIC,sBAAU,CAClB,gFACF,CAAC;EACH;EAEA,IACEJ,iBAAiB,CAACK,qBAAqB,IACvCC,KAAK,CAACC,OAAO,CAACP,iBAAiB,CAACK,qBAAqB,CAAC,EACtD;IACA,IAAMG,MAAM,GAAGR,iBAAiB,CAACK,qBAAqB,CAACI,GAAG,CACxD,UAAAC,YAAY;MAAA,UAAAC,MAAA,CACPD,YAAY;IAAA,CAKnB,CAAC;IAED,WAAOE,WAAG,EAAAjB,eAAA,KAAAA,eAAA,OAAAkB,uBAAA,6IACNd,MAAM,CAACE,OAAO,CAACC,GAAG,EAEjBM,MAAM,CAACC,GAAG,CAAC,UAAAK,KAAK;MAAA,OAAIA,KAAK;IAAA,EAAC;EAIjC;EAEA,OAAO,IAAI;AACb"}
1
+ {"version":3,"file":"build-dynamic-query.js","names":["_client","require","_coreErrors","buildDynamicQuery","id","schema","displayProperties","actions","get","properties","BlazeError","adminMainInfoProperty","Array","isArray","fields","map","infoProperty","gql","field"],"sources":["../../../../../../src/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\n\nexport default function buildDynamicQuery({ id, schema, displayProperties }) {\n if (!schema || !schema.actions || !schema.actions.get || !schema.properties) {\n throw new BlazeError(\n 'DataEntity query requires get action, properties and fields from entity schema'\n );\n }\n\n if (\n displayProperties.adminMainInfoProperty &&\n Array.isArray(displayProperties.adminMainInfoProperty)\n ) {\n const fields = displayProperties.adminMainInfoProperty.map(\n infoProperty =>\n `${infoProperty} {\n label\n value\n showLabel\n tooltipIcon\n tooltipContent\n }`\n );\n\n return gql`query getInfoBoxData($id: String!){\n ${schema.actions.get}( id: $id ) {\n id\n ${fields.map(field => field)}\n __typename\n }\n }`;\n }\n\n return null;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEe,SAASE,iBAAiBA,CAAC;EAAEC,EAAE;EAAEC,MAAM;EAAEC;AAAkB,CAAC,EAAE;EAC3E,IAAI,CAACD,MAAM,IAAI,CAACA,MAAM,CAACE,OAAO,IAAI,CAACF,MAAM,CAACE,OAAO,CAACC,GAAG,IAAI,CAACH,MAAM,CAACI,UAAU,EAAE;IAC3E,MAAM,IAAIC,sBAAU,CAClB,gFACF,CAAC;EACH;EAEA,IACEJ,iBAAiB,CAACK,qBAAqB,IACvCC,KAAK,CAACC,OAAO,CAACP,iBAAiB,CAACK,qBAAqB,CAAC,EACtD;IACA,MAAMG,MAAM,GAAGR,iBAAiB,CAACK,qBAAqB,CAACI,GAAG,CACxDC,YAAY,IACV,GAAGA,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA,QACI,CAAC;IAED,OAAO,IAAAC,WAAG;AACd,QAAQZ,MAAM,CAACE,OAAO,CAACC,GAAG;AAC1B;AACA,SAASM,MAAM,CAACC,GAAG,CAACG,KAAK,IAAIA,KAAK,CAAC;AACnC;AACA;AACA,MAAM;EACJ;EAEA,OAAO,IAAI;AACb","ignoreList":[]}
@@ -1,54 +1,56 @@
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
- exports["default"] = void 0;
9
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
10
- require("core-js/modules/es.array.is-array.js");
7
+ exports.default = void 0;
11
8
  var _react = require("react");
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
10
  var _client = require("@apollo/client");
14
11
  var _buildDynamicQuery = _interopRequireDefault(require("../../../../InfoBoxes/helpers/build-dynamic-query"));
15
12
  var _RecordEditContext = require("../../../utils/RecordEditContext");
16
- var _templateObject;
17
- var useCustomSidebarData = function useCustomSidebarData(_ref) {
18
- var id = _ref.id,
19
- schema = _ref.schema,
20
- displayProperties = _ref.displayProperties;
21
- var _useContext = (0, _react.useContext)(_RecordEditContext.RecordEditContext),
22
- externalUpdateTime = _useContext.externalUpdateTime,
23
- updated = _useContext.updated;
24
- var query = displayProperties.adminMainInfoProperty && Array.isArray(displayProperties.adminMainInfoProperty) ? (0, _buildDynamicQuery["default"])({
25
- id: id,
26
- schema: schema,
13
+ const useCustomSidebarData = ({
14
+ id,
15
+ schema,
16
+ displayProperties
17
+ }) => {
18
+ const {
19
+ externalUpdateTime,
20
+ updated
21
+ } = (0, _react.useContext)(_RecordEditContext.RecordEditContext);
22
+ const query = displayProperties.adminMainInfoProperty && Array.isArray(displayProperties.adminMainInfoProperty) ? (0, _buildDynamicQuery.default)({
23
+ id,
24
+ schema,
27
25
  properties: displayProperties.adminMainInfoProperty
28
26
  }) : null;
29
- var customSidebarInfoQuery = query || (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n query {\n __typename\n }\n "])));
30
- var _useQuery = (0, _client.useQuery)(customSidebarInfoQuery, {
31
- variables: {
32
- id: id
33
- },
34
- skip: !query
35
- }),
36
- _useQuery$data = _useQuery.data,
37
- data = _useQuery$data === void 0 ? {} : _useQuery$data,
38
- loading = _useQuery.loading,
39
- error = _useQuery.error,
40
- refetch = _useQuery.refetch;
41
- (0, _react.useEffect)(function () {
27
+ const customSidebarInfoQuery = query || (0, _client.gql)`
28
+ query {
29
+ __typename
30
+ }
31
+ `;
32
+ const {
33
+ data = {},
34
+ loading,
35
+ error,
36
+ refetch
37
+ } = (0, _client.useQuery)(customSidebarInfoQuery, {
38
+ variables: {
39
+ id
40
+ },
41
+ skip: !query
42
+ });
43
+ (0, _react.useEffect)(() => {
42
44
  refetch();
43
45
  }, [externalUpdateTime, updated, refetch]);
44
46
  return {
45
47
  data: data.__typename !== 'Query' ? data : null,
46
- loading: loading,
47
- error: error
48
+ loading,
49
+ error
48
50
  };
49
51
  };
50
- var _default = exports["default"] = useCustomSidebarData;
52
+ var _default = exports.default = useCustomSidebarData;
51
53
  useCustomSidebarData.propTypes = {
52
- displayProperties: _propTypes["default"].object.isRequired
54
+ displayProperties: _propTypes.default.object.isRequired
53
55
  };
54
56
  //# sourceMappingURL=useCustomSidebarData.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCustomSidebarData.js","names":["_react","require","_propTypes","_interopRequireDefault","_client","_buildDynamicQuery","_RecordEditContext","_templateObject","useCustomSidebarData","_ref","id","schema","displayProperties","_useContext","useContext","RecordEditContext","externalUpdateTime","updated","query","adminMainInfoProperty","Array","isArray","buildDynamicQuery","properties","customSidebarInfoQuery","gql","_taggedTemplateLiteral2","_useQuery","useQuery","variables","skip","_useQuery$data","data","loading","error","refetch","useEffect","__typename","_default","exports","propTypes","ProptTypes","object","isRequired"],"sources":["../../../../../../src/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js"],"sourcesContent":["import { useContext, useEffect } from 'react';\nimport ProptTypes from 'prop-types';\nimport { useQuery, gql } from '@apollo/client';\nimport buildDynamicQuery from '../../../../InfoBoxes/helpers/build-dynamic-query';\nimport { RecordEditContext } from '../../../utils/RecordEditContext';\n\nconst useCustomSidebarData = ({ id, schema, displayProperties }) => {\n const { externalUpdateTime, updated } = useContext(RecordEditContext);\n\n const query =\n displayProperties.adminMainInfoProperty &&\n Array.isArray(displayProperties.adminMainInfoProperty)\n ? buildDynamicQuery({ id, schema, properties: displayProperties.adminMainInfoProperty })\n : null;\n\n const customSidebarInfoQuery =\n query ||\n gql`\n query {\n __typename\n }\n `;\n\n const { data = {}, loading, error, refetch } = useQuery(customSidebarInfoQuery, {\n variables: { id },\n skip: !query\n });\n\n useEffect(\n () => {\n refetch();\n },\n [externalUpdateTime, updated, refetch]\n );\n\n return { data: data.__typename !== 'Query' ? data : null, loading, error };\n};\n\nexport default useCustomSidebarData;\n\nuseCustomSidebarData.propTypes = {\n displayProperties: ProptTypes.object.isRequired\n};\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AAAqE,IAAAM,eAAA;AAErE,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAAC,IAAA,EAA0C;EAAA,IAApCC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,iBAAiB,GAAAH,IAAA,CAAjBG,iBAAiB;EAC3D,IAAAC,WAAA,GAAwC,IAAAC,iBAAU,EAACC,oCAAiB,CAAC;IAA7DC,kBAAkB,GAAAH,WAAA,CAAlBG,kBAAkB;IAAEC,OAAO,GAAAJ,WAAA,CAAPI,OAAO;EAEnC,IAAMC,KAAK,GACTN,iBAAiB,CAACO,qBAAqB,IACvCC,KAAK,CAACC,OAAO,CAACT,iBAAiB,CAACO,qBAAqB,CAAC,GAClD,IAAAG,6BAAiB,EAAC;IAAEZ,EAAE,EAAFA,EAAE;IAAEC,MAAM,EAANA,MAAM;IAAEY,UAAU,EAAEX,iBAAiB,CAACO;EAAsB,CAAC,CAAC,GACtF,IAAI;EAEV,IAAMK,sBAAsB,GAC1BN,KAAK,QACLO,WAAG,EAAAlB,eAAA,KAAAA,eAAA,OAAAmB,uBAAA,sEAIF;EAEH,IAAAC,SAAA,GAA+C,IAAAC,gBAAQ,EAACJ,sBAAsB,EAAE;MAC9EK,SAAS,EAAE;QAAEnB,EAAE,EAAFA;MAAG,CAAC;MACjBoB,IAAI,EAAE,CAACZ;IACT,CAAC,CAAC;IAAAa,cAAA,GAAAJ,SAAA,CAHMK,IAAI;IAAJA,IAAI,GAAAD,cAAA,cAAG,CAAC,CAAC,GAAAA,cAAA;IAAEE,OAAO,GAAAN,SAAA,CAAPM,OAAO;IAAEC,KAAK,GAAAP,SAAA,CAALO,KAAK;IAAEC,OAAO,GAAAR,SAAA,CAAPQ,OAAO;EAK1C,IAAAC,gBAAS,EACP,YAAM;IACJD,OAAO,CAAC,CAAC;EACX,CAAC,EACD,CAACnB,kBAAkB,EAAEC,OAAO,EAAEkB,OAAO,CACvC,CAAC;EAED,OAAO;IAAEH,IAAI,EAAEA,IAAI,CAACK,UAAU,KAAK,OAAO,GAAGL,IAAI,GAAG,IAAI;IAAEC,OAAO,EAAPA,OAAO;IAAEC,KAAK,EAALA;EAAM,CAAC;AAC5E,CAAC;AAAC,IAAAI,QAAA,GAAAC,OAAA,cAEa/B,oBAAoB;AAEnCA,oBAAoB,CAACgC,SAAS,GAAG;EAC/B5B,iBAAiB,EAAE6B,qBAAU,CAACC,MAAM,CAACC;AACvC,CAAC"}
1
+ {"version":3,"file":"useCustomSidebarData.js","names":["_react","require","_propTypes","_interopRequireDefault","_client","_buildDynamicQuery","_RecordEditContext","useCustomSidebarData","id","schema","displayProperties","externalUpdateTime","updated","useContext","RecordEditContext","query","adminMainInfoProperty","Array","isArray","buildDynamicQuery","properties","customSidebarInfoQuery","gql","data","loading","error","refetch","useQuery","variables","skip","useEffect","__typename","_default","exports","default","propTypes","ProptTypes","object","isRequired"],"sources":["../../../../../../src/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js"],"sourcesContent":["import { useContext, useEffect } from 'react';\nimport ProptTypes from 'prop-types';\nimport { useQuery, gql } from '@apollo/client';\nimport buildDynamicQuery from '../../../../InfoBoxes/helpers/build-dynamic-query';\nimport { RecordEditContext } from '../../../utils/RecordEditContext';\n\nconst useCustomSidebarData = ({ id, schema, displayProperties }) => {\n const { externalUpdateTime, updated } = useContext(RecordEditContext);\n\n const query =\n displayProperties.adminMainInfoProperty &&\n Array.isArray(displayProperties.adminMainInfoProperty)\n ? buildDynamicQuery({ id, schema, properties: displayProperties.adminMainInfoProperty })\n : null;\n\n const customSidebarInfoQuery =\n query ||\n gql`\n query {\n __typename\n }\n `;\n\n const {\n data = {},\n loading,\n error,\n refetch\n } = useQuery(customSidebarInfoQuery, {\n variables: { id },\n skip: !query\n });\n\n useEffect(() => {\n refetch();\n }, [externalUpdateTime, updated, refetch]);\n\n return { data: data.__typename !== 'Query' ? data : null, loading, error };\n};\n\nexport default useCustomSidebarData;\n\nuseCustomSidebarData.propTypes = {\n displayProperties: ProptTypes.object.isRequired\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AAEA,MAAMM,oBAAoB,GAAGA,CAAC;EAAEC,EAAE;EAAEC,MAAM;EAAEC;AAAkB,CAAC,KAAK;EAClE,MAAM;IAAEC,kBAAkB;IAAEC;EAAQ,CAAC,GAAG,IAAAC,iBAAU,EAACC,oCAAiB,CAAC;EAErE,MAAMC,KAAK,GACTL,iBAAiB,CAACM,qBAAqB,IACvCC,KAAK,CAACC,OAAO,CAACR,iBAAiB,CAACM,qBAAqB,CAAC,GAClD,IAAAG,0BAAiB,EAAC;IAAEX,EAAE;IAAEC,MAAM;IAAEW,UAAU,EAAEV,iBAAiB,CAACM;EAAsB,CAAC,CAAC,GACtF,IAAI;EAEV,MAAMK,sBAAsB,GAC1BN,KAAK,IACL,IAAAO,WAAG;AACP;AACA;AACA;AACA,KAAK;EAEH,MAAM;IACJC,IAAI,GAAG,CAAC,CAAC;IACTC,OAAO;IACPC,KAAK;IACLC;EACF,CAAC,GAAG,IAAAC,gBAAQ,EAACN,sBAAsB,EAAE;IACnCO,SAAS,EAAE;MAAEpB;IAAG,CAAC;IACjBqB,IAAI,EAAE,CAACd;EACT,CAAC,CAAC;EAEF,IAAAe,gBAAS,EAAC,MAAM;IACdJ,OAAO,CAAC,CAAC;EACX,CAAC,EAAE,CAACf,kBAAkB,EAAEC,OAAO,EAAEc,OAAO,CAAC,CAAC;EAE1C,OAAO;IAAEH,IAAI,EAAEA,IAAI,CAACQ,UAAU,KAAK,OAAO,GAAGR,IAAI,GAAG,IAAI;IAAEC,OAAO;IAAEC;EAAM,CAAC;AAC5E,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa3B,oBAAoB;AAEnCA,oBAAoB,CAAC4B,SAAS,GAAG;EAC/BzB,iBAAiB,EAAE0B,kBAAU,CAACC,MAAM,CAACC;AACvC,CAAC","ignoreList":[]}
@@ -1,27 +1,14 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/es.weak-map.js");
4
- require("core-js/modules/es.object.define-property.js");
5
- require("core-js/modules/es.object.get-own-property-descriptor.js");
6
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
7
- var _typeof = require("@babel/runtime/helpers/typeof");
8
4
  Object.defineProperty(exports, "__esModule", {
9
5
  value: true
10
6
  });
11
- exports["default"] = void 0;
12
- require("core-js/modules/es.array.iterator.js");
13
- require("core-js/modules/es.object.to-string.js");
14
- require("core-js/modules/es.promise.js");
15
- require("core-js/modules/es.string.iterator.js");
16
- require("core-js/modules/web.dom-collections.iterator.js");
17
- require("core-js/modules/es.array.map.js");
18
- require("core-js/modules/es.array.filter.js");
19
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
20
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
21
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
7
+ exports.default = void 0;
22
8
  var _react = _interopRequireWildcard(require("react"));
23
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
24
10
  var _v = _interopRequireDefault(require("uuid/v1"));
11
+ var _accordion = _interopRequireDefault(require("@blaze-react/accordion"));
25
12
  var _client = require("@apollo/client");
26
13
  var _adminUiUtils = require("@blaze-cms/admin-ui-utils");
27
14
  var _reactFormBuilder = require("@blaze-cms/react-form-builder");
@@ -30,161 +17,128 @@ var _versioningUi = require("@blaze-cms/versioning-ui");
30
17
  var _constants = require("../../../../constants");
31
18
  var _CustomSidebarInfoContainer = _interopRequireDefault(require("./container/CustomSidebarInfoContainer"));
32
19
  var _EntitiyNavLinks = _interopRequireDefault(require("../EntitiyNavLinks"));
33
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
34
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
35
- var SideBarRelations = function SideBarRelations(_ref) {
36
- var schema = _ref.schema,
37
- onChange = _ref.onChange,
38
- formData = _ref.formData,
39
- entity = _ref.entity;
40
- var RelationComponent = _reactFormBuilder.formFieldTypes.relation;
41
- var formattedStatus = formData.formattedStatus,
42
- formattedUpdated = formData.formattedUpdated,
43
- formattedCreated = formData.formattedCreated,
44
- formattedPublished = formData.formattedPublished,
45
- status = formData.status;
46
- var client = (0, _client.useApolloClient)();
47
- var _useState = (0, _react.useState)(null),
48
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
49
- relationsComponents = _useState2[0],
50
- setRelationsComponents = _useState2[1];
51
- (0, _react.useEffect)(function () {
52
- (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
53
- var fetchRelationSchema, allRelationComponents;
54
- return _regenerator["default"].wrap(function _callee3$(_context3) {
55
- while (1) switch (_context3.prev = _context3.next) {
56
- case 0:
57
- fetchRelationSchema = /*#__PURE__*/function () {
58
- var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(_ref3) {
59
- var entityIdentifier, _yield$client$query, _yield$client$query$d, relationSchema;
60
- return _regenerator["default"].wrap(function _callee$(_context) {
61
- while (1) switch (_context.prev = _context.next) {
62
- case 0:
63
- entityIdentifier = _ref3.entityIdentifier;
64
- if (entityIdentifier) {
65
- _context.next = 3;
66
- break;
67
- }
68
- return _context.abrupt("return", null);
69
- case 3:
70
- _context.next = 5;
71
- return client.query({
72
- query: (0, _adminUiUtils.getQuery)('GET_ENTITY_SCHEMA'),
73
- variables: {
74
- identifier: entityIdentifier
75
- }
76
- });
77
- case 5:
78
- _yield$client$query = _context.sent;
79
- _yield$client$query$d = (0, _slicedToArray2["default"])(_yield$client$query.data.getEntitySchemas, 1);
80
- relationSchema = _yield$client$query$d[0];
81
- return _context.abrupt("return", relationSchema);
82
- case 9:
83
- case "end":
84
- return _context.stop();
85
- }
86
- }, _callee);
87
- }));
88
- return function fetchRelationSchema(_x) {
89
- return _ref4.apply(this, arguments);
90
- };
91
- }();
92
- if (!(!relationsComponents && schema)) {
93
- _context3.next = 6;
94
- break;
95
- }
96
- _context3.next = 4;
97
- return Promise.all(schema.relations.filter(function (_ref5) {
98
- var showInForm = _ref5.showInForm,
99
- foreignKey = _ref5.foreignKey;
100
- return showInForm && schema.properties[foreignKey];
101
- }).map( /*#__PURE__*/function () {
102
- var _ref6 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(relation) {
103
- return _regenerator["default"].wrap(function _callee2$(_context2) {
104
- while (1) switch (_context2.prev = _context2.next) {
105
- case 0:
106
- _context2.t0 = (0, _v["default"])();
107
- _context2.t1 = relation;
108
- _context2.next = 4;
109
- return fetchRelationSchema(relation);
110
- case 4:
111
- _context2.t2 = _context2.sent;
112
- return _context2.abrupt("return", {
113
- id: _context2.t0,
114
- staticData: _context2.t1,
115
- schema: _context2.t2
116
- });
117
- case 6:
118
- case "end":
119
- return _context2.stop();
120
- }
121
- }, _callee2);
122
- }));
123
- return function (_x2) {
124
- return _ref6.apply(this, arguments);
125
- };
126
- }()));
127
- case 4:
128
- allRelationComponents = _context3.sent;
129
- setRelationsComponents(allRelationComponents);
130
- case 6:
131
- case "end":
132
- return _context3.stop();
133
- }
134
- }, _callee3);
135
- }))();
20
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
21
+ const SideBarRelations = ({
22
+ schema,
23
+ onChange,
24
+ formData,
25
+ entity,
26
+ isOpen,
27
+ onToggle
28
+ }) => {
29
+ const {
30
+ relation: RelationComponent
31
+ } = _reactFormBuilder.formFieldTypes;
32
+ const {
33
+ formattedStatus,
34
+ formattedUpdated,
35
+ formattedCreated,
36
+ formattedPublished,
37
+ updatedBy,
38
+ status
39
+ } = formData;
40
+ const client = (0, _client.useApolloClient)();
41
+ const [relationsComponents, setRelationsComponents] = (0, _react.useState)(null);
42
+ (0, _react.useEffect)(() => {
43
+ (async () => {
44
+ const fetchRelationSchema = async ({
45
+ entityIdentifier
46
+ }) => {
47
+ if (!entityIdentifier) return null;
48
+ const {
49
+ data: {
50
+ getEntitySchemas: [relationSchema]
51
+ }
52
+ } = await client.query({
53
+ query: (0, _adminUiUtils.getQuery)('GET_ENTITY_SCHEMA'),
54
+ variables: {
55
+ identifier: entityIdentifier
56
+ }
57
+ });
58
+ return relationSchema;
59
+ };
60
+ if (!relationsComponents && schema) {
61
+ const allRelationComponents = await Promise.all(schema.relations.filter(({
62
+ showInForm,
63
+ foreignKey
64
+ }) => showInForm && schema.properties[foreignKey]).map(async relation => ({
65
+ id: (0, _v.default)(),
66
+ staticData: relation,
67
+ schema: await fetchRelationSchema(relation)
68
+ })));
69
+ setRelationsComponents(allRelationComponents);
70
+ }
71
+ })();
136
72
  }, [client, relationsComponents, schema, schema.relations]);
137
- var itemId = entity.id;
138
- var itemEntity = schema.identifier,
139
- interfaces = schema.interfaces;
140
- var statusClassName = (0, _classnames["default"])('sidebar__status__badge', {
73
+ const {
74
+ id: itemId
75
+ } = entity;
76
+ const {
77
+ identifier: itemEntity,
78
+ interfaces
79
+ } = schema;
80
+ const statusClassName = (0, _classnames.default)('sidebar__status__badge', {
141
81
  'sidebar__status__badge--published': status === _constants.PUBLISHED,
142
82
  'sidebar__status__badge--unpublished': status === _constants.UNPUBLISHED
143
83
  });
144
- return /*#__PURE__*/_react["default"].createElement("div", {
145
- className: "sidebar",
84
+ return /*#__PURE__*/_react.default.createElement("div", {
85
+ className: (0, _classnames.default)('sidebar', {
86
+ 'sidebar--collapsed': !isOpen
87
+ }),
146
88
  "data-testid": "sideBarRelations-main-div"
147
- }, /*#__PURE__*/_react["default"].createElement("div", {
89
+ }, /*#__PURE__*/_react.default.createElement("div", {
90
+ className: "sidebar__toggle-button",
91
+ onClick: onToggle,
92
+ role: "button",
93
+ "aria-label": isOpen ? 'Collapse sidebar' : 'Expand sidebar'
94
+ }, /*#__PURE__*/_react.default.createElement("i", {
95
+ className: "material-icons"
96
+ }, isOpen ? 'keyboard_arrow_right' : 'keyboard_arrow_left')), /*#__PURE__*/_react.default.createElement("div", {
148
97
  className: "sidebar__content"
149
- }, /*#__PURE__*/_react["default"].createElement("div", {
98
+ }, /*#__PURE__*/_react.default.createElement("div", {
150
99
  className: "sidebar__status"
151
- }, formattedCreated && /*#__PURE__*/_react["default"].createElement("div", {
100
+ }, formattedCreated && /*#__PURE__*/_react.default.createElement("div", {
152
101
  className: "sidebar__top"
153
- }, /*#__PURE__*/_react["default"].createElement("div", {
102
+ }, /*#__PURE__*/_react.default.createElement("div", {
154
103
  className: "sidebar__status__wrapper"
155
- }, /*#__PURE__*/_react["default"].createElement("b", null, "Status"), /*#__PURE__*/_react["default"].createElement("span", {
104
+ }, /*#__PURE__*/_react.default.createElement("b", null, "Status"), /*#__PURE__*/_react.default.createElement("span", {
156
105
  className: statusClassName
157
- }, formattedStatus)), formattedStatus === _constants.PUBLISHED && /*#__PURE__*/_react["default"].createElement("p", null, formattedStatus, " on: ", /*#__PURE__*/_react["default"].createElement("span", null, " ", formattedPublished))), !schema.displayProperties.disableDefaultAdminInfo && formattedCreated && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("p", null, "Created: ", /*#__PURE__*/_react["default"].createElement("span", null, formattedCreated)), /*#__PURE__*/_react["default"].createElement("p", null, "Updated: ", /*#__PURE__*/_react["default"].createElement("span", null, formattedUpdated)))), /*#__PURE__*/_react["default"].createElement(_CustomSidebarInfoContainer["default"], {
106
+ }, formattedStatus)), formattedStatus === _constants.PUBLISHED && /*#__PURE__*/_react.default.createElement("p", null, formattedStatus, " on: ", /*#__PURE__*/_react.default.createElement("span", null, " ", formattedPublished))), !schema.displayProperties.disableDefaultAdminInfo && formattedCreated && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("p", null, "Created: ", /*#__PURE__*/_react.default.createElement("span", null, formattedCreated)), /*#__PURE__*/_react.default.createElement("p", null, "Updated: ", /*#__PURE__*/_react.default.createElement("span", null, formattedUpdated)), updatedBy && /*#__PURE__*/_react.default.createElement("p", null, "Updated by: ", /*#__PURE__*/_react.default.createElement("span", null, updatedBy.name))), /*#__PURE__*/_react.default.createElement(_CustomSidebarInfoContainer.default, {
158
107
  id: itemId,
159
108
  schema: schema,
160
109
  displayProperties: schema.displayProperties
161
- })), /*#__PURE__*/_react["default"].createElement(_versioningUi.VersionsList, {
110
+ })), /*#__PURE__*/_react.default.createElement(_versioningUi.VersionsList, {
162
111
  itemEntity: itemEntity,
163
112
  itemId: itemId,
164
113
  interfaces: interfaces
165
- }), /*#__PURE__*/_react["default"].createElement(_EntitiyNavLinks["default"], {
114
+ }), /*#__PURE__*/_react.default.createElement(_EntitiyNavLinks.default, {
166
115
  schema: schema
167
- }), relationsComponents && relationsComponents.map(function (_ref7) {
168
- var id = _ref7.id,
169
- staticData = _ref7.staticData,
170
- entitySchema = _ref7.schema;
171
- return /*#__PURE__*/_react["default"].createElement(RelationComponent, {
172
- formData: formData,
173
- schema: entitySchema,
174
- key: id,
175
- staticData: staticData,
176
- onSelect: onChange
177
- });
178
- })));
116
+ }), relationsComponents && /*#__PURE__*/_react.default.createElement(_accordion.default, {
117
+ isOpen: true
118
+ }, /*#__PURE__*/_react.default.createElement(_accordion.default.Header, null, /*#__PURE__*/_react.default.createElement("b", null, "Classification")), /*#__PURE__*/_react.default.createElement(_accordion.default.Content, null, /*#__PURE__*/_react.default.createElement(_accordion.default.ContentDetails, null, relationsComponents.map(({
119
+ id,
120
+ staticData,
121
+ schema: entitySchema
122
+ }) => /*#__PURE__*/_react.default.createElement(RelationComponent, {
123
+ formData: formData,
124
+ schema: entitySchema,
125
+ key: id,
126
+ staticData: staticData,
127
+ onSelect: onChange
128
+ })))))));
179
129
  };
180
130
  SideBarRelations.propTypes = {
181
- schema: _propTypes["default"].object.isRequired,
182
- onChange: _propTypes["default"].func.isRequired,
183
- formData: _propTypes["default"].object.isRequired,
184
- entity: _propTypes["default"].object
131
+ schema: _propTypes.default.object.isRequired,
132
+ onChange: _propTypes.default.func.isRequired,
133
+ formData: _propTypes.default.object.isRequired,
134
+ entity: _propTypes.default.object,
135
+ isOpen: _propTypes.default.bool,
136
+ onToggle: _propTypes.default.func
185
137
  };
186
138
  SideBarRelations.defaultProps = {
187
- entity: {}
139
+ entity: {},
140
+ isOpen: true,
141
+ onToggle: () => {}
188
142
  };
189
- var _default = exports["default"] = SideBarRelations;
143
+ var _default = exports.default = SideBarRelations;
190
144
  //# sourceMappingURL=index.js.map