@blaze-cms/plugin-data-ui 0.146.0-translations.6 → 0.147.0-rc-eagle.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -0
- package/lib/components/EntityDataListing/EntityDataListing.js +21 -19
- package/lib/components/EntityDataListing/EntityDataListing.js.map +1 -1
- package/lib/components/EntityDataListing/index.js +2 -3
- package/lib/components/EntityDataListing/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js +18 -19
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/index.js +2 -3
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/Entity.js +289 -452
- package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js +62 -66
- package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +34 -50
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js +2 -3
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/index.js +2 -3
- package/lib/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js +20 -26
- package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +20 -17
- package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js +34 -32
- package/lib/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/index.js +104 -150
- package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +24 -24
- package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/create/index.js +2 -3
- package/lib/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js +42 -56
- package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js +29 -45
- package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js +2 -3
- package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/index.js +7 -8
- package/lib/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js +2 -3
- package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js +36 -57
- package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/update/index.js +2 -3
- package/lib/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js +47 -66
- package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
- package/lib/components/EntityManager/Entity/index.js +2 -3
- package/lib/components/EntityManager/Entity/index.js.map +1 -1
- package/lib/components/EntityManager/EntityManager.js +91 -166
- package/lib/components/EntityManager/EntityManager.js.map +1 -1
- package/lib/components/EntityManager/index.js +2 -3
- package/lib/components/EntityManager/index.js.map +1 -1
- package/lib/components/EntityManager/utils/RecordEditContext/index.js +3 -4
- package/lib/components/EntityManager/utils/RecordEditContext/index.js.map +1 -1
- package/lib/components/EntityManager/utils/data-mappers.js +34 -46
- package/lib/components/EntityManager/utils/data-mappers.js.map +1 -1
- package/lib/components/EntityManager/utils/entity.js +35 -73
- package/lib/components/EntityManager/utils/entity.js.map +1 -1
- package/lib/components/EntityManager/utils/entityAvailableActions.js +51 -110
- package/lib/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
- package/lib/components/EntityManager/utils/is-form-empty.js +6 -10
- package/lib/components/EntityManager/utils/is-form-empty.js.map +1 -1
- package/lib/components/EntityManager/utils/query.js +17 -10
- package/lib/components/EntityManager/utils/query.js.map +1 -1
- package/lib/components/InfoBoxes/InfoBoxTooltip.js +43 -0
- package/lib/components/InfoBoxes/InfoBoxTooltip.js.map +1 -0
- package/lib/components/InfoBoxes/InfoBoxes.js +19 -19
- package/lib/components/InfoBoxes/InfoBoxes.js.map +1 -1
- package/lib/components/InfoBoxes/container/InfoBoxContainer.js +26 -38
- package/lib/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -1
- package/lib/components/InfoBoxes/helpers/build-dynamic-query.js +21 -16
- package/lib/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
- package/lib/components/InfoBoxes/hooks/useData.js +33 -30
- package/lib/components/InfoBoxes/hooks/useData.js.map +1 -1
- package/lib/components/InfoBoxes/hooks/useInfoBox.js +10 -10
- package/lib/components/InfoBoxes/hooks/useInfoBox.js.map +1 -1
- package/lib/components/InfoBoxes/index.js +2 -3
- package/lib/components/InfoBoxes/index.js.map +1 -1
- package/lib/components/InfoBoxes/presentational/InfoBox.js +28 -32
- package/lib/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
- package/lib/components/InfoBoxes/presentational/InfoBoxLabel.js +11 -12
- package/lib/components/InfoBoxes/presentational/InfoBoxLabel.js.map +1 -1
- package/lib/components/InfoBoxes/presentational/InfoBoxValue.js +12 -12
- package/lib/components/InfoBoxes/presentational/InfoBoxValue.js.map +1 -1
- package/lib/components/ListingTable/ListingTable.js +163 -303
- package/lib/components/ListingTable/ListingTable.js.map +1 -1
- package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js +61 -40
- package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
- package/lib/components/ListingTable/ListingTableContent/index.js +2 -3
- package/lib/components/ListingTable/ListingTableContent/index.js.map +1 -1
- package/lib/components/ListingTable/SearchFilter/SearchContainer.js +215 -0
- package/lib/components/ListingTable/SearchFilter/SearchContainer.js.map +1 -0
- package/lib/components/ListingTable/SearchFilter/SearchFilter.js +48 -0
- package/lib/components/ListingTable/SearchFilter/SearchFilter.js.map +1 -0
- package/lib/components/ListingTable/SearchFilter/helpers.js +105 -0
- package/lib/components/ListingTable/SearchFilter/helpers.js.map +1 -0
- package/lib/components/ListingTable/SearchFilter/querys.js +13 -0
- package/lib/components/ListingTable/SearchFilter/querys.js.map +1 -0
- package/lib/components/ListingTable/TableActions/TableActions.js +27 -31
- package/lib/components/ListingTable/TableActions/TableActions.js.map +1 -1
- package/lib/components/ListingTable/TableActions/index.js +2 -3
- package/lib/components/ListingTable/TableActions/index.js.map +1 -1
- package/lib/components/ListingTable/index.js +2 -3
- package/lib/components/ListingTable/index.js.map +1 -1
- package/lib/components/ListingTable/mappers/populate-rows.js +104 -120
- package/lib/components/ListingTable/mappers/populate-rows.js.map +1 -1
- package/lib/components/ListingTable/service/index.js +66 -83
- package/lib/components/ListingTable/service/index.js.map +1 -1
- package/lib/components/Tabs/index.js +26 -42
- package/lib/components/Tabs/index.js.map +1 -1
- package/lib/components/hooks/useCallbackDebounce.js +5 -9
- package/lib/components/hooks/useCallbackDebounce.js.map +1 -1
- package/lib/constants.js +31 -29
- package/lib/constants.js.map +1 -1
- package/lib/icons/ContentIcon.js +17 -20
- package/lib/icons/ContentIcon.js.map +1 -1
- package/lib/icons/SettingsIcon.js +12 -15
- package/lib/icons/SettingsIcon.js.map +1 -1
- package/lib/icons/TaxonomyIcon.js +15 -18
- package/lib/icons/TaxonomyIcon.js.map +1 -1
- package/lib/icons/UsersIcon.js +11 -14
- package/lib/icons/UsersIcon.js.map +1 -1
- package/lib/icons/index.js +8 -9
- package/lib/icons/index.js.map +1 -1
- package/lib/index.js +81 -121
- package/lib/index.js.map +1 -1
- package/lib/utils/add-content-menu-items.js +67 -93
- package/lib/utils/add-content-menu-items.js.map +1 -1
- package/lib/utils/build-create-entity-mutation.js +12 -9
- package/lib/utils/build-create-entity-mutation.js.map +1 -1
- package/lib/utils/build-delete-entity-mutation.js +11 -8
- package/lib/utils/build-delete-entity-mutation.js.map +1 -1
- package/lib/utils/build-listing-query.js +20 -17
- package/lib/utils/build-listing-query.js.map +1 -1
- package/lib/utils/build-update-data-query.js +15 -9
- package/lib/utils/build-update-data-query.js.map +1 -1
- package/lib/utils/build-update-publish-unpublish-mutation.js +15 -8
- package/lib/utils/build-update-publish-unpublish-mutation.js.map +1 -1
- package/lib/utils/get-default-query-params.js +7 -6
- package/lib/utils/get-default-query-params.js.map +1 -1
- package/lib/utils/hoc/withContext.js +4 -6
- package/lib/utils/hoc/withContext.js.map +1 -1
- package/lib/utils/hooks/useToggle.js +4 -12
- package/lib/utils/hooks/useToggle.js.map +1 -1
- package/lib/utils/index.js +2 -3
- package/lib/utils/index.js.map +1 -1
- package/lib-es/components/EntityDataListing/EntityDataListing.js.map +1 -1
- package/lib-es/components/EntityDataListing/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/Entity.js +21 -28
- 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 +6 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +2 -0
- package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js +26 -7
- package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +8 -2
- package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/index.js.map +1 -1
- package/lib-es/components/EntityManager/EntityManager.js.map +1 -1
- package/lib-es/components/EntityManager/index.js.map +1 -1
- package/lib-es/components/EntityManager/utils/RecordEditContext/index.js.map +1 -1
- package/lib-es/components/EntityManager/utils/data-mappers.js.map +1 -1
- package/lib-es/components/EntityManager/utils/entity.js +6 -2
- package/lib-es/components/EntityManager/utils/entity.js.map +1 -1
- package/lib-es/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
- package/lib-es/components/EntityManager/utils/is-form-empty.js.map +1 -1
- package/lib-es/components/EntityManager/utils/query.js.map +1 -1
- package/lib-es/components/InfoBoxes/InfoBoxTooltip.js +36 -0
- package/lib-es/components/InfoBoxes/InfoBoxTooltip.js.map +1 -0
- package/lib-es/components/InfoBoxes/InfoBoxes.js.map +1 -1
- package/lib-es/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -1
- package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js +2 -0
- package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
- package/lib-es/components/InfoBoxes/hooks/useData.js.map +1 -1
- package/lib-es/components/InfoBoxes/hooks/useInfoBox.js.map +1 -1
- package/lib-es/components/InfoBoxes/index.js.map +1 -1
- package/lib-es/components/InfoBoxes/presentational/InfoBox.js +4 -1
- package/lib-es/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
- package/lib-es/components/InfoBoxes/presentational/InfoBoxLabel.js.map +1 -1
- package/lib-es/components/InfoBoxes/presentational/InfoBoxValue.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTable.js +12 -11
- package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js +34 -16
- package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTableContent/index.js.map +1 -1
- package/lib-es/components/ListingTable/SearchFilter/SearchContainer.js +207 -0
- package/lib-es/components/ListingTable/SearchFilter/SearchContainer.js.map +1 -0
- package/lib-es/components/ListingTable/SearchFilter/SearchFilter.js +40 -0
- package/lib-es/components/ListingTable/SearchFilter/SearchFilter.js.map +1 -0
- package/lib-es/components/ListingTable/SearchFilter/helpers.js +96 -0
- package/lib-es/components/ListingTable/SearchFilter/helpers.js.map +1 -0
- package/lib-es/components/ListingTable/SearchFilter/querys.js +8 -0
- package/lib-es/components/ListingTable/SearchFilter/querys.js.map +1 -0
- package/lib-es/components/ListingTable/TableActions/TableActions.js.map +1 -1
- package/lib-es/components/ListingTable/TableActions/index.js.map +1 -1
- package/lib-es/components/ListingTable/index.js.map +1 -1
- package/lib-es/components/ListingTable/mappers/populate-rows.js +3 -0
- package/lib-es/components/ListingTable/mappers/populate-rows.js.map +1 -1
- package/lib-es/components/ListingTable/service/index.js +3 -2
- package/lib-es/components/ListingTable/service/index.js.map +1 -1
- package/lib-es/components/Tabs/index.js +6 -7
- package/lib-es/components/Tabs/index.js.map +1 -1
- package/lib-es/components/hooks/useCallbackDebounce.js.map +1 -1
- package/lib-es/constants.js +4 -1
- package/lib-es/constants.js.map +1 -1
- package/lib-es/icons/ContentIcon.js.map +1 -1
- package/lib-es/icons/SettingsIcon.js.map +1 -1
- package/lib-es/icons/TaxonomyIcon.js.map +1 -1
- package/lib-es/icons/UsersIcon.js.map +1 -1
- package/lib-es/icons/index.js.map +1 -1
- package/lib-es/index.js +11 -3
- package/lib-es/index.js.map +1 -1
- 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-delete-entity-mutation.js.map +1 -1
- package/lib-es/utils/build-listing-query.js +4 -4
- 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/get-default-query-params.js.map +1 -1
- package/lib-es/utils/hoc/withContext.js +1 -1
- package/lib-es/utils/hoc/withContext.js.map +1 -1
- package/lib-es/utils/hooks/useToggle.js.map +1 -1
- package/lib-es/utils/index.js.map +1 -1
- package/package.json +28 -22
- package/src/components/EntityManager/Entity/Entity.js +72 -80
- package/src/components/EntityManager/Entity/EntityHeader/EntityHeader.js +1 -2
- package/src/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +8 -1
- package/src/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +2 -0
- package/src/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js +9 -7
- package/src/components/EntityManager/Entity/SideBarRelations/index.js +82 -59
- package/src/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +5 -3
- package/src/components/EntityManager/EntityManager.js +52 -45
- package/src/components/EntityManager/utils/entity.js +13 -2
- package/src/components/InfoBoxes/InfoBoxTooltip.js +32 -0
- package/src/components/InfoBoxes/container/InfoBoxContainer.js +3 -6
- package/src/components/InfoBoxes/helpers/build-dynamic-query.js +2 -0
- package/src/components/InfoBoxes/hooks/useData.js +6 -1
- package/src/components/InfoBoxes/presentational/InfoBox.js +4 -2
- package/src/components/ListingTable/ListingTable.js +23 -31
- package/src/components/ListingTable/ListingTableContent/ListingTableContent.js +43 -27
- package/src/components/ListingTable/SearchFilter/SearchContainer.js +228 -0
- package/src/components/ListingTable/SearchFilter/SearchFilter.js +38 -0
- package/src/components/ListingTable/SearchFilter/helpers.js +99 -0
- package/src/components/ListingTable/SearchFilter/querys.js +9 -0
- package/src/components/ListingTable/mappers/populate-rows.js +3 -0
- package/src/components/ListingTable/service/index.js +3 -4
- package/src/components/Tabs/index.js +17 -21
- package/src/constants.js +9 -1
- package/src/index.js +9 -7
- package/src/utils/build-listing-query.js +4 -4
- package/src/utils/hoc/withContext.js +5 -4
- package/CHANGELOG.md +0 -1939
- package/babel.config.js +0 -3
- package/jest.config.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.js","names":["_utils","require","_constants","triggerPublish","
|
|
1
|
+
{"version":3,"file":"publish.js","names":["_utils","require","_constants","triggerPublish","entityData","client","setEntityIsPublish","entitySchema","textContent","refetchRecord","addToast","Object","keys","length","SAVE_BEFORE_PUBLISH_MESSAGE","appearance","autoDismiss","actionType","toLowerCase","entityIsPublishedSwitch","mutation","buildUpdatePublishUnpublishMutation","id","mutate","error","message","exports"],"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,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEA,MAAME,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,CAACI,sCAA2B,EAAE;MACpCC,UAAU,EAAE,MAAM;MAClBC,WAAW,EAAE;IACf,CAAC,CAAC;IACF;EACF;EACA,MAAMC,UAAU,GAAGT,WAAW,CAACU,WAAW,CAAC,CAAC;EAC5C,MAAMC,uBAAuB,GAAG,GAAGF,UAAU,IAAI;EACjD,MAAMG,QAAQ,GAAG,IAAAC,0CAAmC,EAACd,YAAY,EAAEH,UAAU,CAACkB,EAAE,EAAEL,UAAU,CAAC;EAE7F,IAAI;IACF,MAAMZ,MAAM,CAACkB,MAAM,CAAC;MAClBH;IACF,CAAC,CAAC;IACFV,QAAQ,CAAC,GAAGF,WAAW,IAAI,EAAE;MAC3BO,UAAU,EAAE,SAAS;MACrBC,WAAW,EAAE;IACf,CAAC,CAAC;EACJ,CAAC,CAAC,OAAOQ,KAAK,EAAE;IACdd,QAAQ,CAACc,KAAK,CAACC,OAAO,EAAE;MACtBV,UAAU,EAAE,OAAO;MACnBC,WAAW,EAAE;IACf,CAAC,CAAC;EACJ;EAEAV,kBAAkB,CAACa,uBAAuB,CAAC;EAC3CV,aAAa,CAAC,IAAI,CAAC;AACrB,CAAC;AAACiB,OAAA,CAAAvB,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
8
7
|
var _submit = require("./submit");
|
|
9
|
-
var _default = exports
|
|
8
|
+
var _default = exports.default = {
|
|
10
9
|
submit: _submit.submit
|
|
11
10
|
};
|
|
12
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_submit","require","_default","exports","submit"],"sources":["../../../../../../src/components/EntityManager/Entity/actions-handlers/update/index.js"],"sourcesContent":["import { submit } from './submit';\n\nexport default { submit };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_submit","require","_default","exports","default","submit"],"sources":["../../../../../../src/components/EntityManager/Entity/actions-handlers/update/index.js"],"sourcesContent":["import { submit } from './submit';\n\nexport default { submit };\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAkC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEnB;EAAEC,MAAM,EAANA;AAAO,CAAC","ignoreList":[]}
|
|
@@ -1,79 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.keys.js");
|
|
4
|
-
require("core-js/modules/es.symbol.js");
|
|
5
|
-
require("core-js/modules/es.array.filter.js");
|
|
6
|
-
require("core-js/modules/es.object.to-string.js");
|
|
7
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
8
|
-
require("core-js/modules/es.array.for-each.js");
|
|
9
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
10
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
11
|
-
require("core-js/modules/es.object.define-properties.js");
|
|
12
|
-
require("core-js/modules/es.object.define-property.js");
|
|
13
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
14
4
|
Object.defineProperty(exports, "__esModule", {
|
|
15
5
|
value: true
|
|
16
6
|
});
|
|
17
7
|
exports.submit = void 0;
|
|
18
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
19
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
20
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
21
9
|
var _buildUpdateDataQuery = _interopRequireDefault(require("../../../../../utils/build-update-data-query"));
|
|
22
10
|
var _constants = require("../../../../../constants");
|
|
23
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
setSaveButtonText(_constants.SAVE_BUTTON_TEXTS.saved);
|
|
51
|
-
updatedDate = data && data.updateEntity && data.updateEntity.result && data.updateEntity.result.updated;
|
|
52
|
-
setNewUpdatedDate(updatedDate);
|
|
53
|
-
addToast('Updated', {
|
|
54
|
-
appearance: _constants.SUCCESS,
|
|
55
|
-
autoDismiss: true
|
|
56
|
-
});
|
|
57
|
-
handleUpdateFormData();
|
|
58
|
-
return _context.abrupt("return", _constants.SUCCESS);
|
|
59
|
-
case 17:
|
|
60
|
-
_context.prev = 17;
|
|
61
|
-
_context.t0 = _context["catch"](2);
|
|
62
|
-
setIsSaveButtonAvailable(true);
|
|
63
|
-
setSaveButtonText(_constants.SAVE_BUTTON_TEXTS.save);
|
|
64
|
-
addToast(_context.t0.message, {
|
|
65
|
-
appearance: _constants.ERROR,
|
|
66
|
-
autoDismiss: true
|
|
67
|
-
});
|
|
68
|
-
return _context.abrupt("return", _constants.ERROR);
|
|
69
|
-
case 23:
|
|
70
|
-
case "end":
|
|
71
|
-
return _context.stop();
|
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
const submit = async ({
|
|
14
|
+
entitySchema,
|
|
15
|
+
entityData,
|
|
16
|
+
parsedFormValues,
|
|
17
|
+
client,
|
|
18
|
+
setIsSaveButtonAvailable,
|
|
19
|
+
setSaveButtonText,
|
|
20
|
+
setNewUpdatedDate,
|
|
21
|
+
newUpdatedDate,
|
|
22
|
+
handleUpdateFormData
|
|
23
|
+
}, addToast) => {
|
|
24
|
+
const mutation = (0, _buildUpdateDataQuery.default)(entitySchema);
|
|
25
|
+
try {
|
|
26
|
+
setIsSaveButtonAvailable(false);
|
|
27
|
+
setSaveButtonText(_constants.SAVE_BUTTON_TEXTS.saving);
|
|
28
|
+
const {
|
|
29
|
+
data
|
|
30
|
+
} = await client.mutate({
|
|
31
|
+
mutation,
|
|
32
|
+
variables: {
|
|
33
|
+
input: _objectSpread(_objectSpread({
|
|
34
|
+
id: entityData.id
|
|
35
|
+
}, parsedFormValues), {}, {
|
|
36
|
+
updated: newUpdatedDate || entityData.updated
|
|
37
|
+
})
|
|
72
38
|
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
39
|
+
});
|
|
40
|
+
setSaveButtonText(_constants.SAVE_BUTTON_TEXTS.saved);
|
|
41
|
+
const updatedDate = data && data.updateEntity && data.updateEntity.result && data.updateEntity.result.updated;
|
|
42
|
+
setNewUpdatedDate(updatedDate);
|
|
43
|
+
addToast('Updated', {
|
|
44
|
+
appearance: _constants.SUCCESS,
|
|
45
|
+
autoDismiss: true
|
|
46
|
+
});
|
|
47
|
+
handleUpdateFormData();
|
|
48
|
+
return _constants.SUCCESS;
|
|
49
|
+
} catch (error) {
|
|
50
|
+
setIsSaveButtonAvailable(true);
|
|
51
|
+
setSaveButtonText(_constants.SAVE_BUTTON_TEXTS.save);
|
|
52
|
+
addToast(error.message, {
|
|
53
|
+
appearance: _constants.ERROR,
|
|
54
|
+
autoDismiss: true
|
|
55
|
+
});
|
|
56
|
+
return _constants.ERROR;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
exports.submit = submit;
|
|
79
60
|
//# sourceMappingURL=submit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit.js","names":["_buildUpdateDataQuery","_interopRequireDefault","require","_constants","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","submit","
|
|
1
|
+
{"version":3,"file":"submit.js","names":["_buildUpdateDataQuery","_interopRequireDefault","require","_constants","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","submit","entitySchema","entityData","parsedFormValues","client","setIsSaveButtonAvailable","setSaveButtonText","setNewUpdatedDate","newUpdatedDate","handleUpdateFormData","addToast","mutation","buildUpdateDataQuery","SAVE_BUTTON_TEXTS","saving","data","mutate","variables","input","id","updated","saved","updatedDate","updateEntity","result","appearance","SUCCESS","autoDismiss","error","save","message","ERROR","exports"],"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,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAA6E,SAAAE,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,QAAAe,gBAAA,CAAAC,OAAA,EAAAjB,CAAA,EAAAC,CAAA,E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,kBAAO;MACnBC,WAAW,EAAE;IACf,CAAC,CAAC;IACFlB,oBAAoB,CAAC,CAAC;IACtB,OAAOiB,kBAAO;EAChB,CAAC,CAAC,OAAOE,KAAK,EAAE;IACdvB,wBAAwB,CAAC,IAAI,CAAC;IAC9BC,iBAAiB,CAACO,4BAAiB,CAACgB,IAAI,CAAC;IACzCnB,QAAQ,CAACkB,KAAK,CAACE,OAAO,EAAE;MACtBL,UAAU,EAAEM,gBAAK;MACjBJ,WAAW,EAAE;IACf,CAAC,CAAC;IACF,OAAOI,gBAAK;EACd;AACF,CAAC;AAACC,OAAA,CAAAhC,MAAA,GAAAA,MAAA","ignoreList":[]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports
|
|
7
|
+
exports.default = void 0;
|
|
9
8
|
var _Entity = _interopRequireDefault(require("./Entity"));
|
|
10
|
-
var _default = exports
|
|
9
|
+
var _default = exports.default = _Entity.default;
|
|
11
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_Entity","_interopRequireDefault","require","_default","exports","Entity"],"sources":["../../../../src/components/EntityManager/Entity/index.js"],"sourcesContent":["import Entity from './Entity';\n\nexport default Entity;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Entity","_interopRequireDefault","require","_default","exports","default","Entity"],"sources":["../../../../src/components/EntityManager/Entity/index.js"],"sourcesContent":["import Entity from './Entity';\n\nexport default Entity;\n"],"mappings":";;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8B,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEfC,eAAM","ignoreList":[]}
|
|
@@ -1,31 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.keys.js");
|
|
4
|
-
require("core-js/modules/es.symbol.js");
|
|
5
|
-
require("core-js/modules/es.array.filter.js");
|
|
6
|
-
require("core-js/modules/es.object.to-string.js");
|
|
7
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
8
|
-
require("core-js/modules/es.array.for-each.js");
|
|
9
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
10
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
11
|
-
require("core-js/modules/es.object.define-properties.js");
|
|
12
|
-
require("core-js/modules/es.object.define-property.js");
|
|
13
|
-
require("core-js/modules/es.array.iterator.js");
|
|
14
|
-
require("core-js/modules/es.string.iterator.js");
|
|
15
|
-
require("core-js/modules/es.weak-map.js");
|
|
16
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
17
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
19
4
|
Object.defineProperty(exports, "__esModule", {
|
|
20
5
|
value: true
|
|
21
6
|
});
|
|
22
|
-
exports
|
|
23
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
7
|
+
exports.default = void 0;
|
|
24
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
26
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
27
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
28
|
-
require("core-js/modules/es.string.match.js");
|
|
29
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
30
10
|
var _reactRouterDom = require("react-router-dom");
|
|
31
11
|
var _client = require("@apollo/client");
|
|
@@ -35,113 +15,73 @@ var _entityAvailableActions = _interopRequireDefault(require("./utils/entityAvai
|
|
|
35
15
|
var _Entity = _interopRequireDefault(require("./Entity"));
|
|
36
16
|
var _query = require("./utils/query");
|
|
37
17
|
var _constants = require("../../constants");
|
|
38
|
-
function
|
|
39
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
18
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
40
19
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
41
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
});
|
|
89
|
-
case 3:
|
|
90
|
-
_yield$entityAvailabl = _context.sent;
|
|
91
|
-
_yield$entityAvailabl2 = (0, _slicedToArray2["default"])(_yield$entityAvailabl, 3);
|
|
92
|
-
entitySchema = _yield$entityAvailabl2[0];
|
|
93
|
-
_yield$entityAvailabl3 = _yield$entityAvailabl2[1];
|
|
94
|
-
data = _yield$entityAvailabl3 === void 0 ? {} : _yield$entityAvailabl3;
|
|
95
|
-
requestedQuery = _yield$entityAvailabl2[2];
|
|
96
|
-
if (!data) {
|
|
97
|
-
addToast(_constants.PAGE_NOT_FOUND, {
|
|
98
|
-
appearance: _constants.ERROR,
|
|
99
|
-
autoDismiss: true
|
|
100
|
-
});
|
|
101
|
-
history.push("/data-listing/".concat(entityIdentifier));
|
|
102
|
-
}
|
|
103
|
-
localData = data;
|
|
104
|
-
if (!isPageBuilderTemplateSet(data)) {
|
|
105
|
-
_context.next = 16;
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
_context.next = 14;
|
|
109
|
-
return getPageBuilderComponents({
|
|
110
|
-
entitySchema: entitySchema,
|
|
111
|
-
client: client,
|
|
112
|
-
id: id
|
|
113
|
-
});
|
|
114
|
-
case 14:
|
|
115
|
-
pageBuilderComponents = _context.sent;
|
|
116
|
-
localData = _objectSpread(_objectSpread({}, localData), {}, {
|
|
117
|
-
pageBuilder: pageBuilderComponents || localData.pageBuilder
|
|
118
|
-
});
|
|
119
|
-
case 16:
|
|
120
|
-
setFormData({
|
|
121
|
-
values: localData
|
|
122
|
-
});
|
|
123
|
-
setEntity(data);
|
|
124
|
-
setSchema(entitySchema);
|
|
125
|
-
setPreviousQuery(requestedQuery);
|
|
126
|
-
setShouldRefetch(false);
|
|
127
|
-
_context.next = 27;
|
|
128
|
-
break;
|
|
129
|
-
case 23:
|
|
130
|
-
_context.prev = 23;
|
|
131
|
-
_context.t0 = _context["catch"](0);
|
|
132
|
-
addToast(_context.t0.message, {
|
|
133
|
-
appearance: _constants.ERROR,
|
|
134
|
-
autoDismiss: true
|
|
135
|
-
});
|
|
136
|
-
history.push("/data-listing/".concat(entityIdentifier));
|
|
137
|
-
case 27:
|
|
138
|
-
case "end":
|
|
139
|
-
return _context.stop();
|
|
20
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
|
+
const EntityManager = ({
|
|
22
|
+
match,
|
|
23
|
+
history
|
|
24
|
+
}) => {
|
|
25
|
+
const [formData, setFormData] = (0, _react.useState)(null);
|
|
26
|
+
const [entity, setEntity] = (0, _react.useState)(null);
|
|
27
|
+
const [schema, setSchema] = (0, _react.useState)({
|
|
28
|
+
id: null
|
|
29
|
+
});
|
|
30
|
+
const [previousQuery, setPreviousQuery] = (0, _react.useState)(null);
|
|
31
|
+
const [shouldRefetch, setShouldRefetch] = (0, _react.useState)(false);
|
|
32
|
+
const client = (0, _client.useApolloClient)();
|
|
33
|
+
const {
|
|
34
|
+
addToast
|
|
35
|
+
} = (0, _toaster.useToasts)();
|
|
36
|
+
const {
|
|
37
|
+
action,
|
|
38
|
+
entityIdentifier,
|
|
39
|
+
id = null,
|
|
40
|
+
onViewUrl
|
|
41
|
+
} = match.params;
|
|
42
|
+
(0, _react.useEffect)(() => {
|
|
43
|
+
(async () => {
|
|
44
|
+
try {
|
|
45
|
+
const [entitySchema, data = {}, requestedQuery] = await _entityAvailableActions.default[action]({
|
|
46
|
+
client,
|
|
47
|
+
identifier: entityIdentifier,
|
|
48
|
+
id
|
|
49
|
+
});
|
|
50
|
+
if (!data) {
|
|
51
|
+
addToast(_constants.PAGE_NOT_FOUND, {
|
|
52
|
+
appearance: _constants.ERROR,
|
|
53
|
+
autoDismiss: true
|
|
54
|
+
});
|
|
55
|
+
history.push(`/data-listing/${entityIdentifier}`);
|
|
56
|
+
}
|
|
57
|
+
let localData = data;
|
|
58
|
+
if (isPageBuilderTemplateSet(data)) {
|
|
59
|
+
const pageBuilderComponents = await getPageBuilderComponents({
|
|
60
|
+
entitySchema,
|
|
61
|
+
client,
|
|
62
|
+
id
|
|
63
|
+
});
|
|
64
|
+
localData = _objectSpread(_objectSpread({}, localData), {}, {
|
|
65
|
+
pageBuilder: pageBuilderComponents || localData.pageBuilder
|
|
66
|
+
});
|
|
140
67
|
}
|
|
141
|
-
|
|
142
|
-
|
|
68
|
+
setFormData({
|
|
69
|
+
values: localData
|
|
70
|
+
});
|
|
71
|
+
setEntity(data);
|
|
72
|
+
setSchema(entitySchema);
|
|
73
|
+
setPreviousQuery(requestedQuery);
|
|
74
|
+
setShouldRefetch(false);
|
|
75
|
+
} catch (error) {
|
|
76
|
+
addToast(error.message, {
|
|
77
|
+
appearance: _constants.ERROR,
|
|
78
|
+
autoDismiss: true
|
|
79
|
+
});
|
|
80
|
+
history.push(`/data-listing/${entityIdentifier}`);
|
|
81
|
+
}
|
|
82
|
+
})();
|
|
143
83
|
}, [action, addToast, client, entityIdentifier, history, history.push, id, schema, shouldRefetch]);
|
|
144
|
-
|
|
84
|
+
const updateFormData = (updatedFormData, shouldRefresh) => {
|
|
145
85
|
if (shouldRefresh) setShouldRefetch(true);
|
|
146
86
|
setFormData(updatedFormData);
|
|
147
87
|
};
|
|
@@ -150,7 +90,7 @@ var EntityManager = function EntityManager(_ref) {
|
|
|
150
90
|
if (!formData || !schema.id || recordHasChanged(entity, id, schema.id, entityIdentifier)) {
|
|
151
91
|
return null;
|
|
152
92
|
}
|
|
153
|
-
return /*#__PURE__*/_react
|
|
93
|
+
return /*#__PURE__*/_react.default.createElement(_Entity.default, {
|
|
154
94
|
action: match.params.action,
|
|
155
95
|
formData: formData,
|
|
156
96
|
updateFormData: updateFormData,
|
|
@@ -162,50 +102,35 @@ var EntityManager = function EntityManager(_ref) {
|
|
|
162
102
|
});
|
|
163
103
|
};
|
|
164
104
|
EntityManager.propTypes = {
|
|
165
|
-
match: _propTypes
|
|
166
|
-
params: _propTypes
|
|
167
|
-
action: _propTypes
|
|
168
|
-
entityIdentifier: _propTypes
|
|
169
|
-
id: _propTypes
|
|
170
|
-
onViewUrl: _propTypes
|
|
105
|
+
match: _propTypes.default.shape({
|
|
106
|
+
params: _propTypes.default.shape({
|
|
107
|
+
action: _propTypes.default.string,
|
|
108
|
+
entityIdentifier: _propTypes.default.string,
|
|
109
|
+
id: _propTypes.default.string,
|
|
110
|
+
onViewUrl: _propTypes.default.func
|
|
171
111
|
})
|
|
172
112
|
}).isRequired,
|
|
173
|
-
history: _propTypes
|
|
113
|
+
history: _propTypes.default.object.isRequired
|
|
174
114
|
};
|
|
175
|
-
var _default = exports
|
|
176
|
-
function getPageBuilderComponents(
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
query: (0, _query.getAction)(actionName, 'pageBuilderComponents'),
|
|
190
|
-
variables: {
|
|
191
|
-
where: {
|
|
192
|
-
id: id
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
fetchPolicy: 'network-only'
|
|
196
|
-
});
|
|
197
|
-
case 4:
|
|
198
|
-
_yield$client$query = _context2.sent;
|
|
199
|
-
_yield$client$query$d = _yield$client$query.data;
|
|
200
|
-
pageBuilderData = _yield$client$query$d === void 0 ? {} : _yield$client$query$d;
|
|
201
|
-
return _context2.abrupt("return", pageBuilderData[actionName] && pageBuilderData[actionName].length ? pageBuilderData[actionName][0].pageBuilderComponents : null);
|
|
202
|
-
case 8:
|
|
203
|
-
case "end":
|
|
204
|
-
return _context2.stop();
|
|
115
|
+
var _default = exports.default = (0, _reactRouterDom.withRouter)(EntityManager);
|
|
116
|
+
async function getPageBuilderComponents({
|
|
117
|
+
entitySchema,
|
|
118
|
+
client,
|
|
119
|
+
id
|
|
120
|
+
}) {
|
|
121
|
+
const actionName = entitySchema && entitySchema.actions.getAll || 'get';
|
|
122
|
+
const {
|
|
123
|
+
data: pageBuilderData = {}
|
|
124
|
+
} = await client.query({
|
|
125
|
+
query: (0, _query.getAction)(actionName, 'pageBuilderComponents'),
|
|
126
|
+
variables: {
|
|
127
|
+
where: {
|
|
128
|
+
id
|
|
205
129
|
}
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
|
|
130
|
+
},
|
|
131
|
+
fetchPolicy: 'network-only'
|
|
132
|
+
});
|
|
133
|
+
return pageBuilderData[actionName] && pageBuilderData[actionName].length ? pageBuilderData[actionName][0].pageBuilderComponents : null;
|
|
209
134
|
}
|
|
210
135
|
function isPageBuilderTemplateSet(data) {
|
|
211
136
|
return data && data.pageBuilderTemplateId && data.pageBuilderTemplateId !== '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityManager.js","names":["_react","_interopRequireWildcard","require","_reactRouterDom","_client","_propTypes","_interopRequireDefault","_toaster","_entityAvailableActions","_Entity","_query","_constants","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","EntityManager","_ref","match","history","_useState","useState","_useState2","_slicedToArray2","formData","setFormData","_useState3","_useState4","entity","setEntity","_useState5","id","_useState6","schema","setSchema","_useState7","_useState8","previousQuery","setPreviousQuery","_useState9","_useState10","shouldRefetch","setShouldRefetch","client","useApolloClient","_useToasts","useToasts","addToast","_match$params","params","action","entityIdentifier","_match$params$id","onViewUrl","useEffect","_asyncToGenerator2","_regenerator","mark","_callee","_yield$entityAvailabl","_yield$entityAvailabl2","entitySchema","_yield$entityAvailabl3","data","requestedQuery","localData","pageBuilderComponents","wrap","_callee$","_context","prev","next","entityAvailableActions","identifier","sent","PAGE_NOT_FOUND","appearance","ERROR","autoDismiss","concat","isPageBuilderTemplateSet","getPageBuilderComponents","pageBuilder","values","t0","message","stop","updateFormData","updatedFormData","shouldRefresh","recordHasChanged","createElement","refetchRecord","propTypes","PropTypes","shape","string","func","isRequired","object","_default","exports","withRouter","_x","_getPageBuilderComponents","_callee2","_ref3","actionName","_yield$client$query","_yield$client$query$d","pageBuilderData","_callee2$","_context2","actions","getAll","query","getAction","variables","where","fetchPolicy","abrupt","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 { useToasts } from '@blaze-react/toaster';\nimport entityAvailableActions from './utils/entityAvailableActions';\nimport Entity from './Entity';\nimport { getAction } from './utils/query';\nimport { ERROR, PAGE_NOT_FOUND } from '../../constants';\n\nconst EntityManager = ({ match, history }) => {\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 const { addToast } = useToasts();\n\n const { action, entityIdentifier, id = null, onViewUrl } = match.params;\n\n useEffect(\n () => {\n (async () => {\n try {\n const [entitySchema, data = {}, requestedQuery] = await entityAvailableActions[action]({\n client,\n identifier: entityIdentifier,\n id\n });\n\n if (!data) {\n addToast(PAGE_NOT_FOUND, {\n appearance: ERROR,\n autoDismiss: true\n });\n\n history.push(`/data-listing/${entityIdentifier}`);\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 } catch (error) {\n addToast(error.message, {\n appearance: ERROR,\n autoDismiss: true\n });\n history.push(`/data-listing/${entityIdentifier}`);\n }\n })();\n },\n [action, addToast, client, entityIdentifier, history, history.push, 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 history: PropTypes.object.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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,uBAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,OAAA,GAAAH,sBAAA,CAAAJ,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AAAwD,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAZ,wBAAAY,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBA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AAtC,IAAA;UAAAmC,qBAAA,GAAAD,mBAAA,CARM7C,IAAI;UAAE+C,eAAe,GAAAD,qBAAA,cAAG,CAAC,CAAC,GAAAA,qBAAA;UAAA,OAAAG,SAAA,CAAAQ,MAAA,WAU3BV,eAAe,CAACH,UAAU,CAAC,IAAIG,eAAe,CAACH,UAAU,CAAC,CAAChG,MAAM,GACpEmG,eAAe,CAACH,UAAU,CAAC,CAAC,CAAC,CAAC,CAACzC,qBAAqB,GACpD,IAAI;QAAA;QAAA;UAAA,OAAA8C,SAAA,CAAA1B,IAAA;MAAA;IAAA,GAAAmB,QAAA;EAAA,CACT;EAAA,OAAAD,yBAAA,CAAAhG,KAAA,OAAAE,SAAA;AAAA;AAED,SAASsE,wBAAwBA,CAACjB,IAAI,EAAE;EACtC,OAAOA,IAAI,IAAIA,IAAI,CAAC0D,qBAAqB,IAAI1D,IAAI,CAAC0D,qBAAqB,KAAK,EAAE;AAChF;AAEA,SAAS/B,gBAAgBA,CAAC9D,MAAM,EAAEG,EAAE,EAAE2F,uBAAuB,EAAEvE,gBAAgB,EAAE;EAC/E,OACGvB,MAAM,IAAIA,MAAM,CAACG,EAAE,IAAIH,MAAM,CAACG,EAAE,KAAKA,EAAE,IACvC2F,uBAAuB,IAAIA,uBAAuB,KAAKvE,gBAAiB;AAE7E"}
|
|
1
|
+
{"version":3,"file":"EntityManager.js","names":["_react","_interopRequireWildcard","require","_reactRouterDom","_client","_propTypes","_interopRequireDefault","_toaster","_entityAvailableActions","_Entity","_query","_constants","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","EntityManager","match","history","formData","setFormData","useState","entity","setEntity","schema","setSchema","id","previousQuery","setPreviousQuery","shouldRefetch","setShouldRefetch","client","useApolloClient","addToast","useToasts","action","entityIdentifier","onViewUrl","params","useEffect","entitySchema","data","requestedQuery","entityAvailableActions","identifier","PAGE_NOT_FOUND","appearance","ERROR","autoDismiss","localData","isPageBuilderTemplateSet","pageBuilderComponents","getPageBuilderComponents","pageBuilder","values","error","message","updateFormData","updatedFormData","shouldRefresh","recordHasChanged","createElement","refetchRecord","propTypes","PropTypes","shape","string","func","isRequired","object","_default","exports","withRouter","actionName","actions","getAll","pageBuilderData","query","getAction","variables","where","fetchPolicy","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 { useToasts } from '@blaze-react/toaster';\nimport entityAvailableActions from './utils/entityAvailableActions';\nimport Entity from './Entity';\nimport { getAction } from './utils/query';\nimport { ERROR, PAGE_NOT_FOUND } from '../../constants';\n\nconst EntityManager = ({ match, history }) => {\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 const { addToast } = useToasts();\n\n const { action, entityIdentifier, id = null, onViewUrl } = match.params;\n\n useEffect(() => {\n (async () => {\n try {\n const [entitySchema, data = {}, requestedQuery] = await entityAvailableActions[action]({\n client,\n identifier: entityIdentifier,\n id\n });\n\n if (!data) {\n addToast(PAGE_NOT_FOUND, {\n appearance: ERROR,\n autoDismiss: true\n });\n\n history.push(`/data-listing/${entityIdentifier}`);\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 } catch (error) {\n addToast(error.message, {\n appearance: ERROR,\n autoDismiss: true\n });\n history.push(`/data-listing/${entityIdentifier}`);\n }\n })();\n }, [\n action,\n addToast,\n client,\n entityIdentifier,\n history,\n history.push,\n id,\n schema,\n 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 history: PropTypes.object.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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IA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IAAIA,IAAI,CAACyC,qBAAqB,IAAIzC,IAAI,CAACyC,qBAAqB,KAAK,EAAE;AAChF;AAEA,SAAStB,gBAAgBA,CAACtC,MAAM,EAAEI,EAAE,EAAEyD,uBAAuB,EAAE/C,gBAAgB,EAAE;EAC/E,OACGd,MAAM,IAAIA,MAAM,CAACI,EAAE,IAAIJ,MAAM,CAACI,EAAE,KAAKA,EAAE,IACvCyD,uBAAuB,IAAIA,uBAAuB,KAAK/C,gBAAiB;AAE7E","ignoreList":[]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports
|
|
7
|
+
exports.default = void 0;
|
|
9
8
|
var _EntityManager = _interopRequireDefault(require("./EntityManager"));
|
|
10
|
-
var _default = exports
|
|
9
|
+
var _default = exports.default = _EntityManager.default;
|
|
11
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_EntityManager","_interopRequireDefault","require","_default","exports","EntityManager"],"sources":["../../../src/components/EntityManager/index.js"],"sourcesContent":["import EntityManager from './EntityManager';\n\nexport default EntityManager;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_EntityManager","_interopRequireDefault","require","_default","exports","default","EntityManager"],"sources":["../../../src/components/EntityManager/index.js"],"sourcesContent":["import EntityManager from './EntityManager';\n\nexport default EntityManager;\n"],"mappings":";;;;;;;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4C,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE7BC,sBAAa","ignoreList":[]}
|