@sunggang/ui-lib 0.2.39 → 0.2.41
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/index.esm.js +1 -2
- package/index.esm2.js +6 -30
- package/index.esm3.js +0 -1
- package/package.json +1 -1
- package/src/lib/Function/crypto.d.ts +0 -2
- package/src/lib/Function/index.d.ts +0 -1
package/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { n as BaseTable,
|
|
1
|
+
export { n as BaseTable, q as BigCalender, B as Button, s as CustomSelect, C as CustomUpload, m as DataTable, k as DateRangePicker, r as DnDCalendar, i as DropDown, D as DropImage, L as LiffContext, t as LiffProvider, R as ReactDateRange, o as Regex, S as Spin, j as Switch, T as TabsPanel, U as UiLibrary, l as buttonVariants, u as useLiffContext, p as verifyId, v as verifyTaxId } from './index.esm2.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@iconify/react';
|
|
@@ -20,4 +20,3 @@ import 'date-fns/format/index.js';
|
|
|
20
20
|
import '@tanstack/react-table';
|
|
21
21
|
import '@radix-ui/react-dropdown-menu';
|
|
22
22
|
import '@radix-ui/react-icons';
|
|
23
|
-
import 'crypto';
|
package/index.esm2.js
CHANGED
|
@@ -20,7 +20,6 @@ import format$1 from 'date-fns/format/index.js';
|
|
|
20
20
|
import { useReactTable, getCoreRowModel, getPaginationRowModel, getSortedRowModel, getFilteredRowModel, flexRender } from '@tanstack/react-table';
|
|
21
21
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
22
22
|
import { ChevronRightIcon, CheckIcon, DotFilledIcon } from '@radix-ui/react-icons';
|
|
23
|
-
import crypto$1 from 'crypto';
|
|
24
23
|
|
|
25
24
|
var styles = {};
|
|
26
25
|
|
|
@@ -20998,29 +20997,6 @@ var verifyTaxId = function(idStr) {
|
|
|
20998
20997
|
return isLegal;
|
|
20999
20998
|
};
|
|
21000
20999
|
|
|
21001
|
-
var decryptByEcPay = function(data, hashKey, hashIV) {
|
|
21002
|
-
var decipher = crypto$1.createDecipheriv("aes-128-cbc", Buffer.from(hashKey), Buffer.from(hashIV));
|
|
21003
|
-
decipher.setAutoPadding(true); // 使用 PKCS7 填充模式
|
|
21004
|
-
var decrypted = decipher.update(data, "base64", "utf8");
|
|
21005
|
-
decrypted += decipher.final("utf8");
|
|
21006
|
-
// 步驟 3: 解析解密後的資料
|
|
21007
|
-
var decodedData = decodeURIComponent(decrypted);
|
|
21008
|
-
var decoded = JSON.parse(decodedData);
|
|
21009
|
-
return decoded;
|
|
21010
|
-
};
|
|
21011
|
-
var encryptByEcPay = function(data, hashKey, hashIV) {
|
|
21012
|
-
// 步驟 1: 轉換資料為 JSON 字串
|
|
21013
|
-
var jsonData = JSON.stringify(data);
|
|
21014
|
-
// 步驟 2: URLEncode 編碼
|
|
21015
|
-
var urlEncodedData = window.encodeURIComponent(jsonData);
|
|
21016
|
-
// 步驟 3: AES 加密
|
|
21017
|
-
var cipher = crypto$1.createCipheriv("aes-128-cbc", Buffer.from(hashKey), Buffer.from(hashIV));
|
|
21018
|
-
cipher.setAutoPadding(true); // 使用 PKCS7 填充模式
|
|
21019
|
-
var encrypted = cipher.update(urlEncodedData, "utf8", "base64");
|
|
21020
|
-
encrypted += cipher.final("base64");
|
|
21021
|
-
return encrypted;
|
|
21022
|
-
};
|
|
21023
|
-
|
|
21024
21000
|
function _objectWithoutProperties(e, t) {
|
|
21025
21001
|
if (null == e) return {};
|
|
21026
21002
|
var o, r, i = _objectWithoutPropertiesLoose(e, t);
|
|
@@ -43671,7 +43647,7 @@ var LiffProvider = function(param) {
|
|
|
43671
43647
|
// 登入初始化函數
|
|
43672
43648
|
var loginInit = function() {
|
|
43673
43649
|
var _ref = _async_to_generator(function(token, liff) {
|
|
43674
|
-
var _resData_data, response, resData, loginToken, err;
|
|
43650
|
+
var _resData_data, _resData_data1, response, resData, _resData_data2, loginToken, err;
|
|
43675
43651
|
return _ts_generator(this, function(_state) {
|
|
43676
43652
|
switch(_state.label){
|
|
43677
43653
|
case 0:
|
|
@@ -43695,13 +43671,13 @@ var LiffProvider = function(param) {
|
|
|
43695
43671
|
];
|
|
43696
43672
|
case 1:
|
|
43697
43673
|
response = _state.sent();
|
|
43698
|
-
resData = response
|
|
43699
|
-
if (!resData.access_token.startsWith("Bearer ")) {
|
|
43700
|
-
resData.access_token = "Bearer ".concat(resData.access_token);
|
|
43674
|
+
resData = response;
|
|
43675
|
+
if (!(resData === null || resData === void 0 ? void 0 : (_resData_data = resData.data) === null || _resData_data === void 0 ? void 0 : _resData_data.access_token.startsWith("Bearer "))) {
|
|
43676
|
+
resData.data.access_token = "Bearer ".concat(resData === null || resData === void 0 ? void 0 : (_resData_data2 = resData.data) === null || _resData_data2 === void 0 ? void 0 : _resData_data2.access_token);
|
|
43701
43677
|
}
|
|
43702
43678
|
setLoginData(resData);
|
|
43703
43679
|
window.localStorage.setItem(localStorageKey, JSON.stringify(resData));
|
|
43704
|
-
loginToken = resData === null || resData === void 0 ? void 0 : (
|
|
43680
|
+
loginToken = resData === null || resData === void 0 ? void 0 : (_resData_data1 = resData.data) === null || _resData_data1 === void 0 ? void 0 : _resData_data1.access_token;
|
|
43705
43681
|
if (loginToken) {
|
|
43706
43682
|
setAccessToken(loginToken);
|
|
43707
43683
|
if (memberInfoUrl) fetchMemberInfo(loginToken);
|
|
@@ -43917,4 +43893,4 @@ var useLiffContext = function() {
|
|
|
43917
43893
|
return context;
|
|
43918
43894
|
};
|
|
43919
43895
|
|
|
43920
|
-
export { Button as B, CustomUpload as C, DropImage as D, LiffContext as L, ReactDateRange as R, Spin as S, TabsPanel as T, UiLibrary as U, __spreadArray as _, __read as a, __extends as b, __assign as c, __makeTemplateObject as d, __awaiter as e, __generator as f, commonjsGlobal as g, __values as h, DropDown as i, Switch as j, DateRangePicker as k, buttonVariants as l, DataTable as m, BaseTable as n, Regex as o, verifyId as p,
|
|
43896
|
+
export { Button as B, CustomUpload as C, DropImage as D, LiffContext as L, ReactDateRange as R, Spin as S, TabsPanel as T, UiLibrary as U, __spreadArray as _, __read as a, __extends as b, __assign as c, __makeTemplateObject as d, __awaiter as e, __generator as f, commonjsGlobal as g, __values as h, DropDown as i, Switch as j, DateRangePicker as k, buttonVariants as l, DataTable as m, BaseTable as n, Regex as o, verifyId as p, BigCalender as q, DnDCalendar as r, CustomSelect as s, LiffProvider as t, useLiffContext as u, verifyTaxId as v };
|
package/index.esm3.js
CHANGED
|
@@ -20,7 +20,6 @@ import 'date-fns/format/index.js';
|
|
|
20
20
|
import '@tanstack/react-table';
|
|
21
21
|
import '@radix-ui/react-dropdown-menu';
|
|
22
22
|
import '@radix-ui/react-icons';
|
|
23
|
-
import 'crypto';
|
|
24
23
|
|
|
25
24
|
/* eslint-disable no-prototype-builtins */ function _instanceof$4(left, right) {
|
|
26
25
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
package/package.json
CHANGED