hanbiro-react16-sdk 1.0.28 → 1.0.29
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.js +3 -3
- 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.js +7 -5
- 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 +1 -0
- package/dist/components/ChatAIDraft/index.js +7 -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 +1 -0
- package/dist/components/SummaryAIEmails/index.js +11 -2
- 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 +241 -98
- 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
|
@@ -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 { getBaseUrl, SDKConfig } 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,
|
|
@@ -101,11 +103,18 @@ class SummaryAIEmails extends React.Component {
|
|
|
101
103
|
isLoading: false,
|
|
102
104
|
langAnchor: null
|
|
103
105
|
};
|
|
106
|
+
if (props.userLang) {
|
|
107
|
+
SDKConfig.lang = props.userLang;
|
|
108
|
+
}
|
|
104
109
|
}
|
|
105
110
|
componentDidMount() {
|
|
106
111
|
this.startStream();
|
|
107
112
|
}
|
|
108
113
|
componentDidUpdate(prevProps, prevState) {
|
|
114
|
+
if (this.props.userLang !== prevProps.userLang && this.props.userLang) {
|
|
115
|
+
SDKConfig.lang = this.props.userLang;
|
|
116
|
+
this.forceUpdate();
|
|
117
|
+
}
|
|
109
118
|
const targetChanged = prevProps.targetEmail !== this.props.targetEmail;
|
|
110
119
|
const filterChanged = prevState.lang !== this.state.lang || prevState.mailtype !== this.state.mailtype || prevState.page !== this.state.page;
|
|
111
120
|
if (targetChanged || filterChanged) {
|
|
@@ -182,7 +191,7 @@ class SummaryAIEmails extends React.Component {
|
|
|
182
191
|
fontSize: 13
|
|
183
192
|
}
|
|
184
193
|
},
|
|
185
|
-
|
|
194
|
+
t(LangKey.NO_DATA)
|
|
186
195
|
),
|
|
187
196
|
items.map((item, idx) => /* @__PURE__ */ React.createElement(SummaryItem, { key: idx, item }))
|
|
188
197
|
),
|
|
@@ -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
|
};
|