@blaze-cms/plugin-data-ui 0.146.0-translations.6 → 0.147.0-rc-eagle.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 -19
- 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 -17
- 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 -19
- 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 -16
- 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 -83
- 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/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 +21 -28
- 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 +6 -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 +26 -7
- 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 +6 -2
- 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 +12 -11
- package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js +34 -16
- 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/SearchFilter/SearchContainer.js +207 -0
- package/lib-es/components/ListingTable/SearchFilter/SearchContainer.js.map +1 -0
- package/lib-es/components/ListingTable/SearchFilter/SearchFilter.js +40 -0
- package/lib-es/components/ListingTable/SearchFilter/SearchFilter.js.map +1 -0
- package/lib-es/components/ListingTable/SearchFilter/helpers.js +96 -0
- package/lib-es/components/ListingTable/SearchFilter/helpers.js.map +1 -0
- package/lib-es/components/ListingTable/SearchFilter/querys.js +8 -0
- package/lib-es/components/ListingTable/SearchFilter/querys.js.map +1 -0
- 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 +3 -0
- package/lib-es/components/ListingTable/mappers/populate-rows.js.map +1 -1
- package/lib-es/components/ListingTable/service/index.js +3 -2
- package/lib-es/components/ListingTable/service/index.js.map +1 -1
- package/lib-es/components/Tabs/index.js +6 -7
- 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 +4 -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 +11 -3
- 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 +4 -4
- 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 +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 +28 -22
- package/src/components/EntityManager/Entity/Entity.js +72 -80
- package/src/components/EntityManager/Entity/EntityHeader/EntityHeader.js +1 -2
- 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/hooks/useCustomSidebarData.js +9 -7
- package/src/components/EntityManager/Entity/SideBarRelations/index.js +82 -59
- package/src/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +5 -3
- package/src/components/EntityManager/EntityManager.js +52 -45
- package/src/components/EntityManager/utils/entity.js +13 -2
- package/src/components/InfoBoxes/InfoBoxTooltip.js +32 -0
- package/src/components/InfoBoxes/container/InfoBoxContainer.js +3 -6
- package/src/components/InfoBoxes/helpers/build-dynamic-query.js +2 -0
- package/src/components/InfoBoxes/hooks/useData.js +6 -1
- package/src/components/InfoBoxes/presentational/InfoBox.js +4 -2
- package/src/components/ListingTable/ListingTable.js +23 -31
- package/src/components/ListingTable/ListingTableContent/ListingTableContent.js +43 -27
- 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 +3 -4
- 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/CHANGELOG.md +0 -1939
- package/babel.config.js +0 -3
- package/jest.config.js +0 -5
package/README.md
CHANGED
|
@@ -31,6 +31,12 @@ The `displayProperties` property can be set on entity schema in the api to provi
|
|
|
31
31
|
"firstname": {
|
|
32
32
|
"_exists": false
|
|
33
33
|
}
|
|
34
|
+
},
|
|
35
|
+
"adminListings": {
|
|
36
|
+
"dataSource": {
|
|
37
|
+
"source": "search",
|
|
38
|
+
"index": "admin"
|
|
39
|
+
}
|
|
34
40
|
}
|
|
35
41
|
}
|
|
36
42
|
```
|
|
@@ -40,7 +46,37 @@ The `displayProperties` property can be set on entity schema in the api to provi
|
|
|
40
46
|
- adminHeader: properties to build admin header
|
|
41
47
|
- adminMainInfoProperty: indicates a property that returns data to be displayed in the admin edit sidebar. Data is returned is formatted with the [data/info-properties](#Info properties) definition
|
|
42
48
|
- disableDefaultAdminInfo: boolean value that can be used to hide default sidebar values updated/created
|
|
49
|
+
- adminListings.dataSource:
|
|
50
|
+
-- adminListings.dataSource.source: indicates whether to get listing data from search queries instead of direct entity queries.
|
|
51
|
+
-- adminListings.dataSource.index: which index to search. This changes the query used e.g. searchAdmin
|
|
52
|
+
|
|
53
|
+
### Listing filters
|
|
54
|
+
You can add the following to an entity properties/dynamicProperties to have them generate filters that appear at the top of admin record listings.
|
|
55
|
+
```json
|
|
56
|
+
// this will be represented as a select
|
|
57
|
+
"relationKeyId": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"label": "Related records",
|
|
60
|
+
"searchable": true,
|
|
61
|
+
"showInForm": true,
|
|
62
|
+
"formFieldType": "relation",
|
|
63
|
+
"adminListingOptions": {
|
|
64
|
+
"filterType": "select"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
43
67
|
|
|
68
|
+
// will include this property in a keyword search
|
|
69
|
+
"name": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"label": "Name",
|
|
72
|
+
"searchable": true,
|
|
73
|
+
"adminListingOptions": {
|
|
74
|
+
"includeInKeywordSeach": true
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
- `filterType: "select"`: This will get relevant options and display them in a select. If the property is relation data the select will be populated with the `name` property from the related records
|
|
79
|
+
- `includeInKeywordSeach`: This property will be included in a keyword search
|
|
44
80
|
|
|
45
81
|
### Info properties
|
|
46
82
|
|
|
@@ -93,3 +129,24 @@ import coreAdminPlugin from '@blaze-cms/plugin-admin-core-ui';
|
|
|
93
129
|
}
|
|
94
130
|
});
|
|
95
131
|
```
|
|
132
|
+
|
|
133
|
+
## Environment Variables
|
|
134
|
+
|
|
135
|
+
The following environment variables can be used to configure the behavior of this plugin:
|
|
136
|
+
|
|
137
|
+
| Variable | Description | Default |
|
|
138
|
+
| ------------------------------- | -------------------------------------------------------------------------------- | ------- |
|
|
139
|
+
| `BLAZE_DISABLE_PREVIEW` | Disables the preview button functionality completely | `false` |
|
|
140
|
+
| `BLAZE_DISABLE_URL_DEBUG_PARAM` | Disables adding "blaze_debug=1" parameter to preview and view URLs | `false` |
|
|
141
|
+
|
|
142
|
+
### Usage
|
|
143
|
+
|
|
144
|
+
Set these variables in your environment to modify the plugin behavior:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# Disable preview functionality
|
|
148
|
+
BLAZE_DISABLE_PREVIEW=true
|
|
149
|
+
|
|
150
|
+
# Disable debug parameter in URLs
|
|
151
|
+
BLAZE_DISABLE_URL_DEBUG_PARAM=true
|
|
152
|
+
```
|
|
@@ -1,38 +1,40 @@
|
|
|
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
|
|
9
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
10
|
-
require("core-js/modules/es.string.match.js");
|
|
7
|
+
exports.default = void 0;
|
|
11
8
|
var _client = require("@apollo/client");
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
11
|
var _adminUiUtils = require("@blaze-cms/admin-ui-utils");
|
|
15
12
|
var _ListingTable = _interopRequireDefault(require("../ListingTable/ListingTable"));
|
|
16
13
|
var _withContext = require("../../utils/hoc/withContext");
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
const EntityDataListing = ({
|
|
15
|
+
match
|
|
16
|
+
}) => {
|
|
17
|
+
const {
|
|
18
|
+
params: {
|
|
19
|
+
entityIdentifier: identifier
|
|
20
|
+
}
|
|
21
|
+
} = match;
|
|
22
|
+
const {
|
|
23
|
+
data: {
|
|
24
|
+
getEntitySchemas = []
|
|
25
|
+
} = {}
|
|
26
|
+
} = (0, _client.useQuery)((0, _adminUiUtils.getQuery)('GET_ENTITY_SCHEMA'), {
|
|
27
|
+
variables: {
|
|
28
|
+
identifier
|
|
29
|
+
}
|
|
30
|
+
});
|
|
29
31
|
if (!getEntitySchemas.length) return '';
|
|
30
|
-
return /*#__PURE__*/_react
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_ListingTable.default, {
|
|
31
33
|
entitySchema: getEntitySchemas[0]
|
|
32
34
|
});
|
|
33
35
|
};
|
|
34
36
|
EntityDataListing.propTypes = {
|
|
35
|
-
match: _propTypes
|
|
37
|
+
match: _propTypes.default.object.isRequired
|
|
36
38
|
};
|
|
37
|
-
var _default = exports
|
|
39
|
+
var _default = exports.default = (0, _withContext.withContext)(EntityDataListing);
|
|
38
40
|
//# sourceMappingURL=EntityDataListing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityDataListing.js","names":["_client","require","_react","_interopRequireDefault","_propTypes","_adminUiUtils","_ListingTable","_withContext","EntityDataListing","
|
|
1
|
+
{"version":3,"file":"EntityDataListing.js","names":["_client","require","_react","_interopRequireDefault","_propTypes","_adminUiUtils","_ListingTable","_withContext","EntityDataListing","match","params","entityIdentifier","identifier","data","getEntitySchemas","useQuery","getQuery","variables","length","default","createElement","entitySchema","propTypes","PropTypes","object","isRequired","_default","exports","withContext"],"sources":["../../../src/components/EntityDataListing/EntityDataListing.js"],"sourcesContent":["import { useQuery } from '@apollo/client';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { getQuery } from '@blaze-cms/admin-ui-utils';\n\nimport ListingTable from '../ListingTable/ListingTable';\nimport { withContext } from '../../utils/hoc/withContext';\n\nconst EntityDataListing = ({ match }) => {\n const {\n params: { entityIdentifier: identifier }\n } = match;\n\n const { data: { getEntitySchemas = [] } = {} } = useQuery(getQuery('GET_ENTITY_SCHEMA'), {\n variables: { identifier }\n });\n\n if (!getEntitySchemas.length) return '';\n\n return <ListingTable entitySchema={getEntitySchemas[0]} />;\n};\n\nEntityDataListing.propTypes = {\n match: PropTypes.object.isRequired\n};\n\nexport default withContext(EntityDataListing);\n"],"mappings":";;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAEA,IAAAK,aAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAEA,MAAMO,iBAAiB,GAAGA,CAAC;EAAEC;AAAM,CAAC,KAAK;EACvC,MAAM;IACJC,MAAM,EAAE;MAAEC,gBAAgB,EAAEC;IAAW;EACzC,CAAC,GAAGH,KAAK;EAET,MAAM;IAAEI,IAAI,EAAE;MAAEC,gBAAgB,GAAG;IAAG,CAAC,GAAG,CAAC;EAAE,CAAC,GAAG,IAAAC,gBAAQ,EAAC,IAAAC,sBAAQ,EAAC,mBAAmB,CAAC,EAAE;IACvFC,SAAS,EAAE;MAAEL;IAAW;EAC1B,CAAC,CAAC;EAEF,IAAI,CAACE,gBAAgB,CAACI,MAAM,EAAE,OAAO,EAAE;EAEvC,oBAAOhB,MAAA,CAAAiB,OAAA,CAAAC,aAAA,CAACd,aAAA,CAAAa,OAAY;IAACE,YAAY,EAAEP,gBAAgB,CAAC,CAAC;EAAE,CAAE,CAAC;AAC5D,CAAC;AAEDN,iBAAiB,CAACc,SAAS,GAAG;EAC5Bb,KAAK,EAAEc,kBAAS,CAACC,MAAM,CAACC;AAC1B,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAR,OAAA,GAEa,IAAAS,wBAAW,EAACpB,iBAAiB,CAAC","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
|
|
7
|
+
exports.default = void 0;
|
|
9
8
|
var _EntityDataListing = _interopRequireDefault(require("./EntityDataListing"));
|
|
10
|
-
var _default = exports
|
|
9
|
+
var _default = exports.default = _EntityDataListing.default;
|
|
11
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_EntityDataListing","_interopRequireDefault","require","_default","exports","EntityDataListing"],"sources":["../../../src/components/EntityDataListing/index.js"],"sourcesContent":["import EntityDataListing from './EntityDataListing';\n\nexport default EntityDataListing;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_EntityDataListing","_interopRequireDefault","require","_default","exports","default","EntityDataListing"],"sources":["../../../src/components/EntityDataListing/index.js"],"sourcesContent":["import EntityDataListing from './EntityDataListing';\n\nexport default EntityDataListing;\n"],"mappings":";;;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAErCC,0BAAiB","ignoreList":[]}
|
|
@@ -1,38 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
-
require("core-js/modules/es.array.map.js");
|
|
11
|
-
require("core-js/modules/es.object.entries.js");
|
|
12
|
-
require("core-js/modules/es.string.starts-with.js");
|
|
7
|
+
exports.default = void 0;
|
|
13
8
|
var _reactRouterDom = require("react-router-dom");
|
|
14
9
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
const EntityNavLinks = ({
|
|
11
|
+
schema
|
|
12
|
+
}) => {
|
|
17
13
|
if (!schema) return null;
|
|
18
|
-
|
|
14
|
+
const {
|
|
15
|
+
displayProperties: {
|
|
16
|
+
adminSectionNavigation
|
|
17
|
+
}
|
|
18
|
+
} = schema;
|
|
19
19
|
if (!adminSectionNavigation) return null;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return /*#__PURE__*/_react["default"].createElement(Wrapper, {
|
|
20
|
+
const links = Object.entries(adminSectionNavigation).map(([k, v]) => {
|
|
21
|
+
const {
|
|
22
|
+
label,
|
|
23
|
+
uri
|
|
24
|
+
} = v;
|
|
25
|
+
const Wrapper = uri.startsWith('#') ? 'a' : _reactRouterDom.Link;
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(Wrapper, {
|
|
28
27
|
className: "entity-section-link",
|
|
29
28
|
href: uri,
|
|
30
29
|
to: uri
|
|
31
30
|
}, label);
|
|
32
31
|
});
|
|
33
|
-
return /*#__PURE__*/_react
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
33
|
className: "entity-section-links"
|
|
35
34
|
}, links);
|
|
36
35
|
};
|
|
37
|
-
var _default = exports
|
|
36
|
+
var _default = exports.default = EntityNavLinks;
|
|
38
37
|
//# sourceMappingURL=EntityNavLinks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityNavLinks.js","names":["_reactRouterDom","require","_react","_interopRequireDefault","EntityNavLinks","
|
|
1
|
+
{"version":3,"file":"EntityNavLinks.js","names":["_reactRouterDom","require","_react","_interopRequireDefault","EntityNavLinks","schema","displayProperties","adminSectionNavigation","links","Object","entries","map","k","v","label","uri","Wrapper","startsWith","Link","default","createElement","className","href","to","_default","exports"],"sources":["../../../../../src/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js"],"sourcesContent":["import { Link } from 'react-router-dom';\nimport React from 'react';\n\nconst EntityNavLinks = ({ schema }) => {\n if (!schema) return null;\n\n const {\n displayProperties: { adminSectionNavigation }\n } = schema;\n\n if (!adminSectionNavigation) return null;\n\n const links = Object.entries(adminSectionNavigation).map(([k, v]) => {\n const { label, uri } = v;\n const Wrapper = uri.startsWith('#') ? 'a' : Link;\n\n return (\n <Wrapper className=\"entity-section-link\" href={uri} to={uri}>\n {label}\n </Wrapper>\n );\n });\n\n return <div className=\"entity-section-links\">{links}</div>;\n};\n\nexport default EntityNavLinks;\n"],"mappings":";;;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,MAAMG,cAAc,GAAGA,CAAC;EAAEC;AAAO,CAAC,KAAK;EACrC,IAAI,CAACA,MAAM,EAAE,OAAO,IAAI;EAExB,MAAM;IACJC,iBAAiB,EAAE;MAAEC;IAAuB;EAC9C,CAAC,GAAGF,MAAM;EAEV,IAAI,CAACE,sBAAsB,EAAE,OAAO,IAAI;EAExC,MAAMC,KAAK,GAAGC,MAAM,CAACC,OAAO,CAACH,sBAAsB,CAAC,CAACI,GAAG,CAAC,CAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,KAAK;IACnE,MAAM;MAAEC,KAAK;MAAEC;IAAI,CAAC,GAAGF,CAAC;IACxB,MAAMG,OAAO,GAAGD,GAAG,CAACE,UAAU,CAAC,GAAG,CAAC,GAAG,GAAG,GAAGC,oBAAI;IAEhD,oBACEhB,MAAA,CAAAiB,OAAA,CAAAC,aAAA,CAACJ,OAAO;MAACK,SAAS,EAAC,qBAAqB;MAACC,IAAI,EAAEP,GAAI;MAACQ,EAAE,EAAER;IAAI,GACzDD,KACM,CAAC;EAEd,CAAC,CAAC;EAEF,oBAAOZ,MAAA,CAAAiB,OAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAsB,GAAEb,KAAW,CAAC;AAC5D,CAAC;AAAC,IAAAgB,QAAA,GAAAC,OAAA,CAAAN,OAAA,GAEaf,cAAc","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
|
|
7
|
+
exports.default = void 0;
|
|
9
8
|
var _EntityNavLinks = _interopRequireDefault(require("./EntityNavLinks"));
|
|
10
|
-
var _default = exports
|
|
9
|
+
var _default = exports.default = _EntityNavLinks.default;
|
|
11
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_EntityNavLinks","_interopRequireDefault","require","_default","exports","EntityNavLinks"],"sources":["../../../../../src/components/EntityManager/Entity/EntitiyNavLinks/index.js"],"sourcesContent":["import EntityNavLinks from './EntityNavLinks';\n\nexport default EntityNavLinks;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_EntityNavLinks","_interopRequireDefault","require","_default","exports","default","EntityNavLinks"],"sources":["../../../../../src/components/EntityManager/Entity/EntitiyNavLinks/index.js"],"sourcesContent":["import EntityNavLinks from './EntityNavLinks';\n\nexport default EntityNavLinks;\n"],"mappings":";;;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8C,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE/BC,uBAAc","ignoreList":[]}
|