superapp-miniapp-invoke-native 1.9.13 → 1.10.0
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/main.d.ts +49 -2
- package/lib/main.js +747 -618
- package/lib/main.umd.cjs +1 -1
- package/package.json +3 -2
package/lib/main.d.ts
CHANGED
|
@@ -131,7 +131,7 @@ declare class CommunicatePlugins implements CommunicatePluginsHookType {
|
|
|
131
131
|
homeBtnSwitch(isClick: homeIsClickType): Promise<void | undefined>;
|
|
132
132
|
setBackBtn(backBtnApiParams: BackBtnParamsType): void;
|
|
133
133
|
setHomeBtn(cb: PluginCallback): void;
|
|
134
|
-
setFabBtn(data: SetFabDataType): void;
|
|
134
|
+
setFabBtn(data: SetFabDataType, position?: FabPositionType): void;
|
|
135
135
|
touchListener(touchListenerParams: TouchListenerParamsType): void;
|
|
136
136
|
disableFAB(state: DisableFABType): Promise<DisableFABType | undefined>;
|
|
137
137
|
disableBack(state: DisableBackType): Promise<DisableBackType | undefined>;
|
|
@@ -149,6 +149,7 @@ declare class CommunicatePlugins implements CommunicatePluginsHookType {
|
|
|
149
149
|
closeMiniApp(): Promise<void>;
|
|
150
150
|
getStatus(): Promise<any>;
|
|
151
151
|
dispatchToShell(params: DispatchToShellParamsType): Promise<DispatchToShellParamsType | undefined>;
|
|
152
|
+
getMiniAppInfo(miniAppParams?: MiniAppParamsType): Promise<any>;
|
|
152
153
|
}
|
|
153
154
|
|
|
154
155
|
declare interface CommunicatePluginsHookType {
|
|
@@ -193,6 +194,12 @@ declare interface CreatePollingParamsType {
|
|
|
193
194
|
callBack?: (value: NativeSendPollingParamsType) => void;
|
|
194
195
|
}
|
|
195
196
|
|
|
197
|
+
declare interface CreatePrintParamsType {
|
|
198
|
+
printParams: PrintParamsType;
|
|
199
|
+
mounted?: (fn: () => void) => void;
|
|
200
|
+
callBack?: (value: NativeSendPrintParamsType) => void;
|
|
201
|
+
}
|
|
202
|
+
|
|
196
203
|
declare const _default: NativeApi;
|
|
197
204
|
export default _default;
|
|
198
205
|
|
|
@@ -226,10 +233,16 @@ declare interface DisableFABType {
|
|
|
226
233
|
|
|
227
234
|
declare interface DispatchToShellParamsType {
|
|
228
235
|
showStoreUnderUserIcon?: boolean;
|
|
236
|
+
liveUpdate_UnassignedStore?: number;
|
|
229
237
|
[key: string]: any;
|
|
230
238
|
}
|
|
231
239
|
|
|
232
|
-
declare type FabBtnHandleType = (data: SetFabDataType | any) => void;
|
|
240
|
+
declare type FabBtnHandleType = (data: SetFabDataType | any, position?: FabPositionType) => void;
|
|
241
|
+
|
|
242
|
+
declare type FabPositionType = {
|
|
243
|
+
right: number;
|
|
244
|
+
bottom: number;
|
|
245
|
+
} | null;
|
|
233
246
|
|
|
234
247
|
declare type HomeBtnHandleType = (cb: PluginCallback) => void;
|
|
235
248
|
|
|
@@ -318,6 +331,10 @@ declare interface MiniAppKongType {
|
|
|
318
331
|
[key: string]: any;
|
|
319
332
|
}
|
|
320
333
|
|
|
334
|
+
declare interface MiniAppParamsType {
|
|
335
|
+
miniAppIds?: any[];
|
|
336
|
+
}
|
|
337
|
+
|
|
321
338
|
declare interface MiniAppType {
|
|
322
339
|
miniApp: string;
|
|
323
340
|
params?: string;
|
|
@@ -343,6 +360,7 @@ export declare class NativeApi {
|
|
|
343
360
|
paymentPlugins: PaymentPlugins;
|
|
344
361
|
cameraForTakePhotoPlugin: CameraForTakePhotoPlugins;
|
|
345
362
|
httpPlugin: HttpPlugins;
|
|
363
|
+
printPlugins: PrintPlugins;
|
|
346
364
|
}
|
|
347
365
|
|
|
348
366
|
declare interface NativeInfoConfigType {
|
|
@@ -363,6 +381,10 @@ declare interface NativeSendPollingParamsType {
|
|
|
363
381
|
[key: string]: any;
|
|
364
382
|
}
|
|
365
383
|
|
|
384
|
+
declare interface NativeSendPrintParamsType {
|
|
385
|
+
[key: string]: any;
|
|
386
|
+
}
|
|
387
|
+
|
|
366
388
|
declare type PackOrdersScanBoxType = "pack_orders_scan_box" | "collect_orders_scan_box";
|
|
367
389
|
|
|
368
390
|
declare class PaymentPlugins implements PaymentPluginsHandleType {
|
|
@@ -400,6 +422,31 @@ declare interface PollingPluginsHandleType {
|
|
|
400
422
|
getStatus(): Promise<any>;
|
|
401
423
|
}
|
|
402
424
|
|
|
425
|
+
declare interface PrintParamsType {
|
|
426
|
+
miniAppName?: string;
|
|
427
|
+
action?: string;
|
|
428
|
+
copies?: number;
|
|
429
|
+
printerName?: string;
|
|
430
|
+
base64Data?: string;
|
|
431
|
+
referencePath?: string;
|
|
432
|
+
referenceType?: string;
|
|
433
|
+
[key: string]: any;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
declare class PrintPlugins implements PrintPluginsHandleType {
|
|
437
|
+
printList: any[];
|
|
438
|
+
constructor();
|
|
439
|
+
print(createPrintParams: CreatePrintParamsType): {
|
|
440
|
+
id: string;
|
|
441
|
+
};
|
|
442
|
+
getStatus(): Promise<any>;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
declare interface PrintPluginsHandleType {
|
|
446
|
+
print(createPrintParamsType: CreatePrintParamsType): void;
|
|
447
|
+
getStatus(): Promise<any>;
|
|
448
|
+
}
|
|
449
|
+
|
|
403
450
|
declare interface Process_ParamsType {
|
|
404
451
|
[key: string]: string;
|
|
405
452
|
}
|