@subiz/widget-v4 4.0.71 → 4.0.74
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/assets/less/order.less +1 -6
- package/compiled_src/order/order.js +13 -11
- package/compiled_src/store/store.js +11 -19
- package/compiled_src/util/campaign.js +3 -1
- package/dist/132.js +13 -11
- package/dist/178.js +1 -1
- package/dist/180b74d2f80.132.js +1 -0
- package/dist/180b74d2f80.178.js +1 -0
- package/dist/180b74d2f80.213.js +1 -0
- package/dist/180b74d2f80.335.js +1 -0
- package/dist/180b74d2f80.362.js +1 -0
- package/dist/180b74d2f80.441.js +1 -0
- package/dist/180b74d2f80.605.js +1 -0
- package/dist/180b74d2f80.678.js +1 -0
- package/dist/180b74d2f80.782.js +1 -0
- package/dist/180b74d2f80.app.js +1 -0
- package/dist/180b74d2f80.index.html +22 -0
- package/dist/180b74d2f80.library.html +22 -0
- package/dist/180b74d2f80.library.js +1 -0
- package/dist/180b74d2f80.preview.html +759 -0
- package/dist/180b74d2f80.preview.js +1 -0
- package/dist/180b74d2f80.screenshoot.js +1 -0
- package/dist/362.js +1 -1
- package/dist/441.js +16 -11
- package/dist/782.js +1 -1
- package/dist/HASH +1 -1
- package/dist/assets/img/award1a.1a58e10.png +0 -0
- package/dist/assets/img/award3a.3b74423.png +0 -0
- package/dist/assets/img/award4a.ed6ccd4.png +0 -0
- package/dist/assets/img/award5.39eb7ae.png +0 -0
- package/dist/assets/img/examplte_logo.f86535f.svg +1 -0
- package/dist/assets/img/main-service1.d536cc2.png +0 -0
- package/dist/assets/img/main-service2.9b99549.png +0 -0
- package/dist/screenshoot.html +1 -1
- package/dist/screenshoot.js +14 -20
- package/package.json +12 -11
- package/src/order/order.js +18 -22
- package/src/store/store.js +9 -22
- package/src/util/campaign.js +4 -2
package/assets/less/order.less
CHANGED
|
@@ -449,11 +449,6 @@ div.order__card.order__card__active {
|
|
|
449
449
|
.color(white);
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
-
.order_status.order_status__processing {
|
|
453
|
-
background: @primary-color;
|
|
454
|
-
.color(white);
|
|
455
|
-
}
|
|
456
|
-
|
|
457
452
|
.order_status.order_status__shipping {
|
|
458
453
|
background: @black;
|
|
459
454
|
.color(white);
|
|
@@ -474,7 +469,7 @@ div.order__card.order__card__active {
|
|
|
474
469
|
.color(white);
|
|
475
470
|
}
|
|
476
471
|
|
|
477
|
-
.order_status.
|
|
472
|
+
.order_status.order_status__open {
|
|
478
473
|
background: @yellow;
|
|
479
474
|
.color(white);
|
|
480
475
|
}
|
|
@@ -46,6 +46,7 @@ class Order extends common.Com {
|
|
|
46
46
|
loading: true,
|
|
47
47
|
order: {},
|
|
48
48
|
err: {},
|
|
49
|
+
shipping_address: 'new',
|
|
49
50
|
selectedProvince: null,
|
|
50
51
|
selectedDistrict: null,
|
|
51
52
|
selectedWard: null,
|
|
@@ -350,10 +351,7 @@ class Order extends common.Com {
|
|
|
350
351
|
|
|
351
352
|
_defineProperty(this, "onCancel", () => {
|
|
352
353
|
if (this.props.onResponse) this.props.onResponse('rejected');
|
|
353
|
-
this.close();
|
|
354
|
-
});
|
|
355
354
|
|
|
356
|
-
_defineProperty(this, "close", () => {
|
|
357
355
|
if (this.props.cid && !this.state.order.user_confirmation) {
|
|
358
356
|
let order = _index.default.cloneDeep(this.state.order);
|
|
359
357
|
|
|
@@ -361,6 +359,10 @@ class Order extends common.Com {
|
|
|
361
359
|
this.props.store.updateOrder(order);
|
|
362
360
|
}
|
|
363
361
|
|
|
362
|
+
this.close();
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
_defineProperty(this, "close", () => {
|
|
364
366
|
if (this.props.onClose) this.props.onClose();
|
|
365
367
|
});
|
|
366
368
|
|
|
@@ -435,7 +437,7 @@ class Order extends common.Com {
|
|
|
435
437
|
return null;
|
|
436
438
|
let editmode = false;
|
|
437
439
|
|
|
438
|
-
if (!order.status || order.status == '
|
|
440
|
+
if (!order.status || order.status == 'open') {
|
|
439
441
|
editmode = !order.user_confirmation;
|
|
440
442
|
}
|
|
441
443
|
|
|
@@ -528,7 +530,7 @@ class Order extends common.Com {
|
|
|
528
530
|
renderDesktopShipping(order) {
|
|
529
531
|
let editmode = false;
|
|
530
532
|
|
|
531
|
-
if (!order.status || order.status == '
|
|
533
|
+
if (!order.status || order.status == 'open') {
|
|
532
534
|
editmode = !order.user_confirmation;
|
|
533
535
|
}
|
|
534
536
|
|
|
@@ -835,7 +837,7 @@ class Order extends common.Com {
|
|
|
835
837
|
}, (0, _preact.h)("div", null, "Ph\xED v\u1EADn chuy\u1EC3n"), (0, _preact.h)("div", null, _index.default.get(order, 'shipping.fee', 0), " d"));
|
|
836
838
|
let editmode = false;
|
|
837
839
|
|
|
838
|
-
if (!order.status || order.status == '
|
|
840
|
+
if (!order.status || order.status == 'open') {
|
|
839
841
|
editmode = !order.user_confirmation;
|
|
840
842
|
}
|
|
841
843
|
|
|
@@ -871,7 +873,7 @@ class Order extends common.Com {
|
|
|
871
873
|
}
|
|
872
874
|
|
|
873
875
|
renderStatusBadge(order) {
|
|
874
|
-
let status = order.status || '
|
|
876
|
+
let status = order.status || 'open';
|
|
875
877
|
return (0, _preact.h)("div", {
|
|
876
878
|
style: "float: right !important;",
|
|
877
879
|
class: 'order_status order_status__' + status
|
|
@@ -879,7 +881,7 @@ class Order extends common.Com {
|
|
|
879
881
|
}
|
|
880
882
|
|
|
881
883
|
renderShippingInfo(order) {
|
|
882
|
-
if (order.status != '
|
|
884
|
+
if (order.status != 'open' || order.user_confirmation) {}
|
|
883
885
|
|
|
884
886
|
let shipping_provider = _index.default.get(order, 'shipping.shipping_provider');
|
|
885
887
|
|
|
@@ -985,7 +987,7 @@ class Order extends common.Com {
|
|
|
985
987
|
let $products = null;
|
|
986
988
|
let editmode = false;
|
|
987
989
|
|
|
988
|
-
if (!order.status || order.status == '
|
|
990
|
+
if (!order.status || order.status == 'open') {
|
|
989
991
|
editmode = !order.user_confirmation;
|
|
990
992
|
}
|
|
991
993
|
|
|
@@ -1089,7 +1091,7 @@ class Order extends common.Com {
|
|
|
1089
1091
|
onClick: this.onCancel
|
|
1090
1092
|
}, this.props.t('cancel_order'));
|
|
1091
1093
|
|
|
1092
|
-
if (order.user_confirmation || order.status != '
|
|
1094
|
+
if (order.user_confirmation || order.status != 'open') {
|
|
1093
1095
|
$status = null;
|
|
1094
1096
|
if (this.props.cid) $close = (0, _preact.h)("div", {
|
|
1095
1097
|
class: "order_btn order__btn__light mt-3",
|
|
@@ -1121,7 +1123,7 @@ class Order extends common.Com {
|
|
|
1121
1123
|
let $actions = null;
|
|
1122
1124
|
let editmode = false;
|
|
1123
1125
|
|
|
1124
|
-
if (!order.status || order.status == '
|
|
1126
|
+
if (!order.status || order.status == 'open') {
|
|
1125
1127
|
editmode = !order.user_confirmation;
|
|
1126
1128
|
}
|
|
1127
1129
|
|
|
@@ -29,14 +29,6 @@ cookie.defaults.path = '/';
|
|
|
29
29
|
cookie.expiresMultiplier = 60 * 60 * 24;
|
|
30
30
|
cookie.defaults.expires = 3650;
|
|
31
31
|
const MAX_CONVO = 20;
|
|
32
|
-
let ga_client_id = '';
|
|
33
|
-
setTimeout(() => {
|
|
34
|
-
if (window.gtag) {
|
|
35
|
-
window.gtag('get', 'UA-XXXXXXXX-Y', 'client_id', clientid => {
|
|
36
|
-
ga_client_id = clientid;
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}, 100);
|
|
40
32
|
|
|
41
33
|
const page_loaded = _index.default.Date.now();
|
|
42
34
|
|
|
@@ -1192,22 +1184,21 @@ const inmemCookie = {
|
|
|
1192
1184
|
};
|
|
1193
1185
|
|
|
1194
1186
|
function getGaClientId() {
|
|
1195
|
-
if (ga_client_id) return ga_client_id;
|
|
1196
|
-
if (!hasGA()) return ga_client_id;
|
|
1197
1187
|
if (!window.ga) return;
|
|
1188
|
+
if (!window.ga.getAll) return;
|
|
1198
1189
|
var allTrackers = window.ga.getAll() || [];
|
|
1190
|
+
let ga_client_id = '';
|
|
1199
1191
|
allTrackers.forEach(function (tracker) {
|
|
1200
1192
|
ga_client_id = tracker.get('clientId');
|
|
1201
1193
|
});
|
|
1202
1194
|
return ga_client_id;
|
|
1203
1195
|
}
|
|
1204
1196
|
|
|
1205
|
-
const hasGA = () => !!(window.ga && window.ga.getAll || window.gtag);
|
|
1206
|
-
|
|
1207
1197
|
function getGaTrackingIds() {
|
|
1208
1198
|
var trackingIds = [];
|
|
1209
|
-
if (!
|
|
1199
|
+
if (!(window.ga && window.ga.getAll)) return trackingIds;
|
|
1210
1200
|
if (!window.ga) return [];
|
|
1201
|
+
if (!window.ga.getAll) return [];
|
|
1211
1202
|
const allTrackers = window.ga.getAll() || [];
|
|
1212
1203
|
allTrackers.forEach(function (tracker) {
|
|
1213
1204
|
var trackingId = tracker.get('trackingId');
|
|
@@ -1225,18 +1216,19 @@ function sendToFBPixel(category, action, label) {
|
|
|
1225
1216
|
}
|
|
1226
1217
|
|
|
1227
1218
|
function sendToGA(category, action, label) {
|
|
1228
|
-
|
|
1229
|
-
if (window.gtag) window.gtag('event', category, {
|
|
1230
|
-
Action: action,
|
|
1231
|
-
Label: label
|
|
1232
|
-
});
|
|
1219
|
+
console.log('SENT.', category, action, label);
|
|
1233
1220
|
|
|
1234
|
-
if (window.ga) {
|
|
1221
|
+
if (window.ga && window.ga.getAll) {
|
|
1235
1222
|
const allTrackers = window.ga.getAll() || [];
|
|
1236
1223
|
allTrackers.forEach(function (tracker) {
|
|
1237
1224
|
const name = tracker.get('name');
|
|
1238
1225
|
window.ga(name + '.send', 'event', category, action, label);
|
|
1239
1226
|
});
|
|
1227
|
+
} else {
|
|
1228
|
+
if (window.gtag) window.gtag('event', category, {
|
|
1229
|
+
Action: action,
|
|
1230
|
+
Label: label
|
|
1231
|
+
});
|
|
1240
1232
|
}
|
|
1241
1233
|
}
|
|
1242
1234
|
|
package/dist/132.js
CHANGED
|
@@ -4101,6 +4101,7 @@ class order_Order extends common/* Com */.up {
|
|
|
4101
4101
|
loading: true,
|
|
4102
4102
|
order: {},
|
|
4103
4103
|
err: {},
|
|
4104
|
+
shipping_address: 'new',
|
|
4104
4105
|
selectedProvince: null,
|
|
4105
4106
|
selectedDistrict: null,
|
|
4106
4107
|
selectedWard: null,
|
|
@@ -4393,16 +4394,17 @@ class order_Order extends common/* Com */.up {
|
|
|
4393
4394
|
|
|
4394
4395
|
order_defineProperty(this, "onCancel", () => {
|
|
4395
4396
|
if (this.props.onResponse) this.props.onResponse('rejected');
|
|
4396
|
-
this.close();
|
|
4397
|
-
});
|
|
4398
4397
|
|
|
4399
|
-
order_defineProperty(this, "close", () => {
|
|
4400
4398
|
if (this.props.cid && !this.state.order.user_confirmation) {
|
|
4401
4399
|
let order = util/* default.cloneDeep */.Z.cloneDeep(this.state.order);
|
|
4402
4400
|
order.user_confirmation = 'rejected';
|
|
4403
4401
|
this.props.store.updateOrder(order);
|
|
4404
4402
|
}
|
|
4405
4403
|
|
|
4404
|
+
this.close();
|
|
4405
|
+
});
|
|
4406
|
+
|
|
4407
|
+
order_defineProperty(this, "close", () => {
|
|
4406
4408
|
if (this.props.onClose) this.props.onClose();
|
|
4407
4409
|
});
|
|
4408
4410
|
|
|
@@ -4472,7 +4474,7 @@ class order_Order extends common/* Com */.up {
|
|
|
4472
4474
|
return null;
|
|
4473
4475
|
let editmode = false;
|
|
4474
4476
|
|
|
4475
|
-
if (!order.status || order.status == '
|
|
4477
|
+
if (!order.status || order.status == 'open') {
|
|
4476
4478
|
editmode = !order.user_confirmation;
|
|
4477
4479
|
}
|
|
4478
4480
|
|
|
@@ -4563,7 +4565,7 @@ class order_Order extends common/* Com */.up {
|
|
|
4563
4565
|
renderDesktopShipping(order) {
|
|
4564
4566
|
let editmode = false;
|
|
4565
4567
|
|
|
4566
|
-
if (!order.status || order.status == '
|
|
4568
|
+
if (!order.status || order.status == 'open') {
|
|
4567
4569
|
editmode = !order.user_confirmation;
|
|
4568
4570
|
}
|
|
4569
4571
|
|
|
@@ -4864,7 +4866,7 @@ class order_Order extends common/* Com */.up {
|
|
|
4864
4866
|
}, (0,preact_module.h)("div", null, "Ph\xED v\u1EADn chuy\u1EC3n"), (0,preact_module.h)("div", null, util/* default.get */.Z.get(order, 'shipping.fee', 0), " d"));
|
|
4865
4867
|
let editmode = false;
|
|
4866
4868
|
|
|
4867
|
-
if (!order.status || order.status == '
|
|
4869
|
+
if (!order.status || order.status == 'open') {
|
|
4868
4870
|
editmode = !order.user_confirmation;
|
|
4869
4871
|
}
|
|
4870
4872
|
|
|
@@ -4900,7 +4902,7 @@ class order_Order extends common/* Com */.up {
|
|
|
4900
4902
|
}
|
|
4901
4903
|
|
|
4902
4904
|
renderStatusBadge(order) {
|
|
4903
|
-
let status = order.status || '
|
|
4905
|
+
let status = order.status || 'open';
|
|
4904
4906
|
return (0,preact_module.h)("div", {
|
|
4905
4907
|
style: "float: right !important;",
|
|
4906
4908
|
class: 'order_status order_status__' + status
|
|
@@ -4908,7 +4910,7 @@ class order_Order extends common/* Com */.up {
|
|
|
4908
4910
|
}
|
|
4909
4911
|
|
|
4910
4912
|
renderShippingInfo(order) {
|
|
4911
|
-
if (order.status != '
|
|
4913
|
+
if (order.status != 'open' || order.user_confirmation) {}
|
|
4912
4914
|
|
|
4913
4915
|
let shipping_provider = util/* default.get */.Z.get(order, 'shipping.shipping_provider');
|
|
4914
4916
|
if (!shipping_provider) return null;
|
|
@@ -5008,7 +5010,7 @@ class order_Order extends common/* Com */.up {
|
|
|
5008
5010
|
let $products = null;
|
|
5009
5011
|
let editmode = false;
|
|
5010
5012
|
|
|
5011
|
-
if (!order.status || order.status == '
|
|
5013
|
+
if (!order.status || order.status == 'open') {
|
|
5012
5014
|
editmode = !order.user_confirmation;
|
|
5013
5015
|
}
|
|
5014
5016
|
|
|
@@ -5112,7 +5114,7 @@ class order_Order extends common/* Com */.up {
|
|
|
5112
5114
|
onClick: this.onCancel
|
|
5113
5115
|
}, this.props.t('cancel_order'));
|
|
5114
5116
|
|
|
5115
|
-
if (order.user_confirmation || order.status != '
|
|
5117
|
+
if (order.user_confirmation || order.status != 'open') {
|
|
5116
5118
|
$status = null;
|
|
5117
5119
|
if (this.props.cid) $close = (0,preact_module.h)("div", {
|
|
5118
5120
|
class: "order_btn order__btn__light mt-3",
|
|
@@ -5144,7 +5146,7 @@ class order_Order extends common/* Com */.up {
|
|
|
5144
5146
|
let $actions = null;
|
|
5145
5147
|
let editmode = false;
|
|
5146
5148
|
|
|
5147
|
-
if (!order.status || order.status == '
|
|
5149
|
+
if (!order.status || order.status == 'open') {
|
|
5148
5150
|
editmode = !order.user_confirmation;
|
|
5149
5151
|
}
|
|
5150
5152
|
|