@lets-events/react 12.2.5 → 12.2.7

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,5 +1,5 @@
1
1
 
2
- > @lets-events/react@12.2.5 build
2
+ > @lets-events/react@12.2.7 build
3
3
  > tsup src/index.tsx --format esm,cjs --dts --external react
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -9,11 +9,11 @@
9
9
  CLI Target: es6
10
10
  ESM Build start
11
11
  CJS Build start
12
- ESM dist\index.mjs 379.28 KB
13
- ESM ⚡️ Build success in 229ms
14
- CJS dist\index.js 393.23 KB
15
- CJS ⚡️ Build success in 230ms
12
+ CJS dist\index.js 393.82 KB
13
+ CJS ⚡️ Build success in 950ms
14
+ ESM dist\index.mjs 379.87 KB
15
+ ESM ⚡️ Build success in 951ms
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 4553ms
18
- DTS dist\index.d.mts 389.04 KB
19
- DTS dist\index.d.ts 389.04 KB
17
+ DTS ⚡️ Build success in 5292ms
18
+ DTS dist\index.d.mts 389.16 KB
19
+ DTS dist\index.d.ts 389.16 KB
package/CHANGELOG.md CHANGED
@@ -1,10 +1,22 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.2.7
4
+
5
+ ### Patch Changes
6
+
7
+ - fix button background prop
8
+
9
+ ## 12.2.6
10
+
11
+ ### Patch Changes
12
+
13
+ - RichEditorFormField props
14
+
3
15
  ## 12.2.5
4
16
 
5
17
  ### Patch Changes
6
18
 
7
- - fix outlined bg color
19
+ - Fix RichEditor
8
20
 
9
21
  ## 12.2.4
10
22
 
package/dist/index.d.mts CHANGED
@@ -5055,7 +5055,7 @@ type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
5055
5055
  title: string;
5056
5056
  children?: ReactNode;
5057
5057
  goBackIcon?: ReactNode;
5058
- goBackAction: () => void;
5058
+ goBackAction?: () => void;
5059
5059
  };
5060
5060
  declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, goBackIcon, goBackAction }: DrawerProps): react_jsx_runtime.JSX.Element | null;
5061
5061
 
@@ -14734,6 +14734,7 @@ interface RichEditorProps {
14734
14734
  simpleVersion?: boolean;
14735
14735
  onCharacterCountChange?: (count: number) => void;
14736
14736
  maxLength?: number;
14737
+ disableVideo?: boolean;
14737
14738
  }
14738
14739
  declare const RichEditor: (props: RichEditorProps) => react_jsx_runtime.JSX.Element | null;
14739
14740
 
@@ -14744,9 +14745,11 @@ type RichEditorFormFieldProps = Omit<RichEditorProps, "value" | "onChange"> & {
14744
14745
  validate?: (value: string) => boolean | string;
14745
14746
  maxLength?: number;
14746
14747
  validationErrorMessage?: string;
14748
+ simpleVersion?: boolean;
14747
14749
  uploadConfig: RichEditorProps["uploadConfig"];
14750
+ disableVideo?: boolean;
14748
14751
  };
14749
- declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, maxLength, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
14752
+ declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, maxLength, simpleVersion, disableVideo, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
14750
14753
 
14751
14754
  type CalendarFormFieldProps = Omit<CalendarProps, "selected" | "setSelected"> & {
14752
14755
  name: string;
package/dist/index.d.ts CHANGED
@@ -5055,7 +5055,7 @@ type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
5055
5055
  title: string;
5056
5056
  children?: ReactNode;
5057
5057
  goBackIcon?: ReactNode;
5058
- goBackAction: () => void;
5058
+ goBackAction?: () => void;
5059
5059
  };
5060
5060
  declare function Drawer({ isOpen, onClose, width, backgroundColor, title, children, goBackIcon, goBackAction }: DrawerProps): react_jsx_runtime.JSX.Element | null;
5061
5061
 
@@ -14734,6 +14734,7 @@ interface RichEditorProps {
14734
14734
  simpleVersion?: boolean;
14735
14735
  onCharacterCountChange?: (count: number) => void;
14736
14736
  maxLength?: number;
14737
+ disableVideo?: boolean;
14737
14738
  }
14738
14739
  declare const RichEditor: (props: RichEditorProps) => react_jsx_runtime.JSX.Element | null;
14739
14740
 
@@ -14744,9 +14745,11 @@ type RichEditorFormFieldProps = Omit<RichEditorProps, "value" | "onChange"> & {
14744
14745
  validate?: (value: string) => boolean | string;
14745
14746
  maxLength?: number;
14746
14747
  validationErrorMessage?: string;
14748
+ simpleVersion?: boolean;
14747
14749
  uploadConfig: RichEditorProps["uploadConfig"];
14750
+ disableVideo?: boolean;
14748
14751
  };
14749
- declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, maxLength, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
14752
+ declare const RichEditorFormField: ({ name, label, required, validate, validationErrorMessage, maxLength, simpleVersion, disableVideo, ...props }: RichEditorFormFieldProps) => react_jsx_runtime.JSX.Element;
14750
14753
 
14751
14754
  type CalendarFormFieldProps = Omit<CalendarProps, "selected" | "setSelected"> & {
14752
14755
  name: string;
package/dist/index.js CHANGED
@@ -12171,6 +12171,7 @@ var QuillComponent = ({
12171
12171
  className,
12172
12172
  uploadConfig,
12173
12173
  simpleVersion = false,
12174
+ disableVideo = false,
12174
12175
  onCharacterCountChange,
12175
12176
  maxLength
12176
12177
  }) => {
@@ -12201,6 +12202,18 @@ var QuillComponent = ({
12201
12202
  clipboard: {
12202
12203
  matchVisual: false
12203
12204
  }
12205
+ } : disableVideo ? {
12206
+ toolbar: [
12207
+ [{ header: [1, 2, false] }],
12208
+ ["bold", "italic", "underline", "strike"],
12209
+ [{ color: [] }, { background: [] }],
12210
+ [{ align: [] }],
12211
+ [{ list: "ordered" }, { list: "bullet" }],
12212
+ ["link", "image"]
12213
+ ],
12214
+ clipboard: {
12215
+ matchVisual: false
12216
+ }
12204
12217
  } : {
12205
12218
  toolbar: [
12206
12219
  [{ header: [1, 2, false] }],
@@ -12360,6 +12373,7 @@ var QuillComponent = ({
12360
12373
  quill.insertText(index, url, "link", url);
12361
12374
  quill.setSelection(index + url.length, 0);
12362
12375
  }
12376
+ onChange == null ? void 0 : onChange(formatHTML(quill.root.innerHTML));
12363
12377
  setLinkUrl("");
12364
12378
  setShowLinkModal(false);
12365
12379
  }, [linkUrl, quill]);
@@ -12396,6 +12410,7 @@ var QuillComponent = ({
12396
12410
  const insertIndex = selection ? selection.index : quill.getLength();
12397
12411
  quill.clipboard.dangerouslyPasteHTML(insertIndex, videoHTML);
12398
12412
  quill.setSelection(insertIndex + 1, 0);
12413
+ onChange == null ? void 0 : onChange(formatHTML(quill.root.innerHTML));
12399
12414
  setVideoUrl("");
12400
12415
  setShowVideoModal(false);
12401
12416
  }, [videoUrl, quill]);
@@ -12580,14 +12595,18 @@ var RichEditorFormField = (_a) => {
12580
12595
  required,
12581
12596
  validate,
12582
12597
  validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
12583
- maxLength
12598
+ maxLength,
12599
+ simpleVersion = false,
12600
+ disableVideo = false
12584
12601
  } = _b, props = __objRest(_b, [
12585
12602
  "name",
12586
12603
  "label",
12587
12604
  "required",
12588
12605
  "validate",
12589
12606
  "validationErrorMessage",
12590
- "maxLength"
12607
+ "maxLength",
12608
+ "simpleVersion",
12609
+ "disableVideo"
12591
12610
  ]);
12592
12611
  const { field, fieldState } = (0, import_react_hook_form12.useController)({
12593
12612
  name,
@@ -12639,7 +12658,8 @@ var RichEditorFormField = (_a) => {
12639
12658
  onChange: field.onChange,
12640
12659
  "aria-labelledby": `${name}-label`,
12641
12660
  onCharacterCountChange: handleCharacterCountChange,
12642
- maxLength
12661
+ maxLength,
12662
+ disableVideo
12643
12663
  })
12644
12664
  ),
12645
12665
  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorFormMessage, { message: errorMsg })
package/dist/index.mjs CHANGED
@@ -12069,6 +12069,7 @@ var QuillComponent = ({
12069
12069
  className,
12070
12070
  uploadConfig,
12071
12071
  simpleVersion = false,
12072
+ disableVideo = false,
12072
12073
  onCharacterCountChange,
12073
12074
  maxLength
12074
12075
  }) => {
@@ -12099,6 +12100,18 @@ var QuillComponent = ({
12099
12100
  clipboard: {
12100
12101
  matchVisual: false
12101
12102
  }
12103
+ } : disableVideo ? {
12104
+ toolbar: [
12105
+ [{ header: [1, 2, false] }],
12106
+ ["bold", "italic", "underline", "strike"],
12107
+ [{ color: [] }, { background: [] }],
12108
+ [{ align: [] }],
12109
+ [{ list: "ordered" }, { list: "bullet" }],
12110
+ ["link", "image"]
12111
+ ],
12112
+ clipboard: {
12113
+ matchVisual: false
12114
+ }
12102
12115
  } : {
12103
12116
  toolbar: [
12104
12117
  [{ header: [1, 2, false] }],
@@ -12258,6 +12271,7 @@ var QuillComponent = ({
12258
12271
  quill.insertText(index, url, "link", url);
12259
12272
  quill.setSelection(index + url.length, 0);
12260
12273
  }
12274
+ onChange == null ? void 0 : onChange(formatHTML(quill.root.innerHTML));
12261
12275
  setLinkUrl("");
12262
12276
  setShowLinkModal(false);
12263
12277
  }, [linkUrl, quill]);
@@ -12294,6 +12308,7 @@ var QuillComponent = ({
12294
12308
  const insertIndex = selection ? selection.index : quill.getLength();
12295
12309
  quill.clipboard.dangerouslyPasteHTML(insertIndex, videoHTML);
12296
12310
  quill.setSelection(insertIndex + 1, 0);
12311
+ onChange == null ? void 0 : onChange(formatHTML(quill.root.innerHTML));
12297
12312
  setVideoUrl("");
12298
12313
  setShowVideoModal(false);
12299
12314
  }, [videoUrl, quill]);
@@ -12478,14 +12493,18 @@ var RichEditorFormField = (_a) => {
12478
12493
  required,
12479
12494
  validate,
12480
12495
  validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
12481
- maxLength
12496
+ maxLength,
12497
+ simpleVersion = false,
12498
+ disableVideo = false
12482
12499
  } = _b, props = __objRest(_b, [
12483
12500
  "name",
12484
12501
  "label",
12485
12502
  "required",
12486
12503
  "validate",
12487
12504
  "validationErrorMessage",
12488
- "maxLength"
12505
+ "maxLength",
12506
+ "simpleVersion",
12507
+ "disableVideo"
12489
12508
  ]);
12490
12509
  const { field, fieldState } = useController3({
12491
12510
  name,
@@ -12537,7 +12556,8 @@ var RichEditorFormField = (_a) => {
12537
12556
  onChange: field.onChange,
12538
12557
  "aria-labelledby": `${name}-label`,
12539
12558
  onCharacterCountChange: handleCharacterCountChange,
12540
- maxLength
12559
+ maxLength,
12560
+ disableVideo
12541
12561
  })
12542
12562
  ),
12543
12563
  /* @__PURE__ */ jsx53(ErrorFormMessage, { message: errorMsg })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "12.2.5",
3
+ "version": "12.2.7",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -20,7 +20,7 @@ export type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
20
20
  title: string;
21
21
  children?: ReactNode;
22
22
  goBackIcon?: ReactNode;
23
- goBackAction: () => void;
23
+ goBackAction?: () => void;
24
24
  };
25
25
 
26
26
  export function Drawer({
@@ -16,7 +16,9 @@ export type RichEditorFormFieldProps = Omit<
16
16
  validate?: (value: string) => boolean | string;
17
17
  maxLength?: number;
18
18
  validationErrorMessage?: string;
19
+ simpleVersion?: boolean;
19
20
  uploadConfig: RichEditorProps["uploadConfig"];
21
+ disableVideo?: boolean
20
22
  };
21
23
 
22
24
  export const RichEditorFormField = ({
@@ -26,6 +28,8 @@ export const RichEditorFormField = ({
26
28
  validate,
27
29
  validationErrorMessage = "Este campo é obrigatório.",
28
30
  maxLength,
31
+ simpleVersion = false,
32
+ disableVideo = false,
29
33
  ...props
30
34
  }: RichEditorFormFieldProps) => {
31
35
  const { field, fieldState } = useController({
@@ -90,8 +94,8 @@ export const RichEditorFormField = ({
90
94
  aria-labelledby={`${name}-label`}
91
95
  onCharacterCountChange={handleCharacterCountChange}
92
96
  maxLength={maxLength}
97
+ disableVideo={disableVideo}
93
98
  />
94
-
95
99
  <ErrorFormMessage message={errorMsg} />
96
100
  </Flex>
97
101
  );
@@ -15,6 +15,7 @@ const QuillComponent: React.FC<RichEditorProps> = ({
15
15
  className,
16
16
  uploadConfig,
17
17
  simpleVersion = false,
18
+ disableVideo = false,
18
19
  onCharacterCountChange,
19
20
  maxLength,
20
21
  }) => {
@@ -51,7 +52,19 @@ const QuillComponent: React.FC<RichEditorProps> = ({
51
52
  matchVisual: false,
52
53
  },
53
54
  }
54
- : {
55
+ : disableVideo ? {
56
+ toolbar: [
57
+ [{ header: [1, 2, false] }],
58
+ ["bold", "italic", "underline", "strike"],
59
+ [{ color: [] }, { background: [] }],
60
+ [{ align: [] }],
61
+ [{ list: "ordered" }, { list: "bullet" }],
62
+ ["link", "image"],
63
+ ],
64
+ clipboard: {
65
+ matchVisual: false,
66
+ },
67
+ } : {
55
68
  toolbar: [
56
69
  [{ header: [1, 2, false] }],
57
70
  ["bold", "italic", "underline", "strike"],
@@ -231,6 +244,7 @@ const QuillComponent: React.FC<RichEditorProps> = ({
231
244
  quill.insertText(index, url, "link", url);
232
245
  quill.setSelection(index + url.length, 0);
233
246
  }
247
+ onChange?.(formatHTML(quill.root.innerHTML));
234
248
 
235
249
  setLinkUrl("");
236
250
  setShowLinkModal(false);
@@ -273,7 +287,7 @@ const QuillComponent: React.FC<RichEditorProps> = ({
273
287
  const insertIndex = selection ? selection.index : quill.getLength();
274
288
  quill.clipboard.dangerouslyPasteHTML(insertIndex, videoHTML);
275
289
  quill.setSelection(insertIndex + 1, 0);
276
-
290
+ onChange?.(formatHTML(quill.root.innerHTML));
277
291
  setVideoUrl("");
278
292
  setShowVideoModal(false);
279
293
  }, [videoUrl, quill]);
@@ -26,6 +26,7 @@ export interface RichEditorProps {
26
26
  simpleVersion?: boolean;
27
27
  onCharacterCountChange?: (count: number) => void;
28
28
  maxLength?: number;
29
+ disableVideo?: boolean
29
30
  }
30
31
 
31
32
  const RichEditor = (props: RichEditorProps) => {