@subiz/widget-v4 4.1.144 → 4.1.146
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/compiled_src/chatbox/Header.js +18 -1
- package/compiled_src/lib.js +1 -0
- package/config.js +1 -1
- package/dist/.HASH +1 -0
- package/dist/185.js +20 -78
- package/dist/1970d063f3c.app.js +1 -0
- package/dist/{196d3465f26.form.html → 1970d063f3c.form.html} +1 -1
- package/dist/1970d063f3c.form.js +1 -0
- package/dist/{196d3465f26.index.html → 1970d063f3c.index.html} +1 -1
- package/dist/{196d3465f26.library.html → 1970d063f3c.library.html} +1 -1
- package/dist/1970d063f3c.library.js +1 -0
- package/dist/{196d3465f26.preview.html → 1970d063f3c.preview.html} +1 -1
- package/dist/1970d063f3c.preview.js +1 -0
- package/dist/1970d063f3c.webview.js +1 -0
- package/dist/screenshoot.js +46 -29
- package/package.json +3 -3
- package/src/chatbox/Header.js +20 -1
- package/src/lib.js +1 -0
- package/dist/196d3465f26.app.js +0 -1
- package/dist/196d3465f26.form.js +0 -1
- package/dist/196d3465f26.library.js +0 -1
- package/dist/196d3465f26.preview.js +0 -1
- package/dist/196d3465f26.webview.js +0 -1
- package/dist/HASH +0 -1
- /package/dist/{196d3465f26.127.js → 1970d063f3c.127.js} +0 -0
- /package/dist/{196d3465f26.132.js → 1970d063f3c.132.js} +0 -0
- /package/dist/{196d3465f26.185.js → 1970d063f3c.185.js} +0 -0
- /package/dist/{196d3465f26.27.js → 1970d063f3c.27.js} +0 -0
- /package/dist/{196d3465f26.278.js → 1970d063f3c.278.js} +0 -0
- /package/dist/{196d3465f26.339.js → 1970d063f3c.339.js} +0 -0
- /package/dist/{196d3465f26.459.js → 1970d063f3c.459.js} +0 -0
- /package/dist/{196d3465f26.490.js → 1970d063f3c.490.js} +0 -0
- /package/dist/{196d3465f26.74.js → 1970d063f3c.74.js} +0 -0
- /package/dist/{196d3465f26.997.js → 1970d063f3c.997.js} +0 -0
|
@@ -10,9 +10,25 @@ var _common = require("../common.js");
|
|
|
10
10
|
var _preact = require("preact");
|
|
11
11
|
var _Emoji = _interopRequireDefault(require("./Emoji.js"));
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
16
|
class Header extends _common.Com {
|
|
14
17
|
constructor(props) {
|
|
15
18
|
super(props);
|
|
19
|
+
_defineProperty(this, "renderAgentAvatar", () => {
|
|
20
|
+
let accSetting = this.props.plugin.chatbox || {};
|
|
21
|
+
let agids = _index.default.get(accSetting, 'header.agent_ids') || [];
|
|
22
|
+
let agent = _index.default.get(this.props.store.matchAgent(agids[0]));
|
|
23
|
+
let logoUrl = _index.default.get(agent, 'avatar_url_128') || _index.default.get(agent, 'avatar_url');
|
|
24
|
+
if (!logoUrl) return;
|
|
25
|
+
return (0, _preact.h)("img", {
|
|
26
|
+
width: 38,
|
|
27
|
+
height: 38,
|
|
28
|
+
class: "avatar avatar__account",
|
|
29
|
+
src: this.props.store.replaceFileUrl(logoUrl) || require('../../assets/img/image_default.png')
|
|
30
|
+
});
|
|
31
|
+
});
|
|
16
32
|
}
|
|
17
33
|
renderAccountAvatar() {
|
|
18
34
|
let acc = this.props.store.matchAccount() || {};
|
|
@@ -57,10 +73,11 @@ class Header extends _common.Com {
|
|
|
57
73
|
let $back = null;
|
|
58
74
|
let style = '';
|
|
59
75
|
if (!classic) $back = this.renderBackButton();else style = 'padding-bottom: 75px !important;';
|
|
76
|
+
let layout = _index.default.get(accSetting, 'header.layout');
|
|
60
77
|
return (0, _preact.h)("div", {
|
|
61
78
|
class: cls,
|
|
62
79
|
style: style
|
|
63
|
-
}, $back, this.renderAccountAvatar(), (0, _preact.h)("div", {
|
|
80
|
+
}, $back, layout === 'agent' ? this.renderAgentAvatar() : this.renderAccountAvatar(), (0, _preact.h)("div", {
|
|
64
81
|
class: "widget-header--title-container"
|
|
65
82
|
}, (0, _preact.h)("div", {
|
|
66
83
|
class: "widget-header--title"
|
package/compiled_src/lib.js
CHANGED
package/config.js
CHANGED
package/dist/.HASH
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1970d063f3c
|
package/dist/185.js
CHANGED
|
@@ -853,84 +853,26 @@ class order_Order extends common/* Com */.Mw {
|
|
|
853
853
|
}
|
|
854
854
|
renderDesktopPaymentMethod(order) {
|
|
855
855
|
return null;
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
$desc = h("div", {
|
|
877
|
-
class: "muted mt-1",
|
|
878
|
-
style: "margin-left: 26px !important;"
|
|
879
|
-
}, h("div", null, "STK: ", pm.bank_number), h("div", null, "Ch\u1EE7 t\xE0i kho\u1EA3n: ", pm.bank_owner));
|
|
880
|
-
}
|
|
881
|
-
}
|
|
882
|
-
return h("div", {
|
|
883
|
-
style: "width: 100% !important; margin-top: 10px !important;"
|
|
884
|
-
}, h("div", {
|
|
885
|
-
class: "radio"
|
|
886
|
-
}, h("input", {
|
|
887
|
-
type: "radio",
|
|
888
|
-
id: 'pm.' + pm.id,
|
|
889
|
-
onInput: e => this.onChangePaymentMethod(pm.id),
|
|
890
|
-
name: "pm",
|
|
891
|
-
checked: this.state.pm === pm.id
|
|
892
|
-
}), h("label", {
|
|
893
|
-
class: "radio--label",
|
|
894
|
-
style: `margin-left: 4px !important; font-weight: ${this.state.pm === pm.id ? 500 : 400} !important;`,
|
|
895
|
-
for: 'pm.' + pm.id
|
|
896
|
-
}, $name), h("div", {
|
|
897
|
-
class: "radio--check"
|
|
898
|
-
}, h("div", {
|
|
899
|
-
class: "inside"
|
|
900
|
-
})), $desc));
|
|
901
|
-
});
|
|
902
|
-
let seccls = 'card_section';
|
|
903
|
-
if (this.isMobile()) seccls = 'order_section';
|
|
904
|
-
return h(Fragment, null, h("div", {
|
|
905
|
-
class: "order_section__line"
|
|
906
|
-
}), h("div", {
|
|
907
|
-
class: seccls
|
|
908
|
-
}, h("div", {
|
|
909
|
-
class: "order_label"
|
|
910
|
-
}, this.props.t('payment')), h("div", {
|
|
911
|
-
class: "form",
|
|
912
|
-
style: "justify-content: space-between !important;"
|
|
913
|
-
}, $pms)));
|
|
914
|
-
}
|
|
915
|
-
let pm = order.payment_method || {
|
|
916
|
-
method: 'cod'
|
|
917
|
-
};
|
|
918
|
-
let $body = null;
|
|
919
|
-
if (pm.method === 'cash') $body = h("div", null, this.props.t('pm_cash'));
|
|
920
|
-
if (pm.method === 'cod') $body = h("div", null, this.props.t('pm_cod'));
|
|
921
|
-
if (pm.method === 'bank_transfer') {
|
|
922
|
-
let name = pm.bank_name;
|
|
923
|
-
if (pm.bank_branch) name += ' - ' + pm.bank_branch;
|
|
924
|
-
$body = h("div", null, h("div", null, "Ng\xE2n h\xE0ng: ", name), h("div", {
|
|
925
|
-
class: "mt-1"
|
|
926
|
-
}, "Ch\u1EE7 t\xE0i kho\u1EA3n: ", pm.bank_owner), h("div", {
|
|
927
|
-
class: "mt-1"
|
|
928
|
-
}, "S\u1ED1 t\xE0i kho\u1EA3n: ", pm.bank_number));
|
|
929
|
-
}
|
|
930
|
-
if (!$body) return null;
|
|
931
|
-
return h(Fragment, null, h("div", {
|
|
932
|
-
class: "order_label"
|
|
933
|
-
}, this.props.t('payment')), $body);
|
|
856
|
+
// removed by dead control flow
|
|
857
|
+
{}
|
|
858
|
+
// removed by dead control flow
|
|
859
|
+
{}
|
|
860
|
+
// removed by dead control flow
|
|
861
|
+
{}
|
|
862
|
+
// removed by dead control flow
|
|
863
|
+
{}
|
|
864
|
+
// removed by dead control flow
|
|
865
|
+
{}
|
|
866
|
+
// removed by dead control flow
|
|
867
|
+
{}
|
|
868
|
+
// removed by dead control flow
|
|
869
|
+
{}
|
|
870
|
+
// removed by dead control flow
|
|
871
|
+
{}
|
|
872
|
+
// removed by dead control flow
|
|
873
|
+
{}
|
|
874
|
+
// removed by dead control flow
|
|
875
|
+
{}
|
|
934
876
|
}
|
|
935
877
|
renderDesktopShipping(order) {
|
|
936
878
|
let editmode = false;
|