@ws-ui/shared 0.2.23 → 0.2.24
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/README.md +27 -27
- package/dist/declarations/datasources/cache.d.ts +26 -26
- package/dist/declarations/datasources/dataclass.d.ts +47 -47
- package/dist/declarations/datasources/datasource.d.ts +373 -373
- package/dist/declarations/datasources/datastore.d.ts +62 -62
- package/dist/declarations/datasources/entitysel.d.ts +68 -68
- package/dist/declarations/datasources/interfaces/catalog.d.ts +115 -115
- package/dist/declarations/datasources/interfaces/dataclass-attribute.d.ts +88 -88
- package/dist/declarations/datasources/methods.d.ts +88 -88
- package/dist/declarations/datasources/rest.d.ts +18 -18
- package/dist/declarations/http-methods.d.ts +70 -70
- package/dist/declarations/index.d.ts +9 -9
- package/dist/declarations/webform/webform.d.ts +259 -259
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/tailwind.preset.js +148 -148
- package/dist/types/webform-editor.d.ts +1 -0
- package/package.json +73 -73
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
declare namespace datasources {
|
|
2
|
-
interface IComponentAction {
|
|
3
|
-
[actionName: string]: {
|
|
4
|
-
stamp: number;
|
|
5
|
-
value: any;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
type TStateAction = 'add' | 'remove';
|
|
10
|
-
|
|
11
|
-
class Utils {
|
|
12
|
-
static formatValue(value: number | string | Date, format: string): string;
|
|
13
|
-
static formatString(value: string, format: string): string;
|
|
14
|
-
static formatDuration(value: number): string;
|
|
15
|
-
static convertAs(dataType: string, value: string);
|
|
16
|
-
static stringToNumber(value: string): string;
|
|
17
|
-
static entityKeyToJSON(key: string): string;
|
|
18
|
-
static initFramework(): Promise<void>;
|
|
19
|
-
static padNumber(num: string | number): string;
|
|
20
|
-
}
|
|
21
|
-
class Method4D {
|
|
22
|
-
acceptedEvents: {
|
|
23
|
-
[event: string]: boolean;
|
|
24
|
-
};
|
|
25
|
-
constructor(
|
|
26
|
-
methodName: string,
|
|
27
|
-
resultSource: datasources.DataSource,
|
|
28
|
-
paramSources: datasources.DataSource[],
|
|
29
|
-
owenerSource: datasources.DataSource | null,
|
|
30
|
-
);
|
|
31
|
-
static buildMethod(
|
|
32
|
-
component: {
|
|
33
|
-
methodName: string;
|
|
34
|
-
resultingDataSource: Partial<{
|
|
35
|
-
id: string;
|
|
36
|
-
namespace: string;
|
|
37
|
-
}>;
|
|
38
|
-
parameters: {
|
|
39
|
-
name: string;
|
|
40
|
-
namespace?: string;
|
|
41
|
-
isHardCoded?: boolean;
|
|
42
|
-
type?: 'date' | 'string' | 'object' | 'array' | 'number' | 'bool';
|
|
43
|
-
}[];
|
|
44
|
-
},
|
|
45
|
-
associatedData: { namespace: string },
|
|
46
|
-
ownerSource: DataSource | null,
|
|
47
|
-
singleton?: string | null,
|
|
48
|
-
): Method4D;
|
|
49
|
-
static buildAction(component: { action: string }): string;
|
|
50
|
-
static buildEvents(component: { eventType: string }): {
|
|
51
|
-
[evName: string]: boolean;
|
|
52
|
-
};
|
|
53
|
-
static validEvent(event: string): boolean;
|
|
54
|
-
static replaceDataSources(
|
|
55
|
-
component: { parameters: any },
|
|
56
|
-
elemSource,
|
|
57
|
-
newid: string,
|
|
58
|
-
);
|
|
59
|
-
callServerSide(
|
|
60
|
-
widget: {
|
|
61
|
-
id?: string;
|
|
62
|
-
serverSideRef?: string;
|
|
63
|
-
},
|
|
64
|
-
callerType: string,
|
|
65
|
-
additionalData?: any,
|
|
66
|
-
addOwnerSourceAsParam?: boolean,
|
|
67
|
-
callFuncUrl?: string,
|
|
68
|
-
isAGet: true,
|
|
69
|
-
): Promise<string>;
|
|
70
|
-
callServerSide(
|
|
71
|
-
widget: {
|
|
72
|
-
id?: string;
|
|
73
|
-
serverSideRef?: string;
|
|
74
|
-
},
|
|
75
|
-
callerType: string,
|
|
76
|
-
additionalData?: any,
|
|
77
|
-
addOwnerSourceAsParam?: boolean,
|
|
78
|
-
callFuncUrl?: string,
|
|
79
|
-
isAGet?: false,
|
|
80
|
-
): Promise<{
|
|
81
|
-
[refName: string]: IComponentAction;
|
|
82
|
-
__NOTIFICATION?: { message: string; type: string };
|
|
83
|
-
__STATES?: { [stateName: string]: TStateAction };
|
|
84
|
-
__PRIVILEGES?: { stamp: number };
|
|
85
|
-
}>;
|
|
86
|
-
isMemberFunction(): boolean;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
1
|
+
declare namespace datasources {
|
|
2
|
+
interface IComponentAction {
|
|
3
|
+
[actionName: string]: {
|
|
4
|
+
stamp: number;
|
|
5
|
+
value: any;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type TStateAction = 'add' | 'remove';
|
|
10
|
+
|
|
11
|
+
class Utils {
|
|
12
|
+
static formatValue(value: number | string | Date, format: string): string;
|
|
13
|
+
static formatString(value: string, format: string): string;
|
|
14
|
+
static formatDuration(value: number): string;
|
|
15
|
+
static convertAs(dataType: string, value: string);
|
|
16
|
+
static stringToNumber(value: string): string;
|
|
17
|
+
static entityKeyToJSON(key: string): string;
|
|
18
|
+
static initFramework(): Promise<void>;
|
|
19
|
+
static padNumber(num: string | number): string;
|
|
20
|
+
}
|
|
21
|
+
class Method4D {
|
|
22
|
+
acceptedEvents: {
|
|
23
|
+
[event: string]: boolean;
|
|
24
|
+
};
|
|
25
|
+
constructor(
|
|
26
|
+
methodName: string,
|
|
27
|
+
resultSource: datasources.DataSource,
|
|
28
|
+
paramSources: datasources.DataSource[],
|
|
29
|
+
owenerSource: datasources.DataSource | null,
|
|
30
|
+
);
|
|
31
|
+
static buildMethod(
|
|
32
|
+
component: {
|
|
33
|
+
methodName: string;
|
|
34
|
+
resultingDataSource: Partial<{
|
|
35
|
+
id: string;
|
|
36
|
+
namespace: string;
|
|
37
|
+
}>;
|
|
38
|
+
parameters: {
|
|
39
|
+
name: string;
|
|
40
|
+
namespace?: string;
|
|
41
|
+
isHardCoded?: boolean;
|
|
42
|
+
type?: 'date' | 'string' | 'object' | 'array' | 'number' | 'bool';
|
|
43
|
+
}[];
|
|
44
|
+
},
|
|
45
|
+
associatedData: { namespace: string },
|
|
46
|
+
ownerSource: DataSource | null,
|
|
47
|
+
singleton?: string | null,
|
|
48
|
+
): Method4D;
|
|
49
|
+
static buildAction(component: { action: string }): string;
|
|
50
|
+
static buildEvents(component: { eventType: string }): {
|
|
51
|
+
[evName: string]: boolean;
|
|
52
|
+
};
|
|
53
|
+
static validEvent(event: string): boolean;
|
|
54
|
+
static replaceDataSources(
|
|
55
|
+
component: { parameters: any },
|
|
56
|
+
elemSource,
|
|
57
|
+
newid: string,
|
|
58
|
+
);
|
|
59
|
+
callServerSide(
|
|
60
|
+
widget: {
|
|
61
|
+
id?: string;
|
|
62
|
+
serverSideRef?: string;
|
|
63
|
+
},
|
|
64
|
+
callerType: string,
|
|
65
|
+
additionalData?: any,
|
|
66
|
+
addOwnerSourceAsParam?: boolean,
|
|
67
|
+
callFuncUrl?: string,
|
|
68
|
+
isAGet: true,
|
|
69
|
+
): Promise<string>;
|
|
70
|
+
callServerSide(
|
|
71
|
+
widget: {
|
|
72
|
+
id?: string;
|
|
73
|
+
serverSideRef?: string;
|
|
74
|
+
},
|
|
75
|
+
callerType: string,
|
|
76
|
+
additionalData?: any,
|
|
77
|
+
addOwnerSourceAsParam?: boolean,
|
|
78
|
+
callFuncUrl?: string,
|
|
79
|
+
isAGet?: false,
|
|
80
|
+
): Promise<{
|
|
81
|
+
[refName: string]: IComponentAction;
|
|
82
|
+
__NOTIFICATION?: { message: string; type: string };
|
|
83
|
+
__STATES?: { [stateName: string]: TStateAction };
|
|
84
|
+
__PRIVILEGES?: { stamp: number };
|
|
85
|
+
}>;
|
|
86
|
+
isMemberFunction(): boolean;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
declare namespace datasources {
|
|
2
|
-
class RestError extends Error {
|
|
3
|
-
constructor(
|
|
4
|
-
message: string,
|
|
5
|
-
status: number,
|
|
6
|
-
statusText?: string,
|
|
7
|
-
errCode?: number | string,
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
getDescription(): string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function restRequest<T>(
|
|
14
|
-
command: HttpMethod,
|
|
15
|
-
url: string,
|
|
16
|
-
body: unknown,
|
|
17
|
-
): Promise<T>;
|
|
18
|
-
}
|
|
1
|
+
declare namespace datasources {
|
|
2
|
+
class RestError extends Error {
|
|
3
|
+
constructor(
|
|
4
|
+
message: string,
|
|
5
|
+
status: number,
|
|
6
|
+
statusText?: string,
|
|
7
|
+
errCode?: number | string,
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
getDescription(): string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function restRequest<T>(
|
|
14
|
+
command: HttpMethod,
|
|
15
|
+
url: string,
|
|
16
|
+
body: unknown,
|
|
17
|
+
): Promise<T>;
|
|
18
|
+
}
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
declare namespace http {
|
|
2
|
-
/**
|
|
3
|
-
* Hypertext Transfer Protocol (HTTP) request method names.
|
|
4
|
-
* @see {@link https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods}
|
|
5
|
-
*/
|
|
6
|
-
enum HttpMethod {
|
|
7
|
-
/**
|
|
8
|
-
* The GET method requests a representation of the specified resource.
|
|
9
|
-
* Requests using GET should only retrieve data and should have no other effect.
|
|
10
|
-
* (This is also true of some other HTTP methods.)
|
|
11
|
-
*
|
|
12
|
-
* The W3C has published guidance principles on this distinction, saying,
|
|
13
|
-
* "Web application design should be informed by the above principles,
|
|
14
|
-
* but also by the relevant limitations.".
|
|
15
|
-
*/
|
|
16
|
-
GET = 'GET',
|
|
17
|
-
/**
|
|
18
|
-
* The HEAD method asks for a response identical to that of a GET request,
|
|
19
|
-
* but without the response body.
|
|
20
|
-
*
|
|
21
|
-
* This is useful for retrieving meta-information written in response headers,
|
|
22
|
-
* without having to transport the entire content.
|
|
23
|
-
*/
|
|
24
|
-
HEAD = 'HEAD',
|
|
25
|
-
/**
|
|
26
|
-
* The POST method requests that the server accept the entity enclosed in the
|
|
27
|
-
* request as a new subordinate of the web resource identified by the URI.
|
|
28
|
-
* The data POSTed might be, for example, an annotation for existing resources;
|
|
29
|
-
* a message for a bulletin board, newsgroup, mailing list, or comment thread;
|
|
30
|
-
* a block of data that is the result of submitting a web form to a
|
|
31
|
-
* data-handling process; or an item to add to a database.
|
|
32
|
-
*/
|
|
33
|
-
POST = 'POST',
|
|
34
|
-
/**
|
|
35
|
-
* The PUT method requests that the enclosed entity be stored under the supplied
|
|
36
|
-
* URI.
|
|
37
|
-
*
|
|
38
|
-
* If the URI refers to an already existing resource, it is modified; if the
|
|
39
|
-
* URI does not point to an existing resource, then the server can create the
|
|
40
|
-
* resource with that URI.
|
|
41
|
-
*/
|
|
42
|
-
PUT = 'PUT',
|
|
43
|
-
/**
|
|
44
|
-
* The DELETE method deletes the specified resource.
|
|
45
|
-
*/
|
|
46
|
-
DELETE = 'DELETE',
|
|
47
|
-
/**
|
|
48
|
-
* The TRACE method echoes the received request so that a client can see what
|
|
49
|
-
* (if any) changes or additions have been made by intermediate servers.
|
|
50
|
-
*/
|
|
51
|
-
TRACE = 'TRACE',
|
|
52
|
-
/**
|
|
53
|
-
* The OPTIONS method returns the HTTP methods that the server supports for
|
|
54
|
-
* the specified URL.
|
|
55
|
-
* This can be used to check the functionality of a web server by requesting '*'
|
|
56
|
-
* instead of a specific resource.
|
|
57
|
-
*/
|
|
58
|
-
OPTIONS = 'OPTIONS',
|
|
59
|
-
/**
|
|
60
|
-
* The CONNECT method converts the request connection to a transparent TCP/IP
|
|
61
|
-
* tunnel, usually to facilitate SSL-encrypted communication (HTTPS) through
|
|
62
|
-
* an unencrypted HTTP proxy.
|
|
63
|
-
*/
|
|
64
|
-
CONNECT = 'CONNECT',
|
|
65
|
-
/**
|
|
66
|
-
* The PATCH method applies partial modifications to a resource.
|
|
67
|
-
*/
|
|
68
|
-
PATCH = 'PATCH',
|
|
69
|
-
}
|
|
70
|
-
}
|
|
1
|
+
declare namespace http {
|
|
2
|
+
/**
|
|
3
|
+
* Hypertext Transfer Protocol (HTTP) request method names.
|
|
4
|
+
* @see {@link https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods}
|
|
5
|
+
*/
|
|
6
|
+
enum HttpMethod {
|
|
7
|
+
/**
|
|
8
|
+
* The GET method requests a representation of the specified resource.
|
|
9
|
+
* Requests using GET should only retrieve data and should have no other effect.
|
|
10
|
+
* (This is also true of some other HTTP methods.)
|
|
11
|
+
*
|
|
12
|
+
* The W3C has published guidance principles on this distinction, saying,
|
|
13
|
+
* "Web application design should be informed by the above principles,
|
|
14
|
+
* but also by the relevant limitations.".
|
|
15
|
+
*/
|
|
16
|
+
GET = 'GET',
|
|
17
|
+
/**
|
|
18
|
+
* The HEAD method asks for a response identical to that of a GET request,
|
|
19
|
+
* but without the response body.
|
|
20
|
+
*
|
|
21
|
+
* This is useful for retrieving meta-information written in response headers,
|
|
22
|
+
* without having to transport the entire content.
|
|
23
|
+
*/
|
|
24
|
+
HEAD = 'HEAD',
|
|
25
|
+
/**
|
|
26
|
+
* The POST method requests that the server accept the entity enclosed in the
|
|
27
|
+
* request as a new subordinate of the web resource identified by the URI.
|
|
28
|
+
* The data POSTed might be, for example, an annotation for existing resources;
|
|
29
|
+
* a message for a bulletin board, newsgroup, mailing list, or comment thread;
|
|
30
|
+
* a block of data that is the result of submitting a web form to a
|
|
31
|
+
* data-handling process; or an item to add to a database.
|
|
32
|
+
*/
|
|
33
|
+
POST = 'POST',
|
|
34
|
+
/**
|
|
35
|
+
* The PUT method requests that the enclosed entity be stored under the supplied
|
|
36
|
+
* URI.
|
|
37
|
+
*
|
|
38
|
+
* If the URI refers to an already existing resource, it is modified; if the
|
|
39
|
+
* URI does not point to an existing resource, then the server can create the
|
|
40
|
+
* resource with that URI.
|
|
41
|
+
*/
|
|
42
|
+
PUT = 'PUT',
|
|
43
|
+
/**
|
|
44
|
+
* The DELETE method deletes the specified resource.
|
|
45
|
+
*/
|
|
46
|
+
DELETE = 'DELETE',
|
|
47
|
+
/**
|
|
48
|
+
* The TRACE method echoes the received request so that a client can see what
|
|
49
|
+
* (if any) changes or additions have been made by intermediate servers.
|
|
50
|
+
*/
|
|
51
|
+
TRACE = 'TRACE',
|
|
52
|
+
/**
|
|
53
|
+
* The OPTIONS method returns the HTTP methods that the server supports for
|
|
54
|
+
* the specified URL.
|
|
55
|
+
* This can be used to check the functionality of a web server by requesting '*'
|
|
56
|
+
* instead of a specific resource.
|
|
57
|
+
*/
|
|
58
|
+
OPTIONS = 'OPTIONS',
|
|
59
|
+
/**
|
|
60
|
+
* The CONNECT method converts the request connection to a transparent TCP/IP
|
|
61
|
+
* tunnel, usually to facilitate SSL-encrypted communication (HTTPS) through
|
|
62
|
+
* an unencrypted HTTP proxy.
|
|
63
|
+
*/
|
|
64
|
+
CONNECT = 'CONNECT',
|
|
65
|
+
/**
|
|
66
|
+
* The PATCH method applies partial modifications to a resource.
|
|
67
|
+
*/
|
|
68
|
+
PATCH = 'PATCH',
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
interface Window {
|
|
2
|
-
DataSource: typeof datasources.DataSource;
|
|
3
|
-
Method4D: typeof datasources.Method4D;
|
|
4
|
-
restRequest: typeof datasources.restRequest;
|
|
5
|
-
Utils: typeof datasources.Utils;
|
|
6
|
-
$$datastores: {
|
|
7
|
-
[dsName: string]: datasources.DataStore;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
1
|
+
interface Window {
|
|
2
|
+
DataSource: typeof datasources.DataSource;
|
|
3
|
+
Method4D: typeof datasources.Method4D;
|
|
4
|
+
restRequest: typeof datasources.restRequest;
|
|
5
|
+
Utils: typeof datasources.Utils;
|
|
6
|
+
$$datastores: {
|
|
7
|
+
[dsName: string]: datasources.DataStore;
|
|
8
|
+
};
|
|
9
|
+
}
|