sccoreui 5.9.7 → 5.9.9
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.scss +118 -0
- package/dist/components/ag-grid/advancedFeature/advanced-feature.js +1 -1
- package/dist/components/ag-grid/advancedFeature/bulkActions/bulk-actions.js +0 -1
- package/dist/components/ag-grid/advancedFeature/custom-sort.js +2 -2
- package/dist/components/ag-grid/advancedFeature/new-filter/conditions/Conditions.js +8 -8
- package/dist/components/ag-grid/advancedFeature/new-filter/table-filter.js +7 -6
- package/dist/components/ag-grid/advancedFeature/refresh-grid.js +1 -1
- package/dist/components/ag-grid/advancedFeature/remove-items.js +4 -1
- package/dist/components/ag-grid/parent-for-grid.js +0 -1
- package/dist/components/formula-template/FormulaCoponent.js +1 -1
- package/dist/types/components/ag-grid/advancedFeature/bulkActions/bulk-actions.d.ts +0 -1
- package/dist/types/components/ag-grid/advancedFeature/new-filter/table-filter.d.ts +0 -1
- package/dist/types/components/ag-grid/parent-for-grid.d.ts +0 -1
- package/package.json +1 -1
- package/dist/components/ag-grid/advancedFeature/new-filter/TableFilter.module.scss +0 -4
- package/dist/components/ag-grid/ag-grid.scss +0 -61
package/dist/App.scss
CHANGED
|
@@ -1908,3 +1908,121 @@ button[aria-expanded="true"] {
|
|
|
1908
1908
|
background-color: var(--gray-200);
|
|
1909
1909
|
width: 1px;
|
|
1910
1910
|
}
|
|
1911
|
+
|
|
1912
|
+
.p-dropdown-panel .p-dropdown-items {
|
|
1913
|
+
padding-left: 0;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
.p-dropdown-panel .p-dropdown-items .p-dropdown-item {
|
|
1917
|
+
margin-bottom: 0px;
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
.w-25 {
|
|
1921
|
+
width: 25%;
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
/* conditions */
|
|
1925
|
+
.filter-dropdowns {
|
|
1926
|
+
padding: 2px;
|
|
1927
|
+
|
|
1928
|
+
.p-dropdown:not(.p-disabled).p-focus {
|
|
1929
|
+
box-shadow: none !important;
|
|
1930
|
+
}
|
|
1931
|
+
.condtion-dropdown {
|
|
1932
|
+
width: 204px;
|
|
1933
|
+
height: 44px;
|
|
1934
|
+
display: flex;
|
|
1935
|
+
justify-content: center;
|
|
1936
|
+
align-items: center;
|
|
1937
|
+
border: 1px solid var(--gray-300) !important;
|
|
1938
|
+
|
|
1939
|
+
.p-dropdown .p-dropdown-label.p-inputtext {
|
|
1940
|
+
overflow: hidden;
|
|
1941
|
+
text-overflow: ellipsis;
|
|
1942
|
+
white-space: nowrap;
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
.p-inputtext:enabled:focus {
|
|
1946
|
+
outline: 0 none;
|
|
1947
|
+
outline-offset: 0;
|
|
1948
|
+
box-shadow: none !important;
|
|
1949
|
+
border-radius: 8px;
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
.p-inputtext:enabled:focus {
|
|
1953
|
+
outline: 0 none;
|
|
1954
|
+
outline-offset: 0;
|
|
1955
|
+
box-shadow: none !important;
|
|
1956
|
+
border-radius: 8px;
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
.condition-type {
|
|
1963
|
+
width: 120px;
|
|
1964
|
+
height: 44px;
|
|
1965
|
+
|
|
1966
|
+
display: flex;
|
|
1967
|
+
justify-content: center;
|
|
1968
|
+
align-items: center;
|
|
1969
|
+
|
|
1970
|
+
.p-dropdown .p-dropdown-label.p-inputtext {
|
|
1971
|
+
overflow: hidden;
|
|
1972
|
+
text-overflow: ellipsis;
|
|
1973
|
+
white-space: nowrap;
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
.filter-multi-dropdown {
|
|
1978
|
+
.p-multiselect {
|
|
1979
|
+
box-shadow: none !important;
|
|
1980
|
+
border: 1px solid var(--gray-300) !important;
|
|
1981
|
+
border-top-left-radius: 0;
|
|
1982
|
+
border-bottom-left-radius: 0;
|
|
1983
|
+
height: 44px;
|
|
1984
|
+
box-shadow: none !important;
|
|
1985
|
+
width: 204px !important;
|
|
1986
|
+
|
|
1987
|
+
&:focus {
|
|
1988
|
+
border-top-left-radius: 0 !important;
|
|
1989
|
+
border-bottom-left-radius: 0 !important;
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
.filter-calendar {
|
|
1995
|
+
.p-inputtext {
|
|
1996
|
+
border: 1px solid var(--gray-300) !important;
|
|
1997
|
+
border-top-left-radius: 0;
|
|
1998
|
+
border-bottom-left-radius: 0;
|
|
1999
|
+
height: 44px;
|
|
2000
|
+
box-shadow: none !important;
|
|
2001
|
+
|
|
2002
|
+
&:focus {
|
|
2003
|
+
border-top-left-radius: 0 !important;
|
|
2004
|
+
border-bottom-left-radius: 0 !important;
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
.data_table_multi_checkbox {
|
|
2010
|
+
.p-checkbox {
|
|
2011
|
+
vertical-align: baseline;
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
.filter-btn-grid {
|
|
2017
|
+
padding: 10px 16px;
|
|
2018
|
+
}
|
|
2019
|
+
.table-filter-overlay {
|
|
2020
|
+
&:after, &:before {
|
|
2021
|
+
margin-left: -12px !important;
|
|
2022
|
+
}
|
|
2023
|
+
margin-left: -16px;
|
|
2024
|
+
.p-overlaypanel-content {
|
|
2025
|
+
padding: 0;
|
|
2026
|
+
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
@@ -14,7 +14,7 @@ function AdvancedFeatures({ props }) {
|
|
|
14
14
|
const { featureDetails } = (0, react_1.useContext)(context_provider_1.FeatureContext);
|
|
15
15
|
const conditionsToDisplay = props === null || props === void 0 ? void 0 : props.conditionsToDisplay;
|
|
16
16
|
const { bulkActionComponent: BulkAction } = props;
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center justify-content-between py-3 px-4" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center" }, { children: [(conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displaySearch) && ((0, jsx_runtime_1.jsx)(global_search_1.default, { searchPlaceHolder: props === null || props === void 0 ? void 0 : props.placeholder })), (conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displayFilter) && ((0, jsx_runtime_1.jsx)(table_filter_1.default, {}))] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center" }, { children: [(conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displayRemoveItems) && (0, jsx_runtime_1.jsx)(remove_items_1.default, {}), (conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displayBulkAction) &&
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center justify-content-between py-3 px-4" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center gap-3" }, { children: [(conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displaySearch) && ((0, jsx_runtime_1.jsx)(global_search_1.default, { searchPlaceHolder: props === null || props === void 0 ? void 0 : props.placeholder })), (conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displayFilter) && ((0, jsx_runtime_1.jsx)(table_filter_1.default, {}))] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center" }, { children: [(conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displayRemoveItems) && (0, jsx_runtime_1.jsx)(remove_items_1.default, {}), (conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displayBulkAction) &&
|
|
18
18
|
(props === null || props === void 0 ? void 0 : props.bulkActionComponent) && ((0, jsx_runtime_1.jsx)(BulkAction, { checkBoxSelection: featureDetails.checkBoxSelection })), (conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displayRefresh) && (0, jsx_runtime_1.jsx)(refresh_grid_1.default, {}), (conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displaySort) && (0, jsx_runtime_1.jsx)(custom_sort_1.default, {}), (0, jsx_runtime_1.jsx)(record_detail_1.default, {})] }))] })));
|
|
19
19
|
}
|
|
20
20
|
exports.default = AdvancedFeatures;
|
|
@@ -6,7 +6,6 @@ const svg_component_1 = tslib_1.__importDefault(require("../../../../directives/
|
|
|
6
6
|
const overlaypanel_1 = require("primereact/overlaypanel");
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const input_box_1 = tslib_1.__importDefault(require("./input-box"));
|
|
9
|
-
require("./bulk-actions.scss");
|
|
10
9
|
const button_1 = tslib_1.__importDefault(require("../../../button/button"));
|
|
11
10
|
function BulkActions({ columnData }) {
|
|
12
11
|
const [activeOption, setActiveOption] = (0, react_1.useState)({});
|
|
@@ -87,8 +87,8 @@ function Sort() {
|
|
|
87
87
|
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `cursor-pointer p-1 sc_icon_hover flex align-items-center border-round-lg ${isOverlayOpened || featureDetails.sort.isSortable
|
|
88
88
|
? "bg-primary-50"
|
|
89
89
|
: ""}` }, { children: [featureDetails.sort.isSortable && ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "flex align-items-center text-primary-400 px-1" }, { children: `Selected` }))), (0, jsx_runtime_1.jsx)(button_1.Button, { text: true, onClick: (event) => onClickSort(event), icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "switch-vertical-02", size: 20, color: isOverlayOpened || featureDetails.sort.isSortable
|
|
90
|
-
? "
|
|
91
|
-
: "
|
|
90
|
+
? "text-gray-700"
|
|
91
|
+
: "text-gray-700" }) })] })), (0, jsx_runtime_1.jsxs)(overlaypanel_1.OverlayPanel, Object.assign({ ref: showShort, onShow: () => setIsOverlayOpened(true), onHide: () => setIsOverlayOpened(false), className: "w-18rem mt-2" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "p-4 text-lg font-semibold line-height-3 text-gray-900" }, { children: "Column Sorting" })), (0, jsx_runtime_1.jsx)(divider_1.Divider, { className: "m-0" }), (0, jsx_runtime_1.jsx)("ul", Object.assign({ className: "pl-0 m-1 h-10rem overflow-auto" }, { children: columnData === null || columnData === void 0 ? void 0 : columnData.map((eachColumn, index) => {
|
|
92
92
|
if (eachColumn === null || eachColumn === void 0 ? void 0 : eachColumn.isSortable) {
|
|
93
93
|
const isSelected = eachColumn.field === (sortValue === null || sortValue === void 0 ? void 0 : sortValue.field);
|
|
94
94
|
return ((0, jsx_runtime_1.jsxs)("li", Object.assign({ className: `${isSelected && "bg-primary-25"} cursor-pointer border-round-md flex align-items-center gap-2 px-3 py-2 text-base line-height-2 text-gray-700`, style: { listStyleType: "none" }, onClick: () => onSelectSortValue(eachColumn) }, { children: [(0, jsx_runtime_1.jsx)(radiobutton_1.RadioButton, { id: "tableSort", checked: isSelected, type: "circle", value: sortValue }), (0, jsx_runtime_1.jsx)("label", Object.assign({ className: `${isSelected && "text-primary-400 font-semibold"}` }, { children: eachColumn === null || eachColumn === void 0 ? void 0 : eachColumn.headerName }))] }), index));
|
|
@@ -50,7 +50,7 @@ const Condtions = (props) => {
|
|
|
50
50
|
const dataType = (selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.type) ? selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.type : selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.dataType;
|
|
51
51
|
switch (dataType === null || dataType === void 0 ? void 0 : dataType.toLowerCase()) {
|
|
52
52
|
case "string": {
|
|
53
|
-
return ((0, jsx_runtime_1.jsx)(inputtext_1.InputText, { disabled: !condition, className: "condtion-dropdown border-noround-left mb-2 focus:shadow-none", value: value, placeholder: "Enter", onChange: (event) => handleDynamicFieldState(event.target.value) }));
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(inputtext_1.InputText, { disabled: !condition, className: "condtion-dropdown border-noround-left w-12rem mb-2 focus:shadow-none", value: value, placeholder: "Enter", onChange: (event) => handleDynamicFieldState(event.target.value) }));
|
|
54
54
|
}
|
|
55
55
|
case "integer": {
|
|
56
56
|
const handleOnchangeEvent = (eventValue) => {
|
|
@@ -81,7 +81,7 @@ const Condtions = (props) => {
|
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
if ((condition === null || condition === void 0 ? void 0 : condition.code) === "9" || (condition === null || condition === void 0 ? void 0 : condition.code) === "20") {
|
|
84
|
-
return ((0, jsx_runtime_1.jsx)(inputtext_1.InputText, { disabled: !condition, className: "
|
|
84
|
+
return ((0, jsx_runtime_1.jsx)(inputtext_1.InputText, { disabled: !condition, className: "border-noround-left mb-2 w-12rem dropdown-focus-none", value: value.includes(",") ? value.replace(",", "-") : value, placeholder: "Enter", onChange: (event) => handleOnchangeEvent(event.target.value) })
|
|
85
85
|
// <div className="flex">
|
|
86
86
|
// <InputNumber
|
|
87
87
|
// disabled={!condition}
|
|
@@ -100,7 +100,7 @@ const Condtions = (props) => {
|
|
|
100
100
|
// </div>
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
|
-
return ((0, jsx_runtime_1.jsx)(inputtext_1.InputText, { disabled: !condition, className: "
|
|
103
|
+
return ((0, jsx_runtime_1.jsx)(inputtext_1.InputText, { disabled: !condition, className: "border-noround-left w-12rem mb-2 dropdown-focus-none", value: value, type: "number", placeholder: "Enter", onChange: (event) => { var _a; return handleDynamicFieldState((_a = event.target.value) === null || _a === void 0 ? void 0 : _a.replace("-", '')); } }));
|
|
104
104
|
}
|
|
105
105
|
case "single": {
|
|
106
106
|
// let optionValue = selectedColumn?.options.find((each: any) => each[selectedColumn['key']] === value)
|
|
@@ -131,18 +131,18 @@ const Condtions = (props) => {
|
|
|
131
131
|
return ((0, jsx_runtime_1.jsx)(calendar_1.Calendar, { readOnlyInput: true, showTime: false, disabled: !condition, selectionMode: "single", placeholder: "Select", className: "condtion-dropdown border-noround-left mb-2 filter-calendar", value: value, onChange: (event) => handleDynamicFieldState(event.value) }));
|
|
132
132
|
}
|
|
133
133
|
case "multi": {
|
|
134
|
-
return ((0, jsx_runtime_1.jsx)(multi_select_dropdown_1.default, { className: "filter-multi-dropdown mb-2", value: value, hidePanelHeader: true, maxSelectedLabels: 1, onChange: (event) => handleDynamicFieldState(event.value), placeholder: "Select", options: selectedColumn.options, dropdownType: "default", optionLabel: "name" }));
|
|
134
|
+
return ((0, jsx_runtime_1.jsx)(multi_select_dropdown_1.default, { className: "filter-multi-dropdown w-12rem mb-2", value: value, hidePanelHeader: true, maxSelectedLabels: 1, onChange: (event) => handleDynamicFieldState(event.value), placeholder: "Select", options: selectedColumn.options, dropdownType: "default", optionLabel: "name" }));
|
|
135
135
|
}
|
|
136
136
|
case "decimal": {
|
|
137
|
-
return ((0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, { className: "border-noround-left mb-2 filter-input-decimal", value: value, placeholder: "Enter", onChange: (event) => handleDynamicFieldState(event.target.value), maxFractionDigits: 2 }));
|
|
137
|
+
return ((0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, { className: "border-noround-left mb-2 w-12rem filter-input-decimal", value: value, placeholder: "Enter", onChange: (event) => handleDynamicFieldState(event.target.value), maxFractionDigits: 2 }));
|
|
138
138
|
}
|
|
139
139
|
case "percent": {
|
|
140
|
-
return ((0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "condtion-dropdown border-noround-left mb-2 dropdown-focus-none", value: value, options: [], optionLabel: "name", placeholder: "Select", onChange: (event) => handleDynamicFieldState(event.value) }));
|
|
140
|
+
return ((0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "condtion-dropdown border-noround-left w-12rem mb-2 dropdown-focus-none", value: value, options: [], optionLabel: "name", placeholder: "Select", onChange: (event) => handleDynamicFieldState(event.value) }));
|
|
141
141
|
}
|
|
142
142
|
default:
|
|
143
|
-
return ((0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "condtion-dropdown border-noround-left mb-2 dropdown-focus-none", options: [], value: value, optionLabel: "name", placeholder: "Select", disabled: true }));
|
|
143
|
+
return ((0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "condtion-dropdown border-noround-left w-12rem mb-2 dropdown-focus-none", options: [], value: value, optionLabel: "name", placeholder: "Select", disabled: true }));
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex filter-dropdowns align-items-center" }, { children: [index !== 0 ? (0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "condtion-dropdown w-5rem mb-2 mr-2 dropdown-focus-none ", options: conditionTypes, optionLabel: "label", placeholder: "Select", value: conditionType, disabled: index !== 1, onChange: (event) => handleConditionType(event.target.value) }) :
|
|
146
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex filter-dropdowns align-items-center" }, { children: [index !== 0 ? (0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "condtion-dropdown w-5rem mb-2 mr-2 dropdown-focus-none ", options: conditionTypes, optionLabel: "label", placeholder: "Select", value: conditionType, disabled: index !== 1, onChange: (event) => handleConditionType(event.target.value) }) : "", (0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: `condtion-dropdown border-noround-right w-12rem mb-2`, options: columnsArray, optionLabel: "name", placeholder: "Select", value: columnName, onChange: (event) => onUpdateColumnName(event.value) }), (0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "condition-type border-noround mb-2 remove-focus border-x-none w-12rem", options: conditionsArray.filter((each) => each.datatypes.includes(columnName === null || columnName === void 0 ? void 0 : columnName.dataType)).map((option) => { return Object.assign(Object.assign({}, option), { name: option.name.toLowerCase().split(' ').map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(' ') }); }), value: condition, disabled: columnName === '', optionLabel: "name", placeholder: "Select", onChange: (event) => onUpdateCondition(event.value), panelClassName: "w-15rem" }), renderDynamicField(columnName), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex ml-1" }, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ text: true, className: "mb-2 focus:shadow-none", onClick: () => onAddCondtion(index), disabled: false }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "plus-circle", size: 20 }) })), (0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ text: true, disabled: condtionslenght === 1, className: "mb-2 focus:shadow-none", onClick: () => onRemoveCondtion(id) }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "minus-circle", size: 20 }) }))] }))] })));
|
|
147
147
|
};
|
|
148
148
|
exports.default = Condtions;
|
|
@@ -9,7 +9,7 @@ const divider_1 = require("primereact/divider");
|
|
|
9
9
|
const svg_component_1 = tslib_1.__importDefault(require("../../../../directives/svg-component"));
|
|
10
10
|
const constants_1 = tslib_1.__importDefault(require("../../constants"));
|
|
11
11
|
const Conditions_1 = tslib_1.__importDefault(require("./conditions/Conditions"));
|
|
12
|
-
|
|
12
|
+
// import "./TableFilter.module.scss";
|
|
13
13
|
const context_provider_1 = require("../../context-provider");
|
|
14
14
|
const TableFilter = () => {
|
|
15
15
|
const { featureDetails, columnData, conditionType, conditionTypes, globalFilters, setConditionType, setGlobalFilters, setFeatureDetails, callGrid, } = (0, react_1.useContext)(context_provider_1.FeatureContext);
|
|
@@ -95,7 +95,7 @@ const TableFilter = () => {
|
|
|
95
95
|
};
|
|
96
96
|
const renderCondtion = (conditions, key) => {
|
|
97
97
|
const { columnName, condition, value, id } = conditions;
|
|
98
|
-
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex" }, { children: (0, jsx_runtime_1.jsx)(Conditions_1.default, { index: key, setEnbleApply: (value) => setEnbleApply(value), id: id, columnName: columnName, condition: condition, conditionType: conditionType, conditionTypes: conditionTypes, value: value, columnsArray: tableColumns, conditionsArray: constants_1.default.conditionsList, handleConditionType: handleConditionType, updateconditionsArray: updateconditionsArray, addEmptyCondition: addEmptyCondition, removeConditionFromArray: removeConditionFromArray, condtionslenght: conditionsArray.length }, key) })));
|
|
98
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex align-items-center justify-content-end" }, { children: (0, jsx_runtime_1.jsx)(Conditions_1.default, { index: key, setEnbleApply: (value) => setEnbleApply(value), id: id, columnName: columnName, condition: condition, conditionType: conditionType, conditionTypes: conditionTypes, value: value, columnsArray: tableColumns, conditionsArray: constants_1.default.conditionsList, handleConditionType: handleConditionType, updateconditionsArray: updateconditionsArray, addEmptyCondition: addEmptyCondition, removeConditionFromArray: removeConditionFromArray, condtionslenght: conditionsArray.length }, key) })));
|
|
99
99
|
};
|
|
100
100
|
(0, react_1.useEffect)(() => {
|
|
101
101
|
if (conditionsArray.length === 0) {
|
|
@@ -116,14 +116,15 @@ const TableFilter = () => {
|
|
|
116
116
|
});
|
|
117
117
|
setAllFieldsFilled(isAllFieldsFilled && enbleApply);
|
|
118
118
|
}, [conditionsArray, enbleApply]);
|
|
119
|
-
|
|
119
|
+
console.log("filter", (globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length) >= 1);
|
|
120
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `cursor-pointer filter-btn-grid font-semibold sc_icon_hover flex align-items-center gap-2 border-round-lg ${isOverlayOpened ||
|
|
120
121
|
(globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length) >= 1
|
|
121
122
|
? "bg-primary-50"
|
|
122
|
-
: ""}` }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ onClick: (e) => onClickFilter(e) }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "filter-lines", size: 20, color: isOverlayOpened ||
|
|
123
|
+
: "bg-white"}` }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ onClick: (e) => onClickFilter(e) }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "filter-lines", size: 20, color: isOverlayOpened ||
|
|
123
124
|
(globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length) >= 1
|
|
124
125
|
? "#243DC6"
|
|
125
|
-
: "#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-
|
|
126
|
+
: "#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" }, { children: [`${globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length} Selected`, (0, jsx_runtime_1.jsx)("span", Object.assign({ onClick: onresetFilter }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "x-close", size: 18, color: "#243DC6" }) }))] })))] })), (0, jsx_runtime_1.jsx)(overlaypanel_1.OverlayPanel, Object.assign({ ref: showFilter, onShow: () => setIsOverlayOpened(true), onHide: () => setIsOverlayOpened(false), className: "table-filter-overlay" }, { children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-4" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-lg font-semibold line-height-3 text-gray-900" }, { children: "Filters" })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-sm text-gray-600" }, { children: "Streamline Your Search With Filters" }))] })), (0, jsx_runtime_1.jsx)(divider_1.Divider, { className: "w-full p-0 m-0" }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "p-4" }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "max-h-14rem\toverflow-auto" }, { children: conditionsArray.map((eachCondition, index) => {
|
|
126
127
|
return ((0, jsx_runtime_1.jsx)("div", { children: renderCondtion(eachCondition, index) }, index));
|
|
127
|
-
}) })) })), (0, jsx_runtime_1.jsx)(divider_1.Divider, { className: "w-full p-0 m-0" }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-4 flex justify-content-between" }, { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(button_1.Button, { className: "
|
|
128
|
+
}) })) })), (0, jsx_runtime_1.jsx)(divider_1.Divider, { className: "w-full p-0 m-0" }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-4 flex justify-content-between" }, { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(button_1.Button, { text: true, className: "focus:shadow-none", label: "Reset Filter", onClick: onresetFilter }) }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center" }, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { className: "text-base px-2 font-semibold text-primary-400 flex gap-2 p-1 focus:shadow-none mr-3", label: "Create View", onClick: () => "", text: true, iconPos: "left", icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "plus", color: "text-primary-400 mr-2" }) }), (0, jsx_runtime_1.jsx)(button_1.Button, { className: "text-base font-semibold text-gray-600 p-1 focus:shadow-none text-white w-4rem", label: "Apply", onClick: onApplyFilter, disabled: !allFieldsFilled })] }))] }))] }) }))] }));
|
|
128
129
|
};
|
|
129
130
|
exports.default = TableFilter;
|
|
@@ -8,6 +8,6 @@ const svg_component_1 = tslib_1.__importDefault(require("../../../directives/svg
|
|
|
8
8
|
const button_1 = require("primereact/button");
|
|
9
9
|
function RefreshGrid() {
|
|
10
10
|
const { removeFeaturesAndRefresh } = (0, react_1.useContext)(context_provider_1.FeatureContext);
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(button_1.Button, { text: true, onClick: removeFeaturesAndRefresh, icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "refresh-ccw-01" }) }) }));
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(button_1.Button, { text: true, onClick: removeFeaturesAndRefresh, icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "refresh-ccw-01", color: "text-gray-700" }) }) }));
|
|
12
12
|
}
|
|
13
13
|
exports.default = RefreshGrid;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
3
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
5
|
const react_1 = require("react");
|
|
5
6
|
const context_provider_1 = require("../context-provider");
|
|
7
|
+
const button_1 = require("primereact/button");
|
|
8
|
+
const svg_component_1 = tslib_1.__importDefault(require("../../../directives/svg-component"));
|
|
6
9
|
function RemoveItems() {
|
|
7
10
|
const { featureDetails, callGrid } = (0, react_1.useContext)(context_provider_1.FeatureContext);
|
|
8
11
|
const removeItemsCallBack = () => {
|
|
@@ -10,6 +13,6 @@ function RemoveItems() {
|
|
|
10
13
|
currentFeature.isRemoveClicked = true;
|
|
11
14
|
callGrid(currentFeature);
|
|
12
15
|
};
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ onClick: removeItemsCallBack, text: true }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "minus-circle", color: "text-red-800" }) })) }));
|
|
14
17
|
}
|
|
15
18
|
exports.default = RemoveItems;
|
|
@@ -9,7 +9,6 @@ const grid_checkbox_1 = tslib_1.__importDefault(require("./grid-checkbox"));
|
|
|
9
9
|
const context_provider_1 = tslib_1.__importDefault(require("./context-provider"));
|
|
10
10
|
const error_ui_1 = tslib_1.__importDefault(require("./error-ui"));
|
|
11
11
|
const constants_1 = require("./constants");
|
|
12
|
-
require("./ag-grid.scss");
|
|
13
12
|
const loading_component_1 = tslib_1.__importDefault(require("./loading-component"));
|
|
14
13
|
function ParentForGrid(props) {
|
|
15
14
|
const [gridData, setGridData] = (0, react_1.useState)({
|
|
@@ -358,7 +358,7 @@ const FormulaComponent = (props) => {
|
|
|
358
358
|
const onShowMenu = () => {
|
|
359
359
|
if (props === null || props === void 0 ? void 0 : props.formulaValue) {
|
|
360
360
|
let formulatText = "";
|
|
361
|
-
const pattern = /[a-f0-9]{24}/g;
|
|
361
|
+
const pattern = /(?:[a-f0-9]{24}|msrp|map|costprice)/g;
|
|
362
362
|
// const ids = props?.formulaValue.match(pattern);
|
|
363
363
|
// console.log(ids)
|
|
364
364
|
const splitPattern = /(?=[+\-*/%])/g;
|
package/package.json
CHANGED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
.ag-grid-container {
|
|
2
|
-
.ag-root-wrapper {
|
|
3
|
-
&.ag-layout-normal {
|
|
4
|
-
border: 0;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.ag-header {
|
|
10
|
-
background: var(--gray-50);
|
|
11
|
-
|
|
12
|
-
border-top: 1px solid var(--gray-300);
|
|
13
|
-
border-bottom: 1px solid var(--gray-200) !important;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.ag-root-wrapper {
|
|
17
|
-
border-radius: 6px !important;
|
|
18
|
-
border-top-left-radius: 0px !important;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.ag-ltr .ag-cell-focus:not(.ag-cell-range-selected):focus-within {
|
|
22
|
-
border: 0;
|
|
23
|
-
border-color: initial;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.ag-ltr .ag-cell {
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.ag-grid-container {
|
|
32
|
-
border: 1px solid var(--gray-200) !important;
|
|
33
|
-
background: #fff !important;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// .ag-ltr .ag-header-cell-resize {
|
|
37
|
-
// display: none;
|
|
38
|
-
// }
|
|
39
|
-
|
|
40
|
-
.ag-row {
|
|
41
|
-
border-bottom: 1px solid var(--gray-200);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.ag-row-odd {
|
|
45
|
-
background-color: var(--gray-25);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.ag-row {
|
|
49
|
-
&:focus {
|
|
50
|
-
background-color: var(--gray-100);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.ag-theme-quartz {
|
|
55
|
-
--ag-active-color: var(--gray-300);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.ag-ltr .ag-header-viewport .ag-header-cell-resize::after {
|
|
59
|
-
background-color: var(--gray-200);
|
|
60
|
-
width: 1px;
|
|
61
|
-
}
|