@blaze-cms/plugin-data-ui 0.122.1 → 0.122.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 (94) hide show
  1. package/CHANGELOG.md +24 -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/EntityDataListing/index.js.map +1 -1
  50. package/lib-es/components/EntityManager/Entity/Entity.js.map +1 -1
  51. package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  52. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  53. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
  54. package/lib-es/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
  55. package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  56. package/lib-es/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
  57. package/lib-es/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  58. package/lib-es/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
  59. package/lib-es/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
  60. package/lib-es/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
  61. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
  62. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  63. package/lib-es/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
  64. package/lib-es/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
  65. package/lib-es/components/EntityManager/Entity/index.js.map +1 -1
  66. package/lib-es/components/EntityManager/EntityManager.js.map +1 -1
  67. package/lib-es/components/EntityManager/index.js.map +1 -1
  68. package/lib-es/components/EntityManager/utils/data-mappers.js.map +1 -1
  69. package/lib-es/components/EntityManager/utils/entity.js.map +1 -1
  70. package/lib-es/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
  71. package/lib-es/components/EntityManager/utils/is-form-empty.js.map +1 -1
  72. package/lib-es/components/EntityManager/utils/query.js.map +1 -1
  73. package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
  74. package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  75. package/lib-es/components/ListingTable/ListingTableContent/index.js.map +1 -1
  76. package/lib-es/components/ListingTable/TableActions/TableActions.js.map +1 -1
  77. package/lib-es/components/ListingTable/TableActions/index.js.map +1 -1
  78. package/lib-es/components/ListingTable/index.js.map +1 -1
  79. package/lib-es/components/ListingTable/mappers/populate-rows.js.map +1 -1
  80. package/lib-es/components/ListingTable/service/index.js.map +1 -1
  81. package/lib-es/components/Tabs/index.js.map +1 -1
  82. package/lib-es/constants.js.map +1 -1
  83. package/lib-es/index.js.map +1 -1
  84. package/lib-es/utils/add-content-menu-items.js.map +1 -1
  85. package/lib-es/utils/build-create-entity-mutation.js.map +1 -1
  86. package/lib-es/utils/build-delete-entity-mutation.js.map +1 -1
  87. package/lib-es/utils/build-listing-query.js.map +1 -1
  88. package/lib-es/utils/build-update-data-query.js.map +1 -1
  89. package/lib-es/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  90. package/lib-es/utils/get-default-query-params.js.map +1 -1
  91. package/lib-es/utils/hoc/withContext.js.map +1 -1
  92. package/lib-es/utils/hooks/useToggle.js.map +1 -1
  93. package/lib-es/utils/index.js.map +1 -1
  94. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/build-create-entity-mutation.js"],"names":["gql","BlazeError","upperfirst","getDataProperties","buildCreateEntityMutation","entitySchema","actions","create","properties","actionInput","dataProperties","join"],"mappings":"AAAA,SAASA,GAAT,QAAoB,gBAApB;AACA,SAASC,UAAT,QAA2B,wBAA3B;AACA,OAAOC,UAAP,MAAuB,mBAAvB;AACA,SAASC,iBAAT,QAAkC,2BAAlC;;AAEA,SAASC,yBAAT,CAAmCC,YAAnC,EAAiD;AAC/C,MACE,CAACA,YAAD,IACA,CAACA,YAAY,CAACC,OADd,IAEA,CAACD,YAAY,CAACC,OAAb,CAAqBC,MAFtB,IAGA,CAACF,YAAY,CAACG,UAJhB,EAKE;AACA,UAAM,IAAIP,UAAJ,CACJ,8EADI,CAAN;AAGD;;AAED,QAAMQ,WAAW,GAAGP,UAAU,CAAE,GAAEG,YAAY,CAACC,OAAb,CAAqBC,MAAO,OAAhC,CAA9B;AACA,QAAMG,cAAc,GAAGP,iBAAiB,CAACE,YAAD,CAAxC;AAEA,SAAOL,GAAI,kCAAiCS,WAAY;AAC1D,qBAAqBJ,YAAY,CAACC,OAAb,CAAqBC,MAAO;AACjD;AACA;AACA,YAAYG,cAAc,CAACC,IAAf,CAAoB,KAApB,CAA2B;AACvC;AACA;AACA,IAPE;AAQD;;AAED,eAAeP,yBAAf","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"],"file":"build-create-entity-mutation.js"}
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,GAAT,QAAoB,gBAApB;AACA,SAASC,UAAT,QAA2B,wBAA3B;AACA,OAAOC,UAAP,MAAuB,mBAAvB;AACA,SAASC,iBAAT,QAAkC,2BAAlC;;AAEA,SAASC,yBAAT,CAAmCC,YAAnC,EAAiD;EAC/C,IACE,CAACA,YAAD,IACA,CAACA,YAAY,CAACC,OADd,IAEA,CAACD,YAAY,CAACC,OAAb,CAAqBC,MAFtB,IAGA,CAACF,YAAY,CAACG,UAJhB,EAKE;IACA,MAAM,IAAIP,UAAJ,CACJ,8EADI,CAAN;EAGD;;EAED,MAAMQ,WAAW,GAAGP,UAAU,CAAE,GAAEG,YAAY,CAACC,OAAb,CAAqBC,MAAO,OAAhC,CAA9B;EACA,MAAMG,cAAc,GAAGP,iBAAiB,CAACE,YAAD,CAAxC;EAEA,OAAOL,GAAI,kCAAiCS,WAAY;AAC1D,qBAAqBJ,YAAY,CAACC,OAAb,CAAqBC,MAAO;AACjD;AACA;AACA,YAAYG,cAAc,CAACC,IAAf,CAAoB,KAApB,CAA2B;AACvC;AACA;AACA,IAPE;AAQD;;AAED,eAAeP,yBAAf"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/build-delete-entity-mutation.js"],"names":["gql","BlazeError","upperfirst","buildDeleteEntity","entitySchema","actions","delete","actionInput"],"mappings":"AAAA,SAASA,GAAT,QAAoB,gBAApB;AACA,SAASC,UAAT,QAA2B,wBAA3B;AACA,OAAOC,UAAP,MAAuB,mBAAvB;;AAEA,SAASC,iBAAT,CAA2BC,YAA3B,EAAyC;AACvC,MAAI,CAACA,YAAD,IAAiB,CAACA,YAAY,CAACC,OAA/B,IAA0C,CAACD,YAAY,CAACC,OAAb,CAAqBC,MAApE,EAA4E;AAC1E,UAAM,IAAIL,UAAJ,CAAe,wDAAf,CAAN;AACD;;AAED,QAAMM,WAAW,GAAGL,UAAU,CAAE,GAAEE,YAAY,CAACC,OAAb,CAAqBC,MAAO,OAAhC,CAA9B;AAEA,SAAON,GAAI;AACb,mCAAmCO,WAAY;AAC/C,oBAAoBH,YAAY,CAACC,OAAb,CAAqBC,MAAO;AAChD;AACA;AACA;AACA,GANE;AAOD;;AAED,eAAeH,iBAAf","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"],"file":"build-delete-entity-mutation.js"}
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,GAAT,QAAoB,gBAApB;AACA,SAASC,UAAT,QAA2B,wBAA3B;AACA,OAAOC,UAAP,MAAuB,mBAAvB;;AAEA,SAASC,iBAAT,CAA2BC,YAA3B,EAAyC;EACvC,IAAI,CAACA,YAAD,IAAiB,CAACA,YAAY,CAACC,OAA/B,IAA0C,CAACD,YAAY,CAACC,OAAb,CAAqBC,MAApE,EAA4E;IAC1E,MAAM,IAAIL,UAAJ,CAAe,wDAAf,CAAN;EACD;;EAED,MAAMM,WAAW,GAAGL,UAAU,CAAE,GAAEE,YAAY,CAACC,OAAb,CAAqBC,MAAO,OAAhC,CAA9B;EAEA,OAAON,GAAI;AACb,mCAAmCO,WAAY;AAC/C,oBAAoBH,YAAY,CAACC,OAAb,CAAqBC,MAAO;AAChD;AACA;AACA;AACA,GANE;AAOD;;AAED,eAAeH,iBAAf"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/build-listing-query.js"],"names":["gql","BlazeError","buildListingQuery","entitySchema","actions","getAll","listingProperties","sortType","toUpperCase","substr","join"],"mappings":"AAAA,SAASA,GAAT,QAAoB,gBAApB;AACA,SAASC,UAAT,QAA2B,wBAA3B;;AAEA,SAASC,iBAAT,CAA2BC,YAA3B,EAAyC;AACvC,MAAI,CAACA,YAAY,CAACC,OAAd,IAAyB,CAACD,YAAY,CAACC,OAAb,CAAqBC,MAA/C,IAAyD,CAACF,YAAY,CAACG,iBAA3E,EAA8F;AAC5F,UAAM,IAAIL,UAAJ,CACJ,+EADI,CAAN;AAGD;;AAED,QAAMM,QAAQ,GACZJ,YAAY,CAACC,OAAb,CAAqBC,MAArB,CAA4B,CAA5B,EAA+BG,WAA/B,KAA+CL,YAAY,CAACC,OAAb,CAAqBC,MAArB,CAA4BI,MAA5B,CAAmC,CAAnC,CADjD;AAGA,SAAOT,GAAI;AACb,YAAYG,YAAY,CAACC,OAAb,CAAqBC,MAAO,sCAAqCE,QAAS;AACtF,qBAAqBJ,YAAY,CAACC,OAAb,CAAqBC,MAAO;AACjD;AACA,UAAUF,YAAY,CAACG,iBAAb,CAA+BI,IAA/B,CAAoC,KAApC,CAA2C;AACrD;AACA;AACA,GAPE;AAQD;;AAED,eAAeR,iBAAf","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 ${entitySchema.actions.getAll}($limit: Int, $offset:Int, $sort: [${sortType}SortItem]) {\n listingData: ${entitySchema.actions.getAll}(limit: $limit, offset:$offset, sort:$sort){\n id,\n ${entitySchema.listingProperties.join(',\\n')}\n }\n }\n `;\n}\n\nexport default buildListingQuery;\n"],"file":"build-listing-query.js"}
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 ${entitySchema.actions.getAll}($limit: Int, $offset:Int, $sort: [${sortType}SortItem]) {\n listingData: ${entitySchema.actions.getAll}(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,GAAT,QAAoB,gBAApB;AACA,SAASC,UAAT,QAA2B,wBAA3B;;AAEA,SAASC,iBAAT,CAA2BC,YAA3B,EAAyC;EACvC,IAAI,CAACA,YAAY,CAACC,OAAd,IAAyB,CAACD,YAAY,CAACC,OAAb,CAAqBC,MAA/C,IAAyD,CAACF,YAAY,CAACG,iBAA3E,EAA8F;IAC5F,MAAM,IAAIL,UAAJ,CACJ,+EADI,CAAN;EAGD;;EAED,MAAMM,QAAQ,GACZJ,YAAY,CAACC,OAAb,CAAqBC,MAArB,CAA4B,CAA5B,EAA+BG,WAA/B,KAA+CL,YAAY,CAACC,OAAb,CAAqBC,MAArB,CAA4BI,MAA5B,CAAmC,CAAnC,CADjD;EAGA,OAAOT,GAAI;AACb,YAAYG,YAAY,CAACC,OAAb,CAAqBC,MAAO,sCAAqCE,QAAS;AACtF,qBAAqBJ,YAAY,CAACC,OAAb,CAAqBC,MAAO;AACjD;AACA,UAAUF,YAAY,CAACG,iBAAb,CAA+BI,IAA/B,CAAoC,KAApC,CAA2C;AACrD;AACA;AACA,GAPE;AAQD;;AAED,eAAeR,iBAAf"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/build-update-data-query.js"],"names":["gql","BlazeError","upperfirst","getDataProperties","buildUpdateDataQuery","entitySchema","actions","update","properties","actionInput","dataProperties","join"],"mappings":"AAAA,SAASA,GAAT,QAAoB,gBAApB;AACA,SAASC,UAAT,QAA2B,wBAA3B;AACA,OAAOC,UAAP,MAAuB,mBAAvB;AACA,SAASC,iBAAT,QAAkC,2BAAlC;;AAEA,SAASC,oBAAT,CAA8BC,YAA9B,EAA4C;AAC1C,MAAI,CAACA,YAAY,CAACC,OAAd,IAAyB,CAACD,YAAY,CAACC,OAAb,CAAqBC,MAA/C,IAAyD,CAACF,YAAY,CAACG,UAA3E,EAAuF;AACrF,UAAM,IAAIP,UAAJ,CACJ,+EADI,CAAN;AAGD;;AAED,QAAMQ,WAAW,GAAGP,UAAU,CAAE,GAAEG,YAAY,CAACC,OAAb,CAAqBC,MAAO,OAAhC,CAA9B;AACA,QAAMG,cAAc,GAAGP,iBAAiB,CAACE,YAAD,CAAxC;AAEA,SAAOL,GAAI;AACb,mCAAmCS,WAAY;AAC/C,oBAAoBJ,YAAY,CAACC,OAAb,CAAqBC,MAAO;AAChD;AACA;AACA,YAAYG,cAAc,CAACC,IAAf,CAAoB,KAApB,CAA2B;AACvC;AACA;AACA;AACA;AACA,GAVE;AAWD;;AAED,eAAeP,oBAAf","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"],"file":"build-update-data-query.js"}
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,GAAT,QAAoB,gBAApB;AACA,SAASC,UAAT,QAA2B,wBAA3B;AACA,OAAOC,UAAP,MAAuB,mBAAvB;AACA,SAASC,iBAAT,QAAkC,2BAAlC;;AAEA,SAASC,oBAAT,CAA8BC,YAA9B,EAA4C;EAC1C,IAAI,CAACA,YAAY,CAACC,OAAd,IAAyB,CAACD,YAAY,CAACC,OAAb,CAAqBC,MAA/C,IAAyD,CAACF,YAAY,CAACG,UAA3E,EAAuF;IACrF,MAAM,IAAIP,UAAJ,CACJ,+EADI,CAAN;EAGD;;EAED,MAAMQ,WAAW,GAAGP,UAAU,CAAE,GAAEG,YAAY,CAACC,OAAb,CAAqBC,MAAO,OAAhC,CAA9B;EACA,MAAMG,cAAc,GAAGP,iBAAiB,CAACE,YAAD,CAAxC;EAEA,OAAOL,GAAI;AACb,mCAAmCS,WAAY;AAC/C,oBAAoBJ,YAAY,CAACC,OAAb,CAAqBC,MAAO;AAChD;AACA;AACA,YAAYG,cAAc,CAACC,IAAf,CAAoB,KAApB,CAA2B;AACvC;AACA;AACA;AACA;AACA,GAVE;AAWD;;AAED,eAAeP,oBAAf"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/build-update-publish-unpublish-mutation.js"],"names":["gql","BlazeError","buildUpdatePublishUnpublishMutation","entitySchema","id","action","cache","actions","publish","withClient"],"mappings":"AAAA,SAASA,GAAT,QAAoB,gBAApB;AACA,SAASC,UAAT,QAA2B,wBAA3B;;AAEA,SAASC,mCAAT,CAA6CC,YAA7C,EAA2DC,EAA3D,EAA+DC,MAA/D,EAAuEC,KAAvE,EAA8E;AAC5E,MAAI,CAACH,YAAD,IAAiB,CAACA,YAAY,CAACI,OAA/B,IAA0C,CAACJ,YAAY,CAACI,OAAb,CAAqBC,OAAhE,IAA2E,CAACJ,EAA5E,IAAkF,CAACC,MAAvF,EAA+F;AAC7F,UAAM,IAAIJ,UAAJ,CACJ,2EADI,CAAN;AAGD;;AAED,QAAMQ,UAAU,GAAI,GAAEH,KAAK,GAAG,SAAH,GAAe,EAAG,EAA7C;AAEA,SAAON,GAAI;AACb;AACA,kBAAkBG,YAAY,CAACI,OAAb,CAAqBF,MAArB,CAA6B,IAAGI,UAAW;AAC7D,eAAeL,EAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAXE;AAYD;;AAED,eAAeF,mCAAf","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"],"file":"build-update-publish-unpublish-mutation.js"}
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,GAAT,QAAoB,gBAApB;AACA,SAASC,UAAT,QAA2B,wBAA3B;;AAEA,SAASC,mCAAT,CAA6CC,YAA7C,EAA2DC,EAA3D,EAA+DC,MAA/D,EAAuEC,KAAvE,EAA8E;EAC5E,IAAI,CAACH,YAAD,IAAiB,CAACA,YAAY,CAACI,OAA/B,IAA0C,CAACJ,YAAY,CAACI,OAAb,CAAqBC,OAAhE,IAA2E,CAACJ,EAA5E,IAAkF,CAACC,MAAvF,EAA+F;IAC7F,MAAM,IAAIJ,UAAJ,CACJ,2EADI,CAAN;EAGD;;EAED,MAAMQ,UAAU,GAAI,GAAEH,KAAK,GAAG,SAAH,GAAe,EAAG,EAA7C;EAEA,OAAON,GAAI;AACb;AACA,kBAAkBG,YAAY,CAACI,OAAb,CAAqBF,MAArB,CAA6B,IAAGI,UAAW;AAC7D,eAAeL,EAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAXE;AAYD;;AAED,eAAeF,mCAAf"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/get-default-query-params.js"],"names":["getDefaultQueryParams","schema","updated","properties","limit","offset","sort","property","direction"],"mappings":"AAAA,MAAMA,qBAAqB,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAgB;AAC5C,QAAMC,OAAO,GAAGD,MAAM,CAACE,UAAP,IAAqBF,MAAM,CAACE,UAAP,CAAkBD,OAAvD;AAEA,SAAO;AACLE,IAAAA,KAAK,EAAE,EADF;AAELC,IAAAA,MAAM,EAAE,CAFH;AAGLC,IAAAA,IAAI,EAAEJ,OAAO,GACT,CACE;AACEK,MAAAA,QAAQ,EAAE,SADZ;AAEEC,MAAAA,SAAS,EAAE;AAFb,KADF,CADS,GAOT;AAVC,GAAP;AAYD,CAfD;;AAiBA,SAASR,qBAAT","sourcesContent":["const getDefaultQueryParams = ({ schema }) => {\n const updated = schema.properties && schema.properties.updated;\n\n return {\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"],"file":"get-default-query-params.js"}
1
+ {"version":3,"file":"get-default-query-params.js","names":["getDefaultQueryParams","schema","updated","properties","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\n return {\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;AAAF,CAAD,KAAgB;EAC5C,MAAMC,OAAO,GAAGD,MAAM,CAACE,UAAP,IAAqBF,MAAM,CAACE,UAAP,CAAkBD,OAAvD;EAEA,OAAO;IACLE,KAAK,EAAE,EADF;IAELC,MAAM,EAAE,CAFH;IAGLC,IAAI,EAAEJ,OAAO,GACT,CACE;MACEK,QAAQ,EAAE,SADZ;MAEEC,SAAS,EAAE;IAFb,CADF,CADS,GAOT;EAVC,CAAP;AAYD,CAfD;;AAiBA,SAASR,qBAAT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/hoc/withContext.js"],"names":["React","useMainContext","MainContext","withContext","Component","props","contexts"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,cAAT,EAAyBC,WAAzB,QAA4C,2BAA5C;AAEA,OAAO,MAAMC,WAAW,GAAGC,SAAS,IAAIC,KAAK,IAAI;AAC/C,QAAMC,QAAQ,GAAGL,cAAc,CAACC,WAAD,CAA/B;AACA,sBAAO,oBAAC,SAAD,eAAeG,KAAf,EAA0BC,QAA1B,EAAP;AACD,CAHM","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"],"file":"withContext.js"}
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,KAAP,MAAkB,OAAlB;AACA,SAASC,cAAT,EAAyBC,WAAzB,QAA4C,2BAA5C;AAEA,OAAO,MAAMC,WAAW,GAAGC,SAAS,IAAIC,KAAK,IAAI;EAC/C,MAAMC,QAAQ,GAAGL,cAAc,CAACC,WAAD,CAA/B;EACA,oBAAO,oBAAC,SAAD,eAAeG,KAAf,EAA0BC,QAA1B,EAAP;AACD,CAHM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/hooks/useToggle.js"],"names":["useState","useCallback","useToggle","initialValue","toggleValue","setToggleValue","toggler"],"mappings":"AAAA,SAASA,QAAT,EAAmBC,WAAnB,QAAsC,OAAtC;;AAEA,SAASC,SAAT,CAAmBC,YAAnB,EAAiC;AAC/B,QAAM,CAACC,WAAD,EAAcC,cAAd,IAAgCL,QAAQ,CAACG,YAAD,CAA9C;AACA,QAAMG,OAAO,GAAGL,WAAW,CAAC,MAAMI,cAAc,CAAC,CAACD,WAAF,CAArB,EAAqC,CAACA,WAAD,CAArC,CAA3B;AAEA,SAAO,CAACA,WAAD,EAAcE,OAAd,CAAP;AACD;;AAED,eAAeJ,SAAf","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"],"file":"useToggle.js"}
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,QAAT,EAAmBC,WAAnB,QAAsC,OAAtC;;AAEA,SAASC,SAAT,CAAmBC,YAAnB,EAAiC;EAC/B,MAAM,CAACC,WAAD,EAAcC,cAAd,IAAgCL,QAAQ,CAACG,YAAD,CAA9C;EACA,MAAMG,OAAO,GAAGL,WAAW,CAAC,MAAMI,cAAc,CAAC,CAACD,WAAF,CAArB,EAAqC,CAACA,WAAD,CAArC,CAA3B;EAEA,OAAO,CAACA,WAAD,EAAcE,OAAd,CAAP;AACD;;AAED,eAAeJ,SAAf"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/index.js"],"names":["buildUpdatePublishUnpublishMutation"],"mappings":"AAAA,OAAOA,mCAAP,MAAgD,2CAAhD;AAEA,SAASA,mCAAT","sourcesContent":["import buildUpdatePublishUnpublishMutation from './build-update-publish-unpublish-mutation';\n\nexport { buildUpdatePublishUnpublishMutation };\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["buildUpdatePublishUnpublishMutation"],"sources":["../../src/utils/index.js"],"sourcesContent":["import buildUpdatePublishUnpublishMutation from './build-update-publish-unpublish-mutation';\n\nexport { buildUpdatePublishUnpublishMutation };\n"],"mappings":"AAAA,OAAOA,mCAAP,MAAgD,2CAAhD;AAEA,SAASA,mCAAT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaze-cms/plugin-data-ui",
3
- "version": "0.122.1",
3
+ "version": "0.122.5",
4
4
  "description": "Blaze plugin data ui",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-es/index.js",
@@ -30,7 +30,7 @@
30
30
  "@blaze-cms/admin-ui-utils": "^0.121.0",
31
31
  "@blaze-cms/core-errors": "^0.118.0",
32
32
  "@blaze-cms/react-form-builder": "^0.121.0",
33
- "@blaze-cms/react-page-builder": "^0.122.1",
33
+ "@blaze-cms/react-page-builder": "^0.122.5",
34
34
  "@blaze-cms/setup-ui": "^0.92.0",
35
35
  "@blaze-react/button": "0.5.19",
36
36
  "@blaze-react/more": "0.5.19",
@@ -64,5 +64,5 @@
64
64
  "lib/*",
65
65
  "lib-es/*"
66
66
  ],
67
- "gitHead": "e0f65e11ac8aca235f572dd61e9110bbbd2666a9"
67
+ "gitHead": "7e7c223c720539f1f0eda17d92e0b2087ab22a92"
68
68
  }