@ws-ui/shared 1.12.4 → 1.13.0-dev.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.
Files changed (51) hide show
  1. package/dist/components/Grid.d.ts +26 -0
  2. package/dist/components/Image.d.ts +5 -0
  3. package/dist/components/Panel.d.ts +3 -2
  4. package/dist/components/SearchInput.d.ts +12 -0
  5. package/dist/components/ToolbarIcon/index.d.ts +2 -0
  6. package/dist/components/ToolbarIcon/interfaces.d.ts +21 -0
  7. package/dist/components/Tooltip.d.ts +7 -3
  8. package/dist/components/index.d.ts +4 -3
  9. package/dist/declarations/datasources/datasource.d.ts +393 -393
  10. package/dist/declarations/datasources/interfaces/catalog.d.ts +114 -114
  11. package/dist/declarations/datasources/methods.d.ts +110 -110
  12. package/dist/declarations/index.d.ts +11 -11
  13. package/dist/declarations/webform/webform.d.ts +304 -304
  14. package/dist/hooks/index.d.ts +8 -0
  15. package/dist/hooks/use-boolean.d.ts +5 -0
  16. package/dist/hooks/use-callback-ref.d.ts +1 -0
  17. package/dist/hooks/use-controllable-state.d.ts +7 -0
  18. package/dist/hooks/use-ds-change-renderer.d.ts +10 -0
  19. package/dist/hooks/use-ds-renderer.d.ts +7 -0
  20. package/dist/hooks/use-form-control-props.d.ts +15 -0
  21. package/dist/hooks/use-safe-layout-effect.d.ts +2 -0
  22. package/dist/hooks/use-update-effect.d.ts +2 -0
  23. package/dist/index.cjs.js +166 -115
  24. package/dist/index.cjs.js.map +1 -1
  25. package/dist/index.d.ts +1 -0
  26. package/dist/index.es.js +25493 -14300
  27. package/dist/index.es.js.map +1 -1
  28. package/dist/providers/index.d.ts +2 -0
  29. package/dist/providers/studio-context.d.ts +7 -0
  30. package/dist/providers/toast-provider.d.ts +18 -0
  31. package/dist/shared.css +1 -1
  32. package/dist/types/adapter.d.ts +12 -0
  33. package/dist/types/explorer.d.ts +31 -0
  34. package/dist/types/index.d.ts +3 -0
  35. package/dist/types/modal.d.ts +11 -4
  36. package/dist/types/roles.d.ts +111 -0
  37. package/dist/types/settings.d.ts +28 -0
  38. package/dist/types/webform-editor.d.ts +132 -1
  39. package/dist/types/welcome-tour.d.ts +3 -0
  40. package/dist/utils/catalog.d.ts +1 -0
  41. package/dist/utils/chakra-utils.d.ts +21 -0
  42. package/dist/utils/common.d.ts +1 -0
  43. package/dist/utils/explorer.d.ts +4 -1
  44. package/dist/utils/index.d.ts +4 -0
  45. package/dist/utils/roles.d.ts +54 -0
  46. package/dist/utils/webform-editor.d.ts +91 -0
  47. package/package.json +6 -6
  48. package/dist/components/Checkbox/index.d.ts +0 -16
  49. package/dist/components/ControlledSwitch.d.ts +0 -10
  50. package/dist/components/FloatingTooltip/index.d.ts +0 -11
  51. package/dist/components/Modal/Button.d.ts +0 -10
@@ -1,114 +1,114 @@
1
- declare namespace catalog {
2
- enum EAttributeKind {
3
- STORAGE = 'storage',
4
- RELATEDENTITY = 'relatedEntity',
5
- RELATEDENTITIES = 'relatedEntities',
6
- CALCULATED = 'calculated',
7
- COMPOSITION = 'composition',
8
- ALIAS = 'alias',
9
- }
10
- type AttributeType =
11
- | 'bool'
12
- | 'word'
13
- | 'time'
14
- | 'blob'
15
- | 'string'
16
- | 'text'
17
- | 'uuid'
18
- | 'short'
19
- | 'long'
20
- | 'number'
21
- | 'byte'
22
- | 'long64'
23
- | 'duration'
24
- | 'object'
25
- | 'date'
26
- | 'image';
27
- type Scope = 'public' | 'publicOnServer';
28
- type ApplyTo = 'dataClass' | 'entity' | 'entityCollection' | 'dataStore';
29
- type AttributeKind =
30
- | 'storage'
31
- | 'alias'
32
- | 'calculated'
33
- | 'relatedEntity'
34
- | 'relatedEntities';
35
-
36
- type IDataClassProperties = Partial<{
37
- panelColor: string;
38
- position: {
39
- x: number;
40
- y: number;
41
- };
42
- }>;
43
- type IAttributeProperties = Partial<{}>;
44
- interface IModelProperties extends Partial<{
45
- version: string;
46
- backgroundColor: string;
47
- backgroundImage: string;
48
- backgroundVariant: 'dotted' | 'grid' | 'none';
49
- viewport?: { zoom: number; x: number; y: number };
50
- }> {}
51
- interface IMethod {
52
- name: string;
53
- applyTo: ApplyTo;
54
- scope: Scope;
55
- from: 'remoteServer';
56
- allowedOnHTTPGET: boolean;
57
- startingLine: number;
58
- paramsText: string;
59
- filePath: string;
60
- userDefined: boolean;
61
- endingLine: number;
62
- exposed: boolean;
63
- }
64
- type IDataClass = {
65
- name: string;
66
- className: string;
67
- collectionName: string;
68
- scope: DataclassScope;
69
- attributes: IAttribute[];
70
- uuid?: string;
71
- virtual?: boolean;
72
- } & Partial<{
73
- defaultTopSize: number;
74
- leave_tag_on_delete: boolean;
75
- prevent_journaling: boolean;
76
- comment: string;
77
- extraProperties: IDataClassProperties;
78
- }>;
79
- type IEvent = {
80
- kind: string;
81
- from: string;
82
- userDefined: boolean;
83
- };
84
- export type AttributeIndexKind = 'btree' | 'cluster' | 'auto' | 'none';
85
- type IAttribute = {
86
- name: string;
87
- type: string;
88
- kind: AttributeKind;
89
- scope: Scope;
90
- uuid?: string;
91
- } & Partial<{
92
- indexKind?: AttributeIndexKind | null;
93
- invalidAlias: boolean;
94
- autogenerate: boolean;
95
- unique: boolean;
96
- primKey: boolean;
97
- exposed: boolean;
98
- behavior: string;
99
- autosequence: boolean;
100
- indexed: boolean;
101
- reversePath: boolean;
102
- keywordIndexed: boolean;
103
- not_null: boolean; // TODO: to be renamed to mandatory
104
- minValue: number;
105
- maxValue: number;
106
- simpleDate: boolean;
107
- defaultValue: any;
108
- events: any[];
109
- path: string;
110
- extraProperties: IAttributeProperties;
111
- styled_text: boolean;
112
- comment: string;
113
- }>;
114
- }
1
+ declare namespace catalog {
2
+ enum EAttributeKind {
3
+ STORAGE = 'storage',
4
+ RELATEDENTITY = 'relatedEntity',
5
+ RELATEDENTITIES = 'relatedEntities',
6
+ CALCULATED = 'calculated',
7
+ COMPOSITION = 'composition',
8
+ ALIAS = 'alias',
9
+ }
10
+ type AttributeType =
11
+ | 'bool'
12
+ | 'word'
13
+ | 'time'
14
+ | 'blob'
15
+ | 'string'
16
+ | 'text'
17
+ | 'uuid'
18
+ | 'short'
19
+ | 'long'
20
+ | 'number'
21
+ | 'byte'
22
+ | 'long64'
23
+ | 'duration'
24
+ | 'object'
25
+ | 'date'
26
+ | 'image';
27
+ type Scope = 'public' | 'publicOnServer';
28
+ type ApplyTo = 'dataClass' | 'entity' | 'entityCollection' | 'dataStore';
29
+ type AttributeKind =
30
+ | 'storage'
31
+ | 'alias'
32
+ | 'calculated'
33
+ | 'relatedEntity'
34
+ | 'relatedEntities';
35
+
36
+ type IDataClassProperties = Partial<{
37
+ panelColor: string;
38
+ position: {
39
+ x: number;
40
+ y: number;
41
+ };
42
+ }>;
43
+ type IAttributeProperties = Partial<{}>;
44
+ interface IModelProperties extends Partial<{
45
+ version: string;
46
+ backgroundColor: string;
47
+ backgroundImage: string;
48
+ backgroundVariant: 'dotted' | 'grid' | 'none';
49
+ viewport?: { zoom: number; x: number; y: number };
50
+ }> {}
51
+ interface IMethod {
52
+ name: string;
53
+ applyTo: ApplyTo;
54
+ scope: Scope;
55
+ from: 'remoteServer';
56
+ allowedOnHTTPGET: boolean;
57
+ startingLine: number;
58
+ paramsText: string;
59
+ filePath: string;
60
+ userDefined: boolean;
61
+ endingLine: number;
62
+ exposed: boolean;
63
+ }
64
+ type IDataClass = {
65
+ name: string;
66
+ className: string;
67
+ collectionName: string;
68
+ scope: DataclassScope;
69
+ attributes: IAttribute[];
70
+ uuid?: string;
71
+ virtual?: boolean;
72
+ } & Partial<{
73
+ defaultTopSize: number;
74
+ leave_tag_on_delete: boolean;
75
+ prevent_journaling: boolean;
76
+ comment: string;
77
+ extraProperties: IDataClassProperties;
78
+ }>;
79
+ type IEvent = {
80
+ kind: string;
81
+ from: string;
82
+ userDefined: boolean;
83
+ };
84
+ export type AttributeIndexKind = 'btree' | 'cluster' | 'auto' | 'none';
85
+ type IAttribute = {
86
+ name: string;
87
+ type: string;
88
+ kind: AttributeKind;
89
+ scope: Scope;
90
+ uuid?: string;
91
+ } & Partial<{
92
+ indexKind?: AttributeIndexKind | null;
93
+ invalidAlias: boolean;
94
+ autogenerate: boolean;
95
+ unique: boolean;
96
+ primKey: boolean;
97
+ exposed: boolean;
98
+ behavior: string;
99
+ autosequence: boolean;
100
+ indexed: boolean;
101
+ reversePath: boolean;
102
+ keywordIndexed: boolean;
103
+ not_null: boolean; // TODO: to be renamed to mandatory
104
+ minValue: number;
105
+ maxValue: number;
106
+ simpleDate: boolean;
107
+ defaultValue: any;
108
+ events: any[];
109
+ path: string;
110
+ extraProperties: IAttributeProperties;
111
+ styled_text: boolean;
112
+ comment: string;
113
+ }>;
114
+ }
@@ -1,110 +1,110 @@
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
- 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
- __STATUS?: {
18
- errors?: {
19
- message: string;
20
- seriousError?: boolean;
21
- errCode?: number;
22
- [key: string]: any;
23
- }[];
24
- };
25
- __ERRORS?: {
26
- message: string;
27
- seriousError?: boolean;
28
- errCode?: number;
29
- [key: string]: any;
30
- }[];
31
- __ERROR?: {
32
- message: string;
33
- componentSignature?: string;
34
- errCode?: number;
35
- }[];
36
- };
37
-
38
- class Utils {
39
- static formatValue(value: number | string | Date, format: string): string;
40
- static formatString(value: string, format: string): string;
41
- static formatDuration(value: number): string;
42
- static convertAs(dataType: string, value: string);
43
- static stringToNumber(value: string): string;
44
- static entityKeyToJSON(key: string): string;
45
- static initFramework(): Promise<void>;
46
- static padNumber(num: string | number): string;
47
- }
48
- class Method4D {
49
- acceptedEvents: {
50
- [event: string]: boolean;
51
- };
52
- constructor(
53
- methodName: string,
54
- resultSource: datasources.DataSource,
55
- paramSources: datasources.DataSource[],
56
- owenerSource: datasources.DataSource | null,
57
- );
58
- static buildMethod(
59
- component: {
60
- methodName: string;
61
- resultingDataSource: Partial<{
62
- id: string;
63
- namespace: string;
64
- }>;
65
- parameters: {
66
- name: string;
67
- namespace?: string;
68
- isHardCoded?: boolean;
69
- type?: 'date' | 'string' | 'object' | 'array' | 'number' | 'bool';
70
- }[];
71
- },
72
- associatedData: { namespace: string },
73
- ownerSource: DataSource | null,
74
- singleton?: string | null,
75
- ): Method4D;
76
- static buildAction(component: { action: string }): string;
77
- static buildEvents(component: { eventType: string }): {
78
- [evName: string]: boolean;
79
- };
80
- static validEvent(event: string): boolean;
81
- static replaceDataSources(
82
- component: { parameters: any },
83
- elemSource,
84
- newid: string,
85
- );
86
- callServerSide(
87
- widget: {
88
- id?: string;
89
- serverSideRef?: string;
90
- },
91
- callerType: string,
92
- additionalData?: any,
93
- addOwnerSourceAsParam?: boolean,
94
- callFuncUrl?: string,
95
- isAGet: true,
96
- ): Promise<string>;
97
- callServerSide(
98
- widget: {
99
- id?: string;
100
- serverSideRef?: string;
101
- },
102
- callerType: string,
103
- additionalData?: any,
104
- addOwnerSourceAsParam?: boolean,
105
- callFuncUrl?: string,
106
- isAGet?: false,
107
- ): Promise<ServerSideResponse>;
108
- isMemberFunction(): boolean;
109
- }
110
- }
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
+ 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
+ __STATUS?: {
18
+ errors?: {
19
+ message: string;
20
+ seriousError?: boolean;
21
+ errCode?: number;
22
+ [key: string]: any;
23
+ }[];
24
+ };
25
+ __ERRORS?: {
26
+ message: string;
27
+ seriousError?: boolean;
28
+ errCode?: number;
29
+ [key: string]: any;
30
+ }[];
31
+ __ERROR?: {
32
+ message: string;
33
+ componentSignature?: string;
34
+ errCode?: number;
35
+ }[];
36
+ };
37
+
38
+ class Utils {
39
+ static formatValue(value: number | string | Date, format: string): string;
40
+ static formatString(value: string, format: string): string;
41
+ static formatDuration(value: number): string;
42
+ static convertAs(dataType: string, value: string);
43
+ static stringToNumber(value: string): string;
44
+ static entityKeyToJSON(key: string): string;
45
+ static initFramework(): Promise<void>;
46
+ static padNumber(num: string | number): string;
47
+ }
48
+ class Method4D {
49
+ acceptedEvents: {
50
+ [event: string]: boolean;
51
+ };
52
+ constructor(
53
+ methodName: string,
54
+ resultSource: datasources.DataSource,
55
+ paramSources: datasources.DataSource[],
56
+ owenerSource: datasources.DataSource | null,
57
+ );
58
+ static buildMethod(
59
+ component: {
60
+ methodName: string;
61
+ resultingDataSource: Partial<{
62
+ id: string;
63
+ namespace: string;
64
+ }>;
65
+ parameters: {
66
+ name: string;
67
+ namespace?: string;
68
+ isHardCoded?: boolean;
69
+ type?: 'date' | 'string' | 'object' | 'array' | 'number' | 'bool';
70
+ }[];
71
+ },
72
+ associatedData: { namespace: string },
73
+ ownerSource: DataSource | null,
74
+ singleton?: string | null,
75
+ ): Method4D;
76
+ static buildAction(component: { action: string }): string;
77
+ static buildEvents(component: { eventType: string }): {
78
+ [evName: string]: boolean;
79
+ };
80
+ static validEvent(event: string): boolean;
81
+ static replaceDataSources(
82
+ component: { parameters: any },
83
+ elemSource,
84
+ newid: string,
85
+ );
86
+ callServerSide(
87
+ widget: {
88
+ id?: string;
89
+ serverSideRef?: string;
90
+ },
91
+ callerType: string,
92
+ additionalData?: any,
93
+ addOwnerSourceAsParam?: boolean,
94
+ callFuncUrl?: string,
95
+ isAGet: true,
96
+ ): Promise<string>;
97
+ callServerSide(
98
+ widget: {
99
+ id?: string;
100
+ serverSideRef?: string;
101
+ },
102
+ callerType: string,
103
+ additionalData?: any,
104
+ addOwnerSourceAsParam?: boolean,
105
+ callFuncUrl?: string,
106
+ isAGet?: false,
107
+ ): Promise<ServerSideResponse>;
108
+ isMemberFunction(): boolean;
109
+ }
110
+ }
@@ -1,11 +1,11 @@
1
- interface Window {
2
- pagesense?: [string, string][];
3
- DataSource: typeof datasources.DataSource;
4
- Method4D: typeof datasources.Method4D;
5
- restRequest: typeof datasources.restRequest;
6
- Utils: typeof datasources.Utils;
7
- $$datastores: {
8
- [dsName: string]: datasources.DataStore;
9
- };
10
- $4d: { [key: string]: (...params: any) => void } | undefined;
11
- }
1
+ interface Window {
2
+ pagesense?: [string, string][];
3
+ DataSource: typeof datasources.DataSource;
4
+ Method4D: typeof datasources.Method4D;
5
+ restRequest: typeof datasources.restRequest;
6
+ Utils: typeof datasources.Utils;
7
+ $$datastores: {
8
+ [dsName: string]: datasources.DataStore;
9
+ };
10
+ $4d: { [key: string]: (...params: any) => void } | undefined;
11
+ }