@budibase/frontend-core 2.2.12-alpha.3 → 2.2.12-alpha.30

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/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "2.2.12-alpha.3",
3
+ "version": "2.2.12-alpha.30",
4
4
  "description": "Budibase frontend core libraries used in builder and client",
5
5
  "author": "Budibase",
6
6
  "license": "MPL-2.0",
7
7
  "svelte": "src/index.js",
8
8
  "dependencies": {
9
- "@budibase/bbui": "2.2.12-alpha.3",
9
+ "@budibase/bbui": "2.2.12-alpha.30",
10
10
  "lodash": "^4.17.21",
11
11
  "svelte": "^3.46.2"
12
12
  },
13
- "gitHead": "55f2a50064a4670de13e964f3b40c9f05189c5d6"
13
+ "gitHead": "e47b2a5092402e33d177ca5302b2474d325a3244"
14
14
  }
package/src/api/tables.js CHANGED
@@ -64,32 +64,22 @@ export const buildTableEndpoints = API => ({
64
64
  * @param tableId the table ID to import to
65
65
  * @param data the data import object
66
66
  */
67
- importTableData: async ({ tableId, data }) => {
67
+ importTableData: async ({ tableId, rows }) => {
68
68
  return await API.post({
69
69
  url: `/api/tables/${tableId}/import`,
70
70
  body: {
71
- dataImport: data,
71
+ rows,
72
72
  },
73
73
  })
74
74
  },
75
-
76
- /**
77
- * Validates a candidate CSV to be imported for a certain table.
78
- * @param tableId the table ID to import to
79
- * @param csvString the CSV contents as a string
80
- * @param schema the proposed schema
81
- */
82
- validateTableCSV: async ({ tableId, csvString, schema }) => {
75
+ csvToJson: async csvString => {
83
76
  return await API.post({
84
- url: "/api/tables/csv/validate",
77
+ url: "/api/convert/csvToJson",
85
78
  body: {
86
79
  csvString,
87
- schema,
88
- tableId,
89
80
  },
90
81
  })
91
82
  },
92
-
93
83
  /**
94
84
  * Gets a list o tables.
95
85
  */
@@ -120,4 +110,22 @@ export const buildTableEndpoints = API => ({
120
110
  url: `/api/tables/${tableId}/${tableRev}`,
121
111
  })
122
112
  },
113
+ validateNewTableImport: async ({ rows, schema }) => {
114
+ return await API.post({
115
+ url: "/api/tables/validateNewTableImport",
116
+ body: {
117
+ rows,
118
+ schema,
119
+ },
120
+ })
121
+ },
122
+ validateExistingTableImport: async ({ rows, tableId }) => {
123
+ return await API.post({
124
+ url: "/api/tables/validateExistingTableImport",
125
+ body: {
126
+ rows,
127
+ tableId,
128
+ },
129
+ })
130
+ },
123
131
  })
@@ -10,7 +10,7 @@
10
10
  --spectrum-global-color-gray-500: hsl(var(--hue), var(--sat), 40%);
11
11
  --spectrum-global-color-gray-600: hsl(var(--hue), var(--sat), 60%);
12
12
  --spectrum-global-color-gray-700: hsl(var(--hue), var(--sat), 70%);
13
- --spectrum-global-color-gray-800: hsl(var(--hue), var(--sat), 80%);
13
+ --spectrum-global-color-gray-800: hsl(var(--hue), var(--sat), 85%);
14
14
  --spectrum-global-color-gray-900: hsl(var(--hue), var(--sat), 95%);
15
15
 
16
16
  --modal-background: var(--spectrum-global-color-gray-50);