@pisell/utils 1.0.70 → 1.0.71

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.
Files changed (129) hide show
  1. package/README.md +2 -2
  2. package/es/arrayUtils.d.ts +1 -1
  3. package/es/common/index.d.ts +5 -5
  4. package/es/common/index.js +2 -2
  5. package/es/common/stateHelper.d.ts +18 -18
  6. package/es/common/stateHelper.js +15 -15
  7. package/es/common/types.d.ts +28 -28
  8. package/es/componentStorage.d.ts +36 -36
  9. package/es/componentStorage.js +7 -7
  10. package/es/constants/index.d.ts +7 -7
  11. package/es/date.d.ts +28 -28
  12. package/es/date.js +22 -22
  13. package/es/document.d.ts +13 -13
  14. package/es/document.js +7 -7
  15. package/es/escPosPrinter/index.d.ts +9 -9
  16. package/es/firebase/config/index.d.ts +13 -13
  17. package/es/firebase/index.d.ts +28 -28
  18. package/es/format.d.ts +28 -28
  19. package/es/format.js +14 -14
  20. package/es/image.d.ts +11 -11
  21. package/es/image.js +5 -5
  22. package/es/index.d.ts +25 -25
  23. package/es/jsBridge/index.d.ts +22 -22
  24. package/es/jsBridge/index.js +15 -15
  25. package/es/jsBridge/regDeviceApi.d.ts +15 -15
  26. package/es/jsBridge/regDeviceApi.js +3 -3
  27. package/es/jsBridge/types.d.ts +149 -149
  28. package/es/locales.d.ts +9 -9
  29. package/es/locales.js +15 -15
  30. package/es/log.d.ts +10 -10
  31. package/es/miniRedux.d.ts +16 -16
  32. package/es/number-input/hooks/index.d.ts +4 -4
  33. package/es/number-input/hooks/index.js +2 -2
  34. package/es/number-input/hooks/useNumberInputState.d.ts +25 -25
  35. package/es/number-input/hooks/useNumberInputState.js +39 -39
  36. package/es/number-input/index.d.ts +14 -14
  37. package/es/number-input/index.js +8 -8
  38. package/es/number-input/types.d.ts +96 -96
  39. package/es/number-input/utils/formatter.d.ts +53 -53
  40. package/es/number-input/utils/formatter.js +37 -37
  41. package/es/number-input/utils/index.d.ts +7 -7
  42. package/es/number-input/utils/index.js +2 -2
  43. package/es/number-input/utils/validation.d.ts +27 -27
  44. package/es/number-input/utils/validation.js +24 -24
  45. package/es/otherUtils.d.ts +48 -48
  46. package/es/otherUtils.js +32 -32
  47. package/es/platform.d.ts +9 -9
  48. package/es/select/hooks/index.d.ts +5 -5
  49. package/es/select/hooks/index.js +2 -2
  50. package/es/select/hooks/useDebouncedSearch.d.ts +20 -20
  51. package/es/select/hooks/useDebouncedSearch.js +17 -17
  52. package/es/select/hooks/useSelectState.d.ts +19 -19
  53. package/es/select/hooks/useSelectState.js +13 -13
  54. package/es/select/index.d.ts +8 -8
  55. package/es/select/index.js +3 -3
  56. package/es/select/types.d.ts +256 -256
  57. package/es/select/utils/filterOptions.d.ts +22 -22
  58. package/es/select/utils/filterOptions.js +16 -16
  59. package/es/select/utils/helpers.d.ts +42 -42
  60. package/es/select/utils/helpers.js +30 -30
  61. package/es/select/utils/index.d.ts +7 -7
  62. package/es/select/utils/index.js +2 -2
  63. package/es/select/utils/sortOptions.d.ts +12 -12
  64. package/es/select/utils/sortOptions.js +8 -8
  65. package/es/select/utils/tagAggregation.d.ts +25 -25
  66. package/es/select/utils/tagAggregation.js +21 -21
  67. package/es/text-input/hooks/index.d.ts +4 -4
  68. package/es/text-input/hooks/index.js +2 -2
  69. package/es/text-input/hooks/useTextInputState.d.ts +24 -24
  70. package/es/text-input/hooks/useTextInputState.js +38 -38
  71. package/es/text-input/index.d.ts +14 -14
  72. package/es/text-input/index.js +9 -9
  73. package/es/text-input/types.d.ts +56 -56
  74. package/es/text-input/utils/index.d.ts +5 -5
  75. package/es/text-input/utils/index.js +2 -2
  76. package/es/text-input/utils/validation.d.ts +23 -23
  77. package/es/text-input/utils/validation.js +20 -20
  78. package/es/typeUtils.d.ts +42 -42
  79. package/es/typeUtils.js +26 -26
  80. package/es/walletValidity.d.ts +44 -44
  81. package/es/walletValidity.js +85 -85
  82. package/lib/arrayUtils.d.ts +1 -1
  83. package/lib/common/index.d.ts +5 -5
  84. package/lib/common/stateHelper.d.ts +18 -18
  85. package/lib/common/types.d.ts +28 -28
  86. package/lib/componentStorage.d.ts +36 -36
  87. package/lib/constants/index.d.ts +7 -7
  88. package/lib/date.d.ts +28 -28
  89. package/lib/document.d.ts +13 -13
  90. package/lib/escPosPrinter/index.d.ts +9 -9
  91. package/lib/firebase/config/index.d.ts +13 -13
  92. package/lib/firebase/index.d.ts +28 -28
  93. package/lib/format.d.ts +28 -28
  94. package/lib/image.d.ts +11 -11
  95. package/lib/index.d.ts +25 -25
  96. package/lib/jsBridge/index.d.ts +22 -22
  97. package/lib/jsBridge/regDeviceApi.d.ts +15 -15
  98. package/lib/jsBridge/types.d.ts +149 -149
  99. package/lib/locales.d.ts +9 -9
  100. package/lib/log.d.ts +10 -10
  101. package/lib/miniRedux.d.ts +16 -16
  102. package/lib/number-input/hooks/index.d.ts +4 -4
  103. package/lib/number-input/hooks/useNumberInputState.d.ts +25 -25
  104. package/lib/number-input/index.d.ts +14 -14
  105. package/lib/number-input/types.d.ts +96 -96
  106. package/lib/number-input/utils/formatter.d.ts +53 -53
  107. package/lib/number-input/utils/index.d.ts +7 -7
  108. package/lib/number-input/utils/validation.d.ts +27 -27
  109. package/lib/otherUtils.d.ts +48 -48
  110. package/lib/platform.d.ts +9 -9
  111. package/lib/select/hooks/index.d.ts +5 -5
  112. package/lib/select/hooks/useDebouncedSearch.d.ts +20 -20
  113. package/lib/select/hooks/useSelectState.d.ts +19 -19
  114. package/lib/select/index.d.ts +8 -8
  115. package/lib/select/types.d.ts +256 -256
  116. package/lib/select/utils/filterOptions.d.ts +22 -22
  117. package/lib/select/utils/helpers.d.ts +42 -42
  118. package/lib/select/utils/index.d.ts +7 -7
  119. package/lib/select/utils/sortOptions.d.ts +12 -12
  120. package/lib/select/utils/tagAggregation.d.ts +25 -25
  121. package/lib/text-input/hooks/index.d.ts +4 -4
  122. package/lib/text-input/hooks/useTextInputState.d.ts +24 -24
  123. package/lib/text-input/index.d.ts +14 -14
  124. package/lib/text-input/types.d.ts +56 -56
  125. package/lib/text-input/utils/index.d.ts +5 -5
  126. package/lib/text-input/utils/validation.d.ts +23 -23
  127. package/lib/typeUtils.d.ts +42 -42
  128. package/lib/walletValidity.d.ts +44 -44
  129. package/package.json +1 -1
@@ -1,28 +1,28 @@
1
- /**
2
- * 公共类型定义
3
- * 供所有输入组件使用
4
- */
5
- /**
6
- * 显示状态类型
7
- *
8
- * 所有输入组件的三种状态:
9
- * - read: 只读态,纯文本展示
10
- * - edit: 编辑态,显示输入控件
11
- * - disabled: 禁用态,禁用的输入控件
12
- */
13
- export declare type DisplayState = 'read' | 'edit' | 'disabled';
14
- /**
15
- * 校验结果类型
16
- *
17
- * 所有输入组件的校验结果统一格式
18
- */
19
- export interface ValidationResult {
20
- /**
21
- * 是否校验通过
22
- */
23
- isValid: boolean;
24
- /**
25
- * 错误信息数组
26
- */
27
- errors: string[];
28
- }
1
+ /**
2
+ * 公共类型定义
3
+ * 供所有输入组件使用
4
+ */
5
+ /**
6
+ * 显示状态类型
7
+ *
8
+ * 所有输入组件的三种状态:
9
+ * - read: 只读态,纯文本展示
10
+ * - edit: 编辑态,显示输入控件
11
+ * - disabled: 禁用态,禁用的输入控件
12
+ */
13
+ export declare type DisplayState = 'read' | 'edit' | 'disabled';
14
+ /**
15
+ * 校验结果类型
16
+ *
17
+ * 所有输入组件的校验结果统一格式
18
+ */
19
+ export interface ValidationResult {
20
+ /**
21
+ * 是否校验通过
22
+ */
23
+ isValid: boolean;
24
+ /**
25
+ * 错误信息数组
26
+ */
27
+ errors: string[];
28
+ }
@@ -1,36 +1,36 @@
1
- /** 生成存储 key 的路径后缀:pathname 或 pathname#memory_key(来自 URL memory_key 参数) */
2
- export declare function getStorageKeySuffix(): string;
3
- /**
4
- * 生成组件实例的存储 key。
5
- * @param componentId 组件实例 id(如 __id)
6
- * @param prefix 前缀,如 'table-setting'、'record-board-column-visibility'
7
- */
8
- export declare function getComponentStorageKey(componentId: string, prefix: string): string;
9
- export interface ColumnSettingStorageItem {
10
- key: string;
11
- dataIndex: string;
12
- title?: unknown;
13
- titleString?: string;
14
- isShow: boolean;
15
- sortIndex?: number;
16
- fixed?: 'left' | 'right' | boolean;
17
- }
18
- export declare function saveColumnSettingToLocal(params: {
19
- componentId: string;
20
- columnSetting: ColumnSettingStorageItem[];
21
- }): void;
22
- export declare function getColumnSettingFromLocal(componentId?: string): ColumnSettingStorageItem[] | null;
23
- export declare function clearColumnSettingFromLocal(componentId?: string): void;
24
- export declare function saveColumnVisibilityToLocal(params: {
25
- componentId: string;
26
- columnVisibility: Record<string, boolean>;
27
- /** 列 key 顺序,用于列设置弹层拖拽排序后持久化 */
28
- columnOrder?: string[];
29
- }): void;
30
- export declare function getColumnVisibilityFromLocal(componentId?: string): Record<string, boolean> | null;
31
- /** RecordBoard 列设置(显隐 + 顺序)从 localStorage 读取,用于列设置弹层拖拽排序与显隐持久化 */
32
- export declare function getRecordBoardColumnSettingFromLocal(componentId?: string): {
33
- columnVisibility: Record<string, boolean>;
34
- columnOrder: string[] | null;
35
- } | null;
36
- export declare function clearColumnVisibilityFromLocal(componentId?: string): void;
1
+ /** 生成存储 key 的路径后缀:pathname 或 pathname#memory_key(来自 URL memory_key 参数) */
2
+ export declare function getStorageKeySuffix(): string;
3
+ /**
4
+ * 生成组件实例的存储 key。
5
+ * @param componentId 组件实例 id(如 __id)
6
+ * @param prefix 前缀,如 'table-setting'、'record-board-column-visibility'
7
+ */
8
+ export declare function getComponentStorageKey(componentId: string, prefix: string): string;
9
+ export interface ColumnSettingStorageItem {
10
+ key: string;
11
+ dataIndex: string;
12
+ title?: unknown;
13
+ titleString?: string;
14
+ isShow: boolean;
15
+ sortIndex?: number;
16
+ fixed?: 'left' | 'right' | boolean;
17
+ }
18
+ export declare function saveColumnSettingToLocal(params: {
19
+ componentId: string;
20
+ columnSetting: ColumnSettingStorageItem[];
21
+ }): void;
22
+ export declare function getColumnSettingFromLocal(componentId?: string): ColumnSettingStorageItem[] | null;
23
+ export declare function clearColumnSettingFromLocal(componentId?: string): void;
24
+ export declare function saveColumnVisibilityToLocal(params: {
25
+ componentId: string;
26
+ columnVisibility: Record<string, boolean>;
27
+ /** 列 key 顺序,用于列设置弹层拖拽排序后持久化 */
28
+ columnOrder?: string[];
29
+ }): void;
30
+ export declare function getColumnVisibilityFromLocal(componentId?: string): Record<string, boolean> | null;
31
+ /** RecordBoard 列设置(显隐 + 顺序)从 localStorage 读取,用于列设置弹层拖拽排序与显隐持久化 */
32
+ export declare function getRecordBoardColumnSettingFromLocal(componentId?: string): {
33
+ columnVisibility: Record<string, boolean>;
34
+ columnOrder: string[] | null;
35
+ } | null;
36
+ export declare function clearColumnVisibilityFromLocal(componentId?: string): void;
@@ -1,7 +1,7 @@
1
- declare const webHookApi: {
2
- warning_log: {
3
- test: string;
4
- prod: string;
5
- };
6
- };
7
- export { webHookApi };
1
+ declare const webHookApi: {
2
+ warning_log: {
3
+ test: string;
4
+ prod: string;
5
+ };
6
+ };
7
+ export { webHookApi };
package/lib/date.d.ts CHANGED
@@ -1,28 +1,28 @@
1
- /**
2
- * @title: 格式化日期
3
- * @description:
4
- * @param {string} date
5
- * @param {string} format
6
- * @return {*}
7
- * @Author: zhiwei.Wang
8
- * @Date: 2023-07-21 10:49
9
- */
10
- export declare const formatDate: (date: string | Date, format?: string) => string;
11
- /**
12
- * @title: excel日期 转 js日期
13
- * @description:
14
- * @param {number} excelDate
15
- * @return {*}
16
- * @Author: zhiwei.Wang
17
- * @Date: 2023-07-21 10:49
18
- */
19
- export declare const excelDateToJSDate: (excelDate: number) => string;
20
- /**
21
- * @title: js日期 转 excel日期
22
- * @description:
23
- * @param {string} jsDate
24
- * @return {*}
25
- * @Author: zhiwei.Wang
26
- * @Date: 2023-07-21 10:49
27
- */
28
- export declare const jsDateToExcelDate: (jsDate: string) => number;
1
+ /**
2
+ * @title: 格式化日期
3
+ * @description:
4
+ * @param {string} date
5
+ * @param {string} format
6
+ * @return {*}
7
+ * @Author: zhiwei.Wang
8
+ * @Date: 2023-07-21 10:49
9
+ */
10
+ export declare const formatDate: (date: string | Date, format?: string) => string;
11
+ /**
12
+ * @title: excel日期 转 js日期
13
+ * @description:
14
+ * @param {number} excelDate
15
+ * @return {*}
16
+ * @Author: zhiwei.Wang
17
+ * @Date: 2023-07-21 10:49
18
+ */
19
+ export declare const excelDateToJSDate: (excelDate: number) => string;
20
+ /**
21
+ * @title: js日期 转 excel日期
22
+ * @description:
23
+ * @param {string} jsDate
24
+ * @return {*}
25
+ * @Author: zhiwei.Wang
26
+ * @Date: 2023-07-21 10:49
27
+ */
28
+ export declare const jsDateToExcelDate: (jsDate: string) => number;
package/lib/document.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- /**
2
- * @Title: 设置主题
3
- * @Describe: 传入字符串键值对
4
- * @Author: Wzw
5
- */
6
- export declare const setTheme: (themes: {
7
- [key: string]: string;
8
- }) => void;
9
- /**
10
- * 复制到剪切板
11
- * @param text
12
- */
13
- export declare const copyToClipboard: (text: string) => Promise<void>;
1
+ /**
2
+ * @Title: 设置主题
3
+ * @Describe: 传入字符串键值对
4
+ * @Author: Wzw
5
+ */
6
+ export declare const setTheme: (themes: {
7
+ [key: string]: string;
8
+ }) => void;
9
+ /**
10
+ * 复制到剪切板
11
+ * @param text
12
+ */
13
+ export declare const copyToClipboard: (text: string) => Promise<void>;
@@ -1,9 +1,9 @@
1
- export declare const EscPosPrinter = any;
2
- export declare const ALIGN_LEFT = number;
3
- export declare const ALIGN_CENTER = number;
4
- export declare const ALIGN_RIGHT = number;
5
- export declare const columnWidthWithAlignment = (
6
- width: number,
7
- alignment: number
8
- ) => any;
9
- export declare const preparing = any;
1
+ export declare const EscPosPrinter = any;
2
+ export declare const ALIGN_LEFT = number;
3
+ export declare const ALIGN_CENTER = number;
4
+ export declare const ALIGN_RIGHT = number;
5
+ export declare const columnWidthWithAlignment = (
6
+ width: number,
7
+ alignment: number
8
+ ) => any;
9
+ export declare const preparing = any;
@@ -1,13 +1,13 @@
1
- declare type InjectedConfigType = {
2
- apiKey: string;
3
- authDomain: string;
4
- projectId: string;
5
- storageBucket: string;
6
- messagingSenderId: string;
7
- appId: string;
8
- databaseURL: string;
9
- };
10
- export declare const injectConfig: (context: InjectedConfigType) => void;
11
- export declare const firebaseConfig: any;
12
- declare const _default: any;
13
- export default _default;
1
+ declare type InjectedConfigType = {
2
+ apiKey: string;
3
+ authDomain: string;
4
+ projectId: string;
5
+ storageBucket: string;
6
+ messagingSenderId: string;
7
+ appId: string;
8
+ databaseURL: string;
9
+ };
10
+ export declare const injectConfig: (context: InjectedConfigType) => void;
11
+ export declare const firebaseConfig: any;
12
+ declare const _default: any;
13
+ export default _default;
@@ -1,28 +1,28 @@
1
- import { FirebaseApp } from 'firebase/app';
2
- import { Auth } from 'firebase/auth';
3
- import { ref, Database, goOnline, goOffline } from 'firebase/database';
4
- declare let firebaseApp: FirebaseApp;
5
- declare let auth: Auth;
6
- declare let database: Database;
7
- export declare const initFirebase: (config?: any) => void;
8
- export { database, firebaseApp, auth, ref, goOnline, goOffline };
9
- export declare const getPath: (path: string) => string;
10
- export declare const setAuthStateChangeCallback: (callback: (user: any) => void) => void;
11
- export declare const signUp: (email: string, password: string) => Promise<import("firebase/auth").User>;
12
- export declare const signInUser: (email: string, password: string) => Promise<import("firebase/auth").User>;
13
- export declare const signOutUser: () => Promise<void>;
14
- export declare const readData: (path: string) => Promise<any>;
15
- export declare const writeData: (path: string, data: any) => Promise<void>;
16
- export declare const onDataChange: (path: string, callback: (snapshot: any) => void) => import("firebase/database").Unsubscribe;
17
- export declare const onDataChanged: (path: string, callback: (snapshot: any) => void) => import("firebase/database").Unsubscribe;
18
- export declare const removeDataListener: (listener: any) => void;
19
- declare const _default: {
20
- signInUser: (email: string, password: string) => Promise<import("firebase/auth").User>;
21
- signOutUser: () => Promise<void>;
22
- readData: (path: string) => Promise<any>;
23
- writeData: (path: string, data: any) => Promise<void>;
24
- onDataChange: (path: string, callback: (snapshot: any) => void) => import("firebase/database").Unsubscribe;
25
- removeDataListener: (listener: any) => void;
26
- onDataChanged: (path: string, callback: (snapshot: any) => void) => import("firebase/database").Unsubscribe;
27
- };
28
- export default _default;
1
+ import { FirebaseApp } from 'firebase/app';
2
+ import { Auth } from 'firebase/auth';
3
+ import { ref, Database, goOnline, goOffline } from 'firebase/database';
4
+ declare let firebaseApp: FirebaseApp;
5
+ declare let auth: Auth;
6
+ declare let database: Database;
7
+ export declare const initFirebase: (config?: any) => void;
8
+ export { database, firebaseApp, auth, ref, goOnline, goOffline };
9
+ export declare const getPath: (path: string) => string;
10
+ export declare const setAuthStateChangeCallback: (callback: (user: any) => void) => void;
11
+ export declare const signUp: (email: string, password: string) => Promise<import("firebase/auth").User>;
12
+ export declare const signInUser: (email: string, password: string) => Promise<import("firebase/auth").User>;
13
+ export declare const signOutUser: () => Promise<void>;
14
+ export declare const readData: (path: string) => Promise<any>;
15
+ export declare const writeData: (path: string, data: any) => Promise<void>;
16
+ export declare const onDataChange: (path: string, callback: (snapshot: any) => void) => import("firebase/database").Unsubscribe;
17
+ export declare const onDataChanged: (path: string, callback: (snapshot: any) => void) => import("firebase/database").Unsubscribe;
18
+ export declare const removeDataListener: (listener: any) => void;
19
+ declare const _default: {
20
+ signInUser: (email: string, password: string) => Promise<import("firebase/auth").User>;
21
+ signOutUser: () => Promise<void>;
22
+ readData: (path: string) => Promise<any>;
23
+ writeData: (path: string, data: any) => Promise<void>;
24
+ onDataChange: (path: string, callback: (snapshot: any) => void) => import("firebase/database").Unsubscribe;
25
+ removeDataListener: (listener: any) => void;
26
+ onDataChanged: (path: string, callback: (snapshot: any) => void) => import("firebase/database").Unsubscribe;
27
+ };
28
+ export default _default;
package/lib/format.d.ts CHANGED
@@ -1,28 +1,28 @@
1
- /**
2
- * @title: 格式化金额
3
- * @description:
4
- * @param {number} amount 原金额
5
- * @param {number} precision 小数位数
6
- * @param {string} symbol 货币符号
7
- * @return {*}
8
- * @Author: zhiwei.Wang
9
- * @Date: 2023-11-06 16:51
10
- */
11
- export declare const formatAmount: (amount?: number | string, precision?: number, symbol?: string) => string | number;
12
- export declare type FormatOptions = {
13
- /** 小数点后位数 默认是小数点后2位 */
14
- precision?: number;
15
- /** 显示货币符号 指的是 ¥$ 等货币符号等显隐,默认是展示 */
16
- showCurrencySymbol?: boolean;
17
- /** 千分位 指的是长金额的千分位逗号隔开,比如“123, 245, 315” 这种展现形式,默认是关闭 */
18
- useThousandsSeparator?: boolean;
19
- /** 整数位隐藏小数 指的是如果价格为整数,后面的".00" 将被省略以节省页面空间 */
20
- hideDecimalForWholeNumbers?: boolean;
21
- };
22
- /**
23
- * 根据配置格式化金额
24
- * @param amount
25
- * @param symbol
26
- * @param options
27
- */
28
- export declare const formatAmountWithOptions: (amount: string | number | undefined, symbol: string | undefined, options: FormatOptions) => string | number;
1
+ /**
2
+ * @title: 格式化金额
3
+ * @description:
4
+ * @param {number} amount 原金额
5
+ * @param {number} precision 小数位数
6
+ * @param {string} symbol 货币符号
7
+ * @return {*}
8
+ * @Author: zhiwei.Wang
9
+ * @Date: 2023-11-06 16:51
10
+ */
11
+ export declare const formatAmount: (amount?: number | string, precision?: number, symbol?: string) => string | number;
12
+ export declare type FormatOptions = {
13
+ /** 小数点后位数 默认是小数点后2位 */
14
+ precision?: number;
15
+ /** 显示货币符号 指的是 ¥$ 等货币符号等显隐,默认是展示 */
16
+ showCurrencySymbol?: boolean;
17
+ /** 千分位 指的是长金额的千分位逗号隔开,比如“123, 245, 315” 这种展现形式,默认是关闭 */
18
+ useThousandsSeparator?: boolean;
19
+ /** 整数位隐藏小数 指的是如果价格为整数,后面的".00" 将被省略以节省页面空间 */
20
+ hideDecimalForWholeNumbers?: boolean;
21
+ };
22
+ /**
23
+ * 根据配置格式化金额
24
+ * @param amount
25
+ * @param symbol
26
+ * @param options
27
+ */
28
+ export declare const formatAmountWithOptions: (amount: string | number | undefined, symbol: string | undefined, options: FormatOptions) => string | number;
package/lib/image.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export declare const image: {
2
- ali: (url: string, w: number) => string;
3
- getImageSize: (url: string) => {
4
- width: number;
5
- height: number;
6
- ratio: number;
7
- success: boolean;
8
- widthRatio: number;
9
- originRatio: number;
10
- };
11
- };
1
+ export declare const image: {
2
+ ali: (url: string, w: number) => string;
3
+ getImageSize: (url: string) => {
4
+ width: number;
5
+ height: number;
6
+ ratio: number;
7
+ success: boolean;
8
+ widthRatio: number;
9
+ originRatio: number;
10
+ };
11
+ };
package/lib/index.d.ts CHANGED
@@ -1,25 +1,25 @@
1
- export * from './otherUtils';
2
- export * from './typeUtils';
3
- export * from './componentStorage';
4
- export * from './document';
5
- export * from './date';
6
- export * from './platform';
7
- export * from './log';
8
- export * from './format';
9
- export * from './escPosPrinter';
10
- export * from './miniRedux';
11
- export * from './jsBridge';
12
- export * from './image';
13
- export * from './locales';
14
- export * from './arrayUtils';
15
- export * from './walletValidity';
16
- export * from './common';
17
- export * from './text-input';
18
- export * from './number-input';
19
- export * from './select';
20
- export declare const setPisellUtilsConfig: (config: {
21
- [key: string]: any;
22
- }) => void;
23
- export declare const getPisellUtilsConfig: () => {
24
- [key: string]: any;
25
- };
1
+ export * from './otherUtils';
2
+ export * from './typeUtils';
3
+ export * from './componentStorage';
4
+ export * from './document';
5
+ export * from './date';
6
+ export * from './platform';
7
+ export * from './log';
8
+ export * from './format';
9
+ export * from './escPosPrinter';
10
+ export * from './miniRedux';
11
+ export * from './jsBridge';
12
+ export * from './image';
13
+ export * from './locales';
14
+ export * from './arrayUtils';
15
+ export * from './walletValidity';
16
+ export * from './common';
17
+ export * from './text-input';
18
+ export * from './number-input';
19
+ export * from './select';
20
+ export declare const setPisellUtilsConfig: (config: {
21
+ [key: string]: any;
22
+ }) => void;
23
+ export declare const getPisellUtilsConfig: () => {
24
+ [key: string]: any;
25
+ };
@@ -1,22 +1,22 @@
1
- import { WebPrintParams, DataManagerParams, WebPaymentParams } from './types';
2
- /**
3
- * webView页面中调用打印机打印
4
- * 此api暂时只支持native app平台下ios手机
5
- * @param params
6
- * @param callback
7
- */
8
- export declare function webPrint(params: WebPrintParams, callback: (...arg: any) => void, onError?: (error: any) => void): void;
9
- /**
10
- * webView页面中调用APP内的数据
11
- * 此api暂时只支持native app平台下ios手机
12
- * @param params
13
- * @param callback
14
- */
15
- export declare function dataManager(params: DataManagerParams, callback: (...arg: any) => void, onError: () => void): void;
16
- /**
17
- * webView页面中调用APP内的支付
18
- * 此api暂时只支持native app平台下ios
19
- * @param params
20
- * @param callback
21
- */
22
- export declare function webPayment(params: WebPaymentParams, callback: (...arg: any) => void, onError?: (error: any) => void): void;
1
+ import { WebPrintParams, DataManagerParams, WebPaymentParams } from './types';
2
+ /**
3
+ * webView页面中调用打印机打印
4
+ * 此api暂时只支持native app平台下ios手机
5
+ * @param params
6
+ * @param callback
7
+ */
8
+ export declare function webPrint(params: WebPrintParams, callback: (...arg: any) => void, onError?: (error: any) => void): void;
9
+ /**
10
+ * webView页面中调用APP内的数据
11
+ * 此api暂时只支持native app平台下ios手机
12
+ * @param params
13
+ * @param callback
14
+ */
15
+ export declare function dataManager(params: DataManagerParams, callback: (...arg: any) => void, onError: () => void): void;
16
+ /**
17
+ * webView页面中调用APP内的支付
18
+ * 此api暂时只支持native app平台下ios
19
+ * @param params
20
+ * @param callback
21
+ */
22
+ export declare function webPayment(params: WebPaymentParams, callback: (...arg: any) => void, onError?: (error: any) => void): void;
@@ -1,15 +1,15 @@
1
- type ComposedJSBridge = {
2
- // eslint-disable-next-line camelcase
3
- callDeviceApi: (a: {
4
- apiName: string;
5
- callback: Functon;
6
- onError?: (e: any) => void;
7
- params?: any;
8
- key_events?: string[];
9
- }) => void;
10
- calledByDevice: (a: { apiName: string; callback: Functon }) => void;
11
- };
12
-
13
- const regDeviceApi: (isWebPrint?: boolean) => Promise<ComposedJSBridge>;
14
-
15
- export default regDeviceApi;
1
+ type ComposedJSBridge = {
2
+ // eslint-disable-next-line camelcase
3
+ callDeviceApi: (a: {
4
+ apiName: string;
5
+ callback: Functon;
6
+ onError?: (e: any) => void;
7
+ params?: any;
8
+ key_events?: string[];
9
+ }) => void;
10
+ calledByDevice: (a: { apiName: string; callback: Functon }) => void;
11
+ };
12
+
13
+ const regDeviceApi: (isWebPrint?: boolean) => Promise<ComposedJSBridge>;
14
+
15
+ export default regDeviceApi;