awing-library 2.1.184-dev → 2.1.185-dev
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/lib/ACM-AXN/Campaign/Enum.d.ts +1 -0
- package/lib/ACM-AXN/Campaign/Enum.js +1 -0
- package/lib/ACM-AXN/Common/Enum.d.ts +2 -1
- package/lib/ACM-AXN/Common/Enum.js +1 -0
- package/lib/ACM-AXN/ViewTemplate/Preview.js +2 -1
- package/lib/Utils/Helpers.d.ts +1 -1
- package/lib/Utils/Helpers.js +1 -3
- package/package.json +1 -1
|
@@ -94,6 +94,7 @@ exports.BaseEvent = (_a = {},
|
|
|
94
94
|
_a[Enum_1.AnalyticType.VIEW] = 'View',
|
|
95
95
|
_a[Enum_1.AnalyticType.CLICK] = 'Click',
|
|
96
96
|
_a[Enum_1.AnalyticType.AUTHENTICATION] = 'Authentication',
|
|
97
|
+
_a[Enum_1.AnalyticType.AuthenticationSuccess] = 'AuthenticationSuccess',
|
|
97
98
|
_a);
|
|
98
99
|
var CampaignTicket;
|
|
99
100
|
(function (CampaignTicket) {
|
|
@@ -71,4 +71,5 @@ var AnalyticType;
|
|
|
71
71
|
AnalyticType[AnalyticType["VIEW"] = 0] = "VIEW";
|
|
72
72
|
AnalyticType[AnalyticType["AUTHENTICATION"] = 1] = "AUTHENTICATION";
|
|
73
73
|
AnalyticType[AnalyticType["CLICK"] = 2] = "CLICK";
|
|
74
|
+
AnalyticType[AnalyticType["AuthenticationSuccess"] = 4] = "AuthenticationSuccess";
|
|
74
75
|
})(AnalyticType || (exports.AnalyticType = AnalyticType = {}));
|
|
@@ -52,6 +52,7 @@ var Preview = function (props) {
|
|
|
52
52
|
result = result.replace("http://", "https://");
|
|
53
53
|
return result;
|
|
54
54
|
}, [configs.CAPTIVE_DOMAIN, configs.TEMPLATE_PREVIEW, domainId]);
|
|
55
|
+
var iframeName = react_1.default.useMemo(function () { return "iframe-demo".concat(viewIndex); }, [viewIndex]);
|
|
55
56
|
(0, react_1.useEffect)(function () {
|
|
56
57
|
var handleFormdata = function (_a) {
|
|
57
58
|
var formData = _a.formData;
|
|
@@ -85,6 +86,6 @@ var Preview = function (props) {
|
|
|
85
86
|
}, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", style: {
|
|
86
87
|
fontWeight: "bold",
|
|
87
88
|
textTransform: "uppercase",
|
|
88
|
-
}, children: t("ViewTemplate.PreviewTitle") }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: t("Common.Refresh") || "", placement: "top", children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: function () { return formRef.current.submit(); }, "aria-label": "refresh", style: { float: "right" }, disabled: !validStatus, children: (0, jsx_runtime_1.jsx)(Refresh_1.default, {}) }) }) })] }), (0, jsx_runtime_1.jsx)("form", { action: iframeSrc, method: "post", target:
|
|
89
|
+
}, children: t("ViewTemplate.PreviewTitle") }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: t("Common.Refresh") || "", placement: "top", children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: function () { return formRef.current.submit(); }, "aria-label": "refresh", style: { float: "right" }, disabled: !validStatus, children: (0, jsx_runtime_1.jsx)(Refresh_1.default, {}) }) }) })] }), (0, jsx_runtime_1.jsx)("form", { action: iframeSrc, method: "post", target: iframeName, ref: formRef }), (0, jsx_runtime_1.jsx)("iframe", { title: iframeName, id: iframeName, name: iframeName, className: classes.root, width: "100%" })] }));
|
|
89
90
|
};
|
|
90
91
|
exports.default = Preview;
|
package/lib/Utils/Helpers.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare enum TIMELINE_TYPE {
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function getCookie(name: string): string | undefined;
|
|
17
17
|
export declare function dateToString(date: moment.MomentInput): string;
|
|
18
|
-
export declare function formatNumber
|
|
18
|
+
export declare function formatNumber(num: number | bigint | string | undefined): string;
|
|
19
19
|
export declare function getQueryVariable(variable: string): string;
|
|
20
20
|
export declare function displayLongString(str: string, maxLength: number): string;
|
|
21
21
|
export declare function generateUUID(): string;
|
package/lib/Utils/Helpers.js
CHANGED
|
@@ -78,11 +78,9 @@ function dateToString(date) {
|
|
|
78
78
|
}
|
|
79
79
|
exports.dateToString = dateToString;
|
|
80
80
|
function formatNumber(num) {
|
|
81
|
-
if (String(num).includes(','))
|
|
82
|
-
return num;
|
|
83
81
|
var value = Number(Number(num).toFixed(2));
|
|
84
82
|
if (value || value === 0) {
|
|
85
|
-
return new Intl.NumberFormat(
|
|
83
|
+
return new Intl.NumberFormat(localStorage.getItem('i18nextLng') === 'vi' ? 'vi-VN' : 'en-US').format(value);
|
|
86
84
|
}
|
|
87
85
|
else
|
|
88
86
|
return '';
|