jamespot-react-components 1.0.139 → 1.0.140

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.
@@ -3,14 +3,14 @@ import { Editor } from '@tiptap/react';
3
3
  import { JRCWritableFormInputProps } from '../JRCFormFieldRender';
4
4
  import { EventHandler, EventOrValueHandler } from 'redux-form';
5
5
  import { DataCy } from '../../../../types/dataAttributes';
6
- import { FormRichTextFieldOptionsProps, FormRichTextFieldToobarProps } from '../JRCInputRichText/JRCInputRichText';
6
+ import { FormRichTextFieldOptionsProps, FormRichTextFieldToolbarProps } from '../JRCInputRichText/JRCInputRichText';
7
7
  /**
8
8
  * This component is used with redux-form (studio) and with react-hook-form!!
9
9
  * @deprecated Split react-hook-form version in a dedicated component and use it instead
10
10
  */
11
11
  export declare const MenuBar: ({ editor, toolbarOptions, isFixed, }: {
12
12
  editor: Editor | null;
13
- toolbarOptions: FormRichTextFieldToobarProps[] | '*';
13
+ toolbarOptions: FormRichTextFieldToolbarProps[] | '*';
14
14
  isFixed: boolean;
15
15
  }) => JSX.Element | null;
16
16
  export declare type RichTextValue = {
@@ -7,10 +7,10 @@ import { FieldValues } from 'react-hook-form/dist/types';
7
7
  * validation props: required
8
8
  * @returns JSX.Element
9
9
  */
10
- export declare type FormRichTextFieldToobarProps = 'font-size' | 'text-color' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'list-ul' | 'list-ol' | 'align-left' | 'align-center' | 'align-right' | 'align-justify' | 'link' | 'undo' | 'redo';
10
+ export declare type FormRichTextFieldToolbarProps = 'font-size' | 'text-color' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'list-ul' | 'list-ol' | 'align-left' | 'align-center' | 'align-right' | 'align-justify' | 'link' | 'undo' | 'redo';
11
11
  export declare type FormRichTextFieldOptionsProps = {
12
12
  richTextFixedToolbar: boolean;
13
- richTextCustomToolbar: Array<FormRichTextFieldToobarProps>;
13
+ richTextCustomToolbar: Array<FormRichTextFieldToolbarProps>;
14
14
  richTextHideCharactersCount: boolean;
15
15
  richTextDefaultFontSize: string;
16
16
  richTextFontSize?: string;
@@ -1,6 +1,8 @@
1
1
  import { JRCInputSelectProps } from './JRCInputSelect.types';
2
2
  import { JRCModalProps } from 'components/JRCModal/JRCModal';
3
+ import { BaseAutocomplete } from 'jamespot-user-api';
3
4
  export declare type JRCInputSelectListProps = JRCInputSelectProps & JRCModalProps & {
4
5
  displayModal?: boolean;
6
+ setValues: (name: string, values: BaseAutocomplete[]) => void;
5
7
  };
6
- export declare const JRCInputSelectList: ({ asyncPromise, displayModal, inPlace, width, placeholder, ...props }: JRCInputSelectListProps) => JSX.Element;
8
+ export declare const JRCInputSelectList: ({ asyncPromise, displayModal, inPlace, width, placeholder, setValues, control, name, ...props }: JRCInputSelectListProps) => JSX.Element;
@@ -1,6 +1,8 @@
1
+ import * as React from 'react';
1
2
  import { LimitLinesProps } from '../Common/LimitLines';
2
3
  export declare type JRCHtmlProps = LimitLinesProps & {
3
4
  className?: string;
4
- html: string | undefined;
5
+ as?: React.ElementType | keyof JSX.IntrinsicElements;
6
+ __html: string | undefined;
5
7
  };
6
- export declare const JRCHtml: ({ html, ...props }: JRCHtmlProps) => JSX.Element | null;
8
+ export declare const JRCHtml: ({ __html, ...props }: JRCHtmlProps) => JSX.Element | null;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const ALLOWED_ATTR: string[];
2
+ export declare function sanitizeHtml(dirtyHtml?: string): string;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-react-components",
3
- "version": "1.0.139",
3
+ "version": "1.0.140",
4
4
  "description": "",
5
5
  "main": "./build/jamespot-react-components.js",
6
6
  "types": "./build/src/index.d.ts",
@@ -45,6 +45,7 @@
45
45
  "@testing-library/user-event": "^13.1.8",
46
46
  "@types/chroma-js": "^2.1.3",
47
47
  "@types/classnames": "^2.2.10",
48
+ "@types/dompurify": "^3.0.2",
48
49
  "@types/jest": "^27.0.2",
49
50
  "@types/node": "^20.3.1",
50
51
  "@types/react": "^17.0.2",
@@ -105,7 +106,8 @@
105
106
  "@tiptap/suggestion": "^2.0.3",
106
107
  "chroma-js": "^2.1.1",
107
108
  "classnames": "^2.3.1",
108
- "jamespot-user-api": "^1.0.109",
109
+ "dompurify": "^3.0.5",
110
+ "jamespot-user-api": "^1.0.110",
109
111
  "moment": "^2.29.1",
110
112
  "react": "^17.x",
111
113
  "react-beautiful-dnd": "^13.1.1",
package/pnpm-lock.yaml CHANGED
@@ -33,6 +33,7 @@ specifiers:
33
33
  '@tiptap/suggestion': ^2.0.3
34
34
  '@types/chroma-js': ^2.1.3
35
35
  '@types/classnames': ^2.2.10
36
+ '@types/dompurify': ^3.0.2
36
37
  '@types/jest': ^27.0.2
37
38
  '@types/node': ^20.3.1
38
39
  '@types/react': ^17.0.2
@@ -57,6 +58,7 @@ specifiers:
57
58
  classnames: ^2.3.1
58
59
  cross-env: ^6.0.3
59
60
  css-loader: ^4.2.1
61
+ dompurify: ^3.0.5
60
62
  eslint: ^8.2.0
61
63
  eslint-config-prettier: ^8.3.0
62
64
  eslint-plugin-react-hooks: ^4.6.0
@@ -117,6 +119,7 @@ dependencies:
117
119
  '@tiptap/suggestion': 2.0.3_7qxxgdyo6i4mk7xrbxa2xtsga4
118
120
  chroma-js: 2.4.2
119
121
  classnames: 2.3.2
122
+ dompurify: 3.0.5
120
123
  jamespot-user-api: link:../jamespot-user-api
121
124
  moment: 2.29.4
122
125
  react: 17.0.2
@@ -162,6 +165,7 @@ devDependencies:
162
165
  '@testing-library/user-event': 13.5.0_yxlyej73nftwmh2fiao7paxmlm
163
166
  '@types/chroma-js': 2.4.0
164
167
  '@types/classnames': 2.3.1
168
+ '@types/dompurify': 3.0.2
165
169
  '@types/jest': 27.5.2
166
170
  '@types/node': 20.3.1
167
171
  '@types/react': 17.0.62
@@ -4580,6 +4584,12 @@ packages:
4580
4584
  '@types/node': 20.3.1
4581
4585
  dev: true
4582
4586
 
4587
+ /@types/dompurify/3.0.2:
4588
+ resolution: {integrity: sha512-YBL4ziFebbbfQfH5mlC+QTJsvh0oJUrWbmxKMyEdL7emlHJqGR2Qb34TEFKj+VCayBvjKy3xczMFNhugThUsfQ==}
4589
+ dependencies:
4590
+ '@types/trusted-types': 2.0.3
4591
+ dev: true
4592
+
4583
4593
  /@types/eslint-scope/3.7.4:
4584
4594
  resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==}
4585
4595
  dependencies:
@@ -4936,6 +4946,10 @@ packages:
4936
4946
  resolution: {integrity: sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==}
4937
4947
  dev: false
4938
4948
 
4949
+ /@types/trusted-types/2.0.3:
4950
+ resolution: {integrity: sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==}
4951
+ dev: true
4952
+
4939
4953
  /@types/uglify-js/3.17.1:
4940
4954
  resolution: {integrity: sha512-GkewRA4i5oXacU/n4MA9+bLgt5/L3F1mKrYvFGm7r2ouLXhRKjuWwo9XHNnbx6WF3vlGW21S3fCvgqxvxXXc5g==}
4941
4955
  dependencies:
@@ -7555,6 +7569,10 @@ packages:
7555
7569
  domelementtype: 2.3.0
7556
7570
  dev: true
7557
7571
 
7572
+ /dompurify/3.0.5:
7573
+ resolution: {integrity: sha512-F9e6wPGtY+8KNMRAVfxeCOHU0/NPWMSENNq4pQctuXRqqdEPW7q3CrLbR5Nse044WwacyjHGOMlvNsBe1y6z9A==}
7574
+ dev: false
7575
+
7558
7576
  /domutils/2.8.0:
7559
7577
  resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==}
7560
7578
  dependencies: