hanbiro-react16-sdk 1.0.28 → 1.0.30
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/README.md +58 -5
- package/dist/components/ChatAIDraft/ChatInput.js +3 -1
- package/dist/components/ChatAIDraft/ChatList/MessageItem.js +3 -1
- package/dist/components/ChatAIDraft/CreatePanel/EmptyState.js +15 -15
- package/dist/components/ChatAIDraft/CreatePanel/index.d.ts +0 -1
- package/dist/components/ChatAIDraft/CreatePanel/index.js +5 -4
- package/dist/components/ChatAIDraft/ReplyPanel/ContextPreviewModal.js +3 -1
- package/dist/components/ChatAIDraft/ReplyPanel/EmptyState.js +10 -10
- package/dist/components/ChatAIDraft/ReplyPanel/Header/index.js +8 -4
- package/dist/components/ChatAIDraft/ReplyPanel/MailListSelect.js +12 -9
- package/dist/components/ChatAIDraft/ReplyPanel/index.d.ts +0 -1
- package/dist/components/ChatAIDraft/ReplyPanel/index.js +9 -6
- package/dist/components/ChatAIDraft/SettingPopper/index.js +8 -6
- package/dist/components/ChatAIDraft/constants.d.ts +2 -2
- package/dist/components/ChatAIDraft/constants.js +16 -14
- package/dist/components/ChatAIDraft/index.d.ts +0 -1
- package/dist/components/Pagination/index.js +4 -2
- package/dist/components/SummaryAIEmails/FilterTabs.js +4 -2
- package/dist/components/SummaryAIEmails/SummaryItem.js +3 -1
- package/dist/components/SummaryAIEmails/index.d.ts +0 -1
- package/dist/components/SummaryAIEmails/index.js +5 -3
- package/dist/components/SummaryAIEmails/utils.d.ts +2 -1
- package/dist/components/SummaryAIEmails/utils.js +5 -4
- package/dist/hanbiro-react16-sdk.style.css +1 -1
- package/dist/hanbiro-react16-sdk.umd.js +230 -100
- package/dist/index.js +4 -3
- package/dist/lang/en.d.ts +3 -0
- package/dist/lang/en.js +66 -0
- package/dist/lang/index.d.ts +4 -0
- package/dist/lang/index.js +18 -0
- package/dist/lang/keyLang.d.ts +62 -0
- package/dist/lang/keyLang.js +66 -0
- package/dist/lang/ko.d.ts +3 -0
- package/dist/lang/ko.js +66 -0
- package/dist/lang/vi.d.ts +3 -0
- package/dist/lang/vi.js +66 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/lang.d.ts +1 -0
- package/dist/utils/lang.js +30 -0
- package/dist/utils/storage.d.ts +8 -0
- package/dist/utils/storage.js +19 -0
- package/dist/utils/url.d.ts +2 -0
- package/dist/utils/url.js +8 -2
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { formatDate } from "./utils.js";
|
|
3
|
+
import { t } from "../../lang/index.js";
|
|
3
4
|
import ArrowUp from "../../node_modules/react-feather/dist/icons/arrow-up.js";
|
|
4
5
|
import ArrowDown from "../../node_modules/react-feather/dist/icons/arrow-down.js";
|
|
6
|
+
import { LangKey } from "../../lang/keyLang.js";
|
|
5
7
|
const SummaryItem = ({ item }) => {
|
|
6
8
|
const isSent = (item == null ? void 0 : item.direction) === "sent" || (item == null ? void 0 : item.sig) === "out";
|
|
7
9
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -41,7 +43,7 @@ const SummaryItem = ({ item }) => {
|
|
|
41
43
|
}
|
|
42
44
|
},
|
|
43
45
|
isSent ? /* @__PURE__ */ React.createElement(ArrowUp, { size: 11 }) : /* @__PURE__ */ React.createElement(ArrowDown, { size: 11 }),
|
|
44
|
-
isSent ?
|
|
46
|
+
t(isSent ? LangKey.SENT : LangKey.RECEIVED)
|
|
45
47
|
)
|
|
46
48
|
),
|
|
47
49
|
/* @__PURE__ */ React.createElement(
|
|
@@ -2,7 +2,8 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
import { getBaseUrl } from "../../utils/url.js";
|
|
5
|
+
import { SDKConfig, getBaseUrl } from "../../utils/url.js";
|
|
6
|
+
import { t } from "../../lang/index.js";
|
|
6
7
|
import LoadingContainer from "../LoadingContainer/index.js";
|
|
7
8
|
import TargetInfoBar from "./TargetInfoBar.js";
|
|
8
9
|
import FilterTabs from "./FilterTabs.js";
|
|
@@ -10,6 +11,7 @@ import SummaryItem from "./SummaryItem.js";
|
|
|
10
11
|
import Pagination from "../Pagination/index.js";
|
|
11
12
|
import LanguagePopover from "./LanguagePopover.js";
|
|
12
13
|
import { PAGE_SIZE, parseDataLine, findLangLabel } from "./utils.js";
|
|
14
|
+
import { LangKey } from "../../lang/keyLang.js";
|
|
13
15
|
const INITIAL_META = {
|
|
14
16
|
total: 0,
|
|
15
17
|
receive: 0,
|
|
@@ -93,7 +95,7 @@ class SummaryAIEmails extends React.Component {
|
|
|
93
95
|
this.setState({ langAnchor: null });
|
|
94
96
|
});
|
|
95
97
|
this.state = {
|
|
96
|
-
lang:
|
|
98
|
+
lang: SDKConfig.lang || "ko",
|
|
97
99
|
mailtype: "all",
|
|
98
100
|
page: 1,
|
|
99
101
|
items: [],
|
|
@@ -182,7 +184,7 @@ class SummaryAIEmails extends React.Component {
|
|
|
182
184
|
fontSize: 13
|
|
183
185
|
}
|
|
184
186
|
},
|
|
185
|
-
|
|
187
|
+
t(LangKey.NO_DATA)
|
|
186
188
|
),
|
|
187
189
|
items.map((item, idx) => /* @__PURE__ */ React.createElement(SummaryItem, { key: idx, item }))
|
|
188
190
|
),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { LabelValue } from '../../types';
|
|
2
2
|
import { SummaryItemData, MailType } from './types';
|
|
3
|
+
import { LangKey } from '../../lang';
|
|
3
4
|
|
|
4
5
|
export declare const PAGE_SIZE = 5;
|
|
5
6
|
export declare const FILTERS: {
|
|
6
7
|
value: MailType;
|
|
7
|
-
label:
|
|
8
|
+
label: LangKey;
|
|
8
9
|
}[];
|
|
9
10
|
export declare const formatDate: (raw: string) => string;
|
|
10
11
|
export declare const parseDataLine: (line: string) => SummaryItemData | null;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { LangKey } from "../../lang/keyLang.js";
|
|
1
2
|
const PAGE_SIZE = 5;
|
|
2
3
|
const FILTERS = [
|
|
3
|
-
{ value: "all", label:
|
|
4
|
-
{ value: "receive", label:
|
|
5
|
-
{ value: "sent", label:
|
|
4
|
+
{ value: "all", label: LangKey.ALL },
|
|
5
|
+
{ value: "receive", label: LangKey.RECEIVED },
|
|
6
|
+
{ value: "sent", label: LangKey.SENT }
|
|
6
7
|
];
|
|
7
8
|
const formatDate = (raw) => {
|
|
8
9
|
if (!raw) return "";
|
|
@@ -27,7 +28,7 @@ const parseDataLine = (line) => {
|
|
|
27
28
|
date,
|
|
28
29
|
sig,
|
|
29
30
|
direction,
|
|
30
|
-
direction_label: direction === "sent" ?
|
|
31
|
+
direction_label: direction === "sent" ? LangKey.SENT : LangKey.RECEIVED,
|
|
31
32
|
subject,
|
|
32
33
|
messages
|
|
33
34
|
};
|