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.
Files changed (44) hide show
  1. package/README.md +58 -5
  2. package/dist/components/ChatAIDraft/ChatInput.js +3 -1
  3. package/dist/components/ChatAIDraft/ChatList/MessageItem.js +3 -1
  4. package/dist/components/ChatAIDraft/CreatePanel/EmptyState.js +15 -15
  5. package/dist/components/ChatAIDraft/CreatePanel/index.d.ts +0 -1
  6. package/dist/components/ChatAIDraft/CreatePanel/index.js +5 -4
  7. package/dist/components/ChatAIDraft/ReplyPanel/ContextPreviewModal.js +3 -1
  8. package/dist/components/ChatAIDraft/ReplyPanel/EmptyState.js +10 -10
  9. package/dist/components/ChatAIDraft/ReplyPanel/Header/index.js +8 -4
  10. package/dist/components/ChatAIDraft/ReplyPanel/MailListSelect.js +12 -9
  11. package/dist/components/ChatAIDraft/ReplyPanel/index.d.ts +0 -1
  12. package/dist/components/ChatAIDraft/ReplyPanel/index.js +9 -6
  13. package/dist/components/ChatAIDraft/SettingPopper/index.js +8 -6
  14. package/dist/components/ChatAIDraft/constants.d.ts +2 -2
  15. package/dist/components/ChatAIDraft/constants.js +16 -14
  16. package/dist/components/ChatAIDraft/index.d.ts +0 -1
  17. package/dist/components/Pagination/index.js +4 -2
  18. package/dist/components/SummaryAIEmails/FilterTabs.js +4 -2
  19. package/dist/components/SummaryAIEmails/SummaryItem.js +3 -1
  20. package/dist/components/SummaryAIEmails/index.d.ts +0 -1
  21. package/dist/components/SummaryAIEmails/index.js +5 -3
  22. package/dist/components/SummaryAIEmails/utils.d.ts +2 -1
  23. package/dist/components/SummaryAIEmails/utils.js +5 -4
  24. package/dist/hanbiro-react16-sdk.style.css +1 -1
  25. package/dist/hanbiro-react16-sdk.umd.js +230 -100
  26. package/dist/index.js +4 -3
  27. package/dist/lang/en.d.ts +3 -0
  28. package/dist/lang/en.js +66 -0
  29. package/dist/lang/index.d.ts +4 -0
  30. package/dist/lang/index.js +18 -0
  31. package/dist/lang/keyLang.d.ts +62 -0
  32. package/dist/lang/keyLang.js +66 -0
  33. package/dist/lang/ko.d.ts +3 -0
  34. package/dist/lang/ko.js +66 -0
  35. package/dist/lang/vi.d.ts +3 -0
  36. package/dist/lang/vi.js +66 -0
  37. package/dist/utils/index.d.ts +1 -1
  38. package/dist/utils/lang.d.ts +1 -0
  39. package/dist/utils/lang.js +30 -0
  40. package/dist/utils/storage.d.ts +8 -0
  41. package/dist/utils/storage.js +19 -0
  42. package/dist/utils/url.d.ts +2 -0
  43. package/dist/utils/url.js +8 -2
  44. 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 ? "Sent" : "Received"
46
+ t(isSent ? LangKey.SENT : LangKey.RECEIVED)
45
47
  )
46
48
  ),
47
49
  /* @__PURE__ */ React.createElement(
@@ -4,7 +4,6 @@ import * as React from "react";
4
4
  export interface SummaryAIEmailsProps {
5
5
  targetEmail: string;
6
6
  targetName?: string;
7
- defaultLang?: string;
8
7
  langList?: LabelValue[];
9
8
  }
10
9
  interface SummaryAIEmailsState {
@@ -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: props.defaultLang || "ko",
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
- "No data"
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: string;
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: "All" },
4
- { value: "receive", label: "Received" },
5
- { value: "sent", label: "Sent" }
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" ? "Sent" : "Received",
31
+ direction_label: direction === "sent" ? LangKey.SENT : LangKey.RECEIVED,
31
32
  subject,
32
33
  messages
33
34
  };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * hanbiro-react16-sdk v1.0.28
2
+ * hanbiro-react16-sdk v1.0.30
3
3
  * Build Date: 2026-05-22
4
4
  */
5
5
  @charset "UTF-8";