@blaze-cms/plugin-data-ui 0.146.0-alpha.50 → 0.146.0-alpha.51
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 +11 -0
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +8 -2
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
- package/lib/components/EntityManager/utils/entity.js +8 -2
- package/lib/components/EntityManager/utils/entity.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +4 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
- package/lib-es/components/EntityManager/utils/entity.js +4 -1
- package/lib-es/components/EntityManager/utils/entity.js.map +1 -1
- package/package.json +3 -3
- package/src/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +4 -1
- package/src/components/EntityManager/utils/entity.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.146.0-alpha.51](https://github.com/thebyte9/blaze/compare/v0.146.0-alpha.50...v0.146.0-alpha.51) (2025-06-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* open frontend debug toolbar with a url param ([#4771](https://github.com/thebyte9/blaze/issues/4771)) ([37b8ea5](https://github.com/thebyte9/blaze/commit/37b8ea59a5ed4be0912465717adeb079fd6b3a89))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [0.146.0-alpha.50](https://github.com/thebyte9/blaze/compare/v0.146.0-alpha.49...v0.146.0-alpha.50) (2025-05-16)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @blaze-cms/plugin-data-ui
|
package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js
CHANGED
|
@@ -7,6 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports["default"] = void 0;
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
|
+
require("core-js/modules/es.array.concat.js");
|
|
11
|
+
require("core-js/modules/es.array.includes.js");
|
|
12
|
+
require("core-js/modules/es.string.includes.js");
|
|
10
13
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
15
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -23,7 +26,7 @@ var HeaderPreviewButton = function HeaderPreviewButton(_ref) {
|
|
|
23
26
|
if (process.env.BLAZE_DISABLE_PREVIEW) return null;
|
|
24
27
|
var onViewPreview = /*#__PURE__*/function () {
|
|
25
28
|
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
26
|
-
var _yield$createPreviewT, _yield$createPreviewT2, _yield$createPreviewT3, url;
|
|
29
|
+
var _yield$createPreviewT, _yield$createPreviewT2, _yield$createPreviewT3, url, delimiter;
|
|
27
30
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
28
31
|
while (1) switch (_context.prev = _context.next) {
|
|
29
32
|
case 0:
|
|
@@ -40,7 +43,10 @@ var HeaderPreviewButton = function HeaderPreviewButton(_ref) {
|
|
|
40
43
|
_yield$createPreviewT2 = _yield$createPreviewT.data;
|
|
41
44
|
_yield$createPreviewT3 = _yield$createPreviewT2 === void 0 ? {} : _yield$createPreviewT2;
|
|
42
45
|
url = _yield$createPreviewT3.createPreviewToken.result.url;
|
|
43
|
-
if (url)
|
|
46
|
+
if (url) {
|
|
47
|
+
delimiter = url.includes('?') ? '&' : '?';
|
|
48
|
+
window.open("".concat(url).concat(delimiter, "blaze_debug=1"), '_blank');
|
|
49
|
+
}
|
|
44
50
|
// eslint-disable-next-line no-empty
|
|
45
51
|
_context.next = 12;
|
|
46
52
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderPreviewButton.js","names":["_react","_interopRequireDefault","require","_propTypes","_button","_client","_adminUiUtils","HeaderPreviewButton","_ref","itemId","itemEntity","_useMutation","useMutation","getMutation","_useMutation2","_slicedToArray2","createPreviewToken","process","env","BLAZE_DISABLE_PREVIEW","onViewPreview","_ref2","_asyncToGenerator2","_regenerator","mark","_callee","_yield$createPreviewT","_yield$createPreviewT2","_yield$createPreviewT3","url","wrap","_callee$","_context","prev","next","variables","sent","data","result","window","open","t0","stop","apply","arguments","createElement","className","onClick","propTypes","PropTypes","string","isRequired","_default","exports"],"sources":["../../../../../../src/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '@blaze-react/button';\nimport { useMutation } from '@apollo/client';\nimport { getMutation } from '@blaze-cms/admin-ui-utils';\n\nconst HeaderPreviewButton = ({ itemId, itemEntity }) => {\n const [createPreviewToken] = useMutation(getMutation('PREVIEW_TOKEN_MUTATION'));\n if (process.env.BLAZE_DISABLE_PREVIEW) return null;\n\n const onViewPreview = async () => {\n try {\n const {\n data: {\n createPreviewToken: {\n result: { url }\n }\n } = {}\n } = await createPreviewToken({\n variables: {\n itemId,\n itemEntity\n }\n });\n\n if (url) window.open(url
|
|
1
|
+
{"version":3,"file":"HeaderPreviewButton.js","names":["_react","_interopRequireDefault","require","_propTypes","_button","_client","_adminUiUtils","HeaderPreviewButton","_ref","itemId","itemEntity","_useMutation","useMutation","getMutation","_useMutation2","_slicedToArray2","createPreviewToken","process","env","BLAZE_DISABLE_PREVIEW","onViewPreview","_ref2","_asyncToGenerator2","_regenerator","mark","_callee","_yield$createPreviewT","_yield$createPreviewT2","_yield$createPreviewT3","url","delimiter","wrap","_callee$","_context","prev","next","variables","sent","data","result","includes","window","open","concat","t0","stop","apply","arguments","createElement","className","onClick","propTypes","PropTypes","string","isRequired","_default","exports"],"sources":["../../../../../../src/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '@blaze-react/button';\nimport { useMutation } from '@apollo/client';\nimport { getMutation } from '@blaze-cms/admin-ui-utils';\n\nconst HeaderPreviewButton = ({ itemId, itemEntity }) => {\n const [createPreviewToken] = useMutation(getMutation('PREVIEW_TOKEN_MUTATION'));\n if (process.env.BLAZE_DISABLE_PREVIEW) return null;\n\n const onViewPreview = async () => {\n try {\n const {\n data: {\n createPreviewToken: {\n result: { url }\n }\n } = {}\n } = await createPreviewToken({\n variables: {\n itemId,\n itemEntity\n }\n });\n\n if (url) {\n const delimiter = url.includes('?') ? '&' : '?';\n window.open(`${url}${delimiter}blaze_debug=1`, '_blank');\n }\n // eslint-disable-next-line no-empty\n } catch (err) {}\n };\n\n return (\n <Button className=\"more-menu__link\" onClick={onViewPreview}>\n Preview\n </Button>\n );\n};\n\nHeaderPreviewButton.propTypes = {\n itemId: PropTypes.string.isRequired,\n itemEntity: PropTypes.string.isRequired\n};\n\nexport default HeaderPreviewButton;\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAEA,IAAMK,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAA+B;EAAA,IAAzBC,MAAM,GAAA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YAAAF,QAAA,CAAAC,IAAA;YAAAD,QAAA,CAAAW,EAAA,GAAAX,QAAA;UAAA;UAAA;YAAA,OAAAA,QAAA,CAAAY,IAAA;QAAA;MAAA,GAAApB,OAAA;IAAA,CAEH;IAAA,gBArBKL,aAAaA,CAAA;MAAA,OAAAC,KAAA,CAAAyB,KAAA,OAAAC,SAAA;IAAA;EAAA,GAqBlB;EAED,oBACE/C,MAAA,YAAAgD,aAAA,CAAC5C,OAAA,WAAM;IAAC6C,SAAS,EAAC,iBAAiB;IAACC,OAAO,EAAE9B;EAAc,GAAC,SAEpD,CAAC;AAEb,CAAC;AAEDb,mBAAmB,CAAC4C,SAAS,GAAG;EAC9B1C,MAAM,EAAE2C,qBAAS,CAACC,MAAM,CAACC,UAAU;EACnC5C,UAAU,EAAE0C,qBAAS,CAACC,MAAM,CAACC;AAC/B,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEajD,mBAAmB","ignoreList":[]}
|
|
@@ -21,11 +21,14 @@ exports.validateSideBarRelations = validateSideBarRelations;
|
|
|
21
21
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
22
22
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
23
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
24
|
+
require("core-js/modules/es.array.concat.js");
|
|
24
25
|
require("core-js/modules/es.array.every.js");
|
|
25
26
|
require("core-js/modules/es.array.find.js");
|
|
26
27
|
require("core-js/modules/es.array.find-index.js");
|
|
28
|
+
require("core-js/modules/es.array.includes.js");
|
|
27
29
|
require("core-js/modules/es.array.slice.js");
|
|
28
30
|
require("core-js/modules/es.object.to-string.js");
|
|
31
|
+
require("core-js/modules/es.string.includes.js");
|
|
29
32
|
var _lodash = _interopRequireDefault(require("lodash.has"));
|
|
30
33
|
var _constants = require("../../../constants");
|
|
31
34
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -52,7 +55,7 @@ function onViewUrlClick(_x) {
|
|
|
52
55
|
}
|
|
53
56
|
function _onViewUrlClick() {
|
|
54
57
|
_onViewUrlClick = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(getFullUrl) {
|
|
55
|
-
var fullUrl;
|
|
58
|
+
var fullUrl, delimiter;
|
|
56
59
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
57
60
|
while (1) switch (_context.prev = _context.next) {
|
|
58
61
|
case 0:
|
|
@@ -60,7 +63,10 @@ function _onViewUrlClick() {
|
|
|
60
63
|
return getFullUrl();
|
|
61
64
|
case 2:
|
|
62
65
|
fullUrl = _context.sent;
|
|
63
|
-
if (fullUrl)
|
|
66
|
+
if (fullUrl) {
|
|
67
|
+
delimiter = fullUrl.includes('?') ? '&' : '?';
|
|
68
|
+
window.open("".concat(fullUrl).concat(delimiter, "blaze_debug=1"), '_blank');
|
|
69
|
+
}
|
|
64
70
|
case 4:
|
|
65
71
|
case "end":
|
|
66
72
|
return _context.stop();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.js","names":["_lodash","_interopRequireDefault","require","_constants","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","canViewPage","formData","entity","schema","entityIsPublished","has","KEY_TO_CHECK","id","ENTITY_PUBLISHED","validateSideBarRelations","updatedFormValues","requiredChildField","parentEntityField","find","_ref","parentIdField","_ref2","parentEntityFieldHasValue","value","SELECT_DEFAULT_VALUE","parentIdFieldHasValue","onViewUrlClick","_x","_onViewUrlClick","_asyncToGenerator2","_regenerator","mark","_callee","getFullUrl","fullUrl","wrap","_callee$","_context","prev","next","sent","window","open","stop","getUpdatedFormValues","_ref3","formValues","slice","fieldIndex","findIndex","_ref4","_id","requiredChildFieldIndex","_ref5","checkFulfilConditions","_len","args","Array","_key","every","param"],"sources":["../../../../src/components/EntityManager/utils/entity.js"],"sourcesContent":["import has from 'lodash.has';\nimport { ENTITY_PUBLISHED, KEY_TO_CHECK, SELECT_DEFAULT_VALUE } from '../../../constants';\n\nfunction canViewPage(formData, entity, schema, entityIsPublished) {\n return (\n has(formData, KEY_TO_CHECK) &&\n entity &&\n entity.id &&\n schema &&\n schema.id &&\n entityIsPublished === ENTITY_PUBLISHED\n );\n}\n\nfunction validateSideBarRelations(updatedFormValues, requiredChildField) {\n if (!requiredChildField) return true;\n const parentEntityField = updatedFormValues.find(({ id }) => id === 'parentEntity');\n const parentIdField = updatedFormValues.find(({ id }) => id === 'parentId');\n\n const parentEntityFieldHasValue =\n parentEntityField &&\n parentEntityField.value &&\n parentEntityField.value !== SELECT_DEFAULT_VALUE;\n const parentIdFieldHasValue = parentIdField && parentIdField.value;\n\n return !!(!parentEntityFieldHasValue || (parentEntityFieldHasValue && parentIdFieldHasValue));\n}\n\nasync function onViewUrlClick(getFullUrl) {\n const fullUrl = await getFullUrl();\n if (fullUrl) window.open(fullUrl
|
|
1
|
+
{"version":3,"file":"entity.js","names":["_lodash","_interopRequireDefault","require","_constants","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","canViewPage","formData","entity","schema","entityIsPublished","has","KEY_TO_CHECK","id","ENTITY_PUBLISHED","validateSideBarRelations","updatedFormValues","requiredChildField","parentEntityField","find","_ref","parentIdField","_ref2","parentEntityFieldHasValue","value","SELECT_DEFAULT_VALUE","parentIdFieldHasValue","onViewUrlClick","_x","_onViewUrlClick","_asyncToGenerator2","_regenerator","mark","_callee","getFullUrl","fullUrl","delimiter","wrap","_callee$","_context","prev","next","sent","includes","window","open","concat","stop","getUpdatedFormValues","_ref3","formValues","slice","fieldIndex","findIndex","_ref4","_id","requiredChildFieldIndex","_ref5","checkFulfilConditions","_len","args","Array","_key","every","param"],"sources":["../../../../src/components/EntityManager/utils/entity.js"],"sourcesContent":["import has from 'lodash.has';\nimport { ENTITY_PUBLISHED, KEY_TO_CHECK, SELECT_DEFAULT_VALUE } from '../../../constants';\n\nfunction canViewPage(formData, entity, schema, entityIsPublished) {\n return (\n has(formData, KEY_TO_CHECK) &&\n entity &&\n entity.id &&\n schema &&\n schema.id &&\n entityIsPublished === ENTITY_PUBLISHED\n );\n}\n\nfunction validateSideBarRelations(updatedFormValues, requiredChildField) {\n if (!requiredChildField) return true;\n const parentEntityField = updatedFormValues.find(({ id }) => id === 'parentEntity');\n const parentIdField = updatedFormValues.find(({ id }) => id === 'parentId');\n\n const parentEntityFieldHasValue =\n parentEntityField &&\n parentEntityField.value &&\n parentEntityField.value !== SELECT_DEFAULT_VALUE;\n const parentIdFieldHasValue = parentIdField && parentIdField.value;\n\n return !!(!parentEntityFieldHasValue || (parentEntityFieldHasValue && parentIdFieldHasValue));\n}\n\nasync function onViewUrlClick(getFullUrl) {\n const fullUrl = await getFullUrl();\n if (fullUrl) {\n const delimiter = fullUrl.includes('?') ? '&' : '?';\n window.open(`${fullUrl}${delimiter}blaze_debug=1`, '_blank');\n }\n}\n\nfunction getUpdatedFormValues({ id, value, requiredChildField, formValues }) {\n const updatedFormValues = formValues ? formValues.slice() : [];\n const fieldIndex = updatedFormValues.findIndex(({ id: _id }) => _id === id);\n\n if (fieldIndex > -1) {\n updatedFormValues[fieldIndex] = { ...updatedFormValues[fieldIndex], value };\n } else {\n updatedFormValues.push({ id, value });\n }\n\n if (requiredChildField && requiredChildField.id) {\n const requiredChildFieldIndex = updatedFormValues.findIndex(\n ({ id: _id }) => _id === requiredChildField.id\n );\n if (requiredChildFieldIndex > -1) {\n updatedFormValues[requiredChildFieldIndex] = {\n ...updatedFormValues[requiredChildFieldIndex],\n value: requiredChildField.value\n };\n } else {\n updatedFormValues.push({\n id: requiredChildField.id,\n value: requiredChildField.value\n });\n }\n }\n\n return updatedFormValues;\n}\n\nfunction checkFulfilConditions(...args) {\n return args.every(param => param);\n}\n\nexport {\n canViewPage,\n validateSideBarRelations,\n onViewUrlClick,\n getUpdatedFormValues,\n checkFulfilConditions\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAA0F,SAAAE,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,QAAAe,gBAAA,aAAAhB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAE,MAAA,CAAAc,yBAAA,GAAAd,MAAA,CAAAe,gBAAA,CAAAlB,CAAA,EAAAG,MAAA,CAAAc,yBAAA,CAAAf,CAAA,KAAAH,OAAA,CAAAI,MAAA,CAAAD,CAAA,GAAAa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|
27
27
|
});
|
|
28
|
-
if (url)
|
|
28
|
+
if (url) {
|
|
29
|
+
const delimiter = url.includes('?') ? '&' : '?';
|
|
30
|
+
window.open(`${url}${delimiter}blaze_debug=1`, '_blank');
|
|
31
|
+
}
|
|
29
32
|
// eslint-disable-next-line no-empty
|
|
30
33
|
} catch (err) {}
|
|
31
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderPreviewButton.js","names":["React","PropTypes","Button","useMutation","getMutation","HeaderPreviewButton","itemId","itemEntity","createPreviewToken","process","env","BLAZE_DISABLE_PREVIEW","onViewPreview","data","result","url","variables","window","open","err","createElement","className","onClick","propTypes","string","isRequired"],"sources":["../../../../../../src/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '@blaze-react/button';\nimport { useMutation } from '@apollo/client';\nimport { getMutation } from '@blaze-cms/admin-ui-utils';\n\nconst HeaderPreviewButton = ({ itemId, itemEntity }) => {\n const [createPreviewToken] = useMutation(getMutation('PREVIEW_TOKEN_MUTATION'));\n if (process.env.BLAZE_DISABLE_PREVIEW) return null;\n\n const onViewPreview = async () => {\n try {\n const {\n data: {\n createPreviewToken: {\n result: { url }\n }\n } = {}\n } = await createPreviewToken({\n variables: {\n itemId,\n itemEntity\n }\n });\n\n if (url) window.open(url
|
|
1
|
+
{"version":3,"file":"HeaderPreviewButton.js","names":["React","PropTypes","Button","useMutation","getMutation","HeaderPreviewButton","itemId","itemEntity","createPreviewToken","process","env","BLAZE_DISABLE_PREVIEW","onViewPreview","data","result","url","variables","delimiter","includes","window","open","err","createElement","className","onClick","propTypes","string","isRequired"],"sources":["../../../../../../src/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '@blaze-react/button';\nimport { useMutation } from '@apollo/client';\nimport { getMutation } from '@blaze-cms/admin-ui-utils';\n\nconst HeaderPreviewButton = ({ itemId, itemEntity }) => {\n const [createPreviewToken] = useMutation(getMutation('PREVIEW_TOKEN_MUTATION'));\n if (process.env.BLAZE_DISABLE_PREVIEW) return null;\n\n const onViewPreview = async () => {\n try {\n const {\n data: {\n createPreviewToken: {\n result: { url }\n }\n } = {}\n } = await createPreviewToken({\n variables: {\n itemId,\n itemEntity\n }\n });\n\n if (url) {\n const delimiter = url.includes('?') ? '&' : '?';\n window.open(`${url}${delimiter}blaze_debug=1`, '_blank');\n }\n // eslint-disable-next-line no-empty\n } catch (err) {}\n };\n\n return (\n <Button className=\"more-menu__link\" onClick={onViewPreview}>\n Preview\n </Button>\n );\n};\n\nHeaderPreviewButton.propTypes = {\n itemId: PropTypes.string.isRequired,\n itemEntity: PropTypes.string.isRequired\n};\n\nexport default HeaderPreviewButton;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,MAAM,MAAM,qBAAqB;AACxC,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,WAAW,QAAQ,2BAA2B;AAEvD,MAAMC,mBAAmB,GAAGA,CAAC;EAAEC,MAAM;EAAEC;AAAW,CAAC,KAAK;EACtD,MAAM,CAACC,kBAAkB,CAAC,GAAGL,WAAW,CAACC,WAAW,CAAC,wBAAwB,CAAC,CAAC;EAC/E,IAAIK,OAAO,CAACC,GAAG,CAACC,qBAAqB,EAAE,OAAO,IAAI;EAElD,MAAMC,aAAa,GAAG,MAAAA,CAAA,KAAY;IAChC,IAAI;MACF,MAAM;QACJC,IAAI,EAAE;UACJL,kBAAkB,EAAE;YAClBM,MAAM,EAAE;cAAEC;YAAI;UAChB;QACF,CAAC,GAAG,CAAC;MACP,CAAC,GAAG,MAAMP,kBAAkB,CAAC;QAC3BQ,SAAS,EAAE;UACTV,MAAM;UACNC;QACF;MACF,CAAC,CAAC;MAEF,IAAIQ,GAAG,EAAE;QACP,MAAME,SAAS,GAAGF,GAAG,CAACG,QAAQ,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG;QAC/CC,MAAM,CAACC,IAAI,CAAC,GAAGL,GAAG,GAAGE,SAAS,eAAe,EAAE,QAAQ,CAAC;MAC1D;MACA;IACF,CAAC,CAAC,OAAOI,GAAG,EAAE,CAAC;EACjB,CAAC;EAED,oBACErB,KAAA,CAAAsB,aAAA,CAACpB,MAAM;IAACqB,SAAS,EAAC,iBAAiB;IAACC,OAAO,EAAEZ;EAAc,GAAC,SAEpD,CAAC;AAEb,CAAC;AAEDP,mBAAmB,CAACoB,SAAS,GAAG;EAC9BnB,MAAM,EAAEL,SAAS,CAACyB,MAAM,CAACC,UAAU;EACnCpB,UAAU,EAAEN,SAAS,CAACyB,MAAM,CAACC;AAC/B,CAAC;AAED,eAAetB,mBAAmB","ignoreList":[]}
|
|
@@ -20,7 +20,10 @@ function validateSideBarRelations(updatedFormValues, requiredChildField) {
|
|
|
20
20
|
}
|
|
21
21
|
async function onViewUrlClick(getFullUrl) {
|
|
22
22
|
const fullUrl = await getFullUrl();
|
|
23
|
-
if (fullUrl)
|
|
23
|
+
if (fullUrl) {
|
|
24
|
+
const delimiter = fullUrl.includes('?') ? '&' : '?';
|
|
25
|
+
window.open(`${fullUrl}${delimiter}blaze_debug=1`, '_blank');
|
|
26
|
+
}
|
|
24
27
|
}
|
|
25
28
|
function getUpdatedFormValues({
|
|
26
29
|
id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.js","names":["has","ENTITY_PUBLISHED","KEY_TO_CHECK","SELECT_DEFAULT_VALUE","canViewPage","formData","entity","schema","entityIsPublished","id","validateSideBarRelations","updatedFormValues","requiredChildField","parentEntityField","find","parentIdField","parentEntityFieldHasValue","value","parentIdFieldHasValue","onViewUrlClick","getFullUrl","fullUrl","window","open","getUpdatedFormValues","formValues","slice","fieldIndex","findIndex","_id","_objectSpread","push","requiredChildFieldIndex","checkFulfilConditions","args","every","param"],"sources":["../../../../src/components/EntityManager/utils/entity.js"],"sourcesContent":["import has from 'lodash.has';\nimport { ENTITY_PUBLISHED, KEY_TO_CHECK, SELECT_DEFAULT_VALUE } from '../../../constants';\n\nfunction canViewPage(formData, entity, schema, entityIsPublished) {\n return (\n has(formData, KEY_TO_CHECK) &&\n entity &&\n entity.id &&\n schema &&\n schema.id &&\n entityIsPublished === ENTITY_PUBLISHED\n );\n}\n\nfunction validateSideBarRelations(updatedFormValues, requiredChildField) {\n if (!requiredChildField) return true;\n const parentEntityField = updatedFormValues.find(({ id }) => id === 'parentEntity');\n const parentIdField = updatedFormValues.find(({ id }) => id === 'parentId');\n\n const parentEntityFieldHasValue =\n parentEntityField &&\n parentEntityField.value &&\n parentEntityField.value !== SELECT_DEFAULT_VALUE;\n const parentIdFieldHasValue = parentIdField && parentIdField.value;\n\n return !!(!parentEntityFieldHasValue || (parentEntityFieldHasValue && parentIdFieldHasValue));\n}\n\nasync function onViewUrlClick(getFullUrl) {\n const fullUrl = await getFullUrl();\n if (fullUrl) window.open(fullUrl
|
|
1
|
+
{"version":3,"file":"entity.js","names":["has","ENTITY_PUBLISHED","KEY_TO_CHECK","SELECT_DEFAULT_VALUE","canViewPage","formData","entity","schema","entityIsPublished","id","validateSideBarRelations","updatedFormValues","requiredChildField","parentEntityField","find","parentIdField","parentEntityFieldHasValue","value","parentIdFieldHasValue","onViewUrlClick","getFullUrl","fullUrl","delimiter","includes","window","open","getUpdatedFormValues","formValues","slice","fieldIndex","findIndex","_id","_objectSpread","push","requiredChildFieldIndex","checkFulfilConditions","args","every","param"],"sources":["../../../../src/components/EntityManager/utils/entity.js"],"sourcesContent":["import has from 'lodash.has';\nimport { ENTITY_PUBLISHED, KEY_TO_CHECK, SELECT_DEFAULT_VALUE } from '../../../constants';\n\nfunction canViewPage(formData, entity, schema, entityIsPublished) {\n return (\n has(formData, KEY_TO_CHECK) &&\n entity &&\n entity.id &&\n schema &&\n schema.id &&\n entityIsPublished === ENTITY_PUBLISHED\n );\n}\n\nfunction validateSideBarRelations(updatedFormValues, requiredChildField) {\n if (!requiredChildField) return true;\n const parentEntityField = updatedFormValues.find(({ id }) => id === 'parentEntity');\n const parentIdField = updatedFormValues.find(({ id }) => id === 'parentId');\n\n const parentEntityFieldHasValue =\n parentEntityField &&\n parentEntityField.value &&\n parentEntityField.value !== SELECT_DEFAULT_VALUE;\n const parentIdFieldHasValue = parentIdField && parentIdField.value;\n\n return !!(!parentEntityFieldHasValue || (parentEntityFieldHasValue && parentIdFieldHasValue));\n}\n\nasync function onViewUrlClick(getFullUrl) {\n const fullUrl = await getFullUrl();\n if (fullUrl) {\n const delimiter = fullUrl.includes('?') ? '&' : '?';\n window.open(`${fullUrl}${delimiter}blaze_debug=1`, '_blank');\n }\n}\n\nfunction getUpdatedFormValues({ id, value, requiredChildField, formValues }) {\n const updatedFormValues = formValues ? formValues.slice() : [];\n const fieldIndex = updatedFormValues.findIndex(({ id: _id }) => _id === id);\n\n if (fieldIndex > -1) {\n updatedFormValues[fieldIndex] = { ...updatedFormValues[fieldIndex], value };\n } else {\n updatedFormValues.push({ id, value });\n }\n\n if (requiredChildField && requiredChildField.id) {\n const requiredChildFieldIndex = updatedFormValues.findIndex(\n ({ id: _id }) => _id === requiredChildField.id\n );\n if (requiredChildFieldIndex > -1) {\n updatedFormValues[requiredChildFieldIndex] = {\n ...updatedFormValues[requiredChildFieldIndex],\n value: requiredChildField.value\n };\n } else {\n updatedFormValues.push({\n id: requiredChildField.id,\n value: requiredChildField.value\n });\n }\n }\n\n return updatedFormValues;\n}\n\nfunction checkFulfilConditions(...args) {\n return args.every(param => param);\n}\n\nexport {\n canViewPage,\n validateSideBarRelations,\n onViewUrlClick,\n getUpdatedFormValues,\n checkFulfilConditions\n};\n"],"mappings":";;;AAAA,OAAOA,GAAG,MAAM,YAAY;AAC5B,SAASC,gBAAgB,EAAEC,YAAY,EAAEC,oBAAoB,QAAQ,oBAAoB;AAEzF,SAASC,WAAWA,CAACC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]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blaze-cms/plugin-data-ui",
|
|
3
|
-
"version": "0.146.0-alpha.
|
|
3
|
+
"version": "0.146.0-alpha.51",
|
|
4
4
|
"description": "Blaze plugin data ui",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-es/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@blaze-cms/core-errors": "0.146.0-alpha.42",
|
|
32
32
|
"@blaze-cms/plugin-render-hooks-ui": "^0.140.3",
|
|
33
33
|
"@blaze-cms/react-form-builder": "0.146.0-alpha.42",
|
|
34
|
-
"@blaze-cms/react-page-builder": "0.146.0-alpha.
|
|
34
|
+
"@blaze-cms/react-page-builder": "0.146.0-alpha.51",
|
|
35
35
|
"@blaze-cms/setup-ui": "^0.140.3",
|
|
36
36
|
"@blaze-cms/versioning-ui": "0.146.0-alpha.2",
|
|
37
37
|
"@blaze-react/button": "0.8.0-alpha.82",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"lib/*",
|
|
69
69
|
"lib-es/*"
|
|
70
70
|
],
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "62793c80df6661ee81f1ab98d933f25eaf7a0187"
|
|
72
72
|
}
|
package/src/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js
CHANGED
|
@@ -23,7 +23,10 @@ const HeaderPreviewButton = ({ itemId, itemEntity }) => {
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
if (url)
|
|
26
|
+
if (url) {
|
|
27
|
+
const delimiter = url.includes('?') ? '&' : '?';
|
|
28
|
+
window.open(`${url}${delimiter}blaze_debug=1`, '_blank');
|
|
29
|
+
}
|
|
27
30
|
// eslint-disable-next-line no-empty
|
|
28
31
|
} catch (err) {}
|
|
29
32
|
};
|
|
@@ -28,7 +28,10 @@ function validateSideBarRelations(updatedFormValues, requiredChildField) {
|
|
|
28
28
|
|
|
29
29
|
async function onViewUrlClick(getFullUrl) {
|
|
30
30
|
const fullUrl = await getFullUrl();
|
|
31
|
-
if (fullUrl)
|
|
31
|
+
if (fullUrl) {
|
|
32
|
+
const delimiter = fullUrl.includes('?') ? '&' : '?';
|
|
33
|
+
window.open(`${fullUrl}${delimiter}blaze_debug=1`, '_blank');
|
|
34
|
+
}
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
function getUpdatedFormValues({ id, value, requiredChildField, formValues }) {
|