@blaze-cms/plugin-data-ui 0.146.0-alpha.5 → 0.146.0-alpha.51

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 (98) hide show
  1. package/CHANGELOG.md +233 -0
  2. package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js +1 -0
  3. package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -1
  4. package/lib/components/EntityManager/Entity/Entity.js +47 -48
  5. package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
  6. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +9 -3
  7. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  8. package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +2 -1
  9. package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
  10. package/lib/components/EntityManager/Entity/SideBarRelations/index.js +5 -6
  11. package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  12. package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +9 -2
  13. package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
  14. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js +1 -1
  15. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  16. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js +1 -1
  17. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
  18. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js +1 -1
  19. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  20. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js +1 -1
  21. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
  22. package/lib/components/EntityManager/EntityManager.js +6 -7
  23. package/lib/components/EntityManager/EntityManager.js.map +1 -1
  24. package/lib/components/EntityManager/utils/entity.js +9 -3
  25. package/lib/components/EntityManager/utils/entity.js.map +1 -1
  26. package/lib/components/EntityManager/utils/entityAvailableActions.js +2 -2
  27. package/lib/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
  28. package/lib/components/InfoBoxes/InfoBoxTooltip.js +40 -0
  29. package/lib/components/InfoBoxes/InfoBoxTooltip.js.map +1 -0
  30. package/lib/components/InfoBoxes/InfoBoxes.js +1 -0
  31. package/lib/components/InfoBoxes/InfoBoxes.js.map +1 -1
  32. package/lib/components/InfoBoxes/container/InfoBoxContainer.js +1 -2
  33. package/lib/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -1
  34. package/lib/components/InfoBoxes/helpers/build-dynamic-query.js +2 -1
  35. package/lib/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
  36. package/lib/components/InfoBoxes/presentational/InfoBox.js +4 -1
  37. package/lib/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
  38. package/lib/components/ListingTable/ListingTable.js +19 -19
  39. package/lib/components/ListingTable/ListingTable.js.map +1 -1
  40. package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  41. package/lib/components/ListingTable/TableActions/TableActions.js.map +1 -1
  42. package/lib/components/ListingTable/mappers/populate-rows.js +16 -4
  43. package/lib/components/ListingTable/mappers/populate-rows.js.map +1 -1
  44. package/lib/components/ListingTable/service/index.js +2 -1
  45. package/lib/components/ListingTable/service/index.js.map +1 -1
  46. package/lib/components/Tabs/index.js +1 -2
  47. package/lib/components/Tabs/index.js.map +1 -1
  48. package/lib/index.js +5 -6
  49. package/lib/index.js.map +1 -1
  50. package/lib/utils/add-content-menu-items.js +1 -1
  51. package/lib/utils/add-content-menu-items.js.map +1 -1
  52. package/lib-es/components/EntityManager/Entity/Entity.js.map +1 -1
  53. package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  54. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +4 -1
  55. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  56. package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +2 -0
  57. package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
  58. package/lib-es/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -1
  59. package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +8 -2
  60. package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
  61. package/lib-es/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  62. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  63. package/lib-es/components/EntityManager/EntityManager.js.map +1 -1
  64. package/lib-es/components/EntityManager/utils/entity.js +4 -1
  65. package/lib-es/components/EntityManager/utils/entity.js.map +1 -1
  66. package/lib-es/components/EntityManager/utils/query.js.map +1 -1
  67. package/lib-es/components/InfoBoxes/InfoBoxTooltip.js +36 -0
  68. package/lib-es/components/InfoBoxes/InfoBoxTooltip.js.map +1 -0
  69. package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js +2 -0
  70. package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
  71. package/lib-es/components/InfoBoxes/hooks/useData.js.map +1 -1
  72. package/lib-es/components/InfoBoxes/presentational/InfoBox.js +4 -1
  73. package/lib-es/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
  74. package/lib-es/components/InfoBoxes/presentational/InfoBoxLabel.js.map +1 -1
  75. package/lib-es/components/ListingTable/ListingTable.js +2 -1
  76. package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
  77. package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  78. package/lib-es/components/ListingTable/mappers/populate-rows.js +16 -4
  79. package/lib-es/components/ListingTable/mappers/populate-rows.js.map +1 -1
  80. package/lib-es/components/ListingTable/service/index.js.map +1 -1
  81. package/lib-es/index.js +2 -2
  82. package/lib-es/index.js.map +1 -1
  83. package/lib-es/utils/add-content-menu-items.js.map +1 -1
  84. package/lib-es/utils/build-create-entity-mutation.js.map +1 -1
  85. package/lib-es/utils/build-delete-entity-mutation.js.map +1 -1
  86. package/lib-es/utils/build-listing-query.js.map +1 -1
  87. package/lib-es/utils/build-update-data-query.js.map +1 -1
  88. package/lib-es/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  89. package/package.json +8 -7
  90. package/src/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +4 -1
  91. package/src/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +2 -0
  92. package/src/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +5 -3
  93. package/src/components/EntityManager/utils/entity.js +4 -1
  94. package/src/components/InfoBoxes/InfoBoxTooltip.js +32 -0
  95. package/src/components/InfoBoxes/helpers/build-dynamic-query.js +2 -0
  96. package/src/components/InfoBoxes/presentational/InfoBox.js +4 -2
  97. package/src/components/ListingTable/ListingTable.js +2 -1
  98. package/src/components/ListingTable/mappers/populate-rows.js +33 -5
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import InfoBoxValue from './InfoBoxValue';
4
4
  import InfoBoxLabel from './InfoBoxLabel';
5
+ import InfoBoxTooltip from '../InfoBoxTooltip';
5
6
 
6
7
  const InfoBox = ({ items, infoBoxKey }) => {
7
8
  if (!items) return null;
@@ -18,6 +19,7 @@ const InfoBox = ({ items, infoBoxKey }) => {
18
19
  </div>
19
20
  <div className="info-box--value">
20
21
  <InfoBoxValue item={info} />
22
+ <InfoBoxTooltip info={info} />
21
23
  </div>
22
24
  </div>
23
25
  );
@@ -32,9 +34,9 @@ const InfoBox = ({ items, infoBoxKey }) => {
32
34
  );
33
35
  };
34
36
 
35
- export default InfoBox;
36
-
37
37
  InfoBox.propTypes = {
38
38
  infoBoxKey: PropTypes.string.isRequired,
39
39
  items: PropTypes.array.isRequired
40
40
  };
41
+
42
+ export default InfoBox;
@@ -138,7 +138,8 @@ const ListingTable = ({ match, entitySchema, history }) => {
138
138
  url: match.url,
139
139
  toggleModal,
140
140
  firstColumn,
141
- isEnquiry
141
+ isEnquiry,
142
+ entitySchema
142
143
  })
143
144
  });
144
145
  history.push('?page=1');
@@ -1,19 +1,39 @@
1
1
  import React from 'react';
2
2
  import { Link } from 'react-router-dom';
3
+ import { RenderHook } from '@blaze-cms/plugin-render-hooks-ui';
3
4
  import TableActions from '../TableActions';
4
5
  import { ACTIONS } from '../../../constants';
5
6
  import InfoBoxValue from '../../InfoBoxes/presentational/InfoBoxValue';
6
7
  import InfoBoxLabel from '../../InfoBoxes/presentational/InfoBoxLabel';
8
+ import InfoBoxTooltip from '../../InfoBoxes/InfoBoxTooltip';
7
9
 
8
- const formatRows = ({ rows, url, toggleModal, label, firstColumn = 'name', isEnquiry }) =>
10
+ const formatRows = ({
11
+ rows,
12
+ url,
13
+ toggleModal,
14
+ label,
15
+ firstColumn = 'name',
16
+ isEnquiry,
17
+ entitySchema
18
+ }) =>
9
19
  rows.map(data => {
10
20
  const editUrl = `${url}/update/${data.id}`;
21
+
11
22
  const rowProps = {
12
23
  ...data,
13
24
  [firstColumn]: (
14
- <Link to={editUrl} role="button">
15
- {data[firstColumn]}
16
- </Link>
25
+ <>
26
+ <Link to={editUrl} role="button">
27
+ {data[firstColumn]}
28
+ </Link>
29
+ <RenderHook
30
+ hookKey="entity:listing:table:row:column:after"
31
+ schema={entitySchema}
32
+ data={data}
33
+ value={data[firstColumn]}
34
+ column={firstColumn}
35
+ />
36
+ </>
17
37
  )
18
38
  };
19
39
  if (!isEnquiry)
@@ -47,6 +67,7 @@ const buildArrayRowContent = rowData => (
47
67
  </span>
48
68
  <span className="table-row-list__group__item__value">
49
69
  <InfoBoxValue item={item} />
70
+ <InfoBoxTooltip info={item} />
50
71
  </span>
51
72
  </div>
52
73
  ))}
@@ -117,7 +138,14 @@ const populateRows = ({ toggleModal, url, entitySchema, rows }) => {
117
138
  columns,
118
139
  labels,
119
140
  orderBy: [...formProperties],
120
- rows: formatRows({ firstColumn, rows: parsedRowData, url, toggleModal, isEnquiry }),
141
+ rows: formatRows({
142
+ firstColumn,
143
+ rows: parsedRowData,
144
+ url,
145
+ toggleModal,
146
+ isEnquiry,
147
+ entitySchema
148
+ }),
121
149
  isEnquiry
122
150
  };
123
151
  };