@webiny/app-aco 6.1.0 → 6.2.0
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.
- package/components/FolderPicker/FolderPicker.d.ts +8 -0
- package/components/FolderPicker/FolderPicker.js +24 -0
- package/components/FolderPicker/FolderPicker.js.map +1 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityPresenter.test.js +3 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityPresenter.test.js.map +1 -1
- package/components/Table/components/Table/Columns/Column.d.ts +3 -0
- package/components/Table/components/Table/Columns/Column.js +1 -0
- package/components/Table/components/Table/Columns/Column.js.map +1 -1
- package/components/Table/components/Table/Columns/ColumnMapper.js +2 -0
- package/components/Table/components/Table/Columns/ColumnMapper.js.map +1 -1
- package/components/Table/components/Table/Columns/ColumnsPresenter.test.js +4 -0
- package/components/Table/components/Table/Columns/ColumnsPresenter.test.js.map +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/index.js.map +1 -1
- package/config/table/Column.d.ts +2 -0
- package/config/table/Column.js +5 -0
- package/config/table/Column.js.map +1 -1
- package/exports/admin/ui.d.ts +2 -0
- package/exports/admin/ui.js +4 -0
- package/exports/admin/ui.js.map +1 -0
- package/features/folders/listFolders/ListFoldersGqlGateway.d.ts +2 -2
- package/features/folders/listFolders/ListFoldersGqlGateway.js +2 -2
- package/features/folders/listFolders/ListFoldersGqlGateway.js.map +1 -1
- package/features/folders/loadFolderHierarchy/LoadFolderHierarchyGqlGateway.d.ts +2 -2
- package/features/folders/loadFolderHierarchy/LoadFolderHierarchyGqlGateway.js +2 -2
- package/features/folders/loadFolderHierarchy/LoadFolderHierarchyGqlGateway.js.map +1 -1
- package/package.json +23 -23
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface FolderPickerProps {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (id: string) => void;
|
|
6
|
+
enableCreate?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const FolderPicker: ({ label, value, onChange, enableCreate }: FolderPickerProps) => React.JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { useCallback } from "react";
|
|
2
|
+
import { cn, FormComponentLabel } from "@webiny/admin-ui";
|
|
3
|
+
import { FolderTree } from "../index.js";
|
|
4
|
+
export const FolderPicker = ({
|
|
5
|
+
label,
|
|
6
|
+
value,
|
|
7
|
+
onChange,
|
|
8
|
+
enableCreate = true
|
|
9
|
+
}) => {
|
|
10
|
+
const onFolderChange = useCallback(folder => {
|
|
11
|
+
onChange(folder.id);
|
|
12
|
+
}, [onChange]);
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(FormComponentLabel, {
|
|
14
|
+
text: label
|
|
15
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: cn(["px-sm-extra py-sm-extra", "border-sm border-neutral-muted rounded-md", "bg-neutral-base", "max-h-[280px] overflow-x-hidden overflow-y-scroll"])
|
|
17
|
+
}, /*#__PURE__*/React.createElement(FolderTree, {
|
|
18
|
+
focusedFolderId: value,
|
|
19
|
+
onFolderClick: onFolderChange,
|
|
20
|
+
enableCreate: enableCreate
|
|
21
|
+
})));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=FolderPicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","cn","FormComponentLabel","FolderTree","FolderPicker","label","value","onChange","enableCreate","onFolderChange","folder","id","createElement","text","className","focusedFolderId","onFolderClick"],"sources":["FolderPicker.tsx"],"sourcesContent":["import React, { useCallback } from \"react\";\nimport { cn, FormComponentLabel } from \"@webiny/admin-ui\";\nimport { FolderTree } from \"~/components/index.js\";\nimport type { FolderDto } from \"~/domain/folder/FolderDto.js\";\n\nexport interface FolderPickerProps {\n label: string;\n value: string;\n onChange: (id: string) => void;\n enableCreate?: boolean;\n}\n\nexport const FolderPicker = ({\n label,\n value,\n onChange,\n enableCreate = true\n}: FolderPickerProps) => {\n const onFolderChange = useCallback(\n (folder: FolderDto) => {\n onChange(folder.id);\n },\n [onChange]\n );\n\n return (\n <div>\n <FormComponentLabel text={label} />\n <div\n className={cn([\n \"px-sm-extra py-sm-extra\",\n \"border-sm border-neutral-muted rounded-md\",\n \"bg-neutral-base\",\n \"max-h-[280px] overflow-x-hidden overflow-y-scroll\"\n ])}\n >\n <FolderTree\n focusedFolderId={value}\n onFolderClick={onFolderChange}\n enableCreate={enableCreate}\n />\n </div>\n </div>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,SAASC,EAAE,EAAEC,kBAAkB,QAAQ,kBAAkB;AACzD,SAASC,UAAU;AAUnB,OAAO,MAAMC,YAAY,GAAGA,CAAC;EACzBC,KAAK;EACLC,KAAK;EACLC,QAAQ;EACRC,YAAY,GAAG;AACA,CAAC,KAAK;EACrB,MAAMC,cAAc,GAAGT,WAAW,CAC7BU,MAAiB,IAAK;IACnBH,QAAQ,CAACG,MAAM,CAACC,EAAE,CAAC;EACvB,CAAC,EACD,CAACJ,QAAQ,CACb,CAAC;EAED,oBACIR,KAAA,CAAAa,aAAA,2BACIb,KAAA,CAAAa,aAAA,CAACV,kBAAkB;IAACW,IAAI,EAAER;EAAM,CAAE,CAAC,eACnCN,KAAA,CAAAa,aAAA;IACIE,SAAS,EAAEb,EAAE,CAAC,CACV,yBAAyB,EACzB,2CAA2C,EAC3C,iBAAiB,EACjB,mDAAmD,CACtD;EAAE,gBAEHF,KAAA,CAAAa,aAAA,CAACT,UAAU;IACPY,eAAe,EAAET,KAAM;IACvBU,aAAa,EAAEP,cAAe;IAC9BD,YAAY,EAAEA;EAAa,CAC9B,CACA,CACJ,CAAC;AAEd,CAAC","ignoreList":[]}
|
package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityPresenter.test.js
CHANGED
|
@@ -27,6 +27,7 @@ describe("ColumnsVisibilityPresenter", () => {
|
|
|
27
27
|
header: "Id",
|
|
28
28
|
hideable: true,
|
|
29
29
|
name: "id",
|
|
30
|
+
truncate: true,
|
|
30
31
|
resizable: true,
|
|
31
32
|
size: 200,
|
|
32
33
|
sortable: true,
|
|
@@ -37,6 +38,7 @@ describe("ColumnsVisibilityPresenter", () => {
|
|
|
37
38
|
header: "Title",
|
|
38
39
|
hideable: true,
|
|
39
40
|
name: "title",
|
|
41
|
+
truncate: true,
|
|
40
42
|
resizable: true,
|
|
41
43
|
size: 200,
|
|
42
44
|
sortable: true,
|
|
@@ -47,6 +49,7 @@ describe("ColumnsVisibilityPresenter", () => {
|
|
|
47
49
|
header: "Date",
|
|
48
50
|
hideable: true,
|
|
49
51
|
name: "date",
|
|
52
|
+
truncate: true,
|
|
50
53
|
resizable: true,
|
|
51
54
|
size: 200,
|
|
52
55
|
sortable: true,
|
package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityPresenter.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["describe","it","expect","beforeEach","vi","ColumnsVisibilityPresenter","Column","ColumnsPresenter","ColumnsRepository","ColumnsVisibilityRepository","ColumnsVisibilityDecorator","ColumnsVisibilityUpdater","defaultGateway","get","fn","set","createMockGateway","columnConfigs","cell","className","header","hideable","name","resizable","size","sortable","visible","clearAllMocks","columnsRepo","map","config","createFromConfig","visibilityRepo","repo","columnsPresenter","columnsVisibilityPresenter","init","toBeCalledTimes","vm","toEqual","columnsVisibility","id","title","date","gateway","mockImplementation","columnsVisibilityUpdater","initial","updater","current","update"],"sources":["ColumnsVisibilityPresenter.test.ts"],"sourcesContent":["import { describe, it, expect, beforeEach, vi } from \"vitest\";\nimport { ColumnsVisibilityPresenter } from \"./ColumnsVisibilityPresenter.js\";\nimport { type IColumnsVisibilityGateway } from \"../gateways/index.js\";\nimport { type ColumnConfig } from \"~/config/table/Column.js\";\nimport { Column, ColumnsPresenter, ColumnsRepository } from \"../Columns/index.js\";\nimport { ColumnsVisibilityRepository } from \"./ColumnsVisibilityRepository.js\";\nimport { ColumnsVisibilityDecorator } from \"./ColumnsVisibilityDecorator.js\";\nimport { ColumnsVisibilityUpdater } from \"~/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityUpdater.js\";\n\nconst defaultGateway: IColumnsVisibilityGateway = {\n get: vi.fn<IColumnsVisibilityGateway[\"get\"]>(),\n set: vi.fn<IColumnsVisibilityGateway[\"set\"]>()\n};\n\nconst createMockGateway = ({\n get,\n set\n}: Partial<IColumnsVisibilityGateway>): IColumnsVisibilityGateway => ({\n ...defaultGateway,\n ...(get && { get }),\n ...(set && { set })\n});\n\ndescribe(\"ColumnsVisibilityPresenter\", () => {\n const columnConfigs: ColumnConfig[] = [\n {\n cell: \"Id Cell Content\",\n className: \"id-class\",\n header: \"Id\",\n hideable: true,\n name: \"id\",\n resizable: true,\n size: 200,\n sortable: true,\n visible: true\n },\n {\n cell: \"Title Cell Content\",\n className: \"title-class\",\n header: \"Title\",\n hideable: true,\n name: \"title\",\n resizable: true,\n size: 200,\n sortable: true,\n visible: true\n },\n {\n cell: \"Date Cell Content\",\n className: \"date-class\",\n header: \"Date\",\n hideable: true,\n name: \"date\",\n resizable: true,\n size: 200,\n sortable: true,\n visible: false\n }\n ];\n\n beforeEach(() => {\n vi.clearAllMocks();\n });\n\n it(\"should return the columns visibility from the column config\", async () => {\n // Let's create repositories and presenters\n const columnsRepo = new ColumnsRepository(\n columnConfigs.map(config => Column.createFromConfig(config))\n );\n const visibilityRepo = new ColumnsVisibilityRepository(defaultGateway);\n const repo = new ColumnsVisibilityDecorator(visibilityRepo, columnsRepo);\n\n const columnsPresenter = new ColumnsPresenter(repo);\n const columnsVisibilityPresenter = new ColumnsVisibilityPresenter(columnsPresenter);\n\n // Let's init the ColumnsPresenter\n await columnsPresenter.init();\n\n expect(defaultGateway.get).toBeCalledTimes(1);\n\n expect(columnsVisibilityPresenter.vm).toEqual({\n columnsVisibility: {\n id: true,\n title: true,\n date: false\n }\n });\n });\n\n it(\"should return the columns visibility from both the column configs and the gateway\", async () => {\n // Let's create a mocked gateway\n const gateway = createMockGateway({\n get: vi\n .fn<IColumnsVisibilityGateway[\"get\"]>()\n .mockImplementation(async () => ({ title: false }))\n });\n\n // Let's create repositories and presenters\n const columnsRepo = new ColumnsRepository(\n columnConfigs.map(config => Column.createFromConfig(config))\n );\n const visibilityRepo = new ColumnsVisibilityRepository(gateway);\n const repo = new ColumnsVisibilityDecorator(visibilityRepo, columnsRepo);\n\n const columnsPresenter = new ColumnsPresenter(repo);\n const columnsVisibilityPresenter = new ColumnsVisibilityPresenter(columnsPresenter);\n\n // Let's init the ColumnsPresenter\n await columnsPresenter.init();\n\n expect(gateway.get).toBeCalledTimes(1);\n\n expect(columnsVisibilityPresenter.vm).toEqual({\n columnsVisibility: {\n id: true,\n title: false, // title is defined true in the config, but defined false in the gateway\n date: false\n }\n });\n });\n\n it(\"should be able to update the visibility via `ColumnsVisibilityUpdater`\", async () => {\n // Let's create repositories and presenters\n const columnsRepo = new ColumnsRepository(\n columnConfigs.map(config => Column.createFromConfig(config))\n );\n const visibilityRepo = new ColumnsVisibilityRepository(defaultGateway);\n const repo = new ColumnsVisibilityDecorator(visibilityRepo, columnsRepo);\n\n const columnsPresenter = new ColumnsPresenter(repo);\n const columnsVisibilityPresenter = new ColumnsVisibilityPresenter(columnsPresenter);\n\n // Let's create ColumnsVisibilityUpdater\n const columnsVisibilityUpdater = new ColumnsVisibilityUpdater(visibilityRepo);\n\n // Let's init the ColumnsPresenter\n await columnsPresenter.init();\n\n // Let's check the initial state\n const initial = columnsVisibilityPresenter.vm.columnsVisibility;\n expect(initial).toEqual({\n id: true,\n title: true,\n date: false\n });\n\n // Let's update the visibility\n const updater = vi\n .fn<any>()\n .mockImplementation((current: any) => ({ ...current, title: false }));\n\n await columnsVisibilityUpdater.update(updater);\n\n expect(columnsVisibilityPresenter.vm).toEqual({\n colum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;IACA,MAAMY,wBAAwB,GAAG,IAAInC,wBAAwB,CAACqB,cAAc,CAAC;;IAE7E;IACA,MAAME,gBAAgB,CAACE,IAAI,CAAC,CAAC;;IAE7B;IACA,MAAMW,OAAO,GAAGZ,0BAA0B,CAACG,EAAE,CAACE,iBAAiB;IAC/DtC,MAAM,CAAC6C,OAAO,CAAC,CAACR,OAAO,CAAC;MACpBE,EAAE,EAAE,IAAI;MACRC,KAAK,EAAE,IAAI;MACXC,IAAI,EAAE;IACV,CAAC,CAAC;;IAEF;IACA,MAAMK,OAAO,GAAG5C,EAAE,CACbU,EAAE,CAAM,CAAC,CACT+B,kBAAkB,CAAEI,OAAY,KAAM;MAAE,GAAGA,OAAO;MAAEP,KAAK,EAAE;IAAM,CAAC,CAAC,CAAC;IAEzE,MAAMI,wBAAwB,CAACI,MAAM,CAACF,OAAO,CAAC;IAE9C9C,MAAM,CAACiC,0BAA0B,CAACG,EAAE,CAAC,CAACC,OAAO,CAAC;MAC1CC,iBAAiB,EAAE;QACfC,EAAE,EAAE,IAAI;QACRC,KAAK,EAAE,KAAK;QACZC,IAAI,EAAE;MACV;IACJ,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["describe","it","expect","beforeEach","vi","ColumnsVisibilityPresenter","Column","ColumnsPresenter","ColumnsRepository","ColumnsVisibilityRepository","ColumnsVisibilityDecorator","ColumnsVisibilityUpdater","defaultGateway","get","fn","set","createMockGateway","columnConfigs","cell","className","header","hideable","name","truncate","resizable","size","sortable","visible","clearAllMocks","columnsRepo","map","config","createFromConfig","visibilityRepo","repo","columnsPresenter","columnsVisibilityPresenter","init","toBeCalledTimes","vm","toEqual","columnsVisibility","id","title","date","gateway","mockImplementation","columnsVisibilityUpdater","initial","updater","current","update"],"sources":["ColumnsVisibilityPresenter.test.ts"],"sourcesContent":["import { describe, it, expect, beforeEach, vi } from \"vitest\";\nimport { ColumnsVisibilityPresenter } from \"./ColumnsVisibilityPresenter.js\";\nimport { type IColumnsVisibilityGateway } from \"../gateways/index.js\";\nimport { type ColumnConfig } from \"~/config/table/Column.js\";\nimport { Column, ColumnsPresenter, ColumnsRepository } from \"../Columns/index.js\";\nimport { ColumnsVisibilityRepository } from \"./ColumnsVisibilityRepository.js\";\nimport { ColumnsVisibilityDecorator } from \"./ColumnsVisibilityDecorator.js\";\nimport { ColumnsVisibilityUpdater } from \"~/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityUpdater.js\";\n\nconst defaultGateway: IColumnsVisibilityGateway = {\n get: vi.fn<IColumnsVisibilityGateway[\"get\"]>(),\n set: vi.fn<IColumnsVisibilityGateway[\"set\"]>()\n};\n\nconst createMockGateway = ({\n get,\n set\n}: Partial<IColumnsVisibilityGateway>): IColumnsVisibilityGateway => ({\n ...defaultGateway,\n ...(get && { get }),\n ...(set && { set })\n});\n\ndescribe(\"ColumnsVisibilityPresenter\", () => {\n const columnConfigs: ColumnConfig[] = [\n {\n cell: \"Id Cell Content\",\n className: \"id-class\",\n header: \"Id\",\n hideable: true,\n name: \"id\",\n truncate: true,\n resizable: true,\n size: 200,\n sortable: true,\n visible: true\n },\n {\n cell: \"Title Cell Content\",\n className: \"title-class\",\n header: \"Title\",\n hideable: true,\n name: \"title\",\n truncate: true,\n resizable: true,\n size: 200,\n sortable: true,\n visible: true\n },\n {\n cell: \"Date Cell Content\",\n className: \"date-class\",\n header: \"Date\",\n hideable: true,\n name: \"date\",\n truncate: true,\n resizable: true,\n size: 200,\n sortable: true,\n visible: false\n }\n ];\n\n beforeEach(() => {\n vi.clearAllMocks();\n });\n\n it(\"should return the columns visibility from the column config\", async () => {\n // Let's create repositories and presenters\n const columnsRepo = new ColumnsRepository(\n columnConfigs.map(config => Column.createFromConfig(config))\n );\n const visibilityRepo = new ColumnsVisibilityRepository(defaultGateway);\n const repo = new ColumnsVisibilityDecorator(visibilityRepo, columnsRepo);\n\n const columnsPresenter = new ColumnsPresenter(repo);\n const columnsVisibilityPresenter = new ColumnsVisibilityPresenter(columnsPresenter);\n\n // Let's init the ColumnsPresenter\n await columnsPresenter.init();\n\n expect(defaultGateway.get).toBeCalledTimes(1);\n\n expect(columnsVisibilityPresenter.vm).toEqual({\n columnsVisibility: {\n id: true,\n title: true,\n date: false\n }\n });\n });\n\n it(\"should return the columns visibility from both the column configs and the gateway\", async () => {\n // Let's create a mocked gateway\n const gateway = createMockGateway({\n get: vi\n .fn<IColumnsVisibilityGateway[\"get\"]>()\n .mockImplementation(async () => ({ title: false }))\n });\n\n // Let's create repositories and presenters\n const columnsRepo = new ColumnsRepository(\n columnConfigs.map(config => Column.createFromConfig(config))\n );\n const visibilityRepo = new ColumnsVisibilityRepository(gateway);\n const repo = new ColumnsVisibilityDecorator(visibilityRepo, columnsRepo);\n\n const columnsPresenter = new ColumnsPresenter(repo);\n const columnsVisibilityPresenter = new ColumnsVisibilityPresenter(columnsPresenter);\n\n // Let's init the ColumnsPresenter\n await columnsPresenter.init();\n\n expect(gateway.get).toBeCalledTimes(1);\n\n expect(columnsVisibilityPresenter.vm).toEqual({\n columnsVisibility: {\n id: true,\n title: false, // title is defined true in the config, but defined false in the gateway\n date: false\n }\n });\n });\n\n it(\"should be able to update the visibility via `ColumnsVisibilityUpdater`\", async () => {\n // Let's create repositories and presenters\n const columnsRepo = new ColumnsRepository(\n columnConfigs.map(config => Column.createFromConfig(config))\n );\n const visibilityRepo = new ColumnsVisibilityRepository(defaultGateway);\n const repo = new ColumnsVisibilityDecorator(visibilityRepo, columnsRepo);\n\n const columnsPresenter = new ColumnsPresenter(repo);\n const columnsVisibilityPresenter = new ColumnsVisibilityPresenter(columnsPresenter);\n\n // Let's create ColumnsVisibilityUpdater\n const columnsVisibilityUpdater = new ColumnsVisibilityUpdater(visibilityRepo);\n\n // Let's init the ColumnsPresenter\n await columnsPresenter.init();\n\n // Let's check the initial state\n const initial = columnsVisibilityPresenter.vm.columnsVisibility;\n expect(initial).toEqual({\n id: true,\n title: true,\n date: false\n });\n\n // Let's update the visibility\n const updater = vi\n .fn<any>()\n .mockImplementation((current: any) => ({ ...current, title: false }));\n\n await columnsVisibilityUpdater.update(updater);\n\n expect(columnsVisibilityPresenter.vm).toEqual({\n columnsVisibility: {\n id: true,\n title: false,\n date: false\n }\n });\n });\n});\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,EAAE,EAAEC,MAAM,EAAEC,UAAU,EAAEC,EAAE,QAAQ,QAAQ;AAC7D,SAASC,0BAA0B;AAGnC,SAASC,MAAM,EAAEC,gBAAgB,EAAEC,iBAAiB;AACpD,SAASC,2BAA2B;AACpC,SAASC,0BAA0B;AACnC,SAASC,wBAAwB;AAEjC,MAAMC,cAAyC,GAAG;EAC9CC,GAAG,EAAET,EAAE,CAACU,EAAE,CAAmC,CAAC;EAC9CC,GAAG,EAAEX,EAAE,CAACU,EAAE,CAAmC;AACjD,CAAC;AAED,MAAME,iBAAiB,GAAGA,CAAC;EACvBH,GAAG;EACHE;AACgC,CAAC,MAAiC;EAClE,GAAGH,cAAc;EACjB,IAAIC,GAAG,IAAI;IAAEA;EAAI,CAAC,CAAC;EACnB,IAAIE,GAAG,IAAI;IAAEA;EAAI,CAAC;AACtB,CAAC,CAAC;AAEFf,QAAQ,CAAC,4BAA4B,EAAE,MAAM;EACzC,MAAMiB,aAA6B,GAAG,CAClC;IACIC,IAAI,EAAE,iBAAiB;IACvBC,SAAS,EAAE,UAAU;IACrBC,MAAM,EAAE,IAAI;IACZC,QAAQ,EAAE,IAAI;IACdC,IAAI,EAAE,IAAI;IACVC,QAAQ,EAAE,IAAI;IACdC,SAAS,EAAE,IAAI;IACfC,IAAI,EAAE,GAAG;IACTC,QAAQ,EAAE,IAAI;IACdC,OAAO,EAAE;EACb,CAAC,EACD;IACIT,IAAI,EAAE,oBAAoB;IAC1BC,SAAS,EAAE,aAAa;IACxBC,MAAM,EAAE,OAAO;IACfC,QAAQ,EAAE,IAAI;IACdC,IAAI,EAAE,OAAO;IACbC,QAAQ,EAAE,I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,MAAMsB,IAAI,GAAG,IAAIxB,0BAA0B,CAACuB,cAAc,EAAEJ,WAAW,CAAC;IAExE,MAAMM,gBAAgB,GAAG,IAAI5B,gBAAgB,CAAC2B,IAAI,CAAC;IACnD,MAAME,0BAA0B,GAAG,IAAI/B,0BAA0B,CAAC8B,gBAAgB,CAAC;;IAEnF;IACA,MAAMY,wBAAwB,GAAG,IAAIpC,wBAAwB,CAACsB,cAAc,CAAC;;IAE7E;IACA,MAAME,gBAAgB,CAACE,IAAI,CAAC,CAAC;;IAE7B;IACA,MAAMW,OAAO,GAAGZ,0BAA0B,CAACG,EAAE,CAACE,iBAAiB;IAC/DvC,MAAM,CAAC8C,OAAO,CAAC,CAACR,OAAO,CAAC;MACpBE,EAAE,EAAE,IAAI;MACRC,KAAK,EAAE,IAAI;MACXC,IAAI,EAAE;IACV,CAAC,CAAC;;IAEF;IACA,MAAMK,OAAO,GAAG7C,EAAE,CACbU,EAAE,CAAM,CAAC,CACTgC,kBAAkB,CAAEI,OAAY,KAAM;MAAE,GAAGA,OAAO;MAAEP,KAAK,EAAE;IAAM,CAAC,CAAC,CAAC;IAEzE,MAAMI,wBAAwB,CAACI,MAAM,CAACF,OAAO,CAAC;IAE9C/C,MAAM,CAACkC,0BAA0B,CAACG,EAAE,CAAC,CAACC,OAAO,CAAC;MAC1CC,iBAAiB,EAAE;QACfC,EAAE,EAAE,IAAI;QACRC,KAAK,EAAE,KAAK;QACZC,IAAI,EAAE;MACV;IACJ,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
|
@@ -10,6 +10,7 @@ export interface ColumnDTO {
|
|
|
10
10
|
resizable: boolean;
|
|
11
11
|
size: number;
|
|
12
12
|
sortable: boolean;
|
|
13
|
+
truncate: boolean;
|
|
13
14
|
visible: boolean;
|
|
14
15
|
}
|
|
15
16
|
export declare class Column {
|
|
@@ -22,6 +23,7 @@ export declare class Column {
|
|
|
22
23
|
resizable: boolean;
|
|
23
24
|
size: number;
|
|
24
25
|
sortable: boolean;
|
|
26
|
+
truncate: boolean;
|
|
25
27
|
visible: boolean;
|
|
26
28
|
static createFromConfig(config: ColumnConfig): Column;
|
|
27
29
|
protected constructor(data: {
|
|
@@ -33,6 +35,7 @@ export declare class Column {
|
|
|
33
35
|
hideable?: boolean;
|
|
34
36
|
path?: string;
|
|
35
37
|
sortable?: boolean;
|
|
38
|
+
truncate?: boolean;
|
|
36
39
|
resizable?: boolean;
|
|
37
40
|
visible?: boolean;
|
|
38
41
|
});
|
|
@@ -11,6 +11,7 @@ export class Column {
|
|
|
11
11
|
this.hideable = data.hideable ?? true;
|
|
12
12
|
this.path = data.path || "";
|
|
13
13
|
this.sortable = data.sortable ?? false;
|
|
14
|
+
this.truncate = data.truncate ?? true;
|
|
14
15
|
this.resizable = data.resizable ?? true;
|
|
15
16
|
this.visible = data.visible ?? true;
|
|
16
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Column","createFromConfig","config","constructor","data","name","header","cell","size","className","hideable","path","sortable","resizable","visible"],"sources":["Column.ts"],"sourcesContent":["import type { ReactElement } from \"react\";\nimport type { ColumnConfig } from \"~/config/table/Column.js\";\n\nexport interface ColumnDTO {\n cell: string | ReactElement;\n className: string;\n header: string | number | React.JSX.Element;\n hideable: boolean;\n name: string;\n path?: string;\n resizable: boolean;\n size: number;\n sortable: boolean;\n visible: boolean;\n}\n\nexport class Column {\n public cell: string | ReactElement;\n public className: string;\n public header: string | number | React.JSX.Element;\n public hideable: boolean;\n public name: string;\n public path?: string;\n public resizable: boolean;\n public size: number;\n public sortable: boolean;\n public visible: boolean;\n\n static createFromConfig(config: ColumnConfig) {\n return new Column(config);\n }\n\n protected constructor(data: {\n name: string;\n header: string | number | React.JSX.Element;\n cell: string | ReactElement;\n size?: number;\n className?: string;\n hideable?: boolean;\n path?: string;\n sortable?: boolean;\n resizable?: boolean;\n visible?: boolean;\n }) {\n this.name = data.name;\n this.header = data.header;\n this.cell = data.cell;\n this.size = data.size || 100;\n this.className = data.className || \"\";\n this.hideable = data.hideable ?? true;\n this.path = data.path || \"\";\n this.sortable = data.sortable ?? false;\n this.resizable = data.resizable ?? true;\n this.visible = data.visible ?? true;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["Column","createFromConfig","config","constructor","data","name","header","cell","size","className","hideable","path","sortable","truncate","resizable","visible"],"sources":["Column.ts"],"sourcesContent":["import type { ReactElement } from \"react\";\nimport type { ColumnConfig } from \"~/config/table/Column.js\";\n\nexport interface ColumnDTO {\n cell: string | ReactElement;\n className: string;\n header: string | number | React.JSX.Element;\n hideable: boolean;\n name: string;\n path?: string;\n resizable: boolean;\n size: number;\n sortable: boolean;\n truncate: boolean;\n visible: boolean;\n}\n\nexport class Column {\n public cell: string | ReactElement;\n public className: string;\n public header: string | number | React.JSX.Element;\n public hideable: boolean;\n public name: string;\n public path?: string;\n public resizable: boolean;\n public size: number;\n public sortable: boolean;\n public truncate: boolean;\n public visible: boolean;\n\n static createFromConfig(config: ColumnConfig) {\n return new Column(config);\n }\n\n protected constructor(data: {\n name: string;\n header: string | number | React.JSX.Element;\n cell: string | ReactElement;\n size?: number;\n className?: string;\n hideable?: boolean;\n path?: string;\n sortable?: boolean;\n truncate?: boolean;\n resizable?: boolean;\n visible?: boolean;\n }) {\n this.name = data.name;\n this.header = data.header;\n this.cell = data.cell;\n this.size = data.size || 100;\n this.className = data.className || \"\";\n this.hideable = data.hideable ?? true;\n this.path = data.path || \"\";\n this.sortable = data.sortable ?? false;\n this.truncate = data.truncate ?? true;\n this.resizable = data.resizable ?? true;\n this.visible = data.visible ?? true;\n }\n}\n"],"mappings":"AAiBA,OAAO,MAAMA,MAAM,CAAC;EAahB,OAAOC,gBAAgBA,CAACC,MAAoB,EAAE;IAC1C,OAAO,IAAIF,MAAM,CAACE,MAAM,CAAC;EAC7B;EAEUC,WAAWA,CAACC,IAYrB,EAAE;IACC,IAAI,CAACC,IAAI,GAAGD,IAAI,CAACC,IAAI;IACrB,IAAI,CAACC,MAAM,GAAGF,IAAI,CAACE,MAAM;IACzB,IAAI,CAACC,IAAI,GAAGH,IAAI,CAACG,IAAI;IACrB,IAAI,CAACC,IAAI,GAAGJ,IAAI,CAACI,IAAI,IAAI,GAAG;IAC5B,IAAI,CAACC,SAAS,GAAGL,IAAI,CAACK,SAAS,IAAI,EAAE;IACrC,IAAI,CAACC,QAAQ,GAAGN,IAAI,CAACM,QAAQ,IAAI,IAAI;IACrC,IAAI,CAACC,IAAI,GAAGP,IAAI,CAACO,IAAI,IAAI,EAAE;IAC3B,IAAI,CAACC,QAAQ,GAAGR,IAAI,CAACQ,QAAQ,IAAI,KAAK;IACtC,IAAI,CAACC,QAAQ,GAAGT,IAAI,CAACS,QAAQ,IAAI,IAAI;IACrC,IAAI,CAACC,SAAS,GAAGV,IAAI,CAACU,SAAS,IAAI,IAAI;IACvC,IAAI,CAACC,OAAO,GAAGX,IAAI,CAACW,OAAO,IAAI,IAAI;EACvC;AACJ","ignoreList":[]}
|
|
@@ -10,6 +10,7 @@ export class ColumnMapper {
|
|
|
10
10
|
resizable: column.resizable,
|
|
11
11
|
size: column.size,
|
|
12
12
|
sortable: column.sortable,
|
|
13
|
+
truncate: column.truncate,
|
|
13
14
|
visible: column.visible
|
|
14
15
|
};
|
|
15
16
|
}
|
|
@@ -24,6 +25,7 @@ export class ColumnMapper {
|
|
|
24
25
|
enableHiding: column.hideable,
|
|
25
26
|
enableResizing: column.resizable,
|
|
26
27
|
enableSorting: column.sortable,
|
|
28
|
+
truncate: column.truncate,
|
|
27
29
|
cell: column.cell ? row => cellRenderer(row, column.cell) : undefined
|
|
28
30
|
};
|
|
29
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ColumnMapper","toDTO","column","cell","className","header","hideable","name","path","resizable","size","sortable","visible","toDataTable","cellRenderer","accessorKey","undefined","enableHiding","enableResizing","enableSorting","row"],"sources":["ColumnMapper.ts"],"sourcesContent":["import type React from \"react\";\nimport type { DataTableColumn } from \"@webiny/admin-ui\";\nimport type { Column, ColumnDTO } from \"./Column.js\";\n\nexport class ColumnMapper {\n static toDTO(column: Column | ColumnDTO): ColumnDTO {\n return {\n cell: column.cell,\n className: column.className,\n header: column.header,\n hideable: column.hideable,\n name: column.name,\n path: column.path,\n resizable: column.resizable,\n size: column.size,\n sortable: column.sortable,\n visible: column.visible\n };\n }\n\n static toDataTable<T>(\n column: ColumnDTO,\n cellRenderer: (\n row: T,\n cell: string | React.ReactElement\n ) => string | number | React.JSX.Element | null\n ): DataTableColumn<T> {\n // Prefix path with \"data.\" if provided.\n const accessorKey = column.path ? `data.${column.path}` : undefined;\n\n return {\n accessorKey,\n header: column.header,\n className: column.className,\n size: column.size,\n enableHiding: column.hideable,\n enableResizing: column.resizable,\n enableSorting: column.sortable,\n cell: column.cell ? (row: T) => cellRenderer(row, column.cell) : undefined\n };\n }\n}\n"],"mappings":"AAIA,OAAO,MAAMA,YAAY,CAAC;EACtB,OAAOC,KAAKA,CAACC,MAA0B,EAAa;IAChD,OAAO;MACHC,IAAI,EAAED,MAAM,CAACC,IAAI;MACjBC,SAAS,EAAEF,MAAM,CAACE,SAAS;MAC3BC,MAAM,EAAEH,MAAM,CAACG,MAAM;MACrBC,QAAQ,EAAEJ,MAAM,CAACI,QAAQ;MACzBC,IAAI,EAAEL,MAAM,CAACK,IAAI;MACjBC,IAAI,EAAEN,MAAM,CAACM,IAAI;MACjBC,SAAS,EAAEP,MAAM,CAACO,SAAS;MAC3BC,IAAI,EAAER,MAAM,CAACQ,IAAI;MACjBC,QAAQ,EAAET,MAAM,CAACS,QAAQ;MACzBC,
|
|
1
|
+
{"version":3,"names":["ColumnMapper","toDTO","column","cell","className","header","hideable","name","path","resizable","size","sortable","truncate","visible","toDataTable","cellRenderer","accessorKey","undefined","enableHiding","enableResizing","enableSorting","row"],"sources":["ColumnMapper.ts"],"sourcesContent":["import type React from \"react\";\nimport type { DataTableColumn } from \"@webiny/admin-ui\";\nimport type { Column, ColumnDTO } from \"./Column.js\";\n\nexport class ColumnMapper {\n static toDTO(column: Column | ColumnDTO): ColumnDTO {\n return {\n cell: column.cell,\n className: column.className,\n header: column.header,\n hideable: column.hideable,\n name: column.name,\n path: column.path,\n resizable: column.resizable,\n size: column.size,\n sortable: column.sortable,\n truncate: column.truncate,\n visible: column.visible\n };\n }\n\n static toDataTable<T>(\n column: ColumnDTO,\n cellRenderer: (\n row: T,\n cell: string | React.ReactElement\n ) => string | number | React.JSX.Element | null\n ): DataTableColumn<T> {\n // Prefix path with \"data.\" if provided.\n const accessorKey = column.path ? `data.${column.path}` : undefined;\n\n return {\n accessorKey,\n header: column.header,\n className: column.className,\n size: column.size,\n enableHiding: column.hideable,\n enableResizing: column.resizable,\n enableSorting: column.sortable,\n truncate: column.truncate,\n cell: column.cell ? (row: T) => cellRenderer(row, column.cell) : undefined\n };\n }\n}\n"],"mappings":"AAIA,OAAO,MAAMA,YAAY,CAAC;EACtB,OAAOC,KAAKA,CAACC,MAA0B,EAAa;IAChD,OAAO;MACHC,IAAI,EAAED,MAAM,CAACC,IAAI;MACjBC,SAAS,EAAEF,MAAM,CAACE,SAAS;MAC3BC,MAAM,EAAEH,MAAM,CAACG,MAAM;MACrBC,QAAQ,EAAEJ,MAAM,CAACI,QAAQ;MACzBC,IAAI,EAAEL,MAAM,CAACK,IAAI;MACjBC,IAAI,EAAEN,MAAM,CAACM,IAAI;MACjBC,SAAS,EAAEP,MAAM,CAACO,SAAS;MAC3BC,IAAI,EAAER,MAAM,CAACQ,IAAI;MACjBC,QAAQ,EAAET,MAAM,CAACS,QAAQ;MACzBC,QAAQ,EAAEV,MAAM,CAACU,QAAQ;MACzBC,OAAO,EAAEX,MAAM,CAACW;IACpB,CAAC;EACL;EAEA,OAAOC,WAAWA,CACdZ,MAAiB,EACjBa,YAG+C,EAC7B;IAClB;IACA,MAAMC,WAAW,GAAGd,MAAM,CAACM,IAAI,GAAG,QAAQN,MAAM,CAACM,IAAI,EAAE,GAAGS,SAAS;IAEnE,OAAO;MACHD,WAAW;MACXX,MAAM,EAAEH,MAAM,CAACG,MAAM;MACrBD,SAAS,EAAEF,MAAM,CAACE,SAAS;MAC3BM,IAAI,EAAER,MAAM,CAACQ,IAAI;MACjBQ,YAAY,EAAEhB,MAAM,CAACI,QAAQ;MAC7Ba,cAAc,EAAEjB,MAAM,CAACO,SAAS;MAChCW,aAAa,EAAElB,MAAM,CAACS,QAAQ;MAC9BC,QAAQ,EAAEV,MAAM,CAACU,QAAQ;MACzBT,IAAI,EAAED,MAAM,CAACC,IAAI,GAAIkB,GAAM,IAAKN,YAAY,CAACM,GAAG,EAAEnB,MAAM,CAACC,IAAI,CAAC,GAAGc;IACrE,CAAC;EACL;AACJ","ignoreList":[]}
|
|
@@ -10,6 +10,7 @@ describe("ColumnsPresenter", () => {
|
|
|
10
10
|
hideable: true,
|
|
11
11
|
name: "id",
|
|
12
12
|
resizable: true,
|
|
13
|
+
truncate: true,
|
|
13
14
|
size: 200,
|
|
14
15
|
sortable: true,
|
|
15
16
|
visible: true
|
|
@@ -20,6 +21,7 @@ describe("ColumnsPresenter", () => {
|
|
|
20
21
|
hideable: false,
|
|
21
22
|
name: "title",
|
|
22
23
|
resizable: false,
|
|
24
|
+
truncate: true,
|
|
23
25
|
size: 100,
|
|
24
26
|
sortable: false,
|
|
25
27
|
visible: false
|
|
@@ -43,6 +45,7 @@ describe("ColumnsPresenter", () => {
|
|
|
43
45
|
resizable: true,
|
|
44
46
|
size: 200,
|
|
45
47
|
sortable: true,
|
|
48
|
+
truncate: true,
|
|
46
49
|
visible: true
|
|
47
50
|
}, {
|
|
48
51
|
cell: "Title Cell Content",
|
|
@@ -54,6 +57,7 @@ describe("ColumnsPresenter", () => {
|
|
|
54
57
|
resizable: false,
|
|
55
58
|
size: 100,
|
|
56
59
|
sortable: false,
|
|
60
|
+
truncate: true,
|
|
57
61
|
visible: false
|
|
58
62
|
}]
|
|
59
63
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["describe","it","expect","beforeEach","vi","ColumnsPresenter","Column","ColumnsRepository","columnConfigs","cell","className","header","hideable","name","resizable","size","sortable","visible","presenter","clearAllMocks","repository","map","config","createFromConfig","init","vm","toEqual","columns","path"],"sources":["ColumnsPresenter.test.ts"],"sourcesContent":["import { describe, it, expect, beforeEach, vi } from \"vitest\";\nimport { ColumnsPresenter } from \"./ColumnsPresenter.js\";\nimport { Column } from \"./Column.js\";\nimport type { ColumnConfig } from \"~/config/table/Column.js\";\nimport { ColumnsRepository } from \"./ColumnsRepository.js\";\n\ndescribe(\"ColumnsPresenter\", () => {\n const columnConfigs: ColumnConfig[] = [\n {\n cell: \"Id Cell Content\",\n className: \"id-class\",\n header: \"Id\",\n hideable: true,\n name: \"id\",\n resizable: true,\n size: 200,\n sortable: true,\n visible: true\n },\n {\n cell: \"Title Cell Content\",\n className: \"title-class\",\n header: \"Title\",\n hideable: false,\n name: \"title\",\n resizable: false,\n size: 100,\n sortable: false,\n visible: false\n }\n ];\n\n let presenter: ColumnsPresenter;\n\n beforeEach(() => {\n vi.clearAllMocks();\n const repository = new ColumnsRepository(\n columnConfigs.map(config => Column.createFromConfig(config))\n );\n presenter = new ColumnsPresenter(repository);\n });\n\n it(\"should `init` and return the columns via `vm`\", () => {\n presenter.init();\n\n expect(presenter.vm).toEqual({\n columns: [\n {\n cell: \"Id Cell Content\",\n className: \"id-class\",\n header: \"Id\",\n hideable: true,\n name: \"id\",\n path: \"\",\n resizable: true,\n size: 200,\n sortable: true,\n visible: true\n },\n {\n cell: \"Title Cell Content\",\n className: \"title-class\",\n header: \"Title\",\n hideable: false,\n name: \"title\",\n path: \"\",\n resizable: false,\n size: 100,\n sortable: false,\n visible: false\n }\n ]\n });\n });\n});\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,EAAE,EAAEC,MAAM,EAAEC,UAAU,EAAEC,EAAE,QAAQ,QAAQ;AAC7D,SAASC,gBAAgB;AACzB,SAASC,MAAM;AAEf,SAASC,iBAAiB;AAE1BP,QAAQ,CAAC,kBAAkB,EAAE,MAAM;EAC/B,MAAMQ,aAA6B,GAAG,CAClC;IACIC,IAAI,EAAE,iBAAiB;IACvBC,SAAS,EAAE,UAAU;IACrBC,MAAM,EAAE,IAAI;IACZC,QAAQ,EAAE,IAAI;IACdC,IAAI,EAAE,IAAI;IACVC,SAAS,EAAE,IAAI;IACfC,IAAI,EAAE,GAAG;IACTC,QAAQ,EAAE,IAAI;IACdC,OAAO,EAAE;EACb,CAAC,EACD;
|
|
1
|
+
{"version":3,"names":["describe","it","expect","beforeEach","vi","ColumnsPresenter","Column","ColumnsRepository","columnConfigs","cell","className","header","hideable","name","resizable","truncate","size","sortable","visible","presenter","clearAllMocks","repository","map","config","createFromConfig","init","vm","toEqual","columns","path"],"sources":["ColumnsPresenter.test.ts"],"sourcesContent":["import { describe, it, expect, beforeEach, vi } from \"vitest\";\nimport { ColumnsPresenter } from \"./ColumnsPresenter.js\";\nimport { Column } from \"./Column.js\";\nimport type { ColumnConfig } from \"~/config/table/Column.js\";\nimport { ColumnsRepository } from \"./ColumnsRepository.js\";\n\ndescribe(\"ColumnsPresenter\", () => {\n const columnConfigs: ColumnConfig[] = [\n {\n cell: \"Id Cell Content\",\n className: \"id-class\",\n header: \"Id\",\n hideable: true,\n name: \"id\",\n resizable: true,\n truncate: true,\n size: 200,\n sortable: true,\n visible: true\n },\n {\n cell: \"Title Cell Content\",\n className: \"title-class\",\n header: \"Title\",\n hideable: false,\n name: \"title\",\n resizable: false,\n truncate: true,\n size: 100,\n sortable: false,\n visible: false\n }\n ];\n\n let presenter: ColumnsPresenter;\n\n beforeEach(() => {\n vi.clearAllMocks();\n const repository = new ColumnsRepository(\n columnConfigs.map(config => Column.createFromConfig(config))\n );\n presenter = new ColumnsPresenter(repository);\n });\n\n it(\"should `init` and return the columns via `vm`\", () => {\n presenter.init();\n\n expect(presenter.vm).toEqual({\n columns: [\n {\n cell: \"Id Cell Content\",\n className: \"id-class\",\n header: \"Id\",\n hideable: true,\n name: \"id\",\n path: \"\",\n resizable: true,\n size: 200,\n sortable: true,\n truncate: true,\n visible: true\n },\n {\n cell: \"Title Cell Content\",\n className: \"title-class\",\n header: \"Title\",\n hideable: false,\n name: \"title\",\n path: \"\",\n resizable: false,\n size: 100,\n sortable: false,\n truncate: true,\n visible: false\n }\n ]\n });\n });\n});\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,EAAE,EAAEC,MAAM,EAAEC,UAAU,EAAEC,EAAE,QAAQ,QAAQ;AAC7D,SAASC,gBAAgB;AACzB,SAASC,MAAM;AAEf,SAASC,iBAAiB;AAE1BP,QAAQ,CAAC,kBAAkB,EAAE,MAAM;EAC/B,MAAMQ,aAA6B,GAAG,CAClC;IACIC,IAAI,EAAE,iBAAiB;IACvBC,SAAS,EAAE,UAAU;IACrBC,MAAM,EAAE,IAAI;IACZC,QAAQ,EAAE,IAAI;IACdC,IAAI,EAAE,IAAI;IACVC,SAAS,EAAE,IAAI;IACfC,QAAQ,EAAE,IAAI;IACdC,IAAI,EAAE,GAAG;IACTC,QAAQ,EAAE,IAAI;IACdC,OAAO,EAAE;EACb,CAAC,EACD;IACIT,IAAI,EAAE,oBAAoB;IAC1BC,SAAS,EAAE,aAAa;IACxBC,MAAM,EAAE,OAAO;IACfC,QAAQ,EAAE,KAAK;IACfC,IAAI,EAAE,OAAO;IACbC,SAAS,EAAE,KAAK;IAChBC,QAAQ,EAAE,IAAI;IACdC,IAAI,EAAE,GAAG;IACTC,QAAQ,EAAE,KAAK;IACfC,OAAO,EAAE;EACb,CAAC,CACJ;EAED,IAAIC,SAA2B;EAE/BhB,UAAU,CAAC,MAAM;IACbC,EAAE,CAACgB,aAAa,CAAC,CAAC;IAClB,MAAMC,UAAU,GAAG,IAAId,iBAAiB,CACpCC,aAAa,CAACc,GAAG,CAACC,MAAM,IAAIjB,MAAM,CAACkB,gBAAgB,CAACD,MAAM,CAAC,CAC/D,CAAC;IACDJ,SAAS,GAAG,IAAId,gBAAgB,CAACgB,UAAU,CAAC;EAChD,CAAC,CAAC;EAEFpB,EAAE,CAAC,+CAA+C,EAAE,MAAM;IACtDkB,SAAS,CAACM,IAAI,CAAC,CAAC;IAEhBvB,MAAM,CAACiB,SAAS,CAACO,EAAE,CAAC,CAACC,OAAO,CAAC;MACzBC,OAAO,EAAE,CACL;QACInB,IAAI,EAAE,iBAAiB;QACvBC,SAAS,EAAE,UAAU;QACrBC,MAAM,EAAE,IAAI;QACZC,QAAQ,EAAE,IAAI;QACdC,IAAI,EAAE,IAAI;QACVgB,IAAI,EAAE,EAAE;QACRf,SAAS,EAAE,IAAI;QACfE,IAAI,EAAE,GAAG;QACTC,QAAQ,EAAE,IAAI;QACdF,QAAQ,EAAE,IAAI;QACdG,OAAO,EAAE;MACb,CAAC,EACD;QACIT,IAAI,EAAE,oBAAoB;QAC1BC,SAAS,EAAE,aAAa;QACxBC,MAAM,EAAE,OAAO;QACfC,QAAQ,EAAE,KAAK;QACfC,IAAI,EAAE,OAAO;QACbgB,IAAI,EAAE,EAAE;QACRf,SAAS,EAAE,KAAK;QAChBE,IAAI,EAAE,GAAG;QACTC,QAAQ,EAAE,KAAK;QACfF,QAAQ,EAAE,IAAI;QACdG,OAAO,EAAE;MACb,CAAC;IAET,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
package/components/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export * from "./Extensions/index.js";
|
|
|
4
4
|
export * from "./FolderGrid/index.js";
|
|
5
5
|
export * from "./FolderIcons/index.js";
|
|
6
6
|
export * from "./FolderTree/index.js";
|
|
7
|
+
export * from "./FolderPicker/FolderPicker.js";
|
|
7
8
|
export * from "./Search/index.js";
|
|
8
9
|
export * from "./Table/index.js";
|
package/components/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./Extensions/index.js";
|
|
|
4
4
|
export * from "./FolderGrid/index.js";
|
|
5
5
|
export * from "./FolderIcons/index.js";
|
|
6
6
|
export * from "./FolderTree/index.js";
|
|
7
|
+
export * from "./FolderPicker/FolderPicker.js";
|
|
7
8
|
export * from "./Search/index.js";
|
|
8
9
|
export * from "./Table/index.js";
|
|
9
10
|
|
package/components/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export * from \"./Actions/index.js\";\nexport * from \"./AdvancedSearch/index.js\";\nexport * from \"./Extensions/index.js\";\nexport * from \"./FolderGrid/index.js\";\nexport * from \"./FolderIcons/index.js\";\nexport * from \"./FolderTree/index.js\";\nexport * from \"./Search/index.js\";\nexport * from \"./Table/index.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export * from \"./Actions/index.js\";\nexport * from \"./AdvancedSearch/index.js\";\nexport * from \"./Extensions/index.js\";\nexport * from \"./FolderGrid/index.js\";\nexport * from \"./FolderIcons/index.js\";\nexport * from \"./FolderTree/index.js\";\nexport * from \"./FolderPicker/FolderPicker.js\";\nexport * from \"./Search/index.js\";\nexport * from \"./Table/index.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
package/config/table/Column.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface ColumnConfig {
|
|
|
10
10
|
resizable: boolean;
|
|
11
11
|
size: number;
|
|
12
12
|
sortable: boolean;
|
|
13
|
+
truncate: boolean;
|
|
13
14
|
visible: boolean;
|
|
14
15
|
}
|
|
15
16
|
export interface ColumnProps {
|
|
@@ -17,6 +18,7 @@ export interface ColumnProps {
|
|
|
17
18
|
before?: string;
|
|
18
19
|
cell?: string | ReactElement;
|
|
19
20
|
className?: string;
|
|
21
|
+
truncate?: boolean;
|
|
20
22
|
header?: string | ReactElement;
|
|
21
23
|
hideable?: boolean;
|
|
22
24
|
name: string;
|
package/config/table/Column.js
CHANGED
|
@@ -8,6 +8,7 @@ const BaseColumn = ({
|
|
|
8
8
|
className = undefined,
|
|
9
9
|
header = undefined,
|
|
10
10
|
hideable = true,
|
|
11
|
+
truncate = true,
|
|
11
12
|
name,
|
|
12
13
|
path = "",
|
|
13
14
|
remove = false,
|
|
@@ -45,6 +46,10 @@ const BaseColumn = ({
|
|
|
45
46
|
id: getId(name, "resizable"),
|
|
46
47
|
name: "resizable",
|
|
47
48
|
value: resizable
|
|
49
|
+
}), /*#__PURE__*/React.createElement(Property, {
|
|
50
|
+
id: getId(name, "truncate"),
|
|
51
|
+
name: "truncate",
|
|
52
|
+
value: truncate
|
|
48
53
|
}), /*#__PURE__*/React.createElement(Property, {
|
|
49
54
|
id: getId(name, "hideable"),
|
|
50
55
|
name: "hideable",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Property","useIdGenerator","createUseTableRow","BaseColumn","after","undefined","before","cell","className","header","hideable","name","path","remove","resizable","size","sortable","visible","getId","placeAfter","placeBefore","createElement","id","array","value","isFolderRow","row","$type","Column","Object","assign"],"sources":["Column.tsx"],"sourcesContent":["import type { ReactElement } from \"react\";\nimport React from \"react\";\nimport { Property, useIdGenerator } from \"@webiny/react-properties\";\nimport { createUseTableRow } from \"~/components/Table/useTableRow.js\";\nimport type { FolderTableRow, TableRow } from \"~/table.types.js\";\n\nexport interface ColumnConfig {\n cell: string | ReactElement;\n className: string;\n header: string | ReactElement;\n hideable: boolean;\n name: string;\n resizable: boolean;\n size: number;\n sortable: boolean;\n visible: boolean;\n}\n\nexport interface ColumnProps {\n after?: string;\n before?: string;\n cell?: string | ReactElement;\n className?: string;\n header?: string | ReactElement;\n hideable?: boolean;\n name: string;\n path?: string;\n remove?: boolean;\n resizable?: boolean;\n size?: number;\n sortable?: boolean;\n visible?: boolean;\n}\n\nconst BaseColumn: React.FC<ColumnProps> = ({\n after = undefined,\n before = undefined,\n cell,\n className = undefined,\n header = undefined,\n hideable = true,\n name,\n path = \"\",\n remove = false,\n resizable = true,\n size = 100,\n sortable = false,\n visible = true\n}) => {\n const getId = useIdGenerator(\"tableColumn\");\n\n const placeAfter = after !== undefined ? getId(after) : undefined;\n const placeBefore = before !== undefined ? getId(before) : undefined;\n\n return (\n <Property id=\"table\" name={\"table\"}>\n <Property\n id={getId(name)}\n name={\"columns\"}\n remove={remove}\n array={true}\n before={placeBefore}\n after={placeAfter}\n >\n <Property id={getId(name, \"name\")} name={\"name\"} value={name} />\n <Property id={getId(name, \"path\")} name={\"path\"} value={path} />\n <Property id={getId(name, \"sortable\")} name={\"sortable\"} value={sortable} />\n <Property id={getId(name, \"resizable\")} name={\"resizable\"} value={resizable} />\n <Property id={getId(name, \"hideable\")} name={\"hideable\"} value={hideable} />\n <Property id={getId(name, \"size\")} name={\"size\"} value={size} />\n <Property id={getId(name, \"visible\")} name={\"visible\"} value={visible} />\n {header ? (\n <Property id={getId(name, \"header\")} name={\"header\"} value={header} />\n ) : null}\n {cell ? <Property id={getId(name, \"cell\")} name={\"cell\"} value={cell} /> : null}\n {className ? (\n <Property id={getId(name, \"className\")} name={\"className\"} value={className} />\n ) : null}\n </Property>\n </Property>\n );\n};\n\nconst isFolderRow = (row: TableRow): row is FolderTableRow => {\n return row.$type === \"FOLDER\";\n};\n\nexport const Column = Object.assign(BaseColumn, { isFolderRow, createUseTableRow });\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,cAAc,QAAQ,0BAA0B;AACnE,SAASC,iBAAiB;
|
|
1
|
+
{"version":3,"names":["React","Property","useIdGenerator","createUseTableRow","BaseColumn","after","undefined","before","cell","className","header","hideable","truncate","name","path","remove","resizable","size","sortable","visible","getId","placeAfter","placeBefore","createElement","id","array","value","isFolderRow","row","$type","Column","Object","assign"],"sources":["Column.tsx"],"sourcesContent":["import type { ReactElement } from \"react\";\nimport React from \"react\";\nimport { Property, useIdGenerator } from \"@webiny/react-properties\";\nimport { createUseTableRow } from \"~/components/Table/useTableRow.js\";\nimport type { FolderTableRow, TableRow } from \"~/table.types.js\";\n\nexport interface ColumnConfig {\n cell: string | ReactElement;\n className: string;\n header: string | ReactElement;\n hideable: boolean;\n name: string;\n resizable: boolean;\n size: number;\n sortable: boolean;\n truncate: boolean;\n visible: boolean;\n}\n\nexport interface ColumnProps {\n after?: string;\n before?: string;\n cell?: string | ReactElement;\n className?: string;\n truncate?: boolean;\n header?: string | ReactElement;\n hideable?: boolean;\n name: string;\n path?: string;\n remove?: boolean;\n resizable?: boolean;\n size?: number;\n sortable?: boolean;\n visible?: boolean;\n}\n\nconst BaseColumn: React.FC<ColumnProps> = ({\n after = undefined,\n before = undefined,\n cell,\n className = undefined,\n header = undefined,\n hideable = true,\n truncate = true,\n name,\n path = \"\",\n remove = false,\n resizable = true,\n size = 100,\n sortable = false,\n visible = true\n}) => {\n const getId = useIdGenerator(\"tableColumn\");\n\n const placeAfter = after !== undefined ? getId(after) : undefined;\n const placeBefore = before !== undefined ? getId(before) : undefined;\n\n return (\n <Property id=\"table\" name={\"table\"}>\n <Property\n id={getId(name)}\n name={\"columns\"}\n remove={remove}\n array={true}\n before={placeBefore}\n after={placeAfter}\n >\n <Property id={getId(name, \"name\")} name={\"name\"} value={name} />\n <Property id={getId(name, \"path\")} name={\"path\"} value={path} />\n <Property id={getId(name, \"sortable\")} name={\"sortable\"} value={sortable} />\n <Property id={getId(name, \"resizable\")} name={\"resizable\"} value={resizable} />\n <Property id={getId(name, \"truncate\")} name={\"truncate\"} value={truncate} />\n <Property id={getId(name, \"hideable\")} name={\"hideable\"} value={hideable} />\n <Property id={getId(name, \"size\")} name={\"size\"} value={size} />\n <Property id={getId(name, \"visible\")} name={\"visible\"} value={visible} />\n {header ? (\n <Property id={getId(name, \"header\")} name={\"header\"} value={header} />\n ) : null}\n {cell ? <Property id={getId(name, \"cell\")} name={\"cell\"} value={cell} /> : null}\n {className ? (\n <Property id={getId(name, \"className\")} name={\"className\"} value={className} />\n ) : null}\n </Property>\n </Property>\n );\n};\n\nconst isFolderRow = (row: TableRow): row is FolderTableRow => {\n return row.$type === \"FOLDER\";\n};\n\nexport const Column = Object.assign(BaseColumn, { isFolderRow, createUseTableRow });\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,cAAc,QAAQ,0BAA0B;AACnE,SAASC,iBAAiB;AAiC1B,MAAMC,UAAiC,GAAGA,CAAC;EACvCC,KAAK,GAAGC,SAAS;EACjBC,MAAM,GAAGD,SAAS;EAClBE,IAAI;EACJC,SAAS,GAAGH,SAAS;EACrBI,MAAM,GAAGJ,SAAS;EAClBK,QAAQ,GAAG,IAAI;EACfC,QAAQ,GAAG,IAAI;EACfC,IAAI;EACJC,IAAI,GAAG,EAAE;EACTC,MAAM,GAAG,KAAK;EACdC,SAAS,GAAG,IAAI;EAChBC,IAAI,GAAG,GAAG;EACVC,QAAQ,GAAG,KAAK;EAChBC,OAAO,GAAG;AACd,CAAC,KAAK;EACF,MAAMC,KAAK,GAAGlB,cAAc,CAAC,aAAa,CAAC;EAE3C,MAAMmB,UAAU,GAAGhB,KAAK,KAAKC,SAAS,GAAGc,KAAK,CAACf,KAAK,CAAC,GAAGC,SAAS;EACjE,MAAMgB,WAAW,GAAGf,MAAM,KAAKD,SAAS,GAAGc,KAAK,CAACb,MAAM,CAAC,GAAGD,SAAS;EAEpE,oBACIN,KAAA,CAAAuB,aAAA,CAACtB,QAAQ;IAACuB,EAAE,EAAC,OAAO;IAACX,IAAI,EAAE;EAAQ,gBAC/Bb,KAAA,CAAAuB,aAAA,CAACtB,QAAQ;IACLuB,EAAE,EAAEJ,KAAK,CAACP,IAAI,CAAE;IAChBA,IAAI,EAAE,SAAU;IAChBE,MAAM,EAAEA,MAAO;IACfU,KAAK,EAAE,IAAK;IACZlB,MAAM,EAAEe,WAAY;IACpBjB,KAAK,EAAEgB;EAAW,gBAElBrB,KAAA,CAAAuB,aAAA,CAACtB,QAAQ;IAACuB,EAAE,EAAEJ,KAAK,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xET,MAAM,gBACHV,KAAA,CAAAuB,aAAA,CAACtB,QAAQ;IAACuB,EAAE,EAAEJ,KAAK,CAACP,IAAI,EAAE,QAAQ,CAAE;IAACA,IAAI,EAAE,QAAS;IAACa,KAAK,EAAEhB;EAAO,CAAE,CAAC,GACtE,IAAI,EACPF,IAAI,gBAAGR,KAAA,CAAAuB,aAAA,CAACtB,QAAQ;IAACuB,EAAE,EAAEJ,KAAK,CAACP,IAAI,EAAE,MAAM,CAAE;IAACA,IAAI,EAAE,MAAO;IAACa,KAAK,EAAElB;EAAK,CAAE,CAAC,GAAG,IAAI,EAC9EC,SAAS,gBACNT,KAAA,CAAAuB,aAAA,CAACtB,QAAQ;IAACuB,EAAE,EAAEJ,KAAK,CAACP,IAAI,EAAE,WAAW,CAAE;IAACA,IAAI,EAAE,WAAY;IAACa,KAAK,EAAEjB;EAAU,CAAE,CAAC,GAC/E,IACE,CACJ,CAAC;AAEnB,CAAC;AAED,MAAMkB,WAAW,GAAIC,GAAa,IAA4B;EAC1D,OAAOA,GAAG,CAACC,KAAK,KAAK,QAAQ;AACjC,CAAC;AAED,OAAO,MAAMC,MAAM,GAAGC,MAAM,CAACC,MAAM,CAAC5B,UAAU,EAAE;EAAEuB,WAAW;EAAExB;AAAkB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FolderTree","FolderPicker"],"sources":["ui.ts"],"sourcesContent":["export { FolderTree } from \"~/components/FolderTree/index.js\";\nexport { FolderPicker } from \"~/components/FolderPicker/FolderPicker.js\";\n"],"mappings":"AAAA,SAASA,UAAU;AACnB,SAASC,YAAY","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
|
|
2
2
|
import type { FolderDto } from "../../../domain/folder/FolderDto.js";
|
|
3
3
|
import { FolderModelProvider } from "../../../features/folders/abstractions.js";
|
|
4
4
|
import { ListFoldersGateway as GatewayAbstraction } from "./abstractions.js";
|
|
@@ -21,7 +21,7 @@ export declare const LIST_FOLDERS: (FOLDER_FIELDS: string) => import("graphql").
|
|
|
21
21
|
declare class ListFoldersGqlGatewayImpl implements GatewayAbstraction.Interface {
|
|
22
22
|
private client;
|
|
23
23
|
private folderModelProvider;
|
|
24
|
-
constructor(client:
|
|
24
|
+
constructor(client: MainGraphQLClient.Interface, folderModelProvider: FolderModelProvider.Interface);
|
|
25
25
|
execute(type: string): Promise<FolderDto[]>;
|
|
26
26
|
}
|
|
27
27
|
export declare const ListFoldersGqlGateway: typeof ListFoldersGqlGatewayImpl & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import gql from "graphql-tag";
|
|
2
|
-
import {
|
|
2
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
|
|
3
3
|
import { RootFolder } from "../../../domain/folder/RootFolder.js";
|
|
4
4
|
import { FolderModelProvider } from "../abstractions.js";
|
|
5
5
|
import { ListFoldersGateway as GatewayAbstraction } from "./abstractions.js";
|
|
@@ -43,7 +43,7 @@ class ListFoldersGqlGatewayImpl {
|
|
|
43
43
|
}
|
|
44
44
|
export const ListFoldersGqlGateway = GatewayAbstraction.createImplementation({
|
|
45
45
|
implementation: ListFoldersGqlGatewayImpl,
|
|
46
|
-
dependencies: [
|
|
46
|
+
dependencies: [MainGraphQLClient, FolderModelProvider]
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
//# sourceMappingURL=ListFoldersGqlGateway.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["gql","
|
|
1
|
+
{"version":3,"names":["gql","MainGraphQLClient","RootFolder","FolderModelProvider","ListFoldersGateway","GatewayAbstraction","LIST_FOLDERS","FOLDER_FIELDS","ListFoldersGqlGatewayImpl","constructor","client","folderModelProvider","execute","type","fields","getGraphQLSelection","response","query","variables","limit","data","error","aco","listFolders","Error","message","create","ListFoldersGqlGateway","createImplementation","implementation","dependencies"],"sources":["ListFoldersGqlGateway.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport type { FolderDto } from \"~/domain/folder/FolderDto.js\";\nimport { RootFolder } from \"~/domain/folder/RootFolder.js\";\nimport { FolderModelProvider } from \"~/features/folders/abstractions.js\";\nimport { ListFoldersGateway as GatewayAbstraction } from \"./abstractions.js\";\nimport type { AcoError } from \"~/types.js\";\n\nexport interface ListFoldersResponse {\n aco: {\n listFolders: {\n data: FolderDto[] | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface ListFoldersQueryVariables {\n type: string;\n limit: number;\n sort?: Record<string, any>;\n after?: string | null;\n}\n\nexport const LIST_FOLDERS = (FOLDER_FIELDS: string) => gql`\n query ListFolders($type: String!, $limit: Int!) {\n aco {\n listFolders(where: { type: $type }, limit: $limit) {\n data ${FOLDER_FIELDS}\n error {\n code\n data\n message\n }\n }\n }\n }\n`;\n\nclass ListFoldersGqlGatewayImpl implements GatewayAbstraction.Interface {\n constructor(\n private client: MainGraphQLClient.Interface,\n private folderModelProvider: FolderModelProvider.Interface\n ) {}\n\n async execute(type: string) {\n const fields = await this.folderModelProvider.getGraphQLSelection();\n\n const response = await this.client.execute<ListFoldersResponse, ListFoldersQueryVariables>({\n query: LIST_FOLDERS(fields),\n variables: {\n type,\n limit: 10000\n }\n });\n\n const { data, error } = response.aco.listFolders;\n\n if (!data) {\n throw new Error(error?.message || \"Could not fetch folders\");\n }\n\n return [RootFolder.create(), ...(data || [])];\n }\n}\n\nexport const ListFoldersGqlGateway = GatewayAbstraction.createImplementation({\n implementation: ListFoldersGqlGatewayImpl,\n dependencies: [MainGraphQLClient, FolderModelProvider]\n});\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAC7B,SAASC,iBAAiB,QAAQ,iDAAiD;AAEnF,SAASC,UAAU;AACnB,SAASC,mBAAmB;AAC5B,SAASC,kBAAkB,IAAIC,kBAAkB;AAmBjD,OAAO,MAAMC,YAAY,GAAIC,aAAqB,IAAKP,GAAG;AAC1D;AACA;AACA;AACA,uBAAuBO,aAAa;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMC,yBAAyB,CAAyC;EACpEC,WAAWA,CACCC,MAAmC,EACnCC,mBAAkD,EAC5D;IAAA,KAFUD,MAAmC,GAAnCA,MAAmC;IAAA,KACnCC,mBAAkD,GAAlDA,mBAAkD;EAC3D;EAEH,MAAMC,OAAOA,CAACC,IAAY,EAAE;IACxB,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACH,mBAAmB,CAACI,mBAAmB,CAAC,CAAC;IAEnE,MAAMC,QAAQ,GAAG,MAAM,IAAI,CAACN,MAAM,CAACE,OAAO,CAAiD;MACvFK,KAAK,EAAEX,YAAY,CAACQ,MAAM,CAAC;MAC3BI,SAAS,EAAE;QACPL,IAAI;QACJM,KAAK,EAAE;MACX;IACJ,CAAC,CAAC;IAEF,MAAM;MAAEC,IAAI;MAAEC;IAAM,CAAC,GAAGL,QAAQ,CAACM,GAAG,CAACC,WAAW;IAEhD,IAAI,CAACH,IAAI,EAAE;MACP,MAAM,IAAII,KAAK,CAACH,KAAK,EAAEI,OAAO,IAAI,yBAAyB,CAAC;IAChE;IAEA,OAAO,CAACvB,UAAU,CAACwB,MAAM,CAAC,CAAC,EAAE,IAAIN,IAAI,IAAI,EAAE,CAAC,CAAC;EACjD;AACJ;AAEA,OAAO,MAAMO,qBAAqB,GAAGtB,kBAAkB,CAACuB,oBAAoB,CAAC;EACzEC,cAAc,EAAErB,yBAAyB;EACzCsB,YAAY,EAAE,CAAC7B,iBAAiB,EAAEE,mBAAmB;AACzD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
|
|
2
2
|
import type { FolderDto } from "../../../domain/folder/FolderDto.js";
|
|
3
3
|
import { FolderModelProvider } from "../../../features/folders/abstractions.js";
|
|
4
4
|
import { LoadFolderHierarchyGateway as GatewayAbstraction } from "./abstractions.js";
|
|
@@ -23,7 +23,7 @@ export declare const LOAD_FOLDER_HIERARCHY: (FOLDER_FIELDS: string) => string;
|
|
|
23
23
|
declare class LoadFolderHierarchyGqlGatewayImpl implements GatewayAbstraction.Interface {
|
|
24
24
|
private client;
|
|
25
25
|
private folderModelProvider;
|
|
26
|
-
constructor(client:
|
|
26
|
+
constructor(client: MainGraphQLClient.Interface, folderModelProvider: FolderModelProvider.Interface);
|
|
27
27
|
execute(type: string, id: string): Promise<{
|
|
28
28
|
parents: FolderDto[];
|
|
29
29
|
siblings: FolderDto[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
|
|
2
2
|
import { RootFolder } from "../../../domain/folder/RootFolder.js";
|
|
3
3
|
import { FolderModelProvider } from "../abstractions.js";
|
|
4
4
|
import { LoadFolderHierarchyGateway as GatewayAbstraction } from "./abstractions.js";
|
|
@@ -51,7 +51,7 @@ class LoadFolderHierarchyGqlGatewayImpl {
|
|
|
51
51
|
}
|
|
52
52
|
export const LoadFolderHierarchyGqlGateway = GatewayAbstraction.createImplementation({
|
|
53
53
|
implementation: LoadFolderHierarchyGqlGatewayImpl,
|
|
54
|
-
dependencies: [
|
|
54
|
+
dependencies: [MainGraphQLClient, FolderModelProvider]
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
//# sourceMappingURL=LoadFolderHierarchyGqlGateway.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["MainGraphQLClient","RootFolder","FolderModelProvider","LoadFolderHierarchyGateway","GatewayAbstraction","LOAD_FOLDER_HIERARCHY","FOLDER_FIELDS","LoadFolderHierarchyGqlGatewayImpl","constructor","client","folderModelProvider","execute","type","id","fields","getGraphQLSelection","response","query","variables","Error","data","error","aco","getFolderHierarchy","message","parents","create","siblings","LoadFolderHierarchyGqlGateway","createImplementation","implementation","dependencies"],"sources":["LoadFolderHierarchyGqlGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport type { FolderDto } from \"~/domain/folder/FolderDto.js\";\nimport { RootFolder } from \"~/domain/folder/RootFolder.js\";\nimport { FolderModelProvider } from \"~/features/folders/abstractions.js\";\nimport { LoadFolderHierarchyGateway as GatewayAbstraction } from \"./abstractions.js\";\nimport type { AcoError } from \"~/types.js\";\n\ninterface LoadFolderHierarchyResponseData {\n parents: FolderDto[];\n siblings: FolderDto[];\n}\n\nexport interface LoadFolderHierarchyResponse {\n aco: {\n getFolderHierarchy: {\n data: LoadFolderHierarchyResponseData | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface LoadFolderHierarchyQueryVariables {\n type: string;\n id: string;\n}\n\nexport const LOAD_FOLDER_HIERARCHY = (FOLDER_FIELDS: string) => /* GraphQL*/ `\n query GetFolderHierarchy($type: String!, $id: ID!) {\n aco {\n getFolderHierarchy(type: $type, id: $id) {\n data {\n parents ${FOLDER_FIELDS}\n siblings ${FOLDER_FIELDS}\n }\n error {\n code\n data\n message\n }\n }\n }\n }\n`;\n\nclass LoadFolderHierarchyGqlGatewayImpl implements GatewayAbstraction.Interface {\n constructor(\n private client: MainGraphQLClient.Interface,\n private folderModelProvider: FolderModelProvider.Interface\n ) {}\n\n async execute(type: string, id: string) {\n const fields = await this.folderModelProvider.getGraphQLSelection();\n\n const response = await this.client.execute<\n LoadFolderHierarchyResponse,\n LoadFolderHierarchyQueryVariables\n >({\n query: LOAD_FOLDER_HIERARCHY(fields),\n variables: {\n type,\n id\n }\n });\n\n if (!response) {\n throw new Error(\n `Network error while loading folder hierarchy for the provided type/id: ${type}/${id}.`\n );\n }\n\n const { data, error } = response.aco.getFolderHierarchy;\n\n if (!data) {\n throw new Error(\n error?.message ||\n `Could not load folder hierarchy for the provided type/id: ${type}/${id}.`\n );\n }\n\n return {\n parents: [RootFolder.create(), ...data.parents],\n siblings: data.siblings\n };\n }\n}\n\nexport const LoadFolderHierarchyGqlGateway = GatewayAbstraction.createImplementation({\n implementation: LoadFolderHierarchyGqlGatewayImpl,\n dependencies: [MainGraphQLClient, FolderModelProvider]\n});\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,iDAAiD;AAEnF,SAASC,UAAU;AACnB,SAASC,mBAAmB;AAC5B,SAASC,0BAA0B,IAAIC,kBAAkB;AAsBzD,OAAO,MAAMC,qBAAqB,GAAIC,aAAqB,IAAK,YAAa;AAC7E;AACA;AACA;AACA;AACA,8BAA8BA,aAAa;AAC3C,+BAA+BA,aAAa;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMC,iCAAiC,CAAyC;EAC5EC,WAAWA,CACCC,MAAmC,EACnCC,mBAAkD,EAC5D;IAAA,KAFUD,MAAmC,GAAnCA,MAAmC;IAAA,KACnCC,mBAAkD,GAAlDA,mBAAkD;EAC3D;EAEH,MAAMC,OAAOA,CAACC,IAAY,EAAEC,EAAU,EAAE;IACpC,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACJ,mBAAmB,CAACK,mBAAmB,CAAC,CAAC;IAEnE,MAAMC,QAAQ,GAAG,MAAM,IAAI,CAACP,MAAM,CAACE,OAAO,CAGxC;MACEM,KAAK,EAAEZ,qBAAqB,CAACS,MAAM,CAAC;MACpCI,SAAS,EAAE;QACPN,IAAI;QACJC;MACJ;IACJ,CAAC,CAAC;IAEF,IAAI,CAACG,QAAQ,EAAE;MACX,MAAM,IAAIG,KAAK,CACX,0EAA0EP,IAAI,IAAIC,EAAE,GACxF,CAAC;IACL;IAEA,MAAM;MAAEO,IAAI;MAAEC;IAAM,CAAC,GAAGL,QAAQ,CAACM,GAAG,CAACC,kBAAkB;IAEvD,IAAI,CAACH,IAAI,EAAE;MACP,MAAM,IAAID,KAAK,CACXE,KAAK,EAAEG,OAAO,IACV,6DAA6DZ,IAAI,IAAIC,EAAE,GAC/E,CAAC;IACL;IAEA,OAAO;MACHY,OAAO,EAAE,CAACxB,UAAU,CAACyB,MAAM,CAAC,CAAC,EAAE,GAAGN,IAAI,CAACK,OAAO,CAAC;MAC/CE,QAAQ,EAAEP,IAAI,CAACO;IACnB,CAAC;EACL;AACJ;AAEA,OAAO,MAAMC,6BAA6B,GAAGxB,kBAAkB,CAACyB,oBAAoB,CAAC;EACjFC,cAAc,EAAEvB,iCAAiC;EACjDwB,YAAY,EAAE,CAAC/B,iBAAiB,EAAEE,mBAAmB;AACzD,CAAC,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-aco",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -13,44 +13,44 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@apollo/react-hooks": "3.1.5",
|
|
16
|
-
"@webiny/admin-ui": "6.
|
|
17
|
-
"@webiny/app": "6.
|
|
18
|
-
"@webiny/app-admin": "6.
|
|
19
|
-
"@webiny/app-headless-cms-common": "6.
|
|
20
|
-
"@webiny/app-utils": "6.
|
|
21
|
-
"@webiny/feature": "6.
|
|
22
|
-
"@webiny/form": "6.
|
|
23
|
-
"@webiny/icons": "6.
|
|
24
|
-
"@webiny/plugins": "6.
|
|
25
|
-
"@webiny/react-properties": "6.
|
|
26
|
-
"@webiny/shared-aco": "6.
|
|
27
|
-
"@webiny/utils": "6.
|
|
28
|
-
"@webiny/validation": "6.
|
|
16
|
+
"@webiny/admin-ui": "6.2.0",
|
|
17
|
+
"@webiny/app": "6.2.0",
|
|
18
|
+
"@webiny/app-admin": "6.2.0",
|
|
19
|
+
"@webiny/app-headless-cms-common": "6.2.0",
|
|
20
|
+
"@webiny/app-utils": "6.2.0",
|
|
21
|
+
"@webiny/feature": "6.2.0",
|
|
22
|
+
"@webiny/form": "6.2.0",
|
|
23
|
+
"@webiny/icons": "6.2.0",
|
|
24
|
+
"@webiny/plugins": "6.2.0",
|
|
25
|
+
"@webiny/react-properties": "6.2.0",
|
|
26
|
+
"@webiny/shared-aco": "6.2.0",
|
|
27
|
+
"@webiny/utils": "6.2.0",
|
|
28
|
+
"@webiny/validation": "6.2.0",
|
|
29
29
|
"dot-prop-immutable": "2.1.1",
|
|
30
30
|
"graphql": "16.13.2",
|
|
31
31
|
"graphql-tag": "2.12.6",
|
|
32
|
-
"lodash": "4.
|
|
32
|
+
"lodash": "4.18.1",
|
|
33
33
|
"mobx": "6.15.0",
|
|
34
34
|
"mobx-react-lite": "4.1.1",
|
|
35
|
-
"react": "18.
|
|
36
|
-
"react-dom": "18.
|
|
37
|
-
"slugify": "1.6.
|
|
35
|
+
"react": "18.3.1",
|
|
36
|
+
"react-dom": "18.3.1",
|
|
37
|
+
"slugify": "1.6.9",
|
|
38
38
|
"zod": "4.3.6"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@types/react": "18.
|
|
42
|
-
"@webiny/build-tools": "6.
|
|
41
|
+
"@types/react": "18.3.28",
|
|
42
|
+
"@webiny/build-tools": "6.2.0",
|
|
43
43
|
"@webiny/di": "0.2.3",
|
|
44
|
-
"@webiny/wcp": "6.
|
|
44
|
+
"@webiny/wcp": "6.2.0",
|
|
45
45
|
"apollo-client": "2.6.10",
|
|
46
46
|
"apollo-link": "1.2.14",
|
|
47
47
|
"rimraf": "6.1.3",
|
|
48
48
|
"typescript": "5.9.3",
|
|
49
|
-
"vitest": "4.1.
|
|
49
|
+
"vitest": "4.1.4"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public",
|
|
53
53
|
"directory": "dist"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "3d3148358b6febbc857371930871743bec3b3939"
|
|
56
56
|
}
|