awing-library 2.1.46-beta → 2.1.48-beta

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,10 @@
3
3
  * @author dauquan1108@gmail.com on 12/13/2023.
4
4
  *
5
5
  **/
6
- import React from 'react';
6
+ /// <reference types="react" />
7
7
  interface PropsButtonTab {
8
8
  tabActive: string;
9
9
  onUpdateTabActive: (tabSelected: string) => void;
10
10
  }
11
- declare const _default: React.MemoExoticComponent<(props: PropsButtonTab) => JSX.Element>;
12
- export default _default;
11
+ declare const ButtonTabs: (props: PropsButtonTab) => JSX.Element;
12
+ export default ButtonTabs;
@@ -1,15 +1,6 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  var jsx_runtime_1 = require("react/jsx-runtime");
7
- /**
8
- *
9
- * @author dauquan1108@gmail.com on 12/13/2023.
10
- *
11
- **/
12
- var react_1 = __importDefault(require("react"));
13
4
  var material_1 = require("@mui/material");
14
5
  var react_i18next_1 = require("react-i18next");
15
6
  var Constant_1 = require("../../Constant");
@@ -54,4 +45,4 @@ var ButtonTabs = function (props) {
54
45
  },
55
46
  ], children: t('Common.Unread') })] }));
56
47
  };
57
- exports.default = react_1.default.memo(ButtonTabs);
48
+ exports.default = ButtonTabs;
@@ -27,7 +27,6 @@ var HeaderInfo = function (props) {
27
27
  }
28
28
  else {
29
29
  // Chuyển đến trang tương ứng
30
- // console.log('value : =============HeaderInfo========:>', value) // Quandx
31
30
  navigate("".concat(value));
32
31
  }
33
32
  };
@@ -15,14 +15,9 @@ var react_i18next_1 = require("react-i18next");
15
15
  var material_1 = require("@mui/material");
16
16
  var Message_1 = require("./Message");
17
17
  var NotificationContent = function (props) {
18
- var _a;
19
- var notificationMessage = props.notificationMessage, _b = props.status, status = _b === void 0 ? false : _b;
18
+ var _a, _b;
19
+ var notificationMessage = props.notificationMessage, _c = props.status, status = _c === void 0 ? false : _c;
20
20
  var t = (0, react_i18next_1.useTranslation)().t;
21
- var handleConversionTimestamp = function () {
22
- var _a;
23
- return (0, moment_1.default)(new Date((((_a = notificationMessage.createdDate) === null || _a === void 0 ? void 0 : _a.seconds) || 0) *
24
- 1000)).format('DD/MM/YYYY HH:mm a');
25
- };
26
21
  return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
27
22
  display: 'flex',
28
23
  flexDirection: 'column',
@@ -54,6 +49,9 @@ var NotificationContent = function (props) {
54
49
  textAlign: 'justify',
55
50
  },
56
51
  },
57
- ], children: (0, Message_1.getFullDescription)(notificationMessage === null || notificationMessage === void 0 ? void 0 : notificationMessage.sagaTransactionType, t, notificationMessage.fields).title }), ((_a = notificationMessage.createdDate) === null || _a === void 0 ? void 0 : _a.seconds) && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", sx: { color: status ? '#ED1D25' : 'inherit' }, children: handleConversionTimestamp() }))] }));
52
+ ], children: (0, Message_1.getFullDescription)(notificationMessage === null || notificationMessage === void 0 ? void 0 : notificationMessage.sagaTransactionType, t, notificationMessage.fields).title }), ((_a = notificationMessage === null || notificationMessage === void 0 ? void 0 : notificationMessage.createdDate) === null || _a === void 0 ? void 0 : _a.seconds) && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", sx: { color: status ? '#ED1D25' : 'inherit' }, children: moment_1.default
53
+ .unix(Number((_b = notificationMessage === null || notificationMessage === void 0 ? void 0 : notificationMessage.createdDate) === null || _b === void 0 ? void 0 : _b.seconds))
54
+ .locale(t('Common.lg'))
55
+ .format('MM/DD/YYYY hh:mm A') }))] }));
58
56
  };
59
57
  exports.default = react_1.default.memo(NotificationContent);
@@ -110,7 +110,7 @@ var NotificationDetail = function () {
110
110
  }
111
111
  }, []);
112
112
  var handleValueFilter = function (textSearch, tabs) {
113
- setCount(-1);
113
+ textSearch.length === 0 ? setCount(0) : setCount(-1);
114
114
  setNotificationMessage([]);
115
115
  setValueFilter({
116
116
  textSearch: textSearch,
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "Common": {
3
+ "lg": "en",
3
4
  "InvalidData": "Invalid data",
4
5
  "Required": "This field is required",
5
6
  "Upload": "Upload",
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "Common": {
3
+ "lg": "vn",
3
4
  "InvalidData": "Dữ liệu không hợp lệ",
4
5
  "Required": "Đây là trường bắt buộc",
5
6
  "Upload": "Tải lên",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.46-beta",
3
+ "version": "2.1.48-beta",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",