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