sccoreui 5.7.4 → 5.7.6

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.
Files changed (29) hide show
  1. package/dist/components/ag-grid/AgGrid.js +2 -1
  2. package/dist/components/ag-grid/ParentForGrid.js +54 -8
  3. package/dist/components/ag-grid/Types.js +9 -0
  4. package/dist/components/ag-grid/advancedFeature/advanced-feature.js +14 -0
  5. package/dist/components/ag-grid/advancedFeature/bulkActions/bulk-actions.js +33 -0
  6. package/dist/components/ag-grid/advancedFeature/bulkActions/input-box.js +31 -0
  7. package/dist/components/ag-grid/advancedFeature/custom-sort.js +73 -0
  8. package/dist/components/ag-grid/advancedFeature/filter/filter.js +7 -0
  9. package/dist/components/ag-grid/advancedFeature/filter/querty.js +7 -0
  10. package/dist/components/ag-grid/advancedFeature/global-search.js +17 -0
  11. package/dist/components/ag-grid/advancedFeature/record-detail.js +7 -0
  12. package/dist/components/ag-grid/constants.js +25 -0
  13. package/dist/components/formula-template/FormulaCoponent.js +12 -7
  14. package/dist/types/components/ag-grid/Types.d.ts +15 -2
  15. package/dist/types/components/ag-grid/advancedFeature/advanced-feature.d.ts +8 -0
  16. package/dist/types/components/ag-grid/advancedFeature/bulkActions/bulk-actions.d.ts +4 -0
  17. package/dist/types/components/ag-grid/advancedFeature/bulkActions/input-box.d.ts +4 -0
  18. package/dist/types/components/ag-grid/advancedFeature/custom-sort.d.ts +6 -0
  19. package/dist/types/components/ag-grid/advancedFeature/filter/filter.d.ts +2 -0
  20. package/dist/types/components/ag-grid/advancedFeature/filter/querty.d.ts +2 -0
  21. package/dist/types/components/ag-grid/advancedFeature/global-search.d.ts +6 -0
  22. package/dist/types/components/ag-grid/advancedFeature/record-detail.d.ts +4 -0
  23. package/dist/types/components/ag-grid/constants.d.ts +19 -0
  24. package/dist/types/components/types/type.d.ts +1 -1
  25. package/package.json +2 -1
  26. package/dist/components/ag-grid/RowDetailsRenderer.js +0 -9
  27. package/dist/components/ag-grid/StatusDropdown.js +0 -24
  28. package/dist/types/components/ag-grid/RowDetailsRenderer.d.ts +0 -4
  29. package/dist/types/components/ag-grid/StatusDropdown.d.ts +0 -5
@@ -8,7 +8,8 @@ require("ag-grid-community/styles/ag-theme-quartz.css");
8
8
  const client_side_row_model_1 = require("@ag-grid-community/client-side-row-model");
9
9
  const core_2 = require("@ag-grid-enterprise/core");
10
10
  const range_selection_1 = require("@ag-grid-enterprise/range-selection");
11
- core_1.ModuleRegistry.registerModules([client_side_row_model_1.ClientSideRowModelModule, range_selection_1.RangeSelectionModule]);
11
+ const infinite_row_model_1 = require("@ag-grid-community/infinite-row-model");
12
+ core_1.ModuleRegistry.registerModules([client_side_row_model_1.ClientSideRowModelModule, range_selection_1.RangeSelectionModule, infinite_row_model_1.InfiniteRowModelModule]);
12
13
  core_2.LicenseManager.setLicenseKey("Using_this_{AG_Grid}_Enterprise_key_{AG-056800}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Sellers_Commerce_LLC}_is_granted_a_{Single_Application}_Developer_License_for_the_application_{SellersCommerce}_only_for_{2}_Front-End_JavaScript_developers___All_Front-End_JavaScript_developers_working_on_{SellersCommerce}_need_to_be_licensed___{SellersCommerce}_has_been_granted_a_Deployment_License_Add-on_for_{1}_Production_Environment___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{14_April_2025}____[v3]_[01]_MTc0NDU4NTIwMDAwMA==895f2234e1659afcfba586110daf0549");
13
14
  const AgGrid = ({ style, gridOptions, onGridReady }) => {
14
15
  return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "ag-theme-quartz ", style: { height: style.height, width: style.width } }, { children: (0, jsx_runtime_1.jsx)(react_1.AgGridReact, Object.assign({ onGridReady: onGridReady }, gridOptions)) })) }) }));
@@ -4,6 +4,7 @@ const tslib_1 = require("tslib");
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const AgGrid_1 = tslib_1.__importDefault(require("./AgGrid"));
7
+ const advanced_feature_1 = tslib_1.__importDefault(require("./advancedFeature/advanced-feature"));
7
8
  function ParentForGrid(props) {
8
9
  const [gridData] = (0, react_1.useState)({
9
10
  rowData: props === null || props === void 0 ? void 0 : props.rowData,
@@ -11,24 +12,63 @@ function ParentForGrid(props) {
11
12
  });
12
13
  const [style] = (0, react_1.useState)(props.style);
13
14
  const [api, setApi] = (0, react_1.useState)(null);
15
+ const [gridReadyEvent, setGridReadyEvent] = (0, react_1.useState)();
16
+ const [checkedRow, setCheckedRow] = (0, react_1.useState)([]);
17
+ const [featureDetails, setFeatureDetails] = (0, react_1.useState)({
18
+ searchedText: "",
19
+ filterQueries: [],
20
+ sort: {
21
+ isSortable: false,
22
+ columnToSort: "",
23
+ orderToSort: "",
24
+ },
25
+ bulkAction: {
26
+ columnData: {},
27
+ updatedValue: "",
28
+ },
29
+ });
14
30
  const defaultColDef = (0, react_1.useMemo)(() => {
15
31
  return {
16
32
  flex: 1,
17
33
  minWidth: 100,
18
- editable: true,
19
- filter: true,
20
- sortable: true,
34
+ editable: false,
35
+ filter: false,
36
+ sortable: false,
21
37
  };
22
38
  }, []);
39
+ // Callback to products for getting data
40
+ const getData = (startRow, endRow) => tslib_1.__awaiter(this, void 0, void 0, function* () {
41
+ const response = (yield props.getRowData(startRow, endRow)) || [];
42
+ console.log(response.length, 'length of data');
43
+ return response.rowData;
44
+ });
45
+ // Gets call onLoad,scroll and whenever any featureDetails changed
23
46
  const onGridReady = (params) => {
24
47
  setApi(params.api);
48
+ setGridReadyEvent(params);
49
+ console.log(params, "the Params");
50
+ const dataSource = {
51
+ getRows: (params) => tslib_1.__awaiter(this, void 0, void 0, function* () {
52
+ const startRow = params.startRow;
53
+ const endRow = params.endRow;
54
+ const result = yield getData(startRow, endRow);
55
+ if (result.length > 0) {
56
+ params.successCallback(result, -1);
57
+ }
58
+ else {
59
+ params.failCallback();
60
+ }
61
+ }),
62
+ };
63
+ params.api.setGridOption("datasource", dataSource);
25
64
  };
26
65
  // Get selected checkBox data
27
66
  const onSelectionChanged = () => {
28
67
  if (api) {
29
68
  const selectedNodes = api === null || api === void 0 ? void 0 : api.getSelectedNodes();
30
- const selectedData = selectedNodes.map(node => node.data);
31
- console.log(selectedData, 'selected from checkbox'); // Send a callback to products
69
+ const selectedData = selectedNodes.map((node) => node.data);
70
+ setCheckedRow(selectedData);
71
+ console.log(selectedData, "selected from checkbox"); // Send a callback to products
32
72
  }
33
73
  };
34
74
  // Options that grid should have
@@ -39,10 +79,16 @@ function ParentForGrid(props) {
39
79
  enableRangeSelection: true,
40
80
  suppressMenuHide: false,
41
81
  onSelectionChanged: onSelectionChanged,
42
- rowSelection: 'multiple',
82
+ rowSelection: "multiple",
43
83
  suppressRowClickSelection: true,
44
- rowHeight: 60
84
+ rowHeight: 60,
85
+ rowModelType: "infinite", // Infinite scroll
45
86
  };
46
- return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(AgGrid_1.default, { style: style, gridOptions: gridOptions, onGridReady: onGridReady }) }));
87
+ (0, react_1.useEffect)(() => {
88
+ if (api && gridReadyEvent) {
89
+ onGridReady(gridReadyEvent);
90
+ }
91
+ }, [featureDetails]);
92
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ style: { height: style.height, width: style.width } }, { children: [(0, jsx_runtime_1.jsx)(advanced_feature_1.default, { featureDetails: featureDetails, setFeatureDetails: setFeatureDetails, columnData: gridData.columnData, checkedRow: checkedRow, props: props }), (0, jsx_runtime_1.jsx)(AgGrid_1.default, { style: style, gridOptions: gridOptions, onGridReady: onGridReady })] })));
47
93
  }
48
94
  exports.default = ParentForGrid;
@@ -1,3 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ var columnDatatype;
4
+ (function (columnDatatype) {
5
+ columnDatatype[columnDatatype["STRING"] = 0] = "STRING";
6
+ columnDatatype[columnDatatype["NUMBER"] = 1] = "NUMBER";
7
+ columnDatatype[columnDatatype["BOOLEAN"] = 2] = "BOOLEAN";
8
+ columnDatatype[columnDatatype["SELECT"] = 4] = "SELECT";
9
+ columnDatatype[columnDatatype["CHECKBOX"] = 5] = "CHECKBOX";
10
+ columnDatatype[columnDatatype["MULTISELECT"] = 6] = "MULTISELECT";
11
+ })(columnDatatype || (columnDatatype = {}));
3
12
  // export type { ColDef as gridColType} from "@ag-grid-community/core"
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const global_search_1 = tslib_1.__importDefault(require("./global-search"));
6
+ const custom_sort_1 = tslib_1.__importDefault(require("./custom-sort"));
7
+ const record_detail_1 = tslib_1.__importDefault(require("./record-detail"));
8
+ const bulk_actions_1 = tslib_1.__importDefault(require("./bulkActions/bulk-actions"));
9
+ const filter_1 = tslib_1.__importDefault(require("./filter/filter"));
10
+ function AdvancedFeatures({ featureDetails, setFeatureDetails, columnData, checkedRow, props }) {
11
+ console.log(columnData, setFeatureDetails, 'column data in advanced feature');
12
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex justify-content-between" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex" }, { children: [(0, jsx_runtime_1.jsx)(global_search_1.default, { featureDetails: featureDetails, setFeatureDetails: setFeatureDetails, searchPlaceHolder: props === null || props === void 0 ? void 0 : props.placeholder }), (0, jsx_runtime_1.jsx)(filter_1.default, {})] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex " }, { children: [checkedRow.length > 1 && (0, jsx_runtime_1.jsx)(bulk_actions_1.default, { columnData: columnData }), (0, jsx_runtime_1.jsx)(custom_sort_1.default, { columnData: columnData, featureDetails: featureDetails, setFeatureDetails: setFeatureDetails }), (0, jsx_runtime_1.jsx)(record_detail_1.default, { totalLength: (props === null || props === void 0 ? void 0 : props.totalRowLength) || 100 })] }))] })));
13
+ }
14
+ exports.default = AdvancedFeatures;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const svg_component_1 = tslib_1.__importDefault(require("../../../../directives/svg-component"));
6
+ const overlaypanel_1 = require("primereact/overlaypanel");
7
+ const react_1 = require("react");
8
+ const input_box_1 = tslib_1.__importDefault(require("./input-box"));
9
+ function BulkActions({ columnData }) {
10
+ const [activeOption, setActiveOption] = (0, react_1.useState)({});
11
+ const [bulkOptions, setBulkOptions] = (0, react_1.useState)([]);
12
+ const actionRef = (0, react_1.useRef)(null);
13
+ (0, react_1.useEffect)(() => {
14
+ getColumnsToEdit();
15
+ }, []);
16
+ const getColumnsToEdit = () => {
17
+ const columns = [];
18
+ columnData.filter((col) => {
19
+ if (col.editable) {
20
+ columns.push(col);
21
+ }
22
+ });
23
+ setBulkOptions(columns);
24
+ };
25
+ console.log(columnData, activeOption, 'column data in bulk action');
26
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'cursor-pointer p-1 sc_icon_hover', onClick: (e) => actionRef.current.toggle(e) }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "settings-01", size: 20 }) })), (0, jsx_runtime_1.jsx)(overlaypanel_1.OverlayPanel, Object.assign({ ref: actionRef, className: "w-30rem pb-5" }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "relative pb-5 mb-5" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex align-items-center justify-content-between p-4 border-bottom-1 border-gray-200" }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-lg font-semibold line-height-4 text-gray-900" }, { children: "Bulk Actions " })) })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex border-bottom-1 border-gray-200" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: " border-right-1 px-1 py-4 border-gray-200" }, { children: bulkOptions.map((option, index) => {
27
+ {
28
+ console.log(option, 'option data in map');
29
+ }
30
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: `text-lg px-3 border-round-lg cursor-pointer font-medium line-height-4 text-gray-600 ${(activeOption === null || activeOption === void 0 ? void 0 : activeOption.field) === (option === null || option === void 0 ? void 0 : option.field) ? "bg-primary-50" : ""}`, onClick: () => setActiveOption(option) }, { children: option.headerName }), index));
31
+ }) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "p-4 w-full" }, { children: (0, jsx_runtime_1.jsx)(input_box_1.default, { activeOption: activeOption }) }))] }))] })) }))] }));
32
+ }
33
+ exports.default = BulkActions;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ // import { Button } from "primereact/button"
5
+ const button_1 = require("primereact/button");
6
+ const inputtext_1 = require("primereact/inputtext");
7
+ function BoxOfInput({ activeOption }) {
8
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: " text-gray-900 flex lext-lg font-semibold line-height-4 mb-1 align-items-center" }, { children: ["Change ", activeOption.headerName] })), (0, jsx_runtime_1.jsx)(inputtext_1.InputText, { type: "text", className: "p-inputtext-lg `w-full`", placeholder: activeOption.headerName }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `flex bg-white gap-2 pl-2 pr-2 justify-content-between align-items-center mt-3 absolute ` }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-black font-normal text-base line-height-3" }, { children: " Records selected" })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex gap-2" }, { children: (0, jsx_runtime_1.jsx)(button_1.Button, { outlined: true, text: true, label: "Discard" }) }))] }))] }) })
9
+ // <div>
10
+ // <div className=" text-gray-900 flex lext-lg font-semibold line-height-4 mb-1 align-items-center">Change Status</div>
11
+ // {/* <Dropdown
12
+ // value={selectedStatus}
13
+ // optionLabel="label"
14
+ // placeholder="Select"
15
+ // className={`w-full`}
16
+ // id={'status_dropdown'}
17
+ // onChange={(e: any) => setSelectedStatus(e.target.value)}
18
+ // options={statusList}
19
+ // /> */}
20
+ // <div className={`flex bg-white gap-2 pl-2 pr-2 justify-content-between align-items-center mt-3 absolute ${styles.bottom_sections_positions}`}>
21
+ // <div className="text-black font-normal text-base line-height-3">{selectedColumns.length} Records selected</div>
22
+ // <div className="flex gap-2">
23
+ // <Button outlined text label="Discard" onClick={(event: any) => hideBulkActionRef(event)} />
24
+ // {showLoader && <Button className='cursor-wait text-left w-8rem' ><span className='font-semibold w-full p-disabled'>Please wait</span><img loading='lazy' src={progressBar} alt="loader" className="btn-loader absolute right-0" /></Button>}
25
+ // {!showLoader && <Button label="Assign" id="bulk_status_btn" disabled={!selectedStatus} onClick={(event: any) => handleBulkAction(event, selectedStatus)} />}
26
+ // </div>
27
+ // </div>
28
+ // </div>
29
+ );
30
+ }
31
+ exports.default = BoxOfInput;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const overlaypanel_1 = require("primereact/overlaypanel");
7
+ const divider_1 = require("primereact/divider");
8
+ const radiobutton_1 = require("primereact/radiobutton");
9
+ const button_1 = require("primereact/button");
10
+ const svg_component_1 = tslib_1.__importDefault(require("../../../directives/svg-component"));
11
+ const constants_1 = require("../constants");
12
+ function Sort({ columnData, featureDetails, setFeatureDetails }) {
13
+ var _a;
14
+ const [sortValue, setSortValue] = (0, react_1.useState)(null);
15
+ const [sortBy, setSortBy] = (0, react_1.useState)(null);
16
+ const [isOverlayOpened, setIsOverlayOpened] = (0, react_1.useState)(false);
17
+ const showShort = (0, react_1.useRef)(null);
18
+ const shortType = sortValue === null || sortValue === void 0 ? void 0 : sortValue.dataType;
19
+ const disableApply = (sortBy && sortValue) === null;
20
+ const onClickShort = (event) => {
21
+ showShort.current.toggle(event);
22
+ };
23
+ // Add selected row to state
24
+ const onSelectShortValue = (eachColumn) => {
25
+ if (eachColumn.headerName !== (sortValue === null || sortValue === void 0 ? void 0 : sortValue.headerName)) {
26
+ setSortValue(eachColumn);
27
+ setSortBy(null);
28
+ }
29
+ };
30
+ // Trigger action to apply
31
+ const applyTableSort = (e) => {
32
+ const sortDetails = {
33
+ isSortable: true,
34
+ columnToSort: sortValue.field,
35
+ orderToSort: sortBy,
36
+ };
37
+ console.log(sortBy, 'sort by on apply filter');
38
+ setFeatureDetails(Object.assign(Object.assign({}, featureDetails), { sort: sortDetails }));
39
+ onClickShort(e);
40
+ };
41
+ // Trigger action to clear
42
+ const clearSort = (e) => {
43
+ onClickShort(e);
44
+ setSortBy(null);
45
+ setSortValue(null);
46
+ const sortDetails = {
47
+ isSortable: false,
48
+ columnToSort: "",
49
+ orderToSort: "",
50
+ };
51
+ setFeatureDetails(Object.assign(Object.assign({}, featureDetails), { sort: sortDetails }));
52
+ };
53
+ 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
54
+ ? "bg-primary-50"
55
+ : ""}` }, { 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)("span", Object.assign({ onClick: (event) => onClickShort(event) }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "switch-vertical-02", size: 20, color: isOverlayOpened || featureDetails.sort.isSortable
56
+ ? "#243DC6"
57
+ : "#667085" }) }))] })), (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) => {
58
+ if (eachColumn === null || eachColumn === void 0 ? void 0 : eachColumn.isSortable) {
59
+ const isSelected = eachColumn.field === (sortValue === null || sortValue === void 0 ? void 0 : sortValue.field);
60
+ 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: () => onSelectShortValue(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));
61
+ }
62
+ else {
63
+ return null;
64
+ }
65
+ }) })), (0, jsx_runtime_1.jsx)(divider_1.Divider, { className: "m-0" }), (0, jsx_runtime_1.jsx)("ul", Object.assign({ className: "pl-0 m-1" }, { children: (_a = constants_1.COLUMN_SORT_OPTIONS
66
+ .filter((each) => each.dataType === shortType)) === null || _a === void 0 ? void 0 : _a.map((eachOption, index) => {
67
+ const seletedSort = eachOption.label === (sortBy === null || sortBy === void 0 ? void 0 : sortBy.label);
68
+ return ((0, jsx_runtime_1.jsxs)("li", Object.assign({ className: `${seletedSort && "bg-primary-25"} cursor-pointer border-round-md pl-0 px-3 py-2 flex align-items-center gap-2`, onClick: () => {
69
+ setSortBy(eachOption);
70
+ } }, { children: [(0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: index === 0 ? "arrow-down" : "arrow-up", size: 20 }), (0, jsx_runtime_1.jsx)("span", Object.assign({ className: `${seletedSort && "text-primary-400 font-semibold"} text-gray-700 font-medium text-base` }, { children: eachOption.label }))] }), index));
71
+ }) })), (0, jsx_runtime_1.jsx)(divider_1.Divider, { id: "column_sort" }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex justify-content-between px-5 py-2" }, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ disabled: false, id: "column_sort_dropdown", outlined: true, onClick: (e) => clearSort(e) }, { children: "Clear" })), (0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ disabled: disableApply, id: "column_sort_dropdown", onClick: (e) => applyTableSort(e) }, { children: "Apply" }))] }))] }))] })));
72
+ }
73
+ exports.default = Sort;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ function Filter() {
5
+ return ((0, jsx_runtime_1.jsx)("div", { children: "Filter" }));
6
+ }
7
+ exports.default = Filter;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ function Querty() {
5
+ return ((0, jsx_runtime_1.jsx)("div", { children: "querty" }));
6
+ }
7
+ exports.default = Querty;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const inputtext_1 = require("primereact/inputtext");
6
+ const svg_component_1 = tslib_1.__importDefault(require("../../../directives/svg-component"));
7
+ // import { useState } from "react";
8
+ function Search({ featureDetails, setFeatureDetails, searchPlaceHolder }) {
9
+ // const [inputValue, setInputValue] = useState("");
10
+ return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("span", Object.assign({ className: `p-input-icon-left ${featureDetails.searchedText.length > 0 && "p-input-icon-right"}` }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-input-prefix" }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { color: "#667085", icon: "search-lg", size: 18 }) })), featureDetails.searchedText.length > 0 && ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-input-suffix cursor-pointer", onClick: () => {
11
+ setFeatureDetails(Object.assign(Object.assign({}, featureDetails), { searchedText: "" }));
12
+ // setInputValue("");
13
+ }, title: "Clear" }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "x-close", size: 18 }) }))), (0, jsx_runtime_1.jsx)(inputtext_1.InputText, { value: featureDetails.searchedText, onChange: (e) => {
14
+ setFeatureDetails(Object.assign(Object.assign({}, featureDetails), { searchedText: e.target.value }));
15
+ }, className: "w-21rem", placeholder: searchPlaceHolder || "search by name or code" })] })) }));
16
+ }
17
+ exports.default = Search;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ function RecordDetail({ totalLength }) {
5
+ return ((0, jsx_runtime_1.jsx)("div", { children: `Total ${totalLength} records` }));
6
+ }
7
+ exports.default = RecordDetail;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.COLUMN_SORT_OPTIONS = exports.ATTRIBUTEDATATYPES = void 0;
4
+ var ATTRIBUTEDATATYPES;
5
+ (function (ATTRIBUTEDATATYPES) {
6
+ ATTRIBUTEDATATYPES["STRING"] = "string";
7
+ ATTRIBUTEDATATYPES["DATE"] = "date";
8
+ ATTRIBUTEDATATYPES["INTEGER"] = "integer";
9
+ ATTRIBUTEDATATYPES["IMAGE"] = "image";
10
+ ATTRIBUTEDATATYPES["CURRENCY"] = "currency";
11
+ ATTRIBUTEDATATYPES["BOOLEAN"] = "boolean";
12
+ ATTRIBUTEDATATYPES["DATE_AND_TIME"] = "dateandtime";
13
+ ATTRIBUTEDATATYPES["DECIMAL"] = "decimal";
14
+ ATTRIBUTEDATATYPES["PERCENT"] = "percent";
15
+ ATTRIBUTEDATATYPES["SELECT"] = "select";
16
+ ATTRIBUTEDATATYPES["MULTI_SELECT"] = "multiselect";
17
+ })(ATTRIBUTEDATATYPES = exports.ATTRIBUTEDATATYPES || (exports.ATTRIBUTEDATATYPES = {}));
18
+ exports.COLUMN_SORT_OPTIONS = [
19
+ { id: 1, label: "Low - High", sortId: 1, dataType: ATTRIBUTEDATATYPES.INTEGER },
20
+ { id: 2, label: "High - Low", sortId: 2, dataType: ATTRIBUTEDATATYPES.INTEGER },
21
+ { id: 3, label: "A - Z", sortId: 1, dataType: ATTRIBUTEDATATYPES.STRING },
22
+ { id: 4, label: "Z - A", sortId: 2, dataType: ATTRIBUTEDATATYPES.STRING },
23
+ { id: 5, sortId: 1, label: "Min -Max", dataType: ATTRIBUTEDATATYPES.DATE },
24
+ { id: 6, sortId: 2, label: "Max - Min", dataType: ATTRIBUTEDATATYPES.DATE },
25
+ ];
@@ -413,14 +413,19 @@ const FormulaComponent = (props) => {
413
413
  }
414
414
  case "CALCULATION": {
415
415
  const pattern = /[a-f0-9]{24}/g;
416
- const ids = props === null || props === void 0 ? void 0 : props.formulaValue.match(pattern);
417
- let text = props === null || props === void 0 ? void 0 : props.formulaValue;
418
- for (let i = 0; i < (ids === null || ids === void 0 ? void 0 : ids.length); i++) {
419
- let id = ids[i];
420
- let name = (_b = fieldOptions.find((item) => item.id === id)) === null || _b === void 0 ? void 0 : _b.name;
421
- text = text.replaceAll(id, name);
416
+ if (props === null || props === void 0 ? void 0 : props.formulaValue) {
417
+ const ids = props === null || props === void 0 ? void 0 : props.formulaValue.match(pattern);
418
+ let text = props === null || props === void 0 ? void 0 : props.formulaValue;
419
+ for (let i = 0; i < (ids === null || ids === void 0 ? void 0 : ids.length); i++) {
420
+ let id = ids[i];
421
+ let name = (_b = fieldOptions.find((item) => item.id === id)) === null || _b === void 0 ? void 0 : _b.name;
422
+ text = text.replaceAll(id, name);
423
+ }
424
+ return (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "w-8 h-auto cursor-pointer flex align-items-center px-4", onClick: (e) => { var _a; return (_a = priceConditioRef.current) === null || _a === void 0 ? void 0 : _a.toggle(e); } }, { children: (0, jsx_runtime_1.jsx)("span", Object.assign({ className: 'text-gray-700 overflow-hidden text-overflow-ellipsis white-space-nowrap w-full', title: text ? text : '' }, { children: (props === null || props === void 0 ? void 0 : props.formulaValue) ? text : 'Select' })) }));
425
+ }
426
+ else {
427
+ return 'Select';
422
428
  }
423
- return (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "w-8 h-auto cursor-pointer flex align-items-center px-4", onClick: (e) => { var _a; return (_a = priceConditioRef.current) === null || _a === void 0 ? void 0 : _a.toggle(e); } }, { children: (0, jsx_runtime_1.jsx)("span", Object.assign({ className: 'text-gray-700 overflow-hidden text-overflow-ellipsis white-space-nowrap w-full', title: text ? text : '' }, { children: (props === null || props === void 0 ? void 0 : props.formulaValue) ? text : 'Select' })) }));
424
429
  }
425
430
  default: {
426
431
  return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
@@ -1,3 +1,4 @@
1
+ import { ColDef } from "@ag-grid-community/core";
1
2
  export interface IOlympicData {
2
3
  athlete: string;
3
4
  age: number;
@@ -12,11 +13,23 @@ export interface IOlympicData {
12
13
  color: string;
13
14
  }
14
15
  export interface Style {
15
- height: number;
16
- width: number;
16
+ height: number | string;
17
+ width: number | string;
17
18
  }
18
19
  export interface StatusOptions {
19
20
  id: number;
20
21
  name: string;
21
22
  value: number;
22
23
  }
24
+ declare enum columnDatatype {
25
+ STRING = 0,
26
+ NUMBER = 1,
27
+ BOOLEAN = 2,
28
+ SELECT = 4,
29
+ CHECKBOX = 5,
30
+ MULTISELECT = 6
31
+ }
32
+ export interface ColumnDef extends ColDef {
33
+ dataType: columnDatatype.STRING | columnDatatype.NUMBER | columnDatatype.BOOLEAN | columnDatatype.SELECT | columnDatatype.MULTISELECT | columnDatatype.CHECKBOX;
34
+ }
35
+ export {};
@@ -0,0 +1,8 @@
1
+ declare function AdvancedFeatures({ featureDetails, setFeatureDetails, columnData, checkedRow, props }: {
2
+ featureDetails: any;
3
+ setFeatureDetails: any;
4
+ columnData: any;
5
+ checkedRow: any;
6
+ props: any;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ export default AdvancedFeatures;
@@ -0,0 +1,4 @@
1
+ declare function BulkActions({ columnData }: {
2
+ columnData: any;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ export default BulkActions;
@@ -0,0 +1,4 @@
1
+ declare function BoxOfInput({ activeOption }: {
2
+ activeOption: any;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ export default BoxOfInput;
@@ -0,0 +1,6 @@
1
+ declare function Sort({ columnData, featureDetails, setFeatureDetails }: {
2
+ columnData: any;
3
+ featureDetails: any;
4
+ setFeatureDetails: any;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export default Sort;
@@ -0,0 +1,2 @@
1
+ declare function Filter(): import("react/jsx-runtime").JSX.Element;
2
+ export default Filter;
@@ -0,0 +1,2 @@
1
+ declare function Querty(): import("react/jsx-runtime").JSX.Element;
2
+ export default Querty;
@@ -0,0 +1,6 @@
1
+ declare function Search({ featureDetails, setFeatureDetails, searchPlaceHolder }: {
2
+ featureDetails: any;
3
+ setFeatureDetails: any;
4
+ searchPlaceHolder: any;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export default Search;
@@ -0,0 +1,4 @@
1
+ declare function RecordDetail({ totalLength }: {
2
+ totalLength: any;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ export default RecordDetail;
@@ -0,0 +1,19 @@
1
+ export declare enum ATTRIBUTEDATATYPES {
2
+ STRING = "string",
3
+ DATE = "date",
4
+ INTEGER = "integer",
5
+ IMAGE = "image",
6
+ CURRENCY = "currency",
7
+ BOOLEAN = "boolean",
8
+ DATE_AND_TIME = "dateandtime",
9
+ DECIMAL = "decimal",
10
+ PERCENT = "percent",
11
+ SELECT = "select",
12
+ MULTI_SELECT = "multiselect"
13
+ }
14
+ export declare const COLUMN_SORT_OPTIONS: {
15
+ id: number;
16
+ label: string;
17
+ sortId: number;
18
+ dataType: ATTRIBUTEDATATYPES;
19
+ }[];
@@ -192,7 +192,7 @@ export interface FroalaTextEditorTypes {
192
192
  export interface ListBoxDropdownTypes {
193
193
  values: any;
194
194
  label: string;
195
- labelIcon?: string;
195
+ labelIcon?: JSX.Element | string;
196
196
  labelIconPos?: any;
197
197
  listItems: any;
198
198
  headerTemplate?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "5.7.4",
3
+ "version": "5.7.6",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -30,6 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@ag-grid-community/client-side-row-model": "^31.2.1",
33
+ "@ag-grid-community/infinite-row-model": "^31.2.1",
33
34
  "@ag-grid-community/react": "^31.2.1",
34
35
  "@ag-grid-enterprise/core": "^31.2.1",
35
36
  "@ag-grid-enterprise/range-selection": "^31.2.1",
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const jsx_runtime_1 = require("react/jsx-runtime");
4
- const RowDetailsRenderer = ({ node }) => {
5
- const data = node === null || node === void 0 ? void 0 : node.data;
6
- console.log(data, node, 'details from node');
7
- return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("div", { children: [data.gold, " "] }) }));
8
- };
9
- exports.default = RowDetailsRenderer;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const jsx_runtime_1 = require("react/jsx-runtime");
4
- const primereact_1 = require("primereact");
5
- const react_1 = require("react");
6
- function StatusDropdown({ value, statusChanged }) {
7
- let options;
8
- if (value === 1) {
9
- options = [
10
- { id: 1, name: "Draft", value: 1 },
11
- { id: 2, name: "Active", value: 2 },
12
- { id: 3, name: "Inactive", value: 3 },
13
- ];
14
- }
15
- else {
16
- options = [
17
- { id: 2, name: "Active", value: 2 },
18
- { id: 3, name: "Inactive", value: 3 },
19
- ];
20
- }
21
- const selectedOption = (0, react_1.useMemo)(() => options.find((option) => option.value === value), [value]);
22
- return ((0, jsx_runtime_1.jsxs)("div", { children: [" ", (0, jsx_runtime_1.jsx)(primereact_1.Dropdown, { value: selectedOption.value, options: options, onChange: (e) => { statusChanged(e.target.value), console.log(e, 'value selected'); }, optionLabel: "name", placeholder: "Select a Status" })] }));
23
- }
24
- exports.default = StatusDropdown;
@@ -1,4 +0,0 @@
1
- declare const RowDetailsRenderer: ({ node }: {
2
- node: any;
3
- }) => import("react/jsx-runtime").JSX.Element;
4
- export default RowDetailsRenderer;
@@ -1,5 +0,0 @@
1
- declare function StatusDropdown({ value, statusChanged }: {
2
- value: any;
3
- statusChanged: any;
4
- }): import("react/jsx-runtime").JSX.Element;
5
- export default StatusDropdown;