hanbiro-react16-sdk 1.0.29 → 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/dist/components/ChatAIDraft/CreatePanel/index.d.ts +0 -1
- package/dist/components/ChatAIDraft/CreatePanel/index.js +2 -1
- package/dist/components/ChatAIDraft/ReplyPanel/index.d.ts +0 -1
- package/dist/components/ChatAIDraft/ReplyPanel/index.js +2 -1
- package/dist/components/ChatAIDraft/index.d.ts +0 -2
- package/dist/components/ChatAIDraft/index.js +1 -7
- package/dist/components/SummaryAIEmails/index.d.ts +0 -2
- package/dist/components/SummaryAIEmails/index.js +2 -9
- package/dist/hanbiro-react16-sdk.style.css +1 -1
- package/dist/hanbiro-react16-sdk.umd.js +5 -18
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -45,6 +45,7 @@ import ChatInput from "../ChatInput.js";
|
|
|
45
45
|
import EmptyState from "./EmptyState.js";
|
|
46
46
|
import { getLengthOptions, getToneOptions } from "../constants.js";
|
|
47
47
|
import { AI_LANG_FLAGS } from "../../../constants/index.js";
|
|
48
|
+
import { SDKConfig } from "../../../utils/url.js";
|
|
48
49
|
import v4 from "../../../node_modules/uuid/dist/esm-browser/v4.js";
|
|
49
50
|
class CreatePanel extends React.Component {
|
|
50
51
|
constructor(props) {
|
|
@@ -108,7 +109,7 @@ class CreatePanel extends React.Component {
|
|
|
108
109
|
__publicField(this, "setTone", (tone) => this.setState({ tone }));
|
|
109
110
|
__publicField(this, "setLength", (length) => this.setState({ length }));
|
|
110
111
|
this.rootRef = React.createRef();
|
|
111
|
-
const lang = ((_a = AI_LANG_FLAGS) == null ? void 0 : _a.find((_item) => (_item == null ? void 0 : _item.value) ===
|
|
112
|
+
const lang = ((_a = AI_LANG_FLAGS) == null ? void 0 : _a.find((_item) => (_item == null ? void 0 : _item.value) === SDKConfig.lang)) || AI_LANG_FLAGS[0];
|
|
112
113
|
this.state = {
|
|
113
114
|
message: "",
|
|
114
115
|
messages: [],
|
|
@@ -49,6 +49,7 @@ import ContextPreviewModal from "./ContextPreviewModal.js";
|
|
|
49
49
|
import { fetchMailView, fetchMailAiContext } from "./helper.js";
|
|
50
50
|
import { getLengthOptions, getToneOptions } from "../constants.js";
|
|
51
51
|
import { AI_LANG_FLAGS } from "../../../constants/index.js";
|
|
52
|
+
import { SDKConfig } from "../../../utils/url.js";
|
|
52
53
|
import { t } from "../../../lang/index.js";
|
|
53
54
|
import v4 from "../../../node_modules/uuid/dist/esm-browser/v4.js";
|
|
54
55
|
import { LangKey } from "../../../lang/keyLang.js";
|
|
@@ -180,7 +181,7 @@ class ReplyPanel extends React.Component {
|
|
|
180
181
|
__publicField(this, "setTone", (tone) => this.setState({ tone }));
|
|
181
182
|
__publicField(this, "setLength", (length) => this.setState({ length }));
|
|
182
183
|
this.rootRef = React.createRef();
|
|
183
|
-
const lang = ((_a = AI_LANG_FLAGS) == null ? void 0 : _a.find((_item) => (_item == null ? void 0 : _item.value) ===
|
|
184
|
+
const lang = ((_a = AI_LANG_FLAGS) == null ? void 0 : _a.find((_item) => (_item == null ? void 0 : _item.value) === SDKConfig.lang)) || AI_LANG_FLAGS[0];
|
|
184
185
|
this.state = {
|
|
185
186
|
view: "empty",
|
|
186
187
|
sourceMail: null,
|
|
@@ -29,14 +29,8 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
import * as React from "react";
|
|
30
30
|
import CreatePanel from "./CreatePanel/index.js";
|
|
31
31
|
import ReplyPanel from "./ReplyPanel/index.js";
|
|
32
|
-
import { SDKConfig } from "../../utils/url.js";
|
|
33
32
|
const ChatAIDraft = (props) => {
|
|
34
|
-
const _a = props, { type = "new", sourceMid
|
|
35
|
-
React.useEffect(() => {
|
|
36
|
-
if (userLang) {
|
|
37
|
-
SDKConfig.lang = userLang;
|
|
38
|
-
}
|
|
39
|
-
}, [userLang]);
|
|
33
|
+
const _a = props, { type = "new", sourceMid } = _a, rest = __objRest(_a, ["type", "sourceMid"]);
|
|
40
34
|
if ((type === "reply" || type === "forward") && sourceMid) {
|
|
41
35
|
return /* @__PURE__ */ React.createElement(ReplyPanel, __spreadValues({ type, sourceMid }, rest));
|
|
42
36
|
}
|
|
@@ -2,7 +2,7 @@ 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 {
|
|
5
|
+
import { SDKConfig, getBaseUrl } from "../../utils/url.js";
|
|
6
6
|
import { t } from "../../lang/index.js";
|
|
7
7
|
import LoadingContainer from "../LoadingContainer/index.js";
|
|
8
8
|
import TargetInfoBar from "./TargetInfoBar.js";
|
|
@@ -95,7 +95,7 @@ class SummaryAIEmails extends React.Component {
|
|
|
95
95
|
this.setState({ langAnchor: null });
|
|
96
96
|
});
|
|
97
97
|
this.state = {
|
|
98
|
-
lang:
|
|
98
|
+
lang: SDKConfig.lang || "ko",
|
|
99
99
|
mailtype: "all",
|
|
100
100
|
page: 1,
|
|
101
101
|
items: [],
|
|
@@ -103,18 +103,11 @@ class SummaryAIEmails extends React.Component {
|
|
|
103
103
|
isLoading: false,
|
|
104
104
|
langAnchor: null
|
|
105
105
|
};
|
|
106
|
-
if (props.userLang) {
|
|
107
|
-
SDKConfig.lang = props.userLang;
|
|
108
|
-
}
|
|
109
106
|
}
|
|
110
107
|
componentDidMount() {
|
|
111
108
|
this.startStream();
|
|
112
109
|
}
|
|
113
110
|
componentDidUpdate(prevProps, prevState) {
|
|
114
|
-
if (this.props.userLang !== prevProps.userLang && this.props.userLang) {
|
|
115
|
-
SDKConfig.lang = this.props.userLang;
|
|
116
|
-
this.forceUpdate();
|
|
117
|
-
}
|
|
118
111
|
const targetChanged = prevProps.targetEmail !== this.props.targetEmail;
|
|
119
112
|
const filterChanged = prevState.lang !== this.state.lang || prevState.mailtype !== this.state.mailtype || prevState.page !== this.state.page;
|
|
120
113
|
if (targetChanged || filterChanged) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* hanbiro-react16-sdk v1.0.
|
|
2
|
+
* hanbiro-react16-sdk v1.0.30
|
|
3
3
|
* Build Date: 2026-05-22
|
|
4
4
|
*/
|
|
5
5
|
function _toArray(r) { return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest(); }
|
|
@@ -8009,7 +8009,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
8009
8009
|
});
|
|
8010
8010
|
_this12.rootRef = React__namespace.createRef();
|
|
8011
8011
|
var lang = (AI_LANG_FLAGS == null ? void 0 : AI_LANG_FLAGS.find(function (_item) {
|
|
8012
|
-
return (_item == null ? void 0 : _item.value) ===
|
|
8012
|
+
return (_item == null ? void 0 : _item.value) === SDKConfig.lang;
|
|
8013
8013
|
})) || AI_LANG_FLAGS[0];
|
|
8014
8014
|
_this12.state = {
|
|
8015
8015
|
message: "",
|
|
@@ -9457,7 +9457,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
9457
9457
|
});
|
|
9458
9458
|
_this19.rootRef = React__namespace.createRef();
|
|
9459
9459
|
var lang = (AI_LANG_FLAGS == null ? void 0 : AI_LANG_FLAGS.find(function (_item) {
|
|
9460
|
-
return (_item == null ? void 0 : _item.value) ===
|
|
9460
|
+
return (_item == null ? void 0 : _item.value) === SDKConfig.lang;
|
|
9461
9461
|
})) || AI_LANG_FLAGS[0];
|
|
9462
9462
|
_this19.state = {
|
|
9463
9463
|
view: "empty",
|
|
@@ -9567,13 +9567,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
9567
9567
|
_a2$type = _a2.type,
|
|
9568
9568
|
type = _a2$type === void 0 ? "new" : _a2$type,
|
|
9569
9569
|
sourceMid = _a2.sourceMid,
|
|
9570
|
-
|
|
9571
|
-
rest = __objRest(_a2, ["type", "sourceMid", "userLang"]);
|
|
9572
|
-
React__namespace.useEffect(function () {
|
|
9573
|
-
if (userLang) {
|
|
9574
|
-
SDKConfig.lang = userLang;
|
|
9575
|
-
}
|
|
9576
|
-
}, [userLang]);
|
|
9570
|
+
rest = __objRest(_a2, ["type", "sourceMid"]);
|
|
9577
9571
|
if ((type === "reply" || type === "forward") && sourceMid) {
|
|
9578
9572
|
return /* @__PURE__ */React__namespace.createElement(ReplyPanel, __spreadValues({
|
|
9579
9573
|
type: type,
|
|
@@ -10022,7 +10016,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
10022
10016
|
});
|
|
10023
10017
|
});
|
|
10024
10018
|
_this22.state = {
|
|
10025
|
-
lang:
|
|
10019
|
+
lang: SDKConfig.lang || "ko",
|
|
10026
10020
|
mailtype: "all",
|
|
10027
10021
|
page: 1,
|
|
10028
10022
|
items: [],
|
|
@@ -10030,9 +10024,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
10030
10024
|
isLoading: false,
|
|
10031
10025
|
langAnchor: null
|
|
10032
10026
|
};
|
|
10033
|
-
if (props.userLang) {
|
|
10034
|
-
SDKConfig.lang = props.userLang;
|
|
10035
|
-
}
|
|
10036
10027
|
return _this22;
|
|
10037
10028
|
}
|
|
10038
10029
|
_inherits(SummaryAIEmails, _React__namespace$Com1);
|
|
@@ -10044,10 +10035,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
10044
10035
|
}, {
|
|
10045
10036
|
key: "componentDidUpdate",
|
|
10046
10037
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
10047
|
-
if (this.props.userLang !== prevProps.userLang && this.props.userLang) {
|
|
10048
|
-
SDKConfig.lang = this.props.userLang;
|
|
10049
|
-
this.forceUpdate();
|
|
10050
|
-
}
|
|
10051
10038
|
var targetChanged = prevProps.targetEmail !== this.props.targetEmail;
|
|
10052
10039
|
var filterChanged = prevState.lang !== this.state.lang || prevState.mailtype !== this.state.mailtype || prevState.page !== this.state.page;
|
|
10053
10040
|
if (targetChanged || filterChanged) {
|
package/dist/index.js
CHANGED