@blaze-cms/plugin-data-ui 0.146.0-alpha.56 → 0.146.0-alpha.57

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 (97) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js +1 -0
  3. package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -1
  4. package/lib/components/EntityManager/Entity/Entity.js +71 -72
  5. package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
  6. package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js +1 -1
  7. package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  8. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +11 -11
  9. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  10. package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +1 -0
  11. package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
  12. package/lib/components/EntityManager/Entity/SideBarRelations/index.js +30 -28
  13. package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  14. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js +13 -13
  15. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  16. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js +13 -13
  17. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
  18. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js +16 -16
  19. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  20. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js +12 -12
  21. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
  22. package/lib/components/EntityManager/EntityManager.js +25 -26
  23. package/lib/components/EntityManager/EntityManager.js.map +1 -1
  24. package/lib/components/EntityManager/utils/entity.js +5 -5
  25. package/lib/components/EntityManager/utils/entity.js.map +1 -1
  26. package/lib/components/EntityManager/utils/entityAvailableActions.js +16 -16
  27. package/lib/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
  28. package/lib/components/InfoBoxes/InfoBoxes.js +1 -0
  29. package/lib/components/InfoBoxes/InfoBoxes.js.map +1 -1
  30. package/lib/components/InfoBoxes/container/InfoBoxContainer.js +1 -2
  31. package/lib/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -1
  32. package/lib/components/InfoBoxes/helpers/build-dynamic-query.js +1 -0
  33. package/lib/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
  34. package/lib/components/ListingTable/ListingTable.js +43 -44
  35. package/lib/components/ListingTable/ListingTable.js.map +1 -1
  36. package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  37. package/lib/components/ListingTable/SearchFilter/SearchContainer.js +36 -37
  38. package/lib/components/ListingTable/SearchFilter/SearchContainer.js.map +1 -1
  39. package/lib/components/ListingTable/SearchFilter/SearchFilter.js +2 -2
  40. package/lib/components/ListingTable/SearchFilter/SearchFilter.js.map +1 -1
  41. package/lib/components/ListingTable/SearchFilter/helpers.js +25 -17
  42. package/lib/components/ListingTable/SearchFilter/helpers.js.map +1 -1
  43. package/lib/components/ListingTable/TableActions/TableActions.js.map +1 -1
  44. package/lib/components/ListingTable/service/index.js +8 -7
  45. package/lib/components/ListingTable/service/index.js.map +1 -1
  46. package/lib/components/Tabs/index.js +1 -2
  47. package/lib/components/Tabs/index.js.map +1 -1
  48. package/lib/index.js +10 -11
  49. package/lib/index.js.map +1 -1
  50. package/lib/utils/add-content-menu-items.js +7 -7
  51. package/lib/utils/add-content-menu-items.js.map +1 -1
  52. package/lib-es/components/EntityManager/Entity/Entity.js.map +1 -1
  53. package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js +1 -1
  54. package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  55. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  56. package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
  57. package/lib-es/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -1
  58. package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js +2 -1
  59. package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  60. package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
  61. package/lib-es/components/EntityManager/Entity/actions-handlers/create/submit.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/EntityManager.js.map +1 -1
  64. package/lib-es/components/EntityManager/utils/entity.js.map +1 -1
  65. package/lib-es/components/EntityManager/utils/query.js.map +1 -1
  66. package/lib-es/components/InfoBoxes/InfoBoxTooltip.js.map +1 -1
  67. package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
  68. package/lib-es/components/InfoBoxes/hooks/useData.js.map +1 -1
  69. package/lib-es/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
  70. package/lib-es/components/InfoBoxes/presentational/InfoBoxLabel.js.map +1 -1
  71. package/lib-es/components/ListingTable/ListingTable.js +1 -1
  72. package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
  73. package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  74. package/lib-es/components/ListingTable/SearchFilter/SearchContainer.js +2 -2
  75. package/lib-es/components/ListingTable/SearchFilter/SearchContainer.js.map +1 -1
  76. package/lib-es/components/ListingTable/SearchFilter/SearchFilter.js +1 -0
  77. package/lib-es/components/ListingTable/SearchFilter/SearchFilter.js.map +1 -1
  78. package/lib-es/components/ListingTable/SearchFilter/helpers.js +7 -5
  79. package/lib-es/components/ListingTable/SearchFilter/helpers.js.map +1 -1
  80. package/lib-es/components/ListingTable/SearchFilter/querys.js.map +1 -1
  81. package/lib-es/components/ListingTable/mappers/populate-rows.js.map +1 -1
  82. package/lib-es/components/ListingTable/service/index.js.map +1 -1
  83. package/lib-es/index.js +2 -2
  84. package/lib-es/index.js.map +1 -1
  85. package/lib-es/utils/add-content-menu-items.js.map +1 -1
  86. package/lib-es/utils/build-create-entity-mutation.js.map +1 -1
  87. package/lib-es/utils/build-delete-entity-mutation.js.map +1 -1
  88. package/lib-es/utils/build-listing-query.js.map +1 -1
  89. package/lib-es/utils/build-update-data-query.js.map +1 -1
  90. package/lib-es/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  91. package/package.json +5 -5
  92. package/src/components/EntityManager/Entity/EntityHeader/EntityHeader.js +1 -1
  93. package/src/components/EntityManager/Entity/SideBarRelations/index.js +6 -0
  94. package/src/components/ListingTable/ListingTable.js +1 -1
  95. package/src/components/ListingTable/SearchFilter/SearchContainer.js +16 -11
  96. package/src/components/ListingTable/SearchFilter/SearchFilter.js +1 -0
  97. package/src/components/ListingTable/SearchFilter/helpers.js +8 -5
@@ -1 +1 @@
1
- {"version":3,"file":"build-listing-query.js","names":["gql","BlazeError","getDynamicQuery","buildAdminSearchQuery","entitySchema","index","listingProperties","parsedProperties","join","buildListingQuery","isSearchQuery","actions","getAll","sortType","toUpperCase","substr","countAll"],"sources":["../../src/utils/build-listing-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport { getDynamicQuery } from '@blaze-cms/admin-ui-utils';\n\nconst buildAdminSearchQuery = (entitySchema, index) => {\n const { listingProperties = [] } = entitySchema || {};\n const parsedProperties = `id, ${listingProperties.join(' ') || 'id name'}`;\n\n return getDynamicQuery('ADMIN_SEARCH')([entitySchema], parsedProperties, true, index);\n};\n\nfunction buildListingQuery(entitySchema, index, isSearchQuery) {\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 if (isSearchQuery) return buildAdminSearchQuery(entitySchema, index);\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 totalRecords: ${entitySchema.actions.countAll}(where: $where)\n }\n `;\n}\n\nexport default buildListingQuery;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,eAAe,QAAQ,2BAA2B;AAE3D,MAAMC,qBAAqB,GAAGA,CAACC,YAAY,EAAEC,KAAK,KAAK;EACrD,MAAM;IAAEC,iBAAiB,GAAG;EAAG,CAAC,GAAGF,YAAY,IAAI,CAAC,CAAC;EACrD,MAAMG,gBAAgB,GAAI,OAAMD,iBAAiB,CAACE,IAAI,CAAC,GAAG,CAAC,IAAI,SAAU,EAAC;EAE1E,OAAON,eAAe,CAAC,cAAc,CAAC,CAAC,CAACE,YAAY,CAAC,EAAEG,gBAAgB,EAAE,IAAI,EAAEF,KAAK,CAAC;AACvF,CAAC;AAED,SAASI,iBAAiBA,CAACL,YAAY,EAAEC,KAAK,EAAEK,aAAa,EAAE;EAC7D,IAAI,CAACN,YAAY,CAACO,OAAO,IAAI,CAACP,YAAY,CAACO,OAAO,CAACC,MAAM,IAAI,CAACR,YAAY,CAACE,iBAAiB,EAAE;IAC5F,MAAM,IAAIL,UAAU,CAClB,+EACF,CAAC;EACH;EAEA,IAAIS,aAAa,EAAE,OAAOP,qBAAqB,CAACC,YAAY,EAAEC,KAAK,CAAC;EAEpE,MAAMQ,QAAQ,GACZT,YAAY,CAACO,OAAO,CAACC,MAAM,CAAC,CAAC,CAAC,CAACE,WAAW,CAAC,CAAC,GAAGV,YAAY,CAACO,OAAO,CAACC,MAAM,CAACG,MAAM,CAAC,CAAC,CAAC;EAEtF,OAAOf,GAAI;AACb,YACMI,YAAY,CAACO,OAAO,CAACC,MACtB,oDAAmDC,QAAS;AACjE,qBACQT,YAAY,CAACO,OAAO,CAACC,MACtB;AACP;AACA,UAAUR,YAAY,CAACE,iBAAiB,CAACE,IAAI,CAAC,KAAK,CAAE;AACrD;AACA,sBAAsBJ,YAAY,CAACO,OAAO,CAACK,QAAS;AACpD;AACA,GAAG;AACH;AAEA,eAAeP,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"build-listing-query.js","names":["gql","BlazeError","getDynamicQuery","buildAdminSearchQuery","entitySchema","index","listingProperties","parsedProperties","join","buildListingQuery","isSearchQuery","actions","getAll","sortType","toUpperCase","substr","countAll"],"sources":["../../src/utils/build-listing-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport { getDynamicQuery } from '@blaze-cms/admin-ui-utils';\n\nconst buildAdminSearchQuery = (entitySchema, index) => {\n const { listingProperties = [] } = entitySchema || {};\n const parsedProperties = `id, ${listingProperties.join(' ') || 'id name'}`;\n\n return getDynamicQuery('ADMIN_SEARCH')([entitySchema], parsedProperties, true, index);\n};\n\nfunction buildListingQuery(entitySchema, index, isSearchQuery) {\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 if (isSearchQuery) return buildAdminSearchQuery(entitySchema, index);\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 totalRecords: ${entitySchema.actions.countAll}(where: $where)\n }\n `;\n}\n\nexport default buildListingQuery;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,eAAe,QAAQ,2BAA2B;AAE3D,MAAMC,qBAAqB,GAAGA,CAACC,YAAY,EAAEC,KAAK,KAAK;EACrD,MAAM;IAAEC,iBAAiB,GAAG;EAAG,CAAC,GAAGF,YAAY,IAAI,CAAC,CAAC;EACrD,MAAMG,gBAAgB,GAAG,OAAOD,iBAAiB,CAACE,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,EAAE;EAE1E,OAAON,eAAe,CAAC,cAAc,CAAC,CAAC,CAACE,YAAY,CAAC,EAAEG,gBAAgB,EAAE,IAAI,EAAEF,KAAK,CAAC;AACvF,CAAC;AAED,SAASI,iBAAiBA,CAACL,YAAY,EAAEC,KAAK,EAAEK,aAAa,EAAE;EAC7D,IAAI,CAACN,YAAY,CAACO,OAAO,IAAI,CAACP,YAAY,CAACO,OAAO,CAACC,MAAM,IAAI,CAACR,YAAY,CAACE,iBAAiB,EAAE;IAC5F,MAAM,IAAIL,UAAU,CAClB,+EACF,CAAC;EACH;EAEA,IAAIS,aAAa,EAAE,OAAOP,qBAAqB,CAACC,YAAY,EAAEC,KAAK,CAAC;EAEpE,MAAMQ,QAAQ,GACZT,YAAY,CAACO,OAAO,CAACC,MAAM,CAAC,CAAC,CAAC,CAACE,WAAW,CAAC,CAAC,GAAGV,YAAY,CAACO,OAAO,CAACC,MAAM,CAACG,MAAM,CAAC,CAAC,CAAC;EAEtF,OAAOf,GAAG;AACZ,YACMI,YAAY,CAACO,OAAO,CAACC,MAAM,oDACuBC,QAAQ;AAChE,qBACQT,YAAY,CAACO,OAAO,CAACC,MAAM;AACnC;AACA,UACUR,YAAY,CAACE,iBAAiB,CAACE,IAAI,CAAC,KAAK,CAAC;AACpD;AACA,sBAAsBJ,YAAY,CAACO,OAAO,CAACK,QAAQ;AACnD;AACA,GAAG;AACH;AAEA,eAAeP,iBAAiB","ignoreList":[]}
@@ -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,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,+EACF,CAAC;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","ignoreList":[]}
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,+EACF,CAAC;EACH;EAEA,MAAMQ,WAAW,GAAGP,UAAU,CAAC,GAAGG,YAAY,CAACC,OAAO,CAACC,MAAM,OAAO,CAAC;EACrE,MAAMG,cAAc,GAAGP,iBAAiB,CAACE,YAAY,CAAC;EAEtD,OAAOL,GAAG;AACZ,mCAAmCS,WAAW;AAC9C,oBAAoBJ,YAAY,CAACC,OAAO,CAACC,MAAM;AAC/C;AACA;AACA,YAAYG,cAAc,CAACC,IAAI,CAAC,KAAK,CAAC;AACtC;AACA;AACA;AACA;AACA,GAAG;AACH;AAEA,eAAeP,oBAAoB","ignoreList":[]}
@@ -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,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,2EACF,CAAC;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","ignoreList":[]}
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,2EACF,CAAC;EACH;EAEA,MAAMQ,UAAU,GAAG,GAAGH,KAAK,GAAG,SAAS,GAAG,EAAE,EAAE;EAE9C,OAAON,GAAG;AACZ;AACA,kBAAkBG,YAAY,CAACI,OAAO,CAACF,MAAM,CAAC,IAAII,UAAU;AAC5D,eAAeL,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AAEA,eAAeF,mCAAmC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaze-cms/plugin-data-ui",
3
- "version": "0.146.0-alpha.56",
3
+ "version": "0.146.0-alpha.57",
4
4
  "description": "Blaze plugin data ui",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-es/index.js",
@@ -27,11 +27,11 @@
27
27
  },
28
28
  "license": "GPL-3.0",
29
29
  "dependencies": {
30
- "@blaze-cms/admin-ui-utils": "0.146.0-alpha.56",
30
+ "@blaze-cms/admin-ui-utils": "0.146.0-alpha.57",
31
31
  "@blaze-cms/core-errors": "0.146.0-alpha.42",
32
32
  "@blaze-cms/plugin-render-hooks-ui": "^0.140.3",
33
- "@blaze-cms/react-form-builder": "0.146.0-alpha.56",
34
- "@blaze-cms/react-page-builder": "0.146.0-alpha.56",
33
+ "@blaze-cms/react-form-builder": "0.146.0-alpha.57",
34
+ "@blaze-cms/react-page-builder": "0.146.0-alpha.57",
35
35
  "@blaze-cms/setup-ui": "^0.140.3",
36
36
  "@blaze-cms/versioning-ui": "0.146.0-alpha.2",
37
37
  "@blaze-react/button": "0.8.0-alpha.82",
@@ -68,5 +68,5 @@
68
68
  "lib/*",
69
69
  "lib-es/*"
70
70
  ],
71
- "gitHead": "eaaeadb33fd0b215b136a9c6fbdb1c634bd294a3"
71
+ "gitHead": "152c5b312424d02ad461b7ac5bca798ca557d4ed"
72
72
  }
@@ -41,7 +41,7 @@ const EntityHeader = ({
41
41
  <PageHeader.Actions>
42
42
  {!saveOnChange && (
43
43
  <Button onClick={onSubmit} modifiers={SaveButtonModifiers} data-testid="button-save">
44
- {saveButtonText === 'save' ? 'Apply' : saveButtonText}
44
+ {saveButtonText}
45
45
  </Button>
46
46
  )}
47
47
  <More disabled={shouldDisableMoreMenu}>
@@ -17,6 +17,7 @@ const SideBarRelations = ({ schema, onChange, formData, entity }) => {
17
17
  formattedUpdated,
18
18
  formattedCreated,
19
19
  formattedPublished,
20
+ updatedBy,
20
21
  status
21
22
  } = formData;
22
23
  const client = useApolloClient();
@@ -92,6 +93,11 @@ const SideBarRelations = ({ schema, onChange, formData, entity }) => {
92
93
  <p>
93
94
  Updated: <span>{formattedUpdated}</span>
94
95
  </p>
96
+ {updatedBy && (
97
+ <p>
98
+ Updated by: <span>{updatedBy.name}</span>
99
+ </p>
100
+ )}
95
101
  </>
96
102
  </>
97
103
  )}
@@ -39,7 +39,7 @@ const ListingTable = ({ match, entitySchema, history }) => {
39
39
  ...queryParams,
40
40
  offset: currentPage * queryParamsDefault.limit - queryParamsDefault.limit
41
41
  };
42
- await doQuery(listFilters, updatedQueryParams);
42
+ await doQuery([], updatedQueryParams);
43
43
  setPreviousSchema({ id: entitySchema.id });
44
44
  }
45
45
  })();
@@ -199,17 +199,22 @@ const SearchContainer = ({
199
199
 
200
200
  {displaySelectFilters &&
201
201
  selectOptions.map(({ id, options, label }) => (
202
- <div className="search-container__select-wrapper">
203
- <Select
204
- label={label}
205
- id={id}
206
- name={id}
207
- onChange={event => handleSelect(id, event)}
208
- options={options}
209
- value={selectedFilters[id]}
210
- defaultTextValue={DEFAULT_FILTER_OPTION_LABEL}
211
- />
212
- </div>
202
+ <>
203
+ {options &&
204
+ !!options.length && (
205
+ <div className="search-container__select-wrapper">
206
+ <Select
207
+ label={label}
208
+ id={id}
209
+ name={id}
210
+ onChange={event => handleSelect(id, event)}
211
+ options={options}
212
+ value={selectedFilters[id]}
213
+ defaultTextValue={DEFAULT_FILTER_OPTION_LABEL}
214
+ />
215
+ </div>
216
+ )}
217
+ </>
213
218
  ))}
214
219
 
215
220
  <div className="search-container__reset-button">
@@ -21,6 +21,7 @@ const SearchFilter = ({ schema, setListFilters }) => {
21
21
  return (
22
22
  <SearchContainer
23
23
  index={index}
24
+ key={schema.id}
24
25
  setListFilters={setListFilters}
25
26
  keywordFiltersToUse={keywordFiltersToUse}
26
27
  selectFiltersToDisplay={selectFiltersToDisplay}
@@ -2,21 +2,24 @@ import { DEFAULT_FILTER_OPTION_LABEL } from '../../../constants';
2
2
 
3
3
  const updateListFilters = (searchTerm, selectedFilters, setListFilters, fields = []) => {
4
4
  const filters = [];
5
+
5
6
  if (searchTerm) {
6
7
  filters.push({
7
8
  simple_query_string: {
8
- query: `${searchTerm}*`,
9
- fields
9
+ query: `${searchTerm}`,
10
+ default_operator: 'AND',
11
+ fields: fields.map(field => field)
10
12
  }
11
13
  });
12
14
  }
13
15
 
14
- Object.keys(selectedFilters).forEach(filterKey => {
15
- const filterValue = selectedFilters[filterKey];
16
+ Object.entries(selectedFilters).forEach(([filterKey, filterValue]) => {
16
17
  if (!filterValue || filterValue === DEFAULT_FILTER_OPTION_LABEL) return;
17
18
  filters.push({
18
19
  match: {
19
- [filterKey]: filterValue
20
+ [`${filterKey}.keyword`]: {
21
+ query: filterValue
22
+ }
20
23
  }
21
24
  });
22
25
  });