@colisweb/rescript-toolkit 2.52.0 → 2.54.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "2.52.0",
3
+ "version": "2.54.0",
4
4
  "scripts": {
5
5
  "clean": "rescript clean",
6
6
  "build": "rescript build -with-deps",
@@ -27,7 +27,7 @@
27
27
  "@colisweb/bs-react-intl-extractor-bin": "0.12.2",
28
28
  "@colisweb/react-day-picker": "7.4.16",
29
29
  "@colisweb/restorative": "0.5.1",
30
- "@datadog/browser-rum": "4.14.0",
30
+ "@datadog/browser-rum": "4.21.1",
31
31
  "@reach/accordion": "0.17.0",
32
32
  "@reach/alert-dialog": "0.17.0",
33
33
  "@reach/auto-id": "0.17.0",
@@ -42,48 +42,47 @@
42
42
  "@reach/tooltip": "0.17.0",
43
43
  "@reach/visually-hidden": "0.17.0",
44
44
  "@rescript/react": "0.10.3",
45
- "@tailwindcss/line-clamp": "0.4.0",
46
- "autoprefixer": "10.4.7",
45
+ "@tailwindcss/line-clamp": "0.4.2",
46
+ "autoprefixer": "10.4.12",
47
47
  "axios": "0.24.0",
48
48
  "bs-axios": "0.0.43",
49
49
  "case": "1.6.3",
50
50
  "click-outside-hook": "1.1.0",
51
- "copy-to-clipboard": "3.3.1",
52
- "date-fns": "2.29.0",
53
- "decco": "1.5.0",
51
+ "copy-to-clipboard": "3.3.2",
52
+ "date-fns": "2.29.3",
53
+ "decco": "1.6.0",
54
54
  "dedent": "0.7.0",
55
55
  "downshift": "5.2.5",
56
56
  "lenses-ppx": "6.1.10",
57
57
  "list-selectors": "2.0.1",
58
58
  "lodash": "4.17.21",
59
- "postcss": "8.4.16",
59
+ "postcss": "8.4.17",
60
60
  "postcss-loader": "4.2.0",
61
61
  "postcss-preset-env": "6.7.0",
62
- "prismjs": "1.28.0",
62
+ "prismjs": "1.29.0",
63
63
  "react": "18.2.0",
64
- "react-big-calendar": "1.0.1",
64
+ "react-big-calendar": "1.5.0",
65
65
  "react-datepicker": "3.8.0",
66
66
  "react-dom": "18.2.0",
67
67
  "react-error-boundary": "3.1.4",
68
68
  "react-helmet": "6.1.0",
69
69
  "react-icons": "4.4.0",
70
- "react-intl": "6.0.5",
70
+ "react-intl": "6.1.2",
71
71
  "react-select": "5.4.0",
72
72
  "react-table": "7.8.0",
73
73
  "react-use": "17.4.0",
74
74
  "reason-promise": "1.1.5",
75
75
  "res-react-intl": "3.1.2",
76
76
  "reschema": "1.3.1",
77
- "rescript": "10.0.0",
77
+ "rescript": "10.0.1",
78
78
  "rescript-classnames": "6.0.0",
79
79
  "rescript-react-update": "5.0.0",
80
80
  "sanitize-html": "1.27.4",
81
81
  "swr": "1.3.0",
82
- "tailwindcss": "3.1.4"
82
+ "tailwindcss": "3.1.8"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@babel/core": "7.18.6",
86
- "@sentry/browser": "6.17.6",
87
86
  "@storybook/addon-actions": "6.1.21",
88
87
  "@storybook/addon-essentials": "6.1.21",
89
88
  "@storybook/addon-knobs": "6.1.21",
@@ -93,7 +92,7 @@
93
92
  "@storybook/theming": "6.1.21",
94
93
  "babel-loader": "8.2.5",
95
94
  "highlight.js": "11.3.1",
96
- "husky": "8.0.0",
95
+ "husky": "8.0.1",
97
96
  "is-ci": "3.0.1",
98
97
  "raw-loader": "4.0.2",
99
98
  "react-is": "17.0.2",
@@ -2,8 +2,20 @@ let positiveIntRegex = %re("/^[0-9]+$/")
2
2
  let strictPositiveIntReex = %re("/^[0-9]*[1-9][0-9]*$/")
3
3
  let positiveIntOrFloatRegex = %re("/^[0-9]+(?:\.?[0-9]+)?$/")
4
4
 
5
+ @new
6
+ external makeRegex: string => Js.Re.t = "RegExp"
7
+
5
8
  module Test = {
6
9
  let isPositiveInt = Js.Re.test_(positiveIntRegex, _)
7
10
  let isStrictPositiveInt = Js.Re.test_(strictPositiveIntReex, _)
8
11
  let isPositiveIntOrFloat = Js.Re.test_(positiveIntOrFloatRegex, _)
9
12
  }
13
+
14
+ let isValid = regex => {
15
+ try {
16
+ let _test = makeRegex(regex)
17
+ true
18
+ } catch {
19
+ | _ => false
20
+ }
21
+ }
@@ -0,0 +1,7 @@
1
+ type barcodeOptions = {
2
+ format?: string,
3
+ height?: float,
4
+ fontSize?: float,
5
+ }
6
+ @module("jsbarcode")
7
+ external generate: (string, string, barcodeOptions) => unit = "default"
@@ -1,64 +0,0 @@
1
- module Sentry = {
2
- // init
3
- type initOptions
4
- type integration
5
-
6
- @module("@sentry/tracing") @as("Integrations") @new
7
- external browserTracing: unit => integration = "BrowserTracing"
8
-
9
- @obj
10
- external initOptions: (
11
- ~dsn: string,
12
- ~environment: string,
13
- ~beforeSend: ('a, 'b) => 'c=?,
14
- ~ignoreErrors: array<string>=?,
15
- ~integrations: array<integration>=?,
16
- unit,
17
- ) => initOptions = ""
18
-
19
- @module("@sentry/browser") external init: initOptions => unit = "init"
20
-
21
- // setTag
22
- @module("@sentry/browser")
23
- external setTag: (string, string) => unit = "setTag"
24
-
25
- // addBreadcrumb
26
- type breadcrumbOptions
27
-
28
- @obj
29
- external breadcrumbOptions: (
30
- ~data: option<Js.t<'a>>,
31
- ~category: string,
32
- ~message: string,
33
- ~level: [#fatal | #error | #warning | #info | #debug],
34
- ) => breadcrumbOptions = ""
35
-
36
- @module("@sentry/browser")
37
- external addBreadcrumb: breadcrumbOptions => unit = "addBreadcrumb"
38
-
39
- // setUser
40
- @module("@sentry/browser") external setUser: 'user => unit = "setUser"
41
-
42
- module Scope = {
43
- type t
44
-
45
- @send external setExtra: (t, string, 'a) => unit = "setExtra"
46
- @send external setTag: (t, string, 'a) => unit = "setTag"
47
- @send external setUser: (t, 'a) => unit = "setUser"
48
- }
49
-
50
- // withScope
51
- @module("@sentry/browser")
52
- external withScope: (Scope.t => unit) => unit = "withScope"
53
-
54
- @module("@sentry/browser")
55
- external configureScope: (Scope.t => unit) => unit = "configureScope"
56
-
57
- // captureException
58
- @module("@sentry/browser")
59
- external captureException: Js.Promise.error => unit = "captureException"
60
-
61
- // captureMessage
62
- @module("@sentry/browser")
63
- external captureMessage: string => unit = "captureMessage"
64
- }