sccoreui 6.1.48 → 6.1.50
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.
package/dist/App.js
CHANGED
|
@@ -5,6 +5,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
require("./App.scss");
|
|
6
6
|
// import Home from "./pages/home";
|
|
7
7
|
const App = () => {
|
|
8
|
-
return ((0, jsx_runtime_1.jsx)("div", {
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("div", {}));
|
|
9
9
|
};
|
|
10
10
|
exports.default = App;
|
|
@@ -173,8 +173,8 @@ const autoGroupColumnDef = (isTreeEnable, headerName) => {
|
|
|
173
173
|
else {
|
|
174
174
|
return {
|
|
175
175
|
headerName: headerName ? headerName : "Group",
|
|
176
|
-
field: "group",
|
|
177
|
-
cellRenderer: "agGroupCellRenderer",
|
|
176
|
+
// field: "group",
|
|
177
|
+
// cellRenderer: "agGroupCellRenderer",
|
|
178
178
|
cellRendererParams: {
|
|
179
179
|
suppressCount: true,
|
|
180
180
|
},
|
|
@@ -24,7 +24,7 @@ const InputNumberField = (props) => {
|
|
|
24
24
|
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [optional && (0, jsx_runtime_1.jsxs)("label", Object.assign({ className: "font-medium text-base mb-1 w-full flex justify-content-between", htmlFor: name }, { children: [label, (0, jsx_runtime_1.jsx)("span", Object.assign({ className: "text-base font-medium font-italic text-gray-600" }, { children: "Optional" }))] })), !optional && (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "font-medium text-base mb-1", htmlFor: name }, { children: label })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ name: name, errors: errors, touched: touched, validate: validate }, { children: ({ field }) => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: icon ?
|
|
25
25
|
(0, jsx_runtime_1.jsxs)("span", Object.assign({ className: `p-input-icon-${iconPos}` }, { children: [(0, jsx_runtime_1.jsx)("i", { className: `pi pi-${icon} text-base` }), (0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, Object.assign({ useGrouping: useGrouping, maxFractionDigits: maxFractionDigits ? maxFractionDigits : 0, minFractionDigits: minFractionDigits ? minFractionDigits : 0, inputClassName: inputClassName ? inputClassName : '', min: min, max: max, disabled: disabled, pt: { input: { root: { autoComplete: 'off' } } }, maxLength: maxLength, placeholder: placeholder }, field, { onChange: (e) => setFieldValue(name, e.value !== null ? e.value : min), className: ` ${errors[name] && touched[name] ? 'p-invalid' : ''} ${length === 'full' ? 'full_form_field' : 'form_field'} ${className}`, id: name }))] }))
|
|
26
26
|
:
|
|
27
|
-
(0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, Object.assign({ maxFractionDigits: maxFractionDigits ? maxFractionDigits : 0, minFractionDigits: minFractionDigits ? minFractionDigits : 0, inputClassName: inputClassName ? inputClassName : '', min: min, max: max, disabled: disabled, pt: { input: { root: { autoComplete: 'off' } } }, maxLength: maxLength, placeholder: placeholder }, field, { onChange: (e) => setFieldValue(name, e.value !== null ? e.value : min), className: ` ${errors[name] && touched[name] ? 'p-invalid' : ''} ${length === 'full' ? 'full_form_field' : 'form_field'} ${className}`, id: name })) })) })), errors[name] && touched[name] ? ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'errorField flex align-items-center text-sm' }, { children: (0, jsx_runtime_1.jsx)("span", { children: errors[name] }) }))) : (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'errorField flex align-items-center text-sm' }, { children: (0, jsx_runtime_1.jsx)("span", { children: "\u00A0" }) }))] })
|
|
27
|
+
(0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, Object.assign({ useGrouping: useGrouping, maxFractionDigits: maxFractionDigits ? maxFractionDigits : 0, minFractionDigits: minFractionDigits ? minFractionDigits : 0, inputClassName: inputClassName ? inputClassName : '', min: min, max: max, disabled: disabled, pt: { input: { root: { autoComplete: 'off' } } }, maxLength: maxLength, placeholder: placeholder }, field, { onChange: (e) => setFieldValue(name, e.value !== null ? e.value : min), className: ` ${errors[name] && touched[name] ? 'p-invalid' : ''} ${length === 'full' ? 'full_form_field' : 'form_field'} ${className}`, id: name })) })) })), errors[name] && touched[name] ? ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'errorField flex align-items-center text-sm' }, { children: (0, jsx_runtime_1.jsx)("span", { children: errors[name] }) }))) : (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'errorField flex align-items-center text-sm' }, { children: (0, jsx_runtime_1.jsx)("span", { children: "\u00A0" }) }))] })
|
|
28
28
|
:
|
|
29
29
|
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { height: "20px", className: "mb-1 w-5rem" }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: `${className ? className : 'form_field'} ` }, { children: (0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { height: "40px" }) }))] }) })));
|
|
30
30
|
};
|
|
@@ -16,6 +16,8 @@ onChange, footeTemplate, headerTemplate, labelIcon, labelIconPos, label, labelIc
|
|
|
16
16
|
// const [inpValue, setInpValue] = useState<any>();
|
|
17
17
|
const optionsMenuRef = (0, react_1.useRef)();
|
|
18
18
|
// const [checked, setChecked] = useState<boolean>(false);
|
|
19
|
+
const [buttonPosition, setButtonPosition] = (0, react_1.useState)(null);
|
|
20
|
+
const buttonRef = (0, react_1.useRef)(null);
|
|
19
21
|
const onSelectOption = (e) => {
|
|
20
22
|
debugger;
|
|
21
23
|
if (confirmationOption === true)
|
|
@@ -70,24 +72,34 @@ onChange, footeTemplate, headerTemplate, labelIcon, labelIconPos, label, labelIc
|
|
|
70
72
|
// setChecked(!checked);
|
|
71
73
|
// if (onSelectAll) onSelectAll(!checked);
|
|
72
74
|
// }
|
|
75
|
+
// console.log("footer...", footeTemplate)
|
|
76
|
+
// const onMouseLeaveMenu = (e) => {
|
|
77
|
+
// if(optionsMenuRef?.current && !footeTemplate){
|
|
78
|
+
// optionsMenuRef?.current.hide(e)
|
|
79
|
+
// }
|
|
80
|
+
// }
|
|
73
81
|
(0, react_1.useEffect)(() => {
|
|
74
|
-
const handleScroll = () => {
|
|
82
|
+
const handleScroll = (e) => {
|
|
75
83
|
var _a;
|
|
76
|
-
if (
|
|
77
|
-
(_a =
|
|
84
|
+
if (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) {
|
|
85
|
+
const newPosition = (_a = buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().top;
|
|
86
|
+
// Hide overlay if the button position changes from the top
|
|
87
|
+
if (buttonPosition !== null && newPosition !== buttonPosition) {
|
|
88
|
+
if (optionsMenuRef === null || optionsMenuRef === void 0 ? void 0 : optionsMenuRef.current)
|
|
89
|
+
optionsMenuRef.current.hide(e);
|
|
90
|
+
}
|
|
91
|
+
// Update the button position
|
|
92
|
+
setButtonPosition(newPosition);
|
|
78
93
|
}
|
|
79
94
|
};
|
|
80
|
-
|
|
81
|
-
if (configurationPanel) {
|
|
82
|
-
configurationPanel === null || configurationPanel === void 0 ? void 0 : configurationPanel.addEventListener("scroll", handleScroll);
|
|
83
|
-
}
|
|
95
|
+
window.addEventListener("scroll", handleScroll);
|
|
84
96
|
return () => {
|
|
85
|
-
|
|
97
|
+
window.removeEventListener("scroll", handleScroll);
|
|
86
98
|
};
|
|
87
|
-
}, [
|
|
88
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: className }, { children: [(0, jsx_runtime_1.jsx)(menu_1.Menu, { onShow: (e) => onShow && onShow(e), onHide: (e) => onHide && onHide(e), onFocus: (e) => onFocus && onFocus(e), popup: true, ref: optionsMenuRef,
|
|
89
|
-
//
|
|
90
|
-
model: [
|
|
99
|
+
}, [buttonPosition]);
|
|
100
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: className }, { children: [(0, jsx_runtime_1.jsx)(menu_1.Menu, { onShow: (e) => onShow && onShow(e), onHide: (e) => onHide && onHide(e), onFocus: (e) => onFocus && onFocus(e), popup: true, ref: optionsMenuRef,
|
|
101
|
+
// onMouseLeave={onMouseLeaveMenu}
|
|
102
|
+
id: "popup_menu_bottom", className: menuClassName ? menuClassName : "", model: [
|
|
91
103
|
{
|
|
92
104
|
template: () => ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: listBoxParentClassName
|
|
93
105
|
? listBoxParentClassName +
|
|
@@ -96,7 +108,7 @@ onChange, footeTemplate, headerTemplate, labelIcon, labelIconPos, label, labelIc
|
|
|
96
108
|
? listBoxclassName
|
|
97
109
|
: "w-16rem border-none "} `, filterPlaceholder: filterPlaceholder ? filterPlaceholder : "" }), footeTemplate && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: footeTemplate() })] }))),
|
|
98
110
|
},
|
|
99
|
-
] }), !showChips ? ((0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", className: `list_box_button focus:shadow-none p-0 h-max h-auto p-0 mx-2 ${buttonClassName}`, link: link ? true : false, icon: labelIcon ? labelIcon : "", size: labelIconSize ? labelIconSize : "", iconPos: labelIconPos ? labelIconPos : "", label: label, onClick: (event) => optionsMenuRef.current.toggle(event) })) : ((0, jsx_runtime_1.jsxs)("ul", Object.assign({ className: `pl-0 grid row-gap-2 list_box_chips ${chipsParentClassName}` }, { children: [(0, jsx_runtime_1.jsx)("li", Object.assign({ className: `cursor-pointer min-w-max mx-2 max-w-max ${buttonClassName}` }, { children: (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", className: `list_box_button focus:shadow-none p-0 h-max h-auto mx-2`, link: link ? true : false, icon: labelIcon ? labelIcon : "", size: labelIconSize ? labelIconSize : "", iconPos: labelIconPos ? labelIconPos : "", label: label, onClick: (event) => optionsMenuRef.current.toggle(event), "aria-controls": "popup_menu_right", "aria-haspopup": true }) })), selectedItems &&
|
|
111
|
+
] }), !showChips ? ((0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", className: `list_box_button focus:shadow-none p-0 h-max h-auto p-0 mx-2 ${buttonClassName}`, link: link ? true : false, icon: labelIcon ? labelIcon : "", size: labelIconSize ? labelIconSize : "", iconPos: labelIconPos ? labelIconPos : "", label: label, onClick: (event) => optionsMenuRef.current.toggle(event) })) : ((0, jsx_runtime_1.jsxs)("ul", Object.assign({ className: `pl-0 grid row-gap-2 list_box_chips ${chipsParentClassName}` }, { children: [(0, jsx_runtime_1.jsx)("li", Object.assign({ className: `cursor-pointer min-w-max mx-2 max-w-max ${buttonClassName}` }, { children: (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", className: `list_box_button focus:shadow-none p-0 h-max h-auto mx-2`, link: link ? true : false, icon: labelIcon ? labelIcon : "", size: labelIconSize ? labelIconSize : "", iconPos: labelIconPos ? labelIconPos : "", label: label, onClick: (event) => optionsMenuRef.current.toggle(event), "aria-controls": "popup_menu_right", "aria-haspopup": true, ref: buttonRef }) })), selectedItems &&
|
|
100
112
|
(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.map((item, index) => {
|
|
101
113
|
var _a, _b;
|
|
102
114
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isDraggable !== undefined ? ((0, jsx_runtime_1.jsx)("li", Object.assign({ draggable: isDraggable, onDragStart: (e) => handleDragStart(e, index), onDragOver: (e) => handleDragOver(e), onDrop: (e) => handleDrop(e, index), className: `${chipClassName ? chipClassName : ''} cursor-pointer min-w-max mx-2 max-w-max p-1 flex align-items-center bg-gray-50 text-gray-700 text-base border-1 border-gray-300 border-round-lg ${showRemoveIcon ? "pr-6 relative" : ""}` }, { children: chipTemplate ? (chipTemplate(item)) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { children: [" ", typeof item === "object"
|
|
@@ -10,12 +10,8 @@ export declare const autoGroupColumnDef: (isTreeEnable: any, headerName: any) =>
|
|
|
10
10
|
cellRendererParams: {
|
|
11
11
|
suppressCount: boolean;
|
|
12
12
|
};
|
|
13
|
-
field?: undefined;
|
|
14
|
-
cellRenderer?: undefined;
|
|
15
13
|
} | {
|
|
16
14
|
headerName: any;
|
|
17
|
-
field: string;
|
|
18
|
-
cellRenderer: string;
|
|
19
15
|
cellRendererParams: {
|
|
20
16
|
suppressCount: boolean;
|
|
21
17
|
};
|