@blaze-cms/plugin-data-ui 0.127.0 → 0.128.0-admin-updates.3

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 (100) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/lib/components/EntityDataListing/EntityDataListing.js +4 -4
  3. package/lib/components/EntityDataListing/EntityDataListing.js.map +1 -1
  4. package/lib/components/EntityDataListing/index.js.map +1 -1
  5. package/lib/components/EntityManager/Entity/Entity.js +184 -189
  6. package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
  7. package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  8. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +26 -28
  9. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  10. package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
  11. package/lib/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
  12. package/lib/components/EntityManager/Entity/SideBarRelations/index.js +89 -89
  13. package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  14. package/lib/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
  15. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js +40 -42
  16. package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  17. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js +31 -33
  18. package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
  19. package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
  20. package/lib/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
  21. package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
  22. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js +40 -42
  23. package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  24. package/lib/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
  25. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js +43 -45
  26. package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
  27. package/lib/components/EntityManager/Entity/index.js.map +1 -1
  28. package/lib/components/EntityManager/EntityManager.js +65 -69
  29. package/lib/components/EntityManager/EntityManager.js.map +1 -1
  30. package/lib/components/EntityManager/index.js.map +1 -1
  31. package/lib/components/EntityManager/utils/data-mappers.js.map +1 -1
  32. package/lib/components/EntityManager/utils/entity.js +10 -12
  33. package/lib/components/EntityManager/utils/entity.js.map +1 -1
  34. package/lib/components/EntityManager/utils/entityAvailableActions.js +62 -66
  35. package/lib/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
  36. package/lib/components/EntityManager/utils/is-form-empty.js.map +1 -1
  37. package/lib/components/EntityManager/utils/query.js.map +1 -1
  38. package/lib/components/ListingTable/ListingTable.js +121 -129
  39. package/lib/components/ListingTable/ListingTable.js.map +1 -1
  40. package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  41. package/lib/components/ListingTable/ListingTableContent/index.js.map +1 -1
  42. package/lib/components/ListingTable/TableActions/TableActions.js.map +1 -1
  43. package/lib/components/ListingTable/TableActions/index.js.map +1 -1
  44. package/lib/components/ListingTable/index.js.map +1 -1
  45. package/lib/components/ListingTable/mappers/populate-rows.js.map +1 -1
  46. package/lib/components/ListingTable/service/index.js +17 -19
  47. package/lib/components/ListingTable/service/index.js.map +1 -1
  48. package/lib/components/Tabs/index.js +18 -2
  49. package/lib/components/Tabs/index.js.map +1 -1
  50. package/lib/constants.js.map +1 -1
  51. package/lib/index.js +56 -60
  52. package/lib/index.js.map +1 -1
  53. package/lib/utils/add-content-menu-items.js +25 -27
  54. package/lib/utils/add-content-menu-items.js.map +1 -1
  55. package/lib/utils/build-create-entity-mutation.js.map +1 -1
  56. package/lib/utils/build-delete-entity-mutation.js.map +1 -1
  57. package/lib/utils/build-listing-query.js.map +1 -1
  58. package/lib/utils/build-update-data-query.js.map +1 -1
  59. package/lib/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  60. package/lib/utils/get-default-query-params.js.map +1 -1
  61. package/lib/utils/hoc/withContext.js.map +1 -1
  62. package/lib/utils/hooks/useToggle.js.map +1 -1
  63. package/lib/utils/index.js.map +1 -1
  64. package/lib-es/components/EntityDataListing/EntityDataListing.js.map +1 -1
  65. package/lib-es/components/EntityManager/Entity/Entity.js +19 -17
  66. package/lib-es/components/EntityManager/Entity/Entity.js.map +1 -1
  67. package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
  68. package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
  69. package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js +13 -7
  70. package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
  71. package/lib-es/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
  72. package/lib-es/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
  73. package/lib-es/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
  74. package/lib-es/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
  75. package/lib-es/components/EntityManager/EntityManager.js.map +1 -1
  76. package/lib-es/components/EntityManager/utils/data-mappers.js.map +1 -1
  77. package/lib-es/components/EntityManager/utils/entity.js.map +1 -1
  78. package/lib-es/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
  79. package/lib-es/components/EntityManager/utils/query.js.map +1 -1
  80. package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
  81. package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
  82. package/lib-es/components/ListingTable/TableActions/TableActions.js.map +1 -1
  83. package/lib-es/components/ListingTable/mappers/populate-rows.js.map +1 -1
  84. package/lib-es/components/ListingTable/service/index.js.map +1 -1
  85. package/lib-es/components/Tabs/index.js +5 -2
  86. package/lib-es/components/Tabs/index.js.map +1 -1
  87. package/lib-es/index.js.map +1 -1
  88. package/lib-es/utils/add-content-menu-items.js.map +1 -1
  89. package/lib-es/utils/build-create-entity-mutation.js.map +1 -1
  90. package/lib-es/utils/build-delete-entity-mutation.js.map +1 -1
  91. package/lib-es/utils/build-listing-query.js.map +1 -1
  92. package/lib-es/utils/build-update-data-query.js.map +1 -1
  93. package/lib-es/utils/build-update-publish-unpublish-mutation.js.map +1 -1
  94. package/lib-es/utils/get-default-query-params.js.map +1 -1
  95. package/lib-es/utils/hoc/withContext.js.map +1 -1
  96. package/lib-es/utils/hooks/useToggle.js.map +1 -1
  97. package/package.json +9 -9
  98. package/src/components/EntityManager/Entity/Entity.js +61 -59
  99. package/src/components/EntityManager/Entity/SideBarRelations/index.js +23 -9
  100. package/src/components/Tabs/index.js +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":["PLUGIN_NAME","DATA_LISTING_PREFIX","PAGE_BUILDER","TEXT_CONTENT_TYPE","ENTITY_PUBLISHED","SELECT_DEFAULT_VALUE","LEAVE_PAGE_MESSAGE","KEY_TO_CHECK","MENU_PERMISSIONS","PREVIEW_INTERFACE","PAGE_BUILDER_FIELD_ID","PAGE_BUILDER_TEMPLATE_FIELD_ID","ERROR","SUCCESS","PUBLISHED","UNPUBLISHED","SAVE_BUTTON_TEXTS","save","saved","saving","ACTIONS","UNPUBLISHED_WARNING","SAVE_BEFORE_PUBLISH_MESSAGE","PAGE_BUILDER_TAB","PAGE_BUILDER_TAB_INDEX","EDITOR_VIEW_TAB","EDITOR_VIEW_TAB_INDEX"],"sources":["../src/constants.js"],"sourcesContent":["const PLUGIN_NAME = 'data-ui';\nconst DATA_LISTING_PREFIX = '/data-listing';\nconst PAGE_BUILDER = 'pageBuilder';\nconst TEXT_CONTENT_TYPE = 'Publish';\nconst ENTITY_PUBLISHED = 'published';\nconst SELECT_DEFAULT_VALUE = 'Please Choose...';\nconst LEAVE_PAGE_MESSAGE = 'You are going to leave without saving. Are you sure you want to leave?';\nconst KEY_TO_CHECK = 'values.slug';\nconst MENU_PERMISSIONS = ['update:any', 'update:own', 'create:any', 'create:own'];\nconst PREVIEW_INTERFACE = 'preview/can-preview';\nconst PAGE_BUILDER_FIELD_ID = 'pageBuilder';\nconst PAGE_BUILDER_TEMPLATE_FIELD_ID = 'pageBuilderTemplateId';\nconst ERROR = 'error';\nconst SUCCESS = 'success';\nconst PUBLISHED = 'published';\nconst UNPUBLISHED = 'unpublished';\nconst SAVE_BUTTON_TEXTS = { save: 'save', saved: 'saved', saving: 'saving' };\nconst ACTIONS = 'actions';\nconst UNPUBLISHED_WARNING = 'Page already unpublished';\nconst SAVE_BEFORE_PUBLISH_MESSAGE =\n 'You have to click save to create the record before you can publish';\n\nconst PAGE_BUILDER_TAB = 'Page builder';\nconst PAGE_BUILDER_TAB_INDEX = 1;\nconst EDITOR_VIEW_TAB = 'Editor view';\nconst EDITOR_VIEW_TAB_INDEX = 0;\n\nexport {\n DATA_LISTING_PREFIX,\n ENTITY_PUBLISHED,\n KEY_TO_CHECK,\n LEAVE_PAGE_MESSAGE,\n MENU_PERMISSIONS,\n PAGE_BUILDER,\n PLUGIN_NAME,\n PREVIEW_INTERFACE,\n SELECT_DEFAULT_VALUE,\n TEXT_CONTENT_TYPE,\n PAGE_BUILDER_FIELD_ID,\n PAGE_BUILDER_TEMPLATE_FIELD_ID,\n ERROR,\n SUCCESS,\n PUBLISHED,\n UNPUBLISHED,\n SAVE_BUTTON_TEXTS,\n ACTIONS,\n PAGE_BUILDER_TAB_INDEX,\n EDITOR_VIEW_TAB_INDEX,\n EDITOR_VIEW_TAB,\n PAGE_BUILDER_TAB,\n UNPUBLISHED_WARNING,\n SAVE_BEFORE_PUBLISH_MESSAGE\n};\n"],"mappings":";;;;;;;AAAA,IAAMA,WAAW,GAAG,SAAS;AAAC;AAC9B,IAAMC,mBAAmB,GAAG,eAAe;AAAC;AAC5C,IAAMC,YAAY,GAAG,aAAa;AAAC;AACnC,IAAMC,iBAAiB,GAAG,SAAS;AAAC;AACpC,IAAMC,gBAAgB,GAAG,WAAW;AAAC;AACrC,IAAMC,oBAAoB,GAAG,kBAAkB;AAAC;AAChD,IAAMC,kBAAkB,GAAG,wEAAwE;AAAC;AACpG,IAAMC,YAAY,GAAG,aAAa;AAAC;AACnC,IAAMC,gBAAgB,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC;AAAC;AAClF,IAAMC,iBAAiB,GAAG,qBAAqB;AAAC;AAChD,IAAMC,qBAAqB,GAAG,aAAa;AAAC;AAC5C,IAAMC,8BAA8B,GAAG,uBAAuB;AAAC;AAC/D,IAAMC,KAAK,GAAG,OAAO;AAAC;AACtB,IAAMC,OAAO,GAAG,SAAS;AAAC;AAC1B,IAAMC,SAAS,GAAG,WAAW;AAAC;AAC9B,IAAMC,WAAW,GAAG,aAAa;AAAC;AAClC,IAAMC,iBAAiB,GAAG;EAAEC,IAAI,EAAE,MAAM;EAAEC,KAAK,EAAE,OAAO;EAAEC,MAAM,EAAE;AAAS,CAAC;AAAC;AAC7E,IAAMC,OAAO,GAAG,SAAS;AAAC;AAC1B,IAAMC,mBAAmB,GAAG,0BAA0B;AAAC;AACvD,IAAMC,2BAA2B,GAC/B,oEAAoE;AAAC;AAEvE,IAAMC,gBAAgB,GAAG,cAAc;AAAC;AACxC,IAAMC,sBAAsB,GAAG,CAAC;AAAC;AACjC,IAAMC,eAAe,GAAG,aAAa;AAAC;AACtC,IAAMC,qBAAqB,GAAG,CAAC;AAAC"}
1
+ {"version":3,"file":"constants.js","names":["PLUGIN_NAME","exports","DATA_LISTING_PREFIX","PAGE_BUILDER","TEXT_CONTENT_TYPE","ENTITY_PUBLISHED","SELECT_DEFAULT_VALUE","LEAVE_PAGE_MESSAGE","KEY_TO_CHECK","MENU_PERMISSIONS","PREVIEW_INTERFACE","PAGE_BUILDER_FIELD_ID","PAGE_BUILDER_TEMPLATE_FIELD_ID","ERROR","SUCCESS","PUBLISHED","UNPUBLISHED","SAVE_BUTTON_TEXTS","save","saved","saving","ACTIONS","UNPUBLISHED_WARNING","SAVE_BEFORE_PUBLISH_MESSAGE","PAGE_BUILDER_TAB","PAGE_BUILDER_TAB_INDEX","EDITOR_VIEW_TAB","EDITOR_VIEW_TAB_INDEX"],"sources":["../src/constants.js"],"sourcesContent":["const PLUGIN_NAME = 'data-ui';\nconst DATA_LISTING_PREFIX = '/data-listing';\nconst PAGE_BUILDER = 'pageBuilder';\nconst TEXT_CONTENT_TYPE = 'Publish';\nconst ENTITY_PUBLISHED = 'published';\nconst SELECT_DEFAULT_VALUE = 'Please Choose...';\nconst LEAVE_PAGE_MESSAGE = 'You are going to leave without saving. Are you sure you want to leave?';\nconst KEY_TO_CHECK = 'values.slug';\nconst MENU_PERMISSIONS = ['update:any', 'update:own', 'create:any', 'create:own'];\nconst PREVIEW_INTERFACE = 'preview/can-preview';\nconst PAGE_BUILDER_FIELD_ID = 'pageBuilder';\nconst PAGE_BUILDER_TEMPLATE_FIELD_ID = 'pageBuilderTemplateId';\nconst ERROR = 'error';\nconst SUCCESS = 'success';\nconst PUBLISHED = 'published';\nconst UNPUBLISHED = 'unpublished';\nconst SAVE_BUTTON_TEXTS = { save: 'save', saved: 'saved', saving: 'saving' };\nconst ACTIONS = 'actions';\nconst UNPUBLISHED_WARNING = 'Page already unpublished';\nconst SAVE_BEFORE_PUBLISH_MESSAGE =\n 'You have to click save to create the record before you can publish';\n\nconst PAGE_BUILDER_TAB = 'Page builder';\nconst PAGE_BUILDER_TAB_INDEX = 1;\nconst EDITOR_VIEW_TAB = 'Editor view';\nconst EDITOR_VIEW_TAB_INDEX = 0;\n\nexport {\n DATA_LISTING_PREFIX,\n ENTITY_PUBLISHED,\n KEY_TO_CHECK,\n LEAVE_PAGE_MESSAGE,\n MENU_PERMISSIONS,\n PAGE_BUILDER,\n PLUGIN_NAME,\n PREVIEW_INTERFACE,\n SELECT_DEFAULT_VALUE,\n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ACX,OAAA,CAAAW,8BAAA,GAAAA,8BAAA;AAC/D,IAAMC,KAAK,GAAG,OAAO;AAACZ,OAAA,CAAAY,KAAA,GAAAA,KAAA;AACtB,IAAMC,OAAO,GAAG,SAAS;AAACb,OAAA,CAAAa,OAAA,GAAAA,OAAA;AAC1B,IAAMC,SAAS,GAAG,WAAW;AAACd,OAAA,CAAAc,SAAA,GAAAA,SAAA;AAC9B,IAAMC,WAAW,GAAG,aAAa;AAACf,OAAA,CAAAe,WAAA,GAAAA,WAAA;AAClC,IAAMC,iBAAiB,GAAG;EAAEC,IAAI,EAAE,MAAM;EAAEC,KAAK,EAAE,OAAO;EAAEC,MAAM,EAAE;AAAS,CAAC;AAACnB,OAAA,CAAAgB,iBAAA,GAAAA,iBAAA;AAC7E,IAAMI,OAAO,GAAG,SAAS;AAACpB,OAAA,CAAAoB,OAAA,GAAAA,OAAA;AAC1B,IAAMC,mBAAmB,GAAG,0BAA0B;AAACrB,OAAA,CAAAqB,mBAAA,GAAAA,mBAAA;AACvD,IAAMC,2BAA2B,GAC/B,oEAAoE;AAACtB,OAAA,CAAAsB,2BAAA,GAAAA,2BAAA;AAEvE,IAAMC,gBAAgB,GAAG,cAAc;AAACvB,OAAA,CAAAuB,gBAAA,GAAAA,gBAAA;AACxC,IAAMC,sBAAsB,GAAG,CAAC;AAACxB,OAAA,CAAAwB,sBAAA,GAAAA,sBAAA;AACjC,IAAMC,eAAe,GAAG,aAAa;AAACzB,OAAA,CAAAyB,eAAA,GAAAA,eAAA;AACtC,IAAMC,qBAAqB,GAAG,CAAC;AAAC1B,OAAA,CAAA0B,qBAAA,GAAAA,qBAAA"}
package/lib/index.js CHANGED
@@ -43,69 +43,65 @@ function _load() {
43
43
  _load = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(app) {
44
44
  var sectionKey, entityDataListingRoute, editEntityRoute, addEntityRoute;
45
45
  return _regenerator["default"].wrap(function _callee2$(_context2) {
46
- while (1) {
47
- switch (_context2.prev = _context2.next) {
48
- case 0:
49
- // To load different plugin information into menu
50
- sectionKey = 'content';
51
- app.events.once('load:menu-section', function (addSection) {
52
- addSection(sectionKey, {
53
- header: 'content',
54
- order: 100
55
- });
46
+ while (1) switch (_context2.prev = _context2.next) {
47
+ case 0:
48
+ // To load different plugin information into menu
49
+ sectionKey = 'content';
50
+ app.events.once('load:menu-section', function (addSection) {
51
+ addSection(sectionKey, {
52
+ header: 'content',
53
+ order: 100
56
54
  });
57
- app.events.once('load:menu-items', (0, _addContentMenuItems["default"])(app, sectionKey));
58
- app.events.once('load:custom:field:type', function (addFieldType) {
59
- Object.keys(_reactFormBuilder.formFieldTypes).forEach(function (type) {
60
- addFieldType({
61
- type: type,
62
- component: _reactFormBuilder.formFieldTypes[type]
63
- });
55
+ });
56
+ app.events.once('load:menu-items', (0, _addContentMenuItems["default"])(app, sectionKey));
57
+ app.events.once('load:custom:field:type', function (addFieldType) {
58
+ Object.keys(_reactFormBuilder.formFieldTypes).forEach(function (type) {
59
+ addFieldType({
60
+ type: type,
61
+ component: _reactFormBuilder.formFieldTypes[type]
64
62
  });
65
63
  });
66
- app.events.once('plugin:data-ui:load:loaded', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
67
- return _regenerator["default"].wrap(function _callee$(_context) {
68
- while (1) {
69
- switch (_context.prev = _context.next) {
70
- case 0:
71
- _context.next = 2;
72
- return app.events.emitAsync('load:custom:field:type', _reactFormBuilder.getFormBuilderLookup.addFieldType);
73
- case 2:
74
- case "end":
75
- return _context.stop();
76
- }
77
- }
78
- }, _callee);
79
- })));
80
- entityDataListingRoute = {
81
- path: "".concat(_constants.DATA_LISTING_PREFIX, "/:entityIdentifier"),
82
- key: 'entityDataListing',
83
- component: EntityDataListing,
84
- exact: true
85
- };
86
- editEntityRoute = {
87
- path: "".concat(_constants.DATA_LISTING_PREFIX, "/:entityIdentifier/:action/:id"),
88
- key: 'editEntity',
89
- component: EntityManager,
90
- exact: true
91
- };
92
- addEntityRoute = {
93
- path: "".concat(_constants.DATA_LISTING_PREFIX, "/:entityIdentifier/:action"),
94
- key: 'createEntity',
95
- component: EntityManager,
96
- exact: true
97
- };
98
- app.addRoute(entityDataListingRoute);
99
- app.addRoute(editEntityRoute);
100
- app.addRoute(addEntityRoute);
101
- return _context2.abrupt("return", {
102
- name: _constants.PLUGIN_NAME,
103
- version: _package["default"].version
104
- });
105
- case 12:
106
- case "end":
107
- return _context2.stop();
108
- }
64
+ });
65
+ app.events.once('plugin:data-ui:load:loaded', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
66
+ return _regenerator["default"].wrap(function _callee$(_context) {
67
+ while (1) switch (_context.prev = _context.next) {
68
+ case 0:
69
+ _context.next = 2;
70
+ return app.events.emitAsync('load:custom:field:type', _reactFormBuilder.getFormBuilderLookup.addFieldType);
71
+ case 2:
72
+ case "end":
73
+ return _context.stop();
74
+ }
75
+ }, _callee);
76
+ })));
77
+ entityDataListingRoute = {
78
+ path: "".concat(_constants.DATA_LISTING_PREFIX, "/:entityIdentifier"),
79
+ key: 'entityDataListing',
80
+ component: EntityDataListing,
81
+ exact: true
82
+ };
83
+ editEntityRoute = {
84
+ path: "".concat(_constants.DATA_LISTING_PREFIX, "/:entityIdentifier/:action/:id"),
85
+ key: 'editEntity',
86
+ component: EntityManager,
87
+ exact: true
88
+ };
89
+ addEntityRoute = {
90
+ path: "".concat(_constants.DATA_LISTING_PREFIX, "/:entityIdentifier/:action"),
91
+ key: 'createEntity',
92
+ component: EntityManager,
93
+ exact: true
94
+ };
95
+ app.addRoute(entityDataListingRoute);
96
+ app.addRoute(editEntityRoute);
97
+ app.addRoute(addEntityRoute);
98
+ return _context2.abrupt("return", {
99
+ name: _constants.PLUGIN_NAME,
100
+ version: _package["default"].version
101
+ });
102
+ case 12:
103
+ case "end":
104
+ return _context2.stop();
109
105
  }
110
106
  }, _callee2);
111
107
  }));
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["EntityDataListing","React","lazy","EntityManager","load","app","sectionKey","events","once","addSection","header","order","getAddContentMenuItems","addFieldType","Object","keys","formFieldTypes","forEach","type","component","emitAsync","getFormBuilderLookup","entityDataListingRoute","path","DATA_LISTING_PREFIX","key","exact","editEntityRoute","addEntityRoute","addRoute","name","PLUGIN_NAME","version","pkg","pluginName"],"sources":["../src/index.js"],"sourcesContent":["import { getFormBuilderLookup, formFieldTypes } from '@blaze-cms/react-form-builder';\nimport React from 'react';\nimport pkg from '../package.json';\nimport { DATA_LISTING_PREFIX, PLUGIN_NAME } from './constants';\nimport getAddContentMenuItems from './utils/add-content-menu-items';\n\nconst EntityDataListing = React.lazy(() =>\n import(/* webpackChunkName: 'EntityDataListing' */ './components/EntityDataListing')\n);\nconst EntityManager = React.lazy(() =>\n import(/* webpackChunkName: 'EntityManager' */ './components/EntityManager')\n);\n\nexport default async function load(app) {\n // To load different plugin information into menu\n const sectionKey = 'content';\n\n app.events.once('load:menu-section', addSection => {\n addSection(sectionKey, { header: 'content', order: 100 });\n });\n\n app.events.once('load:menu-items', getAddContentMenuItems(app, sectionKey));\n\n app.events.once('load:custom:field:type', addFieldType => {\n Object.keys(formFieldTypes).forEach(type => {\n addFieldType({ type, component: formFieldTypes[type] });\n });\n });\n\n app.events.once('plugin:data-ui:load:loaded', async () => {\n await app.events.emitAsync('load:custom:field:type', getFormBuilderLookup.addFieldType);\n });\n\n const entityDataListingRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier`,\n key: 'entityDataListing',\n component: EntityDataListing,\n exact: true\n };\n\n const editEntityRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier/:action/:id`,\n key: 'editEntity',\n component: EntityManager,\n exact: true\n };\n\n const addEntityRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier/:action`,\n key: 'createEntity',\n component: EntityManager,\n exact: true\n };\n\n app.addRoute(entityDataListingRoute);\n app.addRoute(editEntityRoute);\n app.addRoute(addEntityRoute);\n\n return {\n name: PLUGIN_NAME,\n version: pkg.version\n };\n}\n\nload.pluginName = PLUGIN_NAME;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAAoE;AAAA;AAEpE,IAAMA,iBAAiB,gBAAGC,iBAAK,CAACC,IAAI,CAAC;EAAA;IAAA,wCAC5B,2CAA4C,gCAAgC;EAAA;AAAA,CAAC,CACrF;AACD,IAAMC,aAAa,gBAAGF,iBAAK,CAACC,IAAI,CAAC;EAAA;IAAA,wCACxB,uCAAwC,4BAA4B;EAAA;AAAA,CAAC,CAC7E;AAAC,SAE4BE,IAAI;EAAA;AAAA;AAAA;EAAA,sFAAnB,kBAAoBC,GAAG;IAAA;IAAA;MAAA;QAAA;UAAA;YACpC;YACMC,UAAU,GAAG,SAAS;YAE5BD,GAAG,CAACE,MAAM,CAACC,IAAI,CAAC,mBAAmB,EAAE,UAAAC,UAAU,EAAI;cACjDA,UAAU,CAACH,UAAU,EAAE;gBAAEI,MAAM,EAAE,SAAS;gBAAEC,KAAK,EAAE;cAAI,CAAC,CAAC;YAC3D,CAAC,CAAC;YAEFN,GAAG,CAACE,MAAM,CAACC,IAAI,CAAC,iBAAiB,EAAE,IAAAI,+BAAsB,EAACP,GAAG,EAAEC,UAAU,CAAC,CAAC;YAE3ED,GAAG,CAACE,MAAM,CAACC,IAAI,CAAC,wBAAwB,EAAE,UAAAK,YAAY,EAAI;cACxDC,MAAM,CAACC,IAAI,CAACC,gCAAc,CAAC,CAACC,OAAO,CAAC,UAAAC,IAAI,EAAI;gBAC1CL,YAAY,CAAC;kBAAEK,IAAI,EAAJA,IAAI;kBAAEC,SAAS,EAAEH,gCAAc,CAACE,IAAI;gBAAE,CAAC,CAAC;cACzD,CAAC,CAAC;YACJ,CAAC,CAAC;YAEFb,GAAG,CAACE,MAAM,CAACC,IAAI,CAAC,4BAA4B,6FAAE;cAAA;gBAAA;kBAAA;oBAAA;sBAAA;sBAAA,OACtCH,GAAG,CAACE,MAAM,CAACa,SAAS,CAAC,wBAAwB,EAAEC,sCAAoB,CAACR,YAAY,CAAC;oBAAA;oBAAA;sBAAA;kBAAA;gBAAA;cAAA;YAAA,CACxF,GAAC;YAEIS,sBAAsB,GAAG;cAC7BC,IAAI,YAAKC,8BAAmB,uBAAoB;cAChDC,GAAG,EAAE,mBAAmB;cACxBN,SAAS,EAAEnB,iBAAiB;cAC5B0B,KAAK,EAAE;YACT,CAAC;YAEKC,eAAe,GAAG;cACtBJ,IAAI,YAAKC,8BAAmB,mCAAgC;cAC5DC,GAAG,EAAE,YAAY;cACjBN,SAAS,EAAEhB,aAAa;cACxBuB,KAAK,EAAE;YACT,CAAC;YAEKE,cAAc,GAAG;cACrBL,IAAI,YAAKC,8BAAmB,+BAA4B;cACxDC,GAAG,EAAE,cAAc;cACnBN,SAAS,EAAEhB,aAAa;cACxBuB,KAAK,EAAE;YACT,CAAC;YAEDrB,GAAG,CAACwB,QAAQ,CAACP,sBAAsB,CAAC;YACpCjB,GAAG,CAACwB,QAAQ,CAACF,eAAe,CAAC;YAC7BtB,GAAG,CAACwB,QAAQ,CAACD,cAAc,CAAC;YAAC,kCAEtB;cACLE,IAAI,EAAEC,sBAAW;cACjBC,OAAO,EAAEC,mBAAG,CAACD;YACf,CAAC;UAAA;UAAA;YAAA;QAAA;MAAA;IAAA;EAAA,CACF;EAAA;AAAA;AAED5B,IAAI,CAAC8B,UAAU,GAAGH,sBAAW"}
1
+ {"version":3,"file":"index.js","names":["_reactFormBuilder","require","_react","_interopRequireDefault","_package","_constants","_addContentMenuItems","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_interopRequireWildcard","obj","__esModule","_typeof2","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","EntityDataListing","React","lazy","Promise","resolve","then","EntityManager","load","_x","_load","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee2","app","sectionKey","entityDataListingRoute","editEntityRoute","addEntityRoute","wrap","_callee2$","_context2","prev","next","events","once","addSection","header","order","getAddContentMenuItems","addFieldType","keys","formFieldTypes","forEach","type","component","_callee","_callee$","_context","emitAsync","getFormBuilderLookup","stop","path","concat","DATA_LISTING_PREFIX","exact","addRoute","abrupt","name","PLUGIN_NAME","version","pkg","pluginName"],"sources":["../src/index.js"],"sourcesContent":["import { getFormBuilderLookup, formFieldTypes } from '@blaze-cms/react-form-builder';\nimport React from 'react';\nimport pkg from '../package.json';\nimport { DATA_LISTING_PREFIX, PLUGIN_NAME } from './constants';\nimport getAddContentMenuItems from './utils/add-content-menu-items';\n\nconst EntityDataListing = React.lazy(() =>\n import(/* webpackChunkName: 'EntityDataListing' */ './components/EntityDataListing')\n);\nconst EntityManager = React.lazy(() =>\n import(/* webpackChunkName: 'EntityManager' */ './components/EntityManager')\n);\n\nexport default async function load(app) {\n // To load different plugin information into menu\n const sectionKey = 'content';\n\n app.events.once('load:menu-section', addSection => {\n addSection(sectionKey, { header: 'content', order: 100 });\n });\n\n app.events.once('load:menu-items', getAddContentMenuItems(app, sectionKey));\n\n app.events.once('load:custom:field:type', addFieldType => {\n Object.keys(formFieldTypes).forEach(type => {\n addFieldType({ type, component: formFieldTypes[type] });\n });\n });\n\n app.events.once('plugin:data-ui:load:loaded', async () => {\n await app.events.emitAsync('load:custom:field:type', getFormBuilderLookup.addFieldType);\n });\n\n const entityDataListingRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier`,\n key: 'entityDataListing',\n component: EntityDataListing,\n exact: true\n };\n\n const editEntityRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier/:action/:id`,\n key: 'editEntity',\n component: EntityManager,\n exact: true\n };\n\n const addEntityRoute = {\n path: `${DATA_LISTING_PREFIX}/:entityIdentifier/:action`,\n key: 'createEntity',\n component: EntityManager,\n exact: true\n };\n\n app.addRoute(entityDataList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ACnB2C,SAAS,EAAE/B,aAAa;YACxByC,KAAK,EAAE;UACT,CAAC;UAED/B,GAAG,CAACgC,QAAQ,CAAC9B,sBAAsB,CAAC;UACpCF,GAAG,CAACgC,QAAQ,CAAC7B,eAAe,CAAC;UAC7BH,GAAG,CAACgC,QAAQ,CAAC5B,cAAc,CAAC;UAAC,OAAAG,SAAA,CAAA0B,MAAA,WAEtB;YACLC,IAAI,EAAEC,sBAAW;YACjBC,OAAO,EAAEC,mBAAG,CAACD;UACf,CAAC;QAAA;QAAA;UAAA,OAAA7B,SAAA,CAAAoB,IAAA;MAAA;IAAA,GAAA5B,QAAA;EAAA,CACF;EAAA,OAAAN,KAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAEDJ,IAAI,CAAC+C,UAAU,GAAGH,sBAAW"}
@@ -19,33 +19,31 @@ function getAddContentMenuItems(app, sectionKey) {
19
19
  var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(addItem) {
20
20
  var client, _yield$client$query, getEntitySchemas;
21
21
  return _regenerator["default"].wrap(function _callee$(_context) {
22
- while (1) {
23
- switch (_context.prev = _context.next) {
24
- case 0:
25
- client = app.getClient();
26
- _context.next = 3;
27
- return client.query({
28
- query: (0, _adminUiUtils.getQuery)('GET_USER_EDITABLE_ENTITIES'),
29
- variables: {
30
- // only return entities that the current user can do the following actions on
31
- canDoActions: MENU_PERMISSIONS
32
- }
33
- });
34
- case 3:
35
- _yield$client$query = _context.sent;
36
- getEntitySchemas = _yield$client$query.data.getEntitySchemas;
37
- getEntitySchemas.forEach(function (_ref2) {
38
- var id = _ref2.id,
39
- displayName = _ref2.displayName;
40
- addItem({
41
- name: displayName,
42
- uri: "/data-listing/".concat(id)
43
- }, sectionKey);
44
- });
45
- case 6:
46
- case "end":
47
- return _context.stop();
48
- }
22
+ while (1) switch (_context.prev = _context.next) {
23
+ case 0:
24
+ client = app.getClient();
25
+ _context.next = 3;
26
+ return client.query({
27
+ query: (0, _adminUiUtils.getQuery)('GET_USER_EDITABLE_ENTITIES'),
28
+ variables: {
29
+ // only return entities that the current user can do the following actions on
30
+ canDoActions: MENU_PERMISSIONS
31
+ }
32
+ });
33
+ case 3:
34
+ _yield$client$query = _context.sent;
35
+ getEntitySchemas = _yield$client$query.data.getEntitySchemas;
36
+ getEntitySchemas.forEach(function (_ref2) {
37
+ var id = _ref2.id,
38
+ displayName = _ref2.displayName;
39
+ addItem({
40
+ name: displayName,
41
+ uri: "/data-listing/".concat(id)
42
+ }, sectionKey);
43
+ });
44
+ case 6:
45
+ case "end":
46
+ return _context.stop();
49
47
  }
50
48
  }, _callee);
51
49
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"add-content-menu-items.js","names":["require","MENU_PERMISSIONS","getAddContentMenuItems","app","sectionKey","addItem","client","getClient","query","getQuery","variables","canDoActions","getEntitySchemas","data","forEach","id","displayName","name","uri"],"sources":["../../src/utils/add-content-menu-items.js"],"sourcesContent":["import { getQuery } from '@blaze-cms/admin-ui-utils';\n\nconst { MENU_PERMISSIONS } = require('../constants');\n\nfunction getAddContentMenuItems(app, sectionKey) {\n return async addItem => {\n const client = app.getClient();\n const {\n data: { getEntitySchemas }\n } = await client.query({\n query: getQuery('GET_USER_EDITABLE_ENTITIES'),\n variables: {\n // only return entities that the current user can do the following actions on\n canDoActions: MENU_PERMISSIONS\n }\n });\n getEntitySchemas.forEach(({ id, displayName }) => {\n addItem({ name: displayName, uri: `/data-listing/${id}` }, sectionKey);\n });\n };\n}\n\nexport default getAddContentMenuItems;\n"],"mappings":";;;;;;;;;;;;;AAAA;AAEA,eAA6BA,OAAO,CAAC,cAAc,CAAC;EAA5CC,gBAAgB,YAAhBA,gBAAgB;AAExB,SAASC,sBAAsB,CAACC,GAAG,EAAEC,UAAU,EAAE;EAC/C;IAAA,yFAAO,iBAAMC,OAAO;MAAA;MAAA;QAAA;UAAA;YAAA;cACZC,MAAM,GAAGH,GAAG,CAACI,SAAS,EAAE;cAAA;cAAA,OAGpBD,MAAM,CAACE,KAAK,CAAC;gBACrBA,KAAK,EAAE,IAAAC,sBAAQ,EAAC,4BAA4B,CAAC;gBAC7CC,SAAS,EAAE;kBACT;kBACAC,YAAY,EAAEV;gBAChB;cACF,CAAC,CAAC;YAAA;cAAA;cAPQW,gBAAgB,uBAAxBC,IAAI,CAAID,gBAAgB;cAQ1BA,gBAAgB,CAACE,OAAO,CAAC,iBAAyB;gBAAA,IAAtBC,EAAE,SAAFA,EAAE;kBAAEC,WAAW,SAAXA,WAAW;gBACzCX,OAAO,CAAC;kBAAEY,IAAI,EAAED,WAAW;kBAAEE,GAAG,0BAAmBH,EAAE;gBAAG,CAAC,EAAEX,UAAU,CAAC;cACxE,CAAC,CAAC;YAAC;YAAA;cAAA;UAAA;QAAA;MAAA;IAAA,CACJ;IAAA;MAAA;IAAA;EAAA;AACH;AAAC,eAEcF,sBAAsB;AAAA"}
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":";;;;;;;;;;;;;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IAAA;EAAA;AACH;AAAC,IAAAC,QAAA,GAEcnC,sBAAsB;AAAAoC,OAAA,cAAAD,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"build-create-entity-mutation.js","names":["buildCreateEntityMutation","entitySchema","actions","create","properties","BlazeError","actionInput","upperfirst","dataProperties","getDataProperties","gql","join"],"sources":["../../src/utils/build-create-entity-mutation.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\nimport upperfirst from 'lodash.upperfirst';\nimport { getDataProperties } from '@blaze-cms/admin-ui-utils';\n\nfunction buildCreateEntityMutation(entitySchema) {\n if (\n !entitySchema ||\n !entitySchema.actions ||\n !entitySchema.actions.create ||\n !entitySchema.properties\n ) {\n throw new BlazeError(\n 'Create entity query requires create action and properties from entity schema'\n );\n }\n\n const actionInput = upperfirst(`${entitySchema.actions.create}Input`);\n const dataProperties = getDataProperties(entitySchema);\n\n return gql`mutation createEntity($input: ${actionInput}) {\n createdEntity: ${entitySchema.actions.create}(input: $input){\n result {\n id,\n ${dataProperties.join(',\\n')}\n }\n }\n }`;\n}\n\nexport default buildCreateEntityMutation;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AAA8D;AAE9D,SAASA,yBAAyB,CAACC,YAAY,EAAE;EAC/C,IACE,CAACA,YAAY,IACb,CAACA,YAAY,CAACC,OAAO,IACrB,CAACD,YAAY,CAACC,OAAO,CAACC,MAAM,IAC5B,CAACF,YAAY,CAACG,UAAU,EACxB;IACA,MAAM,IAAIC,sBAAU,CAClB,8EAA8E,CAC/E;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,6OAAkCJ,WAAW,EACpCL,YAAY,CAACC,OAAO,CAACC,MAAM,EAGpCK,cAAc,CAACG,IAAI,CAAC,KAAK,CAAC;AAItC;AAAC,eAEcX,yBAAyB;AAAA"}
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,8EAA8E,CAC/E;EACH;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,KAAAC,MAAA,CAAIP,YAAY,CAACC,OAAO,CAACC,MAAM,WAAQ;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 +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;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
+ {"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,WAAQ;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 +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 ${\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;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,4SAENR,YAAY,CAACC,OAAO,CAACC,MAAM,EACuBG,QAAQ,EAExDL,YAAY,CAACC,OAAO,CAACC,MAAM,EAGzBF,YAAY,CAACG,iBAAiB,CAACM,IAAI,CAAC,KAAK,CAAC;AAIpD;AAAC,eAEcV,iBAAiB;AAAA"}
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,+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,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 +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;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
+ {"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,+EAA+E,CAChF;EACH;EAEA,IAAMC,WAAW,GAAG,IAAAC,kBAAU,KAAAC,MAAA,CAAIP,YAAY,CAACC,OAAO,CAACC,MAAM,WAAQ;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 +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;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
+ {"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,2EAA2E,CAC5E;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 +1 @@
1
- {"version":3,"file":"get-default-query-params.js","names":["getDefaultQueryParams","schema","updated","properties","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,GAAG,SAAxBA,qBAAqB,OAAmB;EAAA,IAAbC,MAAM,QAANA,MAAM;EACrC,IAAMC,OAAO,GAAGD,MAAM,CAACE,UAAU,IAAIF,MAAM,CAACE,UAAU,CAACD,OAAO;EAC9D,YAA6CD,MAAM,CAACG,iBAAiB,IAAI,CAAC,CAAC;IAAxCC,KAAK,SAAhCC,yBAAyB;EAEjC,OAAO;IACLD,KAAK,EAALA,KAAK;IACLE,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAEP,OAAO,GACT,CACE;MACEQ,QAAQ,EAAE,SAAS;MACnBC,SAAS,EAAE;IACb,CAAC,CACF,GACD;EACN,CAAC;AACH,CAAC;AAAC"}
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 +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,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
+ {"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,EAAI;EAC/C,CAAC;AAAA;AAACK,OAAA,CAAAR,WAAA,GAAAA,WAAA"}
@@ -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,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
+ {"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 +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":["_buildUpdatePublishUnpublishMutation","_interopRequireDefault","require"],"sources":["../../src/utils/index.js"],"sourcesContent":["import buildUpdatePublishUnpublishMutation from './build-update-publish-unpublish-mutation';\n\nexport { buildUpdatePublishUnpublishMutation };\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,oCAAA,GAAAC,sBAAA,CAAAC,OAAA"}
@@ -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,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
+ {"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","createElement","entitySchema","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,GAAGA,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,oBAAOnB,KAAA,CAAAwB,aAAA,CAACrB,YAAY;IAACsB,YAAY,EAAEH,gBAAgB,CAAC,CAAC,CAAE;IAACX,gBAAgB,EAAEA;EAAiB,EAAG;AAChG,CAAC;AAEDN,iBAAiB,CAACqB,SAAS,GAAG;EAC5BpB,KAAK,EAAEL,SAAS,CAAC0B,MAAM,CAACC,UAAU;EAClCrB,SAAS,EAAEN,SAAS,CAAC4B,KAAK,CAACD;AAC7B,CAAC;AAED,eAAexB,WAAW,CAACC,iBAAiB,CAAC"}
@@ -340,21 +340,6 @@ const Entity = ({
340
340
  const showPageBuilderTabs = (schema === null || schema === void 0 ? void 0 : (_schema$interfaces = schema.interfaces) === null || _schema$interfaces === void 0 ? void 0 : _schema$interfaces.includes('page-builder/page-builder-template')) || (schema === null || schema === void 0 ? void 0 : (_schema$interfaces2 = schema.interfaces) === null || _schema$interfaces2 === void 0 ? void 0 : _schema$interfaces2.includes('page-builder/page-builder'));
341
341
  return /*#__PURE__*/React.createElement("div", {
342
342
  className: "page"
343
- }, /*#__PURE__*/React.createElement(Prompt, {
344
- when: hasToDisplayPrompt,
345
- message: LEAVE_PAGE_MESSAGE
346
- }), showModal && /*#__PURE__*/React.createElement(DeleteAction, {
347
- onClose: setModalStatus,
348
- deleteAction: onDelete,
349
- itemName: formData.values.name
350
- }), copyModalStatus && /*#__PURE__*/React.createElement(CopyDataFromAction, {
351
- onClose: handleCopyDataFromClose,
352
- copyAction: onCopy,
353
- getFormData: getFormData
354
- }), /*#__PURE__*/React.createElement("div", {
355
- className: "row row--display-row"
356
- }, /*#__PURE__*/React.createElement("div", {
357
- className: "column column--three-quarters"
358
343
  }, /*#__PURE__*/React.createElement(EntityHeader, {
359
344
  entityData: entityData,
360
345
  entityIdentifier: entityIdentifier,
@@ -371,6 +356,23 @@ const Entity = ({
371
356
  onViewUrl: onViewUrlHandler,
372
357
  saveButtonText: saveButtonText
373
358
  }), /*#__PURE__*/React.createElement("div", {
359
+ className: "page-wrapper__content"
360
+ }, /*#__PURE__*/React.createElement("div", {
361
+ className: "tabs-wrapper tabs-wrapper__tab"
362
+ }, /*#__PURE__*/React.createElement(Prompt, {
363
+ when: hasToDisplayPrompt,
364
+ message: LEAVE_PAGE_MESSAGE
365
+ }), showModal && /*#__PURE__*/React.createElement(DeleteAction, {
366
+ onClose: setModalStatus,
367
+ deleteAction: onDelete,
368
+ itemName: formData.values.name
369
+ }), copyModalStatus && /*#__PURE__*/React.createElement(CopyDataFromAction, {
370
+ onClose: handleCopyDataFromClose,
371
+ copyAction: onCopy,
372
+ getFormData: getFormData
373
+ }), /*#__PURE__*/React.createElement("div", {
374
+ className: "page__content--fixed"
375
+ }, /*#__PURE__*/React.createElement("div", {
374
376
  className: "page__content"
375
377
  }, /*#__PURE__*/React.createElement("div", {
376
378
  className: "content"
@@ -395,8 +397,8 @@ const Entity = ({
395
397
  updateCopyData: updateCopyData,
396
398
  formValues: formValues,
397
399
  isNewEntity: isNewEntity
398
- }))))), /*#__PURE__*/React.createElement("div", {
399
- className: "column column--one-third"
400
+ })))))), /*#__PURE__*/React.createElement("div", {
401
+ className: "column column--one-third page-sidebar"
400
402
  }, showSideBarRelations && /*#__PURE__*/React.createElement(SideBarRelations, {
401
403
  entity: entity,
402
404
  formData: formData.values,