sccoreui 4.5.9 → 4.6.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.
@@ -10,7 +10,7 @@ require("froala-editor/js/plugins.pkgd.min.js");
10
10
  // import { SvgComponent } from 'sccoreui';
11
11
  // import SvgComponent from '../../directives/svg-component';
12
12
  // import { Bold, Italic } from '../../assets/svg/svg';
13
- const FroalaTextEditor = ({ onChange, value, placeholderText }) => {
13
+ const FroalaTextEditor = ({ onChange, value, placeholderText, id }) => {
14
14
  const editorRef = (0, react_1.useRef)(null);
15
15
  // const html = ``;
16
16
  const [editorContent, setEditorContent] = (0, react_1.useState)(value);
@@ -33,14 +33,14 @@ const FroalaTextEditor = ({ onChange, value, placeholderText }) => {
33
33
  (0, react_1.useEffect)(() => {
34
34
  if (editorRef.current) {
35
35
  editorRef.current.editor.$el.on('focus', () => {
36
- document.getElementById('fr-text-editor').classList.add('focus-text-editor');
36
+ document.getElementById(id).classList.add('focus-text-editor');
37
37
  });
38
38
  editorRef.current.editor.$el.on('focusout', () => {
39
- document.getElementById('fr-text-editor').classList.remove('focus-text-editor');
39
+ document.getElementById(id).classList.remove('focus-text-editor');
40
40
  });
41
41
  }
42
42
  }, []);
43
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'text-editor', id: "fr-text-editor" }, { children: (0, jsx_runtime_1.jsx)(react_froala_wysiwyg_1.default, { tag: "textarea", config: {
43
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'text-editor', id: id }, { children: (0, jsx_runtime_1.jsx)(react_froala_wysiwyg_1.default, { tag: "textarea", config: {
44
44
  fontFamilySelection: true,
45
45
  fontFamily: {
46
46
  'Arial,Helvetica,sans-serif': 'sans-serif',
@@ -5,7 +5,7 @@ const listbox_1 = require("primereact/listbox");
5
5
  const menu_1 = require("primereact/menu");
6
6
  const react_1 = require("react");
7
7
  const sccoreui_1 = require("sccoreui");
8
- const ListBoxDropdown = ({ onChange, footeTemplate, headerTemplate, labelIcon, labelIconPos, label, labelIconSize, listItems, filter, multiple, filterPlaceholder, optionLabel, listClassName, menuClassName, listBoxParentClassName, listBoxclassName, optionTemplate, values }) => {
8
+ const ListBoxDropdown = ({ onChange, footeTemplate, headerTemplate, labelIcon, labelIconPos, label, labelIconSize, listItems, filter, multiple, filterPlaceholder, optionLabel, listClassName, menuClassName, listBoxParentClassName, listBoxclassName, optionTemplate, values, link }) => {
9
9
  const [selectedCities, setSelectedCities] = (0, react_1.useState)(values);
10
10
  const optionsMenuRef = (0, react_1.useRef)();
11
11
  const onSelectOption = (e) => {
@@ -19,6 +19,6 @@ const ListBoxDropdown = ({ onChange, footeTemplate, headerTemplate, labelIcon, l
19
19
  :
20
20
  (0, jsx_runtime_1.jsx)("span", { children: option.name }) }), listClassName: listClassName ? listClassName : '', filter: filter ? true : false, multiple: multiple ? true : false, value: selectedCities, onChange: (e) => onSelectOption(e), options: listItems, optionLabel: optionLabel, className: listBoxclassName ? listBoxclassName : '', filterPlaceholder: filterPlaceholder ? filterPlaceholder : '' }), footeTemplate &&
21
21
  (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: footeTemplate() })] }))
22
- }] }), (0, jsx_runtime_1.jsx)(sccoreui_1.Button, { className: "focus:shadow-none", link: true, icon: labelIcon ? labelIcon : '', size: labelIconSize ? labelIconSize : '', iconPos: labelIconPos ? labelIconPos : '', label: label, onClick: (event) => optionsMenuRef.current.toggle(event) })] }) }));
22
+ }] }), (0, jsx_runtime_1.jsx)(sccoreui_1.Button, { className: "focus:shadow-none", link: link ? true : false, icon: labelIcon ? labelIcon : '', size: labelIconSize ? labelIconSize : '', iconPos: labelIconPos ? labelIconPos : '', label: label, onClick: (event) => optionsMenuRef.current.toggle(event) })] }) }));
23
23
  };
24
24
  exports.default = ListBoxDropdown;
@@ -2,5 +2,5 @@ import 'froala-editor/css/froala_editor.pkgd.min.css';
2
2
  import 'froala-editor/css/froala_style.min.css';
3
3
  import 'froala-editor/js/plugins.pkgd.min.js';
4
4
  import { FroalaTextEditorTypes } from '../types/type';
5
- declare const FroalaTextEditor: ({ onChange, value, placeholderText }: FroalaTextEditorTypes) => import("react/jsx-runtime").JSX.Element;
5
+ declare const FroalaTextEditor: ({ onChange, value, placeholderText, id }: FroalaTextEditorTypes) => import("react/jsx-runtime").JSX.Element;
6
6
  export default FroalaTextEditor;
@@ -1,3 +1,3 @@
1
1
  import { ListBoxDropdownTypes } from "../types/type";
2
- declare const ListBoxDropdown: ({ onChange, footeTemplate, headerTemplate, labelIcon, labelIconPos, label, labelIconSize, listItems, filter, multiple, filterPlaceholder, optionLabel, listClassName, menuClassName, listBoxParentClassName, listBoxclassName, optionTemplate, values }: ListBoxDropdownTypes) => import("react/jsx-runtime").JSX.Element;
2
+ declare const ListBoxDropdown: ({ onChange, footeTemplate, headerTemplate, labelIcon, labelIconPos, label, labelIconSize, listItems, filter, multiple, filterPlaceholder, optionLabel, listClassName, menuClassName, listBoxParentClassName, listBoxclassName, optionTemplate, values, link }: ListBoxDropdownTypes) => import("react/jsx-runtime").JSX.Element;
3
3
  export default ListBoxDropdown;
@@ -163,6 +163,7 @@ export interface FroalaTextEditorTypes {
163
163
  onChange?: any;
164
164
  value: string;
165
165
  placeholderText: string;
166
+ id?: string;
166
167
  }
167
168
  export interface ListBoxDropdownTypes {
168
169
  values: any;
@@ -183,4 +184,5 @@ export interface ListBoxDropdownTypes {
183
184
  labelIconSize?: any;
184
185
  menuClassName?: any;
185
186
  listBoxParentClassName?: any;
187
+ link?: any;
186
188
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "4.5.9",
3
+ "version": "4.6.0",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",