@ws-ui/shared 0.1.20 → 0.1.21
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/declarations/datasources/datasource.d.ts +2 -1
- package/dist/index.cjs.js +7 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +41 -25
- package/dist/index.es.js.map +1 -1
- package/dist/services/api.d.ts +3 -2
- package/dist/types/api.d.ts +7 -1
- package/dist/types/webform-editor.d.ts +1 -0
- package/dist/types/webform-state.d.ts +8 -2
- package/package.json +2 -2
package/dist/services/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileFolderTypeWithContent, FolderRootType, IAddFolderRequest, IAddFolderResponse, IAppSettingsResponse, ICheckUpdatesRequest, ICheckUpdatesResponse, IDropFileRequest, IDropFolderRequest, IFileInfoResponse, IGetFileInfo, IGetFileRequest, IGetFolderRequest, IGetFolderResponse, IInstallUpdatesRequest, IMonacoThemeResponse, IRenameFileRequest, IRenameFileResponse, IRenameFolderRequest, IRenameFolderResponse, ISetFileContentRequest, ISharedCSSResponse,
|
|
1
|
+
import { FileFolderTypeWithContent, FolderRootType, IAddFolderRequest, IAddFolderResponse, IAppSettingsResponse, ICheckUpdatesRequest, ICheckUpdatesResponse, IDropFileRequest, IDropFolderRequest, IFileInfoResponse, IGetFileInfo, IGetFileRequest, IGetFolderRequest, IGetFolderResponse, IInstallUpdatesRequest, IMonacoThemeResponse, IRenameFileRequest, IRenameFileResponse, IRenameFolderRequest, IRenameFolderResponse, ISetFileContentRequest, ISharedCSSResponse, ISavedConditionsResponse, ISharedDatasourcesResponse, RemoteDebuggerMode, IUserPrivilegesResponse } from '../types/api';
|
|
2
2
|
import { IComponentTemplate } from '../types/webform-editor';
|
|
3
3
|
/**
|
|
4
4
|
* Check updates
|
|
@@ -104,7 +104,8 @@ export interface ISetFileContentResponse {
|
|
|
104
104
|
}
|
|
105
105
|
export declare function getSharedDatasources(): Promise<ISharedDatasourcesResponse>;
|
|
106
106
|
export declare function getSharedCSS(): Promise<ISharedCSSResponse>;
|
|
107
|
-
export declare function
|
|
107
|
+
export declare function getSavedConditions(): Promise<ISavedConditionsResponse>;
|
|
108
|
+
export declare function getUserPrivileges(): Promise<IUserPrivilegesResponse>;
|
|
108
109
|
export declare function getMonacoTheme(): Promise<IMonacoThemeResponse>;
|
|
109
110
|
export declare const setSharedSources: (datasources: {
|
|
110
111
|
[key: string]: datasources.ICreateDataSource[];
|
package/dist/types/api.d.ts
CHANGED
|
@@ -539,7 +539,13 @@ export type ISharedDatasourcesResponse = {
|
|
|
539
539
|
export type ISharedCSSResponse = {
|
|
540
540
|
classes: IWebFormStyleClass[];
|
|
541
541
|
};
|
|
542
|
-
export type
|
|
542
|
+
export type ISavedConditionsResponse = {
|
|
543
543
|
conditions: WebformStateCondition[];
|
|
544
544
|
};
|
|
545
|
+
export interface IUserPrivilege {
|
|
546
|
+
privilege: string;
|
|
547
|
+
}
|
|
548
|
+
export type IUserPrivilegesResponse = {
|
|
549
|
+
privileges: IUserPrivilege[];
|
|
550
|
+
};
|
|
545
551
|
export type IMonacoThemeResponse = MonacoEditor.IStandaloneThemeData | null;
|
|
@@ -23,7 +23,6 @@ export type PrivilegeCondition = GenericCondition<{
|
|
|
23
23
|
type: 'privilege';
|
|
24
24
|
value: string;
|
|
25
25
|
valueType?: ValueType;
|
|
26
|
-
dataType?: DataType;
|
|
27
26
|
op: CommonOp;
|
|
28
27
|
}>;
|
|
29
28
|
export type CombinationCondition = Omit<GenericCondition<{
|
|
@@ -33,6 +32,13 @@ export type CombinationCondition = Omit<GenericCondition<{
|
|
|
33
32
|
}>, 'name'> & {
|
|
34
33
|
name?: string;
|
|
35
34
|
};
|
|
35
|
+
export type CurrentStateCondition = GenericCondition<{
|
|
36
|
+
type: 'currentState';
|
|
37
|
+
value: string;
|
|
38
|
+
valueType?: ValueType;
|
|
39
|
+
dataType?: DataType;
|
|
40
|
+
op: CommonOp;
|
|
41
|
+
}>;
|
|
36
42
|
export type ParentStateCondition = GenericCondition<{
|
|
37
43
|
type: 'parentState';
|
|
38
44
|
value: string;
|
|
@@ -44,5 +50,5 @@ export type ReferenceCondition = Omit<GenericCondition<{
|
|
|
44
50
|
type: 'reference';
|
|
45
51
|
ref: string;
|
|
46
52
|
}>, 'name'>;
|
|
47
|
-
export type WebformStateCondition = DataSourceCondition | PrivilegeCondition | CombinationCondition | ParentStateCondition | ReferenceCondition;
|
|
53
|
+
export type WebformStateCondition = DataSourceCondition | PrivilegeCondition | CombinationCondition | CurrentStateCondition | ParentStateCondition | ReferenceCondition;
|
|
48
54
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ws-ui/shared",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.21",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
7
7
|
"module": "./dist/index.es.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
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.16",
|
|
34
34
|
"classnames": "^2.3.1",
|
|
35
35
|
"lodash": "^4.17.21",
|
|
36
36
|
"markdown-to-jsx": "^7.1.3",
|