@blaze-cms/plugin-data-ui 0.125.0-alpha.1 → 0.125.0-alpha.13

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 (170) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/lib/components/EntityDataListing/EntityDataListing.js +17 -40
  3. package/lib/components/EntityDataListing/EntityDataListing.js.map +1 -1
  4. package/lib/components/EntityDataListing/index.js +0 -4
  5. package/lib/components/EntityDataListing/index.js.map +1 -1
  6. package/lib/components/EntityManager/Entity/Entity.js +67 -204
  7. package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
  8. package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js +13 -28
  9. package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  10. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +5 -26
  11. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  12. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js +0 -4
  13. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
  14. package/lib/components/EntityManager/Entity/EntityHeader/index.js +0 -4
  15. package/lib/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
  16. package/lib/components/EntityManager/Entity/SideBarRelations/index.js +13 -57
  17. package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  18. package/lib/components/EntityManager/Entity/actions-handlers/create/index.js +0 -3
  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 +0 -16
  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 +0 -11
  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 +0 -3
  25. package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
  26. package/lib/components/EntityManager/Entity/actions-handlers/index.js +0 -7
  27. package/lib/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
  28. package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js +0 -3
  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 +0 -18
  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 +0 -3
  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 +0 -25
  35. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
  36. package/lib/components/EntityManager/Entity/index.js +0 -4
  37. package/lib/components/EntityManager/Entity/index.js.map +1 -1
  38. package/lib/components/EntityManager/EntityManager.js +24 -83
  39. package/lib/components/EntityManager/EntityManager.js.map +1 -1
  40. package/lib/components/EntityManager/index.js +0 -4
  41. package/lib/components/EntityManager/index.js.map +1 -1
  42. package/lib/components/EntityManager/utils/data-mappers.js +5 -38
  43. package/lib/components/EntityManager/utils/data-mappers.js.map +1 -1
  44. package/lib/components/EntityManager/utils/entity.js +3 -38
  45. package/lib/components/EntityManager/utils/entity.js.map +1 -1
  46. package/lib/components/EntityManager/utils/entityAvailableActions.js +17 -42
  47. package/lib/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
  48. package/lib/components/EntityManager/utils/is-form-empty.js +0 -7
  49. package/lib/components/EntityManager/utils/is-form-empty.js.map +1 -1
  50. package/lib/components/EntityManager/utils/query.js +2 -11
  51. package/lib/components/EntityManager/utils/query.js.map +1 -1
  52. package/lib/components/ListingTable/ListingTable.js +31 -116
  53. package/lib/components/ListingTable/ListingTable.js.map +1 -1
  54. package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js +9 -22
  55. package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  56. package/lib/components/ListingTable/ListingTableContent/index.js +0 -4
  57. package/lib/components/ListingTable/ListingTableContent/index.js.map +1 -1
  58. package/lib/components/ListingTable/TableActions/TableActions.js +2 -11
  59. package/lib/components/ListingTable/TableActions/TableActions.js.map +1 -1
  60. package/lib/components/ListingTable/TableActions/index.js +0 -4
  61. package/lib/components/ListingTable/TableActions/index.js.map +1 -1
  62. package/lib/components/ListingTable/index.js +0 -4
  63. package/lib/components/ListingTable/index.js.map +1 -1
  64. package/lib/components/ListingTable/mappers/populate-rows.js +13 -49
  65. package/lib/components/ListingTable/mappers/populate-rows.js.map +1 -1
  66. package/lib/components/ListingTable/service/index.js +0 -11
  67. package/lib/components/ListingTable/service/index.js.map +1 -1
  68. package/lib/components/Tabs/index.js +5 -16
  69. package/lib/components/Tabs/index.js.map +1 -1
  70. package/lib/constants.js +0 -1
  71. package/lib/constants.js.map +1 -1
  72. package/lib/index.js +0 -29
  73. package/lib/index.js.map +1 -1
  74. package/lib/utils/add-content-menu-items.js +2 -17
  75. package/lib/utils/add-content-menu-items.js.map +1 -1
  76. package/lib/utils/build-create-entity-mutation.js +0 -12
  77. package/lib/utils/build-create-entity-mutation.js.map +1 -1
  78. package/lib/utils/build-delete-entity-mutation.js +0 -10
  79. package/lib/utils/build-delete-entity-mutation.js.map +1 -1
  80. package/lib/utils/build-listing-query.js +0 -10
  81. package/lib/utils/build-listing-query.js.map +1 -1
  82. package/lib/utils/build-update-data-query.js +0 -12
  83. package/lib/utils/build-update-data-query.js.map +1 -1
  84. package/lib/utils/build-update-publish-unpublish-mutation.js +0 -9
  85. package/lib/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  86. package/lib/utils/get-default-query-params.js +0 -3
  87. package/lib/utils/get-default-query-params.js.map +1 -1
  88. package/lib/utils/hoc/withContext.js +0 -7
  89. package/lib/utils/hoc/withContext.js.map +1 -1
  90. package/lib/utils/hooks/useToggle.js +3 -10
  91. package/lib/utils/hooks/useToggle.js.map +1 -1
  92. package/lib/utils/index.js +0 -3
  93. package/lib/utils/index.js.map +1 -1
  94. package/lib-es/components/EntityDataListing/EntityDataListing.js +0 -2
  95. package/lib-es/components/EntityDataListing/EntityDataListing.js.map +1 -1
  96. package/lib-es/components/EntityDataListing/index.js.map +1 -1
  97. package/lib-es/components/EntityManager/Entity/Entity.js +10 -55
  98. package/lib-es/components/EntityManager/Entity/Entity.js.map +1 -1
  99. package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js +0 -2
  100. package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  101. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +2 -5
  102. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  103. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
  104. package/lib-es/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
  105. package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js +0 -3
  106. package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  107. package/lib-es/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
  108. package/lib-es/components/EntityManager/Entity/actions-handlers/create/submit.js +0 -3
  109. package/lib-es/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  110. package/lib-es/components/EntityManager/Entity/actions-handlers/delete/delete.js +0 -3
  111. package/lib-es/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
  112. package/lib-es/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
  113. package/lib-es/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
  114. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
  115. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/publish.js +0 -5
  116. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  117. package/lib-es/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
  118. package/lib-es/components/EntityManager/Entity/actions-handlers/update/submit.js +0 -6
  119. package/lib-es/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
  120. package/lib-es/components/EntityManager/Entity/index.js.map +1 -1
  121. package/lib-es/components/EntityManager/EntityManager.js +2 -14
  122. package/lib-es/components/EntityManager/EntityManager.js.map +1 -1
  123. package/lib-es/components/EntityManager/index.js.map +1 -1
  124. package/lib-es/components/EntityManager/utils/data-mappers.js +0 -11
  125. package/lib-es/components/EntityManager/utils/data-mappers.js.map +1 -1
  126. package/lib-es/components/EntityManager/utils/entity.js +0 -13
  127. package/lib-es/components/EntityManager/utils/entity.js.map +1 -1
  128. package/lib-es/components/EntityManager/utils/entityAvailableActions.js +0 -2
  129. package/lib-es/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
  130. package/lib-es/components/EntityManager/utils/is-form-empty.js +0 -2
  131. package/lib-es/components/EntityManager/utils/is-form-empty.js.map +1 -1
  132. package/lib-es/components/EntityManager/utils/query.js +2 -4
  133. package/lib-es/components/EntityManager/utils/query.js.map +1 -1
  134. package/lib-es/components/ListingTable/ListingTable.js +0 -17
  135. package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
  136. package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js +0 -2
  137. package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  138. package/lib-es/components/ListingTable/ListingTableContent/index.js.map +1 -1
  139. package/lib-es/components/ListingTable/TableActions/TableActions.js +0 -2
  140. package/lib-es/components/ListingTable/TableActions/TableActions.js.map +1 -1
  141. package/lib-es/components/ListingTable/TableActions/index.js.map +1 -1
  142. package/lib-es/components/ListingTable/index.js.map +1 -1
  143. package/lib-es/components/ListingTable/mappers/populate-rows.js +0 -13
  144. package/lib-es/components/ListingTable/mappers/populate-rows.js.map +1 -1
  145. package/lib-es/components/ListingTable/service/index.js +0 -2
  146. package/lib-es/components/ListingTable/service/index.js.map +1 -1
  147. package/lib-es/components/Tabs/index.js +0 -2
  148. package/lib-es/components/Tabs/index.js.map +1 -1
  149. package/lib-es/constants.js.map +1 -1
  150. package/lib-es/index.js +2 -6
  151. package/lib-es/index.js.map +1 -1
  152. package/lib-es/utils/add-content-menu-items.js +0 -3
  153. package/lib-es/utils/add-content-menu-items.js.map +1 -1
  154. package/lib-es/utils/build-create-entity-mutation.js +0 -3
  155. package/lib-es/utils/build-create-entity-mutation.js.map +1 -1
  156. package/lib-es/utils/build-delete-entity-mutation.js +0 -3
  157. package/lib-es/utils/build-delete-entity-mutation.js.map +1 -1
  158. package/lib-es/utils/build-listing-query.js +0 -3
  159. package/lib-es/utils/build-listing-query.js.map +1 -1
  160. package/lib-es/utils/build-update-data-query.js +0 -3
  161. package/lib-es/utils/build-update-data-query.js.map +1 -1
  162. package/lib-es/utils/build-update-publish-unpublish-mutation.js +0 -3
  163. package/lib-es/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  164. package/lib-es/utils/get-default-query-params.js +0 -1
  165. package/lib-es/utils/get-default-query-params.js.map +1 -1
  166. package/lib-es/utils/hoc/withContext.js.map +1 -1
  167. package/lib-es/utils/hooks/useToggle.js +0 -2
  168. package/lib-es/utils/hooks/useToggle.js.map +1 -1
  169. package/lib-es/utils/index.js.map +1 -1
  170. package/package.json +3 -3
@@ -1,33 +1,23 @@
1
1
  "use strict";
2
2
 
3
3
  require("core-js/modules/es.object.define-property.js");
4
-
5
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
8
  exports["default"] = void 0;
11
-
12
9
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
-
14
10
  var _client = require("@apollo/client");
15
-
16
11
  var _coreErrors = require("@blaze-cms/core-errors");
17
-
18
12
  var _lodash = _interopRequireDefault(require("lodash.upperfirst"));
19
-
20
13
  var _templateObject;
21
-
22
14
  function buildDeleteEntity(entitySchema) {
23
15
  if (!entitySchema || !entitySchema.actions || !entitySchema.actions["delete"]) {
24
16
  throw new _coreErrors.BlazeError('Delete query requires delete action from entity schema');
25
17
  }
26
-
27
18
  var actionInput = (0, _lodash["default"])("".concat(entitySchema.actions["delete"], "Input"));
28
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"]);
29
20
  }
30
-
31
21
  var _default = buildDeleteEntity;
32
22
  exports["default"] = _default;
33
23
  //# sourceMappingURL=build-delete-entity-mutation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-delete-entity-mutation.js","names":["buildDeleteEntity","entitySchema","actions","BlazeError","actionInput","upperfirst","gql"],"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;;AACA;;AACA;;;;AAEA,SAASA,iBAAT,CAA2BC,YAA3B,EAAyC;EACvC,IAAI,CAACA,YAAD,IAAiB,CAACA,YAAY,CAACC,OAA/B,IAA0C,CAACD,YAAY,CAACC,OAAb,UAA/C,EAA4E;IAC1E,MAAM,IAAIC,sBAAJ,CAAe,wDAAf,CAAN;EACD;;EAED,IAAMC,WAAW,GAAG,IAAAC,kBAAA,YAAcJ,YAAY,CAACC,OAAb,UAAd,WAApB;EAEA,WAAOI,WAAP,wMACiCF,WADjC,EAEkBH,YAAY,CAACC,OAAb,UAFlB;AAOD;;eAEcF,iB"}
1
+ {"version":3,"file":"build-delete-entity-mutation.js","names":["buildDeleteEntity","entitySchema","actions","BlazeError","actionInput","upperfirst","gql"],"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;AACA;AACA;AAA2C;AAE3C,SAASA,iBAAiB,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,YAAIJ,YAAY,CAACC,OAAO,UAAO,WAAQ;EAErE,WAAOI,WAAG,wMACuBF,WAAW,EAC1BH,YAAY,CAACC,OAAO,UAAO;AAK/C;AAAC,eAEcF,iBAAiB;AAAA"}
@@ -1,33 +1,23 @@
1
1
  "use strict";
2
2
 
3
3
  require("core-js/modules/es.object.define-property.js");
4
-
5
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
8
  exports["default"] = void 0;
11
-
12
9
  require("core-js/modules/es.array.join.js");
13
-
14
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
15
-
16
11
  var _client = require("@apollo/client");
17
-
18
12
  var _coreErrors = require("@blaze-cms/core-errors");
19
-
20
13
  var _templateObject;
21
-
22
14
  function buildListingQuery(entitySchema) {
23
15
  if (!entitySchema.actions || !entitySchema.actions.getAll || !entitySchema.listingProperties) {
24
16
  throw new _coreErrors.BlazeError('Listing query requires getAll action and listingProperties from entity schema');
25
17
  }
26
-
27
18
  var sortType = entitySchema.actions.getAll[0].toUpperCase() + entitySchema.actions.getAll.substr(1);
28
19
  return (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n query ", "($limit: Int, $offset:Int, $sort: [", "SortItem]) {\n listingData: ", "(limit: $limit, offset:$offset, sort:$sort){\n id,\n ", "\n }\n }\n "])), entitySchema.actions.getAll, sortType, entitySchema.actions.getAll, entitySchema.listingProperties.join(',\n'));
29
20
  }
30
-
31
21
  var _default = buildListingQuery;
32
22
  exports["default"] = _default;
33
23
  //# sourceMappingURL=build-listing-query.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-listing-query.js","names":["buildListingQuery","entitySchema","actions","getAll","listingProperties","BlazeError","sortType","toUpperCase","substr","gql","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;;AACA;;;;AAEA,SAASA,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,IAAIC,sBAAJ,CACJ,+EADI,CAAN;EAGD;;EAED,IAAMC,QAAQ,GACZL,YAAY,CAACC,OAAb,CAAqBC,MAArB,CAA4B,CAA5B,EAA+BI,WAA/B,KAA+CN,YAAY,CAACC,OAAb,CAAqBC,MAArB,CAA4BK,MAA5B,CAAmC,CAAnC,CADjD;EAGA,WAAOC,WAAP,+QACUR,YAAY,CAACC,OAAb,CAAqBC,MAD/B,EAC2EG,QAD3E,EAEmBL,YAAY,CAACC,OAAb,CAAqBC,MAFxC,EAIQF,YAAY,CAACG,iBAAb,CAA+BM,IAA/B,CAAoC,KAApC,CAJR;AAQD;;eAEcV,iB"}
1
+ {"version":3,"file":"build-listing-query.js","names":["buildListingQuery","entitySchema","actions","getAll","listingProperties","BlazeError","sortType","toUpperCase","substr","gql","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;AACA;AAAoD;AAEpD,SAASA,iBAAiB,CAACC,YAAY,EAAE;EACvC,IAAI,CAACA,YAAY,CAACC,OAAO,IAAI,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,IAAI,CAACF,YAAY,CAACG,iBAAiB,EAAE;IAC5F,MAAM,IAAIC,sBAAU,CAClB,+EAA+E,CAChF;EACH;EAEA,IAAMC,QAAQ,GACZL,YAAY,CAACC,OAAO,CAACC,MAAM,CAAC,CAAC,CAAC,CAACI,WAAW,EAAE,GAAGN,YAAY,CAACC,OAAO,CAACC,MAAM,CAACK,MAAM,CAAC,CAAC,CAAC;EAEtF,WAAOC,WAAG,+QACAR,YAAY,CAACC,OAAO,CAACC,MAAM,EAAsCG,QAAQ,EAChEL,YAAY,CAACC,OAAO,CAACC,MAAM,EAEtCF,YAAY,CAACG,iBAAiB,CAACM,IAAI,CAAC,KAAK,CAAC;AAIpD;AAAC,eAEcV,iBAAiB;AAAA"}
@@ -1,38 +1,26 @@
1
1
  "use strict";
2
2
 
3
3
  require("core-js/modules/es.object.define-property.js");
4
-
5
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
8
  exports["default"] = void 0;
11
-
12
9
  require("core-js/modules/es.array.join.js");
13
-
14
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
15
-
16
11
  var _client = require("@apollo/client");
17
-
18
12
  var _coreErrors = require("@blaze-cms/core-errors");
19
-
20
13
  var _lodash = _interopRequireDefault(require("lodash.upperfirst"));
21
-
22
14
  var _adminUiUtils = require("@blaze-cms/admin-ui-utils");
23
-
24
15
  var _templateObject;
25
-
26
16
  function buildUpdateDataQuery(entitySchema) {
27
17
  if (!entitySchema.actions || !entitySchema.actions.update || !entitySchema.properties) {
28
18
  throw new _coreErrors.BlazeError('Update DataEntity query requires get action and properties from entity schema');
29
19
  }
30
-
31
20
  var actionInput = (0, _lodash["default"])("".concat(entitySchema.actions.update, "Input"));
32
21
  var dataProperties = (0, _adminUiUtils.getDataProperties)(entitySchema);
33
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'));
34
23
  }
35
-
36
24
  var _default = buildUpdateDataQuery;
37
25
  exports["default"] = _default;
38
26
  //# sourceMappingURL=build-update-data-query.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-update-data-query.js","names":["buildUpdateDataQuery","entitySchema","actions","update","properties","BlazeError","actionInput","upperfirst","dataProperties","getDataProperties","gql","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;;AACA;;AACA;;AACA;;;;AAEA,SAASA,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,IAAIC,sBAAJ,CACJ,+EADI,CAAN;EAGD;;EAED,IAAMC,WAAW,GAAG,IAAAC,kBAAA,YAAcN,YAAY,CAACC,OAAb,CAAqBC,MAAnC,WAApB;EACA,IAAMK,cAAc,GAAG,IAAAC,+BAAA,EAAkBR,YAAlB,CAAvB;EAEA,WAAOS,WAAP,wQACiCJ,WADjC,EAEkBL,YAAY,CAACC,OAAb,CAAqBC,MAFvC,EAKUK,cAAc,CAACG,IAAf,CAAoB,KAApB,CALV;AAWD;;eAEcX,oB"}
1
+ {"version":3,"file":"build-update-data-query.js","names":["buildUpdateDataQuery","entitySchema","actions","update","properties","BlazeError","actionInput","upperfirst","dataProperties","getDataProperties","gql","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;AACA;AACA;AACA;AAA8D;AAE9D,SAASA,oBAAoB,CAACC,YAAY,EAAE;EAC1C,IAAI,CAACA,YAAY,CAACC,OAAO,IAAI,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,IAAI,CAACF,YAAY,CAACG,UAAU,EAAE;IACrF,MAAM,IAAIC,sBAAU,CAClB,+EAA+E,CAChF;EACH;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,YAAIN,YAAY,CAACC,OAAO,CAACC,MAAM,WAAQ;EACrE,IAAMK,cAAc,GAAG,IAAAC,+BAAiB,EAACR,YAAY,CAAC;EAEtD,WAAOS,WAAG,wQACuBJ,WAAW,EAC1BL,YAAY,CAACC,OAAO,CAACC,MAAM,EAGnCK,cAAc,CAACG,IAAI,CAAC,KAAK,CAAC;AAMtC;AAAC,eAEcX,oBAAoB;AAAA"}
@@ -1,31 +1,22 @@
1
1
  "use strict";
2
2
 
3
3
  require("core-js/modules/es.object.define-property.js");
4
-
5
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
8
  exports["default"] = void 0;
11
-
12
9
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
-
14
10
  var _client = require("@apollo/client");
15
-
16
11
  var _coreErrors = require("@blaze-cms/core-errors");
17
-
18
12
  var _templateObject;
19
-
20
13
  function buildUpdatePublishUnpublishMutation(entitySchema, id, action, cache) {
21
14
  if (!entitySchema || !entitySchema.actions || !entitySchema.actions.publish || !id || !action) {
22
15
  throw new _coreErrors.BlazeError('Update DataEntity query requires publish action from entity schema and id');
23
16
  }
24
-
25
17
  var withClient = "".concat(cache ? '@client' : '');
26
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);
27
19
  }
28
-
29
20
  var _default = buildUpdatePublishUnpublishMutation;
30
21
  exports["default"] = _default;
31
22
  //# sourceMappingURL=build-update-publish-unpublish-mutation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-update-publish-unpublish-mutation.js","names":["buildUpdatePublishUnpublishMutation","entitySchema","id","action","cache","actions","publish","BlazeError","withClient","gql"],"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;;AACA;;;;AAEA,SAASA,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,IAAII,sBAAJ,CACJ,2EADI,CAAN;EAGD;;EAED,IAAMC,UAAU,aAAMJ,KAAK,GAAG,SAAH,GAAe,EAA1B,CAAhB;EAEA,WAAOK,WAAP,+PAEgBR,YAAY,CAACI,OAAb,CAAqBF,MAArB,CAFhB,EAEgDK,UAFhD,EAGaN,EAHb;AAYD;;eAEcF,mC"}
1
+ {"version":3,"file":"build-update-publish-unpublish-mutation.js","names":["buildUpdatePublishUnpublishMutation","entitySchema","id","action","cache","actions","publish","BlazeError","withClient","gql"],"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;AACA;AAAoD;AAEpD,SAASA,mCAAmC,CAACC,YAAY,EAAEC,EAAE,EAAEC,MAAM,EAAEC,KAAK,EAAE;EAC5E,IAAI,CAACH,YAAY,IAAI,CAACA,YAAY,CAACI,OAAO,IAAI,CAACJ,YAAY,CAACI,OAAO,CAACC,OAAO,IAAI,CAACJ,EAAE,IAAI,CAACC,MAAM,EAAE;IAC7F,MAAM,IAAII,sBAAU,CAClB,2EAA2E,CAC5E;EACH;EAEA,IAAMC,UAAU,aAAMJ,KAAK,GAAG,SAAS,GAAG,EAAE,CAAE;EAE9C,WAAOK,WAAG,+PAEMR,YAAY,CAACI,OAAO,CAACF,MAAM,CAAC,EAAIK,UAAU,EAC7CN,EAAE;AASjB;AAAC,eAEcF,mCAAmC;AAAA"}
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
 
3
3
  require("core-js/modules/es.object.define-property.js");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.getDefaultQueryParams = void 0;
9
-
10
8
  var getDefaultQueryParams = function getDefaultQueryParams(_ref) {
11
9
  var schema = _ref.schema;
12
10
  var updated = schema.properties && schema.properties.updated;
@@ -19,6 +17,5 @@ var getDefaultQueryParams = function getDefaultQueryParams(_ref) {
19
17
  }] : []
20
18
  };
21
19
  };
22
-
23
20
  exports.getDefaultQueryParams = getDefaultQueryParams;
24
21
  //# sourceMappingURL=get-default-query-params.js.map
@@ -1 +1 @@
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,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAwB,OAAgB;EAAA,IAAbC,MAAa,QAAbA,MAAa;EAC5C,IAAMC,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"}
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,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAqB,OAAmB;EAAA,IAAbC,MAAM,QAANA,MAAM;EACrC,IAAMC,OAAO,GAAGD,MAAM,CAACE,UAAU,IAAIF,MAAM,CAACE,UAAU,CAACD,OAAO;EAE9D,OAAO;IACLE,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAEJ,OAAO,GACT,CACE;MACEK,QAAQ,EAAE,SAAS;MACnBC,SAAS,EAAE;IACb,CAAC,CACF,GACD;EACN,CAAC;AACH,CAAC;AAAC"}
@@ -1,26 +1,19 @@
1
1
  "use strict";
2
2
 
3
3
  require("core-js/modules/es.object.define-property.js");
4
-
5
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
8
  exports.withContext = void 0;
11
-
12
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
10
  var _react = _interopRequireDefault(require("react"));
15
-
16
11
  var _adminUiUtils = require("@blaze-cms/admin-ui-utils");
17
-
18
12
  var withContext = function withContext(Component) {
19
13
  return function (props) {
20
14
  var contexts = (0, _adminUiUtils.useMainContext)(_adminUiUtils.MainContext);
21
15
  return /*#__PURE__*/_react["default"].createElement(Component, (0, _extends2["default"])({}, props, contexts));
22
16
  };
23
17
  };
24
-
25
18
  exports.withContext = withContext;
26
19
  //# sourceMappingURL=withContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"withContext.js","names":["withContext","Component","props","contexts","useMainContext","MainContext"],"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;;AACA;;AAEO,IAAMA,WAAW,GAAG,SAAdA,WAAc,CAAAC,SAAS;EAAA,OAAI,UAAAC,KAAK,EAAI;IAC/C,IAAMC,QAAQ,GAAG,IAAAC,4BAAA,EAAeC,yBAAf,CAAjB;IACA,oBAAO,gCAAC,SAAD,gCAAeH,KAAf,EAA0BC,QAA1B,EAAP;EACD,CAHmC;AAAA,CAA7B"}
1
+ {"version":3,"file":"withContext.js","names":["withContext","Component","props","contexts","useMainContext","MainContext"],"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;AACA;AAEO,IAAMA,WAAW,GAAG,SAAdA,WAAW,CAAGC,SAAS;EAAA,OAAI,UAAAC,KAAK,EAAI;IAC/C,IAAMC,QAAQ,GAAG,IAAAC,4BAAc,EAACC,yBAAW,CAAC;IAC5C,oBAAO,gCAAC,SAAS,gCAAKH,KAAK,EAAMC,QAAQ,EAAI;EAC/C,CAAC;AAAA;AAAC"}
@@ -1,30 +1,23 @@
1
1
  "use strict";
2
2
 
3
3
  require("core-js/modules/es.object.define-property.js");
4
-
5
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
8
  exports["default"] = void 0;
11
-
12
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
-
14
10
  var _react = require("react");
15
-
16
11
  function useToggle(initialValue) {
17
12
  var _useState = (0, _react.useState)(initialValue),
18
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
19
- toggleValue = _useState2[0],
20
- setToggleValue = _useState2[1];
21
-
13
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
14
+ toggleValue = _useState2[0],
15
+ setToggleValue = _useState2[1];
22
16
  var toggler = (0, _react.useCallback)(function () {
23
17
  return setToggleValue(!toggleValue);
24
18
  }, [toggleValue]);
25
19
  return [toggleValue, toggler];
26
20
  }
27
-
28
21
  var _default = useToggle;
29
22
  exports["default"] = _default;
30
23
  //# sourceMappingURL=useToggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useToggle.js","names":["useToggle","initialValue","useState","toggleValue","setToggleValue","toggler","useCallback"],"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;;AAEA,SAASA,SAAT,CAAmBC,YAAnB,EAAiC;EAC/B,gBAAsC,IAAAC,eAAA,EAASD,YAAT,CAAtC;EAAA;EAAA,IAAOE,WAAP;EAAA,IAAoBC,cAApB;;EACA,IAAMC,OAAO,GAAG,IAAAC,kBAAA,EAAY;IAAA,OAAMF,cAAc,CAAC,CAACD,WAAF,CAApB;EAAA,CAAZ,EAAgD,CAACA,WAAD,CAAhD,CAAhB;EAEA,OAAO,CAACA,WAAD,EAAcE,OAAd,CAAP;AACD;;eAEcL,S"}
1
+ {"version":3,"file":"useToggle.js","names":["useToggle","initialValue","useState","toggleValue","setToggleValue","toggler","useCallback"],"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;AAEA,SAASA,SAAS,CAACC,YAAY,EAAE;EAC/B,gBAAsC,IAAAC,eAAQ,EAACD,YAAY,CAAC;IAAA;IAArDE,WAAW;IAAEC,cAAc;EAClC,IAAMC,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,eAEcL,SAAS;AAAA"}
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  require("core-js/modules/es.object.define-property.js");
4
-
5
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
@@ -13,6 +11,5 @@ Object.defineProperty(exports, "buildUpdatePublishUnpublishMutation", {
13
11
  return _buildUpdatePublishUnpublishMutation["default"];
14
12
  }
15
13
  });
16
-
17
14
  var _buildUpdatePublishUnpublishMutation = _interopRequireDefault(require("./build-update-publish-unpublish-mutation"));
18
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/utils/index.js"],"sourcesContent":["import buildUpdatePublishUnpublishMutation from './build-update-publish-unpublish-mutation';\n\nexport { buildUpdatePublishUnpublishMutation };\n"],"mappings":";;;;;;;;;;;;;;;;AAAA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/utils/index.js"],"sourcesContent":["import buildUpdatePublishUnpublishMutation from './build-update-publish-unpublish-mutation';\n\nexport { buildUpdatePublishUnpublishMutation };\n"],"mappings":";;;;;;;;;;;;;AAAA"}
@@ -4,7 +4,6 @@ import PropTypes from 'prop-types';
4
4
  import { getQuery } from '@blaze-cms/admin-ui-utils';
5
5
  import ListingTable from '../ListingTable/ListingTable';
6
6
  import { withContext } from '../../utils/hoc/withContext';
7
-
8
7
  const EntityDataListing = ({
9
8
  match,
10
9
  menuItems
@@ -37,7 +36,6 @@ const EntityDataListing = ({
37
36
  selectedMenuItem: selectedMenuItem
38
37
  });
39
38
  };
40
-
41
39
  EntityDataListing.propTypes = {
42
40
  match: PropTypes.object.isRequired,
43
41
  menuItems: PropTypes.array.isRequired
@@ -1 +1 @@
1
- {"version":3,"file":"EntityDataListing.js","names":["useQuery","React","PropTypes","getQuery","ListingTable","withContext","EntityDataListing","match","menuItems","params","entityIdentifier","identifier","selectedMenuItem","map","_","items","item","filter","uri","endsWith","length","Boolean","data","getEntitySchemas","variables","propTypes","object","isRequired","array"],"sources":["../../../src/components/EntityDataListing/EntityDataListing.js"],"sourcesContent":["import { useQuery } from '@apollo/client';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { getQuery } from '@blaze-cms/admin-ui-utils';\n\nimport ListingTable from '../ListingTable/ListingTable';\nimport { withContext } from '../../utils/hoc/withContext';\n\nconst EntityDataListing = ({ match, menuItems }) => {\n const {\n params: { entityIdentifier: identifier }\n } = match;\n\n const [[selectedMenuItem]] = menuItems\n .map(([_, { items }]) => {\n const item = items.filter(({ uri }) => uri.endsWith(`/${identifier}`));\n\n return item.length ? item : null;\n })\n .filter(Boolean);\n\n const { data: { getEntitySchemas = [] } = {} } = useQuery(getQuery('GET_ENTITY_SCHEMA'), {\n variables: { identifier }\n });\n\n if (!getEntitySchemas.length) return '';\n\n return <ListingTable entitySchema={getEntitySchemas[0]} selectedMenuItem={selectedMenuItem} />;\n};\n\nEntityDataListing.propTypes = {\n match: PropTypes.object.isRequired,\n menuItems: PropTypes.array.isRequired\n};\n\nexport default withContext(EntityDataListing);\n"],"mappings":"AAAA,SAASA,QAAT,QAAyB,gBAAzB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,QAAT,QAAyB,2BAAzB;AAEA,OAAOC,YAAP,MAAyB,8BAAzB;AACA,SAASC,WAAT,QAA4B,6BAA5B;;AAEA,MAAMC,iBAAiB,GAAG,CAAC;EAAEC,KAAF;EAASC;AAAT,CAAD,KAA0B;EAClD,MAAM;IACJC,MAAM,EAAE;MAAEC,gBAAgB,EAAEC;IAApB;EADJ,IAEFJ,KAFJ;EAIA,MAAM,CAAC,CAACK,gBAAD,CAAD,IAAuBJ,SAAS,CACnCK,GAD0B,CACtB,CAAC,CAACC,CAAD,EAAI;IAAEC;EAAF,CAAJ,CAAD,KAAoB;IACvB,MAAMC,IAAI,GAAGD,KAAK,CAACE,MAAN,CAAa,CAAC;MAAEC;IAAF,CAAD,KAAaA,GAAG,CAACC,QAAJ,CAAc,IAAGR,UAAW,EAA5B,CAA1B,CAAb;IAEA,OAAOK,IAAI,CAACI,MAAL,GAAcJ,IAAd,GAAqB,IAA5B;EACD,CAL0B,EAM1BC,MAN0B,CAMnBI,OANmB,CAA7B;EAQA,MAAM;IAAEC,IAAI,EAAE;MAAEC,gBAAgB,GAAG;IAArB,IAA4B;EAApC,IAA2CvB,QAAQ,CAACG,QAAQ,CAAC,mBAAD,CAAT,EAAgC;IACvFqB,SAAS,EAAE;MAAEb;IAAF;EAD4E,CAAhC,CAAzD;EAIA,IAAI,CAACY,gBAAgB,CAACH,MAAtB,EAA8B,OAAO,EAAP;EAE9B,oBAAO,oBAAC,YAAD;IAAc,YAAY,EAAEG,gBAAgB,CAAC,CAAD,CAA5C;IAAiD,gBAAgB,EAAEX;EAAnE,EAAP;AACD,CApBD;;AAsBAN,iBAAiB,CAACmB,SAAlB,GAA8B;EAC5BlB,KAAK,EAAEL,SAAS,CAACwB,MAAV,CAAiBC,UADI;EAE5BnB,SAAS,EAAEN,SAAS,CAAC0B,KAAV,CAAgBD;AAFC,CAA9B;AAKA,eAAetB,WAAW,CAACC,iBAAD,CAA1B"}
1
+ {"version":3,"file":"EntityDataListing.js","names":["useQuery","React","PropTypes","getQuery","ListingTable","withContext","EntityDataListing","match","menuItems","params","entityIdentifier","identifier","selectedMenuItem","map","_","items","item","filter","uri","endsWith","length","Boolean","data","getEntitySchemas","variables","propTypes","object","isRequired","array"],"sources":["../../../src/components/EntityDataListing/EntityDataListing.js"],"sourcesContent":["import { useQuery } from '@apollo/client';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { getQuery } from '@blaze-cms/admin-ui-utils';\n\nimport ListingTable from '../ListingTable/ListingTable';\nimport { withContext } from '../../utils/hoc/withContext';\n\nconst EntityDataListing = ({ match, menuItems }) => {\n const {\n params: { entityIdentifier: identifier }\n } = match;\n\n const [[selectedMenuItem]] = menuItems\n .map(([_, { items }]) => {\n const item = items.filter(({ uri }) => uri.endsWith(`/${identifier}`));\n\n return item.length ? item : null;\n })\n .filter(Boolean);\n\n const { data: { getEntitySchemas = [] } = {} } = useQuery(getQuery('GET_ENTITY_SCHEMA'), {\n variables: { identifier }\n });\n\n if (!getEntitySchemas.length) return '';\n\n return <ListingTable entitySchema={getEntitySchemas[0]} selectedMenuItem={selectedMenuItem} />;\n};\n\nEntityDataListing.propTypes = {\n match: PropTypes.object.isRequired,\n menuItems: PropTypes.array.isRequired\n};\n\nexport default withContext(EntityDataListing);\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAgB;AACzC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,QAAQ,QAAQ,2BAA2B;AAEpD,OAAOC,YAAY,MAAM,8BAA8B;AACvD,SAASC,WAAW,QAAQ,6BAA6B;AAEzD,MAAMC,iBAAiB,GAAG,CAAC;EAAEC,KAAK;EAAEC;AAAU,CAAC,KAAK;EAClD,MAAM;IACJC,MAAM,EAAE;MAAEC,gBAAgB,EAAEC;IAAW;EACzC,CAAC,GAAGJ,KAAK;EAET,MAAM,CAAC,CAACK,gBAAgB,CAAC,CAAC,GAAGJ,SAAS,CACnCK,GAAG,CAAC,CAAC,CAACC,CAAC,EAAE;IAAEC;EAAM,CAAC,CAAC,KAAK;IACvB,MAAMC,IAAI,GAAGD,KAAK,CAACE,MAAM,CAAC,CAAC;MAAEC;IAAI,CAAC,KAAKA,GAAG,CAACC,QAAQ,CAAE,IAAGR,UAAW,EAAC,CAAC,CAAC;IAEtE,OAAOK,IAAI,CAACI,MAAM,GAAGJ,IAAI,GAAG,IAAI;EAClC,CAAC,CAAC,CACDC,MAAM,CAACI,OAAO,CAAC;EAElB,MAAM;IAAEC,IAAI,EAAE;MAAEC,gBAAgB,GAAG;IAAG,CAAC,GAAG,CAAC;EAAE,CAAC,GAAGvB,QAAQ,CAACG,QAAQ,CAAC,mBAAmB,CAAC,EAAE;IACvFqB,SAAS,EAAE;MAAEb;IAAW;EAC1B,CAAC,CAAC;EAEF,IAAI,CAACY,gBAAgB,CAACH,MAAM,EAAE,OAAO,EAAE;EAEvC,oBAAO,oBAAC,YAAY;IAAC,YAAY,EAAEG,gBAAgB,CAAC,CAAC,CAAE;IAAC,gBAAgB,EAAEX;EAAiB,EAAG;AAChG,CAAC;AAEDN,iBAAiB,CAACmB,SAAS,GAAG;EAC5BlB,KAAK,EAAEL,SAAS,CAACwB,MAAM,CAACC,UAAU;EAClCnB,SAAS,EAAEN,SAAS,CAAC0B,KAAK,CAACD;AAC7B,CAAC;AAED,eAAetB,WAAW,CAACC,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["EntityDataListing"],"sources":["../../../src/components/EntityDataListing/index.js"],"sourcesContent":["import EntityDataListing from './EntityDataListing';\n\nexport default EntityDataListing;\n"],"mappings":"AAAA,OAAOA,iBAAP,MAA8B,qBAA9B;AAEA,eAAeA,iBAAf"}
1
+ {"version":3,"file":"index.js","names":["EntityDataListing"],"sources":["../../../src/components/EntityDataListing/index.js"],"sourcesContent":["import EntityDataListing from './EntityDataListing';\n\nexport default EntityDataListing;\n"],"mappings":"AAAA,OAAOA,iBAAiB,MAAM,qBAAqB;AAEnD,eAAeA,iBAAiB"}