@colisweb/rescript-toolkit 4.14.10 → 4.14.12
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/.secure_files/ci-functions-v17.6.0-alpha +2603 -0
- package/.secure_files/ci-functions-v17.6.0-beta +2603 -0
- package/.secure_files/ci-functions-v17.6.1-alpha +2603 -0
- package/package.json +1 -1
- package/src/ui/Toolkit__Ui_SelectWithValidation.res +15 -1
- package/src/ui/Toolkit__Ui_SelectWithValidation.resi +2 -0
- package/src/vendors/DatadogRum.res +23 -20
- package/src/vendors/ReactTable.res +1 -0
package/package.json
CHANGED
|
@@ -10,12 +10,21 @@ type options = array<item>
|
|
|
10
10
|
|
|
11
11
|
module Footer = {
|
|
12
12
|
@react.component
|
|
13
|
-
let make = (
|
|
13
|
+
let make = (
|
|
14
|
+
~onCancel,
|
|
15
|
+
~onValidateClick,
|
|
16
|
+
~validateMessage=?,
|
|
17
|
+
~cancelButtonClassName="",
|
|
18
|
+
~validateButtonClassName="",
|
|
19
|
+
) => {
|
|
14
20
|
let dropdownContext = React.useContext(Toolkit__Ui_Dropdown.dropdownContext)
|
|
15
21
|
|
|
16
22
|
<footer className="bg-white p-1 flex flex-row justify-between">
|
|
17
23
|
<Toolkit__Ui_Button
|
|
18
24
|
type_="button"
|
|
25
|
+
color=#neutralLight
|
|
26
|
+
className={cancelButtonClassName}
|
|
27
|
+
variant=#outline
|
|
19
28
|
onClick={_ => {
|
|
20
29
|
dropdownContext.hide()
|
|
21
30
|
onCancel()
|
|
@@ -25,6 +34,7 @@ module Footer = {
|
|
|
25
34
|
<Toolkit__Ui_Button
|
|
26
35
|
color=#primary
|
|
27
36
|
type_="button"
|
|
37
|
+
className={validateButtonClassName}
|
|
28
38
|
onClick={_ => {
|
|
29
39
|
onValidateClick()
|
|
30
40
|
dropdownContext.hide()
|
|
@@ -78,6 +88,8 @@ let make = (
|
|
|
78
88
|
~placeholder: React.element,
|
|
79
89
|
~buttonClassName="",
|
|
80
90
|
~dropdownClassName="",
|
|
91
|
+
~validateButtonClassName="",
|
|
92
|
+
~cancelButtonClassName="",
|
|
81
93
|
~itemClassName="",
|
|
82
94
|
~searchPlaceholder: option<string>=?,
|
|
83
95
|
~allowFilter=true,
|
|
@@ -152,6 +164,8 @@ let make = (
|
|
|
152
164
|
}}
|
|
153
165
|
?validateMessage
|
|
154
166
|
onValidateClick={() => selectedOption->Option.forEach(onValidate)}
|
|
167
|
+
validateButtonClassName
|
|
168
|
+
cancelButtonClassName
|
|
155
169
|
/>
|
|
156
170
|
</Toolkit__Ui_Dropdown>
|
|
157
171
|
}
|
|
@@ -7,6 +7,8 @@ let make: (
|
|
|
7
7
|
~placeholder: React.element,
|
|
8
8
|
~buttonClassName: string=?,
|
|
9
9
|
~dropdownClassName: string=?,
|
|
10
|
+
~validateButtonClassName: string=?,
|
|
11
|
+
~cancelButtonClassName: string=?,
|
|
10
12
|
~itemClassName: string=?,
|
|
11
13
|
~searchPlaceholder: string=?,
|
|
12
14
|
~allowFilter: bool=?,
|
|
@@ -39,33 +39,36 @@ module Browser = {
|
|
|
39
39
|
|
|
40
40
|
let use = (~options: initOptions, ~sessionData, ~contextCallback=?, ()) => {
|
|
41
41
|
React.useLayoutEffect0(() => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
startSessionReplayRecording()
|
|
42
|
+
if options.env !== "local" {
|
|
43
|
+
datadogRumInit({
|
|
44
|
+
...options,
|
|
45
|
+
site: "datadoghq.com",
|
|
46
|
+
allowedTracingUrls: [%re("/https:\/\/api.*\.colisweb\.com/")],
|
|
47
|
+
allowedTracingOrigins: [
|
|
48
|
+
%re("/https:\/\/api.*\.colisweb\.com/"),
|
|
49
|
+
%re("/https:\/\/bo.*\.colisweb\.com/"),
|
|
50
|
+
],
|
|
51
|
+
trackInteractions: true,
|
|
52
|
+
defaultPrivacyLevel: "allow",
|
|
53
|
+
enableExperimentalFeatures: ["clickmap"],
|
|
54
|
+
})
|
|
56
55
|
|
|
56
|
+
startSessionReplayRecording()
|
|
57
|
+
}
|
|
57
58
|
None
|
|
58
59
|
})
|
|
59
60
|
|
|
60
61
|
React.useLayoutEffect1(() => {
|
|
61
|
-
|
|
62
|
+
if options.env !== "local" {
|
|
63
|
+
setUser(sessionData)
|
|
62
64
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
addRumGlobalContext(
|
|
66
|
+
"screen_resolution",
|
|
67
|
+
`${Browser.screenWidth->Int.toString}x${Browser.screenHeight->Int.toString}`,
|
|
68
|
+
)
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
contextCallback->Option.forEach(fn => fn(addRumGlobalContext))
|
|
71
|
+
}
|
|
69
72
|
|
|
70
73
|
None
|
|
71
74
|
}, [sessionData->Js.Json.stringifyAny])
|