sccoreui 6.4.81 → 6.4.83

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 CHANGED
@@ -2611,6 +2611,12 @@ button[aria-expanded="true"] {
2611
2611
  }
2612
2612
 
2613
2613
  /* conditions */
2614
+
2615
+ .status_select_field {
2616
+ .p-dropdown-item {
2617
+ height: 40px;
2618
+ }
2619
+ }
2614
2620
  .filter-dropdowns {
2615
2621
  padding: 2px;
2616
2622
 
Binary file
@@ -141,7 +141,14 @@ const Conditions = (props) => {
141
141
  const dateObject = new Date(date);
142
142
  if (isNaN(dateObject.getTime()))
143
143
  return null; // Invalid date handling
144
- return dateObject.toISOString();
144
+ // Get date in local timezone format to avoid timezone shifts
145
+ const year = dateObject.getFullYear();
146
+ const month = String(dateObject.getMonth() + 1).padStart(2, "0");
147
+ const day = String(dateObject.getDate()).padStart(2, "0");
148
+ const hours = String(dateObject.getHours()).padStart(2, "0");
149
+ const minutes = String(dateObject.getMinutes()).padStart(2, "0");
150
+ const seconds = String(dateObject.getSeconds()).padStart(2, "0");
151
+ return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}`;
145
152
  }
146
153
  return null;
147
154
  };
@@ -194,6 +201,6 @@ const Conditions = (props) => {
194
201
  .find((access) => access.datatype === (columnName === null || columnName === void 0 ? void 0 : columnName.dataType))) === null || _a === void 0 ? void 0 : _a.conditions.includes(each.value);
195
202
  }), disabled: columnName === "", optionLabel: "name", placeholder: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.elementTwoPlaceHolder)
196
203
  ? filterModelText.elementTwoPlaceHolder
197
- : "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 md:px-2 lg: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" }) }))] }))] })));
204
+ : "Select", onChange: (event) => onUpdateCondition(event.value), panelClassName: "w-14rem status_select_field" }), renderDynamicField(columnName)] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex gap-1 col-1 -mt-2 md:px-2 lg: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" }) }))] }))] })));
198
205
  };
199
206
  exports.default = Conditions;
@@ -3,39 +3,55 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
- const svg_component_1 = tslib_1.__importDefault(require("../../directives/svg-component"));
7
- const button_1 = tslib_1.__importDefault(require("../button/button"));
6
+ // import SvgComponent from "../../directives/svg-component";
7
+ // import Button from "../button/button";
8
+ const error_500_png_1 = tslib_1.__importDefault(require("../../assets/images/Error/error-500.png"));
8
9
  function ErrorBoundary({ children }) {
9
10
  const [hasError, setHasError] = (0, react_1.useState)(false);
10
11
  (0, react_1.useEffect)(() => {
11
12
  const errorHandler = (error, errorInfo) => {
12
- if ((error === null || error === void 0 ? void 0 : error.message) === 'ResizeObserver loop completed with undelivered notifications.') {
13
- const resizeObserverErrDiv = document.getElementById('webpack-dev-server-client-overlay-div');
14
- const resizeObserverErr = document.getElementById('webpack-dev-server-client-overlay');
13
+ if ((error === null || error === void 0 ? void 0 : error.message) ===
14
+ "ResizeObserver loop completed with undelivered notifications.") {
15
+ const resizeObserverErrDiv = document.getElementById("webpack-dev-server-client-overlay-div");
16
+ const resizeObserverErr = document.getElementById("webpack-dev-server-client-overlay");
15
17
  if (resizeObserverErr) {
16
- resizeObserverErr.setAttribute('style', 'display: none');
18
+ resizeObserverErr.setAttribute("style", "display: none");
17
19
  }
18
20
  if (resizeObserverErrDiv) {
19
- resizeObserverErrDiv.setAttribute('style', 'display: none');
21
+ resizeObserverErrDiv.setAttribute("style", "display: none");
20
22
  }
21
23
  }
22
24
  else {
23
25
  setHasError(true);
24
26
  }
25
27
  // You can log the error here
26
- console.error(error, errorInfo, 'error details');
28
+ console.error(error, errorInfo, "error details");
27
29
  };
28
30
  // Add the error handler to the window object
29
- window.addEventListener('error', errorHandler);
31
+ window.addEventListener("error", errorHandler);
30
32
  // Clean up the error handler
31
33
  return () => {
32
- window.removeEventListener('error', errorHandler);
34
+ window.removeEventListener("error", errorHandler);
33
35
  };
34
36
  }, []);
35
37
  if (hasError) {
36
- console.log(hasError, 'error occured');
38
+ console.log(hasError, "error occured");
37
39
  // Fallback UI for when an error occurs
38
- return (0, jsx_runtime_1.jsx)("div", Object.assign({ role: "alert", className: "errorContainer bg-red-50" }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: `flex align-items-center justify-content-center border-1 border-red-200 border-round-xl` }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex gap-3 flex-column align-items-center border-round-lg p-6 error_description" }, { children: [(0, jsx_runtime_1.jsx)("h2", Object.assign({ className: "my-0 text-gray-900" }, { children: "Fail to connect" })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "my-0 text-gray-600" }, { children: "Something went wrong! please refresh the page and try again." })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex gap-3 mt-6" }, { children: [(0, jsx_runtime_1.jsxs)(button_1.default, Object.assign({ onClick: () => window.location.reload(), outlined: true, className: "flex bg-white focus:border-gray-400 align-items-center gap-3 px-4 py-3" }, { children: [(0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "refresh-ccw-02" }), " Refresh"] })), (0, jsx_runtime_1.jsxs)(button_1.default, Object.assign({ className: "flex align-items-center gap-3 px-4 py-3", onClick: () => (window.location.href = window.location.origin) }, { children: [(0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "arrow-narrow-left", color: "#fff" }), " Go Back"] }))] }))] })) })) }));
40
+ return (
41
+ // <div role="alert" className="errorContainer bg-gray-200">
42
+ // <div className="border-round-xl"></div>
43
+ // <div className="flex flex-column gap3">
44
+ // <h5 className="text-lg text-primary-500">Tesla's Power Surge</h5>
45
+ // <h4 className="display-1 text-gray-900">Error 500</h4>
46
+ // <p>Tesla's Experiment Overloaded the System!</p>
47
+ // <p>
48
+ // In the 1890s, Tesla’s experiments caused power surges, lighting up
49
+ // entire labs—but also breaking things. Looks like our system needs a
50
+ // reset too!
51
+ // </p>
52
+ // </div>
53
+ // </div>
54
+ (0, jsx_runtime_1.jsx)("div", Object.assign({ role: "alert", className: "errorContainer bg-gray-200 h-full w-full" }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center justify-content-center gap-6", style: { width: "600px" } }, { children: [(0, jsx_runtime_1.jsx)("img", { className: "border-round-6 overflow-hidden max-w-15rem", src: error_500_png_1.default }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex flex-column align-items-start" }, { children: [(0, jsx_runtime_1.jsx)("h5", Object.assign({ className: "text-lg text-primary-500 my-0" }, { children: "Tesla's Power Surge" })), (0, jsx_runtime_1.jsx)("h4", Object.assign({ className: "text-gray-900 mt-0 mt-8 mb-8 pb-3", style: { fontSize: "64px" } }, { children: "Error 500" })), (0, jsx_runtime_1.jsx)("p", Object.assign({ className: "my-0 text-left" }, { children: "Tesla's Experiment Overloaded the System!" })), (0, jsx_runtime_1.jsx)("p", Object.assign({ className: "my-0 text-left line-height-4" }, { children: "In the 1890s, Tesla\u2019s experiments caused power surges, lighting up entire labs\u2014but also breaking things. Looks like our system needs a reset too!" }))] }))] })) })));
39
55
  }
40
56
  return children;
41
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "6.4.81",
3
+ "version": "6.4.83",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",