@banch0u/core-project-test-repository 1.7.1 → 1.8.0

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.
@@ -3,10 +3,9 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import { Form, Modal } from "antd";
5
5
  import React, { forwardRef, useCallback, useImperativeHandle, useState } from "react";
6
- import { useDispatch, useSelector } from "react-redux";
7
- import { setCitizenSearchId, setSubtopicSelectDisabled } from "../../store/slices/global";
6
+ import { useSelector } from "react-redux";
8
7
  import style from "./index.module.scss";
9
- import { Button } from "@banch0u/core-project-test-repository";
8
+ import Button from "../Button";
10
9
  var FormModal = function FormModal(_ref, ref) {
11
10
  var okText = _ref.okText,
12
11
  cancelText = _ref.cancelText,
@@ -32,7 +31,6 @@ var FormModal = function FormModal(_ref, ref) {
32
31
  var _useForm = useForm(),
33
32
  _useForm2 = _slicedToArray(_useForm, 1),
34
33
  form = _useForm2[0];
35
- var dispatch = useDispatch();
36
34
  if (customForm) {
37
35
  customForm(form);
38
36
  }
@@ -96,12 +94,13 @@ var FormModal = function FormModal(_ref, ref) {
96
94
  case 9:
97
95
  form.resetFields();
98
96
  setIsVisible(false);
99
- _context.next = 15;
97
+ _context.next = 16;
100
98
  break;
101
99
  case 13:
102
100
  _context.prev = 13;
103
101
  _context.t0 = _context["catch"](0);
104
- case 15:
102
+ console.log(_context.t0);
103
+ case 16:
105
104
  case "end":
106
105
  return _context.stop();
107
106
  }
@@ -1,6 +1,6 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
- import React, { useRef, useState } from "react";
3
+ import React, { useRef } from "react";
4
4
  import { useDispatch, useSelector } from "react-redux";
5
5
  import { readNotification, readNotificationAll } from "../../store/slices/notification";
6
6
  import { Button, List, Tooltip, Typography } from "antd";
@@ -11,7 +11,6 @@ import FormModal from "../FormModal";
11
11
  var NotificationDropdown = function NotificationDropdown(_ref) {
12
12
  var _notifications$notifi;
13
13
  var size = _ref.size,
14
- page = _ref.page,
15
14
  setSize = _ref.setSize,
16
15
  setPage = _ref.setPage;
17
16
  var dispatch = useDispatch();
@@ -157,7 +157,7 @@ var NotificationSettingsContent = /*#__PURE__*/React.forwardRef(function (props,
157
157
  var _props$onClose;
158
158
  dispatch(editNotificationSettings(data));
159
159
  props === null || props === void 0 || (_props$onClose = props.onClose) === null || _props$onClose === void 0 || _props$onClose.call(props);
160
- }, [dispatch]);
160
+ }, [dispatch, props]);
161
161
  return /*#__PURE__*/React.createElement("div", {
162
162
  className: style.settingsWrapper
163
163
  }, /*#__PURE__*/React.createElement(Title, {
@@ -3,7 +3,7 @@ import React, { useEffect, useState } from "react";
3
3
  import { Badge, Dropdown, Menu, Tooltip } from "antd";
4
4
  import { SunOutlined, MoonOutlined } from "@ant-design/icons";
5
5
  import style from "./index.module.scss";
6
- import { BellOutlined, BellFilled, NotificationOutlined } from "@ant-design/icons";
6
+ import { BellOutlined } from "@ant-design/icons";
7
7
  import { useDispatch, useSelector } from "react-redux";
8
8
  import { Link } from "react-router-dom";
9
9
  import { getProfileInfo, scopes } from "../../store/slices/auth";
@@ -0,0 +1,62 @@
1
+ import React from "react";
2
+ import style from "./index.module.scss";
3
+ import Button from "../Button";
4
+ import { Divider, Select as AntdSelect } from "antd";
5
+ var Select = function Select(_ref) {
6
+ var children = _ref.children,
7
+ className = _ref.className,
8
+ _ref$placeholder = _ref.placeholder,
9
+ placeholder = _ref$placeholder === void 0 ? "" : _ref$placeholder,
10
+ _ref$divider = _ref.divider,
11
+ divider = _ref$divider === void 0 ? false : _ref$divider,
12
+ _ref$dividerButtonNam = _ref.dividerButtonName,
13
+ dividerButtonName = _ref$dividerButtonNam === void 0 ? "" : _ref$dividerButtonNam,
14
+ _ref$onOpen = _ref.onOpen,
15
+ onOpen = _ref$onOpen === void 0 ? function () {} : _ref$onOpen,
16
+ _ref$onChange = _ref.onChange,
17
+ onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
18
+ _ref$disabled = _ref.disabled,
19
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
20
+ _ref$mode = _ref.mode,
21
+ mode = _ref$mode === void 0 ? "single" : _ref$mode,
22
+ _ref$optionLabelProp = _ref.optionLabelProp,
23
+ optionLabelProp = _ref$optionLabelProp === void 0 ? "children" : _ref$optionLabelProp,
24
+ _ref$tagRender = _ref.tagRender,
25
+ tagRender = _ref$tagRender === void 0 ? function () {} : _ref$tagRender,
26
+ value = _ref.value,
27
+ defaultValue = _ref.defaultValue;
28
+ return /*#__PURE__*/React.createElement(AntdSelect, {
29
+ className: className || style.select,
30
+ showSearch: true,
31
+ placeholder: placeholder,
32
+ optionFilterProp: "children",
33
+ filterOption: function filterOption(input, option) {
34
+ if (!(option !== null && option !== void 0 && option.children) || typeof option.children !== "string") return false;
35
+ var normalizeAz = function normalizeAz(str) {
36
+ return str.replace(/I/g, "i").toLocaleLowerCase("az").normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/ç/g, "c").replace(/ş/g, "s").replace(/ğ/g, "g").replace(/ü/g, "u").replace(/ö/g, "o").replace(/ə/g, "e");
37
+ };
38
+ var normalizedInput = normalizeAz(input);
39
+ var normalizedOption = normalizeAz(option.children);
40
+ return normalizedOption.includes(normalizedInput);
41
+ },
42
+ dropdownRender: function dropdownRender(menu) {
43
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, menu, divider ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, {
44
+ style: {
45
+ margin: "4px 0"
46
+ }
47
+ }), /*#__PURE__*/React.createElement("div", {
48
+ className: style.select_add_button
49
+ }, /*#__PURE__*/React.createElement(Button, {
50
+ onClick: onOpen
51
+ }, dividerButtonName))) : null));
52
+ },
53
+ onChange: onChange,
54
+ disabled: disabled,
55
+ mode: mode,
56
+ optionLabelProp: optionLabelProp,
57
+ tagRender: tagRender,
58
+ value: value,
59
+ defaultValue: defaultValue
60
+ }, children);
61
+ };
62
+ export default Select;
@@ -0,0 +1,28 @@
1
+ .select > div {
2
+ padding: 5px 16px !important;
3
+ // border-color: #bdbdbd !important;
4
+ border-radius: 6px !important;
5
+ height: 48px;
6
+ }
7
+ .select {
8
+ width: 100%;
9
+ height: auto;
10
+ height: 48px;
11
+ span {
12
+ font-size: 16px !important;
13
+ font-weight: 500 !important;
14
+ line-height: 24px !important;
15
+ text-align: left !important;
16
+ }
17
+ }
18
+ .select_add_button {
19
+ display: inline-flex;
20
+ flex-wrap: nowrap;
21
+ padding: 8px;
22
+ justify-content: center;
23
+
24
+ button {
25
+ width: 200px !important;
26
+ padding: 5.5px;
27
+ }
28
+ }
@@ -92,7 +92,7 @@ var Table = function Table(_ref) {
92
92
  return col.fixed === "right";
93
93
  }));
94
94
  var draggableColumns = filteredColumns(orderedColumns);
95
- var DraggableHeader = function DraggableHeader(props) {
95
+ var DraggableHeader = function DraggableHeader() {
96
96
  return /*#__PURE__*/React.createElement("tr", null, fixedLeftColumns.map(function (col, index) {
97
97
  return /*#__PURE__*/React.createElement("th", {
98
98
  key: col.dataIndex,
@@ -104,7 +104,7 @@ var Table = function Table(_ref) {
104
104
  background: "white"
105
105
  }
106
106
  }, col.title);
107
- }), draggableColumns.map(function (col, index) {
107
+ }), draggableColumns.map(function (col) {
108
108
  return /*#__PURE__*/React.createElement("th", {
109
109
  key: col.dataIndex,
110
110
  className: style.draggableHeader,
@@ -125,7 +125,7 @@ var Table = function Table(_ref) {
125
125
  }, col.title);
126
126
  }));
127
127
  };
128
- var DraggableWrapper = function DraggableWrapper(props) {
128
+ var DraggableWrapper = function DraggableWrapper() {
129
129
  return /*#__PURE__*/React.createElement(DragDropContext, {
130
130
  onDragEnd: handleDragEnd
131
131
  }, /*#__PURE__*/React.createElement(Droppable, {
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ export { default as FormModal } from "./components/FormModal";
8
8
  export { default as useNotification } from "./hooks/useNotification";
9
9
  export { default as message } from "./utils/message";
10
10
  export { default as Table } from "./components/Table";
11
+ export { default as Select } from "./components/Select";
11
12
  import LoginPage from "./pages/Login";
12
13
  import PlatformPage from "./pages/Platform";
13
14
  import HeaderLayout from "./layout/Header";
@@ -23,7 +23,7 @@ var Platform = function Platform() {
23
23
  useEffect(function () {
24
24
  dispatch(scopes());
25
25
  dispatch(getProfileInfo());
26
- }, []);
26
+ }, [dispatch]);
27
27
  return /*#__PURE__*/React.createElement("div", {
28
28
  className: style.platform
29
29
  }, /*#__PURE__*/React.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banch0u/core-project-test-repository",
3
- "version": "1.7.1",
3
+ "version": "1.8.0",
4
4
  "description": "Shared core features for all projects",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -24,11 +24,15 @@
24
24
  "publish:major": "npm run build && npm version major && npm publish"
25
25
  },
26
26
  "dependencies": {
27
+ "@ant-design/icons": "^6.0.0",
27
28
  "@microsoft/signalr": "^8.0.7",
28
29
  "@pdftron/webviewer": "^11.2.0",
29
30
  "@reduxjs/toolkit": "^2.6.1",
30
31
  "antd": "^5.16.0",
31
- "axios": "^1.8.4"
32
+ "axios": "^1.8.4",
33
+ "js-cookie": "^3.0.5",
34
+ "react-beautiful-dnd": "^13.1.1",
35
+ "react-redux": "^9.2.0"
32
36
  },
33
37
  "peerDependencies": {
34
38
  "react": "^18.0.0 || ^19.0.0",