@lets-events/react 12.1.7 → 12.1.8

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.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- > @lets-events/react@12.1.7 build
3
+ > @lets-events/react@12.1.8 build
4
4
  > tsup src/index.tsx --format esm,cjs --dts --external react
5
5
 
6
6
  CLI Building entry: src/index.tsx
@@ -10,14 +10,14 @@
10
10
  CLI Target: es6
11
11
  ESM Build start
12
12
  CJS Build start
13
- CJS dist/index.js 376.41 KB
14
- CJS ⚡️ Build success in -12208ms
13
+ CJS dist/index.js 375.90 KB
14
+ CJS ⚡️ Build success in 258ms
15
+ ESM dist/QuillComponent-EIWPUIIH.mjs 13.81 KB
15
16
  ESM dist/chunk-TU7LKUXZ.mjs 61.98 KB
16
- ESM dist/index.mjs 277.95 KB
17
- ESM dist/QuillComponent-TLIZCM6V.mjs 13.97 KB
18
- ESM ⚡️ Build success in -12206ms
17
+ ESM dist/index.mjs 277.60 KB
18
+ ESM ⚡️ Build success in 274ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 5916ms
20
+ DTS ⚡️ Build success in 5155ms
21
21
  DTS dist/index.d.mts 388.87 KB
22
22
  DTS dist/index.d.ts 388.87 KB
23
23
  ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.1.8
4
+
5
+ ### Patch Changes
6
+
7
+ - RG mask and validation
8
+
3
9
  ## 12.1.7
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -2139,7 +2139,6 @@ var init_QuillComponent = __esm({
2139
2139
  );
2140
2140
  (0, import_react20.useEffect)(() => {
2141
2141
  if (quill && value) {
2142
- console.log("entrou no quill && value");
2143
2142
  const currentContent = quill.root.innerHTML;
2144
2143
  if (currentContent !== value) {
2145
2144
  const selection = quill.getSelection();
@@ -2158,7 +2157,6 @@ var init_QuillComponent = __esm({
2158
2157
  if (source === "user") {
2159
2158
  const text = quill.getText().trim();
2160
2159
  const count = text.length;
2161
- console.log("entrou no quill && user", maxLength !== void 0, count, maxLength, "count > maxLength");
2162
2160
  if (maxLength !== void 0 && count > maxLength) {
2163
2161
  quill.deleteText(maxLength, count - maxLength);
2164
2162
  return;
@@ -11113,18 +11111,7 @@ var IdentityDocumentNumberFormField = ({
11113
11111
  name,
11114
11112
  label,
11115
11113
  required,
11116
- placeholder: placeholder || "__.___.___-_",
11117
- mask: {
11118
- mask: "__.___.___-_",
11119
- replacement: { _: /[0-9]/ }
11120
- },
11121
- validate: (value) => {
11122
- const cleaned = value.replace(/[^\d]/g, "");
11123
- const isEmpty = cleaned.length === 0;
11124
- if (!required && isEmpty) return true;
11125
- if (cleaned.length >= 3) return true;
11126
- return validationErrorMessage;
11127
- }
11114
+ placeholder: placeholder || "__.___.___-_"
11128
11115
  }
11129
11116
  );
11130
11117
  };
package/dist/index.mjs CHANGED
@@ -8530,18 +8530,7 @@ var IdentityDocumentNumberFormField = ({
8530
8530
  name,
8531
8531
  label,
8532
8532
  required,
8533
- placeholder: placeholder || "__.___.___-_",
8534
- mask: {
8535
- mask: "__.___.___-_",
8536
- replacement: { _: /[0-9]/ }
8537
- },
8538
- validate: (value) => {
8539
- const cleaned = value.replace(/[^\d]/g, "");
8540
- const isEmpty = cleaned.length === 0;
8541
- if (!required && isEmpty) return true;
8542
- if (cleaned.length >= 3) return true;
8543
- return validationErrorMessage;
8544
- }
8533
+ placeholder: placeholder || "__.___.___-_"
8545
8534
  }
8546
8535
  );
8547
8536
  };
@@ -9161,7 +9150,7 @@ import { useController as useController3 } from "react-hook-form";
9161
9150
  // src/components/RichEditor/RichEditor.tsx
9162
9151
  import { lazy, useEffect as useEffect6, useState as useState7, Suspense } from "react";
9163
9152
  import { jsx as jsx46 } from "react/jsx-runtime";
9164
- var QuillComponent = lazy(() => import("./QuillComponent-TLIZCM6V.mjs"));
9153
+ var QuillComponent = lazy(() => import("./QuillComponent-EIWPUIIH.mjs"));
9165
9154
  var RichEditor = (props) => {
9166
9155
  const [isClient, setIsClient] = useState7(false);
9167
9156
  useEffect6(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "12.1.7",
3
+ "version": "12.1.8",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -21,17 +21,6 @@ export const IdentityDocumentNumberFormField = ({
21
21
  label={label}
22
22
  required={required}
23
23
  placeholder={placeholder || "__.___.___-_"}
24
- mask={{
25
- mask: "__.___.___-_",
26
- replacement: { _: /[0-9]/ },
27
- }}
28
- validate={(value: string) => {
29
- const cleaned = value.replace(/[^\d]/g, "");
30
- const isEmpty = cleaned.length === 0;
31
- if (!required && isEmpty) return true;
32
- if (cleaned.length >= 3) return true;
33
- return false || validationErrorMessage;
34
- }}
35
24
  />
36
25
  );
37
26
  };
@@ -114,7 +114,6 @@ const QuillComponent: React.FC<RichEditorProps> = ({
114
114
 
115
115
  useEffect(() => {
116
116
  if (quill && value) {
117
- console.log('entrou no quill && value')
118
117
  const currentContent = quill.root.innerHTML;
119
118
  if (currentContent !== value) {
120
119
  const selection = quill.getSelection();
@@ -135,7 +134,6 @@ const QuillComponent: React.FC<RichEditorProps> = ({
135
134
  if (source === "user") {
136
135
  const text = quill.getText().trim();
137
136
  const count = text.length;
138
- console.log('entrou no quill && user', maxLength !== undefined, count, maxLength, 'count > maxLength')
139
137
 
140
138
  if (maxLength !== undefined && count > maxLength) {
141
139
  quill.deleteText(maxLength, count - maxLength);