sccoreui 5.5.3 → 5.5.5
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.
|
@@ -319,14 +319,14 @@ const FormulaCoponent = (props) => {
|
|
|
319
319
|
switch (optiontype) {
|
|
320
320
|
case "INCREASE_BY_VALUE":
|
|
321
321
|
case "DECREASE_BY_VALUE": {
|
|
322
|
-
return (0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, { onChange: (e) => props === null || props === void 0 ? void 0 : props.onChange(e), placeholder: 'Enter Number', value: props === null || props === void 0 ? void 0 : props.inputValue, className: 'border-none w-8', inputClassName: 'border-none \tfocus:shadow-none' });
|
|
322
|
+
return (0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, { onChange: (e) => (props === null || props === void 0 ? void 0 : props.onChange) && (props === null || props === void 0 ? void 0 : props.onChange(e)), placeholder: 'Enter Number', value: props === null || props === void 0 ? void 0 : props.inputValue, className: 'border-none w-8', inputClassName: 'border-none \tfocus:shadow-none' });
|
|
323
323
|
}
|
|
324
324
|
case "INCREASE_BY_PERCENTAGE":
|
|
325
325
|
case "DECREASE_BY_PERCENTAGE": {
|
|
326
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'w-8 relative' }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'absolute left-0 h-full flex align-items-center px-2' }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "percent-01", size: 16, color: '#344054' }) })), (0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, { onChange: (e) => props === null || props === void 0 ? void 0 : props.onChange(e), placeholder: 'Enter Number', value: props === null || props === void 0 ? void 0 : props.inputValue, className: 'border-none w-full', inputClassName: 'border-none \tpl-8 focus:shadow-none' })] })));
|
|
326
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'w-8 relative' }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'absolute left-0 h-full flex align-items-center px-2' }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "percent-01", size: 16, color: '#344054' }) })), (0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, { onChange: (e) => (props === null || props === void 0 ? void 0 : props.onChange) && (props === null || props === void 0 ? void 0 : props.onChange(e)), placeholder: 'Enter Number', value: props === null || props === void 0 ? void 0 : props.inputValue, className: 'border-none w-full', inputClassName: 'border-none \tpl-8 focus:shadow-none' })] })));
|
|
327
327
|
}
|
|
328
328
|
case "MANUAL": {
|
|
329
|
-
return (0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, { onChange: (e) => props === null || props === void 0 ? void 0 : props.onChange(e), placeholder: 'Enter Number', value: props === null || props === void 0 ? void 0 : props.inputValue, className: 'border-none w-8', inputClassName: 'border-none \tfocus:shadow-none' });
|
|
329
|
+
return (0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, { onChange: (e) => (props === null || props === void 0 ? void 0 : props.onChange) && (props === null || props === void 0 ? void 0 : props.onChange(e)), placeholder: 'Enter Number', value: props === null || props === void 0 ? void 0 : props.inputValue, className: 'border-none w-8', inputClassName: 'border-none \tfocus:shadow-none' });
|
|
330
330
|
}
|
|
331
331
|
case "CALCULATION": {
|
|
332
332
|
const pattern = /[a-f0-9]{24}/g;
|
|
@@ -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, id, className,
|
|
13
|
+
const FroalaTextEditor = ({ onChange, value, placeholderText, id, className, maxLength = 255 }) => {
|
|
14
14
|
const editorRef = (0, react_1.useRef)(null);
|
|
15
15
|
// const html = ``;
|
|
16
16
|
const [editorContent, setEditorContent] = (0, react_1.useState)(value);
|
|
@@ -54,7 +54,7 @@ const FroalaTextEditor = ({ onChange, value, placeholderText, id, className, max
|
|
|
54
54
|
fontFamilyDefaultSelection: 'sans-serif',
|
|
55
55
|
placeholderText: placeholderText,
|
|
56
56
|
key: "5OA4gB3A3B3E3B5D3E3F-11SLJCKHXOSLMc1YGSGb1ZXHSe1CgB5A4D4G4E3C2A12A19A6B4==",
|
|
57
|
-
charCounterMax:
|
|
57
|
+
charCounterMax: maxLength,
|
|
58
58
|
toolbarSticky: false,
|
|
59
59
|
quickInsertEnabled: false,
|
|
60
60
|
toolbarInline: false,
|
|
@@ -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, id, className,
|
|
5
|
+
declare const FroalaTextEditor: ({ onChange, value, placeholderText, id, className, maxLength }: FroalaTextEditorTypes) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default FroalaTextEditor;
|