@blaze-cms/plugin-data-ui 0.146.0-translations.8 → 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/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 +286 -458
- 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 +32 -56
- 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 +95 -158
- package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +23 -30
- 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 -80
- 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 +19 -16
- package/lib/components/InfoBoxes/InfoBoxTooltip.js.map +1 -1
- 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 +27 -34
- 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 +155 -296
- package/lib/components/ListingTable/ListingTable.js.map +1 -1
- package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js +53 -58
- 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 +159 -257
- package/lib/components/ListingTable/SearchFilter/SearchContainer.js.map +1 -1
- package/lib/components/ListingTable/SearchFilter/SearchFilter.js +25 -36
- package/lib/components/ListingTable/SearchFilter/SearchFilter.js.map +1 -1
- package/lib/components/ListingTable/SearchFilter/helpers.js +46 -68
- package/lib/components/ListingTable/SearchFilter/helpers.js.map +1 -1
- package/lib/components/ListingTable/SearchFilter/querys.js +5 -5
- package/lib/components/ListingTable/SearchFilter/querys.js.map +1 -1
- 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 +103 -122
- 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 +30 -31
- 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 +17 -14
- 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/EntityManager/Entity/Entity.js +15 -26
- 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/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 +6 -3
- package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.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/shared/publish.js.map +1 -1
- package/lib-es/components/EntityManager/EntityManager.js.map +1 -1
- package/lib-es/components/EntityManager/utils/entity.js.map +1 -1
- package/lib-es/components/EntityManager/utils/query.js.map +1 -1
- package/lib-es/components/InfoBoxes/InfoBoxTooltip.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.map +1 -1
- package/lib-es/components/InfoBoxes/hooks/useData.js.map +1 -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/ListingTable/ListingTable.js +2 -2
- package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js +20 -17
- package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
- package/lib-es/components/ListingTable/SearchFilter/SearchContainer.js.map +1 -1
- package/lib-es/components/ListingTable/SearchFilter/helpers.js.map +1 -1
- package/lib-es/components/ListingTable/SearchFilter/querys.js.map +1 -1
- 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 +6 -7
- package/lib-es/components/Tabs/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.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/hoc/withContext.js +1 -1
- package/lib-es/utils/hoc/withContext.js.map +1 -1
- package/package.json +27 -22
- package/src/components/EntityManager/Entity/Entity.js +63 -81
- package/src/components/EntityManager/Entity/EntityHeader/EntityHeader.js +1 -2
- package/src/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js +9 -7
- package/src/components/EntityManager/Entity/SideBarRelations/index.js +64 -59
- package/src/components/EntityManager/EntityManager.js +52 -45
- package/src/components/InfoBoxes/container/InfoBoxContainer.js +3 -6
- package/src/components/InfoBoxes/hooks/useData.js +6 -1
- package/src/components/ListingTable/ListingTable.js +13 -21
- package/src/components/ListingTable/ListingTableContent/ListingTableContent.js +38 -44
- package/src/components/ListingTable/SearchFilter/SearchContainer.js +105 -120
- package/src/components/ListingTable/service/index.js +2 -3
- package/src/components/Tabs/index.js +17 -21
- package/src/index.js +9 -7
- package/src/utils/hoc/withContext.js +5 -4
- package/CHANGELOG.md +0 -1947
- package/babel.config.js +0 -3
- package/jest.config.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaxonomyIcon.js","names":["_react","_interopRequireDefault","require","_constants","TaxonomyIcon","
|
|
1
|
+
{"version":3,"file":"TaxonomyIcon.js","names":["_react","_interopRequireDefault","require","_constants","TaxonomyIcon","width","ICON_SIZE","WIDTH","height","HEIGHT","stroke","ICON_COLOR","STROKE","default","createElement","viewBox","version","xmlns","xmlnsXlink","id","strokeWidth","fill","fillRule","strokeLinecap","strokeLinejoin","transform","x","y","rx","d","x1","y1","x2","y2","_default","exports"],"sources":["../../src/icons/TaxonomyIcon.js"],"sourcesContent":["import React from 'react';\nimport { ICON_SIZE, ICON_COLOR } from '../constants';\n\nfunction TaxonomyIcon({\n width = ICON_SIZE.WIDTH,\n height = ICON_SIZE.HEIGHT,\n stroke = ICON_COLOR.STROKE\n}) {\n return (\n <svg\n width={width}\n height={height}\n viewBox=\"0 0 22 22\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\">\n <title>taxonomy</title>\n <g\n id=\"Page-1\"\n stroke=\"none\"\n strokeWidth=\"1\"\n fill=\"none\"\n fillRule=\"evenodd\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\">\n <g id=\"Group\" transform=\"translate(1, 1)\" stroke={stroke}>\n <rect\n id=\"Rectangle\"\n x=\"0\"\n y=\"13.2173913\"\n width=\"6.78260868\"\n height=\"6.60869564\"\n rx=\"1.5\"\n />\n <rect\n id=\"Rectangle\"\n x=\"13.2173913\"\n y=\"13.2173913\"\n width=\"6.78260868\"\n height=\"6.60869564\"\n rx=\"1.5\"\n />\n <rect\n id=\"Rectangle\"\n x=\"6.60869564\"\n y=\"0\"\n width=\"6.78260868\"\n height=\"6.60869564\"\n rx=\"1.5\"\n />\n <path\n d=\"M3.30434782,13.2173913 L3.30434782,12.115942 C3.30434782,10.8993147 4.2906191,9.91304346 5.50724637,9.91304346 L14.3188405,9.91304346 C15.5354678,9.91304346 16.5217391,10.8993147 16.5217391,12.115942 L16.5217391,13.2173913\"\n id=\"Path\"\n />\n <line x1=\"9.91304346\" y1=\"6.60869564\" x2=\"9.91304346\" y2=\"9.91304346\" id=\"Path\" />\n </g>\n </g>\n </svg>\n );\n}\n\nexport default TaxonomyIcon;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEA,SAASE,YAAYA,CAAC;EACpBC,KAAK,GAAGC,oBAAS,CAACC,KAAK;EACvBC,MAAM,GAAGF,oBAAS,CAACG,MAAM;EACzBC,MAAM,GAAGC,qBAAU,CAACC;AACtB,CAAC,EAAE;EACD,oBACEZ,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACET,KAAK,EAAEA,KAAM;IACbG,MAAM,EAAEA,MAAO;IACfO,OAAO,EAAC,WAAW;IACnBC,OAAO,EAAC,KAAK;IACbC,KAAK,EAAC,4BAA4B;IAClCC,UAAU,EAAC;EAA8B,gBACzClB,MAAA,CAAAa,OAAA,CAAAC,aAAA,gBAAO,UAAe,CAAC,eACvBd,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACEK,EAAE,EAAC,QAAQ;IACXT,MAAM,EAAC,MAAM;IACbU,WAAW,EAAC,GAAG;IACfC,IAAI,EAAC,MAAM;IACXC,QAAQ,EAAC,SAAS;IAClBC,aAAa,EAAC,OAAO;IACrBC,cAAc,EAAC;EAAO,gBACtBxB,MAAA,CAAAa,OAAA,CAAAC,aAAA;IAAGK,EAAE,EAAC,OAAO;IAACM,SAAS,EAAC,iBAAiB;IAACf,MAAM,EAAEA;EAAO,gBACvDV,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACEK,EAAE,EAAC,WAAW;IACdO,CAAC,EAAC,GAAG;IACLC,CAAC,EAAC,YAAY;IACdtB,KAAK,EAAC,YAAY;IAClBG,MAAM,EAAC,YAAY;IACnBoB,EAAE,EAAC;EAAK,CACT,CAAC,eACF5B,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACEK,EAAE,EAAC,WAAW;IACdO,CAAC,EAAC,YAAY;IACdC,CAAC,EAAC,YAAY;IACdtB,KAAK,EAAC,YAAY;IAClBG,MAAM,EAAC,YAAY;IACnBoB,EAAE,EAAC;EAAK,CACT,CAAC,eACF5B,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACEK,EAAE,EAAC,WAAW;IACdO,CAAC,EAAC,YAAY;IACdC,CAAC,EAAC,GAAG;IACLtB,KAAK,EAAC,YAAY;IAClBG,MAAM,EAAC,YAAY;IACnBoB,EAAE,EAAC;EAAK,CACT,CAAC,eACF5B,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACEe,CAAC,EAAC,gOAAgO;IAClOV,EAAE,EAAC;EAAM,CACV,CAAC,eACFnB,MAAA,CAAAa,OAAA,CAAAC,aAAA;IAAMgB,EAAE,EAAC,YAAY;IAACC,EAAE,EAAC,YAAY;IAACC,EAAE,EAAC,YAAY;IAACC,EAAE,EAAC,YAAY;IAACd,EAAE,EAAC;EAAM,CAAE,CAChF,CACF,CACA,CAAC;AAEV;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAtB,OAAA,GAEcT,YAAY","ignoreList":[]}
|
package/lib/icons/UsersIcon.js
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _constants = require("../constants");
|
|
11
|
-
function UserIcon(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
stroke = _ref$stroke === void 0 ? _constants.ICON_COLOR.STROKE : _ref$stroke;
|
|
18
|
-
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
10
|
+
function UserIcon({
|
|
11
|
+
width = _constants.ICON_SIZE.WIDTH,
|
|
12
|
+
height = _constants.ICON_SIZE.HEIGHT,
|
|
13
|
+
stroke = _constants.ICON_COLOR.STROKE
|
|
14
|
+
}) {
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
19
16
|
width: width,
|
|
20
17
|
height: height,
|
|
21
18
|
viewBox: "0 0 22 22",
|
|
22
19
|
version: "1.1",
|
|
23
20
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24
21
|
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
25
|
-
}, /*#__PURE__*/_react
|
|
22
|
+
}, /*#__PURE__*/_react.default.createElement("title", null, "user"), /*#__PURE__*/_react.default.createElement("g", {
|
|
26
23
|
id: "Page-1",
|
|
27
24
|
stroke: "none",
|
|
28
25
|
strokeWidth: 1,
|
|
@@ -30,14 +27,14 @@ function UserIcon(_ref) {
|
|
|
30
27
|
fillRule: "evenodd",
|
|
31
28
|
strokeLinecap: "round",
|
|
32
29
|
strokeLinejoin: "round"
|
|
33
|
-
}, /*#__PURE__*/_react
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
34
31
|
id: "Group",
|
|
35
32
|
transform: "translate(1, 0.76)",
|
|
36
33
|
stroke: stroke
|
|
37
|
-
}, /*#__PURE__*/_react
|
|
34
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
38
35
|
d: "M2.35666666,16.4488888 C4.68824079,15.1310199 7.32175438,14.4403878 10,14.4444089 C12.7777778,14.4444089 15.3855556,15.1722221 17.6433334,16.4488888 M13.3333334,7.7777776 C13.3333334,9.61872677 11.8409492,11.1111109 10,11.1111109 C8.15905083,11.1111109 6.66666666,9.61872677 6.66666666,7.7777776 C6.66666666,5.93682842 8.15905083,4.44444425 10,4.44444425 C11.8409492,4.44444425 13.3333334,5.93682842 13.3333334,7.7777776 L13.3333334,7.7777776 Z M20,10 C20,13.5726558 18.0940108,16.8739261 15,18.660254 C11.9059893,20.446582 8.09401075,20.446582 5,18.660254 C1.90598917,16.8739261 0,13.5726558 0,10 C0,4.47715239 4.47715258,0 10,0 C15.5228474,0 20,4.47715239 20,10 L20,10 Z",
|
|
39
36
|
id: "Shape"
|
|
40
37
|
}))));
|
|
41
38
|
}
|
|
42
|
-
var _default = exports
|
|
39
|
+
var _default = exports.default = UserIcon;
|
|
43
40
|
//# sourceMappingURL=UsersIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsersIcon.js","names":["_react","_interopRequireDefault","require","_constants","UserIcon","
|
|
1
|
+
{"version":3,"file":"UsersIcon.js","names":["_react","_interopRequireDefault","require","_constants","UserIcon","width","ICON_SIZE","WIDTH","height","HEIGHT","stroke","ICON_COLOR","STROKE","default","createElement","viewBox","version","xmlns","xmlnsXlink","id","strokeWidth","fill","fillRule","strokeLinecap","strokeLinejoin","transform","d","_default","exports"],"sources":["../../src/icons/UsersIcon.js"],"sourcesContent":["import React from 'react';\nimport { ICON_SIZE, ICON_COLOR } from '../constants';\n\nfunction UserIcon({\n width = ICON_SIZE.WIDTH,\n height = ICON_SIZE.HEIGHT,\n stroke = ICON_COLOR.STROKE\n}) {\n return (\n <svg\n width={width}\n height={height}\n viewBox=\"0 0 22 22\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\">\n <title>user</title>\n <g\n id=\"Page-1\"\n stroke=\"none\"\n strokeWidth={1}\n fill=\"none\"\n fillRule=\"evenodd\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\">\n <g id=\"Group\" transform=\"translate(1, 0.76)\" stroke={stroke}>\n <path\n d=\"M2.35666666,16.4488888 C4.68824079,15.1310199 7.32175438,14.4403878 10,14.4444089 C12.7777778,14.4444089 15.3855556,15.1722221 17.6433334,16.4488888 M13.3333334,7.7777776 C13.3333334,9.61872677 11.8409492,11.1111109 10,11.1111109 C8.15905083,11.1111109 6.66666666,9.61872677 6.66666666,7.7777776 C6.66666666,5.93682842 8.15905083,4.44444425 10,4.44444425 C11.8409492,4.44444425 13.3333334,5.93682842 13.3333334,7.7777776 L13.3333334,7.7777776 Z M20,10 C20,13.5726558 18.0940108,16.8739261 15,18.660254 C11.9059893,20.446582 8.09401075,20.446582 5,18.660254 C1.90598917,16.8739261 0,13.5726558 0,10 C0,4.47715239 4.47715258,0 10,0 C15.5228474,0 20,4.47715239 20,10 L20,10 Z\"\n id=\"Shape\"\n />\n </g>\n </g>\n </svg>\n );\n}\n\nexport default UserIcon;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEA,SAASE,QAAQA,CAAC;EAChBC,KAAK,GAAGC,oBAAS,CAACC,KAAK;EACvBC,MAAM,GAAGF,oBAAS,CAACG,MAAM;EACzBC,MAAM,GAAGC,qBAAU,CAACC;AACtB,CAAC,EAAE;EACD,oBACEZ,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACET,KAAK,EAAEA,KAAM;IACbG,MAAM,EAAEA,MAAO;IACfO,OAAO,EAAC,WAAW;IACnBC,OAAO,EAAC,KAAK;IACbC,KAAK,EAAC,4BAA4B;IAClCC,UAAU,EAAC;EAA8B,gBACzClB,MAAA,CAAAa,OAAA,CAAAC,aAAA,gBAAO,MAAW,CAAC,eACnBd,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACEK,EAAE,EAAC,QAAQ;IACXT,MAAM,EAAC,MAAM;IACbU,WAAW,EAAE,CAAE;IACfC,IAAI,EAAC,MAAM;IACXC,QAAQ,EAAC,SAAS;IAClBC,aAAa,EAAC,OAAO;IACrBC,cAAc,EAAC;EAAO,gBACtBxB,MAAA,CAAAa,OAAA,CAAAC,aAAA;IAAGK,EAAE,EAAC,OAAO;IAACM,SAAS,EAAC,oBAAoB;IAACf,MAAM,EAAEA;EAAO,gBAC1DV,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACEY,CAAC,EAAC,kqBAAkqB;IACpqBP,EAAE,EAAC;EAAO,CACX,CACA,CACF,CACA,CAAC;AAEV;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEcT,QAAQ","ignoreList":[]}
|
package/lib/icons/index.js
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
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, "ContentIcon", {
|
|
9
8
|
enumerable: true,
|
|
10
|
-
get: function
|
|
11
|
-
return _ContentIcon
|
|
9
|
+
get: function () {
|
|
10
|
+
return _ContentIcon.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
13
|
Object.defineProperty(exports, "SettingsIcon", {
|
|
15
14
|
enumerable: true,
|
|
16
|
-
get: function
|
|
17
|
-
return _SettingsIcon
|
|
15
|
+
get: function () {
|
|
16
|
+
return _SettingsIcon.default;
|
|
18
17
|
}
|
|
19
18
|
});
|
|
20
19
|
Object.defineProperty(exports, "TaxonomyIcon", {
|
|
21
20
|
enumerable: true,
|
|
22
|
-
get: function
|
|
23
|
-
return _TaxonomyIcon
|
|
21
|
+
get: function () {
|
|
22
|
+
return _TaxonomyIcon.default;
|
|
24
23
|
}
|
|
25
24
|
});
|
|
26
25
|
Object.defineProperty(exports, "UserIcon", {
|
|
27
26
|
enumerable: true,
|
|
28
|
-
get: function
|
|
29
|
-
return _UsersIcon
|
|
27
|
+
get: function () {
|
|
28
|
+
return _UsersIcon.default;
|
|
30
29
|
}
|
|
31
30
|
});
|
|
32
31
|
var _UsersIcon = _interopRequireDefault(require("./UsersIcon"));
|
package/lib/icons/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_UsersIcon","_interopRequireDefault","require","_TaxonomyIcon","_ContentIcon","_SettingsIcon"],"sources":["../../src/icons/index.js"],"sourcesContent":["import UserIcon from './UsersIcon';\nimport TaxonomyIcon from './TaxonomyIcon';\nimport ContentIcon from './ContentIcon';\nimport SettingsIcon from './SettingsIcon';\n\nexport { UserIcon, TaxonomyIcon, ContentIcon, SettingsIcon };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_UsersIcon","_interopRequireDefault","require","_TaxonomyIcon","_ContentIcon","_SettingsIcon"],"sources":["../../src/icons/index.js"],"sourcesContent":["import UserIcon from './UsersIcon';\nimport TaxonomyIcon from './TaxonomyIcon';\nimport ContentIcon from './ContentIcon';\nimport SettingsIcon from './SettingsIcon';\n\nexport { UserIcon, TaxonomyIcon, ContentIcon, SettingsIcon };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,aAAA,GAAAJ,sBAAA,CAAAC,OAAA","ignoreList":[]}
|
package/lib/index.js
CHANGED
|
@@ -4,135 +4,95 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports
|
|
8
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
-
require("core-js/modules/es.array.for-each.js");
|
|
12
|
-
require("core-js/modules/es.array.iterator.js");
|
|
13
|
-
require("core-js/modules/es.object.define-property.js");
|
|
14
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
15
|
-
require("core-js/modules/es.object.keys.js");
|
|
16
|
-
require("core-js/modules/es.object.to-string.js");
|
|
17
|
-
require("core-js/modules/es.promise.js");
|
|
18
|
-
require("core-js/modules/es.string.iterator.js");
|
|
19
|
-
require("core-js/modules/es.weak-map.js");
|
|
20
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
21
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
7
|
+
exports.default = load;
|
|
22
8
|
var _reactFormBuilder = require("@blaze-cms/react-form-builder");
|
|
23
|
-
var _react = _interopRequireDefault(require("react"));
|
|
24
9
|
var _package = _interopRequireDefault(require("../package.json"));
|
|
25
10
|
var _constants = require("./constants");
|
|
26
11
|
var _addContentMenuItems = _interopRequireDefault(require("./utils/add-content-menu-items"));
|
|
27
12
|
var _icons = require("./icons");
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
13
|
+
var _EntityDataListing = _interopRequireDefault(require("./components/EntityDataListing"));
|
|
14
|
+
var _EntityManager = _interopRequireDefault(require("./components/EntityManager"));
|
|
15
|
+
// todo: renable lazy loading after bundler optimisations, currently they are too slow in dev mode
|
|
16
|
+
// const EntityDataListing = React.lazy(
|
|
17
|
+
// () => import(/* webpackChunkName: 'EntityDataListing' */ './components/EntityDataListing')
|
|
18
|
+
// );
|
|
19
|
+
// const EntityManager = React.lazy(
|
|
20
|
+
// () => import(/* webpackChunkName: 'EntityManager' */ './components/EntityManager')
|
|
21
|
+
// );
|
|
22
|
+
|
|
23
|
+
async function load(app) {
|
|
24
|
+
app.events.once('admin:menu:config:load', (0, _addContentMenuItems.default)(app));
|
|
25
|
+
app.events.once('load:custom:field:type', addFieldType => {
|
|
26
|
+
Object.keys(_reactFormBuilder.formFieldTypes).forEach(type => {
|
|
27
|
+
addFieldType({
|
|
28
|
+
type,
|
|
29
|
+
component: _reactFormBuilder.formFieldTypes[type]
|
|
30
|
+
});
|
|
31
|
+
});
|
|
33
32
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return Promise.resolve().then(function () {
|
|
37
|
-
return _interopRequireWildcard(require( /* webpackChunkName: 'EntityManager' */'./components/EntityManager'));
|
|
33
|
+
app.events.once('plugin:data-ui:load:loaded', async () => {
|
|
34
|
+
await app.events.emitAsync('load:custom:field:type', _reactFormBuilder.getFormBuilderLookup.addFieldType);
|
|
38
35
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
var addConfig = _ref2.addConfig;
|
|
72
|
-
addConfig({
|
|
73
|
-
main: {
|
|
74
|
-
items: {
|
|
75
|
-
content: {
|
|
76
|
-
label: 'content',
|
|
77
|
-
loadOpen: true,
|
|
78
|
-
items: {},
|
|
79
|
-
icon: _icons.ContentIcon,
|
|
80
|
-
order: 10
|
|
81
|
-
},
|
|
82
|
-
taxonomy: {
|
|
83
|
-
label: 'Taxonomy',
|
|
84
|
-
items: {},
|
|
85
|
-
icon: _icons.TaxonomyIcon,
|
|
86
|
-
order: 40
|
|
87
|
-
},
|
|
88
|
-
user: {
|
|
89
|
-
label: 'User',
|
|
90
|
-
items: {},
|
|
91
|
-
icon: _icons.UserIcon,
|
|
92
|
-
order: 90
|
|
93
|
-
},
|
|
94
|
-
settings: {
|
|
95
|
-
label: 'Settings',
|
|
96
|
-
items: {},
|
|
97
|
-
icon: _icons.SettingsIcon,
|
|
98
|
-
order: 100
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
entityDataListingRoute = {
|
|
105
|
-
path: "".concat(_constants.DATA_LISTING_PREFIX, "/:entityIdentifier"),
|
|
106
|
-
key: 'entityDataListing',
|
|
107
|
-
component: EntityDataListing,
|
|
108
|
-
exact: true
|
|
109
|
-
};
|
|
110
|
-
editEntityRoute = {
|
|
111
|
-
path: "".concat(_constants.DATA_LISTING_PREFIX, "/:entityIdentifier/:action/:id"),
|
|
112
|
-
key: 'editEntity',
|
|
113
|
-
component: EntityManager,
|
|
114
|
-
exact: true
|
|
115
|
-
};
|
|
116
|
-
addEntityRoute = {
|
|
117
|
-
path: "".concat(_constants.DATA_LISTING_PREFIX, "/:entityIdentifier/:action"),
|
|
118
|
-
key: 'createEntity',
|
|
119
|
-
component: EntityManager,
|
|
120
|
-
exact: true
|
|
121
|
-
};
|
|
122
|
-
app.addRoute(entityDataListingRoute);
|
|
123
|
-
app.addRoute(editEntityRoute);
|
|
124
|
-
app.addRoute(addEntityRoute);
|
|
125
|
-
return _context2.abrupt("return", {
|
|
126
|
-
name: _constants.PLUGIN_NAME,
|
|
127
|
-
version: _package["default"].version
|
|
128
|
-
});
|
|
129
|
-
case 11:
|
|
130
|
-
case "end":
|
|
131
|
-
return _context2.stop();
|
|
36
|
+
app.events.once('admin:menu:config:load', ({
|
|
37
|
+
addConfig
|
|
38
|
+
}) => {
|
|
39
|
+
addConfig({
|
|
40
|
+
main: {
|
|
41
|
+
items: {
|
|
42
|
+
content: {
|
|
43
|
+
label: 'content',
|
|
44
|
+
loadOpen: true,
|
|
45
|
+
items: {},
|
|
46
|
+
icon: _icons.ContentIcon,
|
|
47
|
+
order: 10
|
|
48
|
+
},
|
|
49
|
+
taxonomy: {
|
|
50
|
+
label: 'Taxonomy',
|
|
51
|
+
items: {},
|
|
52
|
+
icon: _icons.TaxonomyIcon,
|
|
53
|
+
order: 40
|
|
54
|
+
},
|
|
55
|
+
user: {
|
|
56
|
+
label: 'User',
|
|
57
|
+
items: {},
|
|
58
|
+
icon: _icons.UserIcon,
|
|
59
|
+
order: 90
|
|
60
|
+
},
|
|
61
|
+
settings: {
|
|
62
|
+
label: 'Settings',
|
|
63
|
+
items: {},
|
|
64
|
+
icon: _icons.SettingsIcon,
|
|
65
|
+
order: 100
|
|
66
|
+
}
|
|
67
|
+
}
|
|
132
68
|
}
|
|
133
|
-
}
|
|
134
|
-
})
|
|
135
|
-
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
const entityDataListingRoute = {
|
|
72
|
+
path: `${_constants.DATA_LISTING_PREFIX}/:entityIdentifier`,
|
|
73
|
+
key: 'entityDataListing',
|
|
74
|
+
component: _EntityDataListing.default,
|
|
75
|
+
exact: true
|
|
76
|
+
};
|
|
77
|
+
const editEntityRoute = {
|
|
78
|
+
path: `${_constants.DATA_LISTING_PREFIX}/:entityIdentifier/:action/:id`,
|
|
79
|
+
key: 'editEntity',
|
|
80
|
+
component: _EntityManager.default,
|
|
81
|
+
exact: true
|
|
82
|
+
};
|
|
83
|
+
const addEntityRoute = {
|
|
84
|
+
path: `${_constants.DATA_LISTING_PREFIX}/:entityIdentifier/:action`,
|
|
85
|
+
key: 'createEntity',
|
|
86
|
+
component: _EntityManager.default,
|
|
87
|
+
exact: true
|
|
88
|
+
};
|
|
89
|
+
app.addRoute(entityDataListingRoute);
|
|
90
|
+
app.addRoute(editEntityRoute);
|
|
91
|
+
app.addRoute(addEntityRoute);
|
|
92
|
+
return {
|
|
93
|
+
name: _constants.PLUGIN_NAME,
|
|
94
|
+
version: _package.default.version
|
|
95
|
+
};
|
|
136
96
|
}
|
|
137
97
|
load.pluginName = _constants.PLUGIN_NAME;
|
|
138
98
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_reactFormBuilder","require","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_reactFormBuilder","require","_package","_interopRequireDefault","_constants","_addContentMenuItems","_icons","_EntityDataListing","_EntityManager","load","app","events","once","getAddContentMenuItems","addFieldType","Object","keys","formFieldTypes","forEach","type","component","emitAsync","getFormBuilderLookup","addConfig","main","items","content","label","loadOpen","icon","ContentIcon","order","taxonomy","TaxonomyIcon","user","UserIcon","settings","SettingsIcon","entityDataListingRoute","path","DATA_LISTING_PREFIX","key","EntityDataListing","exact","editEntityRoute","EntityManager","addEntityRoute","addRoute","name","PLUGIN_NAME","version","pkg","pluginName"],"sources":["../src/index.js"],"sourcesContent":["import { getFormBuilderLookup, formFieldTypes } from '@blaze-cms/react-form-builder';\nimport pkg from '../package.json';\nimport { DATA_LISTING_PREFIX, PLUGIN_NAME } from './constants';\nimport getAddContentMenuItems from './utils/add-content-menu-items';\nimport { UserIcon, TaxonomyIcon, ContentIcon, SettingsIcon } from './icons';\nimport EntityDataListing from './components/EntityDataListing';\nimport EntityManager from './components/EntityManager';\n\n// todo: renable lazy loading after bundler optimisations, currently they are too slow in dev mode\n// const EntityDataListing = React.lazy(\n// () => import(/* webpackChunkName: 'EntityDataListing' */ './components/EntityDataListing')\n// );\n// const EntityManager = React.lazy(\n// () => import(/* webpackChunkName: 'EntityManager' */ './components/EntityManager')\n// );\n\nexport default async function load(app) {\n app.events.once('admin:menu:config:load', getAddContentMenuItems(app));\n\n app.events.once('load:custom:field:type', addFieldType => {\n Object.keys(formFieldTypes).forEach(type => {\n addFieldType({ type, component: formFieldTypes[type] });\n });\n });\n\n app.events.once('plugin:data-ui:load:loaded', async () => {\n await app.events.emitAsync('load:custom:field:type', getFormBuilderLookup.addFieldType);\n });\n\n app.events.once('admin:menu:config:load', ({ addConfig }) => {\n addConfig({\n main: {\n items: {\n content: {\n label: 'content',\n loadOpen: true,\n items: {},\n icon: ContentIcon,\n order: 10\n },\n taxonomy: {\n label: 'Taxonomy',\n items: {},\n icon: TaxonomyIcon,\n order: 40\n },\n user: {\n label: 'User',\n items: {},\n icon: UserIcon,\n order: 90\n },\n settings: {\n label: 'Settings',\n items: {},\n icon: SettingsIcon,\n order: 100\n }\n }\n }\n });\n });\n\n const entityDataListingRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier`,\n key: 'entityDataListing',\n component: EntityDataListing,\n exact: true\n };\n\n const editEntityRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier/:action/:id`,\n key: 'editEntity',\n component: EntityManager,\n exact: true\n };\n\n const addEntityRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier/:action`,\n key: 'createEntity',\n component: EntityManager,\n exact: true\n };\n\n app.addRoute(entityDataListingRoute);\n app.addRoute(editEntityRoute);\n app.addRoute(addEntityRoute);\n\n return {\n name: PLUGIN_NAME,\n version: pkg.version\n };\n}\n\nload.pluginName = PLUGIN_NAME;\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,104 +1,78 @@
|
|
|
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 _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
|
-
require("core-js/modules/es.array.for-each.js");
|
|
11
|
-
require("core-js/modules/es.object.entries.js");
|
|
12
|
-
require("core-js/modules/es.object.to-string.js");
|
|
13
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
14
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
6
|
+
exports.default = void 0;
|
|
16
7
|
var _adminUiUtils = require("@blaze-cms/admin-ui-utils");
|
|
17
|
-
|
|
18
|
-
MENU_PERMISSIONS
|
|
8
|
+
const {
|
|
9
|
+
MENU_PERMISSIONS
|
|
10
|
+
} = require('../constants');
|
|
19
11
|
function getAddContentMenuItems(app) {
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
});
|
|
66
|
-
menuConfig = {
|
|
67
|
-
main: {
|
|
68
|
-
items: {
|
|
69
|
-
settings: {
|
|
70
|
-
items: menuItems
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
Object.entries(sectionMenuItems).forEach(function (_ref4) {
|
|
76
|
-
var _ref5 = (0, _slicedToArray2["default"])(_ref4, 2),
|
|
77
|
-
sectionKey = _ref5[0],
|
|
78
|
-
sectionItems = _ref5[1];
|
|
79
|
-
var sectionConfig = menuConfig.main.items[sectionKey] || {};
|
|
80
|
-
sectionConfig.items = sectionItems;
|
|
81
|
-
menuConfig.main.items[sectionKey] = sectionConfig;
|
|
82
|
-
});
|
|
83
|
-
getEntitySchemas.forEach(function (_ref6) {
|
|
84
|
-
var id = _ref6.id,
|
|
85
|
-
displayName = _ref6.displayName;
|
|
86
|
-
menuItems[id] = {
|
|
87
|
-
label: displayName,
|
|
88
|
-
uri: "/data-listing/".concat(id)
|
|
89
|
-
};
|
|
90
|
-
});
|
|
91
|
-
addConfig(menuConfig);
|
|
92
|
-
case 15:
|
|
93
|
-
case "end":
|
|
94
|
-
return _context.stop();
|
|
12
|
+
return async ({
|
|
13
|
+
addConfig
|
|
14
|
+
}) => {
|
|
15
|
+
const client = app.getClient();
|
|
16
|
+
const {
|
|
17
|
+
data: {
|
|
18
|
+
getEntitySchemas
|
|
19
|
+
}
|
|
20
|
+
} = await client.query({
|
|
21
|
+
query: (0, _adminUiUtils.getQuery)('GET_USER_EDITABLE_ENTITIES'),
|
|
22
|
+
variables: {
|
|
23
|
+
// only return entities that the current user can do the following actions on
|
|
24
|
+
canDoActions: MENU_PERMISSIONS
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
if (!getEntitySchemas || !getEntitySchemas.length) return; // no items so don't add section
|
|
28
|
+
|
|
29
|
+
const menuItems = {};
|
|
30
|
+
const sectionMenuItems = {
|
|
31
|
+
settings: {}
|
|
32
|
+
};
|
|
33
|
+
getEntitySchemas.forEach(({
|
|
34
|
+
id,
|
|
35
|
+
displayName,
|
|
36
|
+
displayProperties
|
|
37
|
+
}) => {
|
|
38
|
+
if (!displayProperties) return null;
|
|
39
|
+
const {
|
|
40
|
+
adminMenu: {
|
|
41
|
+
sectionKey = 'settings'
|
|
42
|
+
} = {}
|
|
43
|
+
} = displayProperties;
|
|
44
|
+
const sectionItems = sectionMenuItems[sectionKey] || {};
|
|
45
|
+
sectionItems[id] = {
|
|
46
|
+
label: displayName,
|
|
47
|
+
uri: `/data-listing/${id}`
|
|
48
|
+
};
|
|
49
|
+
sectionMenuItems[sectionKey] = sectionItems;
|
|
50
|
+
});
|
|
51
|
+
const menuConfig = {
|
|
52
|
+
main: {
|
|
53
|
+
items: {
|
|
54
|
+
settings: {
|
|
55
|
+
items: menuItems
|
|
56
|
+
}
|
|
95
57
|
}
|
|
96
|
-
}
|
|
97
|
-
}));
|
|
98
|
-
return function (_x) {
|
|
99
|
-
return _ref2.apply(this, arguments);
|
|
58
|
+
}
|
|
100
59
|
};
|
|
101
|
-
|
|
60
|
+
Object.entries(sectionMenuItems).forEach(([sectionKey, sectionItems]) => {
|
|
61
|
+
const sectionConfig = menuConfig.main.items[sectionKey] || {};
|
|
62
|
+
sectionConfig.items = sectionItems;
|
|
63
|
+
menuConfig.main.items[sectionKey] = sectionConfig;
|
|
64
|
+
});
|
|
65
|
+
getEntitySchemas.forEach(({
|
|
66
|
+
id,
|
|
67
|
+
displayName
|
|
68
|
+
}) => {
|
|
69
|
+
menuItems[id] = {
|
|
70
|
+
label: displayName,
|
|
71
|
+
uri: `/data-listing/${id}`
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
addConfig(menuConfig);
|
|
75
|
+
};
|
|
102
76
|
}
|
|
103
|
-
var _default = exports
|
|
77
|
+
var _default = exports.default = getAddContentMenuItems;
|
|
104
78
|
//# sourceMappingURL=add-content-menu-items.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-content-menu-items.js","names":["_adminUiUtils","require","
|
|
1
|
+
{"version":3,"file":"add-content-menu-items.js","names":["_adminUiUtils","require","MENU_PERMISSIONS","getAddContentMenuItems","app","addConfig","client","getClient","data","getEntitySchemas","query","getQuery","variables","canDoActions","length","menuItems","sectionMenuItems","settings","forEach","id","displayName","displayProperties","adminMenu","sectionKey","sectionItems","label","uri","menuConfig","main","items","Object","entries","sectionConfig","_default","exports","default"],"sources":["../../src/utils/add-content-menu-items.js"],"sourcesContent":["import { getQuery } from '@blaze-cms/admin-ui-utils';\n\nconst { MENU_PERMISSIONS } = require('../constants');\n\nfunction getAddContentMenuItems(app) {\n return async ({ addConfig }) => {\n const client = app.getClient();\n const {\n data: { getEntitySchemas }\n } = await client.query({\n query: getQuery('GET_USER_EDITABLE_ENTITIES'),\n variables: {\n // only return entities that the current user can do the following actions on\n canDoActions: MENU_PERMISSIONS\n }\n });\n\n if (!getEntitySchemas || !getEntitySchemas.length) return; // no items so don't add section\n\n const menuItems = {};\n const sectionMenuItems = { settings: {} };\n\n getEntitySchemas.forEach(({ id, displayName, displayProperties }) => {\n if (!displayProperties) return null;\n\n const { adminMenu: { sectionKey = 'settings' } = {} } = displayProperties;\n const sectionItems = sectionMenuItems[sectionKey] || {};\n sectionItems[id] = {\n label: displayName,\n uri: `/data-listing/${id}`\n };\n sectionMenuItems[sectionKey] = sectionItems;\n });\n\n const menuConfig = {\n main: {\n items: {\n settings: {\n items: menuItems\n }\n }\n }\n };\n\n Object.entries(sectionMenuItems).forEach(([sectionKey, sectionItems]) => {\n const sectionConfig = menuConfig.main.items[sectionKey] || {};\n sectionConfig.items = sectionItems;\n menuConfig.main.items[sectionKey] = sectionConfig;\n });\n\n getEntitySchemas.forEach(({ id, displayName }) => {\n menuItems[id] = {\n label: displayName,\n uri: `/data-listing/${id}`\n };\n });\n\n addConfig(menuConfig);\n };\n}\n\nexport default getAddContentMenuItems;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAEA,MAAM;EAAEC;AAAiB,CAAC,GAAGD,OAAO,CAAC,cAAc,CAAC;AAEpD,SAASE,sBAAsBA,CAACC,GAAG,EAAE;EACnC,OAAO,OAAO;IAAEC;EAAU,CAAC,KAAK;IAC9B,MAAMC,MAAM,GAAGF,GAAG,CAACG,SAAS,CAAC,CAAC;IAC9B,MAAM;MACJC,IAAI,EAAE;QAAEC;MAAiB;IAC3B,CAAC,GAAG,MAAMH,MAAM,CAACI,KAAK,CAAC;MACrBA,KAAK,EAAE,IAAAC,sBAAQ,EAAC,4BAA4B,CAAC;MAC7CC,SAAS,EAAE;QACT;QACAC,YAAY,EAAEX;MAChB;IACF,CAAC,CAAC;IAEF,IAAI,CAACO,gBAAgB,IAAI,CAACA,gBAAgB,CAACK,MAAM,EAAE,OAAO,CAAC;;IAE3D,MAAMC,SAAS,GAAG,CAAC,CAAC;IACpB,MAAMC,gBAAgB,GAAG;MAAEC,QAAQ,EAAE,CAAC;IAAE,CAAC;IAEzCR,gBAAgB,CAACS,OAAO,CAAC,CAAC;MAAEC,EAAE;MAAEC,WAAW;MAAEC;IAAkB,CAAC,KAAK;MACnE,IAAI,CAACA,iBAAiB,EAAE,OAAO,IAAI;MAEnC,MAAM;QAAEC,SAAS,EAAE;UAAEC,UAAU,GAAG;QAAW,CAAC,GAAG,CAAC;MAAE,CAAC,GAAGF,iBAAiB;MACzE,MAAMG,YAAY,GAAGR,gBAAgB,CAACO,UAAU,CAAC,IAAI,CAAC,CAAC;MACvDC,YAAY,CAACL,EAAE,CAAC,GAAG;QACjBM,KAAK,EAAEL,WAAW;QAClBM,GAAG,EAAE,iBAAiBP,EAAE;MAC1B,CAAC;MACDH,gBAAgB,CAACO,UAAU,CAAC,GAAGC,YAAY;IAC7C,CAAC,CAAC;IAEF,MAAMG,UAAU,GAAG;MACjBC,IAAI,EAAE;QACJC,KAAK,EAAE;UACLZ,QAAQ,EAAE;YACRY,KAAK,EAAEd;UACT;QACF;MACF;IACF,CAAC;IAEDe,MAAM,CAACC,OAAO,CAACf,gBAAgB,CAAC,CAACE,OAAO,CAAC,CAAC,CAACK,UAAU,EAAEC,YAAY,CAAC,KAAK;MACvE,MAAMQ,aAAa,GAAGL,UAAU,CAACC,IAAI,CAACC,KAAK,CAACN,UAAU,CAAC,IAAI,CAAC,CAAC;MAC7DS,aAAa,CAACH,KAAK,GAAGL,YAAY;MAClCG,UAAU,CAACC,IAAI,CAACC,KAAK,CAACN,UAAU,CAAC,GAAGS,aAAa;IACnD,CAAC,CAAC;IAEFvB,gBAAgB,CAACS,OAAO,CAAC,CAAC;MAAEC,EAAE;MAAEC;IAAY,CAAC,KAAK;MAChDL,SAAS,CAACI,EAAE,CAAC,GAAG;QACdM,KAAK,EAAEL,WAAW;QAClBM,GAAG,EAAE,iBAAiBP,EAAE;MAC1B,CAAC;IACH,CAAC,CAAC;IAEFd,SAAS,CAACsB,UAAU,CAAC;EACvB,CAAC;AACH;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEchC,sBAAsB","ignoreList":[]}
|