@blaze-cms/plugin-data-ui 0.146.0-translations.8 → 0.147.0-rc-eagle.4

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 (211) hide show
  1. package/lib/components/EntityDataListing/EntityDataListing.js +21 -19
  2. package/lib/components/EntityDataListing/EntityDataListing.js.map +1 -1
  3. package/lib/components/EntityDataListing/index.js +2 -3
  4. package/lib/components/EntityDataListing/index.js.map +1 -1
  5. package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js +18 -19
  6. package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -1
  7. package/lib/components/EntityManager/Entity/EntitiyNavLinks/index.js +2 -3
  8. package/lib/components/EntityManager/Entity/EntitiyNavLinks/index.js.map +1 -1
  9. package/lib/components/EntityManager/Entity/Entity.js +284 -457
  10. package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
  11. package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js +62 -66
  12. package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  13. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +32 -56
  14. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  15. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js +2 -3
  16. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
  17. package/lib/components/EntityManager/Entity/EntityHeader/index.js +2 -3
  18. package/lib/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
  19. package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js +20 -26
  20. package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js.map +1 -1
  21. package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +20 -17
  22. package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
  23. package/lib/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js +34 -32
  24. package/lib/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -1
  25. package/lib/components/EntityManager/Entity/SideBarRelations/index.js +95 -158
  26. package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  27. package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +23 -30
  28. package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
  29. package/lib/components/EntityManager/Entity/actions-handlers/create/index.js +2 -3
  30. package/lib/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
  31. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js +42 -56
  32. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  33. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js +29 -45
  34. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
  35. package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js +2 -3
  36. package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
  37. package/lib/components/EntityManager/Entity/actions-handlers/index.js +7 -8
  38. package/lib/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
  39. package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js +2 -3
  40. package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
  41. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js +36 -57
  42. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  43. package/lib/components/EntityManager/Entity/actions-handlers/update/index.js +2 -3
  44. package/lib/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
  45. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js +47 -66
  46. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
  47. package/lib/components/EntityManager/Entity/index.js +2 -3
  48. package/lib/components/EntityManager/Entity/index.js.map +1 -1
  49. package/lib/components/EntityManager/EntityManager.js +91 -166
  50. package/lib/components/EntityManager/EntityManager.js.map +1 -1
  51. package/lib/components/EntityManager/index.js +2 -3
  52. package/lib/components/EntityManager/index.js.map +1 -1
  53. package/lib/components/EntityManager/utils/RecordEditContext/index.js +3 -4
  54. package/lib/components/EntityManager/utils/RecordEditContext/index.js.map +1 -1
  55. package/lib/components/EntityManager/utils/data-mappers.js +34 -46
  56. package/lib/components/EntityManager/utils/data-mappers.js.map +1 -1
  57. package/lib/components/EntityManager/utils/entity.js +35 -80
  58. package/lib/components/EntityManager/utils/entity.js.map +1 -1
  59. package/lib/components/EntityManager/utils/entityAvailableActions.js +51 -110
  60. package/lib/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
  61. package/lib/components/EntityManager/utils/is-form-empty.js +6 -10
  62. package/lib/components/EntityManager/utils/is-form-empty.js.map +1 -1
  63. package/lib/components/EntityManager/utils/query.js +17 -10
  64. package/lib/components/EntityManager/utils/query.js.map +1 -1
  65. package/lib/components/InfoBoxes/InfoBoxTooltip.js +19 -16
  66. package/lib/components/InfoBoxes/InfoBoxTooltip.js.map +1 -1
  67. package/lib/components/InfoBoxes/InfoBoxes.js +19 -19
  68. package/lib/components/InfoBoxes/InfoBoxes.js.map +1 -1
  69. package/lib/components/InfoBoxes/container/InfoBoxContainer.js +26 -38
  70. package/lib/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -1
  71. package/lib/components/InfoBoxes/helpers/build-dynamic-query.js +21 -16
  72. package/lib/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
  73. package/lib/components/InfoBoxes/hooks/useData.js +33 -30
  74. package/lib/components/InfoBoxes/hooks/useData.js.map +1 -1
  75. package/lib/components/InfoBoxes/hooks/useInfoBox.js +10 -10
  76. package/lib/components/InfoBoxes/hooks/useInfoBox.js.map +1 -1
  77. package/lib/components/InfoBoxes/index.js +2 -3
  78. package/lib/components/InfoBoxes/index.js.map +1 -1
  79. package/lib/components/InfoBoxes/presentational/InfoBox.js +27 -34
  80. package/lib/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
  81. package/lib/components/InfoBoxes/presentational/InfoBoxLabel.js +11 -12
  82. package/lib/components/InfoBoxes/presentational/InfoBoxLabel.js.map +1 -1
  83. package/lib/components/InfoBoxes/presentational/InfoBoxValue.js +12 -12
  84. package/lib/components/InfoBoxes/presentational/InfoBoxValue.js.map +1 -1
  85. package/lib/components/ListingTable/ListingTable.js +155 -296
  86. package/lib/components/ListingTable/ListingTable.js.map +1 -1
  87. package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js +53 -58
  88. package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  89. package/lib/components/ListingTable/ListingTableContent/index.js +2 -3
  90. package/lib/components/ListingTable/ListingTableContent/index.js.map +1 -1
  91. package/lib/components/ListingTable/SearchFilter/SearchContainer.js +436 -262
  92. package/lib/components/ListingTable/SearchFilter/SearchContainer.js.map +1 -1
  93. package/lib/components/ListingTable/SearchFilter/SearchFilter.js +30 -37
  94. package/lib/components/ListingTable/SearchFilter/SearchFilter.js.map +1 -1
  95. package/lib/components/ListingTable/SearchFilter/helpers.js +82 -71
  96. package/lib/components/ListingTable/SearchFilter/helpers.js.map +1 -1
  97. package/lib/components/ListingTable/SearchFilter/querys.js +5 -5
  98. package/lib/components/ListingTable/SearchFilter/querys.js.map +1 -1
  99. package/lib/components/ListingTable/TableActions/TableActions.js +27 -31
  100. package/lib/components/ListingTable/TableActions/TableActions.js.map +1 -1
  101. package/lib/components/ListingTable/TableActions/index.js +2 -3
  102. package/lib/components/ListingTable/TableActions/index.js.map +1 -1
  103. package/lib/components/ListingTable/index.js +2 -3
  104. package/lib/components/ListingTable/index.js.map +1 -1
  105. package/lib/components/ListingTable/mappers/populate-rows.js +103 -122
  106. package/lib/components/ListingTable/mappers/populate-rows.js.map +1 -1
  107. package/lib/components/ListingTable/service/index.js +66 -83
  108. package/lib/components/ListingTable/service/index.js.map +1 -1
  109. package/lib/components/Tabs/index.js +26 -42
  110. package/lib/components/Tabs/index.js.map +1 -1
  111. package/lib/components/hooks/useCallbackDebounce.js +5 -9
  112. package/lib/components/hooks/useCallbackDebounce.js.map +1 -1
  113. package/lib/constants.js +30 -31
  114. package/lib/constants.js.map +1 -1
  115. package/lib/icons/ContentIcon.js +17 -20
  116. package/lib/icons/ContentIcon.js.map +1 -1
  117. package/lib/icons/SettingsIcon.js +12 -15
  118. package/lib/icons/SettingsIcon.js.map +1 -1
  119. package/lib/icons/TaxonomyIcon.js +15 -18
  120. package/lib/icons/TaxonomyIcon.js.map +1 -1
  121. package/lib/icons/UsersIcon.js +11 -14
  122. package/lib/icons/UsersIcon.js.map +1 -1
  123. package/lib/icons/index.js +8 -9
  124. package/lib/icons/index.js.map +1 -1
  125. package/lib/index.js +88 -121
  126. package/lib/index.js.map +1 -1
  127. package/lib/utils/add-content-menu-items.js +67 -93
  128. package/lib/utils/add-content-menu-items.js.map +1 -1
  129. package/lib/utils/build-create-entity-mutation.js +12 -9
  130. package/lib/utils/build-create-entity-mutation.js.map +1 -1
  131. package/lib/utils/build-delete-entity-mutation.js +11 -8
  132. package/lib/utils/build-delete-entity-mutation.js.map +1 -1
  133. package/lib/utils/build-listing-query.js +17 -14
  134. package/lib/utils/build-listing-query.js.map +1 -1
  135. package/lib/utils/build-update-data-query.js +15 -9
  136. package/lib/utils/build-update-data-query.js.map +1 -1
  137. package/lib/utils/build-update-publish-unpublish-mutation.js +15 -8
  138. package/lib/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  139. package/lib/utils/get-default-query-params.js +7 -6
  140. package/lib/utils/get-default-query-params.js.map +1 -1
  141. package/lib/utils/hoc/withContext.js +4 -6
  142. package/lib/utils/hoc/withContext.js.map +1 -1
  143. package/lib/utils/hooks/useToggle.js +4 -12
  144. package/lib/utils/hooks/useToggle.js.map +1 -1
  145. package/lib/utils/index.js +2 -3
  146. package/lib/utils/index.js.map +1 -1
  147. package/lib-es/components/EntityManager/Entity/Entity.js +8 -20
  148. package/lib-es/components/EntityManager/Entity/Entity.js.map +1 -1
  149. package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  150. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  151. package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
  152. package/lib-es/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -1
  153. package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js +6 -3
  154. package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  155. package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
  156. package/lib-es/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  157. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  158. package/lib-es/components/EntityManager/EntityManager.js.map +1 -1
  159. package/lib-es/components/EntityManager/utils/entity.js.map +1 -1
  160. package/lib-es/components/EntityManager/utils/query.js.map +1 -1
  161. package/lib-es/components/InfoBoxes/InfoBoxTooltip.js.map +1 -1
  162. package/lib-es/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -1
  163. package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
  164. package/lib-es/components/InfoBoxes/hooks/useData.js.map +1 -1
  165. package/lib-es/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
  166. package/lib-es/components/InfoBoxes/presentational/InfoBoxLabel.js.map +1 -1
  167. package/lib-es/components/ListingTable/ListingTable.js +2 -2
  168. package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
  169. package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js +20 -17
  170. package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  171. package/lib-es/components/ListingTable/SearchFilter/SearchContainer.js +323 -51
  172. package/lib-es/components/ListingTable/SearchFilter/SearchContainer.js.map +1 -1
  173. package/lib-es/components/ListingTable/SearchFilter/SearchFilter.js +7 -3
  174. package/lib-es/components/ListingTable/SearchFilter/SearchFilter.js.map +1 -1
  175. package/lib-es/components/ListingTable/SearchFilter/helpers.js +39 -8
  176. package/lib-es/components/ListingTable/SearchFilter/helpers.js.map +1 -1
  177. package/lib-es/components/ListingTable/SearchFilter/querys.js.map +1 -1
  178. package/lib-es/components/ListingTable/mappers/populate-rows.js.map +1 -1
  179. package/lib-es/components/ListingTable/service/index.js.map +1 -1
  180. package/lib-es/components/Tabs/index.js +6 -7
  181. package/lib-es/components/Tabs/index.js.map +1 -1
  182. package/lib-es/index.js +12 -3
  183. package/lib-es/index.js.map +1 -1
  184. package/lib-es/utils/add-content-menu-items.js.map +1 -1
  185. package/lib-es/utils/build-create-entity-mutation.js.map +1 -1
  186. package/lib-es/utils/build-delete-entity-mutation.js.map +1 -1
  187. package/lib-es/utils/build-listing-query.js.map +1 -1
  188. package/lib-es/utils/build-update-data-query.js.map +1 -1
  189. package/lib-es/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  190. package/lib-es/utils/hoc/withContext.js +1 -1
  191. package/lib-es/utils/hoc/withContext.js.map +1 -1
  192. package/package.json +27 -22
  193. package/src/components/EntityManager/Entity/Entity.js +59 -77
  194. package/src/components/EntityManager/Entity/EntityHeader/EntityHeader.js +1 -2
  195. package/src/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js +9 -7
  196. package/src/components/EntityManager/Entity/SideBarRelations/index.js +64 -59
  197. package/src/components/EntityManager/EntityManager.js +52 -45
  198. package/src/components/InfoBoxes/container/InfoBoxContainer.js +3 -6
  199. package/src/components/InfoBoxes/hooks/useData.js +6 -1
  200. package/src/components/ListingTable/ListingTable.js +13 -21
  201. package/src/components/ListingTable/ListingTableContent/ListingTableContent.js +38 -44
  202. package/src/components/ListingTable/SearchFilter/SearchContainer.js +411 -134
  203. package/src/components/ListingTable/SearchFilter/SearchFilter.js +5 -2
  204. package/src/components/ListingTable/SearchFilter/helpers.js +56 -8
  205. package/src/components/ListingTable/service/index.js +2 -3
  206. package/src/components/Tabs/index.js +17 -21
  207. package/src/index.js +11 -7
  208. package/src/utils/hoc/withContext.js +5 -4
  209. package/CHANGELOG.md +0 -1947
  210. package/babel.config.js +0 -3
  211. package/jest.config.js +0 -5
@@ -1,45 +1,41 @@
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 _react = _interopRequireDefault(require("react"));
10
9
  var _reactRouterDom = require("react-router-dom");
11
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
12
11
  var _more = _interopRequireDefault(require("@blaze-react/more"));
13
12
  var _button = _interopRequireDefault(require("@blaze-react/button"));
14
- var TableActions = function TableActions(_ref) {
15
- var editUrl = _ref.editUrl,
16
- data = _ref.data,
17
- showDeleteModal = _ref.showDeleteModal;
18
- return /*#__PURE__*/_react["default"].createElement("div", {
19
- className: "more-menu__wrapper"
20
- }, /*#__PURE__*/_react["default"].createElement(_more["default"], {
21
- isMoreMenu: true
22
- }, /*#__PURE__*/_react["default"].createElement(_more["default"].Avatar, {
23
- isMoreMenu: true
24
- }, /*#__PURE__*/_react["default"].createElement("span", {
25
- className: "material-icons"
26
- }, "more_vert")), /*#__PURE__*/_react["default"].createElement(_more["default"].Content, {
27
- isMoreMenu: true
28
- }, /*#__PURE__*/_react["default"].createElement(_reactRouterDom.Link, {
29
- to: editUrl,
30
- className: "more-menu__link",
31
- role: "button"
32
- }, "Edit"), /*#__PURE__*/_react["default"].createElement(_button["default"], {
33
- className: "more-menu__link",
34
- onClick: function onClick() {
35
- return showDeleteModal(data);
36
- }
37
- }, "Delete"))));
38
- };
13
+ const TableActions = ({
14
+ editUrl,
15
+ data,
16
+ showDeleteModal
17
+ }) => /*#__PURE__*/_react.default.createElement("div", {
18
+ className: "more-menu__wrapper"
19
+ }, /*#__PURE__*/_react.default.createElement(_more.default, {
20
+ isMoreMenu: true
21
+ }, /*#__PURE__*/_react.default.createElement(_more.default.Avatar, {
22
+ isMoreMenu: true
23
+ }, /*#__PURE__*/_react.default.createElement("span", {
24
+ className: "material-icons"
25
+ }, "more_vert")), /*#__PURE__*/_react.default.createElement(_more.default.Content, {
26
+ isMoreMenu: true
27
+ }, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
28
+ to: editUrl,
29
+ className: "more-menu__link",
30
+ role: "button"
31
+ }, "Edit"), /*#__PURE__*/_react.default.createElement(_button.default, {
32
+ className: "more-menu__link",
33
+ onClick: () => showDeleteModal(data)
34
+ }, "Delete"))));
39
35
  TableActions.propTypes = {
40
- editUrl: _propTypes["default"].string.isRequired,
41
- showDeleteModal: _propTypes["default"].func.isRequired,
42
- data: _propTypes["default"].object.isRequired
36
+ editUrl: _propTypes.default.string.isRequired,
37
+ showDeleteModal: _propTypes.default.func.isRequired,
38
+ data: _propTypes.default.object.isRequired
43
39
  };
44
- var _default = exports["default"] = TableActions;
40
+ var _default = exports.default = TableActions;
45
41
  //# sourceMappingURL=TableActions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableActions.js","names":["_react","_interopRequireDefault","require","_reactRouterDom","_propTypes","_more","_button","TableActions","_ref","editUrl","data","showDeleteModal","createElement","className","isMoreMenu","Avatar","Content","Link","to","role","onClick","propTypes","PropTypes","string","isRequired","func","object","_default","exports"],"sources":["../../../../src/components/ListingTable/TableActions/TableActions.js"],"sourcesContent":["import React from 'react';\nimport { Link } from 'react-router-dom';\nimport PropTypes from 'prop-types';\nimport More from '@blaze-react/more';\nimport Button from '@blaze-react/button';\n\nconst TableActions = ({ editUrl, data, showDeleteModal }) => (\n <div className=\"more-menu__wrapper\">\n <More isMoreMenu>\n <More.Avatar isMoreMenu>\n <span className=\"material-icons\">more_vert</span>\n </More.Avatar>\n <More.Content isMoreMenu>\n <Link to={editUrl} className=\"more-menu__link\" role=\"button\">\n Edit\n </Link>\n <Button className=\"more-menu__link\" onClick={() => showDeleteModal(data)}>\n Delete\n </Button>\n </More.Content>\n </More>\n </div>\n);\n\nTableActions.propTypes = {\n editUrl: PropTypes.string.isRequired,\n showDeleteModal: PropTypes.func.isRequired,\n data: PropTypes.object.isRequired\n};\n\nexport default TableActions;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,KAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,OAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAMK,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA;EAAA,IAAMC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IAAEC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAEC,eAAe,GAAAH,IAAA,CAAfG,eAAe;EAAA,oBACpDX,MAAA,YAAAY,aAAA;IAAKC,SAAS,EAAC;EAAoB,gBACjCb,MAAA,YAAAY,aAAA,CAACP,KAAA,WAAI;IAACS,UAAU;EAAA,gBACdd,MAAA,YAAAY,aAAA,CAACP,KAAA,WAAI,CAACU,MAAM;IAACD,UAAU;EAAA,gBACrBd,MAAA,YAAAY,aAAA;IAAMC,SAAS,EAAC;EAAgB,GAAC,WAAe,CACrC,CAAC,eACdb,MAAA,YAAAY,aAAA,CAACP,KAAA,WAAI,CAACW,OAAO;IAACF,UAAU;EAAA,gBACtBd,MAAA,YAAAY,aAAA,CAACT,eAAA,CAAAc,IAAI;IAACC,EAAE,EAAET,OAAQ;IAACI,SAAS,EAAC,iBAAiB;IAACM,IAAI,EAAC;EAAQ,GAAC,MAEvD,CAAC,eACPnB,MAAA,YAAAY,aAAA,CAACN,OAAA,WAAM;IAACO,SAAS,EAAC,iBAAiB;IAACO,OAAO,EAAE,SAAAA,QAAA;MAAA,OAAMT,eAAe,CAACD,IAAI,CAAC;IAAA;EAAC,GAAC,QAElE,CACI,CACV,CACH,CAAC;AAAA,CACP;AAEDH,YAAY,CAACc,SAAS,GAAG;EACvBZ,OAAO,EAAEa,qBAAS,CAACC,MAAM,CAACC,UAAU;EACpCb,eAAe,EAAEW,qBAAS,CAACG,IAAI,CAACD,UAAU;EAC1Cd,IAAI,EAAEY,qBAAS,CAACI,MAAM,CAACF;AACzB,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,cAEarB,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"TableActions.js","names":["_react","_interopRequireDefault","require","_reactRouterDom","_propTypes","_more","_button","TableActions","editUrl","data","showDeleteModal","default","createElement","className","isMoreMenu","Avatar","Content","Link","to","role","onClick","propTypes","PropTypes","string","isRequired","func","object","_default","exports"],"sources":["../../../../src/components/ListingTable/TableActions/TableActions.js"],"sourcesContent":["import React from 'react';\nimport { Link } from 'react-router-dom';\nimport PropTypes from 'prop-types';\nimport More from '@blaze-react/more';\nimport Button from '@blaze-react/button';\n\nconst TableActions = ({ editUrl, data, showDeleteModal }) => (\n <div className=\"more-menu__wrapper\">\n <More isMoreMenu>\n <More.Avatar isMoreMenu>\n <span className=\"material-icons\">more_vert</span>\n </More.Avatar>\n <More.Content isMoreMenu>\n <Link to={editUrl} className=\"more-menu__link\" role=\"button\">\n Edit\n </Link>\n <Button className=\"more-menu__link\" onClick={() => showDeleteModal(data)}>\n Delete\n </Button>\n </More.Content>\n </More>\n </div>\n);\n\nTableActions.propTypes = {\n editUrl: PropTypes.string.isRequired,\n showDeleteModal: PropTypes.func.isRequired,\n data: PropTypes.object.isRequired\n};\n\nexport default TableActions;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;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QAAA,GAAAC,OAAA,CAAAjB,OAAA,GAEaJ,YAAY","ignoreList":[]}
@@ -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 _TableActions = _interopRequireDefault(require("./TableActions"));
10
- var _default = exports["default"] = _TableActions["default"];
9
+ var _default = exports.default = _TableActions.default;
11
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_TableActions","_interopRequireDefault","require","_default","exports","TableActions"],"sources":["../../../../src/components/ListingTable/TableActions/index.js"],"sourcesContent":["import TableActions from './TableActions';\n\nexport default TableActions;\n"],"mappings":";;;;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0C,IAAAC,QAAA,GAAAC,OAAA,cAE3BC,wBAAY","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_TableActions","_interopRequireDefault","require","_default","exports","default","TableActions"],"sources":["../../../../src/components/ListingTable/TableActions/index.js"],"sourcesContent":["import TableActions from './TableActions';\n\nexport default TableActions;\n"],"mappings":";;;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0C,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE3BC,qBAAY","ignoreList":[]}
@@ -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 _ListingTable = _interopRequireDefault(require("./ListingTable"));
10
- var _default = exports["default"] = _ListingTable["default"];
9
+ var _default = exports.default = _ListingTable.default;
11
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_ListingTable","_interopRequireDefault","require","_default","exports","ListingTable"],"sources":["../../../src/components/ListingTable/index.js"],"sourcesContent":["import ListingTable from './ListingTable';\n\nexport default ListingTable;\n"],"mappings":";;;;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0C,IAAAC,QAAA,GAAAC,OAAA,cAE3BC,wBAAY","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_ListingTable","_interopRequireDefault","require","_default","exports","default","ListingTable"],"sources":["../../../src/components/ListingTable/index.js"],"sourcesContent":["import ListingTable from './ListingTable';\n\nexport default ListingTable;\n"],"mappings":";;;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0C,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE3BC,qBAAY","ignoreList":[]}
@@ -1,30 +1,11 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/es.symbol.js");
4
- require("core-js/modules/es.array.filter.js");
5
- require("core-js/modules/es.object.define-properties.js");
6
- require("core-js/modules/es.object.define-property.js");
7
- require("core-js/modules/es.object.get-own-property-descriptor.js");
8
- require("core-js/modules/es.object.get-own-property-descriptors.js");
9
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
10
4
  Object.defineProperty(exports, "__esModule", {
11
5
  value: true
12
6
  });
13
7
  exports.populateRows = exports.getParsedRowData = exports.formatRows = void 0;
14
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
16
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
- require("core-js/modules/es.array.concat.js");
18
- require("core-js/modules/es.array.for-each.js");
19
- require("core-js/modules/es.array.includes.js");
20
- require("core-js/modules/es.array.is-array.js");
21
- require("core-js/modules/es.array.map.js");
22
- require("core-js/modules/es.array.reduce.js");
23
- require("core-js/modules/es.array.slice.js");
24
- require("core-js/modules/es.object.keys.js");
25
- require("core-js/modules/es.object.to-string.js");
26
- require("core-js/modules/es.string.includes.js");
27
- require("core-js/modules/web.dom-collections.for-each.js");
28
9
  var _react = _interopRequireDefault(require("react"));
29
10
  var _reactRouterDom = require("react-router-dom");
30
11
  var _pluginRenderHooksUi = require("@blaze-cms/plugin-render-hooks-ui");
@@ -34,135 +15,135 @@ var _InfoBoxValue = _interopRequireDefault(require("../../InfoBoxes/presentation
34
15
  var _InfoBoxLabel = _interopRequireDefault(require("../../InfoBoxes/presentational/InfoBoxLabel"));
35
16
  var _InfoBoxTooltip = _interopRequireDefault(require("../../InfoBoxes/InfoBoxTooltip"));
36
17
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
37
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
38
- var formatRows = exports.formatRows = function formatRows(_ref) {
39
- var rows = _ref.rows,
40
- url = _ref.url,
41
- toggleModal = _ref.toggleModal,
42
- label = _ref.label,
43
- _ref$firstColumn = _ref.firstColumn,
44
- firstColumn = _ref$firstColumn === void 0 ? 'name' : _ref$firstColumn,
45
- isEnquiry = _ref.isEnquiry,
46
- entitySchema = _ref.entitySchema;
47
- return rows.map(function (data) {
48
- var editUrl = "".concat(url, "/update/").concat(data.id);
49
- var rowProps = _objectSpread(_objectSpread({}, data), {}, (0, _defineProperty2["default"])({}, firstColumn, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_reactRouterDom.Link, {
18
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
19
+ const formatRows = ({
20
+ rows,
21
+ url,
22
+ toggleModal,
23
+ label,
24
+ firstColumn = 'name',
25
+ isEnquiry,
26
+ entitySchema
27
+ }) => rows.map(data => {
28
+ const editUrl = `${url}/update/${data.id}`;
29
+ const rowProps = _objectSpread(_objectSpread({}, data), {}, {
30
+ [firstColumn]: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
50
31
  to: editUrl,
51
32
  role: "button"
52
- }, data[firstColumn]), /*#__PURE__*/_react["default"].createElement(_pluginRenderHooksUi.RenderHook, {
33
+ }, data[firstColumn]), /*#__PURE__*/_react.default.createElement(_pluginRenderHooksUi.RenderHook, {
53
34
  hookKey: "entity:listing:table:row:column:after",
54
35
  schema: entitySchema,
55
36
  data: data,
56
37
  value: data[firstColumn],
57
38
  column: firstColumn
58
- }))));
59
- if (!isEnquiry) rowProps.actions = /*#__PURE__*/_react["default"].createElement(_TableActions["default"], {
60
- editUrl: editUrl,
61
- data: data,
62
- showDeleteModal: toggleModal
63
- });
64
- return rowProps;
39
+ }))
65
40
  });
66
- };
67
- var getSanitizedColumnLabel = function getSanitizedColumnLabel(columnProp) {
68
- var sanitizedChar = '';
69
- for (var index = 0; index < columnProp.length; index += 1) {
70
- if (index && columnProp[index] === columnProp[index].toUpperCase()) sanitizedChar = "".concat(sanitizedChar, " ").concat(columnProp[index].toLowerCase());else sanitizedChar += columnProp[index];
41
+ if (!isEnquiry) rowProps.actions = /*#__PURE__*/_react.default.createElement(_TableActions.default, {
42
+ editUrl: editUrl,
43
+ data: data,
44
+ showDeleteModal: toggleModal
45
+ });
46
+ return rowProps;
47
+ });
48
+ exports.formatRows = formatRows;
49
+ const getSanitizedColumnLabel = columnProp => {
50
+ let sanitizedChar = '';
51
+ for (let index = 0; index < columnProp.length; index += 1) {
52
+ if (index && columnProp[index] === columnProp[index].toUpperCase()) sanitizedChar = `${sanitizedChar} ${columnProp[index].toLowerCase()}`;else sanitizedChar += columnProp[index];
71
53
  }
72
54
  return sanitizedChar;
73
55
  };
74
- var buildArrayRowContent = function buildArrayRowContent(rowData) {
75
- return /*#__PURE__*/_react["default"].createElement("div", {
76
- className: "table-row-list"
77
- }, rowData.map(function (rowGroup) {
78
- if (!rowGroup.length) return null;
79
- return /*#__PURE__*/_react["default"].createElement("div", {
80
- className: "table-row-list__group"
81
- }, rowGroup.map(function (item) {
82
- return /*#__PURE__*/_react["default"].createElement("div", {
83
- className: "table-row-list__group__item"
84
- }, /*#__PURE__*/_react["default"].createElement("span", {
85
- className: "table-row-list__group__item__label"
86
- }, /*#__PURE__*/_react["default"].createElement(_InfoBoxLabel["default"], {
87
- item: item
88
- })), /*#__PURE__*/_react["default"].createElement("span", {
89
- className: "table-row-list__group__item__value"
90
- }, /*#__PURE__*/_react["default"].createElement(_InfoBoxValue["default"], {
91
- item: item
92
- }), /*#__PURE__*/_react["default"].createElement(_InfoBoxTooltip["default"], {
93
- info: item
94
- })));
95
- }));
96
- }));
97
- };
98
- var buildArrayRowData = function buildArrayRowData(rowData) {
99
- var groupSize = Math.ceil(rowData.length / 3);
100
- var group1 = rowData.slice(0, groupSize);
101
- var group2 = rowData.slice(groupSize, groupSize * 2);
102
- var group3 = rowData.slice(groupSize * 2);
103
- var dataGroups = [group1, group2, group3];
56
+ const buildArrayRowContent = rowData => /*#__PURE__*/_react.default.createElement("div", {
57
+ className: "table-row-list"
58
+ }, rowData.map(rowGroup => {
59
+ if (!rowGroup.length) return null;
60
+ return /*#__PURE__*/_react.default.createElement("div", {
61
+ className: "table-row-list__group"
62
+ }, rowGroup.map(item => /*#__PURE__*/_react.default.createElement("div", {
63
+ className: "table-row-list__group__item"
64
+ }, /*#__PURE__*/_react.default.createElement("span", {
65
+ className: "table-row-list__group__item__label"
66
+ }, /*#__PURE__*/_react.default.createElement(_InfoBoxLabel.default, {
67
+ item: item
68
+ })), /*#__PURE__*/_react.default.createElement("span", {
69
+ className: "table-row-list__group__item__value"
70
+ }, /*#__PURE__*/_react.default.createElement(_InfoBoxValue.default, {
71
+ item: item
72
+ }), /*#__PURE__*/_react.default.createElement(_InfoBoxTooltip.default, {
73
+ info: item
74
+ })))));
75
+ }));
76
+ const buildArrayRowData = rowData => {
77
+ const groupSize = Math.ceil(rowData.length / 3);
78
+ const group1 = rowData.slice(0, groupSize);
79
+ const group2 = rowData.slice(groupSize, groupSize * 2);
80
+ const group3 = rowData.slice(groupSize * 2);
81
+ const dataGroups = [group1, group2, group3];
104
82
  return buildArrayRowContent(dataGroups);
105
83
  };
106
- var getParsedRowData = exports.getParsedRowData = function getParsedRowData(rows) {
107
- return rows.map(function (rowData) {
108
- return Object.keys(rowData).reduce(function (acc, key) {
109
- var parsedData = Array.isArray(rowData[key]) ? buildArrayRowData(rowData[key]) : rowData[key];
110
- return _objectSpread(_objectSpread({}, acc), {}, (0, _defineProperty2["default"])({}, key, parsedData));
111
- }, {});
84
+ const getParsedRowData = rows => rows.map(rowData => Object.keys(rowData).reduce((acc, key) => {
85
+ const parsedData = Array.isArray(rowData[key]) ? buildArrayRowData(rowData[key]) : rowData[key];
86
+ return _objectSpread(_objectSpread({}, acc), {}, {
87
+ [key]: parsedData
112
88
  });
113
- };
114
- var getColumnsAndLabels = function getColumnsAndLabels(listingProperties, allProperties, rows) {
115
- var columns = [];
116
- var labels = {};
117
- listingProperties.forEach(function (listingProperty) {
118
- var propKey = listingProperty.includes(' ') ? listingProperty.split(' ')[0] : listingProperty;
119
- var _ref2 = allProperties[propKey] || {},
120
- label = _ref2.label;
89
+ }, {}));
90
+ exports.getParsedRowData = getParsedRowData;
91
+ const getColumnsAndLabels = (listingProperties, allProperties, rows) => {
92
+ const columns = [];
93
+ const labels = {};
94
+ listingProperties.forEach(listingProperty => {
95
+ const propKey = listingProperty.includes(' ') ? listingProperty.split(' ')[0] : listingProperty;
96
+ const {
97
+ label
98
+ } = allProperties[propKey] || {};
121
99
  columns.push(propKey);
122
100
  labels[propKey] = label || getSanitizedColumnLabel(propKey);
123
101
  });
124
- var parsedRowData = getParsedRowData(rows);
102
+ const parsedRowData = getParsedRowData(rows);
125
103
  return {
126
- columns: columns,
127
- labels: labels,
128
- parsedRowData: parsedRowData
104
+ columns,
105
+ labels,
106
+ parsedRowData
129
107
  };
130
108
  };
131
- var populateRows = exports.populateRows = function populateRows(_ref3) {
132
- var toggleModal = _ref3.toggleModal,
133
- url = _ref3.url,
134
- entitySchema = _ref3.entitySchema,
135
- rows = _ref3.rows;
136
- var schemaId = entitySchema.id,
137
- listingProperties = entitySchema.listingProperties,
138
- properties = entitySchema.properties,
139
- _entitySchema$dynamic = entitySchema.dynamicProperties,
140
- dynamicProperties = _entitySchema$dynamic === void 0 ? {} : _entitySchema$dynamic,
141
- formProperties = entitySchema.formProperties;
142
- var isEnquiry = schemaId === 'enquiry';
143
- var columnOptions = !isEnquiry ? [].concat((0, _toConsumableArray2["default"])(listingProperties), [_constants.ACTIONS]) : (0, _toConsumableArray2["default"])(listingProperties);
144
- var allProperties = _objectSpread(_objectSpread({}, properties), dynamicProperties);
145
- var _getColumnsAndLabels = getColumnsAndLabels(columnOptions, allProperties, rows),
146
- columns = _getColumnsAndLabels.columns,
147
- labels = _getColumnsAndLabels.labels,
148
- parsedRowData = _getColumnsAndLabels.parsedRowData;
149
- var _columns = (0, _slicedToArray2["default"])(columns, 1),
150
- firstColumn = _columns[0];
109
+ const populateRows = ({
110
+ toggleModal,
111
+ url,
112
+ entitySchema,
113
+ rows
114
+ }) => {
115
+ const {
116
+ id: schemaId,
117
+ listingProperties,
118
+ properties,
119
+ dynamicProperties = {},
120
+ formProperties
121
+ } = entitySchema;
122
+ const isEnquiry = schemaId === 'enquiry';
123
+ const columnOptions = !isEnquiry ? [...listingProperties, _constants.ACTIONS] : [...listingProperties];
124
+ const allProperties = _objectSpread(_objectSpread({}, properties), dynamicProperties);
125
+ const {
126
+ columns,
127
+ labels,
128
+ parsedRowData
129
+ } = getColumnsAndLabels(columnOptions, allProperties, rows);
130
+ const [firstColumn] = columns;
151
131
  return {
152
132
  identification: 'id',
153
133
  sort: null,
154
- columns: columns,
155
- labels: labels,
156
- orderBy: (0, _toConsumableArray2["default"])(formProperties),
134
+ columns,
135
+ labels,
136
+ orderBy: [...formProperties],
157
137
  rows: formatRows({
158
- firstColumn: firstColumn,
138
+ firstColumn,
159
139
  rows: parsedRowData,
160
- url: url,
161
- toggleModal: toggleModal,
162
- isEnquiry: isEnquiry,
163
- entitySchema: entitySchema
140
+ url,
141
+ toggleModal,
142
+ isEnquiry,
143
+ entitySchema
164
144
  }),
165
- isEnquiry: isEnquiry
145
+ isEnquiry
166
146
  };
167
147
  };
148
+ exports.populateRows = populateRows;
168
149
  //# sourceMappingURL=populate-rows.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"populate-rows.js","names":["_react","_interopRequireDefault","require","_reactRouterDom","_pluginRenderHooksUi","_TableActions","_constants","_InfoBoxValue","_InfoBoxLabel","_InfoBoxTooltip","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","formatRows","exports","_ref","rows","url","toggleModal","label","_ref$firstColumn","firstColumn","isEnquiry","entitySchema","map","data","editUrl","concat","id","rowProps","createElement","Fragment","Link","to","role","RenderHook","hookKey","schema","value","column","actions","showDeleteModal","getSanitizedColumnLabel","columnProp","sanitizedChar","index","toUpperCase","toLowerCase","buildArrayRowContent","rowData","className","rowGroup","item","info","buildArrayRowData","groupSize","Math","ceil","group1","slice","group2","group3","dataGroups","getParsedRowData","reduce","acc","key","parsedData","Array","isArray","getColumnsAndLabels","listingProperties","allProperties","columns","labels","listingProperty","propKey","includes","split","_ref2","parsedRowData","populateRows","_ref3","schemaId","properties","_entitySchema$dynamic","dynamicProperties","formProperties","columnOptions","_toConsumableArray2","ACTIONS","_getColumnsAndLabels","_columns","_slicedToArray2","identification","sort","orderBy"],"sources":["../../../../src/components/ListingTable/mappers/populate-rows.js"],"sourcesContent":["import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { RenderHook } from '@blaze-cms/plugin-render-hooks-ui';\nimport TableActions from '../TableActions';\nimport { ACTIONS } from '../../../constants';\nimport InfoBoxValue from '../../InfoBoxes/presentational/InfoBoxValue';\nimport InfoBoxLabel from '../../InfoBoxes/presentational/InfoBoxLabel';\nimport InfoBoxTooltip from '../../InfoBoxes/InfoBoxTooltip';\n\nconst formatRows = ({\n rows,\n url,\n toggleModal,\n label,\n firstColumn = 'name',\n isEnquiry,\n entitySchema\n}) =>\n rows.map(data => {\n const editUrl = `${url}/update/${data.id}`;\n\n const rowProps = {\n ...data,\n [firstColumn]: (\n <>\n <Link to={editUrl} role=\"button\">\n {data[firstColumn]}\n </Link>\n <RenderHook\n hookKey=\"entity:listing:table:row:column:after\"\n schema={entitySchema}\n data={data}\n value={data[firstColumn]}\n column={firstColumn}\n />\n </>\n )\n };\n if (!isEnquiry)\n rowProps.actions = (\n <TableActions editUrl={editUrl} data={data} showDeleteModal={toggleModal} />\n );\n return rowProps;\n });\n\nconst getSanitizedColumnLabel = columnProp => {\n let sanitizedChar = '';\n\n for (let index = 0; index < columnProp.length; index += 1) {\n if (index && columnProp[index] === columnProp[index].toUpperCase())\n sanitizedChar = `${sanitizedChar} ${columnProp[index].toLowerCase()}`;\n else sanitizedChar += columnProp[index];\n }\n return sanitizedChar;\n};\n\nconst buildArrayRowContent = rowData => (\n <div className=\"table-row-list\">\n {rowData.map(rowGroup => {\n if (!rowGroup.length) return null;\n return (\n <div className=\"table-row-list__group\">\n {rowGroup.map(item => (\n <div className=\"table-row-list__group__item\">\n <span className=\"table-row-list__group__item__label\">\n <InfoBoxLabel item={item} />\n </span>\n <span className=\"table-row-list__group__item__value\">\n <InfoBoxValue item={item} />\n <InfoBoxTooltip info={item} />\n </span>\n </div>\n ))}\n </div>\n );\n })}\n </div>\n);\n\nconst buildArrayRowData = rowData => {\n const groupSize = Math.ceil(rowData.length / 3);\n const group1 = rowData.slice(0, groupSize);\n const group2 = rowData.slice(groupSize, groupSize * 2);\n const group3 = rowData.slice(groupSize * 2);\n const dataGroups = [group1, group2, group3];\n\n return buildArrayRowContent(dataGroups);\n};\n\nconst getParsedRowData = rows =>\n rows.map(rowData =>\n Object.keys(rowData).reduce((acc, key) => {\n const parsedData = Array.isArray(rowData[key])\n ? buildArrayRowData(rowData[key])\n : rowData[key];\n return { ...acc, [key]: parsedData };\n }, {})\n );\n\nconst getColumnsAndLabels = (listingProperties, allProperties, rows) => {\n const columns = [];\n const labels = {};\n\n listingProperties.forEach(listingProperty => {\n const propKey = listingProperty.includes(' ') ? listingProperty.split(' ')[0] : listingProperty;\n const { label } = allProperties[propKey] || {};\n columns.push(propKey);\n labels[propKey] = label || getSanitizedColumnLabel(propKey);\n });\n const parsedRowData = getParsedRowData(rows);\n\n return { columns, labels, parsedRowData };\n};\n\nconst populateRows = ({ toggleModal, url, entitySchema, rows }) => {\n const {\n id: schemaId,\n listingProperties,\n properties,\n dynamicProperties = {},\n formProperties\n } = entitySchema;\n\n const isEnquiry = schemaId === 'enquiry';\n const columnOptions = !isEnquiry ? [...listingProperties, ACTIONS] : [...listingProperties];\n\n const allProperties = { ...properties, ...dynamicProperties };\n const { columns, labels, parsedRowData } = getColumnsAndLabels(\n columnOptions,\n allProperties,\n rows\n );\n const [firstColumn] = columns;\n\n return {\n identification: 'id',\n sort: null,\n columns,\n labels,\n orderBy: [...formProperties],\n rows: formatRows({\n firstColumn,\n rows: parsedRowData,\n url,\n toggleModal,\n isEnquiry,\n entitySchema\n }),\n isEnquiry\n };\n};\n\nexport { populateRows, formatRows, getParsedRowData };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,aAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,eAAA,GAAAR,sBAAA,CAAAC,OAAA;AAA4D,SAAAQ,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,QAAAe,gBAAA,aAAAhB,CAAA,EAAAC,CA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MAAAP,mBAAA,aAAMF,cAAc,CAAC;IAC5BvE,IAAI,EAAEH,UAAU,CAAC;MACfQ,WAAW,EAAXA,WAAW;MACXL,IAAI,EAAEgE,aAAa;MACnB/D,GAAG,EAAHA,GAAG;MACHC,WAAW,EAAXA,WAAW;MACXI,SAAS,EAATA,SAAS;MACTC,YAAY,EAAZA;IACF,CAAC,CAAC;IACFD,SAAS,EAATA;EACF,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"populate-rows.js","names":["_react","_interopRequireDefault","require","_reactRouterDom","_pluginRenderHooksUi","_TableActions","_constants","_InfoBoxValue","_InfoBoxLabel","_InfoBoxTooltip","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","formatRows","rows","url","toggleModal","label","firstColumn","isEnquiry","entitySchema","map","data","editUrl","id","rowProps","createElement","Fragment","Link","to","role","RenderHook","hookKey","schema","value","column","actions","showDeleteModal","exports","getSanitizedColumnLabel","columnProp","sanitizedChar","index","toUpperCase","toLowerCase","buildArrayRowContent","rowData","className","rowGroup","item","info","buildArrayRowData","groupSize","Math","ceil","group1","slice","group2","group3","dataGroups","getParsedRowData","reduce","acc","key","parsedData","Array","isArray","getColumnsAndLabels","listingProperties","allProperties","columns","labels","listingProperty","propKey","includes","split","parsedRowData","populateRows","schemaId","properties","dynamicProperties","formProperties","columnOptions","ACTIONS","identification","sort","orderBy"],"sources":["../../../../src/components/ListingTable/mappers/populate-rows.js"],"sourcesContent":["import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { RenderHook } from '@blaze-cms/plugin-render-hooks-ui';\nimport TableActions from '../TableActions';\nimport { ACTIONS } from '../../../constants';\nimport InfoBoxValue from '../../InfoBoxes/presentational/InfoBoxValue';\nimport InfoBoxLabel from '../../InfoBoxes/presentational/InfoBoxLabel';\nimport InfoBoxTooltip from '../../InfoBoxes/InfoBoxTooltip';\n\nconst formatRows = ({\n rows,\n url,\n toggleModal,\n label,\n firstColumn = 'name',\n isEnquiry,\n entitySchema\n}) =>\n rows.map(data => {\n const editUrl = `${url}/update/${data.id}`;\n\n const rowProps = {\n ...data,\n [firstColumn]: (\n <>\n <Link to={editUrl} role=\"button\">\n {data[firstColumn]}\n </Link>\n <RenderHook\n hookKey=\"entity:listing:table:row:column:after\"\n schema={entitySchema}\n data={data}\n value={data[firstColumn]}\n column={firstColumn}\n />\n </>\n )\n };\n if (!isEnquiry)\n rowProps.actions = (\n <TableActions editUrl={editUrl} data={data} showDeleteModal={toggleModal} />\n );\n return rowProps;\n });\n\nconst getSanitizedColumnLabel = columnProp => {\n let sanitizedChar = '';\n\n for (let index = 0; index < columnProp.length; index += 1) {\n if (index && columnProp[index] === columnProp[index].toUpperCase())\n sanitizedChar = `${sanitizedChar} ${columnProp[index].toLowerCase()}`;\n else sanitizedChar += columnProp[index];\n }\n return sanitizedChar;\n};\n\nconst buildArrayRowContent = rowData => (\n <div className=\"table-row-list\">\n {rowData.map(rowGroup => {\n if (!rowGroup.length) return null;\n return (\n <div className=\"table-row-list__group\">\n {rowGroup.map(item => (\n <div className=\"table-row-list__group__item\">\n <span className=\"table-row-list__group__item__label\">\n <InfoBoxLabel item={item} />\n </span>\n <span className=\"table-row-list__group__item__value\">\n <InfoBoxValue item={item} />\n <InfoBoxTooltip info={item} />\n </span>\n </div>\n ))}\n </div>\n );\n })}\n </div>\n);\n\nconst buildArrayRowData = rowData => {\n const groupSize = Math.ceil(rowData.length / 3);\n const group1 = rowData.slice(0, groupSize);\n const group2 = rowData.slice(groupSize, groupSize * 2);\n const group3 = rowData.slice(groupSize * 2);\n const dataGroups = [group1, group2, group3];\n\n return buildArrayRowContent(dataGroups);\n};\n\nconst getParsedRowData = rows =>\n rows.map(rowData =>\n Object.keys(rowData).reduce((acc, key) => {\n const parsedData = Array.isArray(rowData[key])\n ? buildArrayRowData(rowData[key])\n : rowData[key];\n return { ...acc, [key]: parsedData };\n }, {})\n );\n\nconst getColumnsAndLabels = (listingProperties, allProperties, rows) => {\n const columns = [];\n const labels = {};\n\n listingProperties.forEach(listingProperty => {\n const propKey = listingProperty.includes(' ') ? listingProperty.split(' ')[0] : listingProperty;\n const { label } = allProperties[propKey] || {};\n columns.push(propKey);\n labels[propKey] = label || getSanitizedColumnLabel(propKey);\n });\n const parsedRowData = getParsedRowData(rows);\n\n return { columns, labels, parsedRowData };\n};\n\nconst populateRows = ({ toggleModal, url, entitySchema, rows }) => {\n const {\n id: schemaId,\n listingProperties,\n properties,\n dynamicProperties = {},\n formProperties\n } = entitySchema;\n\n const isEnquiry = schemaId === 'enquiry';\n const columnOptions = !isEnquiry ? [...listingProperties, ACTIONS] : [...listingProperties];\n\n const allProperties = { ...properties, ...dynamicProperties };\n const { columns, labels, parsedRowData } = getColumnsAndLabels(\n columnOptions,\n allProperties,\n rows\n );\n const [firstColumn] = columns;\n\n return {\n identification: 'id',\n sort: null,\n columns,\n labels,\n orderBy: [...formProperties],\n rows: formatRows({\n firstColumn,\n rows: parsedRowData,\n url,\n toggleModal,\n isEnquiry,\n entitySchema\n }),\n isEnquiry\n };\n};\n\nexport { populateRows, formatRows, getParsedRowData };\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,aAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,eAAA,GAAAR,sBAAA,CAAAC,OAAA;AAA4D,SAAAQ,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE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