@devtable/settings-form 9.6.0 → 9.7.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.
@@ -3,5 +3,6 @@ import { PaginationResponse } from './types';
3
3
  export declare const datasource: {
4
4
  list: () => Promise<PaginationResponse<IDataSource>>;
5
5
  create: (type: DataSourceType, key: string, config: TDataSourceConfig) => Promise<PaginationResponse<IDataSource> | false>;
6
+ update: (id: string, config: TDataSourceConfig) => Promise<PaginationResponse<IDataSource>>;
6
7
  delete: (id: string) => Promise<void>;
7
8
  };
@@ -4,6 +4,7 @@ export interface IDataSource {
4
4
  type: DataSourceType;
5
5
  key: string;
6
6
  is_preset?: boolean;
7
+ config?: TDataSourceConfig_HTTP;
7
8
  }
8
9
  export declare type TDataSourceConfig_DB = {
9
10
  host: string;
@@ -2,6 +2,7 @@ export declare const APICaller: {
2
2
  datasource: {
3
3
  list: () => Promise<import("./types").PaginationResponse<import("./datasource.typed").IDataSource>>;
4
4
  create: (type: import("./datasource.typed").DataSourceType, key: string, config: import("./datasource.typed").TDataSourceConfig) => Promise<false | import("./types").PaginationResponse<import("./datasource.typed").IDataSource>>;
5
+ update: (id: string, config: import("./datasource.typed").TDataSourceConfig) => Promise<import("./types").PaginationResponse<import("./datasource.typed").IDataSource>>;
5
6
  delete: (id: string) => Promise<void>;
6
7
  };
7
8
  account: {
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { DataSourceType } from '../../api-caller/datasource.typed';
3
+ interface IProps {
4
+ type: DataSourceType;
5
+ }
6
+ export declare function DataSourceIcon({ type }: IProps): JSX.Element;
7
+ export {};
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { IStyles } from '../../../styles';
2
+ import { IStyles } from '../../styles';
3
3
  interface IFunctionStringField {
4
4
  value: TFunctionString;
5
5
  onChange: (v: TFunctionString) => void;
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import { DataSourceType, TDataSourceConfig_HTTP } from '../../../api-caller/datasource.typed';
3
+ import { IStyles } from '../../styles';
4
+ export declare const DEFAULT_HTTP_PROCESSING: {
5
+ pre: string;
6
+ post: string;
7
+ };
8
+ interface IFormValues {
9
+ type: DataSourceType;
10
+ key: string;
11
+ config: TDataSourceConfig_HTTP;
12
+ }
13
+ interface IEditDataSourceForm {
14
+ name: string;
15
+ config: TDataSourceConfig_HTTP;
16
+ submit: (values: IFormValues) => void;
17
+ styles?: IStyles;
18
+ }
19
+ export declare function EditDataSourceForm_HTTP({ name, config, submit, styles }: IEditDataSourceForm): JSX.Element;
20
+ export {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { IDataSource } from '../../api-caller/datasource.typed';
3
+ import { IStyles } from '../styles';
4
+ interface IEditDataSource {
5
+ dataSource: IDataSource;
6
+ styles?: IStyles;
7
+ onSuccess: () => void;
8
+ }
9
+ export declare function EditDataSource({ dataSource, onSuccess, styles }: IEditDataSource): JSX.Element;
10
+ export {};
@@ -0,0 +1,4 @@
1
+ import { TDataSourceConfig } from '../../api-caller/datasource.typed';
2
+ export interface IFormValues {
3
+ config: TDataSourceConfig;
4
+ }
@@ -1,4 +1,4 @@
1
- const e = "@devtable/settings-form", s = "9.6.0", t = "Apache-2.0", i = {
1
+ const e = "@devtable/settings-form", s = "9.7.0", t = "Apache-2.0", i = {
2
2
  access: "public",
3
3
  registry: "https://registry.npmjs.org/"
4
4
  }, o = [
@@ -18,6 +18,7 @@ const e = "@devtable/settings-form", s = "9.6.0", t = "Apache-2.0", i = {
18
18
  preview: "vite preview"
19
19
  }, a = {
20
20
  "@monaco-editor/react": "4.4.6",
21
+ "@tabler/icons": "1.119.0",
21
22
  "monaco-editor": "0.36.0"
22
23
  }, l = {
23
24
  "@emotion/babel-plugin": "11.10.6",