@blaze-cms/plugin-data-ui 0.139.0-alpha.1 → 0.139.0-alpha.4

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 (92) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/lib/components/EntityDataListing/EntityDataListing.js +1 -2
  3. package/lib/components/EntityDataListing/EntityDataListing.js.map +1 -1
  4. package/lib/components/EntityDataListing/index.js +1 -2
  5. package/lib/components/EntityDataListing/index.js.map +1 -1
  6. package/lib/components/EntityManager/Entity/Entity.js +3 -4
  7. package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
  8. package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js +1 -2
  9. package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  10. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +1 -2
  11. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  12. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js +1 -2
  13. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
  14. package/lib/components/EntityManager/Entity/EntityHeader/index.js +1 -2
  15. package/lib/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
  16. package/lib/components/EntityManager/Entity/SideBarRelations/index.js +3 -4
  17. package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  18. package/lib/components/EntityManager/Entity/actions-handlers/create/index.js +1 -2
  19. package/lib/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
  20. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js +1 -2
  21. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  22. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js +1 -2
  23. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
  24. package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js +1 -2
  25. package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
  26. package/lib/components/EntityManager/Entity/actions-handlers/index.js +1 -2
  27. package/lib/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
  28. package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js +1 -2
  29. package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
  30. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js +1 -2
  31. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  32. package/lib/components/EntityManager/Entity/actions-handlers/update/index.js +1 -2
  33. package/lib/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
  34. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js +1 -2
  35. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
  36. package/lib/components/EntityManager/Entity/index.js +1 -2
  37. package/lib/components/EntityManager/Entity/index.js.map +1 -1
  38. package/lib/components/EntityManager/EntityManager.js +3 -4
  39. package/lib/components/EntityManager/EntityManager.js.map +1 -1
  40. package/lib/components/EntityManager/index.js +1 -2
  41. package/lib/components/EntityManager/index.js.map +1 -1
  42. package/lib/components/EntityManager/utils/data-mappers.js +4 -8
  43. package/lib/components/EntityManager/utils/data-mappers.js.map +1 -1
  44. package/lib/components/EntityManager/utils/entityAvailableActions.js +1 -2
  45. package/lib/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
  46. package/lib/components/EntityManager/utils/is-form-empty.js +1 -2
  47. package/lib/components/EntityManager/utils/is-form-empty.js.map +1 -1
  48. package/lib/components/EntityManager/utils/query.js +1 -2
  49. package/lib/components/EntityManager/utils/query.js.map +1 -1
  50. package/lib/components/ListingTable/ListingTable.js +3 -5
  51. package/lib/components/ListingTable/ListingTable.js.map +1 -1
  52. package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js +1 -2
  53. package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  54. package/lib/components/ListingTable/ListingTableContent/index.js +1 -2
  55. package/lib/components/ListingTable/ListingTableContent/index.js.map +1 -1
  56. package/lib/components/ListingTable/TableActions/TableActions.js +1 -2
  57. package/lib/components/ListingTable/TableActions/TableActions.js.map +1 -1
  58. package/lib/components/ListingTable/TableActions/index.js +1 -2
  59. package/lib/components/ListingTable/TableActions/index.js.map +1 -1
  60. package/lib/components/ListingTable/index.js +1 -2
  61. package/lib/components/ListingTable/index.js.map +1 -1
  62. package/lib/components/ListingTable/mappers/populate-rows.js +5 -8
  63. package/lib/components/ListingTable/mappers/populate-rows.js.map +1 -1
  64. package/lib/components/ListingTable/service/index.js +1 -2
  65. package/lib/components/ListingTable/service/index.js.map +1 -1
  66. package/lib/components/Tabs/index.js +3 -4
  67. package/lib/components/Tabs/index.js.map +1 -1
  68. package/lib/constants.js +24 -48
  69. package/lib/constants.js.map +1 -1
  70. package/lib/index.js +2 -2
  71. package/lib/index.js.map +1 -1
  72. package/lib/utils/add-content-menu-items.js +1 -2
  73. package/lib/utils/add-content-menu-items.js.map +1 -1
  74. package/lib/utils/build-create-entity-mutation.js +1 -2
  75. package/lib/utils/build-create-entity-mutation.js.map +1 -1
  76. package/lib/utils/build-delete-entity-mutation.js +1 -2
  77. package/lib/utils/build-delete-entity-mutation.js.map +1 -1
  78. package/lib/utils/build-listing-query.js +1 -2
  79. package/lib/utils/build-listing-query.js.map +1 -1
  80. package/lib/utils/build-update-data-query.js +1 -2
  81. package/lib/utils/build-update-data-query.js.map +1 -1
  82. package/lib/utils/build-update-publish-unpublish-mutation.js +1 -2
  83. package/lib/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  84. package/lib/utils/get-default-query-params.js +1 -2
  85. package/lib/utils/get-default-query-params.js.map +1 -1
  86. package/lib/utils/hoc/withContext.js +1 -2
  87. package/lib/utils/hoc/withContext.js.map +1 -1
  88. package/lib/utils/hooks/useToggle.js +1 -2
  89. package/lib/utils/hooks/useToggle.js.map +1 -1
  90. package/lib-es/components/ListingTable/ListingTable.js +0 -1
  91. package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
  92. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"add-content-menu-items.js","names":["_adminUiUtils","require","_require","MENU_PERMISSIONS","getAddContentMenuItems","app","sectionKey","_ref","_asyncToGenerator2","_regenerator","mark","_callee","addItem","client","_yield$client$query","getEntitySchemas","wrap","_callee$","_context","prev","next","getClient","query","getQuery","variables","canDoActions","sent","data","forEach","_ref2","id","displayName","name","uri","concat","stop","_x","apply","arguments","_default","exports"],"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,IAAAA,aAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAA6BD,OAAO,CAAC,cAAc,CAAC;EAA5CE,gBAAgB,GAAAD,QAAA,CAAhBC,gBAAgB;AAExB,SAASC,sBAAsBA,CAACC,GAAG,EAAEC,UAAU,EAAE;EAC/C;IAAA,IAAAC,IAAA,OAAAC,kBAAA,2BAAAC,YAAA,YAAAC,IAAA,CAAO,SAAAC,QAAMC,OAAO;MAAA,IAAAC,MAAA,EAAAC,mBAAA,EAAAC,gBAAA;MAAA,OAAAN,YAAA,YAAAO,IAAA,UAAAC,SAAAC,QAAA;QAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;UAAA;YACZP,MAAM,GAAGR,GAAG,CAACgB,SAAS,CAAC,CAAC;YAAAH,QAAA,CAAAE,IAAA;YAAA,OAGpBP,MAAM,CAACS,KAAK,CAAC;cACrBA,KAAK,EAAE,IAAAC,sBAAQ,EAAC,4BAA4B,CAAC;cAC7CC,SAAS,EAAE;gBACT;gBACAC,YAAY,EAAEtB;cAChB;YACF,CAAC,CAAC;UAAA;YAAAW,mBAAA,GAAAI,QAAA,CAAAQ,IAAA;YAPQX,gBAAgB,GAAAD,mBAAA,CAAxBa,IAAI,CAAIZ,gBAAgB;YAQ1BA,gBAAgB,CAACa,OAAO,CAAC,UAAAC,KAAA,EAAyB;cAAA,IAAtBC,EAAE,GAAAD,KAAA,CAAFC,EAAE;gBAAEC,WAAW,GAAAF,KAAA,CAAXE,WAAW;cACzCnB,OAAO,CAAC;gBAAEoB,IAAI,EAAED,WAAW;gBAAEE,GAAG,mBAAAC,MAAA,CAAmBJ,EAAE;cAAG,CAAC,EAAExB,UAAU,CAAC;YACxE,CAAC,CAAC;UAAC;UAAA;YAAA,OAAAY,QAAA,CAAAiB,IAAA;QAAA;MAAA,GAAAxB,OAAA;IAAA,CACJ;IAAA,iBAAAyB,EAAA;MAAA,OAAA7B,IAAA,CAAA8B,KAAA,OAAAC,SAAA;IAAA;EAAA;AACH;AAAC,IAAAC,QAAA,GAEcnC,sBAAsB;AAAAoC,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"add-content-menu-items.js","names":["_adminUiUtils","require","_require","MENU_PERMISSIONS","getAddContentMenuItems","app","sectionKey","_ref","_asyncToGenerator2","_regenerator","mark","_callee","addItem","client","_yield$client$query","getEntitySchemas","wrap","_callee$","_context","prev","next","getClient","query","getQuery","variables","canDoActions","sent","data","forEach","_ref2","id","displayName","name","uri","concat","stop","_x","apply","arguments","_default","exports"],"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,IAAAA,aAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAA6BD,OAAO,CAAC,cAAc,CAAC;EAA5CE,gBAAgB,GAAAD,QAAA,CAAhBC,gBAAgB;AAExB,SAASC,sBAAsBA,CAACC,GAAG,EAAEC,UAAU,EAAE;EAC/C;IAAA,IAAAC,IAAA,OAAAC,kBAAA,2BAAAC,YAAA,YAAAC,IAAA,CAAO,SAAAC,QAAMC,OAAO;MAAA,IAAAC,MAAA,EAAAC,mBAAA,EAAAC,gBAAA;MAAA,OAAAN,YAAA,YAAAO,IAAA,UAAAC,SAAAC,QAAA;QAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;UAAA;YACZP,MAAM,GAAGR,GAAG,CAACgB,SAAS,CAAC,CAAC;YAAAH,QAAA,CAAAE,IAAA;YAAA,OAGpBP,MAAM,CAACS,KAAK,CAAC;cACrBA,KAAK,EAAE,IAAAC,sBAAQ,EAAC,4BAA4B,CAAC;cAC7CC,SAAS,EAAE;gBACT;gBACAC,YAAY,EAAEtB;cAChB;YACF,CAAC,CAAC;UAAA;YAAAW,mBAAA,GAAAI,QAAA,CAAAQ,IAAA;YAPQX,gBAAgB,GAAAD,mBAAA,CAAxBa,IAAI,CAAIZ,gBAAgB;YAQ1BA,gBAAgB,CAACa,OAAO,CAAC,UAAAC,KAAA,EAAyB;cAAA,IAAtBC,EAAE,GAAAD,KAAA,CAAFC,EAAE;gBAAEC,WAAW,GAAAF,KAAA,CAAXE,WAAW;cACzCnB,OAAO,CAAC;gBAAEoB,IAAI,EAAED,WAAW;gBAAEE,GAAG,mBAAAC,MAAA,CAAmBJ,EAAE;cAAG,CAAC,EAAExB,UAAU,CAAC;YACxE,CAAC,CAAC;UAAC;UAAA;YAAA,OAAAY,QAAA,CAAAiB,IAAA;QAAA;MAAA,GAAAxB,OAAA;IAAA,CACJ;IAAA,iBAAAyB,EAAA;MAAA,OAAA7B,IAAA,CAAA8B,KAAA,OAAAC,SAAA;IAAA;EAAA;AACH;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEcpC,sBAAsB"}
@@ -21,6 +21,5 @@ function buildCreateEntityMutation(entitySchema) {
21
21
  var dataProperties = (0, _adminUiUtils.getDataProperties)(entitySchema);
22
22
  return (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["mutation createEntity($input: ", ") {\n createdEntity: ", "(input: $input){\n result {\n id,\n ", "\n }\n }\n }"])), actionInput, entitySchema.actions.create, dataProperties.join(',\n'));
23
23
  }
24
- var _default = buildCreateEntityMutation;
25
- exports["default"] = _default;
24
+ var _default = exports["default"] = buildCreateEntityMutation;
26
25
  //# sourceMappingURL=build-create-entity-mutation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-create-entity-mutation.js","names":["_client","require","_coreErrors","_lodash","_interopRequireDefault","_adminUiUtils","_templateObject","buildCreateEntityMutation","entitySchema","actions","create","properties","BlazeError","actionInput","upperfirst","concat","dataProperties","getDataProperties","gql","_taggedTemplateLiteral2","join","_default","exports"],"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,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAA8D,IAAAK,eAAA;AAE9D,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,IAAIC,sBAAU,CAClB,8EACF,CAAC;EACH;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,KAAAC,MAAA,CAAIP,YAAY,CAACC,OAAO,CAACC,MAAM,UAAO,CAAC;EACrE,IAAMM,cAAc,GAAG,IAAAC,+BAAiB,EAACT,YAAY,CAAC;EAEtD,WAAOU,WAAG,EAAAZ,eAAA,KAAAA,eAAA,OAAAa,uBAAA,0KAAkCN,WAAW,EACpCL,YAAY,CAACC,OAAO,CAACC,MAAM,EAGpCM,cAAc,CAACI,IAAI,CAAC,KAAK,CAAC;AAItC;AAAC,IAAAC,QAAA,GAEcd,yBAAyB;AAAAe,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"build-create-entity-mutation.js","names":["_client","require","_coreErrors","_lodash","_interopRequireDefault","_adminUiUtils","_templateObject","buildCreateEntityMutation","entitySchema","actions","create","properties","BlazeError","actionInput","upperfirst","concat","dataProperties","getDataProperties","gql","_taggedTemplateLiteral2","join","_default","exports"],"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,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAA8D,IAAAK,eAAA;AAE9D,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,IAAIC,sBAAU,CAClB,8EACF,CAAC;EACH;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,KAAAC,MAAA,CAAIP,YAAY,CAACC,OAAO,CAACC,MAAM,UAAO,CAAC;EACrE,IAAMM,cAAc,GAAG,IAAAC,+BAAiB,EAACT,YAAY,CAAC;EAEtD,WAAOU,WAAG,EAAAZ,eAAA,KAAAA,eAAA,OAAAa,uBAAA,0KAAkCN,WAAW,EACpCL,YAAY,CAACC,OAAO,CAACC,MAAM,EAGpCM,cAAc,CAACI,IAAI,CAAC,KAAK,CAAC;AAItC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEcf,yBAAyB"}
@@ -18,6 +18,5 @@ function buildDeleteEntity(entitySchema) {
18
18
  var actionInput = (0, _lodash["default"])("".concat(entitySchema.actions["delete"], "Input"));
19
19
  return (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n mutation deleteEntity($input: ", ") {\n deleteEntity: ", "(input: $input){\n result\n }\n }\n "])), actionInput, entitySchema.actions["delete"]);
20
20
  }
21
- var _default = buildDeleteEntity;
22
- exports["default"] = _default;
21
+ var _default = exports["default"] = buildDeleteEntity;
23
22
  //# sourceMappingURL=build-delete-entity-mutation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-delete-entity-mutation.js","names":["_client","require","_coreErrors","_lodash","_interopRequireDefault","_templateObject","buildDeleteEntity","entitySchema","actions","BlazeError","actionInput","upperfirst","concat","gql","_taggedTemplateLiteral2","_default","exports"],"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,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA2C,IAAAI,eAAA;AAE3C,SAASC,iBAAiBA,CAACC,YAAY,EAAE;EACvC,IAAI,CAACA,YAAY,IAAI,CAACA,YAAY,CAACC,OAAO,IAAI,CAACD,YAAY,CAACC,OAAO,UAAO,EAAE;IAC1E,MAAM,IAAIC,sBAAU,CAAC,wDAAwD,CAAC;EAChF;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,KAAAC,MAAA,CAAIL,YAAY,CAACC,OAAO,UAAO,UAAO,CAAC;EAErE,WAAOK,WAAG,EAAAR,eAAA,KAAAA,eAAA,OAAAS,uBAAA,qIACuBJ,WAAW,EAC1BH,YAAY,CAACC,OAAO,UAAO;AAK/C;AAAC,IAAAO,QAAA,GAEcT,iBAAiB;AAAAU,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"build-delete-entity-mutation.js","names":["_client","require","_coreErrors","_lodash","_interopRequireDefault","_templateObject","buildDeleteEntity","entitySchema","actions","BlazeError","actionInput","upperfirst","concat","gql","_taggedTemplateLiteral2","_default","exports"],"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,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA2C,IAAAI,eAAA;AAE3C,SAASC,iBAAiBA,CAACC,YAAY,EAAE;EACvC,IAAI,CAACA,YAAY,IAAI,CAACA,YAAY,CAACC,OAAO,IAAI,CAACD,YAAY,CAACC,OAAO,UAAO,EAAE;IAC1E,MAAM,IAAIC,sBAAU,CAAC,wDAAwD,CAAC;EAChF;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,KAAAC,MAAA,CAAIL,YAAY,CAACC,OAAO,UAAO,UAAO,CAAC;EAErE,WAAOK,WAAG,EAAAR,eAAA,KAAAA,eAAA,OAAAS,uBAAA,qIACuBJ,WAAW,EAC1BH,YAAY,CAACC,OAAO,UAAO;AAK/C;AAAC,IAAAO,QAAA,GAAAC,OAAA,cAEcV,iBAAiB"}
@@ -18,6 +18,5 @@ function buildListingQuery(entitySchema) {
18
18
  var sortType = entitySchema.actions.getAll[0].toUpperCase() + entitySchema.actions.getAll.substr(1);
19
19
  return (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n query ", "($where: JSON, $limit: Int, $offset:Int, $sort: [", "SortItem]) {\n listingData: ", "(where: $where, limit: $limit, offset:$offset, sort:$sort){\n id,\n ", "\n }\n }\n "])), entitySchema.actions.getAll, sortType, entitySchema.actions.getAll, entitySchema.listingProperties.join(',\n'));
20
20
  }
21
- var _default = buildListingQuery;
22
- exports["default"] = _default;
21
+ var _default = exports["default"] = buildListingQuery;
23
22
  //# sourceMappingURL=build-listing-query.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-listing-query.js","names":["_client","require","_coreErrors","_templateObject","buildListingQuery","entitySchema","actions","getAll","listingProperties","BlazeError","sortType","toUpperCase","substr","gql","_taggedTemplateLiteral2","join","_default","exports"],"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,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAoD,IAAAE,eAAA;AAEpD,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,IAAIC,sBAAU,CAClB,+EACF,CAAC;EACH;EAEA,IAAMC,QAAQ,GACZL,YAAY,CAACC,OAAO,CAACC,MAAM,CAAC,CAAC,CAAC,CAACI,WAAW,CAAC,CAAC,GAAGN,YAAY,CAACC,OAAO,CAACC,MAAM,CAACK,MAAM,CAAC,CAAC,CAAC;EAEtF,WAAOC,WAAG,EAAAV,eAAA,KAAAA,eAAA,OAAAW,uBAAA,yOAENT,YAAY,CAACC,OAAO,CAACC,MAAM,EACuBG,QAAQ,EAExDL,YAAY,CAACC,OAAO,CAACC,MAAM,EAGzBF,YAAY,CAACG,iBAAiB,CAACO,IAAI,CAAC,KAAK,CAAC;AAIpD;AAAC,IAAAC,QAAA,GAEcZ,iBAAiB;AAAAa,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"build-listing-query.js","names":["_client","require","_coreErrors","_templateObject","buildListingQuery","entitySchema","actions","getAll","listingProperties","BlazeError","sortType","toUpperCase","substr","gql","_taggedTemplateLiteral2","join","_default","exports"],"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,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAoD,IAAAE,eAAA;AAEpD,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,IAAIC,sBAAU,CAClB,+EACF,CAAC;EACH;EAEA,IAAMC,QAAQ,GACZL,YAAY,CAACC,OAAO,CAACC,MAAM,CAAC,CAAC,CAAC,CAACI,WAAW,CAAC,CAAC,GAAGN,YAAY,CAACC,OAAO,CAACC,MAAM,CAACK,MAAM,CAAC,CAAC,CAAC;EAEtF,WAAOC,WAAG,EAAAV,eAAA,KAAAA,eAAA,OAAAW,uBAAA,yOAENT,YAAY,CAACC,OAAO,CAACC,MAAM,EACuBG,QAAQ,EAExDL,YAAY,CAACC,OAAO,CAACC,MAAM,EAGzBF,YAAY,CAACG,iBAAiB,CAACO,IAAI,CAAC,KAAK,CAAC;AAIpD;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEcb,iBAAiB"}
@@ -21,6 +21,5 @@ function buildUpdateDataQuery(entitySchema) {
21
21
  var dataProperties = (0, _adminUiUtils.getDataProperties)(entitySchema);
22
22
  return (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n mutation updateEntity($input: ", ") {\n updateEntity: ", "(input: $input){\n result {\n id,\n ", ",\n updated\n }\n }\n }\n "])), actionInput, entitySchema.actions.update, dataProperties.join(',\n'));
23
23
  }
24
- var _default = buildUpdateDataQuery;
25
- exports["default"] = _default;
24
+ var _default = exports["default"] = buildUpdateDataQuery;
26
25
  //# sourceMappingURL=build-update-data-query.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-update-data-query.js","names":["_client","require","_coreErrors","_lodash","_interopRequireDefault","_adminUiUtils","_templateObject","buildUpdateDataQuery","entitySchema","actions","update","properties","BlazeError","actionInput","upperfirst","concat","dataProperties","getDataProperties","gql","_taggedTemplateLiteral2","join","_default","exports"],"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,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAA8D,IAAAK,eAAA;AAE9D,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,IAAIC,sBAAU,CAClB,+EACF,CAAC;EACH;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,KAAAC,MAAA,CAAIP,YAAY,CAACC,OAAO,CAACC,MAAM,UAAO,CAAC;EACrE,IAAMM,cAAc,GAAG,IAAAC,+BAAiB,EAACT,YAAY,CAAC;EAEtD,WAAOU,WAAG,EAAAZ,eAAA,KAAAA,eAAA,OAAAa,uBAAA,qMACuBN,WAAW,EAC1BL,YAAY,CAACC,OAAO,CAACC,MAAM,EAGnCM,cAAc,CAACI,IAAI,CAAC,KAAK,CAAC;AAMtC;AAAC,IAAAC,QAAA,GAEcd,oBAAoB;AAAAe,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"build-update-data-query.js","names":["_client","require","_coreErrors","_lodash","_interopRequireDefault","_adminUiUtils","_templateObject","buildUpdateDataQuery","entitySchema","actions","update","properties","BlazeError","actionInput","upperfirst","concat","dataProperties","getDataProperties","gql","_taggedTemplateLiteral2","join","_default","exports"],"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,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAA8D,IAAAK,eAAA;AAE9D,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,IAAIC,sBAAU,CAClB,+EACF,CAAC;EACH;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,KAAAC,MAAA,CAAIP,YAAY,CAACC,OAAO,CAACC,MAAM,UAAO,CAAC;EACrE,IAAMM,cAAc,GAAG,IAAAC,+BAAiB,EAACT,YAAY,CAAC;EAEtD,WAAOU,WAAG,EAAAZ,eAAA,KAAAA,eAAA,OAAAa,uBAAA,qMACuBN,WAAW,EAC1BL,YAAY,CAACC,OAAO,CAACC,MAAM,EAGnCM,cAAc,CAACI,IAAI,CAAC,KAAK,CAAC;AAMtC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEcf,oBAAoB"}
@@ -17,6 +17,5 @@ function buildUpdatePublishUnpublishMutation(entitySchema, id, action, cache) {
17
17
  var withClient = "".concat(cache ? '@client' : '');
18
18
  return (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n mutation {\n response: ", " ", "(input: {\n id: \"", "\"\n }){\n result {\n id,\n status\n }\n }\n }\n "])), entitySchema.actions[action], withClient, id);
19
19
  }
20
- var _default = buildUpdatePublishUnpublishMutation;
21
- exports["default"] = _default;
20
+ var _default = exports["default"] = buildUpdatePublishUnpublishMutation;
22
21
  //# sourceMappingURL=build-update-publish-unpublish-mutation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-update-publish-unpublish-mutation.js","names":["_client","require","_coreErrors","_templateObject","buildUpdatePublishUnpublishMutation","entitySchema","id","action","cache","actions","publish","BlazeError","withClient","concat","gql","_taggedTemplateLiteral2","_default","exports"],"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,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAoD,IAAAE,eAAA;AAEpD,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,IAAII,sBAAU,CAClB,2EACF,CAAC;EACH;EAEA,IAAMC,UAAU,MAAAC,MAAA,CAAML,KAAK,GAAG,SAAS,GAAG,EAAE,CAAE;EAE9C,WAAOM,WAAG,EAAAX,eAAA,KAAAA,eAAA,OAAAY,uBAAA,4LAEMV,YAAY,CAACI,OAAO,CAACF,MAAM,CAAC,EAAIK,UAAU,EAC7CN,EAAE;AASjB;AAAC,IAAAU,QAAA,GAEcZ,mCAAmC;AAAAa,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"build-update-publish-unpublish-mutation.js","names":["_client","require","_coreErrors","_templateObject","buildUpdatePublishUnpublishMutation","entitySchema","id","action","cache","actions","publish","BlazeError","withClient","concat","gql","_taggedTemplateLiteral2","_default","exports"],"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,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAoD,IAAAE,eAAA;AAEpD,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,IAAII,sBAAU,CAClB,2EACF,CAAC;EACH;EAEA,IAAMC,UAAU,MAAAC,MAAA,CAAML,KAAK,GAAG,SAAS,GAAG,EAAE,CAAE;EAE9C,WAAOM,WAAG,EAAAX,eAAA,KAAAA,eAAA,OAAAY,uBAAA,4LAEMV,YAAY,CAACI,OAAO,CAACF,MAAM,CAAC,EAAIK,UAAU,EAC7CN,EAAE;AASjB;AAAC,IAAAU,QAAA,GAAAC,OAAA,cAEcb,mCAAmC"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.getDefaultQueryParams = void 0;
8
- var getDefaultQueryParams = function getDefaultQueryParams(_ref) {
8
+ var getDefaultQueryParams = exports.getDefaultQueryParams = function getDefaultQueryParams(_ref) {
9
9
  var schema = _ref.schema;
10
10
  var updated = schema.properties && schema.properties.updated;
11
11
  var _ref2 = schema.displayProperties || {},
@@ -20,5 +20,4 @@ var getDefaultQueryParams = function getDefaultQueryParams(_ref) {
20
20
  }] : []
21
21
  };
22
22
  };
23
- exports.getDefaultQueryParams = getDefaultQueryParams;
24
23
  //# sourceMappingURL=get-default-query-params.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-default-query-params.js","names":["getDefaultQueryParams","_ref","schema","updated","properties","_ref2","displayProperties","where","adminDefaultListingFilter","limit","offset","sort","property","direction","exports"],"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,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAAC,IAAA,EAAmB;EAAA,IAAbC,MAAM,GAAAD,IAAA,CAANC,MAAM;EACrC,IAAMC,OAAO,GAAGD,MAAM,CAACE,UAAU,IAAIF,MAAM,CAACE,UAAU,CAACD,OAAO;EAC9D,IAAAE,KAAA,GAA6CH,MAAM,CAACI,iBAAiB,IAAI,CAAC,CAAC;IAAxCC,KAAK,GAAAF,KAAA,CAAhCG,yBAAyB;EAEjC,OAAO;IACLD,KAAK,EAALA,KAAK;IACLE,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAER,OAAO,GACT,CACE;MACES,QAAQ,EAAE,SAAS;MACnBC,SAAS,EAAE;IACb,CAAC,CACF,GACD;EACN,CAAC;AACH,CAAC;AAACC,OAAA,CAAAd,qBAAA,GAAAA,qBAAA"}
1
+ {"version":3,"file":"get-default-query-params.js","names":["getDefaultQueryParams","exports","_ref","schema","updated","properties","_ref2","displayProperties","where","adminDefaultListingFilter","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,IAAMA,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,SAAxBA,qBAAqBA,CAAAE,IAAA,EAAmB;EAAA,IAAbC,MAAM,GAAAD,IAAA,CAANC,MAAM;EACrC,IAAMC,OAAO,GAAGD,MAAM,CAACE,UAAU,IAAIF,MAAM,CAACE,UAAU,CAACD,OAAO;EAC9D,IAAAE,KAAA,GAA6CH,MAAM,CAACI,iBAAiB,IAAI,CAAC,CAAC;IAAxCC,KAAK,GAAAF,KAAA,CAAhCG,yBAAyB;EAEjC,OAAO;IACLD,KAAK,EAALA,KAAK;IACLE,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAER,OAAO,GACT,CACE;MACES,QAAQ,EAAE,SAAS;MACnBC,SAAS,EAAE;IACb,CAAC,CACF,GACD;EACN,CAAC;AACH,CAAC"}
@@ -9,11 +9,10 @@ exports.withContext = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _adminUiUtils = require("@blaze-cms/admin-ui-utils");
12
- var withContext = function withContext(Component) {
12
+ var withContext = exports.withContext = function withContext(Component) {
13
13
  return function (props) {
14
14
  var contexts = (0, _adminUiUtils.useMainContext)(_adminUiUtils.MainContext);
15
15
  return /*#__PURE__*/_react["default"].createElement(Component, (0, _extends2["default"])({}, props, contexts));
16
16
  };
17
17
  };
18
- exports.withContext = withContext;
19
18
  //# sourceMappingURL=withContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"withContext.js","names":["_react","_interopRequireDefault","require","_adminUiUtils","withContext","Component","props","contexts","useMainContext","MainContext","createElement","_extends2","exports"],"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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEO,IAAME,WAAW,GAAG,SAAdA,WAAWA,CAAGC,SAAS;EAAA,OAAI,UAAAC,KAAK,EAAI;IAC/C,IAAMC,QAAQ,GAAG,IAAAC,4BAAc,EAACC,yBAAW,CAAC;IAC5C,oBAAOT,MAAA,YAAAU,aAAA,CAACL,SAAS,MAAAM,SAAA,iBAAKL,KAAK,EAAMC,QAAQ,CAAG,CAAC;EAC/C,CAAC;AAAA;AAACK,OAAA,CAAAR,WAAA,GAAAA,WAAA"}
1
+ {"version":3,"file":"withContext.js","names":["_react","_interopRequireDefault","require","_adminUiUtils","withContext","exports","Component","props","contexts","useMainContext","MainContext","createElement","_extends2"],"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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEO,IAAME,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,SAAdA,WAAWA,CAAGE,SAAS;EAAA,OAAI,UAAAC,KAAK,EAAI;IAC/C,IAAMC,QAAQ,GAAG,IAAAC,4BAAc,EAACC,yBAAW,CAAC;IAC5C,oBAAOV,MAAA,YAAAW,aAAA,CAACL,SAAS,MAAAM,SAAA,iBAAKL,KAAK,EAAMC,QAAQ,CAAG,CAAC;EAC/C,CAAC;AAAA"}
@@ -18,6 +18,5 @@ function useToggle(initialValue) {
18
18
  }, [toggleValue]);
19
19
  return [toggleValue, toggler];
20
20
  }
21
- var _default = useToggle;
22
- exports["default"] = _default;
21
+ var _default = exports["default"] = useToggle;
23
22
  //# sourceMappingURL=useToggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useToggle.js","names":["_react","require","useToggle","initialValue","_useState","useState","_useState2","_slicedToArray2","toggleValue","setToggleValue","toggler","useCallback","_default","exports"],"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,IAAAA,MAAA,GAAAC,OAAA;AAEA,SAASC,SAASA,CAACC,YAAY,EAAE;EAC/B,IAAAC,SAAA,GAAsC,IAAAC,eAAQ,EAACF,YAAY,CAAC;IAAAG,UAAA,OAAAC,eAAA,aAAAH,SAAA;IAArDI,WAAW,GAAAF,UAAA;IAAEG,cAAc,GAAAH,UAAA;EAClC,IAAMI,OAAO,GAAG,IAAAC,kBAAW,EAAC;IAAA,OAAMF,cAAc,CAAC,CAACD,WAAW,CAAC;EAAA,GAAE,CAACA,WAAW,CAAC,CAAC;EAE9E,OAAO,CAACA,WAAW,EAAEE,OAAO,CAAC;AAC/B;AAAC,IAAAE,QAAA,GAEcV,SAAS;AAAAW,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"useToggle.js","names":["_react","require","useToggle","initialValue","_useState","useState","_useState2","_slicedToArray2","toggleValue","setToggleValue","toggler","useCallback","_default","exports"],"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,IAAAA,MAAA,GAAAC,OAAA;AAEA,SAASC,SAASA,CAACC,YAAY,EAAE;EAC/B,IAAAC,SAAA,GAAsC,IAAAC,eAAQ,EAACF,YAAY,CAAC;IAAAG,UAAA,OAAAC,eAAA,aAAAH,SAAA;IAArDI,WAAW,GAAAF,UAAA;IAAEG,cAAc,GAAAH,UAAA;EAClC,IAAMI,OAAO,GAAG,IAAAC,kBAAW,EAAC;IAAA,OAAMF,cAAc,CAAC,CAACD,WAAW,CAAC;EAAA,GAAE,CAACA,WAAW,CAAC,CAAC;EAE9E,OAAO,CAACA,WAAW,EAAEE,OAAO,CAAC;AAC/B;AAAC,IAAAE,QAAA,GAAAC,OAAA,cAEcX,SAAS"}
@@ -64,7 +64,6 @@ const ListingTable = ({
64
64
  })();
65
65
  }, [client, entitySchema, match.url, previousSchema.id, queryParams] // eslint-disable-line react-hooks/exhaustive-deps
66
66
  );
67
-
68
67
  const onCloseCardPrompt = () => {
69
68
  const updatedSelectedMenuItem = _objectSpread(_objectSpread({}, selectedMenuItem), {}, {
70
69
  isDisplayedPrompt: false
@@ -1 +1 @@
1
- {"version":3,"file":"ListingTable.js","names":["useApolloClient","React","useEffect","useState","Fragment","PropTypes","withRouter","Link","More","MainContext","useMainContext","PageHeader","DeleteAction","useToasts","ListingTableContent","availableActions","fetchData","populateRows","formatRows","getDefaultQueryParams","OVER_SCAN_BUFFER","ListingTable","match","entitySchema","selectedMenuItem","tableData","setTableData","modalStatus","setModalStatus","itemToDelete","setItemToDelete","previousSchema","setPreviousSchema","id","scrollToIndex","setScrollToIndex","verifiedRanges","setVerifiedRanges","queryParamsDefault","schema","queryParams","setQueryParams","menuItems","setMenuItems","client","addToast","data","querySettings","populatedTable","toggleModal","url","rows","onCloseCardPrompt","updatedSelectedMenuItem","_objectSpread","isDisplayedPrompt","header","items","updatedItems","map","item","name","deleteAction","delete","submit","parsedFormValues","updatedTableData","filter","handleSort","event","property","direction","Object","entries","sortQueryParams","sort","columns","firstColumn","appliedSort","handleRenderedItems","params","startIndex","rowsLength","length","loadIndex","Math","floor","includes","updatedQueryParams","offset","updatedRows","createElement","className","onClose","itemName","title","displayName","subtitle","to","Actions","Avatar","isMoreMenu","Content","overScanBuffer","onSort","onRenderItems","propTypes","object","isRequired"],"sources":["../../../src/components/ListingTable/ListingTable.js"],"sourcesContent":["import { useApolloClient } from '@apollo/client';\nimport React, { useEffect, useState, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { withRouter, Link } from 'react-router-dom';\nimport More from '@blaze-react/more';\nimport { MainContext, useMainContext } from '@blaze-cms/admin-ui-utils';\nimport { PageHeader, DeleteAction } from '@blaze-cms/admin';\nimport { useToasts } from '@blaze-react/toaster';\nimport ListingTableContent from './ListingTableContent';\nimport availableActions from '../EntityManager/Entity/actions-handlers';\nimport { fetchData } from './service';\nimport { populateRows, formatRows } from './mappers/populate-rows';\nimport { getDefaultQueryParams } from '../../utils/get-default-query-params';\n\nconst OVER_SCAN_BUFFER = 10;\n\nconst ListingTable = ({ match, entitySchema, selectedMenuItem }) => {\n const [tableData, setTableData] = useState({});\n const [modalStatus, setModalStatus] = useState(false);\n const [itemToDelete, setItemToDelete] = useState({});\n const [previousSchema, setPreviousSchema] = useState({ id: null });\n const [scrollToIndex, setScrollToIndex] = useState(0);\n const [verifiedRanges, setVerifiedRanges] = useState([]);\n const queryParamsDefault = getDefaultQueryParams({ schema: entitySchema });\n const [queryParams, setQueryParams] = useState(queryParamsDefault);\n const { menuItems, setMenuItems } = useMainContext(MainContext);\n const client = useApolloClient();\n const { addToast } = useToasts();\n\n useEffect(\n () => {\n (async () => {\n if (\n entitySchema.id !== previousSchema.id ||\n (previousSchema.id === null && entitySchema.id)\n ) {\n const data = await fetchData({\n client,\n querySettings: {\n entitySchema,\n queryParams: queryParamsDefault\n }\n });\n const populatedTable = populateRows({\n toggleModal,\n url: match.url,\n entitySchema,\n rows: data\n });\n setTableData(populatedTable);\n setPreviousSchema({ id: entitySchema.id });\n }\n })();\n },\n [client, entitySchema, match.url, previousSchema.id, queryParams] // eslint-disable-line react-hooks/exhaustive-deps\n );\n\n const onCloseCardPrompt = () => {\n const updatedSelectedMenuItem = {\n ...selectedMenuItem,\n isDisplayedPrompt: false\n };\n const [{ header, items }] = menuItems;\n const updatedItems = items.map(\n item => (item.name === selectedMenuItem.name ? updatedSelectedMenuItem : item)\n );\n setMenuItems([{ header, items: updatedItems }]);\n };\n\n const toggleModal = item => {\n setModalStatus(!!item);\n setItemToDelete(item || {});\n };\n\n const deleteAction = async () => {\n await availableActions.delete.submit(\n {\n entitySchema,\n parsedFormValues: { id: itemToDelete.id },\n client\n },\n addToast\n );\n\n toggleModal();\n\n const updatedTableData = {\n ...tableData,\n rows: tableData.rows.filter(({ id }) => id !== itemToDelete.id)\n };\n\n setTableData(updatedTableData);\n };\n\n const handleSort = async event => {\n const [[property, direction]] = Object.entries(event);\n const sortQueryParams = {\n ...queryParamsDefault,\n sort: [{ property, direction }]\n };\n setScrollToIndex(0);\n setVerifiedRanges([]);\n setQueryParams(sortQueryParams);\n\n const data = await fetchData({\n client,\n querySettings: {\n entitySchema,\n queryParams: sortQueryParams\n }\n });\n const { columns } = tableData;\n const [firstColumn] = columns;\n\n setTableData({\n ...tableData,\n appliedSort: { [property]: direction },\n rows: formatRows({ rows: data, url: match.url, toggleModal, firstColumn })\n });\n };\n\n const handleRenderedItems = async params => {\n const { startIndex } = params;\n const rowsLength = tableData.rows.length;\n const loadIndex = Math.floor(rowsLength / 3) - OVER_SCAN_BUFFER;\n if (loadIndex > 0 && loadIndex < startIndex && !verifiedRanges.includes(loadIndex)) {\n const updatedQueryParams = {\n ...queryParams,\n offset: rowsLength\n };\n const data = await fetchData({\n client,\n querySettings: {\n entitySchema,\n queryParams: updatedQueryParams\n }\n });\n const updatedRows = [\n ...tableData.rows,\n ...formatRows({ rows: data, url: match.url, toggleModal })\n ];\n\n setVerifiedRanges([...verifiedRanges, loadIndex]);\n setQueryParams(updatedQueryParams);\n setTableData({\n ...tableData,\n rows: updatedRows\n });\n setScrollToIndex(startIndex + OVER_SCAN_BUFFER);\n }\n };\n\n if (!tableData || !tableData.rows) return 'loading';\n\n return (\n <div className=\"page\">\n {modalStatus && (\n <DeleteAction\n onClose={toggleModal}\n deleteAction={deleteAction}\n itemName={itemToDelete.name}\n />\n )}\n <PageHeader title={entitySchema.displayName} subtitle=\"\">\n {(!selectedMenuItem.isDisplayedPrompt || !!tableData.rows.length) && (\n <Fragment>\n <Link\n data-testid=\"addEntity\"\n className=\"button button--small\"\n to={`${match.url}/create`}>\n Add\n </Link>\n <PageHeader.Actions>\n <More>\n <More.Avatar isMoreMenu>\n <span className=\"material-icons\">more_vert</span>\n </More.Avatar>\n <More.Content isMoreMenu />\n </More>\n </PageHeader.Actions>\n </Fragment>\n )}\n </PageHeader>\n <ListingTableContent\n overScanBuffer={OVER_SCAN_BUFFER}\n onSort={handleSort}\n onRenderItems={handleRenderedItems}\n tableData={tableData}\n onCloseCardPrompt={onCloseCardPrompt}\n selectedMenuItem={selectedMenuItem}\n scrollToIndex={scrollToIndex}\n />\n </div>\n );\n};\nListingTable.propTypes = {\n entitySchema: PropTypes.object.isRequired,\n match: PropTypes.object.isRequired,\n selectedMenuItem: PropTypes.object.isRequired\n};\n\nexport default withRouter(ListingTable);\n"],"mappings":";;;AAAA,SAASA,eAAe,QAAQ,gBAAgB;AAChD,OAAOC,KAAK,IAAIC,SAAS,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,OAAO;AAC5D,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,UAAU,EAAEC,IAAI,QAAQ,kBAAkB;AACnD,OAAOC,IAAI,MAAM,mBAAmB;AACpC,SAASC,WAAW,EAAEC,cAAc,QAAQ,2BAA2B;AACvE,SAASC,UAAU,EAAEC,YAAY,QAAQ,kBAAkB;AAC3D,SA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BAAoB;IACnCtD,SAAS,EAAEA,SAAU;IACrB2B,iBAAiB,EAAEA,iBAAkB;IACrC5B,gBAAgB,EAAEA,gBAAiB;IACnCU,aAAa,EAAEA;EAAc,CAC9B,CACE,CAAC;AAEV,CAAC;AACDb,YAAY,CAACqF,SAAS,GAAG;EACvBnF,YAAY,EAAElB,SAAS,CAACsG,MAAM,CAACC,UAAU;EACzCtF,KAAK,EAAEjB,SAAS,CAACsG,MAAM,CAACC,UAAU;EAClCpF,gBAAgB,EAAEnB,SAAS,CAACsG,MAAM,CAACC;AACrC,CAAC;AAED,eAAetG,UAAU,CAACe,YAAY,CAAC"}
1
+ {"version":3,"file":"ListingTable.js","names":["useApolloClient","React","useEffect","useState","Fragment","PropTypes","withRouter","Link","More","MainContext","useMainContext","PageHeader","DeleteAction","useToasts","ListingTableContent","availableActions","fetchData","populateRows","formatRows","getDefaultQueryParams","OVER_SCAN_BUFFER","ListingTable","match","entitySchema","selectedMenuItem","tableData","setTableData","modalStatus","setModalStatus","itemToDelete","setItemToDelete","previousSchema","setPreviousSchema","id","scrollToIndex","setScrollToIndex","verifiedRanges","setVerifiedRanges","queryParamsDefault","schema","queryParams","setQueryParams","menuItems","setMenuItems","client","addToast","data","querySettings","populatedTable","toggleModal","url","rows","onCloseCardPrompt","updatedSelectedMenuItem","_objectSpread","isDisplayedPrompt","header","items","updatedItems","map","item","name","deleteAction","delete","submit","parsedFormValues","updatedTableData","filter","handleSort","event","property","direction","Object","entries","sortQueryParams","sort","columns","firstColumn","appliedSort","handleRenderedItems","params","startIndex","rowsLength","length","loadIndex","Math","floor","includes","updatedQueryParams","offset","updatedRows","createElement","className","onClose","itemName","title","displayName","subtitle","to","Actions","Avatar","isMoreMenu","Content","overScanBuffer","onSort","onRenderItems","propTypes","object","isRequired"],"sources":["../../../src/components/ListingTable/ListingTable.js"],"sourcesContent":["import { useApolloClient } from '@apollo/client';\nimport React, { useEffect, useState, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { withRouter, Link } from 'react-router-dom';\nimport More from '@blaze-react/more';\nimport { MainContext, useMainContext } from '@blaze-cms/admin-ui-utils';\nimport { PageHeader, DeleteAction } from '@blaze-cms/admin';\nimport { useToasts } from '@blaze-react/toaster';\nimport ListingTableContent from './ListingTableContent';\nimport availableActions from '../EntityManager/Entity/actions-handlers';\nimport { fetchData } from './service';\nimport { populateRows, formatRows } from './mappers/populate-rows';\nimport { getDefaultQueryParams } from '../../utils/get-default-query-params';\n\nconst OVER_SCAN_BUFFER = 10;\n\nconst ListingTable = ({ match, entitySchema, selectedMenuItem }) => {\n const [tableData, setTableData] = useState({});\n const [modalStatus, setModalStatus] = useState(false);\n const [itemToDelete, setItemToDelete] = useState({});\n const [previousSchema, setPreviousSchema] = useState({ id: null });\n const [scrollToIndex, setScrollToIndex] = useState(0);\n const [verifiedRanges, setVerifiedRanges] = useState([]);\n const queryParamsDefault = getDefaultQueryParams({ schema: entitySchema });\n const [queryParams, setQueryParams] = useState(queryParamsDefault);\n const { menuItems, setMenuItems } = useMainContext(MainContext);\n const client = useApolloClient();\n const { addToast } = useToasts();\n\n useEffect(\n () => {\n (async () => {\n if (\n entitySchema.id !== previousSchema.id ||\n (previousSchema.id === null && entitySchema.id)\n ) {\n const data = await fetchData({\n client,\n querySettings: {\n entitySchema,\n queryParams: queryParamsDefault\n }\n });\n const populatedTable = populateRows({\n toggleModal,\n url: match.url,\n entitySchema,\n rows: data\n });\n setTableData(populatedTable);\n setPreviousSchema({ id: entitySchema.id });\n }\n })();\n },\n [client, entitySchema, match.url, previousSchema.id, queryParams] // eslint-disable-line react-hooks/exhaustive-deps\n );\n\n const onCloseCardPrompt = () => {\n const updatedSelectedMenuItem = {\n ...selectedMenuItem,\n isDisplayedPrompt: false\n };\n const [{ header, items }] = menuItems;\n const updatedItems = items.map(\n item => (item.name === selectedMenuItem.name ? updatedSelectedMenuItem : item)\n );\n setMenuItems([{ header, items: updatedItems }]);\n };\n\n const toggleModal = item => {\n setModalStatus(!!item);\n setItemToDelete(item || {});\n };\n\n const deleteAction = async () => {\n await availableActions.delete.submit(\n {\n entitySchema,\n parsedFormValues: { id: itemToDelete.id },\n client\n },\n addToast\n );\n\n toggleModal();\n\n const updatedTableData = {\n ...tableData,\n rows: tableData.rows.filter(({ id }) => id !== itemToDelete.id)\n };\n\n setTableData(updatedTableData);\n };\n\n const handleSort = async event => {\n const [[property, direction]] = Object.entries(event);\n const sortQueryParams = {\n ...queryParamsDefault,\n sort: [{ property, direction }]\n };\n setScrollToIndex(0);\n setVerifiedRanges([]);\n setQueryParams(sortQueryParams);\n\n const data = await fetchData({\n client,\n querySettings: {\n entitySchema,\n queryParams: sortQueryParams\n }\n });\n const { columns } = tableData;\n const [firstColumn] = columns;\n\n setTableData({\n ...tableData,\n appliedSort: { [property]: direction },\n rows: formatRows({ rows: data, url: match.url, toggleModal, firstColumn })\n });\n };\n\n const handleRenderedItems = async params => {\n const { startIndex } = params;\n const rowsLength = tableData.rows.length;\n const loadIndex = Math.floor(rowsLength / 3) - OVER_SCAN_BUFFER;\n if (loadIndex > 0 && loadIndex < startIndex && !verifiedRanges.includes(loadIndex)) {\n const updatedQueryParams = {\n ...queryParams,\n offset: rowsLength\n };\n const data = await fetchData({\n client,\n querySettings: {\n entitySchema,\n queryParams: updatedQueryParams\n }\n });\n const updatedRows = [\n ...tableData.rows,\n ...formatRows({ rows: data, url: match.url, toggleModal })\n ];\n\n setVerifiedRanges([...verifiedRanges, loadIndex]);\n setQueryParams(updatedQueryParams);\n setTableData({\n ...tableData,\n rows: updatedRows\n });\n setScrollToIndex(startIndex + OVER_SCAN_BUFFER);\n }\n };\n\n if (!tableData || !tableData.rows) return 'loading';\n\n return (\n <div className=\"page\">\n {modalStatus && (\n <DeleteAction\n onClose={toggleModal}\n deleteAction={deleteAction}\n itemName={itemToDelete.name}\n />\n )}\n <PageHeader title={entitySchema.displayName} subtitle=\"\">\n {(!selectedMenuItem.isDisplayedPrompt || !!tableData.rows.length) && (\n <Fragment>\n <Link\n data-testid=\"addEntity\"\n className=\"button button--small\"\n to={`${match.url}/create`}>\n Add\n </Link>\n <PageHeader.Actions>\n <More>\n <More.Avatar isMoreMenu>\n <span className=\"material-icons\">more_vert</span>\n </More.Avatar>\n <More.Content isMoreMenu />\n </More>\n </PageHeader.Actions>\n </Fragment>\n )}\n </PageHeader>\n <ListingTableContent\n overScanBuffer={OVER_SCAN_BUFFER}\n onSort={handleSort}\n onRenderItems={handleRenderedItems}\n tableData={tableData}\n onCloseCardPrompt={onCloseCardPrompt}\n selectedMenuItem={selectedMenuItem}\n scrollToIndex={scrollToIndex}\n />\n </div>\n );\n};\nListingTable.propTypes = {\n entitySchema: PropTypes.object.isRequired,\n match: PropTypes.object.isRequired,\n selectedMenuItem: PropTypes.object.isRequired\n};\n\nexport default withRouter(ListingTable);\n"],"mappings":";;;AAAA,SAASA,eAAe,QAAQ,gBAAgB;AAChD,OAAOC,KAAK,IAAIC,SAAS,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,OAAO;AAC5D,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,UAAU,EAAEC,IAAI,QAAQ,kBAAkB;AACnD,OAAOC,IAAI,MAAM,mBAAmB;AACpC,SAASC,WAAW,EAAEC,cAAc,QAAQ,2BAA2B;AACvE,SAASC,UAAU,EAAEC,YAAY,QAAQ,kBAAkB;AAC3D,SAASC,SAAS,QAAQ,sBAAsB;AAChD,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,OAAOC,gBAAgB,MAAM,0CAA0C;AACvE,SAASC,SAAS,QAAQ,WAAW;AACrC,SAASC,YAAY,EAAEC,UAAU,QAAQ,yBAAyB;AAClE,SAASC,qBAAqB,QAAQ,sCAAsC;AAE5E,MAAMC,gBAAgB,GAAG,EAAE;AAE3B,MAAMC,YAAY,GAAGA,CAAC;EAAEC,KAAK;EAAEC,YAAY;EAAEC;AAAiB,CAAC,KAAK;EAClE,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGvB,QAAQ,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}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaze-cms/plugin-data-ui",
3
- "version": "0.139.0-alpha.1",
3
+ "version": "0.139.0-alpha.4",
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.136.0",
30
+ "@blaze-cms/admin-ui-utils": "0.139.0-alpha.4",
31
31
  "@blaze-cms/core-errors": "^0.131.0",
32
- "@blaze-cms/react-form-builder": "^0.136.0",
33
- "@blaze-cms/react-page-builder": "0.139.0-alpha.1",
32
+ "@blaze-cms/react-form-builder": "0.139.0-alpha.4",
33
+ "@blaze-cms/react-page-builder": "0.139.0-alpha.4",
34
34
  "@blaze-cms/setup-ui": "^0.131.0",
35
35
  "@blaze-cms/versioning-ui": "^0.136.0",
36
36
  "@blaze-react/button": "0.5.19",
@@ -65,5 +65,5 @@
65
65
  "lib/*",
66
66
  "lib-es/*"
67
67
  ],
68
- "gitHead": "1cee8a2d2777b141287f3f59844156f56fa97f80"
68
+ "gitHead": "718fa23556026a90878b25d1ba751052dfdb5494"
69
69
  }