@blaze-cms/plugin-data-ui 0.139.0-project-admin-customisations.0 → 0.139.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 +50 -1
- package/lib/components/EntityDataListing/EntityDataListing.js +1 -2
- package/lib/components/EntityDataListing/EntityDataListing.js.map +1 -1
- package/lib/components/EntityDataListing/index.js +1 -2
- package/lib/components/EntityDataListing/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js +1 -2
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/index.js +1 -2
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/Entity.js +3 -4
- package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js +1 -2
- package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +1 -2
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js +1 -2
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/index.js +1 -2
- package/lib/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js +1 -2
- package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js +1 -2
- package/lib/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/index.js +3 -4
- package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +1 -2
- package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/create/index.js +1 -2
- package/lib/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js +1 -2
- package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js +1 -2
- package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js +1 -2
- package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/index.js +1 -2
- package/lib/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js +1 -2
- package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js +1 -2
- package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/update/index.js +1 -2
- package/lib/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js +1 -2
- package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
- package/lib/components/EntityManager/Entity/index.js +1 -2
- package/lib/components/EntityManager/Entity/index.js.map +1 -1
- package/lib/components/EntityManager/EntityManager.js +3 -4
- package/lib/components/EntityManager/EntityManager.js.map +1 -1
- package/lib/components/EntityManager/index.js +1 -2
- package/lib/components/EntityManager/index.js.map +1 -1
- package/lib/components/EntityManager/utils/data-mappers.js +4 -8
- package/lib/components/EntityManager/utils/data-mappers.js.map +1 -1
- package/lib/components/EntityManager/utils/entityAvailableActions.js +1 -2
- package/lib/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
- package/lib/components/EntityManager/utils/is-form-empty.js +1 -2
- package/lib/components/EntityManager/utils/is-form-empty.js.map +1 -1
- package/lib/components/EntityManager/utils/query.js +1 -2
- package/lib/components/EntityManager/utils/query.js.map +1 -1
- package/lib/components/InfoBoxes/InfoBoxes.js +1 -2
- package/lib/components/InfoBoxes/InfoBoxes.js.map +1 -1
- package/lib/components/InfoBoxes/container/InfoBoxContainer.js +1 -2
- package/lib/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -1
- package/lib/components/InfoBoxes/hooks/useData.js +1 -2
- package/lib/components/InfoBoxes/hooks/useData.js.map +1 -1
- package/lib/components/InfoBoxes/hooks/useInfoBox.js +1 -2
- package/lib/components/InfoBoxes/hooks/useInfoBox.js.map +1 -1
- package/lib/components/InfoBoxes/index.js +1 -2
- package/lib/components/InfoBoxes/index.js.map +1 -1
- package/lib/components/InfoBoxes/presentational/InfoBox.js +1 -2
- package/lib/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
- package/lib/components/ListingTable/ListingTable.js +3 -5
- package/lib/components/ListingTable/ListingTable.js.map +1 -1
- package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js +1 -2
- package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
- package/lib/components/ListingTable/ListingTableContent/index.js +1 -2
- package/lib/components/ListingTable/ListingTableContent/index.js.map +1 -1
- package/lib/components/ListingTable/TableActions/TableActions.js +1 -2
- package/lib/components/ListingTable/TableActions/TableActions.js.map +1 -1
- package/lib/components/ListingTable/TableActions/index.js +1 -2
- package/lib/components/ListingTable/TableActions/index.js.map +1 -1
- package/lib/components/ListingTable/index.js +1 -2
- package/lib/components/ListingTable/index.js.map +1 -1
- package/lib/components/ListingTable/mappers/populate-rows.js +3 -6
- package/lib/components/ListingTable/mappers/populate-rows.js.map +1 -1
- package/lib/components/ListingTable/service/index.js +1 -2
- package/lib/components/ListingTable/service/index.js.map +1 -1
- package/lib/components/Tabs/index.js +3 -4
- package/lib/components/Tabs/index.js.map +1 -1
- package/lib/constants.js +26 -52
- package/lib/constants.js.map +1 -1
- package/lib/icons/ContentIcon.js +48 -48
- package/lib/icons/ContentIcon.js.map +1 -1
- package/lib/icons/SettingsIcon.js +14 -34
- package/lib/icons/SettingsIcon.js.map +1 -1
- package/lib/icons/TaxonomyIcon.js +34 -54
- package/lib/icons/TaxonomyIcon.js.map +1 -1
- package/lib/icons/UsersIcon.js +14 -35
- package/lib/icons/UsersIcon.js.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/utils/add-content-menu-items.js +1 -2
- package/lib/utils/add-content-menu-items.js.map +1 -1
- package/lib/utils/build-create-entity-mutation.js +1 -2
- package/lib/utils/build-create-entity-mutation.js.map +1 -1
- package/lib/utils/build-delete-entity-mutation.js +1 -2
- package/lib/utils/build-delete-entity-mutation.js.map +1 -1
- package/lib/utils/build-listing-query.js +1 -2
- package/lib/utils/build-listing-query.js.map +1 -1
- package/lib/utils/build-update-data-query.js +1 -2
- package/lib/utils/build-update-data-query.js.map +1 -1
- package/lib/utils/build-update-publish-unpublish-mutation.js +1 -2
- package/lib/utils/build-update-publish-unpublish-mutation.js.map +1 -1
- package/lib/utils/get-default-query-params.js +1 -2
- package/lib/utils/get-default-query-params.js.map +1 -1
- package/lib/utils/hoc/withContext.js +1 -2
- package/lib/utils/hoc/withContext.js.map +1 -1
- package/lib/utils/hooks/useToggle.js +1 -2
- package/lib/utils/hooks/useToggle.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTable.js +0 -1
- package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
- package/lib-es/icons/ContentIcon.js +45 -45
- package/lib-es/icons/ContentIcon.js.map +1 -1
- package/lib-es/icons/SettingsIcon.js +13 -33
- package/lib-es/icons/SettingsIcon.js.map +1 -1
- package/lib-es/icons/TaxonomyIcon.js +33 -53
- package/lib-es/icons/TaxonomyIcon.js.map +1 -1
- package/lib-es/icons/UsersIcon.js +13 -34
- package/lib-es/icons/UsersIcon.js.map +1 -1
- package/package.json +10 -10
- package/src/icons/ContentIcon.js +68 -57
- package/src/icons/SettingsIcon.js +24 -36
- package/src/icons/TaxonomyIcon.js +46 -58
- package/src/icons/UsersIcon.js +21 -34
|
@@ -12,79 +12,59 @@ function TaxonomyIcon(_ref) {
|
|
|
12
12
|
var _ref$width = _ref.width,
|
|
13
13
|
width = _ref$width === void 0 ? _constants.ICON_SIZE.WIDTH : _ref$width,
|
|
14
14
|
_ref$height = _ref.height,
|
|
15
|
-
height = _ref$height === void 0 ? _constants.ICON_SIZE.HEIGHT : _ref$height
|
|
15
|
+
height = _ref$height === void 0 ? _constants.ICON_SIZE.HEIGHT : _ref$height,
|
|
16
|
+
_ref$stroke = _ref.stroke,
|
|
17
|
+
stroke = _ref$stroke === void 0 ? _constants.ICON_COLOR.STROKE : _ref$stroke;
|
|
16
18
|
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
17
19
|
width: width,
|
|
18
20
|
height: height,
|
|
19
|
-
viewBox: "0 0
|
|
21
|
+
viewBox: "0 0 22 22",
|
|
20
22
|
version: "1.1",
|
|
21
23
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
24
|
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
23
|
-
}, /*#__PURE__*/_react["default"].createElement("title", null, "
|
|
24
|
-
id: "
|
|
25
|
+
}, /*#__PURE__*/_react["default"].createElement("title", null, "taxonomy"), /*#__PURE__*/_react["default"].createElement("g", {
|
|
26
|
+
id: "Page-1",
|
|
25
27
|
stroke: "none",
|
|
26
|
-
strokeWidth: 1,
|
|
28
|
+
strokeWidth: "1",
|
|
27
29
|
fill: "none",
|
|
28
|
-
fillRule: "evenodd"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
transform: "translate(-15, -412)"
|
|
32
|
-
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
33
|
-
id: "Group-4",
|
|
34
|
-
transform: "translate(9, 19)"
|
|
35
|
-
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
36
|
-
id: "scheme",
|
|
37
|
-
transform: "translate(0, 386)"
|
|
38
|
-
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
39
|
-
id: "icons/taxonomy",
|
|
40
|
-
transform: "translate(7, 8)"
|
|
30
|
+
fillRule: "evenodd",
|
|
31
|
+
strokeLinecap: "round",
|
|
32
|
+
strokeLinejoin: "round"
|
|
41
33
|
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
42
34
|
id: "Group",
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
strokeLinejoin: "round",
|
|
46
|
-
strokeWidth: "1.5"
|
|
35
|
+
transform: "translate(1, 1)",
|
|
36
|
+
stroke: stroke
|
|
47
37
|
}, /*#__PURE__*/_react["default"].createElement("rect", {
|
|
48
38
|
id: "Rectangle",
|
|
49
|
-
x: 0,
|
|
50
|
-
y: "
|
|
51
|
-
width: "6.
|
|
52
|
-
height: "6.
|
|
53
|
-
rx:
|
|
39
|
+
x: "0",
|
|
40
|
+
y: "13.2173913",
|
|
41
|
+
width: "6.78260868",
|
|
42
|
+
height: "6.60869564",
|
|
43
|
+
rx: "1.5"
|
|
54
44
|
}), /*#__PURE__*/_react["default"].createElement("rect", {
|
|
55
45
|
id: "Rectangle",
|
|
56
|
-
x: "
|
|
57
|
-
y: "
|
|
58
|
-
width: "6.
|
|
59
|
-
height: "6.
|
|
60
|
-
rx:
|
|
46
|
+
x: "13.2173913",
|
|
47
|
+
y: "13.2173913",
|
|
48
|
+
width: "6.78260868",
|
|
49
|
+
height: "6.60869564",
|
|
50
|
+
rx: "1.5"
|
|
61
51
|
}), /*#__PURE__*/_react["default"].createElement("rect", {
|
|
62
52
|
id: "Rectangle",
|
|
63
|
-
x: "6.
|
|
64
|
-
y: 0,
|
|
65
|
-
width: "6.
|
|
66
|
-
height: "6.
|
|
67
|
-
rx:
|
|
53
|
+
x: "6.60869564",
|
|
54
|
+
y: "0",
|
|
55
|
+
width: "6.78260868",
|
|
56
|
+
height: "6.60869564",
|
|
57
|
+
rx: "1.5"
|
|
68
58
|
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
69
|
-
d: "M3.
|
|
59
|
+
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",
|
|
70
60
|
id: "Path"
|
|
71
61
|
}), /*#__PURE__*/_react["default"].createElement("line", {
|
|
72
|
-
x1: "9.
|
|
73
|
-
y1: "6.
|
|
74
|
-
x2: "9.
|
|
75
|
-
y2: "9.
|
|
62
|
+
x1: "9.91304346",
|
|
63
|
+
y1: "6.60869564",
|
|
64
|
+
x2: "9.91304346",
|
|
65
|
+
y2: "9.91304346",
|
|
76
66
|
id: "Path"
|
|
77
|
-
}))
|
|
78
|
-
id: "Rectangle",
|
|
79
|
-
fillOpacity: 0,
|
|
80
|
-
fill: "#000000",
|
|
81
|
-
fillRule: "nonzero",
|
|
82
|
-
x: 0,
|
|
83
|
-
y: 0,
|
|
84
|
-
width: 19,
|
|
85
|
-
height: 19
|
|
86
|
-
})))))));
|
|
67
|
+
}))));
|
|
87
68
|
}
|
|
88
|
-
var _default = TaxonomyIcon;
|
|
89
|
-
exports["default"] = _default;
|
|
69
|
+
var _default = exports["default"] = TaxonomyIcon;
|
|
90
70
|
//# sourceMappingURL=TaxonomyIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaxonomyIcon.js","names":["_react","_interopRequireDefault","require","_constants","TaxonomyIcon","_ref","_ref$width","width","ICON_SIZE","WIDTH","_ref$height","height","HEIGHT","createElement","viewBox","version","xmlns","xmlnsXlink","id","
|
|
1
|
+
{"version":3,"file":"TaxonomyIcon.js","names":["_react","_interopRequireDefault","require","_constants","TaxonomyIcon","_ref","_ref$width","width","ICON_SIZE","WIDTH","_ref$height","height","HEIGHT","_ref$stroke","stroke","ICON_COLOR","STROKE","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=\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I,MAAM,EAAC,YAAY;IACnBoB,EAAE,EAAC;EAAK,CACT,CAAC,eACF/B,MAAA,YAAAiB,aAAA;IACEK,EAAE,EAAC,WAAW;IACdO,CAAC,EAAC,YAAY;IACdC,CAAC,EAAC,YAAY;IACdvB,KAAK,EAAC,YAAY;IAClBI,MAAM,EAAC,YAAY;IACnBoB,EAAE,EAAC;EAAK,CACT,CAAC,eACF/B,MAAA,YAAAiB,aAAA;IACEK,EAAE,EAAC,WAAW;IACdO,CAAC,EAAC,YAAY;IACdC,CAAC,EAAC,GAAG;IACLvB,KAAK,EAAC,YAAY;IAClBI,MAAM,EAAC,YAAY;IACnBoB,EAAE,EAAC;EAAK,CACT,CAAC,eACF/B,MAAA,YAAAiB,aAAA;IACEe,CAAC,EAAC,gOAAgO;IAClOV,EAAE,EAAC;EAAM,CACV,CAAC,eACFtB,MAAA,YAAAiB,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,cAEclC,YAAY"}
|
package/lib/icons/UsersIcon.js
CHANGED
|
@@ -12,53 +12,32 @@ function UserIcon(_ref) {
|
|
|
12
12
|
var _ref$width = _ref.width,
|
|
13
13
|
width = _ref$width === void 0 ? _constants.ICON_SIZE.WIDTH : _ref$width,
|
|
14
14
|
_ref$height = _ref.height,
|
|
15
|
-
height = _ref$height === void 0 ? _constants.ICON_SIZE.HEIGHT : _ref$height
|
|
15
|
+
height = _ref$height === void 0 ? _constants.ICON_SIZE.HEIGHT : _ref$height,
|
|
16
|
+
_ref$stroke = _ref.stroke,
|
|
17
|
+
stroke = _ref$stroke === void 0 ? _constants.ICON_COLOR.STROKE : _ref$stroke;
|
|
16
18
|
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
17
19
|
width: width,
|
|
18
20
|
height: height,
|
|
19
|
-
viewBox: "0 0
|
|
21
|
+
viewBox: "0 0 22 22",
|
|
20
22
|
version: "1.1",
|
|
21
23
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
24
|
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
23
|
-
}, /*#__PURE__*/_react["default"].createElement("title", null, "
|
|
24
|
-
id: "
|
|
25
|
+
}, /*#__PURE__*/_react["default"].createElement("title", null, "user"), /*#__PURE__*/_react["default"].createElement("g", {
|
|
26
|
+
id: "Page-1",
|
|
25
27
|
stroke: "none",
|
|
26
28
|
strokeWidth: 1,
|
|
27
29
|
fill: "none",
|
|
28
|
-
fillRule: "evenodd"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
transform: "translate(-14, -453)"
|
|
32
|
-
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
33
|
-
id: "Group-4",
|
|
34
|
-
transform: "translate(9, 19)"
|
|
35
|
-
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
36
|
-
id: "Group-15",
|
|
37
|
-
transform: "translate(0, 428)"
|
|
38
|
-
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
39
|
-
id: "icons/user",
|
|
40
|
-
transform: "translate(6, 6)"
|
|
30
|
+
fillRule: "evenodd",
|
|
31
|
+
strokeLinecap: "round",
|
|
32
|
+
strokeLinejoin: "round"
|
|
41
33
|
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
42
34
|
id: "Group",
|
|
43
|
-
transform: "translate(
|
|
44
|
-
stroke:
|
|
45
|
-
strokeLinecap: "round",
|
|
46
|
-
strokeLinejoin: "round",
|
|
47
|
-
strokeWidth: "1.5"
|
|
35
|
+
transform: "translate(1, 0.76)",
|
|
36
|
+
stroke: stroke
|
|
48
37
|
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
49
|
-
d: "M2.
|
|
38
|
+
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",
|
|
50
39
|
id: "Shape"
|
|
51
|
-
}))
|
|
52
|
-
id: "Rectangle",
|
|
53
|
-
fillOpacity: 0,
|
|
54
|
-
fill: "#000000",
|
|
55
|
-
fillRule: "nonzero",
|
|
56
|
-
x: 0,
|
|
57
|
-
y: 0,
|
|
58
|
-
width: 19,
|
|
59
|
-
height: "18.24"
|
|
60
|
-
})))))));
|
|
40
|
+
}))));
|
|
61
41
|
}
|
|
62
|
-
var _default = UserIcon;
|
|
63
|
-
exports["default"] = _default;
|
|
42
|
+
var _default = exports["default"] = UserIcon;
|
|
64
43
|
//# sourceMappingURL=UsersIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsersIcon.js","names":["_react","_interopRequireDefault","require","_constants","UserIcon","_ref","_ref$width","width","ICON_SIZE","WIDTH","_ref$height","height","HEIGHT","
|
|
1
|
+
{"version":3,"file":"UsersIcon.js","names":["_react","_interopRequireDefault","require","_constants","UserIcon","_ref","_ref$width","width","ICON_SIZE","WIDTH","_ref$height","height","HEIGHT","_ref$stroke","stroke","ICON_COLOR","STROKE","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,CAAAC,IAAA,EAId;EAAA,IAAAC,UAAA,GAAAD,IAAA,CAHDE,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAGE,oBAAS,CAACC,KAAK,GAAAH,UAAA;IAAAI,WAAA,GAAAL,IAAA,CACvBM,MAAM;IAANA,MAAM,GAAAD,WAAA,cAAGF,oBAAS,CAACI,MAAM,GAAAF,WAAA;IAAAG,WAAA,GAAAR,IAAA,CACzBS,MAAM;IAANA,MAAM,GAAAD,WAAA,cAAGE,qBAAU,CAACC,MAAM,GAAAH,WAAA;EAE1B,oBACEb,MAAA,YAAAiB,aAAA;IACEV,KAAK,EAAEA,KAAM;IACbI,MAAM,EAAEA,MAAO;IACfO,OAAO,EAAC,WAAW;IACnBC,OAAO,EAAC,KAAK;IACbC,KAAK,EAAC,4BAA4B;IAClCC,UAAU,EAAC;EAA8B,gBACzCrB,MAAA,YAAAiB,aAAA,gBAAO,MAAW,CAAC,eACnBjB,MAAA,YAAAiB,aAAA;IACEK,EAAE,EAAC,QAAQ;IACXR,MAAM,EAAC,MAAM;IACbS,WAAW,EAAE,CAAE;IACfC,IAAI,EAAC,MAAM;IACXC,QAAQ,EAAC,SAAS;IAClBC,aAAa,EAAC,OAAO;IACrBC,cAAc,EAAC;EAAO,gBACtB3B,MAAA,YAAAiB,aAAA;IAAGK,EAAE,EAAC,OAAO;IAACM,SAAS,EAAC,oBAAoB;IAACd,MAAM,EAAEA;EAAO,gBAC1Dd,MAAA,YAAAiB,aAAA;IACEY,CAAC,EAAC,kqBAAkqB;IACpqBP,EAAE,EAAC;EAAO,CACX,CACA,CACF,CACA,CAAC;AAEV;AAAC,IAAAQ,QAAA,GAAAC,OAAA,cAEc3B,QAAQ"}
|
package/lib/index.js
CHANGED
|
@@ -25,8 +25,8 @@ var _package = _interopRequireDefault(require("../package.json"));
|
|
|
25
25
|
var _constants = require("./constants");
|
|
26
26
|
var _addContentMenuItems = _interopRequireDefault(require("./utils/add-content-menu-items"));
|
|
27
27
|
var _icons = require("./icons");
|
|
28
|
-
function _getRequireWildcardCache(
|
|
29
|
-
function _interopRequireWildcard(
|
|
28
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
29
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2["default"])(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
30
30
|
var EntityDataListing = /*#__PURE__*/_react["default"].lazy(function () {
|
|
31
31
|
return Promise.resolve().then(function () {
|
|
32
32
|
return _interopRequireWildcard(require( /* webpackChunkName: 'EntityDataListing' */'./components/EntityDataListing'));
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_reactFormBuilder","require","_react","_interopRequireDefault","_package","_constants","_addContentMenuItems","_icons","_getRequireWildcardCache","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_reactFormBuilder","require","_react","_interopRequireDefault","_package","_constants","_addContentMenuItems","_icons","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","_typeof2","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","EntityDataListing","React","lazy","Promise","resolve","then","EntityManager","load","_x","_load","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee2","app","entityDataListingRoute","editEntityRoute","addEntityRoute","wrap","_callee2$","_context2","prev","next","events","once","getAddContentMenuItems","addFieldType","keys","formFieldTypes","forEach","type","component","_callee","_callee$","_context","emitAsync","getFormBuilderLookup","stop","_ref2","addConfig","main","items","content","label","loadOpen","icon","ContentIcon","order","taxonomy","TaxonomyIcon","user","UserIcon","settings","SettingsIcon","path","concat","DATA_LISTING_PREFIX","key","exact","addRoute","abrupt","name","PLUGIN_NAME","version","pkg","pluginName"],"sources":["../src/index.js"],"sourcesContent":["import { getFormBuilderLookup, formFieldTypes } from '@blaze-cms/react-form-builder';\nimport React from 'react';\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';\n\nconst EntityDataListing = React.lazy(() =>\n import(/* webpackChunkName: 'EntityDataListing' */ './components/EntityDataListing')\n);\nconst 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":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAA4E,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAI,wBAAAJ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,eAAAA,CAAA,oBAAAM,QAAA,aAAAN,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAI,GAAA,CAAAP,CAAA,UAAAG,CAAA,CAAAK,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAAe,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAlB,CAAA,EAAAe,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAd,CAAA,EAAAe,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAAX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kBACDK,QAAQ,EAAE;oBACRT,KAAK,EAAE,UAAU;oBACjBF,KAAK,EAAE,CAAC,CAAC;oBACTI,IAAI,EAAEQ,mBAAY;oBAClBN,KAAK,EAAE;kBACT;gBACF;cACF;YACF,CAAC,CAAC;UACJ,CAAC,CAAC;UAEIhC,sBAAsB,GAAG;YAC7BuC,IAAI,KAAAC,MAAA,CAAKC,8BAAmB,uBAAoB;YAChDC,GAAG,EAAE,mBAAmB;YACxB1B,SAAS,EAAEjC,iBAAiB;YAC5B4D,KAAK,EAAE;UACT,CAAC;UAEK1C,eAAe,GAAG;YACtBsC,IAAI,KAAAC,MAAA,CAAKC,8BAAmB,mCAAgC;YAC5DC,GAAG,EAAE,YAAY;YACjB1B,SAAS,EAAE3B,aAAa;YACxBsD,KAAK,EAAE;UACT,CAAC;UAEKzC,cAAc,GAAG;YACrBqC,IAAI,KAAAC,MAAA,CAAKC,8BAAmB,+BAA4B;YACxDC,GAAG,EAAE,cAAc;YACnB1B,SAAS,EAAE3B,aAAa;YACxBsD,KAAK,EAAE;UACT,CAAC;UAED5C,GAAG,CAAC6C,QAAQ,CAAC5C,sBAAsB,CAAC;UACpCD,GAAG,CAAC6C,QAAQ,CAAC3C,eAAe,CAAC;UAC7BF,GAAG,CAAC6C,QAAQ,CAAC1C,cAAc,CAAC;UAAC,OAAAG,SAAA,CAAAwC,MAAA,WAEtB;YACLC,IAAI,EAAEC,sBAAW;YACjBC,OAAO,EAAEC,mBAAG,CAACD;UACf,CAAC;QAAA;QAAA;UAAA,OAAA3C,SAAA,CAAAiB,IAAA;MAAA;IAAA,GAAAxB,QAAA;EAAA,CACF;EAAA,OAAAN,KAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAEDJ,IAAI,CAAC4D,UAAU,GAAGH,sBAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-content-menu-items.js","names":["_adminUiUtils","require","_require","MENU_PERMISSIONS","getAddContentMenuItems","app","_ref2","_asyncToGenerator2","_regenerator","mark","_callee","_ref","addConfig","client","_yield$client$query","getEntitySchemas","menuItems","sectionMenuItems","menuConfig","wrap","_callee$","_context","prev","next","getClient","query","getQuery","variables","canDoActions","sent","data","length","abrupt","settings","forEach","_ref3","id","displayName","displayProperties","_displayProperties$ad","adminMenu","_displayProperties$ad2","_displayProperties$ad3","sectionKey","sectionItems","label","uri","concat","main","items","Object","entries","_ref4","_ref5","_slicedToArray2","sectionConfig","_ref6","stop","_x","apply","arguments","_default","exports"],"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":";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B,EAAE,GAAAoB,KAAA,CAAFpB,EAAE;gBAAEC,WAAW,GAAAmB,KAAA,CAAXnB,WAAW;cACzCrB,SAAS,CAACoB,EAAE,CAAC,GAAG;gBACdS,KAAK,EAAER,WAAW;gBAClBS,GAAG,mBAAAC,MAAA,CAAmBX,EAAE;cAC1B,CAAC;YACH,CAAC,CAAC;YAEFxB,SAAS,CAACM,UAAU,CAAC;UAAC;UAAA;YAAA,OAAAG,QAAA,CAAAoC,IAAA;QAAA;MAAA,GAAA/C,OAAA;IAAA,CACvB;IAAA,iBAAAgD,EAAA;MAAA,OAAApD,KAAA,CAAAqD,KAAA,OAAAC,SAAA;IAAA;EAAA;AACH;AAAC,IAAAC,QAAA,
|
|
1
|
+
{"version":3,"file":"add-content-menu-items.js","names":["_adminUiUtils","require","_require","MENU_PERMISSIONS","getAddContentMenuItems","app","_ref2","_asyncToGenerator2","_regenerator","mark","_callee","_ref","addConfig","client","_yield$client$query","getEntitySchemas","menuItems","sectionMenuItems","menuConfig","wrap","_callee$","_context","prev","next","getClient","query","getQuery","variables","canDoActions","sent","data","length","abrupt","settings","forEach","_ref3","id","displayName","displayProperties","_displayProperties$ad","adminMenu","_displayProperties$ad2","_displayProperties$ad3","sectionKey","sectionItems","label","uri","concat","main","items","Object","entries","_ref4","_ref5","_slicedToArray2","sectionConfig","_ref6","stop","_x","apply","arguments","_default","exports"],"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,IAAAC,QAAA,GAA6BD,OAAO,CAAC,cAAc,CAAC;EAA5CE,gBAAgB,GAAAD,QAAA,CAAhBC,gBAAgB;AAExB,SAASC,sBAAsBA,CAACC,GAAG,EAAE;EACnC;IAAA,IAAAC,KAAA,OAAAC,kBAAA,2BAAAC,YAAA,YAAAC,IAAA,CAAO,SAAAC,QAAAC,IAAA;MAAA,IAAAC,SAAA,EAAAC,MAAA,EAAAC,mBAAA,EAAAC,gBAAA,EAAAC,SAAA,EAAAC,gBAAA,EAAAC,UAAA;MAAA,OAAAV,YAAA,YAAAW,IAAA,UAAAC,SAAAC,QAAA;QAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;UAAA;YAASX,SAAS,GAAAD,IAAA,CAATC,SAAS;YACjBC,MAAM,GAAGR,GAAG,CAACmB,SAAS,CAAC,CAAC;YAAAH,QAAA,CAAAE,IAAA;YAAA,OAGpBV,MAAM,CAACY,KAAK,CAAC;cACrBA,KAAK,EAAE,IAAAC,sBAA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,EAAE;oBACRgB,KAAK,EAAEjC;kBACT;gBACF;cACF;YACF,CAAC;YAEDkC,MAAM,CAACC,OAAO,CAAClC,gBAAgB,CAAC,CAACiB,OAAO,CAAC,UAAAkB,KAAA,EAAgC;cAAA,IAAAC,KAAA,OAAAC,eAAA,aAAAF,KAAA;gBAA9BT,UAAU,GAAAU,KAAA;gBAAET,YAAY,GAAAS,KAAA;cACjE,IAAME,aAAa,GAAGrC,UAAU,CAAC8B,IAAI,CAACC,KAAK,CAACN,UAAU,CAAC,IAAI,CAAC,CAAC;cAC7DY,aAAa,CAACN,KAAK,GAAGL,YAAY;cAClC1B,UAAU,CAAC8B,IAAI,CAACC,KAAK,CAACN,UAAU,CAAC,GAAGY,aAAa;YACnD,CAAC,CAAC;YAEFxC,gBAAgB,CAACmB,OAAO,CAAC,UAAAsB,KAAA,EAAyB;cAAA,IAAtBpB,EAAE,GAAAoB,KAAA,CAAFpB,EAAE;gBAAEC,WAAW,GAAAmB,KAAA,CAAXnB,WAAW;cACzCrB,SAAS,CAACoB,EAAE,CAAC,GAAG;gBACdS,KAAK,EAAER,WAAW;gBAClBS,GAAG,mBAAAC,MAAA,CAAmBX,EAAE;cAC1B,CAAC;YACH,CAAC,CAAC;YAEFxB,SAAS,CAACM,UAAU,CAAC;UAAC;UAAA;YAAA,OAAAG,QAAA,CAAAoC,IAAA;QAAA;MAAA,GAAA/C,OAAA;IAAA,CACvB;IAAA,iBAAAgD,EAAA;MAAA,OAAApD,KAAA,CAAAqD,KAAA,OAAAC,SAAA;IAAA;EAAA;AACH;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEc1D,sBAAsB"}
|
|
@@ -21,6 +21,5 @@ function buildCreateEntityMutation(entitySchema) {
|
|
|
21
21
|
var dataProperties = (0, _adminUiUtils.getDataProperties)(entitySchema);
|
|
22
22
|
return (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["mutation createEntity($input: ", ") {\n createdEntity: ", "(input: $input){\n result {\n id,\n ", "\n }\n }\n }"])), actionInput, entitySchema.actions.create, dataProperties.join(',\n'));
|
|
23
23
|
}
|
|
24
|
-
var _default = buildCreateEntityMutation;
|
|
25
|
-
exports["default"] = _default;
|
|
24
|
+
var _default = exports["default"] = buildCreateEntityMutation;
|
|
26
25
|
//# sourceMappingURL=build-create-entity-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-create-entity-mutation.js","names":["_client","require","_coreErrors","_lodash","_interopRequireDefault","_adminUiUtils","_templateObject","buildCreateEntityMutation","entitySchema","actions","create","properties","BlazeError","actionInput","upperfirst","concat","dataProperties","getDataProperties","gql","_taggedTemplateLiteral2","join","_default","exports"],"sources":["../../src/utils/build-create-entity-mutation.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport upperfirst from 'lodash.upperfirst';\nimport { getDataProperties } from '@blaze-cms/admin-ui-utils';\n\nfunction buildCreateEntityMutation(entitySchema) {\n if (\n !entitySchema ||\n !entitySchema.actions ||\n !entitySchema.actions.create ||\n !entitySchema.properties\n ) {\n throw new BlazeError(\n 'Create entity query requires create action and properties from entity schema'\n );\n }\n\n const actionInput = upperfirst(`${entitySchema.actions.create}Input`);\n const dataProperties = getDataProperties(entitySchema);\n\n return gql`mutation createEntity($input: ${actionInput}) {\n createdEntity: ${entitySchema.actions.create}(input: $input){\n result {\n id,\n ${dataProperties.join(',\\n')}\n }\n }\n }`;\n}\n\nexport default buildCreateEntityMutation;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAA8D,IAAAK,eAAA;AAE9D,SAASC,yBAAyBA,CAACC,YAAY,EAAE;EAC/C,IACE,CAACA,YAAY,IACb,CAACA,YAAY,CAACC,OAAO,IACrB,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,IAC5B,CAACF,YAAY,CAACG,UAAU,EACxB;IACA,MAAM,IAAIC,sBAAU,CAClB,8EACF,CAAC;EACH;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,KAAAC,MAAA,CAAIP,YAAY,CAACC,OAAO,CAACC,MAAM,UAAO,CAAC;EACrE,IAAMM,cAAc,GAAG,IAAAC,+BAAiB,EAACT,YAAY,CAAC;EAEtD,WAAOU,WAAG,EAAAZ,eAAA,KAAAA,eAAA,OAAAa,uBAAA,0KAAkCN,WAAW,EACpCL,YAAY,CAACC,OAAO,CAACC,MAAM,EAGpCM,cAAc,CAACI,IAAI,CAAC,KAAK,CAAC;AAItC;AAAC,IAAAC,QAAA,
|
|
1
|
+
{"version":3,"file":"build-create-entity-mutation.js","names":["_client","require","_coreErrors","_lodash","_interopRequireDefault","_adminUiUtils","_templateObject","buildCreateEntityMutation","entitySchema","actions","create","properties","BlazeError","actionInput","upperfirst","concat","dataProperties","getDataProperties","gql","_taggedTemplateLiteral2","join","_default","exports"],"sources":["../../src/utils/build-create-entity-mutation.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport upperfirst from 'lodash.upperfirst';\nimport { getDataProperties } from '@blaze-cms/admin-ui-utils';\n\nfunction buildCreateEntityMutation(entitySchema) {\n if (\n !entitySchema ||\n !entitySchema.actions ||\n !entitySchema.actions.create ||\n !entitySchema.properties\n ) {\n throw new BlazeError(\n 'Create entity query requires create action and properties from entity schema'\n );\n }\n\n const actionInput = upperfirst(`${entitySchema.actions.create}Input`);\n const dataProperties = getDataProperties(entitySchema);\n\n return gql`mutation createEntity($input: ${actionInput}) {\n createdEntity: ${entitySchema.actions.create}(input: $input){\n result {\n id,\n ${dataProperties.join(',\\n')}\n }\n }\n }`;\n}\n\nexport default buildCreateEntityMutation;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAA8D,IAAAK,eAAA;AAE9D,SAASC,yBAAyBA,CAACC,YAAY,EAAE;EAC/C,IACE,CAACA,YAAY,IACb,CAACA,YAAY,CAACC,OAAO,IACrB,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,IAC5B,CAACF,YAAY,CAACG,UAAU,EACxB;IACA,MAAM,IAAIC,sBAAU,CAClB,8EACF,CAAC;EACH;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,KAAAC,MAAA,CAAIP,YAAY,CAACC,OAAO,CAACC,MAAM,UAAO,CAAC;EACrE,IAAMM,cAAc,GAAG,IAAAC,+BAAiB,EAACT,YAAY,CAAC;EAEtD,WAAOU,WAAG,EAAAZ,eAAA,KAAAA,eAAA,OAAAa,uBAAA,0KAAkCN,WAAW,EACpCL,YAAY,CAACC,OAAO,CAACC,MAAM,EAGpCM,cAAc,CAACI,IAAI,CAAC,KAAK,CAAC;AAItC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEcf,yBAAyB"}
|
|
@@ -18,6 +18,5 @@ function buildDeleteEntity(entitySchema) {
|
|
|
18
18
|
var actionInput = (0, _lodash["default"])("".concat(entitySchema.actions["delete"], "Input"));
|
|
19
19
|
return (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n mutation deleteEntity($input: ", ") {\n deleteEntity: ", "(input: $input){\n result\n }\n }\n "])), actionInput, entitySchema.actions["delete"]);
|
|
20
20
|
}
|
|
21
|
-
var _default = buildDeleteEntity;
|
|
22
|
-
exports["default"] = _default;
|
|
21
|
+
var _default = exports["default"] = buildDeleteEntity;
|
|
23
22
|
//# sourceMappingURL=build-delete-entity-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-delete-entity-mutation.js","names":["_client","require","_coreErrors","_lodash","_interopRequireDefault","_templateObject","buildDeleteEntity","entitySchema","actions","BlazeError","actionInput","upperfirst","concat","gql","_taggedTemplateLiteral2","_default","exports"],"sources":["../../src/utils/build-delete-entity-mutation.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport upperfirst from 'lodash.upperfirst';\n\nfunction buildDeleteEntity(entitySchema) {\n if (!entitySchema || !entitySchema.actions || !entitySchema.actions.delete) {\n throw new BlazeError('Delete query requires delete action from entity schema');\n }\n\n const actionInput = upperfirst(`${entitySchema.actions.delete}Input`);\n\n return gql`\n mutation deleteEntity($input: ${actionInput}) {\n deleteEntity: ${entitySchema.actions.delete}(input: $input){\n result\n }\n }\n `;\n}\n\nexport default buildDeleteEntity;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA2C,IAAAI,eAAA;AAE3C,SAASC,iBAAiBA,CAACC,YAAY,EAAE;EACvC,IAAI,CAACA,YAAY,IAAI,CAACA,YAAY,CAACC,OAAO,IAAI,CAACD,YAAY,CAACC,OAAO,UAAO,EAAE;IAC1E,MAAM,IAAIC,sBAAU,CAAC,wDAAwD,CAAC;EAChF;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,KAAAC,MAAA,CAAIL,YAAY,CAACC,OAAO,UAAO,UAAO,CAAC;EAErE,WAAOK,WAAG,EAAAR,eAAA,KAAAA,eAAA,OAAAS,uBAAA,qIACuBJ,WAAW,EAC1BH,YAAY,CAACC,OAAO,UAAO;AAK/C;AAAC,IAAAO,QAAA,
|
|
1
|
+
{"version":3,"file":"build-delete-entity-mutation.js","names":["_client","require","_coreErrors","_lodash","_interopRequireDefault","_templateObject","buildDeleteEntity","entitySchema","actions","BlazeError","actionInput","upperfirst","concat","gql","_taggedTemplateLiteral2","_default","exports"],"sources":["../../src/utils/build-delete-entity-mutation.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport upperfirst from 'lodash.upperfirst';\n\nfunction buildDeleteEntity(entitySchema) {\n if (!entitySchema || !entitySchema.actions || !entitySchema.actions.delete) {\n throw new BlazeError('Delete query requires delete action from entity schema');\n }\n\n const actionInput = upperfirst(`${entitySchema.actions.delete}Input`);\n\n return gql`\n mutation deleteEntity($input: ${actionInput}) {\n deleteEntity: ${entitySchema.actions.delete}(input: $input){\n result\n }\n }\n `;\n}\n\nexport default buildDeleteEntity;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA2C,IAAAI,eAAA;AAE3C,SAASC,iBAAiBA,CAACC,YAAY,EAAE;EACvC,IAAI,CAACA,YAAY,IAAI,CAACA,YAAY,CAACC,OAAO,IAAI,CAACD,YAAY,CAACC,OAAO,UAAO,EAAE;IAC1E,MAAM,IAAIC,sBAAU,CAAC,wDAAwD,CAAC;EAChF;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,KAAAC,MAAA,CAAIL,YAAY,CAACC,OAAO,UAAO,UAAO,CAAC;EAErE,WAAOK,WAAG,EAAAR,eAAA,KAAAA,eAAA,OAAAS,uBAAA,qIACuBJ,WAAW,EAC1BH,YAAY,CAACC,OAAO,UAAO;AAK/C;AAAC,IAAAO,QAAA,GAAAC,OAAA,cAEcV,iBAAiB"}
|
|
@@ -27,6 +27,5 @@ function buildListingQuery(entitySchema, isSearchQuery) {
|
|
|
27
27
|
var sortType = entitySchema.actions.getAll[0].toUpperCase() + entitySchema.actions.getAll.substr(1);
|
|
28
28
|
return (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n query ", "($where: JSON, $limit: Int, $offset:Int, $sort: [", "SortItem]) {\n listingData: ", "(where: $where, limit: $limit, offset:$offset, sort:$sort){\n id,\n ", "\n }\n }\n "])), entitySchema.actions.getAll, sortType, entitySchema.actions.getAll, entitySchema.listingProperties.join(',\n'));
|
|
29
29
|
}
|
|
30
|
-
var _default = buildListingQuery;
|
|
31
|
-
exports["default"] = _default;
|
|
30
|
+
var _default = exports["default"] = buildListingQuery;
|
|
32
31
|
//# sourceMappingURL=build-listing-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-listing-query.js","names":["_client","require","_coreErrors","_adminUiUtils","_templateObject","buildAdminSearchQuery","entitySchema","_ref","_ref$listingPropertie","listingProperties","parsedProperties","concat","join","getDynamicQuery","buildListingQuery","isSearchQuery","actions","getAll","BlazeError","sortType","toUpperCase","substr","gql","_taggedTemplateLiteral2","_default","exports"],"sources":["../../src/utils/build-listing-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport { getDynamicQuery } from '@blaze-cms/admin-ui-utils';\n\nconst buildAdminSearchQuery = entitySchema => {\n const { listingProperties = [] } = entitySchema || {};\n const parsedProperties = `id, ${listingProperties.join(' ') || 'id name'}`;\n\n return getDynamicQuery('ADMIN_SEARCH')([entitySchema], parsedProperties, true);\n};\n\nfunction buildListingQuery(entitySchema, isSearchQuery) {\n if (!entitySchema.actions || !entitySchema.actions.getAll || !entitySchema.listingProperties) {\n throw new BlazeError(\n 'Listing query requires getAll action and listingProperties from entity schema'\n );\n }\n\n if (isSearchQuery) return buildAdminSearchQuery(entitySchema);\n\n const sortType =\n entitySchema.actions.getAll[0].toUpperCase() + entitySchema.actions.getAll.substr(1);\n\n return gql`\n query ${\n entitySchema.actions.getAll\n }($where: JSON, $limit: Int, $offset:Int, $sort: [${sortType}SortItem]) {\n listingData: ${\n entitySchema.actions.getAll\n }(where: $where, limit: $limit, offset:$offset, sort:$sort){\n id,\n ${entitySchema.listingProperties.join(',\\n')}\n }\n }\n `;\n}\n\nexport default buildListingQuery;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA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
+
{"version":3,"file":"build-listing-query.js","names":["_client","require","_coreErrors","_adminUiUtils","_templateObject","buildAdminSearchQuery","entitySchema","_ref","_ref$listingPropertie","listingProperties","parsedProperties","concat","join","getDynamicQuery","buildListingQuery","isSearchQuery","actions","getAll","BlazeError","sortType","toUpperCase","substr","gql","_taggedTemplateLiteral2","_default","exports"],"sources":["../../src/utils/build-listing-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport { getDynamicQuery } from '@blaze-cms/admin-ui-utils';\n\nconst buildAdminSearchQuery = entitySchema => {\n const { listingProperties = [] } = entitySchema || {};\n const parsedProperties = `id, ${listingProperties.join(' ') || 'id name'}`;\n\n return getDynamicQuery('ADMIN_SEARCH')([entitySchema], parsedProperties, true);\n};\n\nfunction buildListingQuery(entitySchema, isSearchQuery) {\n if (!entitySchema.actions || !entitySchema.actions.getAll || !entitySchema.listingProperties) {\n throw new BlazeError(\n 'Listing query requires getAll action and listingProperties from entity schema'\n );\n }\n\n if (isSearchQuery) return buildAdminSearchQuery(entitySchema);\n\n const sortType =\n entitySchema.actions.getAll[0].toUpperCase() + entitySchema.actions.getAll.substr(1);\n\n return gql`\n query ${\n entitySchema.actions.getAll\n }($where: JSON, $limit: Int, $offset:Int, $sort: [${sortType}SortItem]) {\n listingData: ${\n entitySchema.actions.getAll\n }(where: $where, limit: $limit, offset:$offset, sort:$sort){\n id,\n ${entitySchema.listingProperties.join(',\\n')}\n }\n }\n `;\n}\n\nexport default buildListingQuery;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAA4D,IAAAG,eAAA;AAE5D,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAGC,YAAY,EAAI;EAC5C,IAAAC,IAAA,GAAmCD,YAAY,IAAI,CAAC,CAAC;IAAAE,qBAAA,GAAAD,IAAA,CAA7CE,iBAAiB;IAAjBA,iBAAiB,GAAAD,qBAAA,cAAG,EAAE,GAAAA,qBAAA;EAC9B,IAAME,gBAAgB,UAAAC,MAAA,CAAUF,iBAAiB,CAACG,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,CAAE;EAE1E,OAAO,IAAAC,6BAAe,EAAC,cAAc,CAAC,CAAC,CAACP,YAAY,CAAC,EAAEI,gBAAgB,EAAE,IAAI,CAAC;AAChF,CAAC;AAED,SAASI,iBAAiBA,CAACR,YAAY,EAAES,aAAa,EAAE;EACtD,IAAI,CAACT,YAAY,CAACU,OAAO,IAAI,CAACV,YAAY,CAACU,OAAO,CAACC,MAAM,IAAI,CAACX,YAAY,CAACG,iBAAiB,EAAE;IAC5F,MAAM,IAAIS,sBAAU,CAClB,+EACF,CAAC;EACH;EAEA,IAAIH,aAAa,EAAE,OAAOV,qBAAqB,CAACC,YAAY,CAAC;EAE7D,IAAMa,QAAQ,GACZb,YAAY,CAACU,OAAO,CAACC,MAAM,CAAC,CAAC,CAAC,CAACG,WAAW,CAAC,CAAC,GAAGd,YAAY,CAACU,OAAO,CAACC,MAAM,CAACI,MAAM,CAAC,CAAC,CAAC;EAEtF,WAAOC,WAAG,EAAAlB,eAAA,KAAAA,eAAA,OAAAmB,uBAAA,yOAENjB,YAAY,CAACU,OAAO,CAACC,MAAM,EACuBE,QAAQ,EAExDb,YAAY,CAACU,OAAO,CAACC,MAAM,EAGzBX,YAAY,CAACG,iBAAiB,CAACG,IAAI,CAAC,KAAK,CAAC;AAIpD;AAAC,IAAAY,QAAA,GAAAC,OAAA,cAEcX,iBAAiB"}
|
|
@@ -21,6 +21,5 @@ function buildUpdateDataQuery(entitySchema) {
|
|
|
21
21
|
var dataProperties = (0, _adminUiUtils.getDataProperties)(entitySchema);
|
|
22
22
|
return (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n mutation updateEntity($input: ", ") {\n updateEntity: ", "(input: $input){\n result {\n id,\n ", ",\n updated\n }\n }\n }\n "])), actionInput, entitySchema.actions.update, dataProperties.join(',\n'));
|
|
23
23
|
}
|
|
24
|
-
var _default = buildUpdateDataQuery;
|
|
25
|
-
exports["default"] = _default;
|
|
24
|
+
var _default = exports["default"] = buildUpdateDataQuery;
|
|
26
25
|
//# sourceMappingURL=build-update-data-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-update-data-query.js","names":["_client","require","_coreErrors","_lodash","_interopRequireDefault","_adminUiUtils","_templateObject","buildUpdateDataQuery","entitySchema","actions","update","properties","BlazeError","actionInput","upperfirst","concat","dataProperties","getDataProperties","gql","_taggedTemplateLiteral2","join","_default","exports"],"sources":["../../src/utils/build-update-data-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport upperfirst from 'lodash.upperfirst';\nimport { getDataProperties } from '@blaze-cms/admin-ui-utils';\n\nfunction buildUpdateDataQuery(entitySchema) {\n if (!entitySchema.actions || !entitySchema.actions.update || !entitySchema.properties) {\n throw new BlazeError(\n 'Update DataEntity query requires get action and properties from entity schema'\n );\n }\n\n const actionInput = upperfirst(`${entitySchema.actions.update}Input`);\n const dataProperties = getDataProperties(entitySchema);\n\n return gql`\n mutation updateEntity($input: ${actionInput}) {\n updateEntity: ${entitySchema.actions.update}(input: $input){\n result {\n id,\n ${dataProperties.join(',\\n')},\n updated\n }\n }\n }\n `;\n}\n\nexport default buildUpdateDataQuery;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAA8D,IAAAK,eAAA;AAE9D,SAASC,oBAAoBA,CAACC,YAAY,EAAE;EAC1C,IAAI,CAACA,YAAY,CAACC,OAAO,IAAI,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,IAAI,CAACF,YAAY,CAACG,UAAU,EAAE;IACrF,MAAM,IAAIC,sBAAU,CAClB,+EACF,CAAC;EACH;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,KAAAC,MAAA,CAAIP,YAAY,CAACC,OAAO,CAACC,MAAM,UAAO,CAAC;EACrE,IAAMM,cAAc,GAAG,IAAAC,+BAAiB,EAACT,YAAY,CAAC;EAEtD,WAAOU,WAAG,EAAAZ,eAAA,KAAAA,eAAA,OAAAa,uBAAA,qMACuBN,WAAW,EAC1BL,YAAY,CAACC,OAAO,CAACC,MAAM,EAGnCM,cAAc,CAACI,IAAI,CAAC,KAAK,CAAC;AAMtC;AAAC,IAAAC,QAAA,
|
|
1
|
+
{"version":3,"file":"build-update-data-query.js","names":["_client","require","_coreErrors","_lodash","_interopRequireDefault","_adminUiUtils","_templateObject","buildUpdateDataQuery","entitySchema","actions","update","properties","BlazeError","actionInput","upperfirst","concat","dataProperties","getDataProperties","gql","_taggedTemplateLiteral2","join","_default","exports"],"sources":["../../src/utils/build-update-data-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport upperfirst from 'lodash.upperfirst';\nimport { getDataProperties } from '@blaze-cms/admin-ui-utils';\n\nfunction buildUpdateDataQuery(entitySchema) {\n if (!entitySchema.actions || !entitySchema.actions.update || !entitySchema.properties) {\n throw new BlazeError(\n 'Update DataEntity query requires get action and properties from entity schema'\n );\n }\n\n const actionInput = upperfirst(`${entitySchema.actions.update}Input`);\n const dataProperties = getDataProperties(entitySchema);\n\n return gql`\n mutation updateEntity($input: ${actionInput}) {\n updateEntity: ${entitySchema.actions.update}(input: $input){\n result {\n id,\n ${dataProperties.join(',\\n')},\n updated\n }\n }\n }\n `;\n}\n\nexport default buildUpdateDataQuery;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAA8D,IAAAK,eAAA;AAE9D,SAASC,oBAAoBA,CAACC,YAAY,EAAE;EAC1C,IAAI,CAACA,YAAY,CAACC,OAAO,IAAI,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,IAAI,CAACF,YAAY,CAACG,UAAU,EAAE;IACrF,MAAM,IAAIC,sBAAU,CAClB,+EACF,CAAC;EACH;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,KAAAC,MAAA,CAAIP,YAAY,CAACC,OAAO,CAACC,MAAM,UAAO,CAAC;EACrE,IAAMM,cAAc,GAAG,IAAAC,+BAAiB,EAACT,YAAY,CAAC;EAEtD,WAAOU,WAAG,EAAAZ,eAAA,KAAAA,eAAA,OAAAa,uBAAA,qMACuBN,WAAW,EAC1BL,YAAY,CAACC,OAAO,CAACC,MAAM,EAGnCM,cAAc,CAACI,IAAI,CAAC,KAAK,CAAC;AAMtC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEcf,oBAAoB"}
|
|
@@ -17,6 +17,5 @@ function buildUpdatePublishUnpublishMutation(entitySchema, id, action, cache) {
|
|
|
17
17
|
var withClient = "".concat(cache ? '@client' : '');
|
|
18
18
|
return (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n mutation {\n response: ", " ", "(input: {\n id: \"", "\"\n }){\n result {\n id,\n status\n }\n }\n }\n "])), entitySchema.actions[action], withClient, id);
|
|
19
19
|
}
|
|
20
|
-
var _default = buildUpdatePublishUnpublishMutation;
|
|
21
|
-
exports["default"] = _default;
|
|
20
|
+
var _default = exports["default"] = buildUpdatePublishUnpublishMutation;
|
|
22
21
|
//# sourceMappingURL=build-update-publish-unpublish-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-update-publish-unpublish-mutation.js","names":["_client","require","_coreErrors","_templateObject","buildUpdatePublishUnpublishMutation","entitySchema","id","action","cache","actions","publish","BlazeError","withClient","concat","gql","_taggedTemplateLiteral2","_default","exports"],"sources":["../../src/utils/build-update-publish-unpublish-mutation.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\n\nfunction buildUpdatePublishUnpublishMutation(entitySchema, id, action, cache) {\n if (!entitySchema || !entitySchema.actions || !entitySchema.actions.publish || !id || !action) {\n throw new BlazeError(\n 'Update DataEntity query requires publish action from entity schema and id'\n );\n }\n\n const withClient = `${cache ? '@client' : ''}`;\n\n return gql`\n mutation {\n response: ${entitySchema.actions[action]} ${withClient}(input: {\n id: \"${id}\"\n }){\n result {\n id,\n status\n }\n }\n }\n `;\n}\n\nexport default buildUpdatePublishUnpublishMutation;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAoD,IAAAE,eAAA;AAEpD,SAASC,mCAAmCA,CAACC,YAAY,EAAEC,EAAE,EAAEC,MAAM,EAAEC,KAAK,EAAE;EAC5E,IAAI,CAACH,YAAY,IAAI,CAACA,YAAY,CAACI,OAAO,IAAI,CAACJ,YAAY,CAACI,OAAO,CAACC,OAAO,IAAI,CAACJ,EAAE,IAAI,CAACC,MAAM,EAAE;IAC7F,MAAM,IAAII,sBAAU,CAClB,2EACF,CAAC;EACH;EAEA,IAAMC,UAAU,MAAAC,MAAA,CAAML,KAAK,GAAG,SAAS,GAAG,EAAE,CAAE;EAE9C,WAAOM,WAAG,EAAAX,eAAA,KAAAA,eAAA,OAAAY,uBAAA,4LAEMV,YAAY,CAACI,OAAO,CAACF,MAAM,CAAC,EAAIK,UAAU,EAC7CN,EAAE;AASjB;AAAC,IAAAU,QAAA,
|
|
1
|
+
{"version":3,"file":"build-update-publish-unpublish-mutation.js","names":["_client","require","_coreErrors","_templateObject","buildUpdatePublishUnpublishMutation","entitySchema","id","action","cache","actions","publish","BlazeError","withClient","concat","gql","_taggedTemplateLiteral2","_default","exports"],"sources":["../../src/utils/build-update-publish-unpublish-mutation.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\n\nfunction buildUpdatePublishUnpublishMutation(entitySchema, id, action, cache) {\n if (!entitySchema || !entitySchema.actions || !entitySchema.actions.publish || !id || !action) {\n throw new BlazeError(\n 'Update DataEntity query requires publish action from entity schema and id'\n );\n }\n\n const withClient = `${cache ? '@client' : ''}`;\n\n return gql`\n mutation {\n response: ${entitySchema.actions[action]} ${withClient}(input: {\n id: \"${id}\"\n }){\n result {\n id,\n status\n }\n }\n }\n `;\n}\n\nexport default buildUpdatePublishUnpublishMutation;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAoD,IAAAE,eAAA;AAEpD,SAASC,mCAAmCA,CAACC,YAAY,EAAEC,EAAE,EAAEC,MAAM,EAAEC,KAAK,EAAE;EAC5E,IAAI,CAACH,YAAY,IAAI,CAACA,YAAY,CAACI,OAAO,IAAI,CAACJ,YAAY,CAACI,OAAO,CAACC,OAAO,IAAI,CAACJ,EAAE,IAAI,CAACC,MAAM,EAAE;IAC7F,MAAM,IAAII,sBAAU,CAClB,2EACF,CAAC;EACH;EAEA,IAAMC,UAAU,MAAAC,MAAA,CAAML,KAAK,GAAG,SAAS,GAAG,EAAE,CAAE;EAE9C,WAAOM,WAAG,EAAAX,eAAA,KAAAA,eAAA,OAAAY,uBAAA,4LAEMV,YAAY,CAACI,OAAO,CAACF,MAAM,CAAC,EAAIK,UAAU,EAC7CN,EAAE;AASjB;AAAC,IAAAU,QAAA,GAAAC,OAAA,cAEcb,mCAAmC"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.getDefaultQueryParams = void 0;
|
|
8
|
-
var getDefaultQueryParams = function getDefaultQueryParams(schema) {
|
|
8
|
+
var getDefaultQueryParams = exports.getDefaultQueryParams = function getDefaultQueryParams(schema) {
|
|
9
9
|
var updated = schema.properties && schema.properties.updated;
|
|
10
10
|
var _ref = schema.displayProperties || {},
|
|
11
11
|
where = _ref.adminDefaultListingFilter;
|
|
@@ -19,5 +19,4 @@ var getDefaultQueryParams = function getDefaultQueryParams(schema) {
|
|
|
19
19
|
}] : []
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
exports.getDefaultQueryParams = getDefaultQueryParams;
|
|
23
22
|
//# sourceMappingURL=get-default-query-params.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-default-query-params.js","names":["getDefaultQueryParams","schema","updated","properties","_ref","displayProperties","where","adminDefaultListingFilter","limit","offset","sort","property","direction"
|
|
1
|
+
{"version":3,"file":"get-default-query-params.js","names":["getDefaultQueryParams","exports","schema","updated","properties","_ref","displayProperties","where","adminDefaultListingFilter","limit","offset","sort","property","direction"],"sources":["../../src/utils/get-default-query-params.js"],"sourcesContent":["const getDefaultQueryParams = schema => {\n const updated = schema.properties && schema.properties.updated;\n const { adminDefaultListingFilter: where } = schema.displayProperties || {};\n\n return {\n where,\n limit: 40,\n offset: 0,\n sort: updated\n ? [\n {\n property: 'updated',\n direction: 'desc'\n }\n ]\n : []\n };\n};\n\nexport { getDefaultQueryParams };\n"],"mappings":";;;;;;;AAAA,IAAMA,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,SAAxBA,qBAAqBA,CAAGE,MAAM,EAAI;EACtC,IAAMC,OAAO,GAAGD,MAAM,CAACE,UAAU,IAAIF,MAAM,CAACE,UAAU,CAACD,OAAO;EAC9D,IAAAE,IAAA,GAA6CH,MAAM,CAACI,iBAAiB,IAAI,CAAC,CAAC;IAAxCC,KAAK,GAAAF,IAAA,CAAhCG,yBAAyB;EAEjC,OAAO;IACLD,KAAK,EAALA,KAAK;IACLE,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAER,OAAO,GACT,CACE;MACES,QAAQ,EAAE,SAAS;MACnBC,SAAS,EAAE;IACb,CAAC,CACF,GACD;EACN,CAAC;AACH,CAAC"}
|
|
@@ -9,11 +9,10 @@ exports.withContext = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _adminUiUtils = require("@blaze-cms/admin-ui-utils");
|
|
12
|
-
var withContext = function withContext(Component) {
|
|
12
|
+
var withContext = exports.withContext = function withContext(Component) {
|
|
13
13
|
return function (props) {
|
|
14
14
|
var contexts = (0, _adminUiUtils.useMainContext)(_adminUiUtils.MainContext);
|
|
15
15
|
return /*#__PURE__*/_react["default"].createElement(Component, (0, _extends2["default"])({}, props, contexts));
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
exports.withContext = withContext;
|
|
19
18
|
//# sourceMappingURL=withContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withContext.js","names":["_react","_interopRequireDefault","require","_adminUiUtils","withContext","Component","props","contexts","useMainContext","MainContext","createElement","_extends2"
|
|
1
|
+
{"version":3,"file":"withContext.js","names":["_react","_interopRequireDefault","require","_adminUiUtils","withContext","exports","Component","props","contexts","useMainContext","MainContext","createElement","_extends2"],"sources":["../../../src/utils/hoc/withContext.js"],"sourcesContent":["import React from 'react';\nimport { useMainContext, MainContext } from '@blaze-cms/admin-ui-utils';\n\nexport const withContext = Component => props => {\n const contexts = useMainContext(MainContext);\n return <Component {...props} {...contexts} />;\n};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEO,IAAME,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,SAAdA,WAAWA,CAAGE,SAAS;EAAA,OAAI,UAAAC,KAAK,EAAI;IAC/C,IAAMC,QAAQ,GAAG,IAAAC,4BAAc,EAACC,yBAAW,CAAC;IAC5C,oBAAOV,MAAA,YAAAW,aAAA,CAACL,SAAS,MAAAM,SAAA,iBAAKL,KAAK,EAAMC,QAAQ,CAAG,CAAC;EAC/C,CAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToggle.js","names":["_react","require","useToggle","initialValue","_useState","useState","_useState2","_slicedToArray2","toggleValue","setToggleValue","toggler","useCallback","_default","exports"],"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,IAAAC,SAAA,GAAsC,IAAAC,eAAQ,EAACF,YAAY,CAAC;IAAAG,UAAA,OAAAC,eAAA,aAAAH,SAAA;IAArDI,WAAW,GAAAF,UAAA;IAAEG,cAAc,GAAAH,UAAA;EAClC,IAAMI,OAAO,GAAG,IAAAC,kBAAW,EAAC;IAAA,OAAMF,cAAc,CAAC,CAACD,WAAW,CAAC;EAAA,GAAE,CAACA,WAAW,CAAC,CAAC;EAE9E,OAAO,CAACA,WAAW,EAAEE,OAAO,CAAC;AAC/B;AAAC,IAAAE,QAAA,
|
|
1
|
+
{"version":3,"file":"useToggle.js","names":["_react","require","useToggle","initialValue","_useState","useState","_useState2","_slicedToArray2","toggleValue","setToggleValue","toggler","useCallback","_default","exports"],"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,IAAAC,SAAA,GAAsC,IAAAC,eAAQ,EAACF,YAAY,CAAC;IAAAG,UAAA,OAAAC,eAAA,aAAAH,SAAA;IAArDI,WAAW,GAAAF,UAAA;IAAEG,cAAc,GAAAH,UAAA;EAClC,IAAMI,OAAO,GAAG,IAAAC,kBAAW,EAAC;IAAA,OAAMF,cAAc,CAAC,CAACD,WAAW,CAAC;EAAA,GAAE,CAACA,WAAW,CAAC,CAAC;EAE9E,OAAO,CAACA,WAAW,EAAEE,OAAO,CAAC;AAC/B;AAAC,IAAAE,QAAA,GAAAC,OAAA,cAEcX,SAAS"}
|
|
@@ -46,7 +46,6 @@ const ListingTable = ({
|
|
|
46
46
|
})();
|
|
47
47
|
}, [client, entitySchema, match.url, previousSchema.id, queryParams] // eslint-disable-line react-hooks/exhaustive-deps
|
|
48
48
|
);
|
|
49
|
-
|
|
50
49
|
const doQuery = async (filters = listFilters) => {
|
|
51
50
|
const data = await fetchData({
|
|
52
51
|
client,
|