@sunggang/ui-lib 0.1.87 → 0.1.88

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 CHANGED
@@ -1,4 +1,4 @@
1
- export { B as BaseTable, r as BigCalender, C as CkEditor, i as CustomUpload, l as DataTable, k as DateRangePicker, s as DnDCalendar, D as DropImage, R as ReactDateRange, m as Regex, S as Spin, j as Switch, U as UiLibrary, o as decryptByEcPay, p as encryptByEcPay, u as useLiff, q as useOnClickOutside, n as verifyId, v as verifyTaxId } from './index.esm2.js';
1
+ export { B as BaseTable, q as BigCalender, C as CkEditor, i as CustomUpload, l as DataTable, k as DateRangePicker, r as DnDCalendar, D as DropImage, R as ReactDateRange, m as Regex, S as Spin, j as Switch, U as UiLibrary, o as decryptByEcPay, p as encryptByEcPay, u as useLiff, n as verifyId, v as verifyTaxId } from './index.esm2.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
4
4
  import '@iconify/react';
package/index.esm2.js CHANGED
@@ -102792,26 +102792,6 @@ var useLiff = function(publickLiffId, localStorageToken, loginFunc, checkTokenUr
102792
102792
  };
102793
102793
  };
102794
102794
 
102795
- function useOnClickOutside(ref, handler) {
102796
- useEffect(function() {
102797
- var listener = function(event) {
102798
- if (!ref.current || ref.current.contains(event.target)) {
102799
- return;
102800
- }
102801
- handler(event);
102802
- };
102803
- document.addEventListener("mousedown", listener);
102804
- document.addEventListener("touchstart", listener);
102805
- return function() {
102806
- document.removeEventListener("mousedown", listener);
102807
- document.removeEventListener("touchstart", listener);
102808
- };
102809
- }, [
102810
- ref,
102811
- handler
102812
- ]);
102813
- }
102814
-
102815
102795
  function _objectWithoutProperties(e, t) {
102816
102796
  if (null == e) return {};
102817
102797
  var o, r, i = _objectWithoutPropertiesLoose(e, t);
@@ -123174,4 +123154,4 @@ function DnDCalendar(props) {
123174
123154
  });
123175
123155
  }
123176
123156
 
123177
- export { BaseTable as B, CkEditor as C, DropImage as D, ReactDateRange as R, Spin as S, 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, CustomUpload as i, Switch as j, DateRangePicker as k, DataTable as l, Regex as m, verifyId as n, decryptByEcPay as o, encryptByEcPay as p, useOnClickOutside as q, BigCalender as r, DnDCalendar as s, useLiff as u, verifyTaxId as v };
123157
+ export { BaseTable as B, CkEditor as C, DropImage as D, ReactDateRange as R, Spin as S, 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, CustomUpload as i, Switch as j, DateRangePicker as k, DataTable as l, Regex as m, verifyId as n, decryptByEcPay as o, encryptByEcPay as p, BigCalender as q, DnDCalendar as r, useLiff as u, verifyTaxId as v };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunggang/ui-lib",
3
- "version": "0.1.87",
3
+ "version": "0.1.88",
4
4
  "dependencies": {
5
5
  "@iconify/react": "^4.1.1",
6
6
  "@mdx-js/react": "^3.0.1",
package/src/index.d.ts CHANGED
@@ -11,6 +11,5 @@ export * from './components/ui/reactDateRange';
11
11
  export * from './lib/DataTable';
12
12
  export * from './lib/DataTable/BaseTable';
13
13
  export * from './lib/Function';
14
- export * from './utils/hooks';
15
14
  export * from './lib/BigCalender';
16
15
  export * from './lib/BigCalender/dnd';
@@ -0,0 +1,26 @@
1
+ interface LoginAuth {
2
+ status?: boolean;
3
+ data?: {
4
+ access_token?: string;
5
+ };
6
+ }
7
+ interface UserInfo {
8
+ [key: string]: any;
9
+ }
10
+ interface Liff {
11
+ init: (options: {
12
+ liffId: string;
13
+ withLoginOnExternalBrowser?: boolean;
14
+ }) => Promise<void>;
15
+ getAccessToken: () => string | null;
16
+ login: () => void;
17
+ }
18
+ interface UseLiffResult {
19
+ liffObject: Liff | null;
20
+ liffError: string | null;
21
+ token: string;
22
+ userInfo: UserInfo | null;
23
+ loginAuth: LoginAuth | null;
24
+ }
25
+ export declare const useLiff: (publickLiffId: string, localStorageToken: string, loginFunc: (loginToken: string) => string, checkTokenUrl: string, memberInfoUrl: string) => UseLiffResult;
26
+ export {};
@@ -2,3 +2,4 @@ import Regex from './Regex';
2
2
  export { Regex };
3
3
  export { verifyTaxId, verifyId } from './verify';
4
4
  export * from './crypto';
5
+ export * from './Hook/useLiff';