@blaze-cms/plugin-data-ui 0.128.0-admin-updates.0 → 0.128.0-admin-updates.5

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.
Files changed (78) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/lib/components/EntityDataListing/EntityDataListing.js.map +1 -1
  3. package/lib/components/EntityDataListing/index.js.map +1 -1
  4. package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
  5. package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  6. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  7. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
  8. package/lib/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
  9. package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  10. package/lib/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
  11. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  12. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
  13. package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
  14. package/lib/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
  15. package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
  16. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  17. package/lib/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
  18. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
  19. package/lib/components/EntityManager/Entity/index.js.map +1 -1
  20. package/lib/components/EntityManager/EntityManager.js.map +1 -1
  21. package/lib/components/EntityManager/index.js.map +1 -1
  22. package/lib/components/EntityManager/utils/data-mappers.js.map +1 -1
  23. package/lib/components/EntityManager/utils/entity.js.map +1 -1
  24. package/lib/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
  25. package/lib/components/EntityManager/utils/is-form-empty.js.map +1 -1
  26. package/lib/components/EntityManager/utils/query.js.map +1 -1
  27. package/lib/components/ListingTable/ListingTable.js.map +1 -1
  28. package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  29. package/lib/components/ListingTable/ListingTableContent/index.js.map +1 -1
  30. package/lib/components/ListingTable/TableActions/TableActions.js.map +1 -1
  31. package/lib/components/ListingTable/TableActions/index.js.map +1 -1
  32. package/lib/components/ListingTable/index.js.map +1 -1
  33. package/lib/components/ListingTable/mappers/populate-rows.js.map +1 -1
  34. package/lib/components/ListingTable/service/index.js.map +1 -1
  35. package/lib/components/Tabs/index.js.map +1 -1
  36. package/lib/constants.js.map +1 -1
  37. package/lib/index.js.map +1 -1
  38. package/lib/utils/add-content-menu-items.js.map +1 -1
  39. package/lib/utils/build-create-entity-mutation.js.map +1 -1
  40. package/lib/utils/build-delete-entity-mutation.js.map +1 -1
  41. package/lib/utils/build-listing-query.js.map +1 -1
  42. package/lib/utils/build-update-data-query.js.map +1 -1
  43. package/lib/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  44. package/lib/utils/get-default-query-params.js.map +1 -1
  45. package/lib/utils/hoc/withContext.js.map +1 -1
  46. package/lib/utils/hooks/useToggle.js.map +1 -1
  47. package/lib/utils/index.js.map +1 -1
  48. package/lib-es/components/EntityDataListing/EntityDataListing.js.map +1 -1
  49. package/lib-es/components/EntityManager/Entity/Entity.js.map +1 -1
  50. package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  51. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  52. package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  53. package/lib-es/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  54. package/lib-es/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
  55. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  56. package/lib-es/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
  57. package/lib-es/components/EntityManager/EntityManager.js.map +1 -1
  58. package/lib-es/components/EntityManager/utils/data-mappers.js.map +1 -1
  59. package/lib-es/components/EntityManager/utils/entity.js.map +1 -1
  60. package/lib-es/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
  61. package/lib-es/components/EntityManager/utils/query.js.map +1 -1
  62. package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
  63. package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  64. package/lib-es/components/ListingTable/TableActions/TableActions.js.map +1 -1
  65. package/lib-es/components/ListingTable/mappers/populate-rows.js.map +1 -1
  66. package/lib-es/components/ListingTable/service/index.js.map +1 -1
  67. package/lib-es/components/Tabs/index.js.map +1 -1
  68. package/lib-es/index.js.map +1 -1
  69. package/lib-es/utils/add-content-menu-items.js.map +1 -1
  70. package/lib-es/utils/build-create-entity-mutation.js.map +1 -1
  71. package/lib-es/utils/build-delete-entity-mutation.js.map +1 -1
  72. package/lib-es/utils/build-listing-query.js.map +1 -1
  73. package/lib-es/utils/build-update-data-query.js.map +1 -1
  74. package/lib-es/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  75. package/lib-es/utils/get-default-query-params.js.map +1 -1
  76. package/lib-es/utils/hoc/withContext.js.map +1 -1
  77. package/lib-es/utils/hooks/useToggle.js.map +1 -1
  78. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"TableActions.js","names":["React","Link","PropTypes","More","Button","TableActions","editUrl","data","showDeleteModal","propTypes","string","isRequired","func","object"],"sources":["../../../../src/components/ListingTable/TableActions/TableActions.js"],"sourcesContent":["import React from 'react';\nimport { Link } from 'react-router-dom';\nimport PropTypes from 'prop-types';\nimport More from '@blaze-react/more';\nimport Button from '@blaze-react/button';\n\nconst TableActions = ({ editUrl, data, showDeleteModal }) => (\n <div className=\"more-menu__wrapper\">\n <More isMoreMenu>\n <More.Avatar isMoreMenu>\n <span className=\"material-icons\">more_vert</span>\n </More.Avatar>\n <More.Content isMoreMenu>\n <Link to={editUrl} className=\"more-menu__link\" role=\"button\">\n Edit\n </Link>\n <Button className=\"more-menu__link\" onClick={() => showDeleteModal(data)}>\n Delete\n </Button>\n </More.Content>\n </More>\n </div>\n);\n\nTableActions.propTypes = {\n editUrl: PropTypes.string.isRequired,\n showDeleteModal: PropTypes.func.isRequired,\n data: PropTypes.object.isRequired\n};\n\nexport default TableActions;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,kBAAkB;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,IAAI,MAAM,mBAAmB;AACpC,OAAOC,MAAM,MAAM,qBAAqB;AAExC,MAAMC,YAAY,GAAG,CAAC;EAAEC,OAAO;EAAEC,IAAI;EAAEC;AAAgB,CAAC,kBACtD;EAAK,SAAS,EAAC;AAAoB,gBACjC,oBAAC,IAAI;EAAC,UAAU;AAAA,gBACd,oBAAC,IAAI,CAAC,MAAM;EAAC,UAAU;AAAA,gBACrB;EAAM,SAAS,EAAC;AAAgB,GAAC,WAAS,CAAO,CACrC,eACd,oBAAC,IAAI,CAAC,OAAO;EAAC,UAAU;AAAA,gBACtB,oBAAC,IAAI;EAAC,EAAE,EAAEF,OAAQ;EAAC,SAAS,EAAC,iBAAiB;EAAC,IAAI,EAAC;AAAQ,GAAC,MAE7D,CAAO,eACP,oBAAC,MAAM;EAAC,SAAS,EAAC,iBAAiB;EAAC,OAAO,EAAE,MAAME,eAAe,CAACD,IAAI;AAAE,GAAC,QAE1E,CAAS,CACI,CACV,CAEV;AAEDF,YAAY,CAACI,SAAS,GAAG;EACvBH,OAAO,EAAEJ,SAAS,CAACQ,MAAM,CAACC,UAAU;EACpCH,eAAe,EAAEN,SAAS,CAACU,IAAI,CAACD,UAAU;EAC1CJ,IAAI,EAAEL,SAAS,CAACW,MAAM,CAACF;AACzB,CAAC;AAED,eAAeN,YAAY"}
1
+ {"version":3,"file":"TableActions.js","names":["React","Link","PropTypes","More","Button","TableActions","editUrl","data","showDeleteModal","createElement","className","isMoreMenu","Avatar","Content","to","role","onClick","propTypes","string","isRequired","func","object"],"sources":["../../../../src/components/ListingTable/TableActions/TableActions.js"],"sourcesContent":["import React from 'react';\nimport { Link } from 'react-router-dom';\nimport PropTypes from 'prop-types';\nimport More from '@blaze-react/more';\nimport Button from '@blaze-react/button';\n\nconst TableActions = ({ editUrl, data, showDeleteModal }) => (\n <div className=\"more-menu__wrapper\">\n <More isMoreMenu>\n <More.Avatar isMoreMenu>\n <span className=\"material-icons\">more_vert</span>\n </More.Avatar>\n <More.Content isMoreMenu>\n <Link to={editUrl} className=\"more-menu__link\" role=\"button\">\n Edit\n </Link>\n <Button className=\"more-menu__link\" onClick={() => showDeleteModal(data)}>\n Delete\n </Button>\n </More.Content>\n </More>\n </div>\n);\n\nTableActions.propTypes = {\n editUrl: PropTypes.string.isRequired,\n showDeleteModal: PropTypes.func.isRequired,\n data: PropTypes.object.isRequired\n};\n\nexport default TableActions;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,kBAAkB;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,IAAI,MAAM,mBAAmB;AACpC,OAAOC,MAAM,MAAM,qBAAqB;AAExC,MAAMC,YAAY,GAAGA,CAAC;EAAEC,OAAO;EAAEC,IAAI;EAAEC;AAAgB,CAAC,kBACtDR,KAAA,CAAAS,aAAA;EAAKC,SAAS,EAAC;AAAoB,gBACjCV,KAAA,CAAAS,aAAA,CAACN,IAAI;EAACQ,UAAU;AAAA,gBACdX,KAAA,CAAAS,aAAA,CAACN,IAAI,CAACS,MAAM;EAACD,UAAU;AAAA,gBACrBX,KAAA,CAAAS,aAAA;EAAMC,SAAS,EAAC;AAAgB,GAAC,WAAS,CAAO,CACrC,eACdV,KAAA,CAAAS,aAAA,CAACN,IAAI,CAACU,OAAO;EAACF,UAAU;AAAA,gBACtBX,KAAA,CAAAS,aAAA,CAACR,IAAI;EAACa,EAAE,EAAER,OAAQ;EAACI,SAAS,EAAC,iBAAiB;EAACK,IAAI,EAAC;AAAQ,GAAC,MAE7D,CAAO,eACPf,KAAA,CAAAS,aAAA,CAACL,MAAM;EAACM,SAAS,EAAC,iBAAiB;EAACM,OAAO,EAAEA,CAAA,KAAMR,eAAe,CAACD,IAAI;AAAE,GAAC,QAE1E,CAAS,CACI,CACV,CAEV;AAEDF,YAAY,CAACY,SAAS,GAAG;EACvBX,OAAO,EAAEJ,SAAS,CAACgB,MAAM,CAACC,UAAU;EACpCX,eAAe,EAAEN,SAAS,CAACkB,IAAI,CAACD,UAAU;EAC1CZ,IAAI,EAAEL,SAAS,CAACmB,MAAM,CAACF;AACzB,CAAC;AAED,eAAed,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"populate-rows.js","names":["React","Link","TableActions","ACTIONS","formatRows","rows","url","toggleModal","label","firstColumn","map","data","editUrl","id","actions","getSanitizedColumnLabel","columnProp","sanitizedChar","index","length","toUpperCase","toLowerCase","getColumnLabels","listingProperties","properties","dynamicProperties","allProperties","reduce","acc","listingProperty","populateRows","entitySchema","formProperties","columns","labels","identification","sort","orderBy"],"sources":["../../../../src/components/ListingTable/mappers/populate-rows.js"],"sourcesContent":["import React from 'react';\nimport { Link } from 'react-router-dom';\nimport TableActions from '../TableActions';\nimport { ACTIONS } from '../../../constants';\n\nconst formatRows = ({ rows, url, toggleModal, label, firstColumn = 'name' }) =>\n rows.map(data => {\n const editUrl = `${url}/update/${data.id}`;\n return {\n ...data,\n [firstColumn]: (\n <Link to={editUrl} role=\"button\">\n {data[firstColumn]}\n </Link>\n ),\n actions: <TableActions editUrl={editUrl} data={data} showDeleteModal={toggleModal} />\n };\n });\n\nconst getSanitizedColumnLabel = columnProp => {\n let sanitizedChar = '';\n\n for (let index = 0; index < columnProp.length; index += 1) {\n if (index && columnProp[index] === columnProp[index].toUpperCase())\n sanitizedChar = `${sanitizedChar} ${columnProp[index].toLowerCase()}`;\n else sanitizedChar += columnProp[index];\n }\n return sanitizedChar;\n};\n\nconst getColumnLabels = (listingProperties, properties, dynamicProperties) => {\n const allProperties = { ...properties, ...dynamicProperties };\n return listingProperties.reduce((acc, listingProperty) => {\n const label = allProperties[listingProperty].label || getSanitizedColumnLabel(listingProperty);\n return { ...acc, ...{ [listingProperty]: label } };\n }, {});\n};\n\nconst populateRows = ({ toggleModal, url, entitySchema, rows }) => {\n const { listingProperties, properties, dynamicProperties = {}, formProperties } = entitySchema;\n const columns = [...listingProperties, ACTIONS];\n const [firstColumn] = columns;\n const labels = {\n ...getColumnLabels(listingProperties, properties, dynamicProperties),\n [ACTIONS]: ACTIONS\n };\n\n return {\n identification: 'id',\n sort: null,\n columns,\n labels,\n orderBy: [...formProperties],\n rows: formatRows({ firstColumn, rows, url, toggleModal })\n };\n};\n\nexport { populateRows, formatRows };\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,kBAAkB;AACvC,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,MAAMC,UAAU,GAAG,CAAC;EAAEC,IAAI;EAAEC,GAAG;EAAEC,WAAW;EAAEC,KAAK;EAAEC,WAAW,GAAG;AAAO,CAAC,KACzEJ,IAAI,CAACK,GAAG,CAACC,IAAI,IAAI;EACf,MAAMC,OAAO,GAAI,GAAEN,GAAI,WAAUK,IAAI,CAACE,EAAG,EAAC;EAC1C,uCACKF,IAAI;IACP,CAACF,WAAW,gBACV,oBAAC,IAAI;MAAC,EAAE,EAAEG,OAAQ;MAAC,IAAI,EAAC;IAAQ,GAC7BD,IAAI,CAACF,WAAW,CAAC,CAErB;IACDK,OAAO,eAAE,oBAAC,YAAY;MAAC,OAAO,EAAEF,OAAQ;MAAC,IAAI,EAAED,IAAK;MAAC,eAAe,EAAEJ;IAAY;EAA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M,mCACPZ,eAAe,CAACC,iBAAiB,EAAEC,UAAU,EAAEC,iBAAiB,CAAC;IACpE,CAACtB,OAAO,GAAGA;EAAO,EACnB;EAED,OAAO;IACLgC,cAAc,EAAE,IAAI;IACpBC,IAAI,EAAE,IAAI;IACVH,OAAO;IACPC,MAAM;IACNG,OAAO,EAAE,CAAC,GAAGL,cAAc,CAAC;IAC5B3B,IAAI,EAAED,UAAU,CAAC;MAAEK,WAAW;MAAEJ,IAAI;MAAEC,GAAG;MAAEC;IAAY,CAAC;EAC1D,CAAC;AACH,CAAC;AAED,SAASuB,YAAY,EAAE1B,UAAU"}
1
+ {"version":3,"file":"populate-rows.js","names":["React","Link","TableActions","ACTIONS","formatRows","rows","url","toggleModal","label","firstColumn","map","data","editUrl","id","_objectSpread","createElement","to","role","actions","showDeleteModal","getSanitizedColumnLabel","columnProp","sanitizedChar","index","length","toUpperCase","toLowerCase","getColumnLabels","listingProperties","properties","dynamicProperties","allProperties","reduce","acc","listingProperty","populateRows","entitySchema","formProperties","columns","labels","identification","sort","orderBy"],"sources":["../../../../src/components/ListingTable/mappers/populate-rows.js"],"sourcesContent":["import React from 'react';\nimport { Link } from 'react-router-dom';\nimport TableActions from '../TableActions';\nimport { ACTIONS } from '../../../constants';\n\nconst formatRows = ({ rows, url, toggleModal, label, firstColumn = 'name' }) =>\n rows.map(data => {\n const editUrl = `${url}/update/${data.id}`;\n return {\n ...data,\n [firstColumn]: (\n <Link to={editUrl} role=\"button\">\n {data[firstColumn]}\n </Link>\n ),\n actions: <TableActions editUrl={editUrl} data={data} showDeleteModal={toggleModal} />\n };\n });\n\nconst getSanitizedColumnLabel = columnProp => {\n let sanitizedChar = '';\n\n for (let index = 0; index < columnProp.length; index += 1) {\n if (index && columnProp[index] === columnProp[index].toUpperCase())\n sanitizedChar = `${sanitizedChar} ${columnProp[index].toLowerCase()}`;\n else sanitizedChar += columnProp[index];\n }\n return sanitizedChar;\n};\n\nconst getColumnLabels = (listingProperties, properties, dynamicProperties) => {\n const allProperties = { ...properties, ...dynamicProperties };\n return listingProperties.reduce((acc, listingProperty) => {\n const label = allProperties[listingProperty].label || getSanitizedColumnLabel(listingProperty);\n return { ...acc, ...{ [listingProperty]: label } };\n }, {});\n};\n\nconst populateRows = ({ toggleModal, url, entitySchema, rows }) => {\n const { listingProperties, properties, dynamicProperties = {}, formProperties } = entitySchema;\n const columns = [...listingProperties, ACTIONS];\n const [firstColumn] = columns;\n const labels = {\n ...getColumnLabels(listingProperties, properties, dynamicProperties),\n [ACTIONS]: ACTIONS\n };\n\n return {\n identification: 'id',\n sort: null,\n columns,\n labels,\n orderBy: [...formProperties],\n rows: formatRows({ firstColumn, rows, url, toggleModal })\n };\n};\n\nexport { populateRows, formatRows };\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,kBAAkB;AACvC,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,MAAMC,UAAU,GAAGA,CAAC;EAAEC,IAAI;EAAEC,GAAG;EAAEC,WAAW;EAAEC,KAAK;EAAEC,WAAW,GAAG;AAAO,CAAC,KACzEJ,IAAI,CAACK,GAAG,CAACC,IAAI,IAAI;EACf,MAAMC,OAAO,GAAI,GAAEN,GAAI,WAAUK,IAAI,CAACE,EAAG,EAAC;EAC1C,OAAAC,aAAA,CAAAA,aAAA,KACKH,IAAI;IACP,CAACF,WAAW,gBACVT,KAAA,CAAAe,aAAA,CAACd,IAAI;MAACe,EAAE,EAAEJ,OAAQ;MAACK,IAAI,EAAC;IAAQ,GAC7BN,IAAI,CAACF,WAAW,CAAC,CAErB;IACDS,OAAO,eAAElB,KAAA,CAAAe,aAAA,CAACb,YAAY;MAACU,OAAO,EAAEA,OAAQ;MAACD,IAAI,EAAEA,IAAK;MAACQ,eAAe,EAAEZ;IAAY;EAAG;AAEzF,CAAC,CAAC;AAEJ,MAAMa,uBAAuB,GAAGC,UAAU,IAAI;EAC5C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A,CAAAA,aAAA,KACPa,eAAe,CAACC,iBAAiB,EAAEC,UAAU,EAAEC,iBAAiB,CAAC;IACpE,CAAC3B,OAAO,GAAGA;EAAO,EACnB;EAED,OAAO;IACLqC,cAAc,EAAE,IAAI;IACpBC,IAAI,EAAE,IAAI;IACVH,OAAO;IACPC,MAAM;IACNG,OAAO,EAAE,CAAC,GAAGL,cAAc,CAAC;IAC5BhC,IAAI,EAAED,UAAU,CAAC;MAAEK,WAAW;MAAEJ,IAAI;MAAEC,GAAG;MAAEC;IAAY,CAAC;EAC1D,CAAC;AACH,CAAC;AAED,SAAS4B,YAAY,EAAE/B,UAAU"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["buildListingQuery","fetchData","client","querySettings","entitySchema","queryParams","query","data","listingData","variables","fetchPolicy"],"sources":["../../../../src/components/ListingTable/service/index.js"],"sourcesContent":["import buildListingQuery from '../../../utils/build-listing-query';\n\nconst fetchData = async ({ client, querySettings: { entitySchema, queryParams } }) => {\n const query = buildListingQuery(entitySchema);\n const {\n data: { listingData }\n } = await client.query({ query, variables: queryParams, fetchPolicy: 'network-only' });\n\n return listingData;\n};\n\nexport { fetchData };\n"],"mappings":"AAAA,OAAOA,iBAAiB,MAAM,oCAAoC;AAElE,MAAMC,SAAS,GAAG,OAAO;EAAEC,MAAM;EAAEC,aAAa,EAAE;IAAEC,YAAY;IAAEC;EAAY;AAAE,CAAC,KAAK;EACpF,MAAMC,KAAK,GAAGN,iBAAiB,CAACI,YAAY,CAAC;EAC7C,MAAM;IACJG,IAAI,EAAE;MAAEC;IAAY;EACtB,CAAC,GAAG,MAAMN,MAAM,CAACI,KAAK,CAAC;IAAEA,KAAK;IAAEG,SAAS,EAAEJ,WAAW;IAAEK,WAAW,EAAE;EAAe,CAAC,CAAC;EAEtF,OAAOF,WAAW;AACpB,CAAC;AAED,SAASP,SAAS"}
1
+ {"version":3,"file":"index.js","names":["buildListingQuery","fetchData","client","querySettings","entitySchema","queryParams","query","data","listingData","variables","fetchPolicy"],"sources":["../../../../src/components/ListingTable/service/index.js"],"sourcesContent":["import buildListingQuery from '../../../utils/build-listing-query';\n\nconst fetchData = async ({ client, querySettings: { entitySchema, queryParams } }) => {\n const query = buildListingQuery(entitySchema);\n const {\n data: { listingData }\n } = await client.query({ query, variables: queryParams, fetchPolicy: 'network-only' });\n\n return listingData;\n};\n\nexport { fetchData };\n"],"mappings":"AAAA,OAAOA,iBAAiB,MAAM,oCAAoC;AAElE,MAAMC,SAAS,GAAG,MAAAA,CAAO;EAAEC,MAAM;EAAEC,aAAa,EAAE;IAAEC,YAAY;IAAEC;EAAY;AAAE,CAAC,KAAK;EACpF,MAAMC,KAAK,GAAGN,iBAAiB,CAACI,YAAY,CAAC;EAC7C,MAAM;IACJG,IAAI,EAAE;MAAEC;IAAY;EACtB,CAAC,GAAG,MAAMN,MAAM,CAACI,KAAK,CAAC;IAAEA,KAAK;IAAEG,SAAS,EAAEJ,WAAW;IAAEK,WAAW,EAAE;EAAe,CAAC,CAAC;EAEtF,OAAOF,WAAW;AACpB,CAAC;AAED,SAASP,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useState","PropTypes","Tab","TabItem","useReadFromCache","GET_CURRENT_TAB_ID","TabsContextProvider","PAGE_BUILDER_TAB","PAGE_BUILDER_TAB_INDEX","EDITOR_VIEW_TAB","EDITOR_VIEW_TAB_INDEX","Tabs","children","onTabChange","enabled","currentTabId","query","activeAccordions","setActiveAccordions","propTypes","oneOfType","object","arrayOf","isRequired","func","bool"],"sources":["../../../src/components/Tabs/index.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { Tab, TabItem } from '@blaze-react/tab';\nimport {\n useReadFromCache,\n GET_CURRENT_TAB_ID,\n TabsContextProvider\n} from '@blaze-cms/admin-ui-utils';\nimport {\n PAGE_BUILDER_TAB,\n PAGE_BUILDER_TAB_INDEX,\n EDITOR_VIEW_TAB,\n EDITOR_VIEW_TAB_INDEX\n} from '../../constants';\n\nconst Tabs = ({ children, onTabChange, enabled }) => {\n const { currentTabId } = useReadFromCache({ query: GET_CURRENT_TAB_ID }) || EDITOR_VIEW_TAB_INDEX;\n const [activeAccordions, setActiveAccordions] = useState([]);\n\n return enabled ? (\n <>\n <TabsContextProvider value={{ currentTabId, activeAccordions, setActiveAccordions }}>\n <Tab selected={currentTabId}>\n <TabItem title={EDITOR_VIEW_TAB} action={() => onTabChange(EDITOR_VIEW_TAB_INDEX)}>\n {children}\n </TabItem>\n <TabItem title={PAGE_BUILDER_TAB} action={() => onTabChange(PAGE_BUILDER_TAB_INDEX)}>\n {children}\n </TabItem>\n </Tab>\n </TabsContextProvider>\n </>\n ) : (\n <>{children}</>\n );\n};\n\nTabs.propTypes = {\n children: PropTypes.oneOfType([PropTypes.object, PropTypes.arrayOf(PropTypes.object)]).isRequired,\n onTabChange: PropTypes.func.isRequired,\n enabled: PropTypes.bool.isRequired\n};\n\nexport default Tabs;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,GAAG,EAAEC,OAAO,QAAQ,kBAAkB;AAC/C,SACEC,gBAAgB,EAChBC,kBAAkB,EAClBC,mBAAmB,QACd,2BAA2B;AAClC,SACEC,gBAAgB,EAChBC,sBAAsB,EACtBC,eAAe,EACfC,qBAAqB,QAChB,iBAAiB;AAExB,MAAMC,IAAI,GAAG,CAAC;EAAEC,QAAQ;EAAEC,WAAW;EAAEC;AAAQ,CAAC,KAAK;EACnD,MAAM;IAAEC;EAAa,CAAC,GAAGX,gBAAgB,CAAC;IAAEY,KAAK,EAAEX;EAAmB,CAAC,CAAC,IAAIK,qBAAqB;EACjG,MAAM,CAACO,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGlB,QAAQ,CAAC,EAAE,CAAC;EAE5D,OAAOc,OAAO,gBACZ,uDACE,oBAAC,mBAAmB;IAAC,KAAK,EAAE;MAAEC,YAAY;MAAEE,gBAAgB;MAAEC;IAAoB;EAAE,gBAClF,oBAAC,GAAG;IAAC,QAAQ,EAAEH;EAAa,gBAC1B,oBAAC,OAAO;IAAC,KAAK,EAAEN,eAAgB;IAAC,MAAM,EAAE,MAAMI,WAAW,CAACH,qBAAqB;EAAE,GAC/EE,QAAQ,CACD,eACV,oBAAC,OAAO;IAAC,KAAK,EAAEL,gBAAiB;IAAC,MAAM,EAAE,MAAMM,WAAW,CAACL,sBAAsB;EAAE,GACjFI,QAAQ,CACD,CACN,CACc,CACrB,gBAEH,0CAAGA,QAAQ,CACZ;AACH,CAAC;AAEDD,IAAI,CAACQ,SAAS,GAAG;EACfP,QAAQ,EAAEX,SAAS,CAACmB,SAAS,CAAC,CAACnB,SAAS,CAACoB,MAAM,EAAEpB,SAAS,CAACqB,OAAO,CAACrB,SAAS,CAACoB,MAAM,CAAC,CAAC,CAAC,CAACE,UAAU;EACjGV,WAAW,EAAEZ,SAAS,CAACuB,IAAI,CAACD,UAAU;EACtCT,OAAO,EAAEb,SAAS,CAACwB,IAAI,CAACF;AAC1B,CAAC;AAED,eAAeZ,IAAI"}
1
+ {"version":3,"file":"index.js","names":["React","useState","PropTypes","Tab","TabItem","useReadFromCache","GET_CURRENT_TAB_ID","TabsContextProvider","PAGE_BUILDER_TAB","PAGE_BUILDER_TAB_INDEX","EDITOR_VIEW_TAB","EDITOR_VIEW_TAB_INDEX","Tabs","children","onTabChange","enabled","currentTabId","query","activeAccordions","setActiveAccordions","createElement","Fragment","value","selected","title","action","propTypes","oneOfType","object","arrayOf","isRequired","func","bool"],"sources":["../../../src/components/Tabs/index.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { Tab, TabItem } from '@blaze-react/tab';\nimport {\n useReadFromCache,\n GET_CURRENT_TAB_ID,\n TabsContextProvider\n} from '@blaze-cms/admin-ui-utils';\nimport {\n PAGE_BUILDER_TAB,\n PAGE_BUILDER_TAB_INDEX,\n EDITOR_VIEW_TAB,\n EDITOR_VIEW_TAB_INDEX\n} from '../../constants';\n\nconst Tabs = ({ children, onTabChange, enabled }) => {\n const { currentTabId } = useReadFromCache({ query: GET_CURRENT_TAB_ID }) || EDITOR_VIEW_TAB_INDEX;\n const [activeAccordions, setActiveAccordions] = useState([]);\n\n return enabled ? (\n <>\n <TabsContextProvider value={{ currentTabId, activeAccordions, setActiveAccordions }}>\n <Tab selected={currentTabId}>\n <TabItem title={EDITOR_VIEW_TAB} action={() => onTabChange(EDITOR_VIEW_TAB_INDEX)}>\n {children}\n </TabItem>\n <TabItem title={PAGE_BUILDER_TAB} action={() => onTabChange(PAGE_BUILDER_TAB_INDEX)}>\n {children}\n </TabItem>\n </Tab>\n </TabsContextProvider>\n </>\n ) : (\n <>{children}</>\n );\n};\n\nTabs.propTypes = {\n children: PropTypes.oneOfType([PropTypes.object, PropTypes.arrayOf(PropTypes.object)]).isRequired,\n onTabChange: PropTypes.func.isRequired,\n enabled: PropTypes.bool.isRequired\n};\n\nexport default Tabs;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,GAAG,EAAEC,OAAO,QAAQ,kBAAkB;AAC/C,SACEC,gBAAgB,EAChBC,kBAAkB,EAClBC,mBAAmB,QACd,2BAA2B;AAClC,SACEC,gBAAgB,EAChBC,sBAAsB,EACtBC,eAAe,EACfC,qBAAqB,QAChB,iBAAiB;AAExB,MAAMC,IAAI,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,WAAW;EAAEC;AAAQ,CAAC,KAAK;EACnD,MAAM;IAAEC;EAAa,CAAC,GAAGX,gBAAgB,CAAC;IAAEY,KAAK,EAAEX;EAAmB,CAAC,CAAC,IAAIK,qBAAqB;EACjG,MAAM,CAACO,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGlB,QAAQ,CAAC,EAAE,CAAC;EAE5D,OAAOc,OAAO,gBACZf,KAAA,CAAAoB,aAAA,CAAApB,KAAA,CAAAqB,QAAA,qBACErB,KAAA,CAAAoB,aAAA,CAACb,mBAAmB;IAACe,KAAK,EAAE;MAAEN,YAAY;MAAEE,gBAAgB;MAAEC;IAAoB;EAAE,gBAClFnB,KAAA,CAAAoB,aAAA,CAACjB,GAAG;IAACoB,QAAQ,EAAEP;EAAa,gBAC1BhB,KAAA,CAAAoB,aAAA,CAAChB,OAAO;IAACoB,KAAK,EAAEd,eAAgB;IAACe,MAAM,EAAEA,CAAA,KAAMX,WAAW,CAACH,qBAAqB;EAAE,GAC/EE,QAAQ,CACD,eACVb,KAAA,CAAAoB,aAAA,CAAChB,OAAO;IAACoB,KAAK,EAAEhB,gBAAiB;IAACiB,MAAM,EAAEA,CAAA,KAAMX,WAAW,CAACL,sBAAsB;EAAE,GACjFI,QAAQ,CACD,CACN,CACc,CACrB,gBAEHb,KAAA,CAAAoB,aAAA,CAAApB,KAAA,CAAAqB,QAAA,QAAGR,QAAQ,CACZ;AACH,CAAC;AAEDD,IAAI,CAACc,SAAS,GAAG;EACfb,QAAQ,EAAEX,SAAS,CAACyB,SAAS,CAAC,CAACzB,SAAS,CAAC0B,MAAM,EAAE1B,SAAS,CAAC2B,OAAO,CAAC3B,SAAS,CAAC0B,MAAM,CAAC,CAAC,CAAC,CAACE,UAAU;EACjGhB,WAAW,EAAEZ,SAAS,CAAC6B,IAAI,CAACD,UAAU;EACtCf,OAAO,EAAEb,SAAS,CAAC8B,IAAI,CAACF;AAC1B,CAAC;AAED,eAAelB,IAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["getFormBuilderLookup","formFieldTypes","React","pkg","DATA_LISTING_PREFIX","PLUGIN_NAME","getAddContentMenuItems","EntityDataListing","lazy","EntityManager","load","app","sectionKey","events","once","addSection","header","order","addFieldType","Object","keys","forEach","type","component","emitAsync","entityDataListingRoute","path","key","exact","editEntityRoute","addEntityRoute","addRoute","name","version","pluginName"],"sources":["../src/index.js"],"sourcesContent":["import { getFormBuilderLookup, formFieldTypes } from '@blaze-cms/react-form-builder';\nimport React from 'react';\nimport pkg from '../package.json';\nimport { DATA_LISTING_PREFIX, PLUGIN_NAME } from './constants';\nimport getAddContentMenuItems from './utils/add-content-menu-items';\n\nconst EntityDataListing = React.lazy(() =>\n import(/* webpackChunkName: 'EntityDataListing' */ './components/EntityDataListing')\n);\nconst EntityManager = React.lazy(() =>\n import(/* webpackChunkName: 'EntityManager' */ './components/EntityManager')\n);\n\nexport default async function load(app) {\n // To load different plugin information into menu\n const sectionKey = 'content';\n\n app.events.once('load:menu-section', addSection => {\n addSection(sectionKey, { header: 'content', order: 100 });\n });\n\n app.events.once('load:menu-items', getAddContentMenuItems(app, sectionKey));\n\n app.events.once('load:custom:field:type', addFieldType => {\n Object.keys(formFieldTypes).forEach(type => {\n addFieldType({ type, component: formFieldTypes[type] });\n });\n });\n\n app.events.once('plugin:data-ui:load:loaded', async () => {\n await app.events.emitAsync('load:custom:field:type', getFormBuilderLookup.addFieldType);\n });\n\n const entityDataListingRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier`,\n key: 'entityDataListing',\n component: EntityDataListing,\n exact: true\n };\n\n const editEntityRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier/:action/:id`,\n key: 'editEntity',\n component: EntityManager,\n exact: true\n };\n\n const addEntityRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier/:action`,\n key: 'createEntity',\n component: EntityManager,\n exact: true\n };\n\n app.addRoute(entityDataListingRoute);\n app.addRoute(editEntityRoute);\n app.addRoute(addEntityRoute);\n\n return {\n name: PLUGIN_NAME,\n version: pkg.version\n };\n}\n\nload.pluginName = PLUGIN_NAME;\n"],"mappings":"AAAA,SAASA,oBAAoB,EAAEC,cAAc,QAAQ,+BAA+B;AACpF,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,GAAG,MAAM,iBAAiB;AACjC,SAASC,mBAAmB,EAAEC,WAAW,QAAQ,aAAa;AAC9D,OAAOC,sBAA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H,IAAI,EAAG,GAAEtB,mBAAoB,gCAA+B;IAC5DuB,GAAG,EAAE,YAAY;IACjBJ,SAAS,EAAEd,aAAa;IACxBmB,KAAK,EAAE;EACT,CAAC;EAED,MAAME,cAAc,GAAG;IACrBJ,IAAI,EAAG,GAAEtB,mBAAoB,4BAA2B;IACxDuB,GAAG,EAAE,cAAc;IACnBJ,SAAS,EAAEd,aAAa;IACxBmB,KAAK,EAAE;EACT,CAAC;EAEDjB,GAAG,CAACoB,QAAQ,CAACN,sBAAsB,CAAC;EACpCd,GAAG,CAACoB,QAAQ,CAACF,eAAe,CAAC;EAC7BlB,GAAG,CAACoB,QAAQ,CAACD,cAAc,CAAC;EAE5B,OAAO;IACLE,IAAI,EAAE3B,WAAW;IACjB4B,OAAO,EAAE9B,GAAG,CAAC8B;EACf,CAAC;AACH;AAEAvB,IAAI,CAACwB,UAAU,GAAG7B,WAAW"}
1
+ {"version":3,"file":"index.js","names":["getFormBuilderLookup","formFieldTypes","React","pkg","DATA_LISTING_PREFIX","PLUGIN_NAME","getAddContentMenuItems","EntityDataListing","lazy","EntityManager","load","app","sectionKey","events","once","addSection","header","order","addFieldType","Object","keys","forEach","type","component","emitAsync","entityDataListingRoute","path","key","exact","editEntityRoute","addEntityRoute","addRoute","name","version","pluginName"],"sources":["../src/index.js"],"sourcesContent":["import { getFormBuilderLookup, formFieldTypes } from '@blaze-cms/react-form-builder';\nimport React from 'react';\nimport pkg from '../package.json';\nimport { DATA_LISTING_PREFIX, PLUGIN_NAME } from './constants';\nimport getAddContentMenuItems from './utils/add-content-menu-items';\n\nconst EntityDataListing = React.lazy(() =>\n import(/* webpackChunkName: 'EntityDataListing' */ './components/EntityDataListing')\n);\nconst EntityManager = React.lazy(() =>\n import(/* webpackChunkName: 'EntityManager' */ './components/EntityManager')\n);\n\nexport default async function load(app) {\n // To load different plugin information into menu\n const sectionKey = 'content';\n\n app.events.once('load:menu-section', addSection => {\n addSection(sectionKey, { header: 'content', order: 100 });\n });\n\n app.events.once('load:menu-items', getAddContentMenuItems(app, sectionKey));\n\n app.events.once('load:custom:field:type', addFieldType => {\n Object.keys(formFieldTypes).forEach(type => {\n addFieldType({ type, component: formFieldTypes[type] });\n });\n });\n\n app.events.once('plugin:data-ui:load:loaded', async () => {\n await app.events.emitAsync('load:custom:field:type', getFormBuilderLookup.addFieldType);\n });\n\n const entityDataListingRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier`,\n key: 'entityDataListing',\n component: EntityDataListing,\n exact: true\n };\n\n const editEntityRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier/:action/:id`,\n key: 'editEntity',\n component: EntityManager,\n exact: true\n };\n\n const addEntityRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier/:action`,\n key: 'createEntity',\n component: EntityManager,\n exact: true\n };\n\n app.addRoute(entityDataListingRoute);\n app.addRoute(editEntityRoute);\n app.addRoute(addEntityRoute);\n\n return {\n name: PLUGIN_NAME,\n version: pkg.version\n };\n}\n\nload.pluginName = PLUGIN_NAME;\n"],"mappings":"AAAA,SAASA,oBAAoB,EAAEC,cAAc,QAAQ,+BAA+B;AACpF,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,GAAG,MAAM,iBAAiB;AACjC,SAASC,mBAAmB,EAAEC,WAAW,QAAQ,aAAa;AAC9D,OAAOC,sBAAsB,MAAM,gCAAgC;AAEnE,MAAMC,iBAAiB,GAAGL,KAAK,CAACM,IAAI,CAAC,MACnC,MAAM,EAAC,2CAA4C,gCAAgC,CAAC,CACrF;AACD,MAAMC,aAAa,GAAGP,KAAK,CAACM,IAAI,CAAC,MAC/B,MAAM,EAAC,uCAAwC,4BAA4B,CAAC,CAC7E;AAED,eAAe,eAAeE,IAAIA,CAACC,GAAG,EAAE;EACtC;EACA,MAAMC,UAAU,GAAG,SAAS;EAE5BD,GAAG,CAACE,MAAM,CAACC,IAAI,CAAC,mBAAmB,EAAEC,UAAU,IAAI;IACjDA,UAAU,CAACH,UAAU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AACoB,QAAQ,CAACD,cAAc,CAAC;EAE5B,OAAO;IACLE,IAAI,EAAE3B,WAAW;IACjB4B,OAAO,EAAE9B,GAAG,CAAC8B;EACf,CAAC;AACH;AAEAvB,IAAI,CAACwB,UAAU,GAAG7B,WAAW"}
@@ -1 +1 @@
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,sBAAsB,CAACC,GAAG,EAAEC,UAAU,EAAE;EAC/C,OAAO,MAAMC,OAAO,IAAI;IACtB,MAAMC,MAAM,GAAGH,GAAG,CAACI,SAAS,EAAE;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"}
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,EAAE;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"}
@@ -1 +1 @@
1
- {"version":3,"file":"build-create-entity-mutation.js","names":["gql","BlazeError","upperfirst","getDataProperties","buildCreateEntityMutation","entitySchema","actions","create","properties","actionInput","dataProperties","join"],"sources":["../../src/utils/build-create-entity-mutation.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport upperfirst from 'lodash.upperfirst';\nimport { getDataProperties } from '@blaze-cms/admin-ui-utils';\n\nfunction buildCreateEntityMutation(entitySchema) {\n if (\n !entitySchema ||\n !entitySchema.actions ||\n !entitySchema.actions.create ||\n !entitySchema.properties\n ) {\n throw new BlazeError(\n 'Create entity query requires create action and properties from entity schema'\n );\n }\n\n const actionInput = upperfirst(`${entitySchema.actions.create}Input`);\n const dataProperties = getDataProperties(entitySchema);\n\n return gql`mutation createEntity($input: ${actionInput}) {\n createdEntity: ${entitySchema.actions.create}(input: $input){\n result {\n id,\n ${dataProperties.join(',\\n')}\n }\n }\n }`;\n}\n\nexport default buildCreateEntityMutation;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AACnD,OAAOC,UAAU,MAAM,mBAAmB;AAC1C,SAASC,iBAAiB,QAAQ,2BAA2B;AAE7D,SAASC,yBAAyB,CAACC,YAAY,EAAE;EAC/C,IACE,CAACA,YAAY,IACb,CAACA,YAAY,CAACC,OAAO,IACrB,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,IAC5B,CAACF,YAAY,CAACG,UAAU,EACxB;IACA,MAAM,IAAIP,UAAU,CAClB,8EAA8E,CAC/E;EACH;EAEA,MAAMQ,WAAW,GAAGP,UAAU,CAAE,GAAEG,YAAY,CAACC,OAAO,CAACC,MAAO,OAAM,CAAC;EACrE,MAAMG,cAAc,GAAGP,iBAAiB,CAACE,YAAY,CAAC;EAEtD,OAAOL,GAAI,kCAAiCS,WAAY;AAC1D,qBAAqBJ,YAAY,CAACC,OAAO,CAACC,MAAO;AACjD;AACA;AACA,YAAYG,cAAc,CAACC,IAAI,CAAC,KAAK,CAAE;AACvC;AACA;AACA,IAAI;AACJ;AAEA,eAAeP,yBAAyB"}
1
+ {"version":3,"file":"build-create-entity-mutation.js","names":["gql","BlazeError","upperfirst","getDataProperties","buildCreateEntityMutation","entitySchema","actions","create","properties","actionInput","dataProperties","join"],"sources":["../../src/utils/build-create-entity-mutation.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport upperfirst from 'lodash.upperfirst';\nimport { getDataProperties } from '@blaze-cms/admin-ui-utils';\n\nfunction buildCreateEntityMutation(entitySchema) {\n if (\n !entitySchema ||\n !entitySchema.actions ||\n !entitySchema.actions.create ||\n !entitySchema.properties\n ) {\n throw new BlazeError(\n 'Create entity query requires create action and properties from entity schema'\n );\n }\n\n const actionInput = upperfirst(`${entitySchema.actions.create}Input`);\n const dataProperties = getDataProperties(entitySchema);\n\n return gql`mutation createEntity($input: ${actionInput}) {\n createdEntity: ${entitySchema.actions.create}(input: $input){\n result {\n id,\n ${dataProperties.join(',\\n')}\n }\n }\n }`;\n}\n\nexport default buildCreateEntityMutation;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AACnD,OAAOC,UAAU,MAAM,mBAAmB;AAC1C,SAASC,iBAAiB,QAAQ,2BAA2B;AAE7D,SAASC,yBAAyBA,CAACC,YAAY,EAAE;EAC/C,IACE,CAACA,YAAY,IACb,CAACA,YAAY,CAACC,OAAO,IACrB,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,IAC5B,CAACF,YAAY,CAACG,UAAU,EACxB;IACA,MAAM,IAAIP,UAAU,CAClB,8EAA8E,CAC/E;EACH;EAEA,MAAMQ,WAAW,GAAGP,UAAU,CAAE,GAAEG,YAAY,CAACC,OAAO,CAACC,MAAO,OAAM,CAAC;EACrE,MAAMG,cAAc,GAAGP,iBAAiB,CAACE,YAAY,CAAC;EAEtD,OAAOL,GAAI,kCAAiCS,WAAY;AAC1D,qBAAqBJ,YAAY,CAACC,OAAO,CAACC,MAAO;AACjD;AACA;AACA,YAAYG,cAAc,CAACC,IAAI,CAAC,KAAK,CAAE;AACvC;AACA;AACA,IAAI;AACJ;AAEA,eAAeP,yBAAyB"}
@@ -1 +1 @@
1
- {"version":3,"file":"build-delete-entity-mutation.js","names":["gql","BlazeError","upperfirst","buildDeleteEntity","entitySchema","actions","delete","actionInput"],"sources":["../../src/utils/build-delete-entity-mutation.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport upperfirst from 'lodash.upperfirst';\n\nfunction buildDeleteEntity(entitySchema) {\n if (!entitySchema || !entitySchema.actions || !entitySchema.actions.delete) {\n throw new BlazeError('Delete query requires delete action from entity schema');\n }\n\n const actionInput = upperfirst(`${entitySchema.actions.delete}Input`);\n\n return gql`\n mutation deleteEntity($input: ${actionInput}) {\n deleteEntity: ${entitySchema.actions.delete}(input: $input){\n result\n }\n }\n `;\n}\n\nexport default buildDeleteEntity;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AACnD,OAAOC,UAAU,MAAM,mBAAmB;AAE1C,SAASC,iBAAiB,CAACC,YAAY,EAAE;EACvC,IAAI,CAACA,YAAY,IAAI,CAACA,YAAY,CAACC,OAAO,IAAI,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,EAAE;IAC1E,MAAM,IAAIL,UAAU,CAAC,wDAAwD,CAAC;EAChF;EAEA,MAAMM,WAAW,GAAGL,UAAU,CAAE,GAAEE,YAAY,CAACC,OAAO,CAACC,MAAO,OAAM,CAAC;EAErE,OAAON,GAAI;AACb,mCAAmCO,WAAY;AAC/C,oBAAoBH,YAAY,CAACC,OAAO,CAACC,MAAO;AAChD;AACA;AACA;AACA,GAAG;AACH;AAEA,eAAeH,iBAAiB"}
1
+ {"version":3,"file":"build-delete-entity-mutation.js","names":["gql","BlazeError","upperfirst","buildDeleteEntity","entitySchema","actions","delete","actionInput"],"sources":["../../src/utils/build-delete-entity-mutation.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport upperfirst from 'lodash.upperfirst';\n\nfunction buildDeleteEntity(entitySchema) {\n if (!entitySchema || !entitySchema.actions || !entitySchema.actions.delete) {\n throw new BlazeError('Delete query requires delete action from entity schema');\n }\n\n const actionInput = upperfirst(`${entitySchema.actions.delete}Input`);\n\n return gql`\n mutation deleteEntity($input: ${actionInput}) {\n deleteEntity: ${entitySchema.actions.delete}(input: $input){\n result\n }\n }\n `;\n}\n\nexport default buildDeleteEntity;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AACnD,OAAOC,UAAU,MAAM,mBAAmB;AAE1C,SAASC,iBAAiBA,CAACC,YAAY,EAAE;EACvC,IAAI,CAACA,YAAY,IAAI,CAACA,YAAY,CAACC,OAAO,IAAI,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,EAAE;IAC1E,MAAM,IAAIL,UAAU,CAAC,wDAAwD,CAAC;EAChF;EAEA,MAAMM,WAAW,GAAGL,UAAU,CAAE,GAAEE,YAAY,CAACC,OAAO,CAACC,MAAO,OAAM,CAAC;EAErE,OAAON,GAAI;AACb,mCAAmCO,WAAY;AAC/C,oBAAoBH,YAAY,CAACC,OAAO,CAACC,MAAO;AAChD;AACA;AACA;AACA,GAAG;AACH;AAEA,eAAeH,iBAAiB"}
@@ -1 +1 @@
1
- {"version":3,"file":"build-listing-query.js","names":["gql","BlazeError","buildListingQuery","entitySchema","actions","getAll","listingProperties","sortType","toUpperCase","substr","join"],"sources":["../../src/utils/build-listing-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\n\nfunction buildListingQuery(entitySchema) {\n if (!entitySchema.actions || !entitySchema.actions.getAll || !entitySchema.listingProperties) {\n throw new BlazeError(\n 'Listing query requires getAll action and listingProperties from entity schema'\n );\n }\n\n const sortType =\n entitySchema.actions.getAll[0].toUpperCase() + entitySchema.actions.getAll.substr(1);\n\n return gql`\n query ${\n entitySchema.actions.getAll\n }($where: JSON, $limit: Int, $offset:Int, $sort: [${sortType}SortItem]) {\n listingData: ${\n entitySchema.actions.getAll\n }(where: $where, limit: $limit, offset:$offset, sort:$sort){\n id,\n ${entitySchema.listingProperties.join(',\\n')}\n }\n }\n `;\n}\n\nexport default buildListingQuery;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AAEnD,SAASC,iBAAiB,CAACC,YAAY,EAAE;EACvC,IAAI,CAACA,YAAY,CAACC,OAAO,IAAI,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,IAAI,CAACF,YAAY,CAACG,iBAAiB,EAAE;IAC5F,MAAM,IAAIL,UAAU,CAClB,+EAA+E,CAChF;EACH;EAEA,MAAMM,QAAQ,GACZJ,YAAY,CAACC,OAAO,CAACC,MAAM,CAAC,CAAC,CAAC,CAACG,WAAW,EAAE,GAAGL,YAAY,CAACC,OAAO,CAACC,MAAM,CAACI,MAAM,CAAC,CAAC,CAAC;EAEtF,OAAOT,GAAI;AACb,YACMG,YAAY,CAACC,OAAO,CAACC,MACtB,oDAAmDE,QAAS;AACjE,qBACQJ,YAAY,CAACC,OAAO,CAACC,MACtB;AACP;AACA,UAAUF,YAAY,CAACG,iBAAiB,CAACI,IAAI,CAAC,KAAK,CAAE;AACrD;AACA;AACA,GAAG;AACH;AAEA,eAAeR,iBAAiB"}
1
+ {"version":3,"file":"build-listing-query.js","names":["gql","BlazeError","buildListingQuery","entitySchema","actions","getAll","listingProperties","sortType","toUpperCase","substr","join"],"sources":["../../src/utils/build-listing-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\n\nfunction buildListingQuery(entitySchema) {\n if (!entitySchema.actions || !entitySchema.actions.getAll || !entitySchema.listingProperties) {\n throw new BlazeError(\n 'Listing query requires getAll action and listingProperties from entity schema'\n );\n }\n\n const sortType =\n entitySchema.actions.getAll[0].toUpperCase() + entitySchema.actions.getAll.substr(1);\n\n return gql`\n query ${\n entitySchema.actions.getAll\n }($where: JSON, $limit: Int, $offset:Int, $sort: [${sortType}SortItem]) {\n listingData: ${\n entitySchema.actions.getAll\n }(where: $where, limit: $limit, offset:$offset, sort:$sort){\n id,\n ${entitySchema.listingProperties.join(',\\n')}\n }\n }\n `;\n}\n\nexport default buildListingQuery;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AAEnD,SAASC,iBAAiBA,CAACC,YAAY,EAAE;EACvC,IAAI,CAACA,YAAY,CAACC,OAAO,IAAI,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,IAAI,CAACF,YAAY,CAACG,iBAAiB,EAAE;IAC5F,MAAM,IAAIL,UAAU,CAClB,+EAA+E,CAChF;EACH;EAEA,MAAMM,QAAQ,GACZJ,YAAY,CAACC,OAAO,CAACC,MAAM,CAAC,CAAC,CAAC,CAACG,WAAW,EAAE,GAAGL,YAAY,CAACC,OAAO,CAACC,MAAM,CAACI,MAAM,CAAC,CAAC,CAAC;EAEtF,OAAOT,GAAI;AACb,YACMG,YAAY,CAACC,OAAO,CAACC,MACtB,oDAAmDE,QAAS;AACjE,qBACQJ,YAAY,CAACC,OAAO,CAACC,MACtB;AACP;AACA,UAAUF,YAAY,CAACG,iBAAiB,CAACI,IAAI,CAAC,KAAK,CAAE;AACrD;AACA;AACA,GAAG;AACH;AAEA,eAAeR,iBAAiB"}
@@ -1 +1 @@
1
- {"version":3,"file":"build-update-data-query.js","names":["gql","BlazeError","upperfirst","getDataProperties","buildUpdateDataQuery","entitySchema","actions","update","properties","actionInput","dataProperties","join"],"sources":["../../src/utils/build-update-data-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport upperfirst from 'lodash.upperfirst';\nimport { getDataProperties } from '@blaze-cms/admin-ui-utils';\n\nfunction buildUpdateDataQuery(entitySchema) {\n if (!entitySchema.actions || !entitySchema.actions.update || !entitySchema.properties) {\n throw new BlazeError(\n 'Update DataEntity query requires get action and properties from entity schema'\n );\n }\n\n const actionInput = upperfirst(`${entitySchema.actions.update}Input`);\n const dataProperties = getDataProperties(entitySchema);\n\n return gql`\n mutation updateEntity($input: ${actionInput}) {\n updateEntity: ${entitySchema.actions.update}(input: $input){\n result {\n id,\n ${dataProperties.join(',\\n')},\n updated\n }\n }\n }\n `;\n}\n\nexport default buildUpdateDataQuery;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AACnD,OAAOC,UAAU,MAAM,mBAAmB;AAC1C,SAASC,iBAAiB,QAAQ,2BAA2B;AAE7D,SAASC,oBAAoB,CAACC,YAAY,EAAE;EAC1C,IAAI,CAACA,YAAY,CAACC,OAAO,IAAI,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,IAAI,CAACF,YAAY,CAACG,UAAU,EAAE;IACrF,MAAM,IAAIP,UAAU,CAClB,+EAA+E,CAChF;EACH;EAEA,MAAMQ,WAAW,GAAGP,UAAU,CAAE,GAAEG,YAAY,CAACC,OAAO,CAACC,MAAO,OAAM,CAAC;EACrE,MAAMG,cAAc,GAAGP,iBAAiB,CAACE,YAAY,CAAC;EAEtD,OAAOL,GAAI;AACb,mCAAmCS,WAAY;AAC/C,oBAAoBJ,YAAY,CAACC,OAAO,CAACC,MAAO;AAChD;AACA;AACA,YAAYG,cAAc,CAACC,IAAI,CAAC,KAAK,CAAE;AACvC;AACA;AACA;AACA;AACA,GAAG;AACH;AAEA,eAAeP,oBAAoB"}
1
+ {"version":3,"file":"build-update-data-query.js","names":["gql","BlazeError","upperfirst","getDataProperties","buildUpdateDataQuery","entitySchema","actions","update","properties","actionInput","dataProperties","join"],"sources":["../../src/utils/build-update-data-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport upperfirst from 'lodash.upperfirst';\nimport { getDataProperties } from '@blaze-cms/admin-ui-utils';\n\nfunction buildUpdateDataQuery(entitySchema) {\n if (!entitySchema.actions || !entitySchema.actions.update || !entitySchema.properties) {\n throw new BlazeError(\n 'Update DataEntity query requires get action and properties from entity schema'\n );\n }\n\n const actionInput = upperfirst(`${entitySchema.actions.update}Input`);\n const dataProperties = getDataProperties(entitySchema);\n\n return gql`\n mutation updateEntity($input: ${actionInput}) {\n updateEntity: ${entitySchema.actions.update}(input: $input){\n result {\n id,\n ${dataProperties.join(',\\n')},\n updated\n }\n }\n }\n `;\n}\n\nexport default buildUpdateDataQuery;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AACnD,OAAOC,UAAU,MAAM,mBAAmB;AAC1C,SAASC,iBAAiB,QAAQ,2BAA2B;AAE7D,SAASC,oBAAoBA,CAACC,YAAY,EAAE;EAC1C,IAAI,CAACA,YAAY,CAACC,OAAO,IAAI,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,IAAI,CAACF,YAAY,CAACG,UAAU,EAAE;IACrF,MAAM,IAAIP,UAAU,CAClB,+EAA+E,CAChF;EACH;EAEA,MAAMQ,WAAW,GAAGP,UAAU,CAAE,GAAEG,YAAY,CAACC,OAAO,CAACC,MAAO,OAAM,CAAC;EACrE,MAAMG,cAAc,GAAGP,iBAAiB,CAACE,YAAY,CAAC;EAEtD,OAAOL,GAAI;AACb,mCAAmCS,WAAY;AAC/C,oBAAoBJ,YAAY,CAACC,OAAO,CAACC,MAAO;AAChD;AACA;AACA,YAAYG,cAAc,CAACC,IAAI,CAAC,KAAK,CAAE;AACvC;AACA;AACA;AACA;AACA,GAAG;AACH;AAEA,eAAeP,oBAAoB"}
@@ -1 +1 @@
1
- {"version":3,"file":"build-update-publish-unpublish-mutation.js","names":["gql","BlazeError","buildUpdatePublishUnpublishMutation","entitySchema","id","action","cache","actions","publish","withClient"],"sources":["../../src/utils/build-update-publish-unpublish-mutation.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\n\nfunction buildUpdatePublishUnpublishMutation(entitySchema, id, action, cache) {\n if (!entitySchema || !entitySchema.actions || !entitySchema.actions.publish || !id || !action) {\n throw new BlazeError(\n 'Update DataEntity query requires publish action from entity schema and id'\n );\n }\n\n const withClient = `${cache ? '@client' : ''}`;\n\n return gql`\n mutation {\n response: ${entitySchema.actions[action]} ${withClient}(input: {\n id: \"${id}\"\n }){\n result {\n id,\n status\n }\n }\n }\n `;\n}\n\nexport default buildUpdatePublishUnpublishMutation;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AAEnD,SAASC,mCAAmC,CAACC,YAAY,EAAEC,EAAE,EAAEC,MAAM,EAAEC,KAAK,EAAE;EAC5E,IAAI,CAACH,YAAY,IAAI,CAACA,YAAY,CAACI,OAAO,IAAI,CAACJ,YAAY,CAACI,OAAO,CAACC,OAAO,IAAI,CAACJ,EAAE,IAAI,CAACC,MAAM,EAAE;IAC7F,MAAM,IAAIJ,UAAU,CAClB,2EAA2E,CAC5E;EACH;EAEA,MAAMQ,UAAU,GAAI,GAAEH,KAAK,GAAG,SAAS,GAAG,EAAG,EAAC;EAE9C,OAAON,GAAI;AACb;AACA,kBAAkBG,YAAY,CAACI,OAAO,CAACF,MAAM,CAAE,IAAGI,UAAW;AAC7D,eAAeL,EAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AAEA,eAAeF,mCAAmC"}
1
+ {"version":3,"file":"build-update-publish-unpublish-mutation.js","names":["gql","BlazeError","buildUpdatePublishUnpublishMutation","entitySchema","id","action","cache","actions","publish","withClient"],"sources":["../../src/utils/build-update-publish-unpublish-mutation.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\n\nfunction buildUpdatePublishUnpublishMutation(entitySchema, id, action, cache) {\n if (!entitySchema || !entitySchema.actions || !entitySchema.actions.publish || !id || !action) {\n throw new BlazeError(\n 'Update DataEntity query requires publish action from entity schema and id'\n );\n }\n\n const withClient = `${cache ? '@client' : ''}`;\n\n return gql`\n mutation {\n response: ${entitySchema.actions[action]} ${withClient}(input: {\n id: \"${id}\"\n }){\n result {\n id,\n status\n }\n }\n }\n `;\n}\n\nexport default buildUpdatePublishUnpublishMutation;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AAEnD,SAASC,mCAAmCA,CAACC,YAAY,EAAEC,EAAE,EAAEC,MAAM,EAAEC,KAAK,EAAE;EAC5E,IAAI,CAACH,YAAY,IAAI,CAACA,YAAY,CAACI,OAAO,IAAI,CAACJ,YAAY,CAACI,OAAO,CAACC,OAAO,IAAI,CAACJ,EAAE,IAAI,CAACC,MAAM,EAAE;IAC7F,MAAM,IAAIJ,UAAU,CAClB,2EAA2E,CAC5E;EACH;EAEA,MAAMQ,UAAU,GAAI,GAAEH,KAAK,GAAG,SAAS,GAAG,EAAG,EAAC;EAE9C,OAAON,GAAI;AACb;AACA,kBAAkBG,YAAY,CAACI,OAAO,CAACF,MAAM,CAAE,IAAGI,UAAW;AAC7D,eAAeL,EAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AAEA,eAAeF,mCAAmC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-default-query-params.js","names":["getDefaultQueryParams","schema","updated","properties","adminDefaultListingFilter","where","displayProperties","limit","offset","sort","property","direction"],"sources":["../../src/utils/get-default-query-params.js"],"sourcesContent":["const getDefaultQueryParams = ({ schema }) => {\n const updated = schema.properties && schema.properties.updated;\n const { adminDefaultListingFilter: where } = schema.displayProperties || {};\n\n return {\n where,\n limit: 40,\n offset: 0,\n sort: updated\n ? [\n {\n property: 'updated',\n direction: 'desc'\n }\n ]\n : []\n };\n};\n\nexport { getDefaultQueryParams };\n"],"mappings":"AAAA,MAAMA,qBAAqB,GAAG,CAAC;EAAEC;AAAO,CAAC,KAAK;EAC5C,MAAMC,OAAO,GAAGD,MAAM,CAACE,UAAU,IAAIF,MAAM,CAACE,UAAU,CAACD,OAAO;EAC9D,MAAM;IAAEE,yBAAyB,EAAEC;EAAM,CAAC,GAAGJ,MAAM,CAACK,iBAAiB,IAAI,CAAC,CAAC;EAE3E,OAAO;IACLD,KAAK;IACLE,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAEP,OAAO,GACT,CACE;MACEQ,QAAQ,EAAE,SAAS;MACnBC,SAAS,EAAE;IACb,CAAC,CACF,GACD;EACN,CAAC;AACH,CAAC;AAED,SAASX,qBAAqB"}
1
+ {"version":3,"file":"get-default-query-params.js","names":["getDefaultQueryParams","schema","updated","properties","adminDefaultListingFilter","where","displayProperties","limit","offset","sort","property","direction"],"sources":["../../src/utils/get-default-query-params.js"],"sourcesContent":["const getDefaultQueryParams = ({ schema }) => {\n const updated = schema.properties && schema.properties.updated;\n const { adminDefaultListingFilter: where } = schema.displayProperties || {};\n\n return {\n where,\n limit: 40,\n offset: 0,\n sort: updated\n ? [\n {\n property: 'updated',\n direction: 'desc'\n }\n ]\n : []\n };\n};\n\nexport { getDefaultQueryParams };\n"],"mappings":"AAAA,MAAMA,qBAAqB,GAAGA,CAAC;EAAEC;AAAO,CAAC,KAAK;EAC5C,MAAMC,OAAO,GAAGD,MAAM,CAACE,UAAU,IAAIF,MAAM,CAACE,UAAU,CAACD,OAAO;EAC9D,MAAM;IAAEE,yBAAyB,EAAEC;EAAM,CAAC,GAAGJ,MAAM,CAACK,iBAAiB,IAAI,CAAC,CAAC;EAE3E,OAAO;IACLD,KAAK;IACLE,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAEP,OAAO,GACT,CACE;MACEQ,QAAQ,EAAE,SAAS;MACnBC,SAAS,EAAE;IACb,CAAC,CACF,GACD;EACN,CAAC;AACH,CAAC;AAED,SAASX,qBAAqB"}
@@ -1 +1 @@
1
- {"version":3,"file":"withContext.js","names":["React","useMainContext","MainContext","withContext","Component","props","contexts"],"sources":["../../../src/utils/hoc/withContext.js"],"sourcesContent":["import React from 'react';\nimport { useMainContext, MainContext } from '@blaze-cms/admin-ui-utils';\n\nexport const withContext = Component => props => {\n const contexts = useMainContext(MainContext);\n return <Component {...props} {...contexts} />;\n};\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,EAAEC,WAAW,QAAQ,2BAA2B;AAEvE,OAAO,MAAMC,WAAW,GAAGC,SAAS,IAAIC,KAAK,IAAI;EAC/C,MAAMC,QAAQ,GAAGL,cAAc,CAACC,WAAW,CAAC;EAC5C,oBAAO,oBAAC,SAAS,eAAKG,KAAK,EAAMC,QAAQ,EAAI;AAC/C,CAAC"}
1
+ {"version":3,"file":"withContext.js","names":["React","useMainContext","MainContext","withContext","Component","props","contexts","createElement","_extends"],"sources":["../../../src/utils/hoc/withContext.js"],"sourcesContent":["import React from 'react';\nimport { useMainContext, MainContext } from '@blaze-cms/admin-ui-utils';\n\nexport const withContext = Component => props => {\n const contexts = useMainContext(MainContext);\n return <Component {...props} {...contexts} />;\n};\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,EAAEC,WAAW,QAAQ,2BAA2B;AAEvE,OAAO,MAAMC,WAAW,GAAGC,SAAS,IAAIC,KAAK,IAAI;EAC/C,MAAMC,QAAQ,GAAGL,cAAc,CAACC,WAAW,CAAC;EAC5C,oBAAOF,KAAA,CAAAO,aAAA,CAACH,SAAS,EAAAI,QAAA,KAAKH,KAAK,EAAMC,QAAQ,EAAI;AAC/C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useToggle.js","names":["useState","useCallback","useToggle","initialValue","toggleValue","setToggleValue","toggler"],"sources":["../../../src/utils/hooks/useToggle.js"],"sourcesContent":["import { useState, useCallback } from 'react';\n\nfunction useToggle(initialValue) {\n const [toggleValue, setToggleValue] = useState(initialValue);\n const toggler = useCallback(() => setToggleValue(!toggleValue), [toggleValue]);\n\n return [toggleValue, toggler];\n}\n\nexport default useToggle;\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AAE7C,SAASC,SAAS,CAACC,YAAY,EAAE;EAC/B,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGL,QAAQ,CAACG,YAAY,CAAC;EAC5D,MAAMG,OAAO,GAAGL,WAAW,CAAC,MAAMI,cAAc,CAAC,CAACD,WAAW,CAAC,EAAE,CAACA,WAAW,CAAC,CAAC;EAE9E,OAAO,CAACA,WAAW,EAAEE,OAAO,CAAC;AAC/B;AAEA,eAAeJ,SAAS"}
1
+ {"version":3,"file":"useToggle.js","names":["useState","useCallback","useToggle","initialValue","toggleValue","setToggleValue","toggler"],"sources":["../../../src/utils/hooks/useToggle.js"],"sourcesContent":["import { useState, useCallback } from 'react';\n\nfunction useToggle(initialValue) {\n const [toggleValue, setToggleValue] = useState(initialValue);\n const toggler = useCallback(() => setToggleValue(!toggleValue), [toggleValue]);\n\n return [toggleValue, toggler];\n}\n\nexport default useToggle;\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AAE7C,SAASC,SAASA,CAACC,YAAY,EAAE;EAC/B,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGL,QAAQ,CAACG,YAAY,CAAC;EAC5D,MAAMG,OAAO,GAAGL,WAAW,CAAC,MAAMI,cAAc,CAAC,CAACD,WAAW,CAAC,EAAE,CAACA,WAAW,CAAC,CAAC;EAE9E,OAAO,CAACA,WAAW,EAAEE,OAAO,CAAC;AAC/B;AAEA,eAAeJ,SAAS"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaze-cms/plugin-data-ui",
3
- "version": "0.128.0-admin-updates.0",
3
+ "version": "0.128.0-admin-updates.5",
4
4
  "description": "Blaze plugin data ui",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-es/index.js",
@@ -27,10 +27,10 @@
27
27
  },
28
28
  "license": "GPL-3.0",
29
29
  "dependencies": {
30
- "@blaze-cms/admin-ui-utils": "0.128.0-admin-updates.0",
30
+ "@blaze-cms/admin-ui-utils": "0.128.0-admin-updates.3",
31
31
  "@blaze-cms/core-errors": "0.128.0-admin-updates.0",
32
- "@blaze-cms/react-form-builder": "0.128.0-admin-updates.0",
33
- "@blaze-cms/react-page-builder": "0.128.0-admin-updates.0",
32
+ "@blaze-cms/react-form-builder": "0.128.0-admin-updates.3",
33
+ "@blaze-cms/react-page-builder": "0.128.0-admin-updates.5",
34
34
  "@blaze-cms/setup-ui": "0.128.0-admin-updates.0",
35
35
  "@blaze-cms/versioning-ui": "0.128.0-admin-updates.0",
36
36
  "@blaze-react/button": "0.5.19",
@@ -65,5 +65,5 @@
65
65
  "lib/*",
66
66
  "lib-es/*"
67
67
  ],
68
- "gitHead": "ad3389e954fe463366655311efb1198191dbb625"
68
+ "gitHead": "6dc291cfd27848dd80149526f6f26c4a0d17a708"
69
69
  }