Skip to content

Commit 2c29dae

Browse files
authored
Merge pull request #1257 from merico-dev/1255-download-schema-should-only-include-content
1255 download schema should only include content
2 parents 46581f1 + 729a3e5 commit 2c29dae

File tree

9 files changed

+13
-7
lines changed

9 files changed

+13
-7
lines changed

api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtable/api",
3-
"version": "10.48.2",
3+
"version": "10.49.0",
44
"description": "",
55
"main": "index.js",
66
"scripts": {

dashboard/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtable/dashboard",
3-
"version": "10.48.2",
3+
"version": "10.49.0",
44
"license": "Apache-2.0",
55
"publishConfig": {
66
"access": "public",

dashboard/src/components/view/view-component/render/division.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const DivActions = observer(({ downloadScreenShot }: { downloadScreenShot
1414
const content = useRenderContentModelContext();
1515

1616
const downloadSchema = () => {
17-
const schema = JSON.stringify(content.json, null, 2);
17+
const schema = JSON.stringify(content.contentJSON, null, 2);
1818
const filename = `${model.name}__${content.name}`;
1919
downloadJSON(filename, schema);
2020
};

dashboard/src/dashboard-editor/model/content/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ const _ContentModel = types
7676
},
7777
};
7878
},
79+
get contentJSON(): DashboardContentDBType['content'] {
80+
return this.json.content;
81+
},
7982
get filtersChanged() {
8083
const fields = 'filters.current';
8184
return !isEqual(getSnapshot(get(self, fields)), get(self.origin, fields));

dashboard/src/dashboard-editor/ui/header/header-menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const HeaderMenu = observer(() => {
99
const content = useEditContentModelContext();
1010

1111
const downloadSchema = () => {
12-
const schema = JSON.stringify(content.json, null, 2);
12+
const schema = JSON.stringify(content.contentJSON, null, 2);
1313
const filename = `${model.name}__${content.name}`;
1414
downloadJSON(filename, schema);
1515
};

dashboard/src/dashboard-render/model/content.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ export const ContentRenderModel = types
6464
},
6565
};
6666
},
67+
get contentJSON(): DashboardContentDBType['content'] {
68+
return this.json.content;
69+
},
6770
get payloadForSQL(): TPayloadForSQL {
6871
// @ts-expect-error type of getParent
6972
const context = getParent(self).context.current;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtable/root",
3-
"version": "10.48.2",
3+
"version": "10.49.0",
44
"private": true,
55
"workspaces": [
66
"api",

settings-form/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtable/settings-form",
3-
"version": "10.48.2",
3+
"version": "10.49.0",
44
"license": "Apache-2.0",
55
"publishConfig": {
66
"access": "public",

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@devtable/website",
33
"private": true,
44
"license": "Apache-2.0",
5-
"version": "10.48.2",
5+
"version": "10.49.0",
66
"scripts": {
77
"dev": "vite",
88
"preview": "vite preview"

0 commit comments

Comments
 (0)