@acoustte-digital-services/digitalstore-controls 0.16.0 → 0.17.0
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 +123 -1
- package/dist/index.d.ts +123 -1
- package/dist/index.js +1557 -0
- package/dist/index.mjs +1555 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -25,4 +25,126 @@ declare const ViewControlTypes: {
|
|
|
25
25
|
text: string;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
|
|
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 Session {
|
|
63
|
+
cid: string;
|
|
64
|
+
contactId?: number;
|
|
65
|
+
fullName?: string;
|
|
66
|
+
truncatedPhone?: string;
|
|
67
|
+
userCurrencyCode?: string;
|
|
68
|
+
marketCode?: string;
|
|
69
|
+
oAuthToken?: string;
|
|
70
|
+
refreshToken?: string;
|
|
71
|
+
}
|
|
72
|
+
interface ServiceClientInterface {
|
|
73
|
+
baseUrl: string;
|
|
74
|
+
session: Session;
|
|
75
|
+
post(path: string, data: any): Promise<ActionResponse<any>>;
|
|
76
|
+
get(path: string, params?: {
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
}): Promise<QueryResponse<any>>;
|
|
79
|
+
getSingle<T>(path: string, params?: {
|
|
80
|
+
[key: string]: any;
|
|
81
|
+
}): Promise<SingleResponse<T>>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
interface InputControlProps {
|
|
85
|
+
name: string;
|
|
86
|
+
value?: string | null | number | boolean | undefined;
|
|
87
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
88
|
+
index?: number;
|
|
89
|
+
groupKey?: string;
|
|
90
|
+
controlType: string;
|
|
91
|
+
callback?: InputChangeCallback<any>;
|
|
92
|
+
serviceClient?: ServiceClientInterface;
|
|
93
|
+
disable?: boolean;
|
|
94
|
+
dataSourceDependsOn?: string;
|
|
95
|
+
dependentValue?: string;
|
|
96
|
+
dataSource?: string | any;
|
|
97
|
+
dataKeyFieldName?: string;
|
|
98
|
+
dataTextFieldName?: string;
|
|
99
|
+
dataset?: any[];
|
|
100
|
+
entityType?: string;
|
|
101
|
+
showAsLink?: boolean;
|
|
102
|
+
linkUrlSegment?: string;
|
|
103
|
+
uploadInSharedLocation?: boolean;
|
|
104
|
+
prefix?: string;
|
|
105
|
+
inputClasses?: string;
|
|
106
|
+
createFields?: any[];
|
|
107
|
+
isTenantColor?: boolean;
|
|
108
|
+
onChange?: (value: string | number | boolean | null) => void;
|
|
109
|
+
onBlur?: () => void;
|
|
110
|
+
attributes?: {
|
|
111
|
+
pattern?: string;
|
|
112
|
+
maxLength?: number;
|
|
113
|
+
minLength?: number;
|
|
114
|
+
maxValue?: number;
|
|
115
|
+
minValue?: number;
|
|
116
|
+
readOnly?: boolean;
|
|
117
|
+
disable?: boolean;
|
|
118
|
+
label?: string;
|
|
119
|
+
hintText?: string;
|
|
120
|
+
placeholder?: string;
|
|
121
|
+
required?: boolean;
|
|
122
|
+
errorMessage?: string;
|
|
123
|
+
helpText?: string;
|
|
124
|
+
autoFocus?: boolean;
|
|
125
|
+
heading?: string;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare const InputControl: React.FC<InputControlProps>;
|
|
130
|
+
|
|
131
|
+
declare const InputControlType: {
|
|
132
|
+
lineTextInput: string;
|
|
133
|
+
multilineTextInput: string;
|
|
134
|
+
emailInput: string;
|
|
135
|
+
moneyInput: string;
|
|
136
|
+
select: string;
|
|
137
|
+
percentageInput: string;
|
|
138
|
+
phoneInput: string;
|
|
139
|
+
numberInput: string;
|
|
140
|
+
checkboxInput: string;
|
|
141
|
+
otpInput: string;
|
|
142
|
+
datetimeInput: string;
|
|
143
|
+
timeInput: string;
|
|
144
|
+
colorInput: string;
|
|
145
|
+
selectWithSearchInput: string;
|
|
146
|
+
selectWithSearchPanel: string;
|
|
147
|
+
booleanSelect: string;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export { InputControl, InputControlType, ViewControl, ViewControlTypes };
|
package/dist/index.d.ts
CHANGED
|
@@ -25,4 +25,126 @@ declare const ViewControlTypes: {
|
|
|
25
25
|
text: string;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
|
|
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 Session {
|
|
63
|
+
cid: string;
|
|
64
|
+
contactId?: number;
|
|
65
|
+
fullName?: string;
|
|
66
|
+
truncatedPhone?: string;
|
|
67
|
+
userCurrencyCode?: string;
|
|
68
|
+
marketCode?: string;
|
|
69
|
+
oAuthToken?: string;
|
|
70
|
+
refreshToken?: string;
|
|
71
|
+
}
|
|
72
|
+
interface ServiceClientInterface {
|
|
73
|
+
baseUrl: string;
|
|
74
|
+
session: Session;
|
|
75
|
+
post(path: string, data: any): Promise<ActionResponse<any>>;
|
|
76
|
+
get(path: string, params?: {
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
}): Promise<QueryResponse<any>>;
|
|
79
|
+
getSingle<T>(path: string, params?: {
|
|
80
|
+
[key: string]: any;
|
|
81
|
+
}): Promise<SingleResponse<T>>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
interface InputControlProps {
|
|
85
|
+
name: string;
|
|
86
|
+
value?: string | null | number | boolean | undefined;
|
|
87
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
88
|
+
index?: number;
|
|
89
|
+
groupKey?: string;
|
|
90
|
+
controlType: string;
|
|
91
|
+
callback?: InputChangeCallback<any>;
|
|
92
|
+
serviceClient?: ServiceClientInterface;
|
|
93
|
+
disable?: boolean;
|
|
94
|
+
dataSourceDependsOn?: string;
|
|
95
|
+
dependentValue?: string;
|
|
96
|
+
dataSource?: string | any;
|
|
97
|
+
dataKeyFieldName?: string;
|
|
98
|
+
dataTextFieldName?: string;
|
|
99
|
+
dataset?: any[];
|
|
100
|
+
entityType?: string;
|
|
101
|
+
showAsLink?: boolean;
|
|
102
|
+
linkUrlSegment?: string;
|
|
103
|
+
uploadInSharedLocation?: boolean;
|
|
104
|
+
prefix?: string;
|
|
105
|
+
inputClasses?: string;
|
|
106
|
+
createFields?: any[];
|
|
107
|
+
isTenantColor?: boolean;
|
|
108
|
+
onChange?: (value: string | number | boolean | null) => void;
|
|
109
|
+
onBlur?: () => void;
|
|
110
|
+
attributes?: {
|
|
111
|
+
pattern?: string;
|
|
112
|
+
maxLength?: number;
|
|
113
|
+
minLength?: number;
|
|
114
|
+
maxValue?: number;
|
|
115
|
+
minValue?: number;
|
|
116
|
+
readOnly?: boolean;
|
|
117
|
+
disable?: boolean;
|
|
118
|
+
label?: string;
|
|
119
|
+
hintText?: string;
|
|
120
|
+
placeholder?: string;
|
|
121
|
+
required?: boolean;
|
|
122
|
+
errorMessage?: string;
|
|
123
|
+
helpText?: string;
|
|
124
|
+
autoFocus?: boolean;
|
|
125
|
+
heading?: string;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare const InputControl: React.FC<InputControlProps>;
|
|
130
|
+
|
|
131
|
+
declare const InputControlType: {
|
|
132
|
+
lineTextInput: string;
|
|
133
|
+
multilineTextInput: string;
|
|
134
|
+
emailInput: string;
|
|
135
|
+
moneyInput: string;
|
|
136
|
+
select: string;
|
|
137
|
+
percentageInput: string;
|
|
138
|
+
phoneInput: string;
|
|
139
|
+
numberInput: string;
|
|
140
|
+
checkboxInput: string;
|
|
141
|
+
otpInput: string;
|
|
142
|
+
datetimeInput: string;
|
|
143
|
+
timeInput: string;
|
|
144
|
+
colorInput: string;
|
|
145
|
+
selectWithSearchInput: string;
|
|
146
|
+
selectWithSearchPanel: string;
|
|
147
|
+
booleanSelect: string;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export { InputControl, InputControlType, ViewControl, ViewControlTypes };
|