sccoreui 6.2.83 → 6.2.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/App.js CHANGED
@@ -4,6 +4,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  require("./App.scss");
5
5
  // import Home from "./pages/home";
6
6
  const App = () => {
7
- return ((0, jsx_runtime_1.jsx)("div", {}));
7
+ return (0, jsx_runtime_1.jsx)("div", {});
8
8
  };
9
9
  exports.default = App;
package/dist/App.scss CHANGED
@@ -168,6 +168,7 @@
168
168
  color: var(--gray-600);
169
169
  padding: 8px 14px;
170
170
  border: 0 !important;
171
+ font-weight: 600;
171
172
  &:hover {
172
173
  background-color: var(--gray-50) !important;
173
174
  color: var(--gray-700) !important;
@@ -203,9 +204,9 @@
203
204
  background-color: var(--primary-25) !important;
204
205
  color: var(--primary-600) !important;
205
206
  }
206
- &:disabled {
207
- color: var(--gray-300);
208
- }
207
+ // &:disabled {
208
+ // color: var(--gray-300);
209
+ // }
209
210
 
210
211
  svg {
211
212
  path {
@@ -253,6 +254,18 @@ code {
253
254
  padding-right: 60px !important;
254
255
  }
255
256
 
257
+ .delete-action {
258
+ &:hover {
259
+ transition: all 0.4 ease-in-out;
260
+ transform: scale(1.2);
261
+ svg {
262
+ path {
263
+ stroke: var(--red-400);
264
+ }
265
+ }
266
+ }
267
+ }
268
+
256
269
  // h1 {
257
270
  // font-size: var(--fs-24);
258
271
  // font-weight: var(--fw-600);
@@ -583,6 +596,8 @@ code {
583
596
  .p-inputtext {
584
597
  padding: 6px 20px 7px 20px;
585
598
  height: 44px !important;
599
+ border-top-left-radius: 0px;
600
+ border-top-right-radius: 0px;
586
601
  }
587
602
  }
588
603
 
@@ -2336,8 +2351,8 @@ button[aria-expanded="true"] {
2336
2351
  margin: auto;
2337
2352
  border-radius: 5px;
2338
2353
  background-color: var(--red-50);
2339
- width: 100vw;
2340
- height: 100vh;
2354
+ width: 100%;
2355
+ height: 100%;
2341
2356
  text-align: center;
2342
2357
  }
2343
2358
 
@@ -5865,7 +5865,7 @@ a {
5865
5865
  }
5866
5866
 
5867
5867
  .p-dialog {
5868
- border-radius: 12px;
5868
+ border-radius: 8px !important;
5869
5869
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
5870
5870
  border: 0 none;
5871
5871
  }
@@ -5874,8 +5874,8 @@ a {
5874
5874
  background: #ffffff;
5875
5875
  color: #343a40;
5876
5876
  padding: 16px;
5877
- border-top-right-radius: 12px;
5878
- border-top-left-radius: 12px;
5877
+ border-top-right-radius: 8px;
5878
+ border-top-left-radius: 8px;
5879
5879
  position: relative;
5880
5880
  }
5881
5881
  .p-dialog .p-dialog-header .p-dialog-title {
@@ -18,6 +18,6 @@ function BulkEditAction({ props }) {
18
18
  return;
19
19
  props === null || props === void 0 ? void 0 : props.discardBulkEdit();
20
20
  };
21
- return (0, utilComponents_1.skeletonLoding)() ? ((0, jsx_runtime_1.jsx)(FeatureSkeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center gap-3" }, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { className: "text-base font-semibold", text: true, onClick: onDiscard, label: ((_a = dynamicText === null || dynamicText === void 0 ? void 0 : dynamicText.bulkEditAction) === null || _a === void 0 ? void 0 : _a.discard) || "Discard" }), (0, jsx_runtime_1.jsx)(button_1.Button, { className: "text-base font-semibold", disabled: !((_b = props === null || props === void 0 ? void 0 : props.bulkEditedRecords) === null || _b === void 0 ? void 0 : _b.length), onClick: onSave, label: ((_c = dynamicText === null || dynamicText === void 0 ? void 0 : dynamicText.bulkEditAction) === null || _c === void 0 ? void 0 : _c.save) || "Update Changes" })] })));
21
+ return (0, utilComponents_1.skeletonLoding)() ? ((0, jsx_runtime_1.jsx)(FeatureSkeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center gap-3" }, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { className: "btn-text", onClick: onDiscard, label: ((_a = dynamicText === null || dynamicText === void 0 ? void 0 : dynamicText.bulkEditAction) === null || _a === void 0 ? void 0 : _a.discard) || "Discard" }), (0, jsx_runtime_1.jsx)(button_1.Button, { className: "text-base font-semibold", disabled: !((_b = props === null || props === void 0 ? void 0 : props.bulkEditedRecords) === null || _b === void 0 ? void 0 : _b.length), onClick: onSave, label: ((_c = dynamicText === null || dynamicText === void 0 ? void 0 : dynamicText.bulkEditAction) === null || _c === void 0 ? void 0 : _c.save) || "Update Changes" })] })));
22
22
  }
23
23
  exports.default = BulkEditAction;
@@ -202,9 +202,9 @@ const ColumnGroup = (props) => {
202
202
  // disabled={isDisabled}
203
203
  color: (columnsSelectedForGroup === null || columnsSelectedForGroup === void 0 ? void 0 : columnsSelectedForGroup.length) > 0
204
204
  ? "text-primary-400"
205
- : "text-gray-500" }), !isDisabled && (columnsSelectedForGroup === null || columnsSelectedForGroup === void 0 ? void 0 : columnsSelectedForGroup.length) > 0 && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center justify-content-center" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "text-primary-400 font-semibold ml-1" }, { children: columnsSelectedForGroup === null || columnsSelectedForGroup === void 0 ? void 0 : columnsSelectedForGroup.length })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center gap-2 text-primary-400 font-semibold" }, { children: [(0, jsx_runtime_1.jsx)("p", Object.assign({ className: "ml-2 text-primary-400" }, { children: "Selected" })), (0, jsx_runtime_1.jsx)(button_1.Button, { onClick: (e) => clearListItems(e), className: "h-auto p-0 pad_0", text: true, icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "x-close", color: "text-primary-400", size: 18 }) })] }))] })))] })), (0, jsx_runtime_1.jsxs)(overlaypanel_1.OverlayPanel, Object.assign({ ref: columnGroupRef, className: "column-group p-1", onHide: handleHide }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "column-header" }, { children: [(0, jsx_runtime_1.jsx)("h3", Object.assign({ className: "my-0" }, { children: "Grouping" })), (0, jsx_runtime_1.jsx)("p", Object.assign({ className: "my-0 mb-4" }, { children: "Select one or two columns for sorting" }))] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "column-body" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-input-icon-right w-full p-2 bg-gray-50" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-input-suffix top-0", style: { right: "20px" } }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "search-md" }) })), (0, jsx_runtime_1.jsx)(inputtext_1.InputText, { onChange: (e) => setSearchedText(e.target.value), value: searchText, disabled: false, placeholder: "Enter any column name", className: "text-lg font-normal text-gray-500 hover:text-gray-900 w-full" })] })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex flex-column gap-1 m-1 max-h-15rem max-w-30rem overflow-y-auto" }, { children: renderColumns.length > 0 ? (renderColumns === null || renderColumns === void 0 ? void 0 : renderColumns.map((column, index) => ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center" }, { children: [checkedColumns.has(column === null || column === void 0 ? void 0 : column.id) && ((0, jsx_runtime_1.jsx)("img", { onDragStart: (e) => onDragStart(e, index), onDragOver: onDragOver, onDrop: (e) => onDrop(e, index), src: drag_and_drop_icon_png_1.default, width: 20, height: 20, className: checkedColumns.has(column === null || column === void 0 ? void 0 : column.id)
205
+ : "text-gray-500" }), !isDisabled && (columnsSelectedForGroup === null || columnsSelectedForGroup === void 0 ? void 0 : columnsSelectedForGroup.length) > 0 && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center justify-content-center" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "text-primary-400 font-semibold ml-1" }, { children: columnsSelectedForGroup === null || columnsSelectedForGroup === void 0 ? void 0 : columnsSelectedForGroup.length })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center gap-2 text-primary-400 font-semibold" }, { children: [(0, jsx_runtime_1.jsx)("p", Object.assign({ className: "ml-2 text-primary-400" }, { children: "Selected" })), (0, jsx_runtime_1.jsx)(button_1.Button, { onClick: (e) => clearListItems(e), className: "h-auto p-0 pad_0 sc_icon_hover", text: true, icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "x-close", color: "text-primary-400", size: 18 }) })] }))] })))] })), (0, jsx_runtime_1.jsxs)(overlaypanel_1.OverlayPanel, Object.assign({ ref: columnGroupRef, className: "column-group p-1", onHide: handleHide }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "column-header" }, { children: [(0, jsx_runtime_1.jsx)("h3", Object.assign({ className: "my-0" }, { children: "Grouping" })), (0, jsx_runtime_1.jsx)("p", Object.assign({ className: "my-0 mb-4" }, { children: "Select one or two columns for sorting" }))] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "column-body" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-input-icon-right w-full p-2 bg-gray-50" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-input-suffix top-0", style: { right: "20px" } }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "search-md" }) })), (0, jsx_runtime_1.jsx)(inputtext_1.InputText, { onChange: (e) => setSearchedText(e.target.value), value: searchText, disabled: false, placeholder: "Enter any column name", className: "text-lg font-normal text-gray-500 hover:text-gray-900 w-full" })] })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex flex-column gap-1 m-1 max-h-15rem max-w-30rem overflow-y-auto" }, { children: renderColumns.length > 0 ? (renderColumns === null || renderColumns === void 0 ? void 0 : renderColumns.map((column, index) => ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center pl-2" }, { children: [checkedColumns.has(column === null || column === void 0 ? void 0 : column.id) && ((0, jsx_runtime_1.jsx)("img", { onDragStart: (e) => onDragStart(e, index), onDragOver: onDragOver, onDrop: (e) => onDrop(e, index), src: drag_and_drop_icon_png_1.default, width: 20, height: 20, className: checkedColumns.has(column === null || column === void 0 ? void 0 : column.id)
206
206
  ? "col-gr-icon-active mr-2"
207
- : "col-gr-icon" })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `flex gap-2 ${checkedColumns.has(column === null || column === void 0 ? void 0 : column.id) && "bg-primary-25"} hover:bg-primary-25 border-round-sm p-3 w-full` }, { children: [(0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, { checked: checkedColumns.has(column === null || column === void 0 ? void 0 : column.id), onChange: (e) => onSelectedCheckbox(column, e), disabled: checkedColumns.size === 2 &&
208
- !checkedColumns.has(column === null || column === void 0 ? void 0 : column.id) }), (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "max-w-28rem line-clamp line-clamp-1 inline-block", title: column.headerName }, { children: column.headerName }))] }))] }), column === null || column === void 0 ? void 0 : column.id)))) : ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "no-content" }, { children: "No Content" }))) }))] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "column-footer gap-2 border-top-1 border-gray-200 flex align-items-center justify-content-between" }, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { className: "cursor-pointer", text: true, label: "Remove Grouping", onClick: (e) => clearListItems(e) }), (0, jsx_runtime_1.jsx)(button_1.Button, { className: "cursor-pointer", label: "Save Grouping", onClick: (e) => clearSearchAndSaveGrouping(e), disabled: (checkedColumns === null || checkedColumns === void 0 ? void 0 : checkedColumns.size) === 0 })] }))] }))] }));
207
+ : "col-gr-icon" })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `flex gap-2 ${checkedColumns.has(column === null || column === void 0 ? void 0 : column.id) && "bg-primary-25"} hover:bg-primary-25 border-round-sm p-3 w-full`, onChange: (e) => onSelectedCheckbox(column, e) }, { children: [(0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, { checked: checkedColumns.has(column === null || column === void 0 ? void 0 : column.id), disabled: checkedColumns.size === 2 &&
208
+ !checkedColumns.has(column === null || column === void 0 ? void 0 : column.id) }), (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "max-w-18rem line-clamp line-clamp-1 inline-block text-truncate", title: column.headerName }, { children: column.headerName }))] }))] }), column === null || column === void 0 ? void 0 : column.id)))) : ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "max-w-20rem p-6 text-center" }, { children: "No results found on the search criteria" }))) }))] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "column-footer gap-2 border-top-1 border-gray-200 flex align-items-center justify-content-between" }, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { className: "btn-text", label: "Remove Grouping", onClick: (e) => clearListItems(e) }), (0, jsx_runtime_1.jsx)(button_1.Button, { className: "cursor-pointer", label: "Save Grouping", onClick: (e) => clearSearchAndSaveGrouping(e), disabled: (checkedColumns === null || checkedColumns === void 0 ? void 0 : checkedColumns.size) === 0 })] }))] }))] }));
209
209
  };
210
210
  exports.default = ColumnGroup;
@@ -113,7 +113,7 @@ function Sort() {
113
113
  return ((0, jsx_runtime_1.jsxs)("li", Object.assign({ title: eachOption.label, className: `cursor-pointer ${seletedSort && "bg-primary-25"} cursor-pointer br-6 pl-0 px-3 py-2 flex align-items-center gap-2 hover:bg-primary-25 mb-1`, onClick: () => {
114
114
  onSelectSortType(eachOption);
115
115
  // setSortBy(eachOption);
116
- } }, { 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));
116
+ } }, { children: [(0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: index === 0 ? "arrow-down" : "arrow-up", size: 20, color: seletedSort ? "text-primary-400" : "text-gray-700" }), (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));
117
117
  }) }))), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex justify-content-between px-3 py-2 border-top-1 border-gray-200" }, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ disabled: false, id: "column_sort_dropdown", outlined: true, onClick: (e) => clearSort(e) }, { children: (sortModelText === null || sortModelText === void 0 ? void 0 : sortModelText.clearAction) ? sortModelText.clearAction : "Clear" })), (0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ disabled: isApplyDisable, id: "column_sort_dropdown", onClick: (e) => applyTableSort(e) }, { children: (sortModelText === null || sortModelText === void 0 ? void 0 : sortModelText.applyAction) ? sortModelText.applyAction : "Apply" }))] }))] }))] }));
118
118
  }
119
119
  exports.default = Sort;
@@ -168,13 +168,13 @@ function HideColumn() {
168
168
  setVisibleRight(false);
169
169
  setInputValue("");
170
170
  };
171
- return (0, utilComponents_1.skeletonLoding)() ? ((0, jsx_runtime_1.jsx)(FeatureSkeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ onClick: () => !isDisabled && setVisibleRight(true), className: `rounded_btn sc_icon_hover icon-40x40 ${isDisabled && "disabled"}`, title: "Manage Columns" }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "columns-02", color: "text-gray-500", size: 18 }) })), (0, jsx_runtime_1.jsxs)(sidebar_1.Sidebar, Object.assign({ className: "md:w-6 lg:w-4 overflow-hidden h-full ag_grid_sidebar", visible: visibleRight, position: "right", onHide: () => hidePanel() }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "sticky top-0 z-5 bg-white" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex justify-content-between align-items-center px-4 py-3 border-bottom-1 border-gray-200" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-gray-900 text-lg font-semibold line-height-3" }, { children: (sidePanelText === null || sidePanelText === void 0 ? void 0 : sidePanelText.header) || "Configure Columns" })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center gap-3" }, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { className: "font-semibold", text: true, label: (sidePanelText === null || sidePanelText === void 0 ? void 0 : sidePanelText.disacrd_button) || "Discard", onClick: () => hidePanel() }), (0, jsx_runtime_1.jsx)(button_1.Button, { className: "font-semibold", label: (sidePanelText === null || sidePanelText === void 0 ? void 0 : sidePanelText.update_button) || "Update", disabled: (storeNodes === null || storeNodes === void 0 ? void 0 : storeNodes.filter((node) => node.checked).length) > 15
171
+ return (0, utilComponents_1.skeletonLoding)() ? ((0, jsx_runtime_1.jsx)(FeatureSkeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ onClick: () => !isDisabled && setVisibleRight(true), className: `rounded_btn sc_icon_hover icon-40x40 ${isDisabled && "disabled"}`, title: "Manage Columns" }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "columns-02", color: "text-gray-500", size: 18 }) })), (0, jsx_runtime_1.jsxs)(sidebar_1.Sidebar, Object.assign({ className: "md:w-6 lg:w-4 overflow-hidden h-full ag_grid_sidebar", visible: visibleRight, position: "right", onHide: () => hidePanel() }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "bg-white" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex justify-content-between align-items-center px-4 py-3 border-bottom-1 border-gray-200" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-gray-900 text-lg font-semibold line-height-3" }, { children: (sidePanelText === null || sidePanelText === void 0 ? void 0 : sidePanelText.header) || "Configure Columns" })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center gap-3" }, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { className: "btn-text", label: (sidePanelText === null || sidePanelText === void 0 ? void 0 : sidePanelText.disacrd_button) || "Discard", onClick: () => hidePanel() }), (0, jsx_runtime_1.jsx)(button_1.Button, { className: "font-semibold", label: (sidePanelText === null || sidePanelText === void 0 ? void 0 : sidePanelText.update_button) || "Update", disabled: (storeNodes === null || storeNodes === void 0 ? void 0 : storeNodes.filter((node) => node.checked).length) > 15
172
172
  ? true
173
- : false, onClick: () => updateColumns() })] }))] })), enableManageColumnsCallback && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-4 pb-0" }, { children: [(0, jsx_runtime_1.jsxs)("h3", Object.assign({ className: "flex align-items-center justify-content-between my-0" }, { children: [(sidePanelText === null || sidePanelText === void 0 ? void 0 : sidePanelText.apply_to_all_views) || "Apply to all views", (0, jsx_runtime_1.jsx)(inputswitch_1.InputSwitch, { checked: enableManageColumnsCallbackAPI, onChange: (e) => setEnableManageColumnsCallbackAPI(e.value) })] })), (0, jsx_runtime_1.jsx)("p", Object.assign({ className: "my-0 text-sm" }, { children: (sidePanelText === null || sidePanelText === void 0 ? void 0 : sidePanelText.apply_subHeading) ||
173
+ : false, onClick: () => updateColumns() })] }))] })), enableManageColumnsCallback && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-4 pb-0" }, { children: [(0, jsx_runtime_1.jsxs)("h3", Object.assign({ className: "flex align-items-center justify-content-between my-0" }, { children: [(sidePanelText === null || sidePanelText === void 0 ? void 0 : sidePanelText.apply_to_all_views) || "Apply to all views", (0, jsx_runtime_1.jsx)(inputswitch_1.InputSwitch, { checked: enableManageColumnsCallbackAPI, onChange: (e) => setEnableManageColumnsCallbackAPI(e.value) })] })), (0, jsx_runtime_1.jsx)("p", Object.assign({ className: "my-0 text-sm text-gray-600" }, { children: (sidePanelText === null || sidePanelText === void 0 ? void 0 : sidePanelText.apply_subHeading) ||
174
174
  "Apply the chosen column selection to all available views" })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "mt-2" }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-input-icon-left p-input-icon-right w-full" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-input-prefix" }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "search-md" }) })), (inpValue === null || inpValue === void 0 ? void 0 : inpValue.length) > 0 && ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-input-suffix cursor-pointer zoom_animate", onClick: clearSearch }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "x-close", size: 18 }) }))), (0, jsx_runtime_1.jsx)(inputtext_1.InputText, { id: "email", value: inpValue, onChange: (e) => {
175
175
  searchHandler(e.target.value);
176
176
  }, disabled: false, placeholder: (sidePanelText === null || sidePanelText === void 0 ? void 0 : sidePanelText.search_placeHolder) ||
177
- "Search by column name", className: "text-lg font-normal text-gray-500 hover:text-gray-900 w-full my-2 lh-40" })] })) }))] })))] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-4 pt-0" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "py-2 my-0 text-gray-900 text-lg font-semibold border-bottom-1 border-gray-200" }, { children: [(sidePanelText === null || sidePanelText === void 0 ? void 0 : sidePanelText.selected_attributes) || "Selected Attributes", " ", (0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "text-gray-500 text-lg font-normal ml-1" }, { children: [`(`, nodes === null || nodes === void 0 ? void 0 : nodes.filter((node) => node.selected).length, "/", nodes === null || nodes === void 0 ? void 0 : nodes.filter((node) => node.unSelected || node.selected).length, `)`] }))] })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "w-full -mt-2" }, { children: (0, jsx_runtime_1.jsx)("ul", Object.assign({ className: "list-none p-0 px-3" }, { children: (nodes === null || nodes === void 0 ? void 0 : nodes.length) > 0 ? (nodes === null || nodes === void 0 ? void 0 : nodes.map((listItem, idx) => (listItem === null || listItem === void 0 ? void 0 : listItem.visibleInPanel) &&
177
+ "Search by column name", className: "text-lg font-normal text-gray-500 hover:text-gray-900 w-full my-2 lh-40" })] })) }))] })))] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-4 pt-0" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "pt-2 my-0 text-gray-900 text-lg font-semibold" }, { children: [(sidePanelText === null || sidePanelText === void 0 ? void 0 : sidePanelText.selected_attributes) || "Selected Attributes", " ", (0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "text-gray-500 text-lg font-normal ml-1" }, { children: [`(`, nodes === null || nodes === void 0 ? void 0 : nodes.filter((node) => node.selected).length, "/", nodes === null || nodes === void 0 ? void 0 : nodes.filter((node) => node.unSelected || node.selected).length, `)`] }))] })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "w-full" }, { children: (0, jsx_runtime_1.jsx)("ul", Object.assign({ className: "list-none p-0" }, { children: (nodes === null || nodes === void 0 ? void 0 : nodes.length) > 0 ? (nodes === null || nodes === void 0 ? void 0 : nodes.map((listItem, idx) => (listItem === null || listItem === void 0 ? void 0 : listItem.visibleInPanel) &&
178
178
  (listItem === null || listItem === void 0 ? void 0 : listItem.selected) && ((0, jsx_runtime_1.jsxs)("li", Object.assign({ className: "flex align-items-center justify-content-between py-3 text-gray-600 text-base", draggable: true, onDragStart: handleDragStart(idx), onDrop: handleDrop(idx), onDragOver: handleDragOver }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex gap-3" }, { children: [(0, jsx_runtime_1.jsx)("img", { src: drag_and_drop_icon_png_1.default, alt: "Drag and drop", className: "cursor-move" }), (0, jsx_runtime_1.jsx)("span", { children: listItem.headerName })] })), (0, jsx_runtime_1.jsx)(inputswitch_1.InputSwitch, { checked: listItem === null || listItem === void 0 ? void 0 : listItem.checked, onChange: (e) => handleSwitchChange(listItem, e.value) })] }), idx)))) : ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex flex-column -mx-3" }, { children: (0, jsx_runtime_1.jsx)("h3", Object.assign({ className: "mt-0 mb-2 flex align-items-center justify-content-center py-8 bg-gray-50 p-8 border-round-md mt-2 text-gray-900 font-normal" }, { children: "No results found on the search criteria" })) })) })) })) })), (0, jsx_runtime_1.jsxs)("h3", Object.assign({ className: " mb-0 mt-0 py-2 border-bottom-1 border-gray-200" }, { children: [(sidePanelText === null || sidePanelText === void 0 ? void 0 : sidePanelText.unselected_attributes) || "Unselected Attributes", (0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "text-gray-500 text-lg font-normal ml-2" }, { children: [`(`, nodes === null || nodes === void 0 ? void 0 : nodes.filter((node) => node.unSelected).length, "/", nodes === null || nodes === void 0 ? void 0 : nodes.filter((node) => node.unSelected || node.selected).length, `)`] }))] })), (nodes === null || nodes === void 0 ? void 0 : nodes.length) > 0 ? ((0, jsx_runtime_1.jsx)("ul", Object.assign({ className: "list-none p-0 mt-2 ml-3" }, { children: nodes === null || nodes === void 0 ? void 0 : nodes.map((listItem) => (listItem === null || listItem === void 0 ? void 0 : listItem.visibleInPanel) &&
179
179
  (listItem === null || listItem === void 0 ? void 0 : listItem.unSelected) && ((0, jsx_runtime_1.jsxs)("li", Object.assign({ className: "flex align-items-center justify-content-between py-3 text-gray-600 text-base" }, { children: [(0, jsx_runtime_1.jsx)("span", { children: listItem.headerName }), (0, jsx_runtime_1.jsx)(inputswitch_1.InputSwitch, { checked: listItem.checked, onChange: (e) => handleSwitchChange(listItem, e.value) })] }), listItem.id))) }))) : ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "mt-0 mb-2 flex align-items-center justify-content-center py-8 bg-gray-50 p-8 border-round-md mt-4 text-gray-900 text-lg" }, { children: "No results found on the search criteria" })))] }))] }))] }));
180
180
  }
@@ -13,7 +13,7 @@ const svg_component_1 = tslib_1.__importDefault(require("../../../../../directiv
13
13
  const chips_1 = require("primereact/chips");
14
14
  const constants_1 = tslib_1.__importDefault(require("../../../constants"));
15
15
  const Conditions = (props) => {
16
- const { columnName, condition, value, columnsArray, conditionsArray, index, id, updateconditionsArray, removeConditionFromArray, addEmptyCondition, conditionsLength, conditionType, conditionTypes, handleConditionType, filterModelText } = props;
16
+ const { columnName, condition, value, columnsArray, conditionsArray, index, id, updateconditionsArray, removeConditionFromArray, addEmptyCondition, conditionsLength, conditionType, conditionTypes, handleConditionType, filterModelText, } = props;
17
17
  const onAddCondition = (index) => {
18
18
  addEmptyCondition(index);
19
19
  };
@@ -24,9 +24,9 @@ const Conditions = (props) => {
24
24
  // setColumnState(value);
25
25
  updateconditionsArray({
26
26
  columnName: value,
27
- condition: '',
28
- value: '',
29
- id: id
27
+ condition: "",
28
+ value: "",
29
+ id: id,
30
30
  }, id);
31
31
  };
32
32
  const onUpdateCondition = (event) => {
@@ -34,8 +34,8 @@ const Conditions = (props) => {
34
34
  updateconditionsArray({
35
35
  columnName: columnName,
36
36
  condition: event,
37
- value: '',
38
- id: id
37
+ value: "",
38
+ id: id,
39
39
  }, id);
40
40
  };
41
41
  const handleDynamicFieldState = (event) => {
@@ -44,49 +44,88 @@ const Conditions = (props) => {
44
44
  columnName: columnName,
45
45
  condition: condition,
46
46
  value: event,
47
- id: id
47
+ id: id,
48
48
  }, id);
49
49
  };
50
50
  const renderDynamicField = (selectedColumn) => {
51
51
  var _a, _b, _c, _d, _e, _f;
52
52
  switch (selectedColumn.dataType) {
53
53
  case Types_1.FilterDataType.STRING: {
54
- if (condition === Types_1.FilteredConditionTypes.IS_NOT_EQUAL_TO || condition === Types_1.FilteredConditionTypes.IS_EQUAL_TO) {
55
- return ((0, jsx_runtime_1.jsx)(inputtext_1.InputText, { disabled: !condition, className: "border-noround-left col-4 focus:shadow-none lh-44 h-44 flex align-items-center pl-3", value: value, placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementThreePlaceHolder_Input) ? filterModelText.elementThreePlaceHolder_Input : "Enter", onChange: (event) => handleDynamicFieldState(event.target.value) }));
54
+ if (condition === Types_1.FilteredConditionTypes.IS_NOT_EQUAL_TO ||
55
+ condition === Types_1.FilteredConditionTypes.IS_EQUAL_TO) {
56
+ return ((0, jsx_runtime_1.jsx)(inputtext_1.InputText, { disabled: !condition, className: "border-noround-left col-4 focus:shadow-none lh-44 h-44 flex align-items-center pl-3", value: value, placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementThreePlaceHolder_Input)
57
+ ? filterModelText.elementThreePlaceHolder_Input
58
+ : "Enter", onChange: (event) => handleDynamicFieldState(event.target.value) }));
56
59
  }
57
60
  else {
58
- return ((0, jsx_runtime_1.jsx)(chips_1.Chips, { value: value, type: '', disabled: !condition, className: "table_filters_1 border-noround-left col-4 focus:shadow-none lh-44 h-44 chip_comp flex align-items-center", onChange: (e) => handleDynamicFieldState(e.target.value), placeholder: "Enter", separator: "," }));
61
+ return ((0, jsx_runtime_1.jsx)(chips_1.Chips, { value: value, type: "", disabled: !condition, className: "table_filters_1 border-noround-left col-4 focus:shadow-none lh-44 h-44 chip_comp flex align-items-center", onChange: (e) => handleDynamicFieldState(e.target.value), placeholder: "Enter", separator: "," }));
59
62
  }
60
63
  }
61
64
  case Types_1.FilterDataType.DECIMAL:
62
65
  case Types_1.FilterDataType.PERCENT:
63
66
  case Types_1.FilterDataType.CURRENCY:
64
- case Types_1.FilterDataType.INTEGER:
65
- {
66
- const handleChange1 = (data) => {
67
- Array.isArray(value) && value.splice(0, 1, data);
68
- handleDynamicFieldState(Array.isArray(value) ? value : [data]);
69
- };
70
- const handleChange2 = (data) => {
71
- Array.isArray(value) && value.splice(1, 1, data);
72
- handleDynamicFieldState(value);
73
- };
74
- if (condition === Types_1.FilteredConditionTypes.IS_BETWEEN || condition === Types_1.FilteredConditionTypes.IS_NOT_BETWEEN) {
75
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "border-noround-left p-0 col-4 mx-0 focus:shadow-none lh-44 h-44 flex" }, { children: [(0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, { disabled: !condition, min: 0, useGrouping: false, max: ((_a = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.columnName) === null || _a === void 0 ? void 0 : _a.dataType) === Types_1.FilterDataType.PERCENT ? 99.999 : Infinity, maxFractionDigits: ((_b = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.columnName) === null || _b === void 0 ? void 0 : _b.dataType) === Types_1.FilterDataType.INTEGER ? 0 : 2, inputClassName: "mx-0 w-full lh-44 h-44", className: ` w-7ren border-noround-left lh-44 h-44 border-noround-right dropdown-focus-none ${Array.isArray(value) && value.length == 2 ? (value[0] > value[1] ? "p-invalid" : "") : ""}`, value: Array.isArray(value) ? value[0] : null, placeholder: "Min", onChange: (event) => handleChange1(event.value) }), (0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, { disabled: !condition || !(Array.isArray(value) && value[0]), min: 0, useGrouping: false, max: ((_c = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.columnName) === null || _c === void 0 ? void 0 : _c.dataType) === Types_1.FilterDataType.PERCENT ? 99.999 : Infinity, maxFractionDigits: ((_d = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.columnName) === null || _d === void 0 ? void 0 : _d.dataType) === Types_1.FilterDataType.INTEGER ? 0 : 2, inputClassName: "mx-0 w-full lh-44 h-44", className: `w-7ren border-noround-left lh-44 h-44 dropdown-focus-none ${Array.isArray(value) && value.length == 2 ? (value[0] > value[1] ? "p-invalid" : "") : ""}`, value: Array.isArray(value) ? value[1] : null, placeholder: "Max", onChange: (event) => { handleChange2(event.value); } })] })));
76
- }
77
- else if (condition === Types_1.FilteredConditionTypes.IS_ANY_OF || condition === Types_1.FilteredConditionTypes.IS_NONE_OF) {
78
- return ((0, jsx_runtime_1.jsx)(chips_1.Chips, { value: value, type: '', keyfilter: "money", disabled: !condition, className: "table_filters_1 border-noround-left col-4 focus:shadow-none lh-44 h-44 chip_comp flex align-items-center", onChange: (e) => handleDynamicFieldState(e.target.value), placeholder: "Enter", separator: "," }));
79
- }
80
- else {
81
- return ((0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, { value: value, useGrouping: false, min: 0, maxFractionDigits: ((_e = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.columnName) === null || _e === void 0 ? void 0 : _e.dataType) === Types_1.FilterDataType.INTEGER ? 0 : 2, max: ((_f = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.columnName) === null || _f === void 0 ? void 0 : _f.dataType) === Types_1.FilterDataType.PERCENT ? 99.999 : Infinity, disabled: !condition, placeholder: "Enter", inputClassName: "mx-0 w-full lh-44 h-44", className: "border-noround-left p-0 col-4 mx-0 focus:shadow-none lh-44 h-44", onChange: (event) => handleDynamicFieldState(event.value) }));
82
- }
67
+ case Types_1.FilterDataType.INTEGER: {
68
+ const handleChange1 = (data) => {
69
+ Array.isArray(value) && value.splice(0, 1, data);
70
+ handleDynamicFieldState(Array.isArray(value) ? value : [data]);
71
+ };
72
+ const handleChange2 = (data) => {
73
+ Array.isArray(value) && value.splice(1, 1, data);
74
+ handleDynamicFieldState(value);
75
+ };
76
+ if (condition === Types_1.FilteredConditionTypes.IS_BETWEEN ||
77
+ condition === Types_1.FilteredConditionTypes.IS_NOT_BETWEEN) {
78
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "border-noround-left p-0 col-4 mx-0 focus:shadow-none lh-44 h-44 flex" }, { children: [(0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, { disabled: !condition, min: 0, useGrouping: false, max: ((_a = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.columnName) === null || _a === void 0 ? void 0 : _a.dataType) ===
79
+ Types_1.FilterDataType.PERCENT
80
+ ? 99.999
81
+ : Infinity, maxFractionDigits: ((_b = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.columnName) === null || _b === void 0 ? void 0 : _b.dataType) ===
82
+ Types_1.FilterDataType.INTEGER
83
+ ? 0
84
+ : 2, inputClassName: "mx-0 w-full lh-44 h-44", className: ` w-7ren border-noround-left lh-44 h-44 border-noround-right dropdown-focus-none ${Array.isArray(value) && value.length == 2
85
+ ? value[0] > value[1]
86
+ ? "p-invalid"
87
+ : ""
88
+ : ""}`, value: Array.isArray(value) ? value[0] : null, placeholder: "Min", onChange: (event) => handleChange1(event.value) }), (0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, { disabled: !condition || !(Array.isArray(value) && value[0]), min: 0, useGrouping: false, max: ((_c = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.columnName) === null || _c === void 0 ? void 0 : _c.dataType) ===
89
+ Types_1.FilterDataType.PERCENT
90
+ ? 99.999
91
+ : Infinity, maxFractionDigits: ((_d = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.columnName) === null || _d === void 0 ? void 0 : _d.dataType) ===
92
+ Types_1.FilterDataType.INTEGER
93
+ ? 0
94
+ : 2, inputClassName: "mx-0 w-full lh-44 h-44", className: `w-7ren border-noround-left lh-44 h-44 dropdown-focus-none ${Array.isArray(value) && value.length == 2
95
+ ? value[0] > value[1]
96
+ ? "p-invalid"
97
+ : ""
98
+ : ""}`, value: Array.isArray(value) ? value[1] : null, placeholder: "Max", onChange: (event) => {
99
+ handleChange2(event.value);
100
+ } })] })));
83
101
  }
102
+ else if (condition === Types_1.FilteredConditionTypes.IS_ANY_OF ||
103
+ condition === Types_1.FilteredConditionTypes.IS_NONE_OF) {
104
+ return ((0, jsx_runtime_1.jsx)(chips_1.Chips, { value: value, type: "", keyfilter: "money", disabled: !condition, className: "table_filters_1 border-noround-left col-4 focus:shadow-none lh-44 h-44 chip_comp flex align-items-center", onChange: (e) => handleDynamicFieldState(e.target.value), placeholder: "Enter", separator: "," }));
105
+ }
106
+ else {
107
+ return ((0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, { value: value, useGrouping: false, min: 0, maxFractionDigits: ((_e = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.columnName) === null || _e === void 0 ? void 0 : _e.dataType) === Types_1.FilterDataType.INTEGER
108
+ ? 0
109
+ : 2, max: ((_f = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.columnName) === null || _f === void 0 ? void 0 : _f.dataType) === Types_1.FilterDataType.PERCENT
110
+ ? 99.999
111
+ : Infinity, disabled: !condition, placeholder: "Enter", inputClassName: "mx-0 w-full lh-44 h-44", className: "border-noround-left p-0 col-4 mx-0 focus:shadow-none lh-44 h-44", onChange: (event) => handleDynamicFieldState(event.value) }));
112
+ }
113
+ }
84
114
  case Types_1.FilterDataType.SELECT: {
85
- if (condition === Types_1.FilteredConditionTypes.IS_NOT_EQUAL_TO || condition === Types_1.FilteredConditionTypes.IS_EQUAL_TO) {
86
- return ((0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "border-noround-left col-4 focus:shadow-none lh-44 h-44 flex align-items-center dropdown-focus-none pl-3", value: value, options: selectedColumn.options, optionLabel: "label", placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementThreePlaceHolder_DropDown) ? filterModelText.elementThreePlaceHolder_DropDown : "Select", disabled: !condition, onChange: (event) => handleDynamicFieldState(event.value) }));
115
+ if (condition === Types_1.FilteredConditionTypes.IS_NOT_EQUAL_TO ||
116
+ condition === Types_1.FilteredConditionTypes.IS_EQUAL_TO) {
117
+ return ((0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "border-noround-left col-4 focus:shadow-none lh-44 h-44 flex align-items-center dropdown-focus-none pl-3", value: value, options: selectedColumn.options, optionLabel: "label", placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementThreePlaceHolder_DropDown)
118
+ ? filterModelText.elementThreePlaceHolder_DropDown
119
+ : "Select", disabled: !condition, onChange: (event) => handleDynamicFieldState(event.value) }));
87
120
  }
88
121
  else {
89
- return ((0, jsx_runtime_1.jsx)(multi_select_dropdown_1.default, { className: "filter-multi-dropdown border-noround-left p-0 col-4 focus:shadow-none lh-44 h-44", value: value, hidePanelHeader: true, maxSelectedLabels: 1, onChange: (event) => handleDynamicFieldState(event.value), placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementThreePlaceHolder_MultiSelect) ? filterModelText.elementThreePlaceHolder_MultiSelect : "Select", options: selectedColumn.options ? selectedColumn.options.map((x) => { return Object.assign(Object.assign({}, x), { name: x.label }); }) : [], dropdownType: "default", optionLabel: "label" }));
122
+ return ((0, jsx_runtime_1.jsx)(multi_select_dropdown_1.default, { className: "filter-multi-dropdown border-noround-left p-0 col-4 focus:shadow-none lh-44 h-44", value: value, hidePanelHeader: true, maxSelectedLabels: 1, onChange: (event) => handleDynamicFieldState(event.value), placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementThreePlaceHolder_MultiSelect)
123
+ ? filterModelText.elementThreePlaceHolder_MultiSelect
124
+ : "Select", options: selectedColumn.options
125
+ ? selectedColumn.options.map((x) => {
126
+ return Object.assign(Object.assign({}, x), { name: x.label });
127
+ })
128
+ : [], dropdownType: "default", optionLabel: "label" }));
90
129
  }
91
130
  }
92
131
  case Types_1.FilterDataType.DATE:
@@ -107,34 +146,48 @@ const Conditions = (props) => {
107
146
  handleDynamicFieldState(valueString);
108
147
  };
109
148
  // Inside your component JSX:
110
- return ((0, jsx_runtime_1.jsx)(calendar_1.Calendar, { readOnlyInput: true, showTime: false, disabled: !condition, selectionMode: condition === Types_1.FilteredConditionTypes.IS_BETWEEN || condition === Types_1.FilteredConditionTypes.IS_NOT_BETWEEN
149
+ return ((0, jsx_runtime_1.jsx)(calendar_1.Calendar, { readOnlyInput: true, showTime: false, disabled: !condition, selectionMode: condition === Types_1.FilteredConditionTypes.IS_BETWEEN ||
150
+ condition === Types_1.FilteredConditionTypes.IS_NOT_BETWEEN
111
151
  ? "range"
112
- : condition === Types_1.FilteredConditionTypes.IS_ANY_OF || condition === Types_1.FilteredConditionTypes.IS_NONE_OF
152
+ : condition === Types_1.FilteredConditionTypes.IS_ANY_OF ||
153
+ condition === Types_1.FilteredConditionTypes.IS_NONE_OF
113
154
  ? "multiple"
114
155
  : "single", placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementThreePlaceHolder_Calender)
115
156
  ? filterModelText.elementThreePlaceHolder_Calender
116
157
  : "Select", className: "border-noround-left col-4 focus:shadow-none lh-44 h-44 flex align-items-center p-0 filter-calendar", value: (condition === Types_1.FilteredConditionTypes.IS_BETWEEN ||
117
158
  condition === Types_1.FilteredConditionTypes.IS_ANY_OF ||
118
159
  condition === Types_1.FilteredConditionTypes.IS_NOT_BETWEEN ||
119
- condition === Types_1.FilteredConditionTypes.IS_NONE_OF) && value && Array.isArray(value)
120
- ? value.map((date) => date ? new Date(date) : null)
160
+ condition === Types_1.FilteredConditionTypes.IS_NONE_OF) &&
161
+ value &&
162
+ Array.isArray(value)
163
+ ? value.map((date) => (date ? new Date(date) : null))
121
164
  : value
122
165
  ? new Date(value)
123
166
  : null, onChange: (event) => handleOnchangeEvent(event.value) }));
124
167
  }
125
168
  case Types_1.FilterDataType.MULTISELECT: {
126
- return ((0, jsx_runtime_1.jsx)(multi_select_dropdown_1.default, { className: "filter-multi-dropdown border-noround-left p-0 col-4 focus:shadow-none lh-44 h-44", value: value, hidePanelHeader: true, maxSelectedLabels: 1, onChange: (event) => handleDynamicFieldState(event.value), placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementThreePlaceHolder_MultiSelect) ? filterModelText.elementThreePlaceHolder_MultiSelect : "Select", options: selectedColumn.options ? selectedColumn.options.map((x) => { return Object.assign(Object.assign({}, x), { name: x.label }); }) : [], dropdownType: "default", optionLabel: "label" }));
169
+ return ((0, jsx_runtime_1.jsx)(multi_select_dropdown_1.default, { className: "filter-multi-dropdown border-noround-left p-0 col-4 focus:shadow-none lh-44 h-44", value: value, hidePanelHeader: true, maxSelectedLabels: 1, onChange: (event) => handleDynamicFieldState(event.value), placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementThreePlaceHolder_MultiSelect)
170
+ ? filterModelText.elementThreePlaceHolder_MultiSelect
171
+ : "Select", options: selectedColumn.options
172
+ ? selectedColumn.options.map((x) => {
173
+ return Object.assign(Object.assign({}, x), { name: x.label });
174
+ })
175
+ : [], dropdownType: "default", optionLabel: "label" }));
127
176
  }
128
177
  default:
129
- return ((0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "border-noround-left col-4 focus:shadow-none lh-44 h-44 flex align-items-center dropdown-focus-none pl-3", options: [], value: value, optionLabel: "name", placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementThreePlaceHolder_DropDown) ? filterModelText.elementThreePlaceHolder_DropDown : "Select", disabled: true }));
178
+ return ((0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "border-noround-left col-4 focus:shadow-none lh-44 h-44 flex align-items-center dropdown-focus-none pl-3", options: [], value: value, optionLabel: "name", placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementThreePlaceHolder_DropDown)
179
+ ? filterModelText.elementThreePlaceHolder_DropDown
180
+ : "Select", disabled: true }));
130
181
  }
131
182
  };
132
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "grid my-1 align-items-center pt-2" }, { children: [index !== 0 ?
133
- (0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "operator-type filter_dropdown_and col-2 w-7rem mx-4 border-1 mb-1 border-gray-300 h-44 -mt-2", options: conditionTypes, optionLabel: "label", placeholder: "Select", value: conditionType, disabled: index !== 1, onChange: (event) => handleConditionType(event.target.value) }) : (0, jsx_runtime_1.jsx)("div", { className: "col-2 w-7rem mx-4" }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "col-9 grid filter-dropdowns overflow-y-hidden" }, { children: [(0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: `condition-dropdown dropdown-focus-none border-noround-right col-4 pl-3`, options: columnsArray, optionLabel: "name", placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementOnePlaceHolder) ? filterModelText.elementOnePlaceHolder : "Select", value: columnsArray.find((item) => item.code === columnName.code), onChange: (event) => onUpdateColumnName(event.value), panelClassName: "w-14rem" }), (0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "condition-type hide-focus border-noround remove-focus border-x-none filter-dropdown-grid col-4", value: condition, options: conditionsArray
134
- .filter((each) => {
183
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "grid my-1 align-items-center pt-2" }, { children: [index !== 0 ? ((0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "operator-type filter_dropdown_and col-2 w-7rem mx-4 border-1 mb-1 border-gray-300 h-44 -mt-2", options: conditionTypes, optionLabel: "label", placeholder: "Select", value: conditionType, disabled: index !== 1, onChange: (event) => handleConditionType(event.target.value) })) : ((0, jsx_runtime_1.jsx)("div", { className: "col-2 w-7rem mx-4" })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "col-9 grid filter-dropdowns overflow-y-hidden" }, { children: [(0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: `condition-dropdown dropdown-focus-none border-noround-right col-4 pl-3`, options: columnsArray, optionLabel: "name", placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementOnePlaceHolder)
184
+ ? filterModelText.elementOnePlaceHolder
185
+ : "Select", value: columnsArray.find((item) => item.code === columnName.code), onChange: (event) => onUpdateColumnName(event.value), panelClassName: "w-14rem" }), (0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { className: "condition-type hide-focus border-noround remove-focus border-x-none filter-dropdown-grid col-4", value: condition, options: conditionsArray.filter((each) => {
135
186
  var _a;
136
187
  return (_a = constants_1.default.accessBasedOnDataType
137
188
  .find((access) => access.datatype === (columnName === null || columnName === void 0 ? void 0 : columnName.dataType))) === null || _a === void 0 ? void 0 : _a.conditions.includes(each.value);
138
- }), disabled: columnName === '', optionLabel: "name", placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementTwoPlaceHolder) ? filterModelText.elementTwoPlaceHolder : "Select", onChange: (event) => onUpdateCondition(event.value), panelClassName: "w-14rem" }), renderDynamicField(columnName)] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex gap-1 col-1 -mt-2" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "cursor-pointer conditional_btn", onClick: () => onAddCondition(index) }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "plus-circle", size: 20, color: "text-gray-500" }) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: `cursor-pointer conditional_btn ${conditionsLength === 1 ? "p-disabled" : ""}`, onClick: () => onRemoveCondition(id) }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "minus-circle", size: 20, color: "text-gray-500" }) }))] }))] })));
189
+ }), disabled: columnName === "", optionLabel: "name", placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementTwoPlaceHolder)
190
+ ? filterModelText.elementTwoPlaceHolder
191
+ : "Select", onChange: (event) => onUpdateCondition(event.value), panelClassName: "w-14rem" }), renderDynamicField(columnName)] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex gap-1 col-1 -mt-2 px-0" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "cursor-pointer conditional_btn", onClick: () => onAddCondition(index) }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "plus-circle", size: 20, color: "text-gray-500" }) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: `cursor-pointer conditional_btn delete-action ${conditionsLength === 1 ? "p-disabled" : ""}`, onClick: () => onRemoveCondition(id) }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "minus-circle", size: 20, color: "text-gray-500" }) }))] }))] })));
139
192
  };
140
193
  exports.default = Conditions;
@@ -164,7 +164,7 @@ const TableFilter = () => {
164
164
  });
165
165
  setAllFieldsFilled(isAllFieldsFilled && enbleApply);
166
166
  }, [conditionsArray, enbleApply]);
167
- return (0, utilComponents_1.skeletonLoding)() ? ((0, jsx_runtime_1.jsx)(FeatureSkeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `cursor-pointer filter-btn-grid font-semibold hover:bg-primary-25 icon-40x40 sc_icon_hover flex align-items-center gap-2 border-round-lg ${isDisabled && "disabled"} ${isOverlayOpened ||
167
+ return (0, utilComponents_1.skeletonLoding)() ? ((0, jsx_runtime_1.jsx)(FeatureSkeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `cursor-pointer filter-btn-grid font-semibold hover:bg-primary-25 sc_icon_hover flex align-items-center gap-2 border-round-lg ${isDisabled && "disabled"} ${isOverlayOpened ||
168
168
  (globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length) >= 1
169
169
  ? "bg-primary-50"
170
170
  : "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: isOverlayOpened ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "6.2.83",
3
+ "version": "6.2.85",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",