@acoustte-digital-services/digitalstore-controls 0.8.0 → 0.8.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.
- package/dist/index.d.mts +144 -3
- package/dist/index.d.ts +144 -3
- package/dist/index.js +7233 -6
- package/dist/index.mjs +7253 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,146 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface ViewControlProps {
|
|
4
|
+
value?: any;
|
|
5
|
+
controlType: string;
|
|
6
|
+
format?: string;
|
|
7
|
+
width?: string;
|
|
8
|
+
apiBaseUrl?: string;
|
|
9
|
+
customProps?: Record<string, any>;
|
|
10
|
+
}
|
|
4
11
|
|
|
5
|
-
|
|
12
|
+
declare const ViewControl: React.FC<ViewControlProps>;
|
|
13
|
+
|
|
14
|
+
declare const ViewControlTypes: {
|
|
15
|
+
lineTextView: string;
|
|
16
|
+
emailTextView: string;
|
|
17
|
+
multilineTextBulletsView: string;
|
|
18
|
+
moneyView: string;
|
|
19
|
+
numberView: string;
|
|
20
|
+
dateView: string;
|
|
21
|
+
statusView: string;
|
|
22
|
+
statusBgView: string;
|
|
23
|
+
multilinetextView: string;
|
|
24
|
+
booleanView: string;
|
|
25
|
+
text: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
interface InputCallbackValues<T> {
|
|
29
|
+
name: keyof T;
|
|
30
|
+
value: T[keyof T];
|
|
31
|
+
index?: number;
|
|
32
|
+
groupKey?: string;
|
|
33
|
+
}
|
|
34
|
+
interface InputChangeCallback<T> {
|
|
35
|
+
(updatedValues: InputCallbackValues<T>): void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface ActionResponse<T> {
|
|
39
|
+
isSuccessful?: boolean;
|
|
40
|
+
message?: string;
|
|
41
|
+
errorNumber?: string;
|
|
42
|
+
result?: T;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface QueryResponse<T> {
|
|
46
|
+
isSuccessful?: boolean;
|
|
47
|
+
message?: string;
|
|
48
|
+
errorNumber?: string;
|
|
49
|
+
result?: T[];
|
|
50
|
+
parent?: T;
|
|
51
|
+
count?: number;
|
|
52
|
+
data?: T[];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface SingleResponse<T> {
|
|
56
|
+
isSuccessful?: boolean;
|
|
57
|
+
message?: string;
|
|
58
|
+
errorNumber?: string;
|
|
59
|
+
result?: T;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface ServiceClientInterface {
|
|
63
|
+
baseUrl: string;
|
|
64
|
+
session: any;
|
|
65
|
+
post(path: string, data: any): Promise<ActionResponse<any>>;
|
|
66
|
+
get(path: string, params?: {
|
|
67
|
+
[key: string]: any;
|
|
68
|
+
}): Promise<QueryResponse<any>>;
|
|
69
|
+
getSingle<T>(path: string, params?: {
|
|
70
|
+
[key: string]: any;
|
|
71
|
+
}): Promise<SingleResponse<T>>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface InputControlProps {
|
|
75
|
+
name: string;
|
|
76
|
+
value?: string | null | number | boolean | undefined;
|
|
77
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
78
|
+
index?: number;
|
|
79
|
+
groupKey?: string;
|
|
80
|
+
controlType: string;
|
|
81
|
+
callback?: InputChangeCallback<any>;
|
|
82
|
+
serviceClient?: ServiceClientInterface;
|
|
83
|
+
disable?: boolean;
|
|
84
|
+
dataSourceDependsOn?: string;
|
|
85
|
+
dependentValue?: string;
|
|
86
|
+
dataSource?: string | any;
|
|
87
|
+
dataKeyFieldName?: string;
|
|
88
|
+
dataTextFieldName?: string;
|
|
89
|
+
dataset?: any[];
|
|
90
|
+
assetsUploadPath?: string;
|
|
91
|
+
entityType?: string;
|
|
92
|
+
showAsLink?: boolean;
|
|
93
|
+
linkUrlSegment?: string;
|
|
94
|
+
uploadInSharedLocation?: boolean;
|
|
95
|
+
prefix?: string;
|
|
96
|
+
inputClasses?: string;
|
|
97
|
+
createFields?: any[];
|
|
98
|
+
isTenantColor?: boolean;
|
|
99
|
+
onChange?: (value: string | number | boolean | null) => void;
|
|
100
|
+
onBlur?: () => void;
|
|
101
|
+
attributes?: {
|
|
102
|
+
pattern?: string;
|
|
103
|
+
maxLength?: number;
|
|
104
|
+
minLength?: number;
|
|
105
|
+
maxValue?: number;
|
|
106
|
+
minValue?: number;
|
|
107
|
+
readOnly?: boolean;
|
|
108
|
+
disable?: boolean;
|
|
109
|
+
label?: string;
|
|
110
|
+
hintText?: string;
|
|
111
|
+
placeholder?: string;
|
|
112
|
+
required?: boolean;
|
|
113
|
+
errorMessage?: string;
|
|
114
|
+
helpText?: string;
|
|
115
|
+
autoFocus?: boolean;
|
|
116
|
+
heading?: string;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
declare const InputControl: React.FC<InputControlProps>;
|
|
121
|
+
|
|
122
|
+
declare const InputControlType: {
|
|
123
|
+
lineTextInput: string;
|
|
124
|
+
multilineTextInput: string;
|
|
125
|
+
emailInput: string;
|
|
126
|
+
moneyInput: string;
|
|
127
|
+
assetUpload: string;
|
|
128
|
+
select: string;
|
|
129
|
+
percentageInput: string;
|
|
130
|
+
phoneInput: string;
|
|
131
|
+
numberInput: string;
|
|
132
|
+
checkboxInput: string;
|
|
133
|
+
richTextInput: string;
|
|
134
|
+
richTextInputCompact: string;
|
|
135
|
+
otpInput: string;
|
|
136
|
+
image: string;
|
|
137
|
+
document: string;
|
|
138
|
+
datetimeInput: string;
|
|
139
|
+
timeInput: string;
|
|
140
|
+
colorInput: string;
|
|
141
|
+
selectWithSearchInput: string;
|
|
142
|
+
selectWithSearchPanel: string;
|
|
143
|
+
booleanSelect: string;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
export { InputControl, InputControlType, ViewControl, ViewControlTypes };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,146 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface ViewControlProps {
|
|
4
|
+
value?: any;
|
|
5
|
+
controlType: string;
|
|
6
|
+
format?: string;
|
|
7
|
+
width?: string;
|
|
8
|
+
apiBaseUrl?: string;
|
|
9
|
+
customProps?: Record<string, any>;
|
|
10
|
+
}
|
|
4
11
|
|
|
5
|
-
|
|
12
|
+
declare const ViewControl: React.FC<ViewControlProps>;
|
|
13
|
+
|
|
14
|
+
declare const ViewControlTypes: {
|
|
15
|
+
lineTextView: string;
|
|
16
|
+
emailTextView: string;
|
|
17
|
+
multilineTextBulletsView: string;
|
|
18
|
+
moneyView: string;
|
|
19
|
+
numberView: string;
|
|
20
|
+
dateView: string;
|
|
21
|
+
statusView: string;
|
|
22
|
+
statusBgView: string;
|
|
23
|
+
multilinetextView: string;
|
|
24
|
+
booleanView: string;
|
|
25
|
+
text: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
interface InputCallbackValues<T> {
|
|
29
|
+
name: keyof T;
|
|
30
|
+
value: T[keyof T];
|
|
31
|
+
index?: number;
|
|
32
|
+
groupKey?: string;
|
|
33
|
+
}
|
|
34
|
+
interface InputChangeCallback<T> {
|
|
35
|
+
(updatedValues: InputCallbackValues<T>): void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface ActionResponse<T> {
|
|
39
|
+
isSuccessful?: boolean;
|
|
40
|
+
message?: string;
|
|
41
|
+
errorNumber?: string;
|
|
42
|
+
result?: T;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface QueryResponse<T> {
|
|
46
|
+
isSuccessful?: boolean;
|
|
47
|
+
message?: string;
|
|
48
|
+
errorNumber?: string;
|
|
49
|
+
result?: T[];
|
|
50
|
+
parent?: T;
|
|
51
|
+
count?: number;
|
|
52
|
+
data?: T[];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface SingleResponse<T> {
|
|
56
|
+
isSuccessful?: boolean;
|
|
57
|
+
message?: string;
|
|
58
|
+
errorNumber?: string;
|
|
59
|
+
result?: T;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface ServiceClientInterface {
|
|
63
|
+
baseUrl: string;
|
|
64
|
+
session: any;
|
|
65
|
+
post(path: string, data: any): Promise<ActionResponse<any>>;
|
|
66
|
+
get(path: string, params?: {
|
|
67
|
+
[key: string]: any;
|
|
68
|
+
}): Promise<QueryResponse<any>>;
|
|
69
|
+
getSingle<T>(path: string, params?: {
|
|
70
|
+
[key: string]: any;
|
|
71
|
+
}): Promise<SingleResponse<T>>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface InputControlProps {
|
|
75
|
+
name: string;
|
|
76
|
+
value?: string | null | number | boolean | undefined;
|
|
77
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
78
|
+
index?: number;
|
|
79
|
+
groupKey?: string;
|
|
80
|
+
controlType: string;
|
|
81
|
+
callback?: InputChangeCallback<any>;
|
|
82
|
+
serviceClient?: ServiceClientInterface;
|
|
83
|
+
disable?: boolean;
|
|
84
|
+
dataSourceDependsOn?: string;
|
|
85
|
+
dependentValue?: string;
|
|
86
|
+
dataSource?: string | any;
|
|
87
|
+
dataKeyFieldName?: string;
|
|
88
|
+
dataTextFieldName?: string;
|
|
89
|
+
dataset?: any[];
|
|
90
|
+
assetsUploadPath?: string;
|
|
91
|
+
entityType?: string;
|
|
92
|
+
showAsLink?: boolean;
|
|
93
|
+
linkUrlSegment?: string;
|
|
94
|
+
uploadInSharedLocation?: boolean;
|
|
95
|
+
prefix?: string;
|
|
96
|
+
inputClasses?: string;
|
|
97
|
+
createFields?: any[];
|
|
98
|
+
isTenantColor?: boolean;
|
|
99
|
+
onChange?: (value: string | number | boolean | null) => void;
|
|
100
|
+
onBlur?: () => void;
|
|
101
|
+
attributes?: {
|
|
102
|
+
pattern?: string;
|
|
103
|
+
maxLength?: number;
|
|
104
|
+
minLength?: number;
|
|
105
|
+
maxValue?: number;
|
|
106
|
+
minValue?: number;
|
|
107
|
+
readOnly?: boolean;
|
|
108
|
+
disable?: boolean;
|
|
109
|
+
label?: string;
|
|
110
|
+
hintText?: string;
|
|
111
|
+
placeholder?: string;
|
|
112
|
+
required?: boolean;
|
|
113
|
+
errorMessage?: string;
|
|
114
|
+
helpText?: string;
|
|
115
|
+
autoFocus?: boolean;
|
|
116
|
+
heading?: string;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
declare const InputControl: React.FC<InputControlProps>;
|
|
121
|
+
|
|
122
|
+
declare const InputControlType: {
|
|
123
|
+
lineTextInput: string;
|
|
124
|
+
multilineTextInput: string;
|
|
125
|
+
emailInput: string;
|
|
126
|
+
moneyInput: string;
|
|
127
|
+
assetUpload: string;
|
|
128
|
+
select: string;
|
|
129
|
+
percentageInput: string;
|
|
130
|
+
phoneInput: string;
|
|
131
|
+
numberInput: string;
|
|
132
|
+
checkboxInput: string;
|
|
133
|
+
richTextInput: string;
|
|
134
|
+
richTextInputCompact: string;
|
|
135
|
+
otpInput: string;
|
|
136
|
+
image: string;
|
|
137
|
+
document: string;
|
|
138
|
+
datetimeInput: string;
|
|
139
|
+
timeInput: string;
|
|
140
|
+
colorInput: string;
|
|
141
|
+
selectWithSearchInput: string;
|
|
142
|
+
selectWithSearchPanel: string;
|
|
143
|
+
booleanSelect: string;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
export { InputControl, InputControlType, ViewControl, ViewControlTypes };
|