@webiny/app-aco 0.0.0-unstable.2af142b57e → 0.0.0-unstable.496cf268ac

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 (84) hide show
  1. package/README.md +107 -47
  2. package/components/Dialogs/DialogCreate.d.ts +1 -1
  3. package/components/Dialogs/DialogCreate.js +55 -28
  4. package/components/Dialogs/DialogCreate.js.map +1 -1
  5. package/components/Dialogs/DialogDelete.js +1 -1
  6. package/components/Dialogs/DialogDelete.js.map +1 -1
  7. package/components/Dialogs/DialogMove.d.ts +11 -0
  8. package/components/Dialogs/DialogMove.js +115 -0
  9. package/components/Dialogs/DialogMove.js.map +1 -0
  10. package/components/Dialogs/DialogUpdate.js +30 -45
  11. package/components/Dialogs/DialogUpdate.js.map +1 -1
  12. package/components/Dialogs/styled.d.ts +15 -5
  13. package/components/Dialogs/styled.js +8 -3
  14. package/components/Dialogs/styled.js.map +1 -1
  15. package/components/Tree/ButtonCreate/styled.d.ts +12 -12
  16. package/components/Tree/ButtonCreate/styled.js +1 -1
  17. package/components/Tree/ButtonCreate/styled.js.map +1 -1
  18. package/components/Tree/Empty/styled.d.ts +5 -2
  19. package/components/Tree/List/index.d.ts +3 -1
  20. package/components/Tree/List/index.js +4 -1
  21. package/components/Tree/List/index.js.map +1 -1
  22. package/components/Tree/List/utils.d.ts +2 -1
  23. package/components/Tree/List/utils.js +4 -0
  24. package/components/Tree/List/utils.js.map +1 -1
  25. package/components/Tree/Loader/index.js +2 -1
  26. package/components/Tree/Loader/index.js.map +1 -1
  27. package/components/Tree/Loader/styled.d.ts +9 -3
  28. package/components/Tree/MenuActions/index.js +10 -3
  29. package/components/Tree/MenuActions/index.js.map +1 -1
  30. package/components/Tree/MenuActions/styled.d.ts +8 -2
  31. package/components/Tree/MenuActions/styled.js +8 -2
  32. package/components/Tree/MenuActions/styled.js.map +1 -1
  33. package/components/Tree/Node/index.d.ts +4 -2
  34. package/components/Tree/Node/index.js +11 -6
  35. package/components/Tree/Node/index.js.map +1 -1
  36. package/components/Tree/Node/styled.d.ts +29 -24
  37. package/components/Tree/Node/styled.js +4 -4
  38. package/components/Tree/Node/styled.js.map +1 -1
  39. package/components/Tree/NodePreview/styled.d.ts +5 -2
  40. package/components/Tree/Placeholder/styled.d.ts +5 -2
  41. package/components/Tree/Title/styled.d.ts +9 -3
  42. package/components/Tree/Title/styled.js +1 -1
  43. package/components/Tree/Title/styled.js.map +1 -1
  44. package/components/Tree/index.d.ts +3 -0
  45. package/components/Tree/index.js +8 -3
  46. package/components/Tree/index.js.map +1 -1
  47. package/components/Tree/styled.d.ts +5 -2
  48. package/components/Tree/styled.js +1 -1
  49. package/components/Tree/styled.js.map +1 -1
  50. package/contexts/folders.js +1 -1
  51. package/contexts/folders.js.map +1 -1
  52. package/contexts/links.d.ts +18 -0
  53. package/contexts/links.js +371 -0
  54. package/contexts/links.js.map +1 -0
  55. package/contexts/records.d.ts +12 -6
  56. package/contexts/records.js +97 -36
  57. package/contexts/records.js.map +1 -1
  58. package/graphql/links.gql.d.ts +5 -0
  59. package/graphql/links.gql.js +34 -0
  60. package/graphql/links.gql.js.map +1 -0
  61. package/graphql/records.gql.js +2 -2
  62. package/graphql/records.gql.js.map +1 -1
  63. package/hooks/index.d.ts +1 -0
  64. package/hooks/index.js +11 -0
  65. package/hooks/index.js.map +1 -1
  66. package/hooks/useAcoList.d.ts +18 -0
  67. package/hooks/useAcoList.js +137 -0
  68. package/hooks/useAcoList.js.map +1 -0
  69. package/hooks/useLinks.d.ts +20 -0
  70. package/hooks/useLinks.js +65 -0
  71. package/hooks/useLinks.js.map +1 -0
  72. package/hooks/useRecords.d.ts +12 -8
  73. package/hooks/useRecords.js +16 -6
  74. package/hooks/useRecords.js.map +1 -1
  75. package/index.d.ts +1 -1
  76. package/index.js +6 -0
  77. package/index.js.map +1 -1
  78. package/package.json +13 -11
  79. package/sorting.d.ts +3 -0
  80. package/sorting.js +32 -0
  81. package/sorting.js.map +1 -0
  82. package/types.d.ts +21 -5
  83. package/types.js +14 -1
  84. package/types.js.map +1 -1
@@ -0,0 +1,20 @@
1
+ import { LinkItem } from "../types";
2
+ export declare const useLinks: (folderId: string) => {
3
+ /**
4
+ * NOTE: you do NOT need to call `listLinks` from this hook on component mount, because you already have folders in the `links` property.
5
+ * As soon as you call `useLinks()`, you'll initiate fetching of `links`, which is managed by the `LinksContext`.
6
+ * Since this method lists links with pagination, you might need to call it multiple times passing the `after` param.
7
+ */
8
+ loading: import("../types").Loading<import("~/types").LoadingActions>;
9
+ meta: {
10
+ cursor: string | null;
11
+ totalCount: number;
12
+ hasMoreItems: boolean;
13
+ };
14
+ links: LinkItem[];
15
+ listLinks(after: string, limit?: number): Promise<LinkItem[]>;
16
+ getLink(id: string): Promise<LinkItem>;
17
+ createLink(link: Omit<LinkItem, "linkId">): Promise<LinkItem>;
18
+ updateLink(link: LinkItem): Promise<LinkItem>;
19
+ deleteLink(link: LinkItem): Promise<true>;
20
+ };
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useLinks = void 0;
7
+
8
+ var _react = require("react");
9
+
10
+ var _links = require("../contexts/links");
11
+
12
+ var useLinks = function useLinks(folderId) {
13
+ var context = (0, _react.useContext)(_links.LinksContext);
14
+
15
+ if (!context) {
16
+ throw new Error("useFoldersLinks must be used within a FoldersProvider");
17
+ }
18
+
19
+ var links = context.links,
20
+ loading = context.loading,
21
+ meta = context.meta,
22
+ _listLinks = context.listLinks,
23
+ _getLink = context.getLink,
24
+ _createLink = context.createLink,
25
+ _updateLink = context.updateLink,
26
+ _deleteLink = context.deleteLink;
27
+ (0, _react.useEffect)(function () {
28
+ /**
29
+ * On first mount, call `listLinks`, which will either issue a network request, or load links from cache.
30
+ * We don't need to store the result of it to any local state; that is managed by the context provider.
31
+ */
32
+ _listLinks(folderId);
33
+ }, [folderId]);
34
+ return (0, _react.useMemo)(function () {
35
+ return {
36
+ /**
37
+ * NOTE: you do NOT need to call `listLinks` from this hook on component mount, because you already have folders in the `links` property.
38
+ * As soon as you call `useLinks()`, you'll initiate fetching of `links`, which is managed by the `LinksContext`.
39
+ * Since this method lists links with pagination, you might need to call it multiple times passing the `after` param.
40
+ */
41
+ loading: loading,
42
+ meta: meta[folderId] || {},
43
+ links: links.filter(function (link) {
44
+ return link.folderId === folderId;
45
+ }),
46
+ listLinks: function listLinks(after, limit) {
47
+ return _listLinks(folderId, limit, after);
48
+ },
49
+ getLink: function getLink(id) {
50
+ return _getLink(id, folderId);
51
+ },
52
+ createLink: function createLink(link) {
53
+ return _createLink(link);
54
+ },
55
+ updateLink: function updateLink(link) {
56
+ return _updateLink(link, folderId);
57
+ },
58
+ deleteLink: function deleteLink(link) {
59
+ return _deleteLink(link);
60
+ }
61
+ };
62
+ }, [links, loading, meta]);
63
+ };
64
+
65
+ exports.useLinks = useLinks;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useLinks","folderId","context","useContext","LinksContext","Error","links","loading","meta","listLinks","getLink","createLink","updateLink","deleteLink","useEffect","useMemo","filter","link","after","limit","id"],"sources":["useLinks.ts"],"sourcesContent":["import { useContext, useEffect, useMemo } from \"react\";\nimport { LinksContext } from \"~/contexts/links\";\nimport { LinkItem } from \"~/types\";\n\nexport const useLinks = (folderId: string) => {\n const context = useContext(LinksContext);\n\n if (!context) {\n throw new Error(\"useFoldersLinks must be used within a FoldersProvider\");\n }\n\n const { links, loading, meta, listLinks, getLink, createLink, updateLink, deleteLink } =\n context;\n\n useEffect(() => {\n /**\n * On first mount, call `listLinks`, which will either issue a network request, or load links from cache.\n * We don't need to store the result of it to any local state; that is managed by the context provider.\n */\n listLinks(folderId);\n }, [folderId]);\n\n return useMemo(\n () => ({\n /**\n * NOTE: you do NOT need to call `listLinks` from this hook on component mount, because you already have folders in the `links` property.\n * As soon as you call `useLinks()`, you'll initiate fetching of `links`, which is managed by the `LinksContext`.\n * Since this method lists links with pagination, you might need to call it multiple times passing the `after` param.\n */\n loading,\n meta: meta[folderId] || {},\n links: links.filter(link => link.folderId === folderId),\n listLinks(after: string, limit?: number) {\n return listLinks(folderId, limit, after);\n },\n getLink(id: string) {\n return getLink(id, folderId);\n },\n createLink(link: Omit<LinkItem, \"linkId\">) {\n return createLink(link);\n },\n updateLink(link: LinkItem) {\n return updateLink(link, folderId);\n },\n deleteLink(link: LinkItem) {\n return deleteLink(link);\n }\n }),\n [links, loading, meta]\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAGO,IAAMA,QAAQ,GAAG,SAAXA,QAAW,CAACC,QAAD,EAAsB;EAC1C,IAAMC,OAAO,GAAG,IAAAC,iBAAA,EAAWC,mBAAX,CAAhB;;EAEA,IAAI,CAACF,OAAL,EAAc;IACV,MAAM,IAAIG,KAAJ,CAAU,uDAAV,CAAN;EACH;;EAED,IAAQC,KAAR,GACIJ,OADJ,CAAQI,KAAR;EAAA,IAAeC,OAAf,GACIL,OADJ,CAAeK,OAAf;EAAA,IAAwBC,IAAxB,GACIN,OADJ,CAAwBM,IAAxB;EAAA,IAA8BC,UAA9B,GACIP,OADJ,CAA8BO,SAA9B;EAAA,IAAyCC,QAAzC,GACIR,OADJ,CAAyCQ,OAAzC;EAAA,IAAkDC,WAAlD,GACIT,OADJ,CAAkDS,UAAlD;EAAA,IAA8DC,WAA9D,GACIV,OADJ,CAA8DU,UAA9D;EAAA,IAA0EC,WAA1E,GACIX,OADJ,CAA0EW,UAA1E;EAGA,IAAAC,gBAAA,EAAU,YAAM;IACZ;AACR;AACA;AACA;IACQL,UAAS,CAACR,QAAD,CAAT;EACH,CAND,EAMG,CAACA,QAAD,CANH;EAQA,OAAO,IAAAc,cAAA,EACH;IAAA,OAAO;MACH;AACZ;AACA;AACA;AACA;MACYR,OAAO,EAAPA,OANG;MAOHC,IAAI,EAAEA,IAAI,CAACP,QAAD,CAAJ,IAAkB,EAPrB;MAQHK,KAAK,EAAEA,KAAK,CAACU,MAAN,CAAa,UAAAC,IAAI;QAAA,OAAIA,IAAI,CAAChB,QAAL,KAAkBA,QAAtB;MAAA,CAAjB,CARJ;MASHQ,SATG,qBASOS,KATP,EASsBC,KATtB,EASsC;QACrC,OAAOV,UAAS,CAACR,QAAD,EAAWkB,KAAX,EAAkBD,KAAlB,CAAhB;MACH,CAXE;MAYHR,OAZG,mBAYKU,EAZL,EAYiB;QAChB,OAAOV,QAAO,CAACU,EAAD,EAAKnB,QAAL,CAAd;MACH,CAdE;MAeHU,UAfG,sBAeQM,IAfR,EAewC;QACvC,OAAON,WAAU,CAACM,IAAD,CAAjB;MACH,CAjBE;MAkBHL,UAlBG,sBAkBQK,IAlBR,EAkBwB;QACvB,OAAOL,WAAU,CAACK,IAAD,EAAOhB,QAAP,CAAjB;MACH,CApBE;MAqBHY,UArBG,sBAqBQI,IArBR,EAqBwB;QACvB,OAAOJ,WAAU,CAACI,IAAD,CAAjB;MACH;IAvBE,CAAP;EAAA,CADG,EA0BH,CAACX,KAAD,EAAQC,OAAR,EAAiBC,IAAjB,CA1BG,CAAP;AA4BH,CA9CM"}
@@ -1,8 +1,8 @@
1
- import { SearchRecordItem } from "../types";
2
- export declare const useRecords: (type: string, folderId: string) => {
1
+ import { ListDbSort, SearchRecordItem } from "../types";
2
+ export declare const useRecords: (type?: string, folderId?: string) => {
3
3
  /**
4
4
  * NOTE: you do NOT need to call `listRecords` from this hook on component mount, because you already have folders in the `listRecords` property.
5
- * As soon as you call `useSearchRecords()`, you'll initiate fetching of `records`, which is managed by the `SearchRecordContext`.
5
+ * As soon as you call `useRecords()`, you'll initiate fetching of `records`, which is managed by the `SearchRecordContext`.
6
6
  * Since this method lists records with pagination, you might need to call it multiple times passing the `after` param.
7
7
  */
8
8
  loading: import("../types").Loading<import("~/types").LoadingActions>;
@@ -11,10 +11,14 @@ export declare const useRecords: (type: string, folderId: string) => {
11
11
  totalCount: number;
12
12
  hasMoreItems: boolean;
13
13
  };
14
- records: SearchRecordItem[];
15
- listRecords(after: string, limit?: number): Promise<SearchRecordItem[]>;
16
- getRecord(id: string): Promise<SearchRecordItem>;
17
- createRecord(record: Omit<SearchRecordItem, "linkId">): Promise<SearchRecordItem>;
18
- updateRecord(record: SearchRecordItem): Promise<SearchRecordItem>;
14
+ records: SearchRecordItem<import("../types").GenericSearchData>[];
15
+ listRecords(params: {
16
+ after?: string;
17
+ limit?: number;
18
+ sort?: ListDbSort;
19
+ }): Promise<SearchRecordItem<import("../types").GenericSearchData>[]>;
20
+ getRecord(id: string): Promise<SearchRecordItem<import("../types").GenericSearchData>>;
21
+ createRecord(record: Omit<SearchRecordItem, "id">): Promise<SearchRecordItem<import("../types").GenericSearchData>>;
22
+ updateRecord(record: SearchRecordItem): Promise<SearchRecordItem<import("../types").GenericSearchData>>;
19
23
  deleteRecord(record: SearchRecordItem): Promise<true>;
20
24
  };
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.useRecords = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
7
9
  var _react = require("react");
8
10
  var _records = require("../contexts/records");
9
11
  var useRecords = function useRecords(type, folderId) {
@@ -24,13 +26,18 @@ var useRecords = function useRecords(type, folderId) {
24
26
  * On first mount, call `listRecords`, which will either issue a network request, or load links from cache.
25
27
  * We don't need to store the result of it to any local state; that is managed by the context provider.
26
28
  */
27
- _listRecords(type, folderId);
28
- }, [location]);
29
+ if (type && folderId) {
30
+ _listRecords({
31
+ type: type,
32
+ folderId: folderId
33
+ });
34
+ }
35
+ }, [type, folderId]);
29
36
  return (0, _react.useMemo)(function () {
30
37
  return {
31
38
  /**
32
39
  * NOTE: you do NOT need to call `listRecords` from this hook on component mount, because you already have folders in the `listRecords` property.
33
- * As soon as you call `useSearchRecords()`, you'll initiate fetching of `records`, which is managed by the `SearchRecordContext`.
40
+ * As soon as you call `useRecords()`, you'll initiate fetching of `records`, which is managed by the `SearchRecordContext`.
34
41
  * Since this method lists records with pagination, you might need to call it multiple times passing the `after` param.
35
42
  */
36
43
  loading: loading,
@@ -38,11 +45,14 @@ var useRecords = function useRecords(type, folderId) {
38
45
  records: records.filter(function (record) {
39
46
  return record.location.folderId === folderId;
40
47
  }),
41
- listRecords: function listRecords(after, limit) {
42
- return _listRecords(type, folderId, limit, after);
48
+ listRecords: function listRecords(params) {
49
+ return _listRecords((0, _objectSpread2.default)({
50
+ type: type,
51
+ folderId: folderId
52
+ }, params));
43
53
  },
44
54
  getRecord: function getRecord(id) {
45
- return _getRecord(id, folderId);
55
+ return _getRecord(id);
46
56
  },
47
57
  createRecord: function createRecord(record) {
48
58
  return _createRecord(record);
@@ -1 +1 @@
1
- {"version":3,"names":["useRecords","type","folderId","context","useContext","SearchRecordsContext","Error","records","loading","meta","listRecords","getRecord","createRecord","updateRecord","deleteRecord","useEffect","location","useMemo","filter","record","after","limit","id"],"sources":["useRecords.ts"],"sourcesContent":["import { useContext, useEffect, useMemo } from \"react\";\nimport { SearchRecordsContext } from \"~/contexts/records\";\nimport { SearchRecordItem } from \"~/types\";\n\nexport const useRecords = (type: string, folderId: string) => {\n const context = useContext(SearchRecordsContext);\n\n if (!context) {\n throw new Error(\"useSearchRecords must be used within a SearchRecordsContext\");\n }\n\n const {\n records,\n loading,\n meta,\n listRecords,\n getRecord,\n createRecord,\n updateRecord,\n deleteRecord\n } = context;\n\n useEffect(() => {\n /**\n * On first mount, call `listRecords`, which will either issue a network request, or load links from cache.\n * We don't need to store the result of it to any local state; that is managed by the context provider.\n */\n listRecords(type, folderId);\n }, [location]);\n\n return useMemo(\n () => ({\n /**\n * NOTE: you do NOT need to call `listRecords` from this hook on component mount, because you already have folders in the `listRecords` property.\n * As soon as you call `useSearchRecords()`, you'll initiate fetching of `records`, which is managed by the `SearchRecordContext`.\n * Since this method lists records with pagination, you might need to call it multiple times passing the `after` param.\n */\n loading,\n meta: meta[folderId] || {},\n records: records.filter(record => record.location.folderId === folderId),\n listRecords(after: string, limit?: number) {\n return listRecords(type, folderId, limit, after);\n },\n getRecord(id: string) {\n return getRecord(id, folderId);\n },\n createRecord(record: Omit<SearchRecordItem, \"linkId\">) {\n return createRecord(record);\n },\n updateRecord(record: SearchRecordItem) {\n return updateRecord(record, folderId);\n },\n deleteRecord(record: SearchRecordItem) {\n return deleteRecord(record);\n }\n }),\n [records, loading, meta]\n );\n};\n"],"mappings":";;;;;;AAAA;AACA;AAGO,IAAMA,UAAU,GAAG,SAAbA,UAAU,CAAIC,IAAY,EAAEC,QAAgB,EAAK;EAC1D,IAAMC,OAAO,GAAG,IAAAC,iBAAU,EAACC,6BAAoB,CAAC;EAEhD,IAAI,CAACF,OAAO,EAAE;IACV,MAAM,IAAIG,KAAK,CAAC,6DAA6D,CAAC;EAClF;EAEA,IACIC,OAAO,GAQPJ,OAAO,CARPI,OAAO;IACPC,OAAO,GAOPL,OAAO,CAPPK,OAAO;IACPC,IAAI,GAMJN,OAAO,CANPM,IAAI;IACJC,YAAW,GAKXP,OAAO,CALPO,WAAW;IACXC,UAAS,GAITR,OAAO,CAJPQ,SAAS;IACTC,aAAY,GAGZT,OAAO,CAHPS,YAAY;IACZC,aAAY,GAEZV,OAAO,CAFPU,YAAY;IACZC,aAAY,GACZX,OAAO,CADPW,YAAY;EAGhB,IAAAC,gBAAS,EAAC,YAAM;IACZ;AACR;AACA;AACA;IACQL,YAAW,CAACT,IAAI,EAAEC,QAAQ,CAAC;EAC/B,CAAC,EAAE,CAACc,QAAQ,CAAC,CAAC;EAEd,OAAO,IAAAC,cAAO,EACV;IAAA,OAAO;MACH;AACZ;AACA;AACA;AACA;MACYT,OAAO,EAAPA,OAAO;MACPC,IAAI,EAAEA,IAAI,CAACP,QAAQ,CAAC,IAAI,CAAC,CAAC;MAC1BK,OAAO,EAAEA,OAAO,CAACW,MAAM,CAAC,UAAAC,MAAM;QAAA,OAAIA,MAAM,CAACH,QAAQ,CAACd,QAAQ,KAAKA,QAAQ;MAAA,EAAC;MACxEQ,WAAW,uBAACU,KAAa,EAAEC,KAAc,EAAE;QACvC,OAAOX,YAAW,CAACT,IAAI,EAAEC,QAAQ,EAAEmB,KAAK,EAAED,KAAK,CAAC;MACpD,CAAC;MACDT,SAAS,qBAACW,EAAU,EAAE;QAClB,OAAOX,UAAS,CAACW,EAAE,EAAEpB,QAAQ,CAAC;MAClC,CAAC;MACDU,YAAY,wBAACO,MAAwC,EAAE;QACnD,OAAOP,aAAY,CAACO,MAAM,CAAC;MAC/B,CAAC;MACDN,YAAY,wBAACM,MAAwB,EAAE;QACnC,OAAON,aAAY,CAACM,MAAM,EAAEjB,QAAQ,CAAC;MACzC,CAAC;MACDY,YAAY,wBAACK,MAAwB,EAAE;QACnC,OAAOL,aAAY,CAACK,MAAM,CAAC;MAC/B;IACJ,CAAC;EAAA,CAAC,EACF,CAACZ,OAAO,EAAEC,OAAO,EAAEC,IAAI,CAAC,CAC3B;AACL,CAAC;AAAC"}
1
+ {"version":3,"names":["useRecords","type","folderId","context","useContext","SearchRecordsContext","Error","records","loading","meta","listRecords","getRecord","createRecord","updateRecord","deleteRecord","useEffect","useMemo","filter","record","location","params","id"],"sources":["useRecords.ts"],"sourcesContent":["import { useContext, useEffect, useMemo } from \"react\";\nimport { SearchRecordsContext } from \"~/contexts/records\";\nimport { ListDbSort, SearchRecordItem } from \"~/types\";\n\nexport const useRecords = (type?: string, folderId?: string) => {\n const context = useContext(SearchRecordsContext);\n\n if (!context) {\n throw new Error(\"useSearchRecords must be used within a SearchRecordsContext\");\n }\n\n const {\n records,\n loading,\n meta,\n listRecords,\n getRecord,\n createRecord,\n updateRecord,\n deleteRecord\n } = context;\n\n useEffect(() => {\n /**\n * On first mount, call `listRecords`, which will either issue a network request, or load links from cache.\n * We don't need to store the result of it to any local state; that is managed by the context provider.\n */\n if (type && folderId) {\n listRecords({ type, folderId });\n }\n }, [type, folderId]);\n\n return useMemo(\n () => ({\n /**\n * NOTE: you do NOT need to call `listRecords` from this hook on component mount, because you already have folders in the `listRecords` property.\n * As soon as you call `useRecords()`, you'll initiate fetching of `records`, which is managed by the `SearchRecordContext`.\n * Since this method lists records with pagination, you might need to call it multiple times passing the `after` param.\n */\n loading,\n meta: meta[folderId!] || {},\n records: records.filter(record => record.location.folderId === folderId),\n listRecords(params: { after?: string; limit?: number; sort?: ListDbSort }) {\n return listRecords({ type, folderId, ...params });\n },\n getRecord(id: string) {\n return getRecord(id);\n },\n createRecord(record: Omit<SearchRecordItem, \"id\">) {\n return createRecord(record);\n },\n updateRecord(record: SearchRecordItem) {\n return updateRecord(record, folderId);\n },\n deleteRecord(record: SearchRecordItem) {\n return deleteRecord(record);\n }\n }),\n [records, loading, meta]\n );\n};\n"],"mappings":";;;;;;;;AAAA;AACA;AAGO,IAAMA,UAAU,GAAG,SAAbA,UAAU,CAAIC,IAAa,EAAEC,QAAiB,EAAK;EAC5D,IAAMC,OAAO,GAAG,IAAAC,iBAAU,EAACC,6BAAoB,CAAC;EAEhD,IAAI,CAACF,OAAO,EAAE;IACV,MAAM,IAAIG,KAAK,CAAC,6DAA6D,CAAC;EAClF;EAEA,IACIC,OAAO,GAQPJ,OAAO,CARPI,OAAO;IACPC,OAAO,GAOPL,OAAO,CAPPK,OAAO;IACPC,IAAI,GAMJN,OAAO,CANPM,IAAI;IACJC,YAAW,GAKXP,OAAO,CALPO,WAAW;IACXC,UAAS,GAITR,OAAO,CAJPQ,SAAS;IACTC,aAAY,GAGZT,OAAO,CAHPS,YAAY;IACZC,aAAY,GAEZV,OAAO,CAFPU,YAAY;IACZC,aAAY,GACZX,OAAO,CADPW,YAAY;EAGhB,IAAAC,gBAAS,EAAC,YAAM;IACZ;AACR;AACA;AACA;IACQ,IAAId,IAAI,IAAIC,QAAQ,EAAE;MAClBQ,YAAW,CAAC;QAAET,IAAI,EAAJA,IAAI;QAAEC,QAAQ,EAARA;MAAS,CAAC,CAAC;IACnC;EACJ,CAAC,EAAE,CAACD,IAAI,EAAEC,QAAQ,CAAC,CAAC;EAEpB,OAAO,IAAAc,cAAO,EACV;IAAA,OAAO;MACH;AACZ;AACA;AACA;AACA;MACYR,OAAO,EAAPA,OAAO;MACPC,IAAI,EAAEA,IAAI,CAACP,QAAQ,CAAE,IAAI,CAAC,CAAC;MAC3BK,OAAO,EAAEA,OAAO,CAACU,MAAM,CAAC,UAAAC,MAAM;QAAA,OAAIA,MAAM,CAACC,QAAQ,CAACjB,QAAQ,KAAKA,QAAQ;MAAA,EAAC;MACxEQ,WAAW,uBAACU,MAA6D,EAAE;QACvE,OAAOV,YAAW;UAAGT,IAAI,EAAJA,IAAI;UAAEC,QAAQ,EAARA;QAAQ,GAAKkB,MAAM,EAAG;MACrD,CAAC;MACDT,SAAS,qBAACU,EAAU,EAAE;QAClB,OAAOV,UAAS,CAACU,EAAE,CAAC;MACxB,CAAC;MACDT,YAAY,wBAACM,MAAoC,EAAE;QAC/C,OAAON,aAAY,CAACM,MAAM,CAAC;MAC/B,CAAC;MACDL,YAAY,wBAACK,MAAwB,EAAE;QACnC,OAAOL,aAAY,CAACK,MAAM,EAAEhB,QAAQ,CAAC;MACzC,CAAC;MACDY,YAAY,wBAACI,MAAwB,EAAE;QACnC,OAAOJ,aAAY,CAACI,MAAM,CAAC;MAC/B;IACJ,CAAC;EAAA,CAAC,EACF,CAACX,OAAO,EAAEC,OAAO,EAAEC,IAAI,CAAC,CAC3B;AACL,CAAC;AAAC"}
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { FolderTree, FolderDialogCreate, FolderDialogUpdate, FolderDialogDelete } from "./components";
2
2
  export { ACOProvider } from "./contexts";
3
- export { useFolders, useRecords } from "./hooks";
3
+ export { useAcoList, useFolders, useRecords } from "./hooks";
package/index.js CHANGED
@@ -33,6 +33,12 @@ Object.defineProperty(exports, "FolderTree", {
33
33
  return _components.FolderTree;
34
34
  }
35
35
  });
36
+ Object.defineProperty(exports, "useAcoList", {
37
+ enumerable: true,
38
+ get: function get() {
39
+ return _hooks.useAcoList;
40
+ }
41
+ });
36
42
  Object.defineProperty(exports, "useFolders", {
37
43
  enumerable: true,
38
44
  get: function get() {
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export {\n FolderTree,\n FolderDialogCreate,\n FolderDialogUpdate,\n FolderDialogDelete\n} from \"./components\";\nexport { ACOProvider } from \"./contexts\";\nexport { useFolders, useRecords } from \"./hooks\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAMA;AACA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export {\n FolderTree,\n FolderDialogCreate,\n FolderDialogUpdate,\n FolderDialogDelete\n} from \"./components\";\nexport { ACOProvider } from \"./contexts\";\nexport { useAcoList, useFolders, useRecords } from \"./hooks\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAMA;AACA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app-aco",
3
- "version": "0.0.0-unstable.2af142b57e",
3
+ "version": "0.0.0-unstable.496cf268ac",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,21 +12,23 @@
12
12
  "license": "MIT",
13
13
  "dependencies": {
14
14
  "@apollo/react-hooks": "3.1.5",
15
- "@emotion/core": "10.3.1",
16
- "@emotion/styled": "10.3.0",
15
+ "@emotion/react": "11.10.6",
16
+ "@emotion/styled": "11.10.6",
17
17
  "@material-design-icons/svg": "0.12.1",
18
18
  "@material-symbols/svg-400": "0.4.3",
19
19
  "@minoru/react-dnd-treeview": "3.2.1",
20
- "@webiny/app": "0.0.0-unstable.2af142b57e",
21
- "@webiny/app-admin": "0.0.0-unstable.2af142b57e",
22
- "@webiny/form": "0.0.0-unstable.2af142b57e",
23
- "@webiny/ui": "0.0.0-unstable.2af142b57e",
24
- "@webiny/validation": "0.0.0-unstable.2af142b57e",
20
+ "@webiny/app": "0.0.0-unstable.496cf268ac",
21
+ "@webiny/app-admin": "0.0.0-unstable.496cf268ac",
22
+ "@webiny/form": "0.0.0-unstable.496cf268ac",
23
+ "@webiny/ui": "0.0.0-unstable.496cf268ac",
24
+ "@webiny/validation": "0.0.0-unstable.496cf268ac",
25
25
  "graphql": "15.8.0",
26
26
  "graphql-tag": "2.12.6",
27
+ "lodash": "4.17.21",
27
28
  "react": "17.0.2",
28
29
  "react-dnd": "16.0.1",
29
30
  "react-dom": "17.0.2",
31
+ "slugify": "1.6.5",
30
32
  "use-deep-compare-effect": "1.8.1"
31
33
  },
32
34
  "devDependencies": {
@@ -37,8 +39,8 @@
37
39
  "@babel/preset-typescript": "^7.18.6",
38
40
  "@babel/runtime": "^7.19.0",
39
41
  "@types/react": "17.0.39",
40
- "@webiny/cli": "^0.0.0-unstable.2af142b57e",
41
- "@webiny/project-utils": "^0.0.0-unstable.2af142b57e",
42
+ "@webiny/cli": "^0.0.0-unstable.496cf268ac",
43
+ "@webiny/project-utils": "^0.0.0-unstable.496cf268ac",
42
44
  "apollo-client": "^2.6.10",
43
45
  "apollo-link": "^1.2.14",
44
46
  "rimraf": "^3.0.2",
@@ -53,5 +55,5 @@
53
55
  "build": "yarn webiny run build",
54
56
  "watch": "yarn webiny run watch"
55
57
  },
56
- "gitHead": "2af142b57e7cdc433f5098b3b6d43ae6caa5d54e"
58
+ "gitHead": "496cf268acd5b092c860b62d75c7d765c9472043"
57
59
  }
package/sorting.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { ListDbSort } from "./types";
2
+ export declare const validateOrGetDefaultDbSort: (initial?: ListDbSort) => ListDbSort;
3
+ export declare const sortTableItems: (records: any[], sort?: ListDbSort) => any[];
package/sorting.js ADDED
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.validateOrGetDefaultDbSort = exports.sortTableItems = void 0;
8
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
+ var _orderBy = _interopRequireDefault(require("lodash/orderBy"));
10
+ var validateOrGetDefaultDbSort = function validateOrGetDefaultDbSort(initial) {
11
+ if (!initial || Object.keys(initial).length === 0) {
12
+ return {
13
+ savedOn: "DESC"
14
+ };
15
+ }
16
+ return initial;
17
+ };
18
+ exports.validateOrGetDefaultDbSort = validateOrGetDefaultDbSort;
19
+ var sortTableItems = function sortTableItems(records, sort) {
20
+ var dbSorting = validateOrGetDefaultDbSort(sort);
21
+ var fields = [];
22
+ var orders = [];
23
+ for (var _i = 0, _Object$entries = Object.entries(dbSorting); _i < _Object$entries.length; _i++) {
24
+ var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2),
25
+ field = _Object$entries$_i[0],
26
+ order = _Object$entries$_i[1];
27
+ fields.push(field);
28
+ orders.push(order.toLowerCase());
29
+ }
30
+ return (0, _orderBy.default)(records, fields, orders);
31
+ };
32
+ exports.sortTableItems = sortTableItems;
package/sorting.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":["validateOrGetDefaultDbSort","initial","Object","keys","length","savedOn","sortTableItems","records","sort","dbSorting","fields","orders","entries","field","order","push","toLowerCase","orderBy"],"sources":["sorting.tsx"],"sourcesContent":["import orderBy from \"lodash/orderBy\";\n\nimport { ListDbSort, ListTableSort, ListTableSortDirection } from \"~/types\";\n\nexport const validateOrGetDefaultDbSort = (initial?: ListDbSort): ListDbSort => {\n if (!initial || Object.keys(initial).length === 0) {\n return { savedOn: \"DESC\" } as unknown as ListDbSort;\n }\n\n return initial;\n};\n\nexport const sortTableItems = (records: any[], sort?: ListDbSort): any[] => {\n const dbSorting = validateOrGetDefaultDbSort(sort);\n const fields = [] as ListTableSort[\"fields\"];\n const orders = [] as ListTableSort[\"orders\"];\n\n for (const [field, order] of Object.entries(dbSorting)) {\n fields.push(field);\n orders.push(order.toLowerCase() as ListTableSortDirection);\n }\n\n return orderBy(records, fields, orders);\n};\n"],"mappings":";;;;;;;;AAAA;AAIO,IAAMA,0BAA0B,GAAG,SAA7BA,0BAA0B,CAAIC,OAAoB,EAAiB;EAC5E,IAAI,CAACA,OAAO,IAAIC,MAAM,CAACC,IAAI,CAACF,OAAO,CAAC,CAACG,MAAM,KAAK,CAAC,EAAE;IAC/C,OAAO;MAAEC,OAAO,EAAE;IAAO,CAAC;EAC9B;EAEA,OAAOJ,OAAO;AAClB,CAAC;AAAC;AAEK,IAAMK,cAAc,GAAG,SAAjBA,cAAc,CAAIC,OAAc,EAAEC,IAAiB,EAAY;EACxE,IAAMC,SAAS,GAAGT,0BAA0B,CAACQ,IAAI,CAAC;EAClD,IAAME,MAAM,GAAG,EAA6B;EAC5C,IAAMC,MAAM,GAAG,EAA6B;EAE5C,mCAA6BT,MAAM,CAACU,OAAO,CAACH,SAAS,CAAC,qCAAE;IAAnD;MAAOI,KAAK;MAAEC,KAAK;IACpBJ,MAAM,CAACK,IAAI,CAACF,KAAK,CAAC;IAClBF,MAAM,CAACI,IAAI,CAACD,KAAK,CAACE,WAAW,EAAE,CAA2B;EAC9D;EAEA,OAAO,IAAAC,gBAAO,EAACV,OAAO,EAAEG,MAAM,EAAEC,MAAM,CAAC;AAC3C,CAAC;AAAC"}
package/types.d.ts CHANGED
@@ -11,17 +11,19 @@ export interface FolderItem {
11
11
  };
12
12
  savedOn: string;
13
13
  }
14
+ export declare type GenericSearchData = {
15
+ [key: string]: any;
16
+ };
14
17
  export interface Location {
15
18
  folderId: string;
16
19
  }
17
- export interface SearchRecordItem {
20
+ export interface SearchRecordItem<TData extends GenericSearchData = GenericSearchData> {
18
21
  id: string;
19
- originalId: string;
20
22
  type: string;
21
- title?: string;
22
- content?: string;
23
+ title: string;
24
+ content: string;
23
25
  location: Location;
24
- data?: Record<string, any>;
26
+ data: TData;
25
27
  }
26
28
  export declare type Loading<T extends string> = {
27
29
  [P in T]?: boolean;
@@ -35,6 +37,19 @@ export interface Error {
35
37
  export declare type Meta<T> = Record<string, {
36
38
  [P in keyof T]: T[P];
37
39
  }>;
40
+ export declare enum ListDbSortDirection {
41
+ ASC = "ASC",
42
+ DESC = "DESC"
43
+ }
44
+ export declare enum ListTableSortDirection {
45
+ asc = "asc",
46
+ desc = "desc"
47
+ }
48
+ export declare type ListDbSort = Record<string, ListDbSortDirection>;
49
+ export interface ListTableSort {
50
+ fields: string[];
51
+ orders: ListTableSortDirection[];
52
+ }
38
53
  export interface ListMeta {
39
54
  cursor: string | null;
40
55
  totalCount: number;
@@ -110,6 +125,7 @@ export interface ListSearchRecordsQueryVariables {
110
125
  location: Location;
111
126
  limit?: number;
112
127
  after?: string | null;
128
+ sort?: ListDbSort;
113
129
  }
114
130
  export interface GetSearchRecordResponse {
115
131
  search: {
package/types.js CHANGED
@@ -2,4 +2,17 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
- });
5
+ });
6
+ exports.ListTableSortDirection = exports.ListDbSortDirection = void 0;
7
+ var ListDbSortDirection;
8
+ exports.ListDbSortDirection = ListDbSortDirection;
9
+ (function (ListDbSortDirection) {
10
+ ListDbSortDirection["ASC"] = "ASC";
11
+ ListDbSortDirection["DESC"] = "DESC";
12
+ })(ListDbSortDirection || (exports.ListDbSortDirection = ListDbSortDirection = {}));
13
+ var ListTableSortDirection;
14
+ exports.ListTableSortDirection = ListTableSortDirection;
15
+ (function (ListTableSortDirection) {
16
+ ListTableSortDirection["asc"] = "asc";
17
+ ListTableSortDirection["desc"] = "desc";
18
+ })(ListTableSortDirection || (exports.ListTableSortDirection = ListTableSortDirection = {}));
package/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export interface FolderItem {\n id: string;\n title: string;\n slug: string;\n type: string;\n parentId: string | null;\n createdOn: string;\n createdBy: {\n id: string;\n displayName: string;\n };\n savedOn: string;\n}\n\nexport interface Location {\n folderId: string;\n}\n\nexport interface SearchRecordItem {\n id: string;\n originalId: string;\n type: string;\n title?: string;\n content?: string;\n location: Location;\n data?: Record<string, any>;\n}\n\nexport type Loading<T extends string> = { [P in T]?: boolean };\n\nexport type LoadingActions = \"INIT\" | \"LIST\" | \"LIST_MORE\" | \"GET\" | \"CREATE\" | \"UPDATE\" | \"DELETE\";\n\nexport interface Error {\n code: string;\n message: string;\n data: any;\n}\n\nexport type Meta<T> = Record<string, { [P in keyof T]: T[P] }>;\n\nexport interface ListMeta {\n cursor: string | null;\n totalCount: number;\n hasMoreItems: boolean;\n}\n\nexport interface ListFoldersResponse {\n aco: {\n listFolders: {\n data: FolderItem[] | null;\n error: Error | null;\n };\n };\n}\n\nexport interface ListFoldersQueryVariables {\n type: string;\n}\n\nexport interface GetFolderResponse {\n aco: {\n getFolder: {\n data: FolderItem | null;\n error: Error | null;\n };\n };\n}\n\nexport interface GetFolderQueryVariables {\n id: string;\n}\n\nexport interface UpdateFolderResponse {\n aco: {\n updateFolder: {\n data: FolderItem;\n error: Error | null;\n };\n };\n}\n\nexport interface UpdateFolderVariables {\n id: string;\n data: Partial<Omit<FolderItem, \"id\" | \"createdOn\" | \"createdBy\" | \"savedOn\">>;\n}\n\nexport interface CreateFolderResponse {\n aco: {\n createFolder: {\n data: FolderItem;\n error: Error | null;\n };\n };\n}\n\nexport interface CreateFolderVariables {\n data: Omit<FolderItem, \"id\" | \"createdOn\" | \"createdBy\" | \"savedOn\">;\n}\n\nexport interface DeleteFolderVariables {\n id: string;\n}\n\nexport interface DeleteFolderResponse {\n aco: {\n deleteFolder: {\n data: boolean;\n error: Error | null;\n };\n };\n}\n\nexport interface ListSearchRecordsResponse {\n search: {\n listRecords: {\n data: SearchRecordItem[] | null;\n meta: ListMeta | null;\n error: Error | null;\n };\n };\n}\n\nexport interface ListSearchRecordsQueryVariables {\n type: string;\n location: Location;\n limit?: number;\n after?: string | null;\n}\n\nexport interface GetSearchRecordResponse {\n search: {\n getRecord: {\n data: SearchRecordItem | null;\n error: Error | null;\n };\n };\n}\n\nexport interface GetSearchRecordQueryVariables {\n id: string;\n}\n\nexport interface CreateSearchRecordResponse {\n search: {\n createRecord: {\n data: SearchRecordItem;\n error: Error | null;\n };\n };\n}\n\nexport interface CreateSearchRecordVariables {\n data: Omit<SearchRecordItem, \"id\" | \"createdOn\" | \"createdBy\" | \"savedOn\">;\n}\n\nexport interface UpdateSearchRecordResponse {\n search: {\n updateRecord: {\n data: SearchRecordItem;\n error: Error | null;\n };\n };\n}\n\nexport interface UpdateSearchRecordVariables {\n id: string;\n data: Pick<SearchRecordItem, \"location\" | \"title\" | \"content\" | \"data\">;\n}\n\nexport interface DeleteSearchRecordVariables {\n id: string;\n}\n\nexport interface DeleteSearchRecordResponse {\n search: {\n deleteRecord: {\n data: boolean;\n error: Error | null;\n };\n };\n}\n\nexport interface DndItemData extends FolderItem {\n isFocused?: boolean;\n}\n"],"mappings":""}
1
+ {"version":3,"names":["ListDbSortDirection","ListTableSortDirection"],"sources":["types.ts"],"sourcesContent":["export interface FolderItem {\n id: string;\n title: string;\n slug: string;\n type: string;\n parentId: string | null;\n createdOn: string;\n createdBy: {\n id: string;\n displayName: string;\n };\n savedOn: string;\n}\n\nexport type GenericSearchData = {\n [key: string]: any;\n};\n\nexport interface Location {\n folderId: string;\n}\n\nexport interface SearchRecordItem<TData extends GenericSearchData = GenericSearchData> {\n id: string;\n type: string;\n title: string;\n content: string;\n location: Location;\n data: TData;\n}\n\nexport type Loading<T extends string> = { [P in T]?: boolean };\n\nexport type LoadingActions = \"INIT\" | \"LIST\" | \"LIST_MORE\" | \"GET\" | \"CREATE\" | \"UPDATE\" | \"DELETE\";\n\nexport interface Error {\n code: string;\n message: string;\n data: any;\n}\n\nexport type Meta<T> = Record<string, { [P in keyof T]: T[P] }>;\n\nexport enum ListDbSortDirection {\n ASC = \"ASC\",\n DESC = \"DESC\"\n}\n\nexport enum ListTableSortDirection {\n asc = \"asc\",\n desc = \"desc\"\n}\n\nexport type ListDbSort = Record<string, ListDbSortDirection>;\n\nexport interface ListTableSort {\n fields: string[];\n orders: ListTableSortDirection[];\n}\n\nexport interface ListMeta {\n cursor: string | null;\n totalCount: number;\n hasMoreItems: boolean;\n}\n\nexport interface ListFoldersResponse {\n aco: {\n listFolders: {\n data: FolderItem[] | null;\n error: Error | null;\n };\n };\n}\n\nexport interface ListFoldersQueryVariables {\n type: string;\n}\n\nexport interface GetFolderResponse {\n aco: {\n getFolder: {\n data: FolderItem | null;\n error: Error | null;\n };\n };\n}\n\nexport interface GetFolderQueryVariables {\n id: string;\n}\n\nexport interface UpdateFolderResponse {\n aco: {\n updateFolder: {\n data: FolderItem;\n error: Error | null;\n };\n };\n}\n\nexport interface UpdateFolderVariables {\n id: string;\n data: Partial<Omit<FolderItem, \"id\" | \"createdOn\" | \"createdBy\" | \"savedOn\">>;\n}\n\nexport interface CreateFolderResponse {\n aco: {\n createFolder: {\n data: FolderItem;\n error: Error | null;\n };\n };\n}\n\nexport interface CreateFolderVariables {\n data: Omit<FolderItem, \"id\" | \"createdOn\" | \"createdBy\" | \"savedOn\">;\n}\n\nexport interface DeleteFolderVariables {\n id: string;\n}\n\nexport interface DeleteFolderResponse {\n aco: {\n deleteFolder: {\n data: boolean;\n error: Error | null;\n };\n };\n}\n\nexport interface ListSearchRecordsResponse {\n search: {\n listRecords: {\n data: SearchRecordItem[] | null;\n meta: ListMeta | null;\n error: Error | null;\n };\n };\n}\n\nexport interface ListSearchRecordsQueryVariables {\n type: string;\n location: Location;\n limit?: number;\n after?: string | null;\n sort?: ListDbSort;\n}\n\nexport interface GetSearchRecordResponse {\n search: {\n getRecord: {\n data: SearchRecordItem | null;\n error: Error | null;\n };\n };\n}\n\nexport interface GetSearchRecordQueryVariables {\n id: string;\n}\n\nexport interface CreateSearchRecordResponse {\n search: {\n createRecord: {\n data: SearchRecordItem;\n error: Error | null;\n };\n };\n}\n\nexport interface CreateSearchRecordVariables {\n data: Omit<SearchRecordItem, \"id\" | \"createdOn\" | \"createdBy\" | \"savedOn\">;\n}\n\nexport interface UpdateSearchRecordResponse {\n search: {\n updateRecord: {\n data: SearchRecordItem;\n error: Error | null;\n };\n };\n}\n\nexport interface UpdateSearchRecordVariables {\n id: string;\n data: Pick<SearchRecordItem, \"location\" | \"title\" | \"content\" | \"data\">;\n}\n\nexport interface DeleteSearchRecordVariables {\n id: string;\n}\n\nexport interface DeleteSearchRecordResponse {\n search: {\n deleteRecord: {\n data: boolean;\n error: Error | null;\n };\n };\n}\n\nexport interface DndItemData extends FolderItem {\n isFocused?: boolean;\n}\n"],"mappings":";;;;;;IA2CYA,mBAAmB;AAAA;AAAA,WAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;AAAA,GAAnBA,mBAAmB,mCAAnBA,mBAAmB;AAAA,IAKnBC,sBAAsB;AAAA;AAAA,WAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;AAAA,GAAtBA,sBAAsB,sCAAtBA,sBAAsB"}