@ws-ui/shared 1.5.15 → 1.6.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.
@@ -1,14 +1,13 @@
1
- import { ModalColor } from '../../types/modal';
2
1
  declare const colorScheme: {
3
- [ModalColor.PRIMARY]: {
2
+ primary: {
4
3
  icon: string;
5
4
  button: string;
6
5
  };
7
- [ModalColor.DANGER]: {
6
+ danger: {
8
7
  icon: string;
9
8
  button: string;
10
9
  };
11
- [ModalColor.WARNING]: {
10
+ warning: {
12
11
  icon: string;
13
12
  button: string;
14
13
  };
@@ -8,6 +8,19 @@ declare namespace datasources {
8
8
 
9
9
  type TStateAction = 'add' | 'remove';
10
10
 
11
+ type ServerSideResponse = {
12
+ [refName: string]: datasources.IComponentAction;
13
+ } & {
14
+ __NOTIFICATION?: { message: string; type: string };
15
+ __STATES?: { [stateName: string]: datasources.TStateAction };
16
+ __PRIVILEGES?: { stamp: number };
17
+ __ERROR?: {
18
+ message: string;
19
+ componentSignature?: string;
20
+ errCode?: number;
21
+ }[];
22
+ };
23
+
11
24
  class Utils {
12
25
  static formatValue(value: number | string | Date, format: string): string;
13
26
  static formatString(value: string, format: string): string;
@@ -77,12 +90,7 @@ declare namespace datasources {
77
90
  addOwnerSourceAsParam?: boolean,
78
91
  callFuncUrl?: string,
79
92
  isAGet?: false,
80
- ): Promise<{
81
- [refName: string]: IComponentAction;
82
- __NOTIFICATION?: { message: string; type: string };
83
- __STATES?: { [stateName: string]: TStateAction };
84
- __PRIVILEGES?: { stamp: number };
85
- }>;
93
+ ): Promise<ServerSideResponse>;
86
94
  isMemberFunction(): boolean;
87
95
  }
88
96
  }
@@ -3,6 +3,7 @@ declare namespace webforms {
3
3
  type CraftComponent = import('@ws-ui/craftjs-core').SerializedNode;
4
4
 
5
5
  type ComponentProps<CSSProperties = ReactCSSProperties> = {
6
+ readonly?: boolean;
6
7
  disabled?: boolean;
7
8
  moveable?: boolean;
8
9
  deletable?: boolean;
@@ -153,6 +154,7 @@ declare namespace webforms {
153
154
  shortcuts?: {
154
155
  [event: string]: string[];
155
156
  };
157
+ minutes?: number;
156
158
  };
157
159
 
158
160
  interface BaseEvent {
@@ -167,18 +169,18 @@ declare namespace webforms {
167
169
  type: 'method';
168
170
  params: MethodParam[];
169
171
  } & Partial<{
170
- method: string;
171
- dataclass: string;
172
- returns: Omit<MethodParam, 'id'>;
173
- namespace: string;
174
- code: string;
175
- feedback: boolean;
176
- datasource: string;
177
- variadicType: string;
178
- methodType?: 'dataclass' | 'singleton';
179
- openIn: string;
180
- allowedOnHTTPGET?: boolean;
181
- }>;
172
+ method: string;
173
+ dataclass: string;
174
+ returns: Omit<MethodParam, 'id'>;
175
+ namespace: string;
176
+ code: string;
177
+ feedback: boolean;
178
+ datasource: string;
179
+ variadicType: string;
180
+ methodType?: 'dataclass' | 'singleton';
181
+ openIn: string;
182
+ allowedOnHTTPGET?: boolean;
183
+ }>;
182
184
 
183
185
  type WebformStateActionType = 'add' | 'delete' | 'clear';
184
186
 
@@ -253,7 +255,7 @@ declare namespace webforms {
253
255
 
254
256
  type MethodReturn = Omit<MethodParam, 'name'>;
255
257
 
256
- interface QueryParam extends MethodParam {}
258
+ interface QueryParam extends MethodParam { }
257
259
 
258
260
  interface OrderBy {
259
261
  name: string; // replace with attribute