@blaze-cms/plugin-data-ui 0.129.0-project-admin-customisations.0 → 0.129.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -11
- package/README.md +0 -42
- package/lib/components/EntityDataListing/EntityDataListing.js +24 -3
- package/lib/components/EntityDataListing/EntityDataListing.js.map +1 -1
- package/lib/components/EntityManager/Entity/Entity.js +18 -29
- package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/index.js +6 -12
- package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
- package/lib/components/ListingTable/ListingTable.js +26 -5
- package/lib/components/ListingTable/ListingTable.js.map +1 -1
- package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js +12 -5
- package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
- package/lib/index.js +11 -3
- package/lib/index.js.map +1 -1
- package/lib/utils/add-content-menu-items.js +13 -64
- package/lib/utils/add-content-menu-items.js.map +1 -1
- package/lib-es/components/EntityDataListing/EntityDataListing.js +14 -3
- package/lib-es/components/EntityDataListing/EntityDataListing.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/Entity.js +18 -29
- package/lib-es/components/EntityManager/Entity/Entity.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js +7 -13
- package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTable.js +25 -4
- package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js +13 -6
- package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
- package/lib-es/index.js +9 -1
- package/lib-es/index.js.map +1 -1
- package/lib-es/utils/add-content-menu-items.js +5 -49
- package/lib-es/utils/add-content-menu-items.js.map +1 -1
- package/package.json +9 -10
- package/src/components/EntityDataListing/EntityDataListing.js +12 -3
- package/src/components/EntityManager/Entity/Entity.js +59 -65
- package/src/components/EntityManager/Entity/SideBarRelations/index.js +9 -23
- package/src/components/ListingTable/ListingTable.js +18 -4
- package/src/components/ListingTable/ListingTableContent/ListingTableContent.js +16 -5
- package/src/index.js +8 -1
- package/src/utils/add-content-menu-items.js +3 -45
- package/lib/components/InfoBoxes/InfoBoxes.js +0 -36
- package/lib/components/InfoBoxes/InfoBoxes.js.map +0 -1
- package/lib/components/InfoBoxes/container/InfoBoxContainer.js +0 -44
- package/lib/components/InfoBoxes/container/InfoBoxContainer.js.map +0 -1
- package/lib/components/InfoBoxes/helpers/build-dynamic-query.js +0 -25
- package/lib/components/InfoBoxes/helpers/build-dynamic-query.js.map +0 -1
- package/lib/components/InfoBoxes/hooks/useData.js +0 -42
- package/lib/components/InfoBoxes/hooks/useData.js.map +0 -1
- package/lib/components/InfoBoxes/hooks/useInfoBox.js +0 -26
- package/lib/components/InfoBoxes/hooks/useInfoBox.js.map +0 -1
- package/lib/components/InfoBoxes/index.js +0 -12
- package/lib/components/InfoBoxes/index.js.map +0 -1
- package/lib/components/InfoBoxes/presentational/InfoBox.js +0 -46
- package/lib/components/InfoBoxes/presentational/InfoBox.js.map +0 -1
- package/lib-es/components/InfoBoxes/InfoBoxes.js +0 -28
- package/lib-es/components/InfoBoxes/InfoBoxes.js.map +0 -1
- package/lib-es/components/InfoBoxes/container/InfoBoxContainer.js +0 -30
- package/lib-es/components/InfoBoxes/container/InfoBoxContainer.js.map +0 -1
- package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js +0 -25
- package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js.map +0 -1
- package/lib-es/components/InfoBoxes/hooks/useData.js +0 -37
- package/lib-es/components/InfoBoxes/hooks/useData.js.map +0 -1
- package/lib-es/components/InfoBoxes/hooks/useInfoBox.js +0 -19
- package/lib-es/components/InfoBoxes/hooks/useInfoBox.js.map +0 -1
- package/lib-es/components/InfoBoxes/index.js +0 -3
- package/lib-es/components/InfoBoxes/index.js.map +0 -1
- package/lib-es/components/InfoBoxes/presentational/InfoBox.js +0 -31
- package/lib-es/components/InfoBoxes/presentational/InfoBox.js.map +0 -1
- package/src/components/InfoBoxes/InfoBoxes.js +0 -24
- package/src/components/InfoBoxes/container/InfoBoxContainer.js +0 -22
- package/src/components/InfoBoxes/helpers/build-dynamic-query.js +0 -25
- package/src/components/InfoBoxes/hooks/useData.js +0 -20
- package/src/components/InfoBoxes/hooks/useInfoBox.js +0 -13
- package/src/components/InfoBoxes/index.js +0 -3
- package/src/components/InfoBoxes/presentational/InfoBox.js +0 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-content-menu-items.js","names":["getQuery","MENU_PERMISSIONS","require","getAddContentMenuItems","app","
|
|
1
|
+
{"version":3,"file":"add-content-menu-items.js","names":["getQuery","MENU_PERMISSIONS","require","getAddContentMenuItems","app","sectionKey","addItem","client","getClient","data","getEntitySchemas","query","variables","canDoActions","forEach","id","displayName","name","uri"],"sources":["../../src/utils/add-content-menu-items.js"],"sourcesContent":["import { getQuery } from '@blaze-cms/admin-ui-utils';\n\nconst { MENU_PERMISSIONS } = require('../constants');\n\nfunction getAddContentMenuItems(app, sectionKey) {\n return async addItem => {\n const client = app.getClient();\n const {\n data: { getEntitySchemas }\n } = await client.query({\n query: getQuery('GET_USER_EDITABLE_ENTITIES'),\n variables: {\n // only return entities that the current user can do the following actions on\n canDoActions: MENU_PERMISSIONS\n }\n });\n getEntitySchemas.forEach(({ id, displayName }) => {\n addItem({ name: displayName, uri: `/data-listing/${id}` }, sectionKey);\n });\n };\n}\n\nexport default getAddContentMenuItems;\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,2BAA2B;AAEpD,MAAM;EAAEC;AAAiB,CAAC,GAAGC,OAAO,CAAC,cAAc,CAAC;AAEpD,SAASC,sBAAsBA,CAACC,GAAG,EAAEC,UAAU,EAAE;EAC/C,OAAO,MAAMC,OAAO,IAAI;IACtB,MAAMC,MAAM,GAAGH,GAAG,CAACI,SAAS,CAAC,CAAC;IAC9B,MAAM;MACJC,IAAI,EAAE;QAAEC;MAAiB;IAC3B,CAAC,GAAG,MAAMH,MAAM,CAACI,KAAK,CAAC;MACrBA,KAAK,EAAEX,QAAQ,CAAC,4BAA4B,CAAC;MAC7CY,SAAS,EAAE;QACT;QACAC,YAAY,EAAEZ;MAChB;IACF,CAAC,CAAC;IACFS,gBAAgB,CAACI,OAAO,CAAC,CAAC;MAAEC,EAAE;MAAEC;IAAY,CAAC,KAAK;MAChDV,OAAO,CAAC;QAAEW,IAAI,EAAED,WAAW;QAAEE,GAAG,EAAG,iBAAgBH,EAAG;MAAE,CAAC,EAAEV,UAAU,CAAC;IACxE,CAAC,CAAC;EACJ,CAAC;AACH;AAEA,eAAeF,sBAAsB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blaze-cms/plugin-data-ui",
|
|
3
|
-
"version": "0.129.0
|
|
3
|
+
"version": "0.129.0",
|
|
4
4
|
"description": "Blaze plugin data ui",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-es/index.js",
|
|
@@ -27,13 +27,12 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "GPL-3.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@blaze-cms/admin-ui-utils": "0.129.0
|
|
31
|
-
"@blaze-cms/core-errors": "0.
|
|
32
|
-
"@blaze-cms/
|
|
33
|
-
"@blaze-cms/react-
|
|
34
|
-
"@blaze-cms/
|
|
35
|
-
"@blaze-cms/
|
|
36
|
-
"@blaze-cms/versioning-ui": "0.129.0-project-admin-customisations.0",
|
|
30
|
+
"@blaze-cms/admin-ui-utils": "^0.129.0",
|
|
31
|
+
"@blaze-cms/core-errors": "^0.127.0",
|
|
32
|
+
"@blaze-cms/react-form-builder": "^0.129.0",
|
|
33
|
+
"@blaze-cms/react-page-builder": "^0.129.0",
|
|
34
|
+
"@blaze-cms/setup-ui": "^0.128.1",
|
|
35
|
+
"@blaze-cms/versioning-ui": "^0.128.1",
|
|
37
36
|
"@blaze-react/button": "0.5.19",
|
|
38
37
|
"@blaze-react/more": "0.5.19",
|
|
39
38
|
"@blaze-react/multiselect": "0.6.6",
|
|
@@ -54,7 +53,7 @@
|
|
|
54
53
|
"uuid": "^3.3.3"
|
|
55
54
|
},
|
|
56
55
|
"devDependencies": {
|
|
57
|
-
"@blaze-cms/core-ui": "0.129.0
|
|
56
|
+
"@blaze-cms/core-ui": "^0.129.0"
|
|
58
57
|
},
|
|
59
58
|
"peerDependencies": {
|
|
60
59
|
"@apollo/client": "3.x",
|
|
@@ -66,5 +65,5 @@
|
|
|
66
65
|
"lib/*",
|
|
67
66
|
"lib-es/*"
|
|
68
67
|
],
|
|
69
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "43e8a5d929313c50f8edb27358da7278299ce6c6"
|
|
70
69
|
}
|
|
@@ -6,22 +6,31 @@ import { getQuery } from '@blaze-cms/admin-ui-utils';
|
|
|
6
6
|
import ListingTable from '../ListingTable/ListingTable';
|
|
7
7
|
import { withContext } from '../../utils/hoc/withContext';
|
|
8
8
|
|
|
9
|
-
const EntityDataListing = ({ match }) => {
|
|
9
|
+
const EntityDataListing = ({ match, menuItems }) => {
|
|
10
10
|
const {
|
|
11
11
|
params: { entityIdentifier: identifier }
|
|
12
12
|
} = match;
|
|
13
13
|
|
|
14
|
+
const [[selectedMenuItem]] = menuItems
|
|
15
|
+
.map(([_, { items }]) => {
|
|
16
|
+
const item = items.filter(({ uri }) => uri.endsWith(`/${identifier}`));
|
|
17
|
+
|
|
18
|
+
return item.length ? item : null;
|
|
19
|
+
})
|
|
20
|
+
.filter(Boolean);
|
|
21
|
+
|
|
14
22
|
const { data: { getEntitySchemas = [] } = {} } = useQuery(getQuery('GET_ENTITY_SCHEMA'), {
|
|
15
23
|
variables: { identifier }
|
|
16
24
|
});
|
|
17
25
|
|
|
18
26
|
if (!getEntitySchemas.length) return '';
|
|
19
27
|
|
|
20
|
-
return <ListingTable entitySchema={getEntitySchemas[0]} />;
|
|
28
|
+
return <ListingTable entitySchema={getEntitySchemas[0]} selectedMenuItem={selectedMenuItem} />;
|
|
21
29
|
};
|
|
22
30
|
|
|
23
31
|
EntityDataListing.propTypes = {
|
|
24
|
-
match: PropTypes.object.isRequired
|
|
32
|
+
match: PropTypes.object.isRequired,
|
|
33
|
+
menuItems: PropTypes.array.isRequired
|
|
25
34
|
};
|
|
26
35
|
|
|
27
36
|
export default withContext(EntityDataListing);
|
|
@@ -3,7 +3,6 @@ import React, { useEffect, useState, useRef } from 'react';
|
|
|
3
3
|
import { withRouter, Prompt } from 'react-router-dom';
|
|
4
4
|
import { useApolloClient } from '@apollo/client';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { RenderHook } from '@blaze-cms/plugin-render-hooks-ui';
|
|
7
6
|
import { getQuery, GET_CURRENT_TAB_ID } from '@blaze-cms/admin-ui-utils';
|
|
8
7
|
import { FormBuilder, parseFormValues } from '@blaze-cms/react-form-builder';
|
|
9
8
|
import { DeleteAction, CopyDataFromAction } from '@blaze-cms/admin';
|
|
@@ -35,7 +34,6 @@ import {
|
|
|
35
34
|
checkFulfilConditions
|
|
36
35
|
} from '../utils/entity';
|
|
37
36
|
import useToggle from '../../../utils/hooks/useToggle';
|
|
38
|
-
import InfoBoxes from '../../InfoBoxes/InfoBoxes';
|
|
39
37
|
|
|
40
38
|
const Entity = ({
|
|
41
39
|
formData,
|
|
@@ -405,72 +403,68 @@ const Entity = ({
|
|
|
405
403
|
|
|
406
404
|
return (
|
|
407
405
|
<div className="page">
|
|
408
|
-
<
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
<div className="
|
|
425
|
-
<div className="
|
|
426
|
-
<
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
/>
|
|
467
|
-
</Tabs>
|
|
468
|
-
</div>
|
|
406
|
+
<Prompt when={hasToDisplayPrompt} message={LEAVE_PAGE_MESSAGE} />
|
|
407
|
+
{showModal && (
|
|
408
|
+
<DeleteAction
|
|
409
|
+
onClose={setModalStatus}
|
|
410
|
+
deleteAction={onDelete}
|
|
411
|
+
itemName={formData.values.name}
|
|
412
|
+
/>
|
|
413
|
+
)}
|
|
414
|
+
{copyModalStatus && (
|
|
415
|
+
<CopyDataFromAction
|
|
416
|
+
onClose={handleCopyDataFromClose}
|
|
417
|
+
copyAction={onCopy}
|
|
418
|
+
getFormData={getFormData}
|
|
419
|
+
/>
|
|
420
|
+
)}
|
|
421
|
+
|
|
422
|
+
<div className="row row--display-row">
|
|
423
|
+
<div className="column column--three-quarters">
|
|
424
|
+
<EntityHeader
|
|
425
|
+
entityData={entityData}
|
|
426
|
+
entityIdentifier={entityIdentifier}
|
|
427
|
+
pageTitle={pageTitle}
|
|
428
|
+
pageName={pageName}
|
|
429
|
+
onSubmit={onSubmit}
|
|
430
|
+
handlePublishAndUnpublish={handlePublishAndUnpublish}
|
|
431
|
+
isSaveButtonAvailable={isSaveButtonAvailable}
|
|
432
|
+
isEnablePublishButton={isEnablePublishButton}
|
|
433
|
+
isEnablePreviewButton={isEnablePreviewButton}
|
|
434
|
+
toggleCopyModal={setCopyModalStatus}
|
|
435
|
+
toggleModal={setModalStatus}
|
|
436
|
+
formData={formData}
|
|
437
|
+
onViewUrl={onViewUrlHandler}
|
|
438
|
+
saveButtonText={saveButtonText}
|
|
439
|
+
/>
|
|
440
|
+
|
|
441
|
+
<div className="page__content">
|
|
442
|
+
<div className="content">
|
|
443
|
+
<Tabs
|
|
444
|
+
enabled={showPageBuilderTabs}
|
|
445
|
+
onTabChange={tabId => {
|
|
446
|
+
client.writeQuery({
|
|
447
|
+
query: GET_CURRENT_TAB_ID,
|
|
448
|
+
data: { currentTabId: tabId }
|
|
449
|
+
});
|
|
450
|
+
setCurrentTabId(tabId);
|
|
451
|
+
}}>
|
|
452
|
+
<FormBuilder
|
|
453
|
+
getIsFormValid={setIsFormValid}
|
|
454
|
+
getFormValues={getFormValues}
|
|
455
|
+
schema={schema}
|
|
456
|
+
data={clonedFormData}
|
|
457
|
+
onChange={onChangeFormValues}
|
|
458
|
+
shouldCopyData={shouldCopyData}
|
|
459
|
+
updateCopyData={updateCopyData}
|
|
460
|
+
formValues={formValues}
|
|
461
|
+
isNewEntity={isNewEntity}
|
|
462
|
+
/>
|
|
463
|
+
</Tabs>
|
|
469
464
|
</div>
|
|
470
465
|
</div>
|
|
471
466
|
</div>
|
|
472
|
-
|
|
473
|
-
<div className="column column--one-third page-sidebar">
|
|
467
|
+
<div className="column column--one-third">
|
|
474
468
|
{showSideBarRelations && (
|
|
475
469
|
<SideBarRelations
|
|
476
470
|
entity={entity}
|
|
@@ -4,21 +4,16 @@ import uuidv1 from 'uuid/v1';
|
|
|
4
4
|
import { useApolloClient } from '@apollo/client';
|
|
5
5
|
import { getQuery } from '@blaze-cms/admin-ui-utils';
|
|
6
6
|
import { formFieldTypes } from '@blaze-cms/react-form-builder';
|
|
7
|
-
import
|
|
7
|
+
import Badge from '@blaze-react/badge';
|
|
8
8
|
import { VersionsList } from '@blaze-cms/versioning-ui';
|
|
9
|
-
import { PUBLISHED
|
|
9
|
+
import { PUBLISHED } from '../../../../constants';
|
|
10
10
|
|
|
11
11
|
const SideBarRelations = ({ schema, onChange, formData, entity }) => {
|
|
12
12
|
const { relation: RelationComponent } = formFieldTypes;
|
|
13
|
-
const {
|
|
14
|
-
formattedStatus,
|
|
15
|
-
formattedUpdated,
|
|
16
|
-
formattedCreated,
|
|
17
|
-
formattedPublished,
|
|
18
|
-
status
|
|
19
|
-
} = formData;
|
|
13
|
+
const { formattedStatus, formattedUpdated, formattedCreated, formattedPublished } = formData;
|
|
20
14
|
const client = useApolloClient();
|
|
21
15
|
const [relationsComponents, setRelationsComponents] = useState(null);
|
|
16
|
+
|
|
22
17
|
useEffect(
|
|
23
18
|
() => {
|
|
24
19
|
(async () => {
|
|
@@ -56,26 +51,17 @@ const SideBarRelations = ({ schema, onChange, formData, entity }) => {
|
|
|
56
51
|
const { id: itemId } = entity;
|
|
57
52
|
const { identifier: itemEntity, interfaces } = schema;
|
|
58
53
|
|
|
59
|
-
const statusClassName = classnames('sidebar__status__badge', {
|
|
60
|
-
'sidebar__status__badge--published': status === PUBLISHED,
|
|
61
|
-
'sidebar__status__badge--unpublished': status === UNPUBLISHED
|
|
62
|
-
});
|
|
63
|
-
|
|
64
54
|
return (
|
|
65
55
|
<div className="sidebar" data-testid="sideBarRelations-main-div">
|
|
66
56
|
<div className="sidebar__content">
|
|
67
57
|
{formattedCreated && (
|
|
68
58
|
<div className="sidebar__status">
|
|
69
|
-
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<p>
|
|
75
|
-
{formattedStatus} on: <span> {formattedPublished}</span>
|
|
76
|
-
</p>
|
|
59
|
+
{formattedStatus && (
|
|
60
|
+
<Badge type="status" modifiers={formattedStatus}>
|
|
61
|
+
{formattedStatus}
|
|
62
|
+
{formattedStatus === PUBLISHED && `: ${formattedPublished}`}
|
|
63
|
+
</Badge>
|
|
77
64
|
)}
|
|
78
|
-
|
|
79
65
|
<p>
|
|
80
66
|
Created: <span>{formattedCreated}</span>
|
|
81
67
|
</p>
|
|
@@ -3,6 +3,7 @@ import React, { useEffect, useState, Fragment } from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { withRouter, Link } from 'react-router-dom';
|
|
5
5
|
import More from '@blaze-react/more';
|
|
6
|
+
import { MainContext, useMainContext } from '@blaze-cms/admin-ui-utils';
|
|
6
7
|
import { PageHeader, DeleteAction } from '@blaze-cms/admin';
|
|
7
8
|
import { useToasts } from '@blaze-react/toaster';
|
|
8
9
|
import ListingTableContent from './ListingTableContent';
|
|
@@ -13,7 +14,7 @@ import { getDefaultQueryParams } from '../../utils/get-default-query-params';
|
|
|
13
14
|
|
|
14
15
|
const OVER_SCAN_BUFFER = 10;
|
|
15
16
|
|
|
16
|
-
const ListingTable = ({ match, entitySchema }) => {
|
|
17
|
+
const ListingTable = ({ match, entitySchema, selectedMenuItem }) => {
|
|
17
18
|
const [tableData, setTableData] = useState({});
|
|
18
19
|
const [modalStatus, setModalStatus] = useState(false);
|
|
19
20
|
const [itemToDelete, setItemToDelete] = useState({});
|
|
@@ -22,6 +23,7 @@ const ListingTable = ({ match, entitySchema }) => {
|
|
|
22
23
|
const [verifiedRanges, setVerifiedRanges] = useState([]);
|
|
23
24
|
const queryParamsDefault = getDefaultQueryParams({ schema: entitySchema });
|
|
24
25
|
const [queryParams, setQueryParams] = useState(queryParamsDefault);
|
|
26
|
+
const { menuItems, setMenuItems } = useMainContext(MainContext);
|
|
25
27
|
const client = useApolloClient();
|
|
26
28
|
const { addToast } = useToasts();
|
|
27
29
|
|
|
@@ -53,7 +55,17 @@ const ListingTable = ({ match, entitySchema }) => {
|
|
|
53
55
|
[client, entitySchema, match.url, previousSchema.id, queryParams] // eslint-disable-line react-hooks/exhaustive-deps
|
|
54
56
|
);
|
|
55
57
|
|
|
56
|
-
const onCloseCardPrompt = () =>
|
|
58
|
+
const onCloseCardPrompt = () => {
|
|
59
|
+
const updatedSelectedMenuItem = {
|
|
60
|
+
...selectedMenuItem,
|
|
61
|
+
isDisplayedPrompt: false
|
|
62
|
+
};
|
|
63
|
+
const [{ header, items }] = menuItems;
|
|
64
|
+
const updatedItems = items.map(
|
|
65
|
+
item => (item.name === selectedMenuItem.name ? updatedSelectedMenuItem : item)
|
|
66
|
+
);
|
|
67
|
+
setMenuItems([{ header, items: updatedItems }]);
|
|
68
|
+
};
|
|
57
69
|
|
|
58
70
|
const toggleModal = item => {
|
|
59
71
|
setModalStatus(!!item);
|
|
@@ -150,7 +162,7 @@ const ListingTable = ({ match, entitySchema }) => {
|
|
|
150
162
|
/>
|
|
151
163
|
)}
|
|
152
164
|
<PageHeader title={entitySchema.displayName} subtitle="">
|
|
153
|
-
{!!tableData.rows.length && (
|
|
165
|
+
{(!selectedMenuItem.isDisplayedPrompt || !!tableData.rows.length) && (
|
|
154
166
|
<Fragment>
|
|
155
167
|
<Link
|
|
156
168
|
data-testid="addEntity"
|
|
@@ -175,6 +187,7 @@ const ListingTable = ({ match, entitySchema }) => {
|
|
|
175
187
|
onRenderItems={handleRenderedItems}
|
|
176
188
|
tableData={tableData}
|
|
177
189
|
onCloseCardPrompt={onCloseCardPrompt}
|
|
190
|
+
selectedMenuItem={selectedMenuItem}
|
|
178
191
|
scrollToIndex={scrollToIndex}
|
|
179
192
|
/>
|
|
180
193
|
</div>
|
|
@@ -182,7 +195,8 @@ const ListingTable = ({ match, entitySchema }) => {
|
|
|
182
195
|
};
|
|
183
196
|
ListingTable.propTypes = {
|
|
184
197
|
entitySchema: PropTypes.object.isRequired,
|
|
185
|
-
match: PropTypes.object.isRequired
|
|
198
|
+
match: PropTypes.object.isRequired,
|
|
199
|
+
selectedMenuItem: PropTypes.object.isRequired
|
|
186
200
|
};
|
|
187
201
|
|
|
188
202
|
export default withRouter(ListingTable);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Table from '@blaze-react/table';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import {
|
|
4
|
+
import { CardPrompt } from '@blaze-cms/admin';
|
|
5
|
+
import { Link, withRouter } from 'react-router-dom';
|
|
5
6
|
|
|
6
7
|
const ListingTableContent = ({
|
|
7
8
|
tableData,
|
|
@@ -19,7 +20,7 @@ const ListingTableContent = ({
|
|
|
19
20
|
|
|
20
21
|
return (
|
|
21
22
|
<>
|
|
22
|
-
{displayTable
|
|
23
|
+
{displayTable ? (
|
|
23
24
|
<>
|
|
24
25
|
<div className="page__content">
|
|
25
26
|
<Table
|
|
@@ -35,6 +36,17 @@ const ListingTableContent = ({
|
|
|
35
36
|
/>
|
|
36
37
|
</div>
|
|
37
38
|
</>
|
|
39
|
+
) : (
|
|
40
|
+
selectedMenuItem.isDisplayedPrompt && (
|
|
41
|
+
<CardPrompt onClose={onCloseCardPrompt} data-testid="card-prompt">
|
|
42
|
+
<Link
|
|
43
|
+
className="button button--rounded button--cta"
|
|
44
|
+
to={`${match.url}/create`}
|
|
45
|
+
data-testid="add-button">
|
|
46
|
+
Add
|
|
47
|
+
</Link>
|
|
48
|
+
</CardPrompt>
|
|
49
|
+
)
|
|
38
50
|
)}
|
|
39
51
|
</>
|
|
40
52
|
);
|
|
@@ -43,7 +55,7 @@ const ListingTableContent = ({
|
|
|
43
55
|
ListingTableContent.propTypes = {
|
|
44
56
|
tableData: PropTypes.object.isRequired,
|
|
45
57
|
onCloseCardPrompt: PropTypes.func.isRequired,
|
|
46
|
-
selectedMenuItem: PropTypes.object,
|
|
58
|
+
selectedMenuItem: PropTypes.object.isRequired,
|
|
47
59
|
match: PropTypes.shape({
|
|
48
60
|
url: PropTypes.string
|
|
49
61
|
}).isRequired,
|
|
@@ -61,8 +73,7 @@ ListingTableContent.defaultProps = {
|
|
|
61
73
|
onClickRow: () => {},
|
|
62
74
|
overScanBuffer: 0,
|
|
63
75
|
scrollToIndex: 0,
|
|
64
|
-
onRenderItems: () => {}
|
|
65
|
-
selectedMenuItem: null
|
|
76
|
+
onRenderItems: () => {}
|
|
66
77
|
};
|
|
67
78
|
|
|
68
79
|
export default withRouter(ListingTableContent);
|
package/src/index.js
CHANGED
|
@@ -12,7 +12,14 @@ const EntityManager = React.lazy(() =>
|
|
|
12
12
|
);
|
|
13
13
|
|
|
14
14
|
export default async function load(app) {
|
|
15
|
-
|
|
15
|
+
// To load different plugin information into menu
|
|
16
|
+
const sectionKey = 'content';
|
|
17
|
+
|
|
18
|
+
app.events.once('load:menu-section', addSection => {
|
|
19
|
+
addSection(sectionKey, { header: 'content', order: 100 });
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
app.events.once('load:menu-items', getAddContentMenuItems(app, sectionKey));
|
|
16
23
|
|
|
17
24
|
app.events.once('load:custom:field:type', addFieldType => {
|
|
18
25
|
Object.keys(formFieldTypes).forEach(type => {
|
|
@@ -2,8 +2,8 @@ import { getQuery } from '@blaze-cms/admin-ui-utils';
|
|
|
2
2
|
|
|
3
3
|
const { MENU_PERMISSIONS } = require('../constants');
|
|
4
4
|
|
|
5
|
-
function getAddContentMenuItems(app) {
|
|
6
|
-
return async
|
|
5
|
+
function getAddContentMenuItems(app, sectionKey) {
|
|
6
|
+
return async addItem => {
|
|
7
7
|
const client = app.getClient();
|
|
8
8
|
const {
|
|
9
9
|
data: { getEntitySchemas }
|
|
@@ -14,51 +14,9 @@ function getAddContentMenuItems(app) {
|
|
|
14
14
|
canDoActions: MENU_PERMISSIONS
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
if (!getEntitySchemas || !getEntitySchemas.length) return; // no items so don't add section
|
|
19
|
-
|
|
20
|
-
const menuItems = {};
|
|
21
|
-
const sectionMenuItems = { content: {} };
|
|
22
|
-
|
|
23
|
-
getEntitySchemas.forEach(({ id, displayName, displayProperties }) => {
|
|
24
|
-
if (!displayProperties) return null;
|
|
25
|
-
|
|
26
|
-
const { adminMenu: { sectionKey = 'content' } = {} } = displayProperties;
|
|
27
|
-
const sectionItems = sectionMenuItems[sectionKey] || {};
|
|
28
|
-
sectionItems[id] = {
|
|
29
|
-
label: displayName,
|
|
30
|
-
uri: `/data-listing/${id}`
|
|
31
|
-
};
|
|
32
|
-
sectionMenuItems[sectionKey] = sectionItems;
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
const menuConfig = {
|
|
36
|
-
main: {
|
|
37
|
-
items: {
|
|
38
|
-
content: {
|
|
39
|
-
label: 'Content',
|
|
40
|
-
loadOpen: true,
|
|
41
|
-
order: 10,
|
|
42
|
-
items: menuItems
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
Object.entries(sectionMenuItems).forEach(([sectionKey, sectionItems]) => {
|
|
49
|
-
const sectionConfig = menuConfig.main.items[sectionKey] || {};
|
|
50
|
-
sectionConfig.items = sectionItems;
|
|
51
|
-
menuConfig.main.items[sectionKey] = sectionConfig;
|
|
52
|
-
});
|
|
53
|
-
|
|
54
17
|
getEntitySchemas.forEach(({ id, displayName }) => {
|
|
55
|
-
|
|
56
|
-
label: displayName,
|
|
57
|
-
uri: `/data-listing/${id}`
|
|
58
|
-
};
|
|
18
|
+
addItem({ name: displayName, uri: `/data-listing/${id}` }, sectionKey);
|
|
59
19
|
});
|
|
60
|
-
|
|
61
|
-
addConfig(menuConfig);
|
|
62
20
|
};
|
|
63
21
|
}
|
|
64
22
|
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
require("core-js/modules/es.array.map.js");
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var _InfoBoxContainer = _interopRequireDefault(require("./container/InfoBoxContainer"));
|
|
13
|
-
var InfoBoxes = function InfoBoxes(_ref) {
|
|
14
|
-
var id = _ref.id,
|
|
15
|
-
schema = _ref.schema;
|
|
16
|
-
var _schema$displayProper = schema.displayProperties.adminInfoBoxes,
|
|
17
|
-
adminInfoBoxes = _schema$displayProper === void 0 ? [] : _schema$displayProper;
|
|
18
|
-
if (adminInfoBoxes.length <= 0) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
return adminInfoBoxes.map(function (infoBox) {
|
|
22
|
-
return /*#__PURE__*/_react["default"].createElement(_InfoBoxContainer["default"], {
|
|
23
|
-
id: id,
|
|
24
|
-
schema: schema,
|
|
25
|
-
key: infoBox.key,
|
|
26
|
-
infoBox: infoBox
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
var _default = InfoBoxes;
|
|
31
|
-
exports["default"] = _default;
|
|
32
|
-
InfoBoxes.propTypes = {
|
|
33
|
-
id: _propTypes["default"].string.isRequired,
|
|
34
|
-
schema: _propTypes["default"].object.isRequired
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=InfoBoxes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InfoBoxes.js","names":["_propTypes","_interopRequireDefault","require","_react","_InfoBoxContainer","InfoBoxes","_ref","id","schema","_schema$displayProper","displayProperties","adminInfoBoxes","length","map","infoBox","createElement","key","_default","exports","propTypes","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,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAMG,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAAuB;EAAA,IAAjBC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;EAC7B,IAAAC,qBAAA,GAEID,MAAM,CADRE,iBAAiB,CAAIC,cAAc;IAAdA,cAAc,GAAAF,qBAAA,cAAG,EAAE,GAAAA,qBAAA;EAG1C,IAAIE,cAAc,CAACC,MAAM,IAAI,CAAC,EAAE;IAC9B,OAAO,IAAI;EACb;EAEA,OAAOD,cAAc,CAACE,GAAG,CAAC,UAAAC,OAAO;IAAA,oBAC/BX,MAAA,YAAAY,aAAA,CAACX,iBAAA,WAAgB;MAACG,EAAE,EAAEA,EAAG;MAACC,MAAM,EAAEA,MAAO;MAACQ,GAAG,EAAEF,OAAO,CAACE,GAAI;MAACF,OAAO,EAAEA;IAAQ,CAAE,CAAC;EAAA,CACjF,CAAC;AACJ,CAAC;AAAC,IAAAG,QAAA,GAEaZ,SAAS;AAAAa,OAAA,cAAAD,QAAA;AAExBZ,SAAS,CAACc,SAAS,GAAG;EACpBZ,EAAE,EAAEa,qBAAS,CAACC,MAAM,CAACC,UAAU;EAC/Bd,MAAM,EAAEY,qBAAS,CAACG,MAAM,CAACD;AAC3B,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
require("core-js/modules/es.object.keys.js");
|
|
10
|
-
require("core-js/modules/es.array.flat-map.js");
|
|
11
|
-
require("core-js/modules/es.array.unscopables.flat-map.js");
|
|
12
|
-
require("core-js/modules/es.object.to-string.js");
|
|
13
|
-
require("core-js/modules/es.object.values.js");
|
|
14
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
var _react = _interopRequireDefault(require("react"));
|
|
16
|
-
var _useData2 = _interopRequireDefault(require("../hooks/useData"));
|
|
17
|
-
var _InfoBox = _interopRequireDefault(require("../presentational/InfoBox"));
|
|
18
|
-
var InfoBoxContainer = function InfoBoxContainer(_ref) {
|
|
19
|
-
var id = _ref.id,
|
|
20
|
-
schema = _ref.schema,
|
|
21
|
-
infoBox = _ref.infoBox;
|
|
22
|
-
var _useData = (0, _useData2["default"])({
|
|
23
|
-
id: id,
|
|
24
|
-
schema: schema,
|
|
25
|
-
infoBox: infoBox
|
|
26
|
-
}),
|
|
27
|
-
data = _useData.data;
|
|
28
|
-
if (!data || !Object.keys(data) || Object.keys(data).length === 0) return null;
|
|
29
|
-
var items = Object.values(data).flatMap(function (item) {
|
|
30
|
-
return Object.values(item);
|
|
31
|
-
});
|
|
32
|
-
return /*#__PURE__*/_react["default"].createElement(_InfoBox["default"], {
|
|
33
|
-
items: items,
|
|
34
|
-
infoBoxKey: infoBox.key
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
var _default = InfoBoxContainer;
|
|
38
|
-
exports["default"] = _default;
|
|
39
|
-
InfoBoxContainer.propTypes = {
|
|
40
|
-
id: _propTypes["default"].string.isRequired,
|
|
41
|
-
infoBox: _propTypes["default"].object.isRequired,
|
|
42
|
-
schema: _propTypes["default"].object.isRequired
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=InfoBoxContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InfoBoxContainer.js","names":["_propTypes","_interopRequireDefault","require","_react","_useData2","_InfoBox","InfoBoxContainer","_ref","id","schema","infoBox","_useData","useData","data","Object","keys","length","items","values","flatMap","item","createElement","infoBoxKey","key","_default","exports","propTypes","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,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,QAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAMI,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EAAgC;EAAA,IAA1BC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,OAAO,GAAAH,IAAA,CAAPG,OAAO;EAC7C,IAAAC,QAAA,GAAiB,IAAAC,oBAAO,EAAC;MAAEJ,EAAE,EAAFA,EAAE;MAAEC,MAAM,EAANA,MAAM;MAAEC,OAAO,EAAPA;IAAQ,CAAC,CAAC;IAAzCG,IAAI,GAAAF,QAAA,CAAJE,IAAI;EAEZ,IAAI,CAACA,IAAI,IAAI,CAACC,MAAM,CAACC,IAAI,CAACF,IAAI,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACF,IAAI,CAAC,CAACG,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;EAE9E,IAAMC,KAAK,GAAGH,MAAM,CAACI,MAAM,CAACL,IAAI,CAAC,CAACM,OAAO,CAAC,UAAAC,IAAI;IAAA,OAAIN,MAAM,CAACI,MAAM,CAACE,IAAI,CAAC;EAAA,EAAC;EAEtE,oBAAOjB,MAAA,YAAAkB,aAAA,CAAChB,QAAA,WAAO;IAACY,KAAK,EAAEA,KAAM;IAACK,UAAU,EAAEZ,OAAO,CAACa;EAAI,CAAE,CAAC;AAC3D,CAAC;AAAC,IAAAC,QAAA,GAEalB,gBAAgB;AAAAmB,OAAA,cAAAD,QAAA;AAE/BlB,gBAAgB,CAACoB,SAAS,GAAG;EAC3BlB,EAAE,EAAEmB,qBAAS,CAACC,MAAM,CAACC,UAAU;EAC/BnB,OAAO,EAAEiB,qBAAS,CAACG,MAAM,CAACD,UAAU;EACpCpB,MAAM,EAAEkB,qBAAS,CAACG,MAAM,CAACD;AAC3B,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = buildDynamicQuery;
|
|
9
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
|
-
var _client = require("@apollo/client");
|
|
11
|
-
var _coreErrors = require("@blaze-cms/core-errors");
|
|
12
|
-
var _templateObject;
|
|
13
|
-
function buildDynamicQuery(_ref) {
|
|
14
|
-
var id = _ref.id,
|
|
15
|
-
schema = _ref.schema,
|
|
16
|
-
infoBox = _ref.infoBox;
|
|
17
|
-
if (!schema || !schema.actions || !schema.actions.get || !schema.properties) {
|
|
18
|
-
throw new _coreErrors.BlazeError('DataEntity query requires get action, properties and fields from entity schema');
|
|
19
|
-
}
|
|
20
|
-
var fields = "".concat(infoBox.property, " {\n label\n value\n }");
|
|
21
|
-
return {
|
|
22
|
-
query: (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["query getInfoBoxData($id: String!){\n ", "( id: $id ) {\n id\n ", "\n __typename\n }\n }"])), schema.actions.get, fields)
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=build-dynamic-query.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-dynamic-query.js","names":["_client","require","_coreErrors","_templateObject","buildDynamicQuery","_ref","id","schema","infoBox","actions","get","properties","BlazeError","fields","concat","property","query","gql","_taggedTemplateLiteral2"],"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,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAoD,IAAAE,eAAA;AAErC,SAASC,iBAAiBA,CAAAC,IAAA,EAA0B;EAAA,IAAvBC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,OAAO,GAAAH,IAAA,CAAPG,OAAO;EAC7D,IAAI,CAACD,MAAM,IAAI,CAACA,MAAM,CAACE,OAAO,IAAI,CAACF,MAAM,CAACE,OAAO,CAACC,GAAG,IAAI,CAACH,MAAM,CAACI,UAAU,EAAE;IAC3E,MAAM,IAAIC,sBAAU,CAClB,gFACF,CAAC;EACH;EAEA,IAAMC,MAAM,MAAAC,MAAA,CAAMN,OAAO,CAACO,QAAQ,wCAG9B;EAEJ,OAAO;IACLC,KAAK,MAAEC,WAAG,EAAAd,eAAA,KAAAA,eAAA,OAAAe,uBAAA,iIACRX,MAAM,CAACE,OAAO,CAACC,GAAG,EAEjBG,MAAM;EAIX,CAAC;AACH"}
|