@ws-ui/shared 0.1.30 → 0.2.0-beta.20240711
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/dist/index.cjs.js +56 -56
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2302 -2270
- package/dist/index.es.js.map +1 -1
- package/dist/services/api.d.ts +20 -4
- package/dist/types/api.d.ts +0 -2
- package/dist/types/code-editor.d.ts +19 -0
- package/dist/types/webform-state.d.ts +1 -1
- package/package.json +2 -3
package/dist/services/api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FileFolderTypeWithContent, FolderRootType, IAddFolderRequest, IAddFolderResponse, IAppSettingsResponse, ICheckUpdatesRequest, ICheckUpdatesResponse, IDropFileRequest, IDropFolderRequest, IFileInfoResponse, IGetFileInfo, IGetFileRequest, IGetFolderRequest, IGetFolderResponse, IInstallUpdatesRequest,
|
|
1
|
+
import { FileFolderTypeWithContent, FolderRootType, IAddFolderRequest, IAddFolderResponse, IAppSettingsResponse, ICheckUpdatesRequest, ICheckUpdatesResponse, IDropFileRequest, IDropFolderRequest, IFileInfoResponse, IGetFileInfo, IGetFileRequest, IGetFolderRequest, IGetFolderResponse, IInstallUpdatesRequest, IRenameFileRequest, IRenameFileResponse, IRenameFolderRequest, IRenameFolderResponse, ISetFileContentRequest, ISharedCSSResponse, ISavedConditionsResponse, ISharedDatasourcesResponse, RemoteDebuggerMode, IUserPrivilegesResponse } from '../types/api';
|
|
2
|
+
import { IMonacoThemeResponse } from '../types/code-editor';
|
|
2
3
|
import { IComponentTemplate } from '../types/webform-editor';
|
|
3
4
|
/**
|
|
4
5
|
* Check updates
|
|
@@ -102,14 +103,29 @@ export interface ISetFileContentResponse {
|
|
|
102
103
|
type: FileFolderTypeWithContent;
|
|
103
104
|
size: number;
|
|
104
105
|
}
|
|
105
|
-
export declare function getSharedDatasources(): Promise<
|
|
106
|
+
export declare function getSharedDatasources(): Promise<{
|
|
107
|
+
webform: ISharedDatasourcesResponse;
|
|
108
|
+
report: ISharedDatasourcesResponse;
|
|
109
|
+
}>;
|
|
106
110
|
export declare function getSharedCSS(): Promise<ISharedCSSResponse>;
|
|
107
111
|
export declare function getSavedConditions(): Promise<ISavedConditionsResponse>;
|
|
108
112
|
export declare function getUserPrivileges(): Promise<IUserPrivilegesResponse>;
|
|
109
113
|
export declare function getMonacoTheme(): Promise<IMonacoThemeResponse>;
|
|
110
114
|
export declare const setSharedSources: (datasources: {
|
|
111
|
-
|
|
112
|
-
|
|
115
|
+
webform: {
|
|
116
|
+
[key: string]: datasources.ICreateDataSource[];
|
|
117
|
+
};
|
|
118
|
+
report: {
|
|
119
|
+
[key: string]: datasources.ICreateDataSource[];
|
|
120
|
+
};
|
|
121
|
+
}) => Promise<{
|
|
122
|
+
webform: {
|
|
123
|
+
[key: string]: datasources.ICreateDataSource[];
|
|
124
|
+
};
|
|
125
|
+
report: {
|
|
126
|
+
[key: string]: datasources.ICreateDataSource[];
|
|
127
|
+
};
|
|
128
|
+
}>;
|
|
113
129
|
export declare const setFileContent: (payload: Pick<ISetFileContentRequest, 'content' | 'name'> & Partial<Pick<ISetFileContentRequest, 'asText' | 'path'>>) => Promise<{
|
|
114
130
|
type: FileFolderTypeWithContent;
|
|
115
131
|
size: number;
|
package/dist/types/api.d.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Enums and types goes here *
|
|
3
3
|
*******************************************************************************/
|
|
4
4
|
import { IEditor } from '../types/explorer';
|
|
5
|
-
import { editor as MonacoEditor } from 'monaco-editor';
|
|
6
5
|
import { IWebFormStyleClass } from '../types/webform-editor';
|
|
7
6
|
import { WebformStateCondition } from '../types/webform-state';
|
|
8
7
|
export declare enum FolderRootType {
|
|
@@ -556,4 +555,3 @@ export interface IUserPrivilege {
|
|
|
556
555
|
export type IUserPrivilegesResponse = {
|
|
557
556
|
privileges: IUserPrivilege[];
|
|
558
557
|
};
|
|
559
|
-
export type IMonacoThemeResponse = MonacoEditor.IStandaloneThemeData | null;
|
|
@@ -43,3 +43,22 @@ export interface IMethodAttributes extends Omit<IOriginalMethodAttributes, 'publ
|
|
|
43
43
|
export declare const PublishOptions: {
|
|
44
44
|
[key: string]: IPublished;
|
|
45
45
|
};
|
|
46
|
+
type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black' | 'hc-light';
|
|
47
|
+
type IColors = {
|
|
48
|
+
[colorId: string]: string;
|
|
49
|
+
};
|
|
50
|
+
interface ITokenThemeRule {
|
|
51
|
+
token: string;
|
|
52
|
+
foreground?: string;
|
|
53
|
+
background?: string;
|
|
54
|
+
fontStyle?: string;
|
|
55
|
+
}
|
|
56
|
+
interface IStandaloneThemeData {
|
|
57
|
+
base: BuiltinTheme;
|
|
58
|
+
inherit: boolean;
|
|
59
|
+
rules: ITokenThemeRule[];
|
|
60
|
+
encodedTokensColors?: string[];
|
|
61
|
+
colors: IColors;
|
|
62
|
+
}
|
|
63
|
+
export type IMonacoThemeResponse = IStandaloneThemeData | null;
|
|
64
|
+
export {};
|
|
@@ -8,7 +8,7 @@ export type BaseWebformStateCondition = {
|
|
|
8
8
|
name: string;
|
|
9
9
|
};
|
|
10
10
|
type GenericCondition<T> = BaseWebformStateCondition & T;
|
|
11
|
-
type CommonOp = 'eq' | 'neq' | 'regex';
|
|
11
|
+
type CommonOp = 'eq' | 'neq' | 'regex' | 'isnull' | 'notnull';
|
|
12
12
|
type ValueType = 'datasource' | 'hardCoded';
|
|
13
13
|
type DataType = 'string' | 'number' | 'date' | 'boolean' | 'array' | 'object';
|
|
14
14
|
export type DataSourceCondition = GenericCondition<{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ws-ui/shared",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0-beta.20240711",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
7
7
|
"module": "./dist/index.es.js",
|
|
@@ -30,11 +30,10 @@
|
|
|
30
30
|
"@popperjs/core": "^2.9.2",
|
|
31
31
|
"@radix-ui/react-popover": "^0.1.6",
|
|
32
32
|
"@ws-ui/craftjs-core": "^0.2.1-beta.3",
|
|
33
|
-
"@ws-ui/icons": "^0.0.
|
|
33
|
+
"@ws-ui/icons": "^0.0.22",
|
|
34
34
|
"classnames": "^2.3.1",
|
|
35
35
|
"lodash": "^4.17.21",
|
|
36
36
|
"markdown-to-jsx": "^7.1.3",
|
|
37
|
-
"monaco-editor": "^0.41.0",
|
|
38
37
|
"react": "^17.0.2",
|
|
39
38
|
"react-dom": "^17.0.2",
|
|
40
39
|
"react-popper": "^2.2.5",
|