@blaze-cms/plugin-data-ui 0.129.0-admin-updates.2 → 0.129.0-project-admin-customisations.1
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 +26 -3
- package/README.md +42 -0
- package/lib/components/EntityDataListing/EntityDataListing.js +3 -24
- package/lib/components/EntityDataListing/EntityDataListing.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js +39 -0
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -0
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/index.js +12 -0
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/index.js.map +1 -0
- package/lib/components/EntityManager/Entity/Entity.js +10 -1
- package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js +44 -0
- package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js.map +1 -0
- package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +32 -0
- package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -0
- package/lib/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js +45 -0
- package/lib/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -0
- package/lib/components/EntityManager/Entity/SideBarRelations/index.js +12 -2
- package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +38 -0
- package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -0
- package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
- package/lib/components/EntityManager/EntityManager.js.map +1 -1
- package/lib/components/EntityManager/utils/entity.js.map +1 -1
- package/lib/components/InfoBoxes/InfoBoxes.js +36 -0
- package/lib/components/InfoBoxes/InfoBoxes.js.map +1 -0
- package/lib/components/InfoBoxes/container/InfoBoxContainer.js +44 -0
- package/lib/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -0
- package/lib/components/InfoBoxes/helpers/build-dynamic-query.js +25 -0
- package/lib/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -0
- package/lib/components/InfoBoxes/hooks/useData.js +42 -0
- package/lib/components/InfoBoxes/hooks/useData.js.map +1 -0
- package/lib/components/InfoBoxes/hooks/useInfoBox.js +26 -0
- package/lib/components/InfoBoxes/hooks/useInfoBox.js.map +1 -0
- package/lib/components/InfoBoxes/index.js +12 -0
- package/lib/components/InfoBoxes/index.js.map +1 -0
- package/lib/components/InfoBoxes/presentational/InfoBox.js +46 -0
- package/lib/components/InfoBoxes/presentational/InfoBox.js.map +1 -0
- package/lib/components/ListingTable/ListingTable.js +5 -26
- package/lib/components/ListingTable/ListingTable.js.map +1 -1
- package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js +5 -12
- package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
- package/lib/components/ListingTable/TableActions/TableActions.js.map +1 -1
- package/lib/components/ListingTable/mappers/populate-rows.js.map +1 -1
- package/lib/components/Tabs/index.js.map +1 -1
- package/lib/index.js +3 -11
- package/lib/index.js.map +1 -1
- package/lib/utils/add-content-menu-items.js +64 -13
- package/lib/utils/add-content-menu-items.js.map +1 -1
- package/lib/utils/build-create-entity-mutation.js.map +1 -1
- package/lib/utils/build-delete-entity-mutation.js.map +1 -1
- package/lib/utils/build-listing-query.js.map +1 -1
- package/lib/utils/build-update-data-query.js.map +1 -1
- package/lib/utils/build-update-publish-unpublish-mutation.js.map +1 -1
- package/lib/utils/hoc/withContext.js.map +1 -1
- package/lib-es/components/EntityDataListing/EntityDataListing.js +3 -14
- package/lib-es/components/EntityDataListing/EntityDataListing.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js +30 -0
- package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -0
- package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/index.js +3 -0
- package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/index.js.map +1 -0
- package/lib-es/components/EntityManager/Entity/Entity.js +10 -1
- package/lib-es/components/EntityManager/Entity/Entity.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js +30 -0
- package/lib-es/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js.map +1 -0
- package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +26 -0
- package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -0
- package/lib-es/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js +39 -0
- package/lib-es/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -0
- package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js +12 -2
- package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +24 -0
- package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -0
- package/lib-es/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
- package/lib-es/components/EntityManager/EntityManager.js.map +1 -1
- package/lib-es/components/EntityManager/utils/entity.js.map +1 -1
- package/lib-es/components/InfoBoxes/InfoBoxes.js +28 -0
- package/lib-es/components/InfoBoxes/InfoBoxes.js.map +1 -0
- package/lib-es/components/InfoBoxes/container/InfoBoxContainer.js +30 -0
- package/lib-es/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -0
- package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js +25 -0
- package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -0
- package/lib-es/components/InfoBoxes/hooks/useData.js +37 -0
- package/lib-es/components/InfoBoxes/hooks/useData.js.map +1 -0
- package/lib-es/components/InfoBoxes/hooks/useInfoBox.js +19 -0
- package/lib-es/components/InfoBoxes/hooks/useInfoBox.js.map +1 -0
- package/lib-es/components/InfoBoxes/index.js +3 -0
- package/lib-es/components/InfoBoxes/index.js.map +1 -0
- package/lib-es/components/InfoBoxes/presentational/InfoBox.js +31 -0
- package/lib-es/components/InfoBoxes/presentational/InfoBox.js.map +1 -0
- package/lib-es/components/ListingTable/ListingTable.js +4 -25
- package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js +6 -13
- package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
- package/lib-es/components/ListingTable/TableActions/TableActions.js.map +1 -1
- package/lib-es/components/ListingTable/mappers/populate-rows.js.map +1 -1
- package/lib-es/components/Tabs/index.js.map +1 -1
- package/lib-es/index.js +1 -9
- package/lib-es/index.js.map +1 -1
- package/lib-es/utils/add-content-menu-items.js +49 -5
- package/lib-es/utils/add-content-menu-items.js.map +1 -1
- package/lib-es/utils/build-create-entity-mutation.js.map +1 -1
- package/lib-es/utils/build-listing-query.js.map +1 -1
- package/lib-es/utils/build-update-data-query.js.map +1 -1
- package/lib-es/utils/build-update-publish-unpublish-mutation.js.map +1 -1
- package/lib-es/utils/hoc/withContext.js.map +1 -1
- package/package.json +10 -9
- package/src/components/EntityDataListing/EntityDataListing.js +3 -12
- package/src/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js +26 -0
- package/src/components/EntityManager/Entity/EntitiyNavLinks/index.js +3 -0
- package/src/components/EntityManager/Entity/Entity.js +4 -0
- package/src/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js +22 -0
- package/src/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +33 -0
- package/src/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js +28 -0
- package/src/components/EntityManager/Entity/SideBarRelations/index.js +34 -16
- package/src/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +33 -0
- package/src/components/InfoBoxes/InfoBoxes.js +24 -0
- package/src/components/InfoBoxes/container/InfoBoxContainer.js +22 -0
- package/src/components/InfoBoxes/helpers/build-dynamic-query.js +25 -0
- package/src/components/InfoBoxes/hooks/useData.js +20 -0
- package/src/components/InfoBoxes/hooks/useInfoBox.js +13 -0
- package/src/components/InfoBoxes/index.js +3 -0
- package/src/components/InfoBoxes/presentational/InfoBox.js +34 -0
- package/src/components/ListingTable/ListingTable.js +4 -18
- package/src/components/ListingTable/ListingTableContent/ListingTableContent.js +5 -16
- package/src/index.js +1 -8
- package/src/utils/add-content-menu-items.js +45 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomSidebarInfoContainer.js","names":["PropTypes","React","useCustomSidebarData","CustomSidebarInfo","CustomSibebarInfoContainer","id","schema","displayProperties","data","Object","keys","length","items","values","flatMap","item","createElement","customSidebarInfoKey","key","propTypes","string","isRequired","object"],"sources":["../../../../../../src/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport useCustomSidebarData from '../hooks/useCustomSidebarData';\nimport CustomSidebarInfo from '../presentational/CustomSidebarInfo';\n\nconst CustomSibebarInfoContainer = ({ id, schema, displayProperties }) => {\n const { data } = useCustomSidebarData({ id, schema, displayProperties });\n\n if (!data || !Object.keys(data) || Object.keys(data).length === 0) return null;\n\n const items = Object.values(data).flatMap(item => Object.values(item));\n\n return <CustomSidebarInfo items={items} customSidebarInfoKey={displayProperties.key} />;\n};\n\nexport default CustomSibebarInfoContainer;\n\nCustomSibebarInfoContainer.propTypes = {\n id: PropTypes.string.isRequired,\n displayProperties: PropTypes.object.isRequired,\n schema: PropTypes.object.isRequired\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,oBAAoB,MAAM,+BAA+B;AAChE,OAAOC,iBAAiB,MAAM,qCAAqC;AAEnE,MAAMC,0BAA0B,GAAGA,CAAC;EAAEC,EAAE;EAAEC,MAAM;EAAEC;AAAkB,CAAC,KAAK;EACxE,MAAM;IAAEC;EAAK,CAAC,GAAGN,oBAAoB,CAAC;IAAEG,EAAE;IAAEC,MAAM;IAAEC;EAAkB,CAAC,CAAC;EAExE,IAAI,CAACC,IAAI,IAAI,CAACC,MAAM,CAACC,IAAI,CAACF,IAAI,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACF,IAAI,CAAC,CAACG,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;EAE9E,MAAMC,KAAK,GAAGH,MAAM,CAACI,MAAM,CAACL,IAAI,CAAC,CAACM,OAAO,CAACC,IAAI,IAAIN,MAAM,CAACI,MAAM,CAACE,IAAI,CAAC,CAAC;EAEtE,oBAAOd,KAAA,CAAAe,aAAA,CAACb,iBAAiB;IAACS,KAAK,EAAEA,KAAM;IAACK,oBAAoB,EAAEV,iBAAiB,CAACW;EAAI,CAAE,CAAC;AACzF,CAAC;AAED,eAAed,0BAA0B;AAEzCA,0BAA0B,CAACe,SAAS,GAAG;EACrCd,EAAE,EAAEL,SAAS,CAACoB,MAAM,CAACC,UAAU;EAC/Bd,iBAAiB,EAAEP,SAAS,CAACsB,MAAM,CAACD,UAAU;EAC9Cf,MAAM,EAAEN,SAAS,CAACsB,MAAM,CAACD;AAC3B,CAAC"}
|
package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
import { BlazeError } from '@blaze-cms/core-errors';
|
|
3
|
+
export default function buildDynamicQuery({
|
|
4
|
+
id,
|
|
5
|
+
schema,
|
|
6
|
+
displayProperties
|
|
7
|
+
}) {
|
|
8
|
+
if (!schema || !schema.actions || !schema.actions.get || !schema.properties) {
|
|
9
|
+
throw new BlazeError('DataEntity query requires get action, properties and fields from entity schema');
|
|
10
|
+
}
|
|
11
|
+
if (displayProperties.adminMainInfoProperty && Array.isArray(displayProperties.adminMainInfoProperty)) {
|
|
12
|
+
const fields = displayProperties.adminMainInfoProperty.map(infoProperty => `${infoProperty} {
|
|
13
|
+
label
|
|
14
|
+
value
|
|
15
|
+
}`);
|
|
16
|
+
return gql`query getInfoBoxData($id: String!){
|
|
17
|
+
${schema.actions.get}( id: $id ) {
|
|
18
|
+
id
|
|
19
|
+
${fields.map(field => field)}
|
|
20
|
+
__typename
|
|
21
|
+
}
|
|
22
|
+
}`;
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=build-dynamic-query.js.map
|
package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-dynamic-query.js","names":["gql","BlazeError","buildDynamicQuery","id","schema","displayProperties","actions","get","properties","adminMainInfoProperty","Array","isArray","fields","map","infoProperty","field"],"sources":["../../../../../../src/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\n\nexport default function buildDynamicQuery({ id, schema, displayProperties }) {\n if (!schema || !schema.actions || !schema.actions.get || !schema.properties) {\n throw new BlazeError(\n 'DataEntity query requires get action, properties and fields from entity schema'\n );\n }\n\n if (\n displayProperties.adminMainInfoProperty &&\n Array.isArray(displayProperties.adminMainInfoProperty)\n ) {\n const fields = displayProperties.adminMainInfoProperty.map(\n infoProperty =>\n `${infoProperty} {\n label\n value\n }`\n );\n\n return gql`query getInfoBoxData($id: String!){\n ${schema.actions.get}( id: $id ) {\n id\n ${fields.map(field => field)}\n __typename\n }\n }`;\n }\n\n return null;\n}\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AAEnD,eAAe,SAASC,iBAAiBA,CAAC;EAAEC,EAAE;EAAEC,MAAM;EAAEC;AAAkB,CAAC,EAAE;EAC3E,IAAI,CAACD,MAAM,IAAI,CAACA,MAAM,CAACE,OAAO,IAAI,CAACF,MAAM,CAACE,OAAO,CAACC,GAAG,IAAI,CAACH,MAAM,CAACI,UAAU,EAAE;IAC3E,MAAM,IAAIP,UAAU,CAClB,gFACF,CAAC;EACH;EAEA,IACEI,iBAAiB,CAACI,qBAAqB,IACvCC,KAAK,CAACC,OAAO,CAACN,iBAAiB,CAACI,qBAAqB,CAAC,EACtD;IACA,MAAMG,MAAM,GAAGP,iBAAiB,CAACI,qBAAqB,CAACI,GAAG,CACxDC,YAAY,IACT,GAAEA,YAAa;AACxB;AACA;AACA,QACI,CAAC;IAED,OAAOd,GAAI;AACf,QAAQI,MAAM,CAACE,OAAO,CAACC,GAAI;AAC3B;AACA,SAASK,MAAM,CAACC,GAAG,CAACE,KAAK,IAAIA,KAAK,CAAE;AACpC;AACA;AACA,MAAM;EACJ;EAEA,OAAO,IAAI;AACb"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import ProptTypes from 'prop-types';
|
|
2
|
+
import { useQuery, gql } from '@apollo/client';
|
|
3
|
+
import buildDynamicQuery from '../helpers/build-dynamic-query';
|
|
4
|
+
const useCustomSidebarData = ({
|
|
5
|
+
id,
|
|
6
|
+
schema,
|
|
7
|
+
displayProperties
|
|
8
|
+
}) => {
|
|
9
|
+
const query = buildDynamicQuery({
|
|
10
|
+
id,
|
|
11
|
+
schema,
|
|
12
|
+
displayProperties
|
|
13
|
+
});
|
|
14
|
+
const customSidebarInfoQuery = query || gql`
|
|
15
|
+
query {
|
|
16
|
+
__typename
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
const {
|
|
20
|
+
data = {},
|
|
21
|
+
loading,
|
|
22
|
+
error
|
|
23
|
+
} = useQuery(customSidebarInfoQuery, {
|
|
24
|
+
variables: {
|
|
25
|
+
id
|
|
26
|
+
},
|
|
27
|
+
skip: !query
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
data: data.__typename !== 'Query' ? data : null,
|
|
31
|
+
loading,
|
|
32
|
+
error
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default useCustomSidebarData;
|
|
36
|
+
useCustomSidebarData.propTypes = {
|
|
37
|
+
displayProperties: ProptTypes.object.isRequired
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=useCustomSidebarData.js.map
|
package/lib-es/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCustomSidebarData.js","names":["ProptTypes","useQuery","gql","buildDynamicQuery","useCustomSidebarData","id","schema","displayProperties","query","customSidebarInfoQuery","data","loading","error","variables","skip","__typename","propTypes","object","isRequired"],"sources":["../../../../../../src/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js"],"sourcesContent":["import ProptTypes from 'prop-types';\nimport { useQuery, gql } from '@apollo/client';\nimport buildDynamicQuery from '../helpers/build-dynamic-query';\n\nconst useCustomSidebarData = ({ id, schema, displayProperties }) => {\n const query = buildDynamicQuery({ id, schema, displayProperties });\n\n const customSidebarInfoQuery =\n query ||\n gql`\n query {\n __typename\n }\n `;\n\n const { data = {}, loading, error } = useQuery(customSidebarInfoQuery, {\n variables: { id },\n skip: !query\n });\n\n return { data: data.__typename !== 'Query' ? data : null, loading, error };\n};\n\nexport default useCustomSidebarData;\n\nuseCustomSidebarData.propTypes = {\n displayProperties: ProptTypes.object.isRequired\n};\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,YAAY;AACnC,SAASC,QAAQ,EAAEC,GAAG,QAAQ,gBAAgB;AAC9C,OAAOC,iBAAiB,MAAM,gCAAgC;AAE9D,MAAMC,oBAAoB,GAAGA,CAAC;EAAEC,EAAE;EAAEC,MAAM;EAAEC;AAAkB,CAAC,KAAK;EAClE,MAAMC,KAAK,GAAGL,iBAAiB,CAAC;IAAEE,EAAE;IAAEC,MAAM;IAAEC;EAAkB,CAAC,CAAC;EAElE,MAAME,sBAAsB,GAC1BD,KAAK,IACLN,GAAI;AACR;AACA;AACA;AACA,KAAK;EAEH,MAAM;IAAEQ,IAAI,GAAG,CAAC,CAAC;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGX,QAAQ,CAACQ,sBAAsB,EAAE;IACrEI,SAAS,EAAE;MAAER;IAAG,CAAC;IACjBS,IAAI,EAAE,CAACN;EACT,CAAC,CAAC;EAEF,OAAO;IAAEE,IAAI,EAAEA,IAAI,CAACK,UAAU,KAAK,OAAO,GAAGL,IAAI,GAAG,IAAI;IAAEC,OAAO;IAAEC;EAAM,CAAC;AAC5E,CAAC;AAED,eAAeR,oBAAoB;AAEnCA,oBAAoB,CAACY,SAAS,GAAG;EAC/BT,iBAAiB,EAAEP,UAAU,CAACiB,MAAM,CAACC;AACvC,CAAC"}
|
|
@@ -7,6 +7,8 @@ import { formFieldTypes } from '@blaze-cms/react-form-builder';
|
|
|
7
7
|
import classnames from 'classnames';
|
|
8
8
|
import { VersionsList } from '@blaze-cms/versioning-ui';
|
|
9
9
|
import { PUBLISHED, UNPUBLISHED } from '../../../../constants';
|
|
10
|
+
import CustomSidebarInfoContainer from './container/CustomSidebarInfoContainer';
|
|
11
|
+
import EntityNavLinks from '../EntitiyNavLinks';
|
|
10
12
|
const SideBarRelations = ({
|
|
11
13
|
schema,
|
|
12
14
|
onChange,
|
|
@@ -72,16 +74,24 @@ const SideBarRelations = ({
|
|
|
72
74
|
"data-testid": "sideBarRelations-main-div"
|
|
73
75
|
}, /*#__PURE__*/React.createElement("div", {
|
|
74
76
|
className: "sidebar__content"
|
|
75
|
-
},
|
|
77
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
76
78
|
className: "sidebar__status"
|
|
79
|
+
}, formattedCreated && /*#__PURE__*/React.createElement("div", {
|
|
80
|
+
className: "sidebar__top"
|
|
77
81
|
}, /*#__PURE__*/React.createElement("div", {
|
|
78
82
|
className: "sidebar__status__wrapper"
|
|
79
83
|
}, /*#__PURE__*/React.createElement("b", null, "Status"), /*#__PURE__*/React.createElement("span", {
|
|
80
84
|
className: statusClassName
|
|
81
|
-
}, formattedStatus)), formattedStatus === PUBLISHED && /*#__PURE__*/React.createElement("p", null, formattedStatus, " on: ", /*#__PURE__*/React.createElement("span", null, " ", formattedPublished)), /*#__PURE__*/React.createElement("p", null, "Created: ", /*#__PURE__*/React.createElement("span", null, formattedCreated)), /*#__PURE__*/React.createElement("p", null, "Updated: ", /*#__PURE__*/React.createElement("span", null, formattedUpdated))), /*#__PURE__*/React.createElement(
|
|
85
|
+
}, formattedStatus)), formattedStatus === PUBLISHED && /*#__PURE__*/React.createElement("p", null, formattedStatus, " on: ", /*#__PURE__*/React.createElement("span", null, " ", formattedPublished))), !schema.displayProperties.adminMainInfoProperty && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, "Created: ", /*#__PURE__*/React.createElement("span", null, formattedCreated)), /*#__PURE__*/React.createElement("p", null, "Updated: ", /*#__PURE__*/React.createElement("span", null, formattedUpdated))), /*#__PURE__*/React.createElement(CustomSidebarInfoContainer, {
|
|
86
|
+
id: itemId,
|
|
87
|
+
schema: schema,
|
|
88
|
+
displayProperties: schema.displayProperties
|
|
89
|
+
})), /*#__PURE__*/React.createElement(VersionsList, {
|
|
82
90
|
itemEntity: itemEntity,
|
|
83
91
|
itemId: itemId,
|
|
84
92
|
interfaces: interfaces
|
|
93
|
+
}), /*#__PURE__*/React.createElement(EntityNavLinks, {
|
|
94
|
+
schema: schema
|
|
85
95
|
}), relationsComponents && relationsComponents.map(({
|
|
86
96
|
id,
|
|
87
97
|
staticData,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useState","useEffect","PropTypes","uuidv1","useApolloClient","getQuery","formFieldTypes","classnames","VersionsList","PUBLISHED","UNPUBLISHED","SideBarRelations","schema","onChange","formData","entity","relation","RelationComponent","formattedStatus","formattedUpdated","formattedCreated","formattedPublished","status","client","relationsComponents","setRelationsComponents","fetchRelationSchema","entityIdentifier","data","getEntitySchemas","relationSchema","query","variables","identifier","allRelationComponents","Promise","all","relations","filter","showInForm","foreignKey","properties","map","id","staticData","itemId","itemEntity","interfaces","statusClassName","createElement","className","entitySchema","key","onSelect","propTypes","object","isRequired","func","defaultProps"],"sources":["../../../../../src/components/EntityManager/Entity/SideBarRelations/index.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport uuidv1 from 'uuid/v1';\nimport { useApolloClient } from '@apollo/client';\nimport { getQuery } from '@blaze-cms/admin-ui-utils';\nimport { formFieldTypes } from '@blaze-cms/react-form-builder';\nimport classnames from 'classnames';\nimport { VersionsList } from '@blaze-cms/versioning-ui';\nimport { PUBLISHED, UNPUBLISHED } from '../../../../constants';\n\nconst SideBarRelations = ({ schema, onChange, formData, entity }) => {\n const { relation: RelationComponent } = formFieldTypes;\n const {\n formattedStatus,\n formattedUpdated,\n formattedCreated,\n formattedPublished,\n status\n } = formData;\n const client = useApolloClient();\n const [relationsComponents, setRelationsComponents] = useState(null);\n useEffect(\n () => {\n (async () => {\n const fetchRelationSchema = async ({ entityIdentifier }) => {\n if (!entityIdentifier) return null;\n\n const {\n data: {\n getEntitySchemas: [relationSchema]\n }\n } = await client.query({\n query: getQuery('GET_ENTITY_SCHEMA'),\n variables: { identifier: entityIdentifier }\n });\n return relationSchema;\n };\n\n if (!relationsComponents && schema) {\n const allRelationComponents = await Promise.all(\n schema.relations\n .filter(({ showInForm, foreignKey }) => showInForm && schema.properties[foreignKey])\n .map(async relation => ({\n id: uuidv1(),\n staticData: relation,\n schema: await fetchRelationSchema(relation)\n }))\n );\n\n setRelationsComponents(allRelationComponents);\n }\n })();\n },\n [client, relationsComponents, schema, schema.relations]\n );\n const { id: itemId } = entity;\n const { identifier: itemEntity, interfaces } = schema;\n\n const statusClassName = classnames('sidebar__status__badge', {\n 'sidebar__status__badge--published': status === PUBLISHED,\n 'sidebar__status__badge--unpublished': status === UNPUBLISHED\n });\n\n return (\n <div className=\"sidebar\" data-testid=\"sideBarRelations-main-div\">\n <div className=\"sidebar__content\">\n {formattedCreated && (\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useState","useEffect","PropTypes","uuidv1","useApolloClient","getQuery","formFieldTypes","classnames","VersionsList","PUBLISHED","UNPUBLISHED","CustomSidebarInfoContainer","EntityNavLinks","SideBarRelations","schema","onChange","formData","entity","relation","RelationComponent","formattedStatus","formattedUpdated","formattedCreated","formattedPublished","status","client","relationsComponents","setRelationsComponents","fetchRelationSchema","entityIdentifier","data","getEntitySchemas","relationSchema","query","variables","identifier","allRelationComponents","Promise","all","relations","filter","showInForm","foreignKey","properties","map","id","staticData","itemId","itemEntity","interfaces","statusClassName","createElement","className","displayProperties","adminMainInfoProperty","Fragment","entitySchema","key","onSelect","propTypes","object","isRequired","func","defaultProps"],"sources":["../../../../../src/components/EntityManager/Entity/SideBarRelations/index.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport uuidv1 from 'uuid/v1';\nimport { useApolloClient } from '@apollo/client';\nimport { getQuery } from '@blaze-cms/admin-ui-utils';\nimport { formFieldTypes } from '@blaze-cms/react-form-builder';\nimport classnames from 'classnames';\nimport { VersionsList } from '@blaze-cms/versioning-ui';\nimport { PUBLISHED, UNPUBLISHED } from '../../../../constants';\nimport CustomSidebarInfoContainer from './container/CustomSidebarInfoContainer';\nimport EntityNavLinks from '../EntitiyNavLinks';\n\nconst SideBarRelations = ({ schema, onChange, formData, entity }) => {\n const { relation: RelationComponent } = formFieldTypes;\n const {\n formattedStatus,\n formattedUpdated,\n formattedCreated,\n formattedPublished,\n status\n } = formData;\n const client = useApolloClient();\n\n const [relationsComponents, setRelationsComponents] = useState(null);\n\n useEffect(\n () => {\n (async () => {\n const fetchRelationSchema = async ({ entityIdentifier }) => {\n if (!entityIdentifier) return null;\n\n const {\n data: {\n getEntitySchemas: [relationSchema]\n }\n } = await client.query({\n query: getQuery('GET_ENTITY_SCHEMA'),\n variables: { identifier: entityIdentifier }\n });\n return relationSchema;\n };\n\n if (!relationsComponents && schema) {\n const allRelationComponents = await Promise.all(\n schema.relations\n .filter(({ showInForm, foreignKey }) => showInForm && schema.properties[foreignKey])\n .map(async relation => ({\n id: uuidv1(),\n staticData: relation,\n schema: await fetchRelationSchema(relation)\n }))\n );\n\n setRelationsComponents(allRelationComponents);\n }\n })();\n },\n [client, relationsComponents, schema, schema.relations]\n );\n const { id: itemId } = entity;\n const { identifier: itemEntity, interfaces } = schema;\n\n const statusClassName = classnames('sidebar__status__badge', {\n 'sidebar__status__badge--published': status === PUBLISHED,\n 'sidebar__status__badge--unpublished': status === UNPUBLISHED\n });\n\n return (\n <div className=\"sidebar\" data-testid=\"sideBarRelations-main-div\">\n <div className=\"sidebar__content\">\n <div className=\"sidebar__status\">\n {formattedCreated && (\n <div className=\"sidebar__top\">\n <div className=\"sidebar__status__wrapper\">\n <b>Status</b>\n <span className={statusClassName}>{formattedStatus}</span>\n </div>\n {formattedStatus === PUBLISHED && (\n <p>\n {formattedStatus} on: <span> {formattedPublished}</span>\n </p>\n )}\n </div>\n )}\n\n {!schema.displayProperties.adminMainInfoProperty && (\n <>\n <p>\n Created: <span>{formattedCreated}</span>\n </p>\n <p>\n Updated: <span>{formattedUpdated}</span>\n </p>\n </>\n )}\n\n <CustomSidebarInfoContainer\n id={itemId}\n schema={schema}\n displayProperties={schema.displayProperties}\n />\n </div>\n\n <VersionsList itemEntity={itemEntity} itemId={itemId} interfaces={interfaces} />\n <EntityNavLinks schema={schema} />\n\n {relationsComponents &&\n relationsComponents.map(({ id, staticData, schema: entitySchema }) => (\n <RelationComponent\n formData={formData}\n schema={entitySchema}\n key={id}\n staticData={staticData}\n onSelect={onChange}\n />\n ))}\n </div>\n </div>\n );\n};\n\nSideBarRelations.propTypes = {\n schema: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n formData: PropTypes.object.isRequired,\n entity: PropTypes.object\n};\n\nSideBarRelations.defaultProps = {\n entity: {}\n};\n\nexport default SideBarRelations;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAClD,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,MAAM,MAAM,SAAS;AAC5B,SAASC,eAAe,QAAQ,gBAAgB;AAChD,SAASC,QAAQ,QAAQ,2BAA2B;AACpD,SAASC,cAAc,QAAQ,+BAA+B;AAC9D,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,SAAS,EAAEC,WAAW,QAAQ,uBAAuB;AAC9D,OAAOC,0BAA0B,MAAM,wCAAwC;AAC/E,OAAOC,cAAc,MAAM,oBAAoB;AAE/C,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,MAAM;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC;AAAO,CAAC,KAAK;EACnE,MAAM;IAAEC,QAAQ,EAAEC;EAAkB,CAAC,GAAGb,cAAc;EACtD,MAAM;IACJc,eAAe;IACfC,gBAAgB;IAChBC,gBAAgB;IAChBC,kBAAkB;IAClBC;EACF,CA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AAO;IACfuC,iBAAiB,EAAEvC,MAAM,CAACuC;EAAkB,CAC7C,CACE,CAAC,eAENtD,KAAA,CAAAoD,aAAA,CAAC3C,YAAY;IAACwC,UAAU,EAAEA,UAAW;IAACD,MAAM,EAAEA,MAAO;IAACE,UAAU,EAAEA;EAAW,CAAE,CAAC,eAChFlD,KAAA,CAAAoD,aAAA,CAACvC,cAAc;IAACE,MAAM,EAAEA;EAAO,CAAE,CAAC,EAEjCY,mBAAmB,IAClBA,mBAAmB,CAACkB,GAAG,CAAC,CAAC;IAAEC,EAAE;IAAEC,UAAU;IAAEhC,MAAM,EAAE0C;EAAa,CAAC,kBAC/DzD,KAAA,CAAAoD,aAAA,CAAChC,iBAAiB;IAChBH,QAAQ,EAAEA,QAAS;IACnBF,MAAM,EAAE0C,YAAa;IACrBC,GAAG,EAAEZ,EAAG;IACRC,UAAU,EAAEA,UAAW;IACvBY,QAAQ,EAAE3C;EAAS,CACpB,CACF,CACA,CACF,CAAC;AAEV,CAAC;AAEDF,gBAAgB,CAAC8C,SAAS,GAAG;EAC3B7C,MAAM,EAAEZ,SAAS,CAAC0D,MAAM,CAACC,UAAU;EACnC9C,QAAQ,EAAEb,SAAS,CAAC4D,IAAI,CAACD,UAAU;EACnC7C,QAAQ,EAAEd,SAAS,CAAC0D,MAAM,CAACC,UAAU;EACrC5C,MAAM,EAAEf,SAAS,CAAC0D;AACpB,CAAC;AAED/C,gBAAgB,CAACkD,YAAY,GAAG;EAC9B9C,MAAM,EAAE,CAAC;AACX,CAAC;AAED,eAAeJ,gBAAgB"}
|
package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
const CustomSidebarInfo = ({
|
|
4
|
+
items,
|
|
5
|
+
customSidebarInfoKey
|
|
6
|
+
}) => {
|
|
7
|
+
if (!items) return null;
|
|
8
|
+
const customSidebarInfoItems = items.map(item => Object.values(item).map(info => {
|
|
9
|
+
if (!info.label || !info.value) return null;
|
|
10
|
+
return /*#__PURE__*/React.createElement("p", null, info.label, ": ", /*#__PURE__*/React.createElement("span", null, info.value));
|
|
11
|
+
}).filter(Boolean));
|
|
12
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: "custom-sidebar-info",
|
|
14
|
+
key: customSidebarInfoKey
|
|
15
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: "custom-sidebar-info--container"
|
|
17
|
+
}, customSidebarInfoItems));
|
|
18
|
+
};
|
|
19
|
+
export default CustomSidebarInfo;
|
|
20
|
+
CustomSidebarInfo.propTypes = {
|
|
21
|
+
customSidebarInfoKey: PropTypes.string.isRequired,
|
|
22
|
+
items: PropTypes.array.isRequired
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=CustomSidebarInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomSidebarInfo.js","names":["PropTypes","React","CustomSidebarInfo","items","customSidebarInfoKey","customSidebarInfoItems","map","item","Object","values","info","label","value","createElement","filter","Boolean","className","key","propTypes","string","isRequired","array"],"sources":["../../../../../../src/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nconst CustomSidebarInfo = ({ items, customSidebarInfoKey }) => {\n if (!items) return null;\n\n const customSidebarInfoItems = items.map(item =>\n Object.values(item)\n .map(info => {\n if (!info.label || !info.value) return null;\n\n return (\n <p>\n {info.label}: <span>{info.value}</span>\n </p>\n );\n })\n .filter(Boolean)\n );\n\n return (\n <div className=\"custom-sidebar-info\" key={customSidebarInfoKey}>\n <div className=\"custom-sidebar-info--container\">{customSidebarInfoItems}</div>\n </div>\n );\n};\n\nexport default CustomSidebarInfo;\n\nCustomSidebarInfo.propTypes = {\n customSidebarInfoKey: PropTypes.string.isRequired,\n items: PropTypes.array.isRequired\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,OAAO;AAEzB,MAAMC,iBAAiB,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAAqB,CAAC,KAAK;EAC7D,IAAI,CAACD,KAAK,EAAE,OAAO,IAAI;EAEvB,MAAME,sBAAsB,GAAGF,KAAK,CAACG,GAAG,CAACC,IAAI,IAC3CC,MAAM,CAACC,MAAM,CAACF,IAAI,CAAC,CAChBD,GAAG,CAACI,IAAI,IAAI;IACX,IAAI,CAACA,IAAI,CAACC,KAAK,IAAI,CAACD,IAAI,CAACE,KAAK,EAAE,OAAO,IAAI;IAE3C,oBACEX,KAAA,CAAAY,aAAA,YACGH,IAAI,CAACC,KAAK,EAAC,IAAE,eAAAV,KAAA,CAAAY,aAAA,eAAOH,IAAI,CAACE,KAAY,CACrC,CAAC;EAER,CAAC,CAAC,CACDE,MAAM,CAACC,OAAO,CACnB,CAAC;EAED,oBACEd,KAAA,CAAAY,aAAA;IAAKG,SAAS,EAAC,qBAAqB;IAACC,GAAG,EAAEb;EAAqB,gBAC7DH,KAAA,CAAAY,aAAA;IAAKG,SAAS,EAAC;EAAgC,GAAEX,sBAA4B,CAC1E,CAAC;AAEV,CAAC;AAED,eAAeH,iBAAiB;AAEhCA,iBAAiB,CAACgB,SAAS,GAAG;EAC5Bd,oBAAoB,EAAEJ,SAAS,CAACmB,MAAM,CAACC,UAAU;EACjDjB,KAAK,EAAEH,SAAS,CAACqB,KAAK,CAACD;AACzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.js","names":["buildUpdatePublishUnpublishMutation","SAVE_BEFORE_PUBLISH_MESSAGE","triggerPublish","entityData","client","setEntityIsPublish","entitySchema","textContent","refetchRecord","addToast","Object","keys","length","appearance","autoDismiss","actionType","toLowerCase","entityIsPublishedSwitch","mutation","id","mutate","error","message"],"sources":["../../../../../../src/components/EntityManager/Entity/actions-handlers/shared/publish.js"],"sourcesContent":["import { buildUpdatePublishUnpublishMutation } from '../../../../../utils';\nimport { SAVE_BEFORE_PUBLISH_MESSAGE } from '../../../../../constants';\n\nconst triggerPublish = async (\n { entityData, client, setEntityIsPublish, entitySchema, textContent = '', refetchRecord },\n addToast\n) => {\n if (!Object.keys(entityData).length) {\n addToast(SAVE_BEFORE_PUBLISH_MESSAGE, {\n appearance: 'info',\n autoDismiss: true\n });\n return;\n }\n const actionType = textContent.toLowerCase();\n const entityIsPublishedSwitch = `${actionType}ed`;\n const mutation = buildUpdatePublishUnpublishMutation(entitySchema, entityData.id, actionType);\n\n try {\n await client.mutate({\n mutation\n });\n addToast(`${textContent}ed`, {\n appearance: 'success',\n autoDismiss: true\n });\n } catch (error) {\n addToast(error.message, {\n appearance: 'error',\n autoDismiss: true\n });\n }\n\n setEntityIsPublish(entityIsPublishedSwitch);\n refetchRecord(true);\n};\n\nexport { triggerPublish };\n"],"mappings":"AAAA,SAASA,mCAAmC,QAAQ,sBAAsB;AAC1E,SAASC,2BAA2B,QAAQ,0BAA0B;AAEtE,MAAMC,cAAc,GAAG,MAAAA,CACrB;EAAEC,UAAU;EAAEC,MAAM;EAAEC,kBAAkB;EAAEC,YAAY;EAAEC,WAAW,GAAG,EAAE;EAAEC;AAAc,CAAC,EACzFC,QAAQ,KACL;EACH,IAAI,CAACC,MAAM,CAACC,IAAI,CAACR,UAAU,CAAC,CAACS,MAAM,EAAE;IACnCH,QAAQ,CAACR,2BAA2B,EAAE;MACpCY,UAAU,EAAE,MAAM;MAClBC,WAAW,EAAE;IACf,CAAC,CAAC;IACF;EACF;EACA,MAAMC,UAAU,GAAGR,WAAW,CAACS,WAAW,
|
|
1
|
+
{"version":3,"file":"publish.js","names":["buildUpdatePublishUnpublishMutation","SAVE_BEFORE_PUBLISH_MESSAGE","triggerPublish","entityData","client","setEntityIsPublish","entitySchema","textContent","refetchRecord","addToast","Object","keys","length","appearance","autoDismiss","actionType","toLowerCase","entityIsPublishedSwitch","mutation","id","mutate","error","message"],"sources":["../../../../../../src/components/EntityManager/Entity/actions-handlers/shared/publish.js"],"sourcesContent":["import { buildUpdatePublishUnpublishMutation } from '../../../../../utils';\nimport { SAVE_BEFORE_PUBLISH_MESSAGE } from '../../../../../constants';\n\nconst triggerPublish = async (\n { entityData, client, setEntityIsPublish, entitySchema, textContent = '', refetchRecord },\n addToast\n) => {\n if (!Object.keys(entityData).length) {\n addToast(SAVE_BEFORE_PUBLISH_MESSAGE, {\n appearance: 'info',\n autoDismiss: true\n });\n return;\n }\n const actionType = textContent.toLowerCase();\n const entityIsPublishedSwitch = `${actionType}ed`;\n const mutation = buildUpdatePublishUnpublishMutation(entitySchema, entityData.id, actionType);\n\n try {\n await client.mutate({\n mutation\n });\n addToast(`${textContent}ed`, {\n appearance: 'success',\n autoDismiss: true\n });\n } catch (error) {\n addToast(error.message, {\n appearance: 'error',\n autoDismiss: true\n });\n }\n\n setEntityIsPublish(entityIsPublishedSwitch);\n refetchRecord(true);\n};\n\nexport { triggerPublish };\n"],"mappings":"AAAA,SAASA,mCAAmC,QAAQ,sBAAsB;AAC1E,SAASC,2BAA2B,QAAQ,0BAA0B;AAEtE,MAAMC,cAAc,GAAG,MAAAA,CACrB;EAAEC,UAAU;EAAEC,MAAM;EAAEC,kBAAkB;EAAEC,YAAY;EAAEC,WAAW,GAAG,EAAE;EAAEC;AAAc,CAAC,EACzFC,QAAQ,KACL;EACH,IAAI,CAACC,MAAM,CAACC,IAAI,CAACR,UAAU,CAAC,CAACS,MAAM,EAAE;IACnCH,QAAQ,CAACR,2BAA2B,EAAE;MACpCY,UAAU,EAAE,MAAM;MAClBC,WAAW,EAAE;IACf,CAAC,CAAC;IACF;EACF;EACA,MAAMC,UAAU,GAAGR,WAAW,CAACS,WAAW,CAAC,CAAC;EAC5C,MAAMC,uBAAuB,GAAI,GAAEF,UAAW,IAAG;EACjD,MAAMG,QAAQ,GAAGlB,mCAAmC,CAACM,YAAY,EAAEH,UAAU,CAACgB,EAAE,EAAEJ,UAAU,CAAC;EAE7F,IAAI;IACF,MAAMX,MAAM,CAACgB,MAAM,CAAC;MAClBF;IACF,CAAC,CAAC;IACFT,QAAQ,CAAE,GAAEF,WAAY,IAAG,EAAE;MAC3BM,UAAU,EAAE,SAAS;MACrBC,WAAW,EAAE;IACf,CAAC,CAAC;EACJ,CAAC,CAAC,OAAOO,KAAK,EAAE;IACdZ,QAAQ,CAACY,KAAK,CAACC,OAAO,EAAE;MACtBT,UAAU,EAAE,OAAO;MACnBC,WAAW,EAAE;IACf,CAAC,CAAC;EACJ;EAEAT,kBAAkB,CAACY,uBAAuB,CAAC;EAC3CT,aAAa,CAAC,IAAI,CAAC;AACrB,CAAC;AAED,SAASN,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit.js","names":["buildUpdateDataQuery","ERROR","SUCCESS","SAVE_BUTTON_TEXTS","submit","entitySchema","entityData","parsedFormValues","client","setIsSaveButtonAvailable","setSaveButtonText","setNewUpdatedDate","newUpdatedDate","handleUpdateFormData","addToast","mutation","saving","data","mutate","variables","input","_objectSpread","id","updated","saved","updatedDate","updateEntity","result","appearance","autoDismiss","error","save","message"],"sources":["../../../../../../src/components/EntityManager/Entity/actions-handlers/update/submit.js"],"sourcesContent":["import buildUpdateDataQuery from '../../../../../utils/build-update-data-query';\nimport { ERROR, SUCCESS, SAVE_BUTTON_TEXTS } from '../../../../../constants';\n\nconst submit = async (\n {\n entitySchema,\n entityData,\n parsedFormValues,\n client,\n setIsSaveButtonAvailable,\n setSaveButtonText,\n setNewUpdatedDate,\n newUpdatedDate,\n handleUpdateFormData\n },\n addToast\n) => {\n const mutation = buildUpdateDataQuery(entitySchema);\n\n try {\n setIsSaveButtonAvailable(false);\n setSaveButtonText(SAVE_BUTTON_TEXTS.saving);\n const { data } = await client.mutate({\n mutation,\n variables: {\n input: {\n id: entityData.id,\n ...parsedFormValues,\n updated: newUpdatedDate || entityData.updated\n }\n }\n });\n setSaveButtonText(SAVE_BUTTON_TEXTS.saved);\n const updatedDate =\n data && data.updateEntity && data.updateEntity.result && data.updateEntity.result.updated;\n\n setNewUpdatedDate(updatedDate);\n\n addToast('Updated', {\n appearance: SUCCESS,\n autoDismiss: true\n });\n handleUpdateFormData();\n return SUCCESS;\n } catch (error) {\n setIsSaveButtonAvailable(true);\n setSaveButtonText(SAVE_BUTTON_TEXTS.save);\n addToast(error.message, {\n appearance: ERROR,\n autoDismiss: true\n });\n return ERROR;\n }\n};\n\nexport { submit };\n"],"mappings":";;;AAAA,OAAOA,oBAAoB,MAAM,8CAA8C;AAC/E,SAASC,KAAK,EAAEC,OAAO,EAAEC,iBAAiB,QAAQ,0BAA0B;AAE5E,MAAMC,MAAM,GAAG,MAAAA,CACb;EACEC,YAAY;EACZC,UAAU;EACVC,gBAAgB;EAChBC,MAAM;EACNC,wBAAwB;EACxBC,iBAAiB;EACjBC,iBAAiB;EACjBC,cAAc;EACdC;AACF,CAAC,EACDC,QAAQ,KACL;EACH,MAAMC,QAAQ,GAAGf,oBAAoB,CAACK,YAAY,CAAC;EAEnD,IAAI;IACFI,wBAAwB,CAAC,KAAK,CAAC;IAC/BC,iBAAiB,CAACP,iBAAiB,CAACa,MAAM,CAAC;IAC3C,MAAM;MAAEC;IAAK,CAAC,GAAG,MAAMT,MAAM,CAACU,MAAM,CAAC;MACnCH,QAAQ;MACRI,SAAS,EAAE;QACTC,KAAK,EAAAC,aAAA,CAAAA,aAAA;UACHC,EAAE,EAAEhB,UAAU,CAACgB;QAAE,GACdf,gBAAgB;UACnBgB,OAAO,EAAEX,cAAc,IAAIN,UAAU,CAACiB;QAAO;MAEjD;IACF,CAAC,CAAC;IACFb,iBAAiB,CAACP,iBAAiB,CAACqB,KAAK,CAAC;IAC1C,MAAMC,WAAW,GACfR,IAAI,IAAIA,IAAI,CAACS,YAAY,IAAIT,IAAI,CAACS,YAAY,CAACC,MAAM,IAAIV,IAAI,CAACS,YAAY,CAACC,MAAM,CAACJ,OAAO;IAE3FZ,iBAAiB,CAACc,WAAW,CAAC;IAE9BX,QAAQ,CAAC,SAAS,EAAE;MAClBc,UAAU,EAAE1B,OAAO;MACnB2B,WAAW,EAAE;IACf,CAAC,CAAC;IACFhB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"submit.js","names":["buildUpdateDataQuery","ERROR","SUCCESS","SAVE_BUTTON_TEXTS","submit","entitySchema","entityData","parsedFormValues","client","setIsSaveButtonAvailable","setSaveButtonText","setNewUpdatedDate","newUpdatedDate","handleUpdateFormData","addToast","mutation","saving","data","mutate","variables","input","_objectSpread","id","updated","saved","updatedDate","updateEntity","result","appearance","autoDismiss","error","save","message"],"sources":["../../../../../../src/components/EntityManager/Entity/actions-handlers/update/submit.js"],"sourcesContent":["import buildUpdateDataQuery from '../../../../../utils/build-update-data-query';\nimport { ERROR, SUCCESS, SAVE_BUTTON_TEXTS } from '../../../../../constants';\n\nconst submit = async (\n {\n entitySchema,\n entityData,\n parsedFormValues,\n client,\n setIsSaveButtonAvailable,\n setSaveButtonText,\n setNewUpdatedDate,\n newUpdatedDate,\n handleUpdateFormData\n },\n addToast\n) => {\n const mutation = buildUpdateDataQuery(entitySchema);\n\n try {\n setIsSaveButtonAvailable(false);\n setSaveButtonText(SAVE_BUTTON_TEXTS.saving);\n const { data } = await client.mutate({\n mutation,\n variables: {\n input: {\n id: entityData.id,\n ...parsedFormValues,\n updated: newUpdatedDate || entityData.updated\n }\n }\n });\n setSaveButtonText(SAVE_BUTTON_TEXTS.saved);\n const updatedDate =\n data && data.updateEntity && data.updateEntity.result && data.updateEntity.result.updated;\n\n setNewUpdatedDate(updatedDate);\n\n addToast('Updated', {\n appearance: SUCCESS,\n autoDismiss: true\n });\n handleUpdateFormData();\n return SUCCESS;\n } catch (error) {\n setIsSaveButtonAvailable(true);\n setSaveButtonText(SAVE_BUTTON_TEXTS.save);\n addToast(error.message, {\n appearance: ERROR,\n autoDismiss: true\n });\n return ERROR;\n }\n};\n\nexport { submit };\n"],"mappings":";;;AAA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ACE,OAAO,EAAE;MACtBJ,UAAU,EAAE3B,KAAK;MACjB4B,WAAW,EAAE;IACf,CAAC,CAAC;IACF,OAAO5B,KAAK;EACd;AACF,CAAC;AAED,SAASG,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityManager.js","names":["React","useEffect","useState","withRouter","useApolloClient","PropTypes","entityAvailableActions","Entity","getAction","EntityManager","match","formData","setFormData","entity","setEntity","schema","setSchema","id","previousQuery","setPreviousQuery","shouldRefetch","setShouldRefetch","client","action","entityIdentifier","onViewUrl","params","entitySchema","data","requestedQuery","identifier","localData","isPageBuilderTemplateSet","pageBuilderComponents","getPageBuilderComponents","_objectSpread","pageBuilder","values","updateFormData","updatedFormData","shouldRefresh","recordHasChanged","createElement","refetchRecord","propTypes","shape","string","func","isRequired","actionName","actions","getAll","pageBuilderData","query","variables","where","fetchPolicy","length","pageBuilderTemplateId","currentEntityIdentifier"],"sources":["../../../src/components/EntityManager/EntityManager.js"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { useApolloClient } from '@apollo/client';\nimport PropTypes from 'prop-types';\nimport entityAvailableActions from './utils/entityAvailableActions';\nimport Entity from './Entity';\nimport { getAction } from './utils/query';\n\nconst EntityManager = ({ match }) => {\n const [formData, setFormData] = useState(null);\n const [entity, setEntity] = useState(null);\n const [schema, setSchema] = useState({ id: null });\n const [previousQuery, setPreviousQuery] = useState(null);\n const [shouldRefetch, setShouldRefetch] = useState(false);\n const client = useApolloClient();\n\n const { action, entityIdentifier, id = null, onViewUrl } = match.params;\n\n useEffect(\n () => {\n (async () => {\n const [entitySchema, data = {}, requestedQuery = {}] = await entityAvailableActions[action](\n {\n client,\n identifier: entityIdentifier,\n id\n }\n );\n let localData = data;\n\n if (isPageBuilderTemplateSet(data)) {\n const pageBuilderComponents = await getPageBuilderComponents({\n entitySchema,\n client,\n id\n });\n\n localData = {\n ...localData,\n pageBuilder: pageBuilderComponents || localData.pageBuilder\n };\n }\n\n setFormData({ values: localData });\n setEntity(data);\n setSchema(entitySchema);\n setPreviousQuery(requestedQuery);\n setShouldRefetch(false);\n })();\n },\n [action, client, entityIdentifier, id, schema, shouldRefetch]\n );\n\n const updateFormData = (updatedFormData, shouldRefresh) => {\n if (shouldRefresh) setShouldRefetch(true);\n setFormData(updatedFormData);\n };\n\n // Reset when entity/record changes\n if (!formData || !schema.id || recordHasChanged(entity, id, schema.id, entityIdentifier)) {\n return null;\n }\n\n return (\n <Entity\n action={match.params.action}\n formData={formData}\n updateFormData={updateFormData}\n entity={entity}\n schema={schema}\n previousQuery={previousQuery}\n onViewUrl={onViewUrl}\n refetchRecord={setShouldRefetch}\n />\n );\n};\n\nEntityManager.propTypes = {\n match: PropTypes.shape({\n params: PropTypes.shape({\n action: PropTypes.string,\n entityIdentifier: PropTypes.string,\n id: PropTypes.string,\n onViewUrl: PropTypes.func\n })\n }).isRequired\n};\n\nexport default withRouter(EntityManager);\n\nasync function getPageBuilderComponents({ entitySchema, client, id }) {\n const actionName = (entitySchema && entitySchema.actions.getAll) || 'get';\n const { data: pageBuilderData = {} } = await client.query({\n query: getAction(actionName, 'pageBuilderComponents'),\n variables: {\n where: {\n id\n }\n },\n fetchPolicy: 'network-only'\n });\n\n return pageBuilderData[actionName] && pageBuilderData[actionName].length\n ? pageBuilderData[actionName][0].pageBuilderComponents\n : null;\n}\n\nfunction isPageBuilderTemplateSet(data) {\n return data && data.pageBuilderTemplateId && data.pageBuilderTemplateId !== '';\n}\n\nfunction recordHasChanged(entity, id, currentEntityIdentifier, entityIdentifier) {\n return (\n (entity && entity.id && entity.id !== id) ||\n (currentEntityIdentifier && currentEntityIdentifier !== entityIdentifier)\n );\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,eAAe,QAAQ,gBAAgB;AAChD,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,sBAAsB,MAAM,gCAAgC;AACnE,OAAOC,MAAM,MAAM,UAAU;AAC7B,SAASC,SAAS,QAAQ,eAAe;AAEzC,MAAMC,aAAa,GAAGA,CAAC;EAAEC;AAAM,CAAC,KAAK;EACnC,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGV,QAAQ,CAAC,IAAI,CAAC;EAC9C,MAAM,CAACW,MAAM,EAAEC,SAAS,CAAC,GAAGZ,QAAQ,CAAC,IAAI,CAAC;EAC1C,MAAM,CAACa,MAAM,EAAEC,SAAS,CAAC,GAAGd,QAAQ,CAAC;IAAEe,EAAE,EAAE;EAAK,CAAC,CAAC;EAClD,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGjB,QAAQ,CAAC,IAAI,CAAC;EACxD,MAAM,CAACkB,aAAa,EAAEC,gBAAgB,CAAC,GAAGnB,QAAQ,CAAC,KAAK,CAAC;EACzD,MAAMoB,MAAM,GAAGlB,eAAe,
|
|
1
|
+
{"version":3,"file":"EntityManager.js","names":["React","useEffect","useState","withRouter","useApolloClient","PropTypes","entityAvailableActions","Entity","getAction","EntityManager","match","formData","setFormData","entity","setEntity","schema","setSchema","id","previousQuery","setPreviousQuery","shouldRefetch","setShouldRefetch","client","action","entityIdentifier","onViewUrl","params","entitySchema","data","requestedQuery","identifier","localData","isPageBuilderTemplateSet","pageBuilderComponents","getPageBuilderComponents","_objectSpread","pageBuilder","values","updateFormData","updatedFormData","shouldRefresh","recordHasChanged","createElement","refetchRecord","propTypes","shape","string","func","isRequired","actionName","actions","getAll","pageBuilderData","query","variables","where","fetchPolicy","length","pageBuilderTemplateId","currentEntityIdentifier"],"sources":["../../../src/components/EntityManager/EntityManager.js"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { useApolloClient } from '@apollo/client';\nimport PropTypes from 'prop-types';\nimport entityAvailableActions from './utils/entityAvailableActions';\nimport Entity from './Entity';\nimport { getAction } from './utils/query';\n\nconst EntityManager = ({ match }) => {\n const [formData, setFormData] = useState(null);\n const [entity, setEntity] = useState(null);\n const [schema, setSchema] = useState({ id: null });\n const [previousQuery, setPreviousQuery] = useState(null);\n const [shouldRefetch, setShouldRefetch] = useState(false);\n const client = useApolloClient();\n\n const { action, entityIdentifier, id = null, onViewUrl } = match.params;\n\n useEffect(\n () => {\n (async () => {\n const [entitySchema, data = {}, requestedQuery = {}] = await entityAvailableActions[action](\n {\n client,\n identifier: entityIdentifier,\n id\n }\n );\n let localData = data;\n\n if (isPageBuilderTemplateSet(data)) {\n const pageBuilderComponents = await getPageBuilderComponents({\n entitySchema,\n client,\n id\n });\n\n localData = {\n ...localData,\n pageBuilder: pageBuilderComponents || localData.pageBuilder\n };\n }\n\n setFormData({ values: localData });\n setEntity(data);\n setSchema(entitySchema);\n setPreviousQuery(requestedQuery);\n setShouldRefetch(false);\n })();\n },\n [action, client, entityIdentifier, id, schema, shouldRefetch]\n );\n\n const updateFormData = (updatedFormData, shouldRefresh) => {\n if (shouldRefresh) setShouldRefetch(true);\n setFormData(updatedFormData);\n };\n\n // Reset when entity/record changes\n if (!formData || !schema.id || recordHasChanged(entity, id, schema.id, entityIdentifier)) {\n return null;\n }\n\n return (\n <Entity\n action={match.params.action}\n formData={formData}\n updateFormData={updateFormData}\n entity={entity}\n schema={schema}\n previousQuery={previousQuery}\n onViewUrl={onViewUrl}\n refetchRecord={setShouldRefetch}\n />\n );\n};\n\nEntityManager.propTypes = {\n match: PropTypes.shape({\n params: PropTypes.shape({\n action: PropTypes.string,\n entityIdentifier: PropTypes.string,\n id: PropTypes.string,\n onViewUrl: PropTypes.func\n })\n }).isRequired\n};\n\nexport default withRouter(EntityManager);\n\nasync function getPageBuilderComponents({ entitySchema, client, id }) {\n const actionName = (entitySchema && entitySchema.actions.getAll) || 'get';\n const { data: pageBuilderData = {} } = await client.query({\n query: getAction(actionName, 'pageBuilderComponents'),\n variables: {\n where: {\n id\n }\n },\n fetchPolicy: 'network-only'\n });\n\n return pageBuilderData[actionName] && pageBuilderData[actionName].length\n ? pageBuilderData[actionName][0].pageBuilderComponents\n : null;\n}\n\nfunction isPageBuilderTemplateSet(data) {\n return data && data.pageBuilderTemplateId && data.pageBuilderTemplateId !== '';\n}\n\nfunction recordHasChanged(entity, id, currentEntityIdentifier, entityIdentifier) {\n return (\n (entity && entity.id && entity.id !== id) ||\n (currentEntityIdentifier && currentEntityIdentifier !== entityIdentifier)\n );\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,eAAe,QAAQ,gBAAgB;AAChD,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,sBAAsB,MAAM,gCAAgC;AACnE,OAAOC,MAAM,MAAM,UAAU;AAC7B,SAASC,SAAS,QAAQ,eAAe;AAEzC,MAAMC,aAAa,GAAGA,CAAC;EAAEC;AAAM,CAAC,KAAK;EACnC,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGV,QAAQ,CAAC,IAAI,CAAC;EAC9C,MAAM,CAACW,MAAM,EAAEC,SAAS,CAAC,GAAGZ,QAAQ,CAAC,IAAI,CAAC;EAC1C,MAAM,CAACa,MAAM,EAAEC,SAAS,CAAC,GAAGd,QAAQ,CAAC;IAAEe,EAAE,EAAE;EAAK,CAAC,CAAC;EAClD,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGjB,QAAQ,CAAC,IAAI,CAAC;EACxD,MAAM,CAACkB,aAAa,EAAEC,gBAAgB,CAAC,GAAGnB,QAAQ,CAAC,KAAK,CAAC;EACzD,MAAMoB,MAAM,GAAGlB,eAAe,CAAC,CAAC;EAEhC,MAAM;IAAEmB,MAAM;IAAEC,gBAAgB;IAAEP,EAAE,GAAG,IAAI;IAAEQ;EAAU,CAAC,GAAGf,KAAK,CAACgB,MAAM;EAEvEzB,SAAS,CACP,MAA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AAI;AACV;AAEA,SAASD,wBAAwBA,CAACJ,IAAI,EAAE;EACtC,OAAOA,IAAI,IAAIA,IAAI,CAAC8B,qBAAqB,IAAI9B,IAAI,CAAC8B,qBAAqB,KAAK,EAAE;AAChF;AAEA,SAASjB,gBAAgBA,CAAC5B,MAAM,EAAEI,EAAE,EAAE0C,uBAAuB,EAAEnC,gBAAgB,EAAE;EAC/E,OACGX,MAAM,IAAIA,MAAM,CAACI,EAAE,IAAIJ,MAAM,CAACI,EAAE,KAAKA,EAAE,IACvC0C,uBAAuB,IAAIA,uBAAuB,KAAKnC,gBAAiB;AAE7E"}
|
|
@@ -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, '_blank');\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,QAAQ,EAAEC,MAAM,EAAEC,MAAM,EAAEC,iBAAiB,EAAE;EAChE,OACER,GAAG,CAACK,QAAQ,EAAEH,YAAY,CAAC,IAC3BI,MAAM,IACNA,MAAM,CAACG,EAAE,IACTF,MAAM,IACNA,MAAM,CAACE,EAAE,IACTD,iBAAiB,KAAKP,gBAAgB;AAE1C;AAEA,SAASS,wBAAwBA,CAACC,iBAAiB,EAAEC,kBAAkB,EAAE;EACvE,IAAI,CAACA,kBAAkB,EAAE,OAAO,IAAI;EACpC,MAAMC,iBAAiB,GAAGF,iBAAiB,CAACG,IAAI,CAAC,CAAC;IAAEL;EAAG,CAAC,KAAKA,EAAE,KAAK,cAAc,CAAC;EACnF,MAAMM,aAAa,GAAGJ,iBAAiB,CAACG,IAAI,CAAC,CAAC;IAAEL;EAAG,CAAC,KAAKA,EAAE,KAAK,UAAU,CAAC;EAE3E,MAAMO,yBAAyB,GAC7BH,iBAAiB,IACjBA,iBAAiB,CAACI,KAAK,IACvBJ,iBAAiB,CAACI,KAAK,KAAKd,oBAAoB;EAClD,MAAMe,qBAAqB,GAAGH,aAAa,IAAIA,aAAa,CAACE,KAAK;EAElE,OAAO,CAAC,EAAE,CAACD,yBAAyB,IAAKA,yBAAyB,IAAIE,qBAAsB,CAAC;AAC/F;AAEA,eAAeC,cAAcA,CAACC,UAAU,EAAE;EACxC,MAAMC,OAAO,GAAG,MAAMD,UAAU,
|
|
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, '_blank');\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,QAAQ,EAAEC,MAAM,EAAEC,MAAM,EAAEC,iBAAiB,EAAE;EAChE,OACER,GAAG,CAACK,QAAQ,EAAEH,YAAY,CAAC,IAC3BI,MAAM,IACNA,MAAM,CAACG,EAAE,IACTF,MAAM,IACNA,MAAM,CAACE,EAAE,IACTD,iBAAiB,KA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AEV;IAAK,EAAE;EAC7E,CAAC,MAAM;IACLN,iBAAiB,CAACoB,IAAI,CAAC;MAAEtB,EAAE;MAAEQ;IAAM,CAAC,CAAC;EACvC;EAEA,IAAIL,kBAAkB,IAAIA,kBAAkB,CAACH,EAAE,EAAE;IAC/C,MAAMuB,uBAAuB,GAAGrB,iBAAiB,CAACiB,SAAS,CACzD,CAAC;MAAEnB,EAAE,EAAEoB;IAAI,CAAC,KAAKA,GAAG,KAAKjB,kBAAkB,CAACH,EAC9C,CAAC;IACD,IAAIuB,uBAAuB,GAAG,CAAC,CAAC,EAAE;MAChCrB,iBAAiB,CAACqB,uBAAuB,CAAC,GAAAF,aAAA,CAAAA,aAAA,KACrCnB,iBAAiB,CAACqB,uBAAuB,CAAC;QAC7Cf,KAAK,EAAEL,kBAAkB,CAACK;MAAK,EAChC;IACH,CAAC,MAAM;MACLN,iBAAiB,CAACoB,IAAI,CAAC;QACrBtB,EAAE,EAAEG,kBAAkB,CAACH,EAAE;QACzBQ,KAAK,EAAEL,kBAAkB,CAACK;MAC5B,CAAC,CAAC;IACJ;EACF;EAEA,OAAON,iBAAiB;AAC1B;AAEA,SAASsB,qBAAqBA,CAAC,GAAGC,IAAI,EAAE;EACtC,OAAOA,IAAI,CAACC,KAAK,CAACC,KAAK,IAAIA,KAAK,CAAC;AACnC;AAEA,SACEhC,WAAW,EACXM,wBAAwB,EACxBS,cAAc,EACdK,oBAAoB,EACpBS,qBAAqB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import InfoBoxContainer from './container/InfoBoxContainer';
|
|
4
|
+
const InfoBoxes = ({
|
|
5
|
+
id,
|
|
6
|
+
schema
|
|
7
|
+
}) => {
|
|
8
|
+
const {
|
|
9
|
+
displayProperties: {
|
|
10
|
+
adminInfoBoxes = []
|
|
11
|
+
}
|
|
12
|
+
} = schema;
|
|
13
|
+
if (adminInfoBoxes.length <= 0) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return adminInfoBoxes.map(infoBox => /*#__PURE__*/React.createElement(InfoBoxContainer, {
|
|
17
|
+
id: id,
|
|
18
|
+
schema: schema,
|
|
19
|
+
key: infoBox.key,
|
|
20
|
+
infoBox: infoBox
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
export default InfoBoxes;
|
|
24
|
+
InfoBoxes.propTypes = {
|
|
25
|
+
id: PropTypes.string.isRequired,
|
|
26
|
+
schema: PropTypes.object.isRequired
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=InfoBoxes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBoxes.js","names":["PropTypes","React","InfoBoxContainer","InfoBoxes","id","schema","displayProperties","adminInfoBoxes","length","map","infoBox","createElement","key","propTypes","string","isRequired","object"],"sources":["../../../src/components/InfoBoxes/InfoBoxes.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport InfoBoxContainer from './container/InfoBoxContainer';\n\nconst InfoBoxes = ({ id, schema }) => {\n const {\n displayProperties: { adminInfoBoxes = [] }\n } = schema;\n\n if (adminInfoBoxes.length <= 0) {\n return null;\n }\n\n return adminInfoBoxes.map(infoBox => (\n <InfoBoxContainer id={id} schema={schema} key={infoBox.key} infoBox={infoBox} />\n ));\n};\n\nexport default InfoBoxes;\n\nInfoBoxes.propTypes = {\n id: PropTypes.string.isRequired,\n schema: PropTypes.object.isRequired\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,gBAAgB,MAAM,8BAA8B;AAE3D,MAAMC,SAAS,GAAGA,CAAC;EAAEC,EAAE;EAAEC;AAAO,CAAC,KAAK;EACpC,MAAM;IACJC,iBAAiB,EAAE;MAAEC,cAAc,GAAG;IAAG;EAC3C,CAAC,GAAGF,MAAM;EAEV,IAAIE,cAAc,CAACC,MAAM,IAAI,CAAC,EAAE;IAC9B,OAAO,IAAI;EACb;EAEA,OAAOD,cAAc,CAACE,GAAG,CAACC,OAAO,iBAC/BT,KAAA,CAAAU,aAAA,CAACT,gBAAgB;IAACE,EAAE,EAAEA,EAAG;IAACC,MAAM,EAAEA,MAAO;IAACO,GAAG,EAAEF,OAAO,CAACE,GAAI;IAACF,OAAO,EAAEA;EAAQ,CAAE,CAChF,CAAC;AACJ,CAAC;AAED,eAAeP,SAAS;AAExBA,SAAS,CAACU,SAAS,GAAG;EACpBT,EAAE,EAAEJ,SAAS,CAACc,MAAM,CAACC,UAAU;EAC/BV,MAAM,EAAEL,SAAS,CAACgB,MAAM,CAACD;AAC3B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import useData from '../hooks/useData';
|
|
4
|
+
import InfoBox from '../presentational/InfoBox';
|
|
5
|
+
const InfoBoxContainer = ({
|
|
6
|
+
id,
|
|
7
|
+
schema,
|
|
8
|
+
infoBox
|
|
9
|
+
}) => {
|
|
10
|
+
const {
|
|
11
|
+
data
|
|
12
|
+
} = useData({
|
|
13
|
+
id,
|
|
14
|
+
schema,
|
|
15
|
+
infoBox
|
|
16
|
+
});
|
|
17
|
+
if (!data || !Object.keys(data) || Object.keys(data).length === 0) return null;
|
|
18
|
+
const items = Object.values(data).flatMap(item => Object.values(item));
|
|
19
|
+
return /*#__PURE__*/React.createElement(InfoBox, {
|
|
20
|
+
items: items,
|
|
21
|
+
infoBoxKey: infoBox.key
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
export default InfoBoxContainer;
|
|
25
|
+
InfoBoxContainer.propTypes = {
|
|
26
|
+
id: PropTypes.string.isRequired,
|
|
27
|
+
infoBox: PropTypes.object.isRequired,
|
|
28
|
+
schema: PropTypes.object.isRequired
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=InfoBoxContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBoxContainer.js","names":["PropTypes","React","useData","InfoBox","InfoBoxContainer","id","schema","infoBox","data","Object","keys","length","items","values","flatMap","item","createElement","infoBoxKey","key","propTypes","string","isRequired","object"],"sources":["../../../../src/components/InfoBoxes/container/InfoBoxContainer.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport useData from '../hooks/useData';\nimport InfoBox from '../presentational/InfoBox';\n\nconst InfoBoxContainer = ({ id, schema, infoBox }) => {\n const { data } = useData({ id, schema, infoBox });\n\n if (!data || !Object.keys(data) || Object.keys(data).length === 0) return null;\n\n const items = Object.values(data).flatMap(item => Object.values(item));\n\n return <InfoBox items={items} infoBoxKey={infoBox.key} />;\n};\n\nexport default InfoBoxContainer;\n\nInfoBoxContainer.propTypes = {\n id: PropTypes.string.isRequired,\n infoBox: PropTypes.object.isRequired,\n schema: PropTypes.object.isRequired\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,kBAAkB;AACtC,OAAOC,OAAO,MAAM,2BAA2B;AAE/C,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,EAAE;EAAEC,MAAM;EAAEC;AAAQ,CAAC,KAAK;EACpD,MAAM;IAAEC;EAAK,CAAC,GAAGN,OAAO,CAAC;IAAEG,EAAE;IAAEC,MAAM;IAAEC;EAAQ,CAAC,CAAC;EAEjD,IAAI,CAACC,IAAI,IAAI,CAACC,MAAM,CAACC,IAAI,CAACF,IAAI,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACF,IAAI,CAAC,CAACG,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;EAE9E,MAAMC,KAAK,GAAGH,MAAM,CAACI,MAAM,CAACL,IAAI,CAAC,CAACM,OAAO,CAACC,IAAI,IAAIN,MAAM,CAACI,MAAM,CAACE,IAAI,CAAC,CAAC;EAEtE,oBAAOd,KAAA,CAAAe,aAAA,CAACb,OAAO;IAACS,KAAK,EAAEA,KAAM;IAACK,UAAU,EAAEV,OAAO,CAACW;EAAI,CAAE,CAAC;AAC3D,CAAC;AAED,eAAed,gBAAgB;AAE/BA,gBAAgB,CAACe,SAAS,GAAG;EAC3Bd,EAAE,EAAEL,SAAS,CAACoB,MAAM,CAACC,UAAU;EAC/Bd,OAAO,EAAEP,SAAS,CAACsB,MAAM,CAACD,UAAU;EACpCf,MAAM,EAAEN,SAAS,CAACsB,MAAM,CAACD;AAC3B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
import { BlazeError } from '@blaze-cms/core-errors';
|
|
3
|
+
export default function buildDynamicQuery({
|
|
4
|
+
id,
|
|
5
|
+
schema,
|
|
6
|
+
infoBox
|
|
7
|
+
}) {
|
|
8
|
+
if (!schema || !schema.actions || !schema.actions.get || !schema.properties) {
|
|
9
|
+
throw new BlazeError('DataEntity query requires get action, properties and fields from entity schema');
|
|
10
|
+
}
|
|
11
|
+
const fields = `${infoBox.property} {
|
|
12
|
+
label
|
|
13
|
+
value
|
|
14
|
+
}`;
|
|
15
|
+
return {
|
|
16
|
+
query: gql`query getInfoBoxData($id: String!){
|
|
17
|
+
${schema.actions.get}( id: $id ) {
|
|
18
|
+
id
|
|
19
|
+
${fields}
|
|
20
|
+
__typename
|
|
21
|
+
}
|
|
22
|
+
}`
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=build-dynamic-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-dynamic-query.js","names":["gql","BlazeError","buildDynamicQuery","id","schema","infoBox","actions","get","properties","fields","property","query"],"sources":["../../../../src/components/InfoBoxes/helpers/build-dynamic-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\n\nexport default function buildDynamicQuery({ id, schema, infoBox }) {\n if (!schema || !schema.actions || !schema.actions.get || !schema.properties) {\n throw new BlazeError(\n 'DataEntity query requires get action, properties and fields from entity schema'\n );\n }\n\n const fields = `${infoBox.property} {\n label\n value\n }`;\n\n return {\n query: gql`query getInfoBoxData($id: String!){\n ${schema.actions.get}( id: $id ) {\n id\n ${fields}\n __typename\n }\n }`\n };\n}\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AAEnD,eAAe,SAASC,iBAAiBA,CAAC;EAAEC,EAAE;EAAEC,MAAM;EAAEC;AAAQ,CAAC,EAAE;EACjE,IAAI,CAACD,MAAM,IAAI,CAACA,MAAM,CAACE,OAAO,IAAI,CAACF,MAAM,CAACE,OAAO,CAACC,GAAG,IAAI,CAACH,MAAM,CAACI,UAAU,EAAE;IAC3E,MAAM,IAAIP,UAAU,CAClB,gFACF,CAAC;EACH;EAEA,MAAMQ,MAAM,GAAI,GAAEJ,OAAO,CAACK,QAAS;AACrC;AACA;AACA,MAAM;EAEJ,OAAO;IACLC,KAAK,EAAEX,GAAI;AACf,MAAMI,MAAM,CAACE,OAAO,CAACC,GAAI;AACzB;AACA,OAAOE,MAAO;AACd;AACA;AACA;EACE,CAAC;AACH"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useQuery, gql } from '@apollo/client';
|
|
2
|
+
import useInfoBoxData from './useInfoBox';
|
|
3
|
+
function useData({
|
|
4
|
+
id,
|
|
5
|
+
schema,
|
|
6
|
+
infoBox
|
|
7
|
+
}) {
|
|
8
|
+
const {
|
|
9
|
+
query
|
|
10
|
+
} = useInfoBoxData({
|
|
11
|
+
id,
|
|
12
|
+
schema,
|
|
13
|
+
infoBox
|
|
14
|
+
});
|
|
15
|
+
const infoBoxQuery = query || gql`
|
|
16
|
+
query {
|
|
17
|
+
__typename
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
const {
|
|
21
|
+
data = {},
|
|
22
|
+
loading,
|
|
23
|
+
error
|
|
24
|
+
} = useQuery(infoBoxQuery, {
|
|
25
|
+
variables: {
|
|
26
|
+
id
|
|
27
|
+
},
|
|
28
|
+
skip: !query
|
|
29
|
+
});
|
|
30
|
+
return {
|
|
31
|
+
data: data.__typename !== 'Query' ? data : null,
|
|
32
|
+
loading,
|
|
33
|
+
error
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export default useData;
|
|
37
|
+
//# sourceMappingURL=useData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useData.js","names":["useQuery","gql","useInfoBoxData","useData","id","schema","infoBox","query","infoBoxQuery","data","loading","error","variables","skip","__typename"],"sources":["../../../../src/components/InfoBoxes/hooks/useData.js"],"sourcesContent":["import { useQuery, gql } from '@apollo/client';\nimport useInfoBoxData from './useInfoBox';\n\nfunction useData({ id, schema, infoBox }) {\n const { query } = useInfoBoxData({ id, schema, infoBox });\n\n const infoBoxQuery =\n query ||\n gql`\n query {\n __typename\n }\n `;\n\n const { data = {}, loading, error } = useQuery(infoBoxQuery, { variables: { id }, skip: !query });\n\n return { data: data.__typename !== 'Query' ? data : null, loading, error };\n}\n\nexport default useData;\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,GAAG,QAAQ,gBAAgB;AAC9C,OAAOC,cAAc,MAAM,cAAc;AAEzC,SAASC,OAAOA,CAAC;EAAEC,EAAE;EAAEC,MAAM;EAAEC;AAAQ,CAAC,EAAE;EACxC,MAAM;IAAEC;EAAM,CAAC,GAAGL,cAAc,CAAC;IAAEE,EAAE;IAAEC,MAAM;IAAEC;EAAQ,CAAC,CAAC;EAEzD,MAAME,YAAY,GAChBD,KAAK,IACLN,GAAI;AACR;AACA;AACA;AACA,KAAK;EAEH,MAAM;IAAEQ,IAAI,GAAG,CAAC,CAAC;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGX,QAAQ,CAACQ,YAAY,EAAE;IAAEI,SAAS,EAAE;MAAER;IAAG,CAAC;IAAES,IAAI,EAAE,CAACN;EAAM,CAAC,CAAC;EAEjG,OAAO;IAAEE,IAAI,EAAEA,IAAI,CAACK,UAAU,KAAK,OAAO,GAAGL,IAAI,GAAG,IAAI;IAAEC,OAAO;IAAEC;EAAM,CAAC;AAC5E;AAEA,eAAeR,OAAO"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import buildDynamicQuery from '../helpers/build-dynamic-query';
|
|
2
|
+
function useInfoBox({
|
|
3
|
+
id,
|
|
4
|
+
schema,
|
|
5
|
+
infoBox
|
|
6
|
+
}) {
|
|
7
|
+
const {
|
|
8
|
+
query
|
|
9
|
+
} = buildDynamicQuery({
|
|
10
|
+
id,
|
|
11
|
+
schema,
|
|
12
|
+
infoBox
|
|
13
|
+
});
|
|
14
|
+
return {
|
|
15
|
+
query: query || null
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export default useInfoBox;
|
|
19
|
+
//# sourceMappingURL=useInfoBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInfoBox.js","names":["buildDynamicQuery","useInfoBox","id","schema","infoBox","query"],"sources":["../../../../src/components/InfoBoxes/hooks/useInfoBox.js"],"sourcesContent":["import buildDynamicQuery from '../helpers/build-dynamic-query';\n\nfunction useInfoBox({ id, schema, infoBox }) {\n const { query } = buildDynamicQuery({\n id,\n schema,\n infoBox\n });\n\n return { query: query || null };\n}\n\nexport default useInfoBox;\n"],"mappings":"AAAA,OAAOA,iBAAiB,MAAM,gCAAgC;AAE9D,SAASC,UAAUA,CAAC;EAAEC,EAAE;EAAEC,MAAM;EAAEC;AAAQ,CAAC,EAAE;EAC3C,MAAM;IAAEC;EAAM,CAAC,GAAGL,iBAAiB,CAAC;IAClCE,EAAE;IACFC,MAAM;IACNC;EACF,CAAC,CAAC;EAEF,OAAO;IAAEC,KAAK,EAAEA,KAAK,IAAI;EAAK,CAAC;AACjC;AAEA,eAAeJ,UAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["InfoBoxes"],"sources":["../../../src/components/InfoBoxes/index.js"],"sourcesContent":["import InfoBoxes from './InfoBoxes';\n\nexport default InfoBoxes;\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,aAAa;AAEnC,eAAeA,SAAS"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
const InfoBox = ({
|
|
4
|
+
items,
|
|
5
|
+
infoBoxKey
|
|
6
|
+
}) => {
|
|
7
|
+
if (!items) return null;
|
|
8
|
+
const infoBoxItems = items.map(item => Object.values(item).map(info => {
|
|
9
|
+
if (!info.label || !info.value) return null;
|
|
10
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11
|
+
className: "info-box--item",
|
|
12
|
+
key: `${infoBoxKey}-${info.label.toLowerCase()}`
|
|
13
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: "info-box--label"
|
|
15
|
+
}, info.label, ": "), /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: "info-box--value"
|
|
17
|
+
}, info.value));
|
|
18
|
+
}).filter(Boolean));
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: "info-box",
|
|
21
|
+
key: infoBoxKey
|
|
22
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: "info-box--container"
|
|
24
|
+
}, infoBoxItems));
|
|
25
|
+
};
|
|
26
|
+
export default InfoBox;
|
|
27
|
+
InfoBox.propTypes = {
|
|
28
|
+
infoBoxKey: PropTypes.string.isRequired,
|
|
29
|
+
items: PropTypes.array.isRequired
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=InfoBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBox.js","names":["PropTypes","React","InfoBox","items","infoBoxKey","infoBoxItems","map","item","Object","values","info","label","value","createElement","className","key","toLowerCase","filter","Boolean","propTypes","string","isRequired","array"],"sources":["../../../../src/components/InfoBoxes/presentational/InfoBox.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nconst InfoBox = ({ items, infoBoxKey }) => {\n if (!items) return null;\n\n const infoBoxItems = items.map(item =>\n Object.values(item)\n .map(info => {\n if (!info.label || !info.value) return null;\n\n return (\n <div className=\"info-box--item\" key={`${infoBoxKey}-${info.label.toLowerCase()}`}>\n <div className=\"info-box--label\">{info.label}: </div>\n <div className=\"info-box--value\">{info.value}</div>\n </div>\n );\n })\n .filter(Boolean)\n );\n\n return (\n <div className=\"info-box\" key={infoBoxKey}>\n <div className=\"info-box--container\">{infoBoxItems}</div>\n </div>\n );\n};\n\nexport default InfoBox;\n\nInfoBox.propTypes = {\n infoBoxKey: PropTypes.string.isRequired,\n items: PropTypes.array.isRequired\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,OAAO;AAEzB,MAAMC,OAAO,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAAW,CAAC,KAAK;EACzC,IAAI,CAACD,KAAK,EAAE,OAAO,IAAI;EAEvB,MAAME,YAAY,GAAGF,KAAK,CAACG,GAAG,CAACC,IAAI,IACjCC,MAAM,CAACC,MAAM,CAACF,IAAI,CAAC,CAChBD,GAAG,CAACI,IAAI,IAAI;IACX,IAAI,CAACA,IAAI,CAACC,KAAK,IAAI,CAACD,IAAI,CAACE,KAAK,EAAE,OAAO,IAAI;IAE3C,oBACEX,KAAA,CAAAY,aAAA;MAAKC,SAAS,EAAC,gBAAgB;MAACC,GAAG,EAAG,GAAEX,UAAW,IAAGM,IAAI,CAACC,KAAK,CAACK,WAAW,CAAC,CAAE;IAAE,gBAC/Ef,KAAA,CAAAY,aAAA;MAAKC,SAAS,EAAC;IAAiB,GAAEJ,IAAI,CAACC,KAAK,EAAC,IAAO,CAAC,eACrDV,KAAA,CAAAY,aAAA;MAAKC,SAAS,EAAC;IAAiB,GAAEJ,IAAI,CAACE,KAAW,CAC/C,CAAC;EAEV,CAAC,CAAC,CACDK,MAAM,CAACC,OAAO,CACnB,CAAC;EAED,oBACEjB,KAAA,CAAAY,aAAA;IAAKC,SAAS,EAAC,UAAU;IAACC,GAAG,EAAEX;EAAW,gBACxCH,KAAA,CAAAY,aAAA;IAAKC,SAAS,EAAC;EAAqB,GAAET,YAAkB,CACrD,CAAC;AAEV,CAAC;AAED,eAAeH,OAAO;AAEtBA,OAAO,CAACiB,SAAS,GAAG;EAClBf,UAAU,EAAEJ,SAAS,CAACoB,MAAM,CAACC,UAAU;EACvClB,KAAK,EAAEH,SAAS,CAACsB,KAAK,CAACD;AACzB,CAAC"}
|
|
@@ -6,7 +6,6 @@ import React, { useEffect, useState, Fragment } from 'react';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { withRouter, Link } from 'react-router-dom';
|
|
8
8
|
import More from '@blaze-react/more';
|
|
9
|
-
import { MainContext, useMainContext } from '@blaze-cms/admin-ui-utils';
|
|
10
9
|
import { PageHeader, DeleteAction } from '@blaze-cms/admin';
|
|
11
10
|
import { useToasts } from '@blaze-react/toaster';
|
|
12
11
|
import ListingTableContent from './ListingTableContent';
|
|
@@ -17,8 +16,7 @@ import { getDefaultQueryParams } from '../../utils/get-default-query-params';
|
|
|
17
16
|
const OVER_SCAN_BUFFER = 10;
|
|
18
17
|
const ListingTable = ({
|
|
19
18
|
match,
|
|
20
|
-
entitySchema
|
|
21
|
-
selectedMenuItem
|
|
19
|
+
entitySchema
|
|
22
20
|
}) => {
|
|
23
21
|
const [tableData, setTableData] = useState({});
|
|
24
22
|
const [modalStatus, setModalStatus] = useState(false);
|
|
@@ -32,10 +30,6 @@ const ListingTable = ({
|
|
|
32
30
|
schema: entitySchema
|
|
33
31
|
});
|
|
34
32
|
const [queryParams, setQueryParams] = useState(queryParamsDefault);
|
|
35
|
-
const {
|
|
36
|
-
menuItems,
|
|
37
|
-
setMenuItems
|
|
38
|
-
} = useMainContext(MainContext);
|
|
39
33
|
const client = useApolloClient();
|
|
40
34
|
const {
|
|
41
35
|
addToast
|
|
@@ -65,20 +59,7 @@ const ListingTable = ({
|
|
|
65
59
|
}, [client, entitySchema, match.url, previousSchema.id, queryParams] // eslint-disable-line react-hooks/exhaustive-deps
|
|
66
60
|
);
|
|
67
61
|
|
|
68
|
-
const onCloseCardPrompt = () =>
|
|
69
|
-
const updatedSelectedMenuItem = _objectSpread(_objectSpread({}, selectedMenuItem), {}, {
|
|
70
|
-
isDisplayedPrompt: false
|
|
71
|
-
});
|
|
72
|
-
const [{
|
|
73
|
-
header,
|
|
74
|
-
items
|
|
75
|
-
}] = menuItems;
|
|
76
|
-
const updatedItems = items.map(item => item.name === selectedMenuItem.name ? updatedSelectedMenuItem : item);
|
|
77
|
-
setMenuItems([{
|
|
78
|
-
header,
|
|
79
|
-
items: updatedItems
|
|
80
|
-
}]);
|
|
81
|
-
};
|
|
62
|
+
const onCloseCardPrompt = () => null;
|
|
82
63
|
const toggleModal = item => {
|
|
83
64
|
setModalStatus(!!item);
|
|
84
65
|
setItemToDelete(item || {});
|
|
@@ -173,7 +154,7 @@ const ListingTable = ({
|
|
|
173
154
|
}), /*#__PURE__*/React.createElement(PageHeader, {
|
|
174
155
|
title: entitySchema.displayName,
|
|
175
156
|
subtitle: ""
|
|
176
|
-
},
|
|
157
|
+
}, !!tableData.rows.length && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Link, {
|
|
177
158
|
"data-testid": "addEntity",
|
|
178
159
|
className: "button button--small",
|
|
179
160
|
to: `${match.url}/create`
|
|
@@ -189,14 +170,12 @@ const ListingTable = ({
|
|
|
189
170
|
onRenderItems: handleRenderedItems,
|
|
190
171
|
tableData: tableData,
|
|
191
172
|
onCloseCardPrompt: onCloseCardPrompt,
|
|
192
|
-
selectedMenuItem: selectedMenuItem,
|
|
193
173
|
scrollToIndex: scrollToIndex
|
|
194
174
|
}));
|
|
195
175
|
};
|
|
196
176
|
ListingTable.propTypes = {
|
|
197
177
|
entitySchema: PropTypes.object.isRequired,
|
|
198
|
-
match: PropTypes.object.isRequired
|
|
199
|
-
selectedMenuItem: PropTypes.object.isRequired
|
|
178
|
+
match: PropTypes.object.isRequired
|
|
200
179
|
};
|
|
201
180
|
export default withRouter(ListingTable);
|
|
202
181
|
//# sourceMappingURL=ListingTable.js.map
|