@blaze-cms/plugin-data-ui 0.146.0-alpha.4 → 0.146.0-alpha.40
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.
- package/CHANGELOG.md +190 -0
- package/lib/components/EntityDataListing/EntityDataListing.js.map +1 -1
- package/lib/components/EntityDataListing/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/Entity.js +12 -12
- package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/index.js +3 -3
- package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +10 -3
- package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js +5 -5
- package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
- package/lib/components/EntityManager/Entity/index.js.map +1 -1
- package/lib/components/EntityManager/EntityManager.js +6 -6
- package/lib/components/EntityManager/EntityManager.js.map +1 -1
- package/lib/components/EntityManager/index.js.map +1 -1
- package/lib/components/EntityManager/utils/RecordEditContext/index.js.map +1 -1
- package/lib/components/EntityManager/utils/data-mappers.js +8 -8
- package/lib/components/EntityManager/utils/data-mappers.js.map +1 -1
- package/lib/components/EntityManager/utils/entity.js +7 -7
- package/lib/components/EntityManager/utils/entity.js.map +1 -1
- package/lib/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
- package/lib/components/EntityManager/utils/is-form-empty.js.map +1 -1
- package/lib/components/EntityManager/utils/query.js.map +1 -1
- package/lib/components/InfoBoxes/InfoBoxTooltip.js +40 -0
- package/lib/components/InfoBoxes/InfoBoxTooltip.js.map +1 -0
- package/lib/components/InfoBoxes/InfoBoxes.js.map +1 -1
- package/lib/components/InfoBoxes/container/InfoBoxContainer.js +3 -3
- package/lib/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -1
- package/lib/components/InfoBoxes/helpers/build-dynamic-query.js +1 -1
- package/lib/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
- package/lib/components/InfoBoxes/hooks/useData.js.map +1 -1
- package/lib/components/InfoBoxes/hooks/useInfoBox.js.map +1 -1
- package/lib/components/InfoBoxes/index.js.map +1 -1
- package/lib/components/InfoBoxes/presentational/InfoBox.js +6 -3
- package/lib/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
- package/lib/components/InfoBoxes/presentational/InfoBoxLabel.js.map +1 -1
- package/lib/components/InfoBoxes/presentational/InfoBoxValue.js.map +1 -1
- package/lib/components/ListingTable/ListingTable.js +13 -12
- package/lib/components/ListingTable/ListingTable.js.map +1 -1
- package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
- package/lib/components/ListingTable/ListingTableContent/index.js.map +1 -1
- package/lib/components/ListingTable/TableActions/TableActions.js.map +1 -1
- package/lib/components/ListingTable/TableActions/index.js.map +1 -1
- package/lib/components/ListingTable/index.js.map +1 -1
- package/lib/components/ListingTable/mappers/populate-rows.js +25 -13
- package/lib/components/ListingTable/mappers/populate-rows.js.map +1 -1
- package/lib/components/ListingTable/service/index.js +6 -6
- package/lib/components/ListingTable/service/index.js.map +1 -1
- package/lib/components/Tabs/index.js +2 -2
- package/lib/components/Tabs/index.js.map +1 -1
- package/lib/components/hooks/useCallbackDebounce.js.map +1 -1
- package/lib/constants.js.map +1 -1
- package/lib/icons/ContentIcon.js.map +1 -1
- package/lib/icons/SettingsIcon.js.map +1 -1
- package/lib/icons/TaxonomyIcon.js.map +1 -1
- package/lib/icons/UsersIcon.js.map +1 -1
- package/lib/icons/index.js.map +1 -1
- package/lib/index.js +6 -6
- package/lib/index.js.map +1 -1
- package/lib/utils/add-content-menu-items.js +1 -1
- package/lib/utils/add-content-menu-items.js.map +1 -1
- package/lib/utils/build-create-entity-mutation.js.map +1 -1
- package/lib/utils/build-delete-entity-mutation.js.map +1 -1
- package/lib/utils/build-listing-query.js.map +1 -1
- package/lib/utils/build-update-data-query.js.map +1 -1
- package/lib/utils/build-update-publish-unpublish-mutation.js.map +1 -1
- package/lib/utils/get-default-query-params.js.map +1 -1
- package/lib/utils/hoc/withContext.js.map +1 -1
- package/lib/utils/hooks/useToggle.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib-es/components/EntityDataListing/EntityDataListing.js.map +1 -1
- package/lib-es/components/EntityDataListing/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/Entity.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +2 -0
- package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +8 -2
- package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/index.js.map +1 -1
- package/lib-es/components/EntityManager/EntityManager.js.map +1 -1
- package/lib-es/components/EntityManager/index.js.map +1 -1
- package/lib-es/components/EntityManager/utils/RecordEditContext/index.js.map +1 -1
- package/lib-es/components/EntityManager/utils/data-mappers.js.map +1 -1
- package/lib-es/components/EntityManager/utils/entity.js.map +1 -1
- package/lib-es/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
- package/lib-es/components/EntityManager/utils/is-form-empty.js.map +1 -1
- package/lib-es/components/EntityManager/utils/query.js.map +1 -1
- package/lib-es/components/InfoBoxes/InfoBoxTooltip.js +36 -0
- package/lib-es/components/InfoBoxes/InfoBoxTooltip.js.map +1 -0
- package/lib-es/components/InfoBoxes/InfoBoxes.js.map +1 -1
- package/lib-es/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -1
- package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js +2 -0
- package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
- package/lib-es/components/InfoBoxes/hooks/useData.js.map +1 -1
- package/lib-es/components/InfoBoxes/hooks/useInfoBox.js.map +1 -1
- package/lib-es/components/InfoBoxes/index.js.map +1 -1
- package/lib-es/components/InfoBoxes/presentational/InfoBox.js +4 -1
- package/lib-es/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
- package/lib-es/components/InfoBoxes/presentational/InfoBoxLabel.js.map +1 -1
- package/lib-es/components/InfoBoxes/presentational/InfoBoxValue.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTable.js +2 -1
- package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTableContent/index.js.map +1 -1
- package/lib-es/components/ListingTable/TableActions/TableActions.js.map +1 -1
- package/lib-es/components/ListingTable/TableActions/index.js.map +1 -1
- package/lib-es/components/ListingTable/index.js.map +1 -1
- package/lib-es/components/ListingTable/mappers/populate-rows.js +16 -4
- package/lib-es/components/ListingTable/mappers/populate-rows.js.map +1 -1
- package/lib-es/components/ListingTable/service/index.js.map +1 -1
- package/lib-es/components/Tabs/index.js.map +1 -1
- package/lib-es/components/hooks/useCallbackDebounce.js.map +1 -1
- package/lib-es/constants.js.map +1 -1
- package/lib-es/icons/ContentIcon.js.map +1 -1
- package/lib-es/icons/SettingsIcon.js.map +1 -1
- package/lib-es/icons/TaxonomyIcon.js.map +1 -1
- package/lib-es/icons/UsersIcon.js.map +1 -1
- package/lib-es/icons/index.js.map +1 -1
- package/lib-es/index.js.map +1 -1
- package/lib-es/utils/add-content-menu-items.js.map +1 -1
- package/lib-es/utils/build-create-entity-mutation.js.map +1 -1
- package/lib-es/utils/build-delete-entity-mutation.js.map +1 -1
- package/lib-es/utils/build-listing-query.js.map +1 -1
- package/lib-es/utils/build-update-data-query.js.map +1 -1
- package/lib-es/utils/build-update-publish-unpublish-mutation.js.map +1 -1
- package/lib-es/utils/get-default-query-params.js.map +1 -1
- package/lib-es/utils/hoc/withContext.js.map +1 -1
- package/lib-es/utils/hooks/useToggle.js.map +1 -1
- package/lib-es/utils/index.js.map +1 -1
- package/package.json +8 -7
- package/src/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +2 -0
- package/src/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +5 -3
- package/src/components/InfoBoxes/InfoBoxTooltip.js +32 -0
- package/src/components/InfoBoxes/helpers/build-dynamic-query.js +2 -0
- package/src/components/InfoBoxes/presentational/InfoBox.js +4 -2
- package/src/components/ListingTable/ListingTable.js +2 -1
- package/src/components/ListingTable/mappers/populate-rows.js +33 -5
package/src/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js
CHANGED
|
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import InfoBoxValue from '../../../../InfoBoxes/presentational/InfoBoxValue';
|
|
4
4
|
import InfoBoxLabel from '../../../../InfoBoxes/presentational/InfoBoxLabel';
|
|
5
|
+
import InfoBoxTooltip from '../../../../InfoBoxes/InfoBoxTooltip';
|
|
5
6
|
|
|
6
7
|
const CustomSidebarInfo = ({ items, customSidebarInfoKey }) => {
|
|
7
8
|
if (!items) return null;
|
|
@@ -12,10 +13,11 @@ const CustomSidebarInfo = ({ items, customSidebarInfoKey }) => {
|
|
|
12
13
|
if (!info.label || !info.value) return null;
|
|
13
14
|
|
|
14
15
|
return (
|
|
15
|
-
<p>
|
|
16
|
+
<p key={`${customSidebarInfoKey}-${info.label.toLowerCase()}`}>
|
|
16
17
|
<InfoBoxLabel item={info} />
|
|
17
18
|
<span>
|
|
18
19
|
<InfoBoxValue item={info} />
|
|
20
|
+
<InfoBoxTooltip info={info} position="left" />
|
|
19
21
|
</span>
|
|
20
22
|
</p>
|
|
21
23
|
);
|
|
@@ -30,9 +32,9 @@ const CustomSidebarInfo = ({ items, customSidebarInfoKey }) => {
|
|
|
30
32
|
);
|
|
31
33
|
};
|
|
32
34
|
|
|
33
|
-
export default CustomSidebarInfo;
|
|
34
|
-
|
|
35
35
|
CustomSidebarInfo.propTypes = {
|
|
36
36
|
customSidebarInfoKey: PropTypes.string.isRequired,
|
|
37
37
|
items: PropTypes.array.isRequired
|
|
38
38
|
};
|
|
39
|
+
|
|
40
|
+
export default CustomSidebarInfo;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Tooltip from '@blaze-react/tooltip';
|
|
4
|
+
|
|
5
|
+
const InfoBoxTooltip = ({ info, ...tooltipProps }) => {
|
|
6
|
+
const { tooltipContent, tooltipIcon } = info;
|
|
7
|
+
if (!tooltipContent) return null;
|
|
8
|
+
|
|
9
|
+
const renderTooltipIcon = icon => {
|
|
10
|
+
if (!icon) return null;
|
|
11
|
+
return <i className={`${icon} info-box--icon`} />;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Tooltip
|
|
16
|
+
tooltipContent={tooltipContent}
|
|
17
|
+
trigger="click"
|
|
18
|
+
className="info-box--tooltip"
|
|
19
|
+
{...tooltipProps}>
|
|
20
|
+
{renderTooltipIcon(tooltipIcon)}
|
|
21
|
+
</Tooltip>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
InfoBoxTooltip.propTypes = {
|
|
26
|
+
info: PropTypes.shape({
|
|
27
|
+
tooltipContent: PropTypes.node,
|
|
28
|
+
tooltipIcon: PropTypes.string
|
|
29
|
+
}).isRequired
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default InfoBoxTooltip;
|
|
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import InfoBoxValue from './InfoBoxValue';
|
|
4
4
|
import InfoBoxLabel from './InfoBoxLabel';
|
|
5
|
+
import InfoBoxTooltip from '../InfoBoxTooltip';
|
|
5
6
|
|
|
6
7
|
const InfoBox = ({ items, infoBoxKey }) => {
|
|
7
8
|
if (!items) return null;
|
|
@@ -18,6 +19,7 @@ const InfoBox = ({ items, infoBoxKey }) => {
|
|
|
18
19
|
</div>
|
|
19
20
|
<div className="info-box--value">
|
|
20
21
|
<InfoBoxValue item={info} />
|
|
22
|
+
<InfoBoxTooltip info={info} />
|
|
21
23
|
</div>
|
|
22
24
|
</div>
|
|
23
25
|
);
|
|
@@ -32,9 +34,9 @@ const InfoBox = ({ items, infoBoxKey }) => {
|
|
|
32
34
|
);
|
|
33
35
|
};
|
|
34
36
|
|
|
35
|
-
export default InfoBox;
|
|
36
|
-
|
|
37
37
|
InfoBox.propTypes = {
|
|
38
38
|
infoBoxKey: PropTypes.string.isRequired,
|
|
39
39
|
items: PropTypes.array.isRequired
|
|
40
40
|
};
|
|
41
|
+
|
|
42
|
+
export default InfoBox;
|
|
@@ -1,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 = ({
|
|
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
|
-
|
|
15
|
-
{
|
|
16
|
-
|
|
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({
|
|
141
|
+
rows: formatRows({
|
|
142
|
+
firstColumn,
|
|
143
|
+
rows: parsedRowData,
|
|
144
|
+
url,
|
|
145
|
+
toggleModal,
|
|
146
|
+
isEnquiry,
|
|
147
|
+
entitySchema
|
|
148
|
+
}),
|
|
121
149
|
isEnquiry
|
|
122
150
|
};
|
|
123
151
|
};
|