sccoreui 6.4.84 → 6.4.85
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/components/ag-grid/advancedFeature/new-filter/table-filter.js +1 -1
- package/dist/components/ag-grid/grid-checkbox.js +2 -2
- package/dist/components/ag-grid/parent-for-grid.js +3 -3
- package/dist/components/form/form-fields/form-fields.js +5 -3
- package/dist/types/components/ag-grid/grid-checkbox.d.ts +1 -0
- package/package.json +1 -1
|
@@ -184,7 +184,7 @@ const TableFilter = () => {
|
|
|
184
184
|
: "bg-white"}`, title: "Apply Filters" }, { children: [(0, jsx_runtime_1.jsx)("div", { id: "advancedFilterParent", className: "hidden" }), (0, jsx_runtime_1.jsxs)("span", Object.assign({ onClick: (e) => !isDisabled && onClickFilter(e), className: "flex zoom_animate", id: "advance-filter-id" }, { children: [(0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "filter-lines", size: 18, color: isVisible ||
|
|
185
185
|
(globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length) >= 1
|
|
186
186
|
? "#243DC6"
|
|
187
|
-
: "#667085" }), (globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length) >= 1 && ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "flex gap-2 align-items-center text-primary-400 pl-2" }, { children: [`${globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length} ${(filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.onSelectedFilter)
|
|
187
|
+
: "#667085" }), (globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length) >= 1 && ((0, jsx_runtime_1.jsxs)("span", Object.assign({ id: "selected-filters", className: "flex gap-2 align-items-center text-primary-400 pl-2" }, { children: [`${globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length} ${(filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.onSelectedFilter)
|
|
188
188
|
? filterModelText.onSelectedFilter
|
|
189
189
|
: "Selected"}`, (0, jsx_runtime_1.jsx)("span", Object.assign({ onClick: (e) => {
|
|
190
190
|
e.preventDefault();
|
|
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const checkbox_1 = require("primereact/checkbox");
|
|
6
6
|
const svg_component_1 = tslib_1.__importDefault(require("../../directives/svg-component"));
|
|
7
|
-
const GridCheckBOx = ({ checked, onChange, isIndeterminate, shouldRenderOnRight, disabled = false }) => {
|
|
8
|
-
return ((0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, { icon: isIndeterminate && (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "minus", color: "#111c5b" }), onChange: onChange, checked: checked, className: `hello ${disabled ? "check-disabled" : ""} ${shouldRenderOnRight ? "custom_grid_checkbox" : "mr-3"} ${isIndeterminate ? "custom_grid_indeterminate" : ""}` }));
|
|
7
|
+
const GridCheckBOx = ({ checked, onChange, isIndeterminate, shouldRenderOnRight, disabled = false, id = "" }) => {
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, { id: id, icon: isIndeterminate && (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "minus", color: "#111c5b" }), onChange: onChange, checked: checked, className: `hello ${disabled ? "check-disabled" : ""} ${shouldRenderOnRight ? "custom_grid_checkbox" : "mr-3"} ${isIndeterminate ? "custom_grid_indeterminate" : ""}` }));
|
|
9
9
|
};
|
|
10
10
|
exports.default = GridCheckBOx;
|
|
@@ -112,10 +112,10 @@ function ParentForGrid(props) {
|
|
|
112
112
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
113
113
|
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: `flex align-items-center justify-content-between ${((_a = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _a === void 0 ? void 0 : _a.displayCheckboxOnRight)
|
|
114
114
|
? "w-full pd-r-2"
|
|
115
|
-
: ""}` }, { children: ((_b = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _b === void 0 ? void 0 : _b.displayCheckboxOnRight) ? ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `flex align-items-center justify-content-between w-full ` }, { children: [HeaderComponent ? ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: " mr-auto" }, { children: [" ", (0, jsx_runtime_1.jsx)(HeaderComponent, {}), " "] }))) : ((0, jsx_runtime_1.jsx)("span", { children: headerDisplayName })), (0, jsx_runtime_1.jsx)(grid_checkbox_1.default, { checked: featureDetails.checkBoxSelection.allBoxChecked, onChange: () => handleHeaderCheckbox(), isIndeterminate: featureDetails.checkBoxSelection.isIndeterminate &&
|
|
115
|
+
: ""}` }, { children: ((_b = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _b === void 0 ? void 0 : _b.displayCheckboxOnRight) ? ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `flex align-items-center justify-content-between w-full ` }, { children: [HeaderComponent ? ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: " mr-auto" }, { children: [" ", (0, jsx_runtime_1.jsx)(HeaderComponent, {}), " "] }))) : ((0, jsx_runtime_1.jsx)("span", { children: headerDisplayName })), (0, jsx_runtime_1.jsx)(grid_checkbox_1.default, { id: "grid-header-checkbox", checked: featureDetails.checkBoxSelection.allBoxChecked, onChange: () => handleHeaderCheckbox(), isIndeterminate: featureDetails.checkBoxSelection.isIndeterminate &&
|
|
116
116
|
(((_d = (_c = featureDetails.checkBoxSelection) === null || _c === void 0 ? void 0 : _c.excludedRecords) === null || _d === void 0 ? void 0 : _d.length) > 0
|
|
117
117
|
? true
|
|
118
|
-
: false), shouldRenderOnRight: (_e = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _e === void 0 ? void 0 : _e.displayCheckboxOnRight })] }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(grid_checkbox_1.default, { checked: featureDetails.checkBoxSelection.allBoxChecked, onChange: () => handleHeaderCheckbox(), isIndeterminate: featureDetails.checkBoxSelection.isIndeterminate &&
|
|
118
|
+
: false), shouldRenderOnRight: (_e = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _e === void 0 ? void 0 : _e.displayCheckboxOnRight })] }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(grid_checkbox_1.default, { id: "grid-header-checkbox", checked: featureDetails.checkBoxSelection.allBoxChecked, onChange: () => handleHeaderCheckbox(), isIndeterminate: featureDetails.checkBoxSelection.isIndeterminate &&
|
|
119
119
|
(((_g = (_f = featureDetails.checkBoxSelection) === null || _f === void 0 ? void 0 : _f.excludedRecords) === null || _g === void 0 ? void 0 : _g.length) > 0
|
|
120
120
|
? true
|
|
121
121
|
: false), shouldRenderOnRight: (_h = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _h === void 0 ? void 0 : _h.displayCheckboxOnRight }), HeaderComponent ? ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "px-3" }, { children: [" ", (0, jsx_runtime_1.jsx)(HeaderComponent, {}), " "] }))) : ((0, jsx_runtime_1.jsx)("span", { children: headerDisplayName }))] })) })));
|
|
@@ -126,7 +126,7 @@ function ParentForGrid(props) {
|
|
|
126
126
|
const { data } = params;
|
|
127
127
|
// const { allBoxChecked, excludedRecords, includedRecords } = featureDetails.checkBoxSelection;
|
|
128
128
|
const isChecked = (0, helper_1.getCheckedStatus)(data, featureDetails, constants_1.GRID_CHECKBOX_STATUS);
|
|
129
|
-
return ((0, jsx_runtime_1.jsx)(grid_checkbox_1.default, { checked: isChecked, disabled: ((_a = params === null || params === void 0 ? void 0 : params.data) === null || _a === void 0 ? void 0 : _a.tagged) || false, onChange: (e) => (0, helper_1.handleCheckboxClick)(e, params, featureDetails, gridData, setFeatureDetails, groupingColumns, setSelectedGroup, selectColumns, serverSideRowLeveSelection), isIndeterminate: false, shouldRenderOnRight: (_b = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _b === void 0 ? void 0 : _b.displayCheckboxOnRight }));
|
|
129
|
+
return ((0, jsx_runtime_1.jsx)(grid_checkbox_1.default, { id: "grid-checkbox", checked: isChecked, disabled: ((_a = params === null || params === void 0 ? void 0 : params.data) === null || _a === void 0 ? void 0 : _a.tagged) || false, onChange: (e) => (0, helper_1.handleCheckboxClick)(e, params, featureDetails, gridData, setFeatureDetails, groupingColumns, setSelectedGroup, selectColumns, serverSideRowLeveSelection), isIndeterminate: false, shouldRenderOnRight: (_b = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _b === void 0 ? void 0 : _b.displayCheckboxOnRight }));
|
|
130
130
|
};
|
|
131
131
|
// Callback to products for getting data
|
|
132
132
|
const getData = (startRow, endRow, currentFeatures, params) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -34,14 +34,16 @@ const InputNumberField = (props) => {
|
|
|
34
34
|
};
|
|
35
35
|
const InputCurrencyField = (props) => {
|
|
36
36
|
const { errors, spanClassName, touched, name, length, label, placeholder, optional, setFieldValue, useGrouping = false, min, max, maxLength, className, validate, disabled, isLoading, inputNumberProps = {}, isRequired = false, value, currenyIcon, } = props;
|
|
37
|
+
const errorData = (0, formik_1.getIn)(errors, name);
|
|
38
|
+
const touchedData = (0, formik_1.getIn)(touched, name);
|
|
37
39
|
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex flex-column" }, { children: !isLoading ? ((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 && (
|
|
38
40
|
// <label className="font-medium text-base mb-1" htmlFor={name}>
|
|
39
41
|
// {label}
|
|
40
42
|
// </label>
|
|
41
|
-
(0, jsx_runtime_1.jsx)(FieldLabel_1.default, { value: value, label: label, error:
|
|
43
|
+
(0, jsx_runtime_1.jsx)(FieldLabel_1.default, { value: value, label: label, error: errorData, touched: touchedData, isRequired: isRequired })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ name: name, errors: errors, touched: touched, validate: validate }, { children: ({ field }) => {
|
|
42
44
|
const { value, name } = field;
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: `${spanClassName} currency_with_input` }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center gap-2 w-full" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "text-lg text-gray-600 font-normal px-2" }, { children: currenyIcon ? currenyIcon : "$" })), (0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, Object.assign({ name: name, value: value, "aria-autocomplete": "none", minFractionDigits: 2, disabled: disabled, min: min, max: max, maxLength: maxLength, onValueChange: (e) => setFieldValue(name, e.value !== null ? e.value : min), maxFractionDigits: 2, placeholder: placeholder, className: ` customNumberField ${errors[name] && touched[name] ? "p-invalid" : ""} ${length === "full" ? "" : ""} ${className}`, id: name, useGrouping: useGrouping }, inputNumberProps))] })), value && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex align-items-center px-2", onClick: () => setFieldValue(name, null) }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "x-close", size: 15, color: "text-gray-600" }) })))] })));
|
|
44
|
-
} })),
|
|
45
|
+
return ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: `${spanClassName} currency_with_input` }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center gap-2 w-full" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "text-lg text-gray-600 font-normal px-2" }, { children: currenyIcon ? currenyIcon : "$" })), (0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, Object.assign({ name: name, value: value, "aria-autocomplete": "none", minFractionDigits: 2, disabled: disabled, min: min, max: max, maxLength: maxLength, onValueChange: (e) => setFieldValue(name, e.value !== null ? e.value : min), maxFractionDigits: 2, placeholder: placeholder, className: ` customNumberField ${errors[name] && touched[name] ? "p-invalid" : ""} ${length === "full" ? "" : ""} ${className}`, id: name, useGrouping: useGrouping }, inputNumberProps))] })), Boolean(value) && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex align-items-center px-2", onClick: () => setFieldValue(name, null) }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "x-close", size: 15, color: "text-gray-600" }) })))] })));
|
|
46
|
+
} })), errorData && touchedData ? ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "errorField flex align-items-center text-sm" }, { children: (0, jsx_runtime_1.jsx)("span", { children: errorData }) }))) : ((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" }) })))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { height: "16px", 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" }) })), (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" }) }))] })) })));
|
|
45
47
|
};
|
|
46
48
|
const InputTextAreaField = (props) => {
|
|
47
49
|
const [charCount, setCharCount] = (0, react_1.useState)(0);
|