@budibase/frontend-core 1.3.18 → 1.3.19-alpha.1

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": "1.3.18",
3
+ "version": "1.3.19-alpha.1",
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": "^1.3.18",
9
+ "@budibase/bbui": "1.3.19-alpha.1",
10
10
  "lodash": "^4.17.21",
11
11
  "svelte": "^3.46.2"
12
12
  },
13
- "gitHead": "5bf9d38233aee1f117a4c0ac8ba3782763fedb36"
13
+ "gitHead": "9eb4995976ec00b40ba52df7d0bc357e8df6edce"
14
14
  }
@@ -11,10 +11,14 @@ export const buildDatasourceEndpoints = API => ({
11
11
  /**
12
12
  * Prompts the server to build the schema for a datasource.
13
13
  * @param datasourceId the datasource ID to build the schema for
14
+ * @param tablesFilter list of specific table names to be build the schema
14
15
  */
15
- buildDatasourceSchema: async datasourceId => {
16
+ buildDatasourceSchema: async ({ datasourceId, tablesFilter }) => {
16
17
  return await API.post({
17
18
  url: `/api/datasources/${datasourceId}/schema`,
19
+ body: {
20
+ tablesFilter,
21
+ },
18
22
  })
19
23
  },
20
24
 
package/src/api/index.js CHANGED
@@ -24,6 +24,7 @@ import { buildSelfEndpoints } from "./self"
24
24
  import { buildViewEndpoints } from "./views"
25
25
  import { buildLicensingEndpoints } from "./licensing"
26
26
  import { buildGroupsEndpoints } from "./groups"
27
+ import { buildPluginEndpoints } from "./plugins"
27
28
 
28
29
  const defaultAPIClientConfig = {
29
30
  /**
@@ -243,5 +244,6 @@ export const createAPIClient = config => {
243
244
  ...buildSelfEndpoints(API),
244
245
  ...buildLicensingEndpoints(API),
245
246
  ...buildGroupsEndpoints(API),
247
+ ...buildPluginEndpoints(API),
246
248
  }
247
249
  }
@@ -0,0 +1,44 @@
1
+ export const buildPluginEndpoints = API => ({
2
+ /**
3
+ * Uploads a plugin tarball bundle
4
+ * @param data the plugin tarball bundle to upload
5
+ */
6
+ uploadPlugin: async data => {
7
+ return await API.post({
8
+ url: `/api/plugin/upload`,
9
+ body: data,
10
+ json: false,
11
+ })
12
+ },
13
+
14
+ /**
15
+ * Creates a plugin from URL, Github or NPM
16
+ */
17
+ createPlugin: async data => {
18
+ return await API.post({
19
+ url: `/api/plugin`,
20
+ body: data,
21
+ })
22
+ },
23
+
24
+ /**
25
+ * Gets a list of all plugins
26
+ */
27
+ getPlugins: async () => {
28
+ return await API.get({
29
+ url: "/api/plugin",
30
+ })
31
+ },
32
+
33
+ /**
34
+ * Deletes a plugin.
35
+ * @param pluginId the ID of the plugin to delete
36
+ *
37
+ * * @param pluginId the revision of the plugin to delete
38
+ */
39
+ deletePlugin: async pluginId => {
40
+ return await API.delete({
41
+ url: `/api/plugin/${pluginId}`,
42
+ })
43
+ },
44
+ })
package/src/constants.js CHANGED
@@ -57,6 +57,7 @@ export const Cookies = {
57
57
  Auth: "budibase:auth",
58
58
  CurrentApp: "budibase:currentapp",
59
59
  ReturnUrl: "budibase:returnurl",
60
+ AccountReturnUrl: "budibase:account:returnurl",
60
61
  }
61
62
 
62
63
  // Table names
@@ -121,7 +121,7 @@ export const buildLuceneQuery = filter => {
121
121
  query.allOr = true
122
122
  return
123
123
  }
124
- if (type === "datetime") {
124
+ if (type === "datetime" && !isHbs) {
125
125
  // Ensure date value is a valid date and parse into correct format
126
126
  if (!value) {
127
127
  return