@blaze-cms/admin 0.125.1 → 0.125.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/components/CardPrompt/CardPrompt.js +1 -7
- package/lib/components/CardPrompt/CardPrompt.js.map +1 -1
- package/lib/components/CardPrompt/index.js +0 -4
- package/lib/components/CardPrompt/index.js.map +1 -1
- package/lib/components/CopyDataFromAction/CopyDataFromAction.js +23 -87
- package/lib/components/CopyDataFromAction/CopyDataFromAction.js.map +1 -1
- package/lib/components/CopyDataFromAction/helpers.js +0 -9
- package/lib/components/CopyDataFromAction/helpers.js.map +1 -1
- package/lib/components/CopyDataFromAction/index.js +0 -4
- package/lib/components/CopyDataFromAction/index.js.map +1 -1
- package/lib/components/DeleteAction/DeleteAction.js +2 -9
- package/lib/components/DeleteAction/DeleteAction.js.map +1 -1
- package/lib/components/DeleteAction/index.js +0 -4
- package/lib/components/DeleteAction/index.js.map +1 -1
- package/lib/components/LeaveAction/LeaveAction.js +0 -12
- package/lib/components/LeaveAction/LeaveAction.js.map +1 -1
- package/lib/components/LeaveAction/index.js +0 -4
- package/lib/components/LeaveAction/index.js.map +1 -1
- package/lib/components/MetaTitle/MetaTitle.js +2 -15
- package/lib/components/MetaTitle/MetaTitle.js.map +1 -1
- package/lib/components/MetaTitle/index.js +0 -4
- package/lib/components/MetaTitle/index.js.map +1 -1
- package/lib/components/PageHeader/PageHeader.js +4 -14
- package/lib/components/PageHeader/PageHeader.js.map +1 -1
- package/lib/components/PageHeader/index.js +0 -4
- package/lib/components/PageHeader/index.js.map +1 -1
- package/lib/components/RevertToTemplate/RevertToTemplate.js +2 -9
- package/lib/components/RevertToTemplate/RevertToTemplate.js.map +1 -1
- package/lib/components/RevertToTemplate/index.js +0 -4
- package/lib/components/RevertToTemplate/index.js.map +1 -1
- package/lib/index.js +0 -10
- package/lib/index.js.map +1 -1
- package/lib/utils/build-interface.js +3 -23
- package/lib/utils/build-interface.js.map +1 -1
- package/lib/utils/get-blaze-admin.js +1 -10
- package/lib/utils/get-blaze-admin.js.map +1 -1
- package/lib-es/components/CardPrompt/CardPrompt.js +0 -2
- package/lib-es/components/CardPrompt/CardPrompt.js.map +1 -1
- package/lib-es/components/CardPrompt/index.js.map +1 -1
- package/lib-es/components/CopyDataFromAction/CopyDataFromAction.js +5 -20
- package/lib-es/components/CopyDataFromAction/CopyDataFromAction.js.map +1 -1
- package/lib-es/components/CopyDataFromAction/helpers.js +0 -3
- package/lib-es/components/CopyDataFromAction/helpers.js.map +1 -1
- package/lib-es/components/CopyDataFromAction/index.js.map +1 -1
- package/lib-es/components/DeleteAction/DeleteAction.js +0 -2
- package/lib-es/components/DeleteAction/DeleteAction.js.map +1 -1
- package/lib-es/components/DeleteAction/index.js.map +1 -1
- package/lib-es/components/LeaveAction/LeaveAction.js +0 -5
- package/lib-es/components/LeaveAction/LeaveAction.js.map +1 -1
- package/lib-es/components/LeaveAction/index.js.map +1 -1
- package/lib-es/components/MetaTitle/MetaTitle.js +0 -2
- package/lib-es/components/MetaTitle/MetaTitle.js.map +1 -1
- package/lib-es/components/MetaTitle/index.js.map +1 -1
- package/lib-es/components/PageHeader/PageHeader.js +0 -4
- package/lib-es/components/PageHeader/PageHeader.js.map +1 -1
- package/lib-es/components/PageHeader/index.js.map +1 -1
- package/lib-es/components/RevertToTemplate/RevertToTemplate.js +0 -2
- package/lib-es/components/RevertToTemplate/RevertToTemplate.js.map +1 -1
- package/lib-es/components/RevertToTemplate/index.js.map +1 -1
- package/lib-es/index.js.map +1 -1
- package/lib-es/utils/build-interface.js.map +1 -1
- package/lib-es/utils/get-blaze-admin.js +0 -2
- package/lib-es/utils/get-blaze-admin.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyDataFromAction.js","names":["React","useState","PropTypes","Alert","Modal","useQuery","useApolloClient","formFieldTypes","getQuery","getDataProperties","getAction","CopyDataFromAction","onClose","copyAction","getFormData","entityRecordsOptions","setEntityRecordsOptions","actionName","setActionName","selectedEntity","setSelectedEntity","autocompleteDisabledStatus","setAutocompleteDisabledStatus","client","select","Select","autocomplete","Autocomplete","entitiesAction","entityProperties","modalActions","textButton","callback","modifiers","fetchEntityRecords","action","data","query","Object","keys","length","entityRecords","map","id","name","onEntityChange","value","find","entity","onEntityRecordChange","event","fields","getEntitySchemas","entities","displayName","actions","otherSchemaProps","push","getAll","join","keyValue","filterBy","uniqueId","propTypes","func","isRequired"],"sources":["../../../src/components/CopyDataFromAction/CopyDataFromAction.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Alert from '@blaze-react/alert';\nimport Modal from '@blaze-react/modal';\nimport { useQuery, useApolloClient } from '@apollo/client';\nimport { formFieldTypes } from '@blaze-cms/react-form-builder';\nimport { getQuery, getDataProperties } from '@blaze-cms/admin-ui-utils';\nimport { getAction } from './helpers';\n\nconst CopyDataFromAction = ({ onClose, copyAction, getFormData }) => {\n const [entityRecordsOptions, setEntityRecordsOptions] = useState([]);\n const [actionName, setActionName] = useState();\n const [selectedEntity, setSelectedEntity] = useState();\n const [autocompleteDisabledStatus, setAutocompleteDisabledStatus] = useState(true);\n\n const client = useApolloClient();\n const { select: Select, autocomplete: Autocomplete } = formFieldTypes;\n const entitiesAction = [];\n let entityProperties = {};\n\n const modalActions = [\n {\n textButton: 'Cancel',\n callback: onClose,\n modifiers: ['cancel']\n },\n {\n textButton: 'Copy',\n callback: copyAction,\n modifiers: [],\n 'data-testid': 'copyDataFromAction-copy-button'\n }\n ];\n\n const fetchEntityRecords = async action => {\n const { data = {} } = await client.query({\n query: getAction(action)\n });\n\n if (Object.keys(data).length) {\n const entityRecords = data[action].map(({ id, name }) => ({ id, name }));\n setEntityRecordsOptions(entityRecords);\n }\n };\n\n const onEntityChange = ({ value }) => {\n const { action } = entitiesAction.find(entity => entity.id === value);\n if (action) {\n setActionName(action);\n setSelectedEntity(value);\n fetchEntityRecords(action);\n setAutocompleteDisabledStatus(false);\n }\n };\n\n const onEntityRecordChange = async event => {\n const fields = entityProperties[selectedEntity];\n const { data = {} } = await client.query({\n query: getAction(actionName, event.id, fields)\n });\n\n if (Object.keys(data).length) {\n getFormData(data[actionName][0]);\n }\n };\n const { data: { getEntitySchemas } = {} } = useQuery(getQuery('GET_USER_EDITABLE_ENTITIES'));\n\n if (getEntitySchemas) {\n const entities = getEntitySchemas.map(({ id, displayName, actions, ...otherSchemaProps }) => {\n entitiesAction.push({ id, action: actions.getAll });\n entityProperties = {\n [id]: getDataProperties(otherSchemaProps).join(', '),\n ...entityProperties\n };\n return [id, displayName];\n });\n\n return (\n <Modal title=\"Copy data from\" actions={modalActions} onClose={onClose}>\n <Alert type=\"info\">\n By performing this action it will copy and overwrite any unsaved data you have.\n </Alert>\n <Select\n data-testid=\"copyDataFromAction-select\"\n label=\"Entity\"\n value=\"\"\n id=\"entity\"\n onChange={onEntityChange}\n options={entities}\n />\n <Autocomplete\n inputProps={{ 'data-testid': 'copyDataFromAction-autocomplete' }}\n disabled={autocompleteDisabledStatus}\n data={{ data: entityRecordsOptions, keyValue: 'name', filterBy: ['name'] }}\n selected={onEntityRecordChange}\n utils={{ uniqueId: data => data.id }}\n />\n </Modal>\n );\n }\n\n return null;\n};\n\nCopyDataFromAction.propTypes = {\n onClose: PropTypes.func.isRequired,\n copyAction: PropTypes.func.isRequired,\n getFormData: PropTypes.func.isRequired\n};\n\nexport default CopyDataFromAction;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CopyDataFromAction.js","names":["React","useState","PropTypes","Alert","Modal","useQuery","useApolloClient","formFieldTypes","getQuery","getDataProperties","getAction","CopyDataFromAction","onClose","copyAction","getFormData","entityRecordsOptions","setEntityRecordsOptions","actionName","setActionName","selectedEntity","setSelectedEntity","autocompleteDisabledStatus","setAutocompleteDisabledStatus","client","select","Select","autocomplete","Autocomplete","entitiesAction","entityProperties","modalActions","textButton","callback","modifiers","fetchEntityRecords","action","data","query","Object","keys","length","entityRecords","map","id","name","onEntityChange","value","find","entity","onEntityRecordChange","event","fields","getEntitySchemas","entities","displayName","actions","otherSchemaProps","push","getAll","join","keyValue","filterBy","uniqueId","propTypes","func","isRequired"],"sources":["../../../src/components/CopyDataFromAction/CopyDataFromAction.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Alert from '@blaze-react/alert';\nimport Modal from '@blaze-react/modal';\nimport { useQuery, useApolloClient } from '@apollo/client';\nimport { formFieldTypes } from '@blaze-cms/react-form-builder';\nimport { getQuery, getDataProperties } from '@blaze-cms/admin-ui-utils';\nimport { getAction } from './helpers';\n\nconst CopyDataFromAction = ({ onClose, copyAction, getFormData }) => {\n const [entityRecordsOptions, setEntityRecordsOptions] = useState([]);\n const [actionName, setActionName] = useState();\n const [selectedEntity, setSelectedEntity] = useState();\n const [autocompleteDisabledStatus, setAutocompleteDisabledStatus] = useState(true);\n\n const client = useApolloClient();\n const { select: Select, autocomplete: Autocomplete } = formFieldTypes;\n const entitiesAction = [];\n let entityProperties = {};\n\n const modalActions = [\n {\n textButton: 'Cancel',\n callback: onClose,\n modifiers: ['cancel']\n },\n {\n textButton: 'Copy',\n callback: copyAction,\n modifiers: [],\n 'data-testid': 'copyDataFromAction-copy-button'\n }\n ];\n\n const fetchEntityRecords = async action => {\n const { data = {} } = await client.query({\n query: getAction(action)\n });\n\n if (Object.keys(data).length) {\n const entityRecords = data[action].map(({ id, name }) => ({ id, name }));\n setEntityRecordsOptions(entityRecords);\n }\n };\n\n const onEntityChange = ({ value }) => {\n const { action } = entitiesAction.find(entity => entity.id === value);\n if (action) {\n setActionName(action);\n setSelectedEntity(value);\n fetchEntityRecords(action);\n setAutocompleteDisabledStatus(false);\n }\n };\n\n const onEntityRecordChange = async event => {\n const fields = entityProperties[selectedEntity];\n const { data = {} } = await client.query({\n query: getAction(actionName, event.id, fields)\n });\n\n if (Object.keys(data).length) {\n getFormData(data[actionName][0]);\n }\n };\n const { data: { getEntitySchemas } = {} } = useQuery(getQuery('GET_USER_EDITABLE_ENTITIES'));\n\n if (getEntitySchemas) {\n const entities = getEntitySchemas.map(({ id, displayName, actions, ...otherSchemaProps }) => {\n entitiesAction.push({ id, action: actions.getAll });\n entityProperties = {\n [id]: getDataProperties(otherSchemaProps).join(', '),\n ...entityProperties\n };\n return [id, displayName];\n });\n\n return (\n <Modal title=\"Copy data from\" actions={modalActions} onClose={onClose}>\n <Alert type=\"info\">\n By performing this action it will copy and overwrite any unsaved data you have.\n </Alert>\n <Select\n data-testid=\"copyDataFromAction-select\"\n label=\"Entity\"\n value=\"\"\n id=\"entity\"\n onChange={onEntityChange}\n options={entities}\n />\n <Autocomplete\n inputProps={{ 'data-testid': 'copyDataFromAction-autocomplete' }}\n disabled={autocompleteDisabledStatus}\n data={{ data: entityRecordsOptions, keyValue: 'name', filterBy: ['name'] }}\n selected={onEntityRecordChange}\n utils={{ uniqueId: data => data.id }}\n />\n </Modal>\n );\n }\n\n return null;\n};\n\nCopyDataFromAction.propTypes = {\n onClose: PropTypes.func.isRequired,\n copyAction: PropTypes.func.isRequired,\n getFormData: PropTypes.func.isRequired\n};\n\nexport default CopyDataFromAction;\n"],"mappings":"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"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { gql } from '@apollo/client';
|
|
2
|
-
|
|
3
2
|
const generateQuery = (action, id, fragment) => id ? `
|
|
4
3
|
query getEntityData{
|
|
5
4
|
${action}(where:{ id: "${id}" }){
|
|
@@ -14,13 +13,11 @@ const generateQuery = (action, id, fragment) => id ? `
|
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
15
|
`;
|
|
17
|
-
|
|
18
16
|
const getAction = (action, id, fields = '') => {
|
|
19
17
|
const query = id ? generateQuery(action, id, fields) : generateQuery(action);
|
|
20
18
|
return gql`
|
|
21
19
|
${query}
|
|
22
20
|
`;
|
|
23
21
|
};
|
|
24
|
-
|
|
25
22
|
export { getAction };
|
|
26
23
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","names":["gql","generateQuery","action","id","fragment","getAction","fields","query"],"sources":["../../../src/components/CopyDataFromAction/helpers.js"],"sourcesContent":["import { gql } from '@apollo/client';\n\nconst generateQuery = (action, id, fragment) =>\n id\n ? `\n query getEntityData{\n ${action}(where:{ id: \"${id}\" }){\n name\n ${fragment}\n }\n }\n `\n : `query getEntityData{\n ${action}{\n id,\n name\n }\n }\n `;\n\nconst getAction = (action, id, fields = '') => {\n const query = id ? generateQuery(action, id, fields) : generateQuery(action);\n return gql`\n ${query}\n `;\n};\n\nexport { getAction };\n"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"helpers.js","names":["gql","generateQuery","action","id","fragment","getAction","fields","query"],"sources":["../../../src/components/CopyDataFromAction/helpers.js"],"sourcesContent":["import { gql } from '@apollo/client';\n\nconst generateQuery = (action, id, fragment) =>\n id\n ? `\n query getEntityData{\n ${action}(where:{ id: \"${id}\" }){\n name\n ${fragment}\n }\n }\n `\n : `query getEntityData{\n ${action}{\n id,\n name\n }\n }\n `;\n\nconst getAction = (action, id, fields = '') => {\n const query = id ? generateQuery(action, id, fields) : generateQuery(action);\n return gql`\n ${query}\n `;\n};\n\nexport { getAction };\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,MAAMC,aAAa,GAAG,CAACC,MAAM,EAAEC,EAAE,EAAEC,QAAQ,KACzCD,EAAE,GACG;AACP;AACA,QAAQD,MAAO,iBAAgBC,EAAG;AAClC;AACA,UAAUC,QAAS;AACnB;AACA;AACA,KAAK,GACE;AACP,UAAUF,MAAO;AACjB;AACA;AACA;AACA;AACA,KAAK;AAEL,MAAMG,SAAS,GAAG,CAACH,MAAM,EAAEC,EAAE,EAAEG,MAAM,GAAG,EAAE,KAAK;EAC7C,MAAMC,KAAK,GAAGJ,EAAE,GAAGF,aAAa,CAACC,MAAM,EAAEC,EAAE,EAAEG,MAAM,CAAC,GAAGL,aAAa,CAACC,MAAM,CAAC;EAC5E,OAAOF,GAAI;AACb,MAAMO,KAAM;AACZ,GAAG;AACH,CAAC;AAED,SAASF,SAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CopyDataFromAction"],"sources":["../../../src/components/CopyDataFromAction/index.js"],"sourcesContent":["import CopyDataFromAction from './CopyDataFromAction';\n\nexport default CopyDataFromAction;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["CopyDataFromAction"],"sources":["../../../src/components/CopyDataFromAction/index.js"],"sourcesContent":["import CopyDataFromAction from './CopyDataFromAction';\n\nexport default CopyDataFromAction;\n"],"mappings":"AAAA,OAAOA,kBAAkB,MAAM,sBAAsB;AAErD,eAAeA,kBAAkB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import Modal from '@blaze-react/modal';
|
|
4
|
-
|
|
5
4
|
const DeleteAction = ({
|
|
6
5
|
onClose,
|
|
7
6
|
deleteAction,
|
|
@@ -21,7 +20,6 @@ const DeleteAction = ({
|
|
|
21
20
|
isAlert: true
|
|
22
21
|
}, /*#__PURE__*/React.createElement("p", null, "You are about to delete: ", /*#__PURE__*/React.createElement("strong", null, itemName)));
|
|
23
22
|
};
|
|
24
|
-
|
|
25
23
|
DeleteAction.propTypes = {
|
|
26
24
|
onClose: PropTypes.func.isRequired,
|
|
27
25
|
deleteAction: PropTypes.func.isRequired,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteAction.js","names":["React","PropTypes","Modal","DeleteAction","onClose","deleteAction","itemName","alertActions","callback","event","stopPropagation","modifiers","textButton","propTypes","func","isRequired","string","defaultProps"],"sources":["../../../src/components/DeleteAction/DeleteAction.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from '@blaze-react/modal';\n\nconst DeleteAction = ({ onClose, deleteAction, itemName }) => {\n const alertActions = [\n {\n callback: event => {\n event.stopPropagation();\n deleteAction();\n },\n modifiers: ['small'],\n textButton: 'Delete'\n }\n ];\n\n return (\n <Modal actions={alertActions} onClose={onClose} isAlert>\n <p>\n You are about to delete: <strong>{itemName}</strong>\n </p>\n </Modal>\n );\n};\n\nDeleteAction.propTypes = {\n onClose: PropTypes.func.isRequired,\n deleteAction: PropTypes.func.isRequired,\n itemName: PropTypes.string\n};\n\nDeleteAction.defaultProps = {\n itemName: ''\n};\n\nexport default DeleteAction;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"DeleteAction.js","names":["React","PropTypes","Modal","DeleteAction","onClose","deleteAction","itemName","alertActions","callback","event","stopPropagation","modifiers","textButton","propTypes","func","isRequired","string","defaultProps"],"sources":["../../../src/components/DeleteAction/DeleteAction.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from '@blaze-react/modal';\n\nconst DeleteAction = ({ onClose, deleteAction, itemName }) => {\n const alertActions = [\n {\n callback: event => {\n event.stopPropagation();\n deleteAction();\n },\n modifiers: ['small'],\n textButton: 'Delete'\n }\n ];\n\n return (\n <Modal actions={alertActions} onClose={onClose} isAlert>\n <p>\n You are about to delete: <strong>{itemName}</strong>\n </p>\n </Modal>\n );\n};\n\nDeleteAction.propTypes = {\n onClose: PropTypes.func.isRequired,\n deleteAction: PropTypes.func.isRequired,\n itemName: PropTypes.string\n};\n\nDeleteAction.defaultProps = {\n itemName: ''\n};\n\nexport default DeleteAction;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,oBAAoB;AAEtC,MAAMC,YAAY,GAAG,CAAC;EAAEC,OAAO;EAAEC,YAAY;EAAEC;AAAS,CAAC,KAAK;EAC5D,MAAMC,YAAY,GAAG,CACnB;IACEC,QAAQ,EAAEC,KAAK,IAAI;MACjBA,KAAK,CAACC,eAAe,EAAE;MACvBL,YAAY,EAAE;IAChB,CAAC;IACDM,SAAS,EAAE,CAAC,OAAO,CAAC;IACpBC,UAAU,EAAE;EACd,CAAC,CACF;EAED,oBACE,oBAAC,KAAK;IAAC,OAAO,EAAEL,YAAa;IAAC,OAAO,EAAEH,OAAQ;IAAC,OAAO;EAAA,gBACrD,yEAC2B,oCAASE,QAAQ,CAAU,CAClD,CACE;AAEZ,CAAC;AAEDH,YAAY,CAACU,SAAS,GAAG;EACvBT,OAAO,EAAEH,SAAS,CAACa,IAAI,CAACC,UAAU;EAClCV,YAAY,EAAEJ,SAAS,CAACa,IAAI,CAACC,UAAU;EACvCT,QAAQ,EAAEL,SAAS,CAACe;AACtB,CAAC;AAEDb,YAAY,CAACc,YAAY,GAAG;EAC1BX,QAAQ,EAAE;AACZ,CAAC;AAED,eAAeH,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["DeleteAction"],"sources":["../../../src/components/DeleteAction/index.js"],"sourcesContent":["import DeleteAction from './DeleteAction';\n\nexport default DeleteAction;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["DeleteAction"],"sources":["../../../src/components/DeleteAction/index.js"],"sourcesContent":["import DeleteAction from './DeleteAction';\n\nexport default DeleteAction;\n"],"mappings":"AAAA,OAAOA,YAAY,MAAM,gBAAgB;AAEzC,eAAeA,YAAY"}
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ReactDOM from 'react-dom';
|
|
3
3
|
import Modal from '@blaze-react/modal';
|
|
4
|
-
|
|
5
4
|
const LeaveAction = (message, callback) => {
|
|
6
5
|
let container = document.getElementById('leave-container');
|
|
7
|
-
|
|
8
6
|
if (!container) {
|
|
9
7
|
container = document.createElement('div');
|
|
10
8
|
container.setAttribute('confirmation-modal', '');
|
|
11
9
|
container.id = 'leave-container';
|
|
12
10
|
document.body.appendChild(container);
|
|
13
11
|
}
|
|
14
|
-
|
|
15
12
|
const closeModal = callbackState => {
|
|
16
13
|
ReactDOM.unmountComponentAtNode(container);
|
|
17
14
|
callback(callbackState);
|
|
18
15
|
};
|
|
19
|
-
|
|
20
16
|
const alertActions = [{
|
|
21
17
|
callback: event => {
|
|
22
18
|
event.stopPropagation();
|
|
@@ -31,6 +27,5 @@ const LeaveAction = (message, callback) => {
|
|
|
31
27
|
isAlert: true
|
|
32
28
|
}, /*#__PURE__*/React.createElement("p", null, message)), container);
|
|
33
29
|
};
|
|
34
|
-
|
|
35
30
|
export default LeaveAction;
|
|
36
31
|
//# sourceMappingURL=LeaveAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeaveAction.js","names":["React","ReactDOM","Modal","LeaveAction","message","callback","container","document","getElementById","createElement","setAttribute","id","body","appendChild","closeModal","callbackState","unmountComponentAtNode","alertActions","event","stopPropagation","modifiers","textButton","render"],"sources":["../../../src/components/LeaveAction/LeaveAction.js"],"sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport Modal from '@blaze-react/modal';\n\nconst LeaveAction = (message, callback) => {\n let container = document.getElementById('leave-container');\n if (!container) {\n container = document.createElement('div');\n container.setAttribute('confirmation-modal', '');\n container.id = 'leave-container';\n document.body.appendChild(container);\n }\n\n const closeModal = callbackState => {\n ReactDOM.unmountComponentAtNode(container);\n callback(callbackState);\n };\n\n const alertActions = [\n {\n callback: event => {\n event.stopPropagation();\n closeModal(true);\n },\n modifiers: ['small'],\n textButton: 'Leave'\n }\n ];\n\n ReactDOM.render(\n <Modal actions={alertActions} onClose={() => closeModal(false)} isAlert>\n <p>{message}</p>\n </Modal>,\n container\n );\n};\n\nexport default LeaveAction;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"LeaveAction.js","names":["React","ReactDOM","Modal","LeaveAction","message","callback","container","document","getElementById","createElement","setAttribute","id","body","appendChild","closeModal","callbackState","unmountComponentAtNode","alertActions","event","stopPropagation","modifiers","textButton","render"],"sources":["../../../src/components/LeaveAction/LeaveAction.js"],"sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport Modal from '@blaze-react/modal';\n\nconst LeaveAction = (message, callback) => {\n let container = document.getElementById('leave-container');\n if (!container) {\n container = document.createElement('div');\n container.setAttribute('confirmation-modal', '');\n container.id = 'leave-container';\n document.body.appendChild(container);\n }\n\n const closeModal = callbackState => {\n ReactDOM.unmountComponentAtNode(container);\n callback(callbackState);\n };\n\n const alertActions = [\n {\n callback: event => {\n event.stopPropagation();\n closeModal(true);\n },\n modifiers: ['small'],\n textButton: 'Leave'\n }\n ];\n\n ReactDOM.render(\n <Modal actions={alertActions} onClose={() => closeModal(false)} isAlert>\n <p>{message}</p>\n </Modal>,\n container\n );\n};\n\nexport default LeaveAction;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,MAAM,WAAW;AAChC,OAAOC,KAAK,MAAM,oBAAoB;AAEtC,MAAMC,WAAW,GAAG,CAACC,OAAO,EAAEC,QAAQ,KAAK;EACzC,IAAIC,SAAS,GAAGC,QAAQ,CAACC,cAAc,CAAC,iBAAiB,CAAC;EAC1D,IAAI,CAACF,SAAS,EAAE;IACdA,SAAS,GAAGC,QAAQ,CAACE,aAAa,CAAC,KAAK,CAAC;IACzCH,SAAS,CAACI,YAAY,CAAC,oBAAoB,EAAE,EAAE,CAAC;IAChDJ,SAAS,CAACK,EAAE,GAAG,iBAAiB;IAChCJ,QAAQ,CAACK,IAAI,CAACC,WAAW,CAACP,SAAS,CAAC;EACtC;EAEA,MAAMQ,UAAU,GAAGC,aAAa,IAAI;IAClCd,QAAQ,CAACe,sBAAsB,CAACV,SAAS,CAAC;IAC1CD,QAAQ,CAACU,aAAa,CAAC;EACzB,CAAC;EAED,MAAME,YAAY,GAAG,CACnB;IACEZ,QAAQ,EAAEa,KAAK,IAAI;MACjBA,KAAK,CAACC,eAAe,EAAE;MACvBL,UAAU,CAAC,IAAI,CAAC;IAClB,CAAC;IACDM,SAAS,EAAE,CAAC,OAAO,CAAC;IACpBC,UAAU,EAAE;EACd,CAAC,CACF;EAEDpB,QAAQ,CAACqB,MAAM,eACb,oBAAC,KAAK;IAAC,OAAO,EAAEL,YAAa;IAAC,OAAO,EAAE,MAAMH,UAAU,CAAC,KAAK,CAAE;IAAC,OAAO;EAAA,gBACrE,+BAAIV,OAAO,CAAK,CACV,EACRE,SAAS,CACV;AACH,CAAC;AAED,eAAeH,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["LeaveAction"],"sources":["../../../src/components/LeaveAction/index.js"],"sourcesContent":["import LeaveAction from './LeaveAction';\n\nexport default LeaveAction;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["LeaveAction"],"sources":["../../../src/components/LeaveAction/index.js"],"sourcesContent":["import LeaveAction from './LeaveAction';\n\nexport default LeaveAction;\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,eAAe;AAEvC,eAAeA,WAAW"}
|
|
@@ -3,7 +3,6 @@ import { withRouter } from 'react-router-dom';
|
|
|
3
3
|
import { Helmet } from 'react-helmet';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import capitalize from 'lodash.capitalize';
|
|
6
|
-
|
|
7
6
|
const MetaTitle = props => {
|
|
8
7
|
const {
|
|
9
8
|
pageName,
|
|
@@ -18,7 +17,6 @@ const MetaTitle = props => {
|
|
|
18
17
|
const metaTitle = `${titleToDisplay} - Blaze`;
|
|
19
18
|
return /*#__PURE__*/React.createElement(Helmet, null, /*#__PURE__*/React.createElement("title", null, metaTitle));
|
|
20
19
|
};
|
|
21
|
-
|
|
22
20
|
MetaTitle.propTypes = {
|
|
23
21
|
title: PropTypes.string,
|
|
24
22
|
pageName: PropTypes.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetaTitle.js","names":["React","withRouter","Helmet","PropTypes","capitalize","MetaTitle","props","pageName","title","match","params","entityIdentifier","titleToDisplay","metaTitle","propTypes","string","object","defaultProps"],"sources":["../../../src/components/MetaTitle/MetaTitle.js"],"sourcesContent":["import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { Helmet } from 'react-helmet';\nimport PropTypes from 'prop-types';\nimport capitalize from 'lodash.capitalize';\n\nconst MetaTitle = props => {\n const {\n pageName,\n title,\n match: { params: { entityIdentifier } = {} }\n } = props;\n\n const titleToDisplay = pageName || capitalize(entityIdentifier) || title;\n\n const metaTitle = `${titleToDisplay} - Blaze`;\n\n return (\n <Helmet>\n <title>{metaTitle}</title>\n </Helmet>\n );\n};\n\nMetaTitle.propTypes = {\n title: PropTypes.string,\n pageName: PropTypes.string,\n match: PropTypes.object\n};\n\nMetaTitle.defaultProps = {\n title: '',\n pageName: '',\n match: {}\n};\n\nexport default withRouter(MetaTitle);\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"MetaTitle.js","names":["React","withRouter","Helmet","PropTypes","capitalize","MetaTitle","props","pageName","title","match","params","entityIdentifier","titleToDisplay","metaTitle","propTypes","string","object","defaultProps"],"sources":["../../../src/components/MetaTitle/MetaTitle.js"],"sourcesContent":["import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { Helmet } from 'react-helmet';\nimport PropTypes from 'prop-types';\nimport capitalize from 'lodash.capitalize';\n\nconst MetaTitle = props => {\n const {\n pageName,\n title,\n match: { params: { entityIdentifier } = {} }\n } = props;\n\n const titleToDisplay = pageName || capitalize(entityIdentifier) || title;\n\n const metaTitle = `${titleToDisplay} - Blaze`;\n\n return (\n <Helmet>\n <title>{metaTitle}</title>\n </Helmet>\n );\n};\n\nMetaTitle.propTypes = {\n title: PropTypes.string,\n pageName: PropTypes.string,\n match: PropTypes.object\n};\n\nMetaTitle.defaultProps = {\n title: '',\n pageName: '',\n match: {}\n};\n\nexport default withRouter(MetaTitle);\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,MAAM,QAAQ,cAAc;AACrC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,mBAAmB;AAE1C,MAAMC,SAAS,GAAGC,KAAK,IAAI;EACzB,MAAM;IACJC,QAAQ;IACRC,KAAK;IACLC,KAAK,EAAE;MAAEC,MAAM,EAAE;QAAEC;MAAiB,CAAC,GAAG,CAAC;IAAE;EAC7C,CAAC,GAAGL,KAAK;EAET,MAAMM,cAAc,GAAGL,QAAQ,IAAIH,UAAU,CAACO,gBAAgB,CAAC,IAAIH,KAAK;EAExE,MAAMK,SAAS,GAAI,GAAED,cAAe,UAAS;EAE7C,oBACE,oBAAC,MAAM,qBACL,mCAAQC,SAAS,CAAS,CACnB;AAEb,CAAC;AAEDR,SAAS,CAACS,SAAS,GAAG;EACpBN,KAAK,EAAEL,SAAS,CAACY,MAAM;EACvBR,QAAQ,EAAEJ,SAAS,CAACY,MAAM;EAC1BN,KAAK,EAAEN,SAAS,CAACa;AACnB,CAAC;AAEDX,SAAS,CAACY,YAAY,GAAG;EACvBT,KAAK,EAAE,EAAE;EACTD,QAAQ,EAAE,EAAE;EACZE,KAAK,EAAE,CAAC;AACV,CAAC;AAED,eAAeR,UAAU,CAACI,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["MetaTitle"],"sources":["../../../src/components/MetaTitle/index.js"],"sourcesContent":["import MetaTitle from './MetaTitle';\n\nexport default MetaTitle;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["MetaTitle"],"sources":["../../../src/components/MetaTitle/index.js"],"sourcesContent":["import MetaTitle from './MetaTitle';\n\nexport default MetaTitle;\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,aAAa;AAEnC,eAAeA,SAAS"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import MetaTitle from '../MetaTitle/MetaTitle';
|
|
4
|
-
|
|
5
4
|
const PageHeader = ({
|
|
6
5
|
title,
|
|
7
6
|
subtitle,
|
|
@@ -28,7 +27,6 @@ const PageHeader = ({
|
|
|
28
27
|
}, /*#__PURE__*/React.createElement("div", {
|
|
29
28
|
className: "page-header__subheading"
|
|
30
29
|
}, subtitle))));
|
|
31
|
-
|
|
32
30
|
PageHeader.propTypes = {
|
|
33
31
|
title: PropTypes.string.isRequired,
|
|
34
32
|
subtitle: PropTypes.string,
|
|
@@ -42,11 +40,9 @@ PageHeader.defaultProps = {
|
|
|
42
40
|
pageName: '',
|
|
43
41
|
onViewUrl: null
|
|
44
42
|
};
|
|
45
|
-
|
|
46
43
|
const PageHeaderActions = ({
|
|
47
44
|
children
|
|
48
45
|
}) => /*#__PURE__*/React.createElement(React.Fragment, null, React.Children.map(children, child => React.cloneElement(child)));
|
|
49
|
-
|
|
50
46
|
PageHeaderActions.propTypes = {
|
|
51
47
|
children: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired
|
|
52
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeader.js","names":["React","PropTypes","MetaTitle","PageHeader","title","subtitle","children","pageName","onViewUrl","propTypes","string","isRequired","oneOfType","array","object","func","defaultProps","PageHeaderActions","Children","map","child","cloneElement","Actions"],"sources":["../../../src/components/PageHeader/PageHeader.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport MetaTitle from '../MetaTitle/MetaTitle';\n\nconst PageHeader = ({ title, subtitle, children, pageName, onViewUrl }) => (\n <>\n <MetaTitle title={title} pageName={pageName} />\n <div className=\"page-header--wrapper\">\n <div className=\"page-header page-header--sticky\">\n {onViewUrl ? (\n <div\n className=\"page-header__heading page-header__heading--active\"\n onClick={onViewUrl}\n role=\"button\">\n {title}\n </div>\n ) : (\n <div className=\"page-header__heading\">{title}</div>\n )}\n <div className=\"page-header__button\">{children}</div>\n </div>\n <div className=\"page-header page-header--base\">\n <div className=\"page-header__subheading\">{subtitle}</div>\n </div>\n </div>\n </>\n);\n\nPageHeader.propTypes = {\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.string]),\n pageName: PropTypes.string,\n onViewUrl: PropTypes.func\n};\n\nPageHeader.defaultProps = {\n subtitle: '',\n children: '',\n pageName: '',\n onViewUrl: null\n};\n\nconst PageHeaderActions = ({ children }) => (\n <>{React.Children.map(children, child => React.cloneElement(child))}</>\n);\n\nPageHeaderActions.propTypes = {\n children: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired\n};\n\nPageHeader.Actions = PageHeaderActions;\n\nexport default PageHeader;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"PageHeader.js","names":["React","PropTypes","MetaTitle","PageHeader","title","subtitle","children","pageName","onViewUrl","propTypes","string","isRequired","oneOfType","array","object","func","defaultProps","PageHeaderActions","Children","map","child","cloneElement","Actions"],"sources":["../../../src/components/PageHeader/PageHeader.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport MetaTitle from '../MetaTitle/MetaTitle';\n\nconst PageHeader = ({ title, subtitle, children, pageName, onViewUrl }) => (\n <>\n <MetaTitle title={title} pageName={pageName} />\n <div className=\"page-header--wrapper\">\n <div className=\"page-header page-header--sticky\">\n {onViewUrl ? (\n <div\n className=\"page-header__heading page-header__heading--active\"\n onClick={onViewUrl}\n role=\"button\">\n {title}\n </div>\n ) : (\n <div className=\"page-header__heading\">{title}</div>\n )}\n <div className=\"page-header__button\">{children}</div>\n </div>\n <div className=\"page-header page-header--base\">\n <div className=\"page-header__subheading\">{subtitle}</div>\n </div>\n </div>\n </>\n);\n\nPageHeader.propTypes = {\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.string]),\n pageName: PropTypes.string,\n onViewUrl: PropTypes.func\n};\n\nPageHeader.defaultProps = {\n subtitle: '',\n children: '',\n pageName: '',\n onViewUrl: null\n};\n\nconst PageHeaderActions = ({ children }) => (\n <>{React.Children.map(children, child => React.cloneElement(child))}</>\n);\n\nPageHeaderActions.propTypes = {\n children: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired\n};\n\nPageHeader.Actions = PageHeaderActions;\n\nexport default PageHeader;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,SAAS,MAAM,wBAAwB;AAE9C,MAAMC,UAAU,GAAG,CAAC;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC;AAAU,CAAC,kBACpE,uDACE,oBAAC,SAAS;EAAC,KAAK,EAAEJ,KAAM;EAAC,QAAQ,EAAEG;AAAS,EAAG,eAC/C;EAAK,SAAS,EAAC;AAAsB,gBACnC;EAAK,SAAS,EAAC;AAAiC,GAC7CC,SAAS,gBACR;EACE,SAAS,EAAC,mDAAmD;EAC7D,OAAO,EAAEA,SAAU;EACnB,IAAI,EAAC;AAAQ,GACZJ,KAAK,CACF,gBAEN;EAAK,SAAS,EAAC;AAAsB,GAAEA,KAAK,CAC7C,eACD;EAAK,SAAS,EAAC;AAAqB,GAAEE,QAAQ,CAAO,CACjD,eACN;EAAK,SAAS,EAAC;AAA+B,gBAC5C;EAAK,SAAS,EAAC;AAAyB,GAAED,QAAQ,CAAO,CACrD,CACF,CAET;AAEDF,UAAU,CAACM,SAAS,GAAG;EACrBL,KAAK,EAAEH,SAAS,CAACS,MAAM,CAACC,UAAU;EAClCN,QAAQ,EAAEJ,SAAS,CAACS,MAAM;EAC1BJ,QAAQ,EAAEL,SAAS,CAACW,SAAS,CAAC,CAACX,SAAS,CAACY,KAAK,EAAEZ,SAAS,CAACa,MAAM,EAAEb,SAAS,CAACS,MAAM,CAAC,CAAC;EACpFH,QAAQ,EAAEN,SAAS,CAACS,MAAM;EAC1BF,SAAS,EAAEP,SAAS,CAACc;AACvB,CAAC;AAEDZ,UAAU,CAACa,YAAY,GAAG;EACxBX,QAAQ,EAAE,EAAE;EACZC,QAAQ,EAAE,EAAE;EACZC,QAAQ,EAAE,EAAE;EACZC,SAAS,EAAE;AACb,CAAC;AAED,MAAMS,iBAAiB,GAAG,CAAC;EAAEX;AAAS,CAAC,kBACrC,0CAAGN,KAAK,CAACkB,QAAQ,CAACC,GAAG,CAACb,QAAQ,EAAEc,KAAK,IAAIpB,KAAK,CAACqB,YAAY,CAACD,KAAK,CAAC,CAAC,CACpE;AAEDH,iBAAiB,CAACR,SAAS,GAAG;EAC5BH,QAAQ,EAAEL,SAAS,CAACW,SAAS,CAAC,CAACX,SAAS,CAACY,KAAK,EAAEZ,SAAS,CAACa,MAAM,CAAC,CAAC,CAACH;AACrE,CAAC;AAEDR,UAAU,CAACmB,OAAO,GAAGL,iBAAiB;AAEtC,eAAed,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["PageHeader"],"sources":["../../../src/components/PageHeader/index.js"],"sourcesContent":["import PageHeader from './PageHeader';\n\nexport default PageHeader;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["PageHeader"],"sources":["../../../src/components/PageHeader/index.js"],"sourcesContent":["import PageHeader from './PageHeader';\n\nexport default PageHeader;\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,cAAc;AAErC,eAAeA,UAAU"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import Modal from '@blaze-react/modal';
|
|
4
|
-
|
|
5
4
|
const RevertToTemplate = ({
|
|
6
5
|
id,
|
|
7
6
|
onClose,
|
|
@@ -22,7 +21,6 @@ const RevertToTemplate = ({
|
|
|
22
21
|
isAlert: true
|
|
23
22
|
}, /*#__PURE__*/React.createElement("p", null, "By performing this action it will revert to template and overwrite all data and settings of this element."));
|
|
24
23
|
};
|
|
25
|
-
|
|
26
24
|
RevertToTemplate.propTypes = {
|
|
27
25
|
onClose: PropTypes.func.isRequired,
|
|
28
26
|
revertToTemplate: PropTypes.func.isRequired,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RevertToTemplate.js","names":["React","PropTypes","Modal","RevertToTemplate","id","onClose","revertToTemplate","alertActions","callback","event","stopPropagation","modifiers","textButton","propTypes","func","isRequired","string"],"sources":["../../../src/components/RevertToTemplate/RevertToTemplate.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from '@blaze-react/modal';\n\nconst RevertToTemplate = ({ id, onClose, revertToTemplate }) => {\n const alertActions = [\n {\n callback: event => {\n event.stopPropagation();\n revertToTemplate(id);\n onClose();\n },\n modifiers: ['small'],\n textButton: 'Revert'\n }\n ];\n return (\n <Modal actions={alertActions} onClose={onClose} isAlert>\n <p>\n By performing this action it will revert to template and overwrite all data and settings of\n this element.\n </p>\n </Modal>\n );\n};\n\nRevertToTemplate.propTypes = {\n onClose: PropTypes.func.isRequired,\n revertToTemplate: PropTypes.func.isRequired,\n id: PropTypes.string.isRequired\n};\n\nexport default RevertToTemplate;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"RevertToTemplate.js","names":["React","PropTypes","Modal","RevertToTemplate","id","onClose","revertToTemplate","alertActions","callback","event","stopPropagation","modifiers","textButton","propTypes","func","isRequired","string"],"sources":["../../../src/components/RevertToTemplate/RevertToTemplate.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from '@blaze-react/modal';\n\nconst RevertToTemplate = ({ id, onClose, revertToTemplate }) => {\n const alertActions = [\n {\n callback: event => {\n event.stopPropagation();\n revertToTemplate(id);\n onClose();\n },\n modifiers: ['small'],\n textButton: 'Revert'\n }\n ];\n return (\n <Modal actions={alertActions} onClose={onClose} isAlert>\n <p>\n By performing this action it will revert to template and overwrite all data and settings of\n this element.\n </p>\n </Modal>\n );\n};\n\nRevertToTemplate.propTypes = {\n onClose: PropTypes.func.isRequired,\n revertToTemplate: PropTypes.func.isRequired,\n id: PropTypes.string.isRequired\n};\n\nexport default RevertToTemplate;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,oBAAoB;AAEtC,MAAMC,gBAAgB,GAAG,CAAC;EAAEC,EAAE;EAAEC,OAAO;EAAEC;AAAiB,CAAC,KAAK;EAC9D,MAAMC,YAAY,GAAG,CACnB;IACEC,QAAQ,EAAEC,KAAK,IAAI;MACjBA,KAAK,CAACC,eAAe,EAAE;MACvBJ,gBAAgB,CAACF,EAAE,CAAC;MACpBC,OAAO,EAAE;IACX,CAAC;IACDM,SAAS,EAAE,CAAC,OAAO,CAAC;IACpBC,UAAU,EAAE;EACd,CAAC,CACF;EACD,oBACE,oBAAC,KAAK;IAAC,OAAO,EAAEL,YAAa;IAAC,OAAO,EAAEF,OAAQ;IAAC,OAAO;EAAA,gBACrD,2IAGI,CACE;AAEZ,CAAC;AAEDF,gBAAgB,CAACU,SAAS,GAAG;EAC3BR,OAAO,EAAEJ,SAAS,CAACa,IAAI,CAACC,UAAU;EAClCT,gBAAgB,EAAEL,SAAS,CAACa,IAAI,CAACC,UAAU;EAC3CX,EAAE,EAAEH,SAAS,CAACe,MAAM,CAACD;AACvB,CAAC;AAED,eAAeZ,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["RevertToTemplate"],"sources":["../../../src/components/RevertToTemplate/index.js"],"sourcesContent":["import RevertToTemplate from './RevertToTemplate';\n\nexport default RevertToTemplate;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["RevertToTemplate"],"sources":["../../../src/components/RevertToTemplate/index.js"],"sourcesContent":["import RevertToTemplate from './RevertToTemplate';\n\nexport default RevertToTemplate;\n"],"mappings":"AAAA,OAAOA,gBAAgB,MAAM,oBAAoB;AAEjD,eAAeA,gBAAgB"}
|
package/lib-es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["PageHeader","DeleteAction","CardPrompt","CopyDataFromAction","MetaTitle","LeaveAction","RevertToTemplate","getBlazeAdmin"],"sources":["../src/index.js"],"sourcesContent":["import PageHeader from './components/PageHeader';\nimport DeleteAction from './components/DeleteAction';\nimport CardPrompt from './components/CardPrompt';\nimport CopyDataFromAction from './components/CopyDataFromAction';\nimport MetaTitle from './components/MetaTitle';\nimport LeaveAction from './components/LeaveAction';\nimport RevertToTemplate from './components/RevertToTemplate';\n\nimport { getBlazeAdmin } from './utils/get-blaze-admin';\n\nexport {\n getBlazeAdmin,\n PageHeader,\n DeleteAction,\n CardPrompt,\n CopyDataFromAction,\n MetaTitle,\n LeaveAction,\n RevertToTemplate\n};\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["PageHeader","DeleteAction","CardPrompt","CopyDataFromAction","MetaTitle","LeaveAction","RevertToTemplate","getBlazeAdmin"],"sources":["../src/index.js"],"sourcesContent":["import PageHeader from './components/PageHeader';\nimport DeleteAction from './components/DeleteAction';\nimport CardPrompt from './components/CardPrompt';\nimport CopyDataFromAction from './components/CopyDataFromAction';\nimport MetaTitle from './components/MetaTitle';\nimport LeaveAction from './components/LeaveAction';\nimport RevertToTemplate from './components/RevertToTemplate';\n\nimport { getBlazeAdmin } from './utils/get-blaze-admin';\n\nexport {\n getBlazeAdmin,\n PageHeader,\n DeleteAction,\n CardPrompt,\n CopyDataFromAction,\n MetaTitle,\n LeaveAction,\n RevertToTemplate\n};\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,yBAAyB;AAChD,OAAOC,YAAY,MAAM,2BAA2B;AACpD,OAAOC,UAAU,MAAM,yBAAyB;AAChD,OAAOC,kBAAkB,MAAM,iCAAiC;AAChE,OAAOC,SAAS,MAAM,wBAAwB;AAC9C,OAAOC,WAAW,MAAM,0BAA0B;AAClD,OAAOC,gBAAgB,MAAM,+BAA+B;AAE5D,SAASC,aAAa,QAAQ,yBAAyB;AAEvD,SACEA,aAAa,EACbP,UAAU,EACVC,YAAY,EACZC,UAAU,EACVC,kBAAkB,EAClBC,SAAS,EACTC,WAAW,EACXC,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-interface.js","names":["React","ReactDOM","ApolloProvider","Router","Switch","Route","BrowserRouter","createBrowserHistory","ToastProvider","ErrorBoundary","setupCheckAccessToken","checkAccessToken","LeaveAction","buildInterface","app","init","Layout","getLayout","routes","getRoutes","client","createClient","browserHistory","render","message","callback","map","component","path","exact","key","document","getElementById"],"sources":["../../src/utils/build-interface.js"],"sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { ApolloProvider } from '@apollo/client';\nimport { Router, Switch, Route, BrowserRouter } from 'react-router-dom';\nimport { createBrowserHistory } from 'history';\nimport { ToastProvider } from '@blaze-react/toaster';\nimport ErrorBoundary from '@blaze-cms/core-errors-ui';\nimport { setupCheckAccessToken, checkAccessToken } from '@blaze-cms/core-auth-ui';\nimport LeaveAction from '../components/LeaveAction';\n\nexport default async function buildInterface(app) {\n await app.init();\n\n const Layout = app.getLayout();\n const routes = app.getRoutes();\n const client = app.createClient();\n const browserHistory = createBrowserHistory();\n await checkAccessToken(client);\n setupCheckAccessToken(client);\n\n ReactDOM.render(\n <ErrorBoundary app={app}>\n <ApolloProvider client={client}>\n <Router history={browserHistory}>\n <BrowserRouter\n getUserConfirmation={(message, callback) => LeaveAction(message, callback)}>\n <ToastProvider>\n <Layout>\n <React.Suspense fallback={() => <div>loading...</div>}>\n <Switch>\n {routes.map(({ component, path, exact, key }) => (\n <Route component={component} path={path} exact={exact} key={key} />\n ))}\n </Switch>\n </React.Suspense>\n </Layout>\n </ToastProvider>\n </BrowserRouter>\n </Router>\n </ApolloProvider>\n </ErrorBoundary>,\n document.getElementById('root')\n );\n}\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"build-interface.js","names":["React","ReactDOM","ApolloProvider","Router","Switch","Route","BrowserRouter","createBrowserHistory","ToastProvider","ErrorBoundary","setupCheckAccessToken","checkAccessToken","LeaveAction","buildInterface","app","init","Layout","getLayout","routes","getRoutes","client","createClient","browserHistory","render","message","callback","map","component","path","exact","key","document","getElementById"],"sources":["../../src/utils/build-interface.js"],"sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { ApolloProvider } from '@apollo/client';\nimport { Router, Switch, Route, BrowserRouter } from 'react-router-dom';\nimport { createBrowserHistory } from 'history';\nimport { ToastProvider } from '@blaze-react/toaster';\nimport ErrorBoundary from '@blaze-cms/core-errors-ui';\nimport { setupCheckAccessToken, checkAccessToken } from '@blaze-cms/core-auth-ui';\nimport LeaveAction from '../components/LeaveAction';\n\nexport default async function buildInterface(app) {\n await app.init();\n\n const Layout = app.getLayout();\n const routes = app.getRoutes();\n const client = app.createClient();\n const browserHistory = createBrowserHistory();\n await checkAccessToken(client);\n setupCheckAccessToken(client);\n\n ReactDOM.render(\n <ErrorBoundary app={app}>\n <ApolloProvider client={client}>\n <Router history={browserHistory}>\n <BrowserRouter\n getUserConfirmation={(message, callback) => LeaveAction(message, callback)}>\n <ToastProvider>\n <Layout>\n <React.Suspense fallback={() => <div>loading...</div>}>\n <Switch>\n {routes.map(({ component, path, exact, key }) => (\n <Route component={component} path={path} exact={exact} key={key} />\n ))}\n </Switch>\n </React.Suspense>\n </Layout>\n </ToastProvider>\n </BrowserRouter>\n </Router>\n </ApolloProvider>\n </ErrorBoundary>,\n document.getElementById('root')\n );\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,MAAM,WAAW;AAChC,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,MAAM,EAAEC,MAAM,EAAEC,KAAK,EAAEC,aAAa,QAAQ,kBAAkB;AACvE,SAASC,oBAAoB,QAAQ,SAAS;AAC9C,SAASC,aAAa,QAAQ,sBAAsB;AACpD,OAAOC,aAAa,MAAM,2BAA2B;AACrD,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ,yBAAyB;AACjF,OAAOC,WAAW,MAAM,2BAA2B;AAEnD,eAAe,eAAeC,cAAc,CAACC,GAAG,EAAE;EAChD,MAAMA,GAAG,CAACC,IAAI,EAAE;EAEhB,MAAMC,MAAM,GAAGF,GAAG,CAACG,SAAS,EAAE;EAC9B,MAAMC,MAAM,GAAGJ,GAAG,CAACK,SAAS,EAAE;EAC9B,MAAMC,MAAM,GAAGN,GAAG,CAACO,YAAY,EAAE;EACjC,MAAMC,cAAc,GAAGf,oBAAoB,EAAE;EAC7C,MAAMI,gBAAgB,CAACS,MAAM,CAAC;EAC9BV,qBAAqB,CAACU,MAAM,CAAC;EAE7BnB,QAAQ,CAACsB,MAAM,eACb,oBAAC,aAAa;IAAC,GAAG,EAAET;EAAI,gBACtB,oBAAC,cAAc;IAAC,MAAM,EAAEM;EAAO,gBAC7B,oBAAC,MAAM;IAAC,OAAO,EAAEE;EAAe,gBAC9B,oBAAC,aAAa;IACZ,mBAAmB,EAAE,CAACE,OAAO,EAAEC,QAAQ,KAAKb,WAAW,CAACY,OAAO,EAAEC,QAAQ;EAAE,gBAC3E,oBAAC,aAAa,qBACZ,oBAAC,MAAM,qBACL,oBAAC,KAAK,CAAC,QAAQ;IAAC,QAAQ,EAAE,mBAAM;EAAsB,gBACpD,oBAAC,MAAM,QACJP,MAAM,CAACQ,GAAG,CAAC,CAAC;IAAEC,SAAS;IAAEC,IAAI;IAAEC,KAAK;IAAEC;EAAI,CAAC,kBAC1C,oBAAC,KAAK;IAAC,SAAS,EAAEH,SAAU;IAAC,IAAI,EAAEC,IAAK;IAAC,KAAK,EAAEC,KAAM;IAAC,GAAG,EAAEC;EAAI,EACjE,CAAC,CACK,CACM,CACV,CACK,CACF,CACT,CACM,CACH,EAChBC,QAAQ,CAACC,cAAc,CAAC,MAAM,CAAC,CAChC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-blaze-admin.js","names":["getBlazeUi","blazeConfig","buildInterface","getBlazeAdmin","buildConfig","config","app","render"],"sources":["../../src/utils/get-blaze-admin.js"],"sourcesContent":["import getBlazeUi from '@blaze-cms/core-ui';\nimport blazeConfig from '../../blaze.config';\nimport buildInterface from './build-interface';\n\nexport function getBlazeAdmin({ buildConfig } = {}) {\n const config = buildConfig ? buildConfig(blazeConfig) : blazeConfig;\n const app = getBlazeUi({ config });\n app.render = () => buildInterface(app);\n return app;\n}\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"get-blaze-admin.js","names":["getBlazeUi","blazeConfig","buildInterface","getBlazeAdmin","buildConfig","config","app","render"],"sources":["../../src/utils/get-blaze-admin.js"],"sourcesContent":["import getBlazeUi from '@blaze-cms/core-ui';\nimport blazeConfig from '../../blaze.config';\nimport buildInterface from './build-interface';\n\nexport function getBlazeAdmin({ buildConfig } = {}) {\n const config = buildConfig ? buildConfig(blazeConfig) : blazeConfig;\n const app = getBlazeUi({ config });\n app.render = () => buildInterface(app);\n return app;\n}\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,oBAAoB;AAC3C,OAAOC,WAAW,MAAM,oBAAoB;AAC5C,OAAOC,cAAc,MAAM,mBAAmB;AAE9C,OAAO,SAASC,aAAa,CAAC;EAAEC;AAAY,CAAC,GAAG,CAAC,CAAC,EAAE;EAClD,MAAMC,MAAM,GAAGD,WAAW,GAAGA,WAAW,CAACH,WAAW,CAAC,GAAGA,WAAW;EACnE,MAAMK,GAAG,GAAGN,UAAU,CAAC;IAAEK;EAAO,CAAC,CAAC;EAClCC,GAAG,CAACC,MAAM,GAAG,MAAML,cAAc,CAACI,GAAG,CAAC;EACtC,OAAOA,GAAG;AACZ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blaze-cms/admin",
|
|
3
|
-
"version": "0.125.
|
|
3
|
+
"version": "0.125.2",
|
|
4
4
|
"description": "Blaze example project",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-es/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@blaze-cms/plugin-google-maps-ui": "^0.125.0",
|
|
39
39
|
"@blaze-cms/plugin-gtm-ui": "^0.125.0",
|
|
40
40
|
"@blaze-cms/plugin-media-ui": "^0.125.0",
|
|
41
|
-
"@blaze-cms/plugin-page-builder-ui": "^0.125.
|
|
41
|
+
"@blaze-cms/plugin-page-builder-ui": "^0.125.2",
|
|
42
42
|
"@blaze-cms/react-form-builder": "^0.125.0",
|
|
43
43
|
"@blaze-cms/setup-ui": "^0.92.0",
|
|
44
44
|
"@blaze-react/alert": "0.5.19",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"lib/*",
|
|
67
67
|
"lib-es/*"
|
|
68
68
|
],
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "053af77d5aed2e40c1e503bfee03706905f05c6a"
|
|
70
70
|
}
|