@lark-project/js-sdk 2.0.18-dev.1 → 2.1.1-dev.1
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/CHANGELOG.md +3 -0
- package/dist/es/index.js +36 -49
- package/dist/lib/index.js +38 -51
- package/dist/types/index.d.ts +73 -69
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/es/index.js
CHANGED
|
@@ -302,11 +302,11 @@ _a15 = IMPL_KEY;
|
|
|
302
302
|
*/
|
|
303
303
|
Utils[_a15] = "utils";
|
|
304
304
|
|
|
305
|
-
// src/
|
|
305
|
+
// src/features/ContainerModal.ts
|
|
306
306
|
var _a16;
|
|
307
|
-
var
|
|
307
|
+
var ContainerModal = class extends BaseModel {
|
|
308
308
|
/**
|
|
309
|
-
*
|
|
309
|
+
* 加载数据
|
|
310
310
|
*/
|
|
311
311
|
static load() {
|
|
312
312
|
throw new Error("not implemented");
|
|
@@ -316,11 +316,11 @@ _a16 = IMPL_KEY;
|
|
|
316
316
|
/**
|
|
317
317
|
* @internal
|
|
318
318
|
*/
|
|
319
|
-
|
|
319
|
+
ContainerModal[_a16] = "containerModal";
|
|
320
320
|
|
|
321
|
-
// src/features/
|
|
321
|
+
// src/features/Intercept.ts
|
|
322
322
|
var _a17;
|
|
323
|
-
var
|
|
323
|
+
var Intercept = class extends BaseModel {
|
|
324
324
|
/**
|
|
325
325
|
* 加载数据
|
|
326
326
|
*/
|
|
@@ -332,11 +332,11 @@ _a17 = IMPL_KEY;
|
|
|
332
332
|
/**
|
|
333
333
|
* @internal
|
|
334
334
|
*/
|
|
335
|
-
|
|
335
|
+
Intercept[_a17] = "intercept";
|
|
336
336
|
|
|
337
|
-
// src/features/
|
|
337
|
+
// src/features/Control.ts
|
|
338
338
|
var _a18;
|
|
339
|
-
var
|
|
339
|
+
var Control = class extends BaseModel {
|
|
340
340
|
/**
|
|
341
341
|
* 加载数据
|
|
342
342
|
*/
|
|
@@ -348,11 +348,11 @@ _a18 = IMPL_KEY;
|
|
|
348
348
|
/**
|
|
349
349
|
* @internal
|
|
350
350
|
*/
|
|
351
|
-
|
|
351
|
+
Control[_a18] = "control";
|
|
352
352
|
|
|
353
|
-
// src/features/
|
|
353
|
+
// src/features/Button.ts
|
|
354
354
|
var _a19;
|
|
355
|
-
var
|
|
355
|
+
var Button = class extends BaseModel {
|
|
356
356
|
/**
|
|
357
357
|
* 加载数据
|
|
358
358
|
*/
|
|
@@ -364,11 +364,11 @@ _a19 = IMPL_KEY;
|
|
|
364
364
|
/**
|
|
365
365
|
* @internal
|
|
366
366
|
*/
|
|
367
|
-
|
|
367
|
+
Button[_a19] = "button";
|
|
368
368
|
|
|
369
|
-
// src/features/
|
|
369
|
+
// src/features/Configuration.ts
|
|
370
370
|
var _a20;
|
|
371
|
-
var
|
|
371
|
+
var Configuration = class extends BaseModel {
|
|
372
372
|
/**
|
|
373
373
|
* 加载数据
|
|
374
374
|
*/
|
|
@@ -380,11 +380,11 @@ _a20 = IMPL_KEY;
|
|
|
380
380
|
/**
|
|
381
381
|
* @internal
|
|
382
382
|
*/
|
|
383
|
-
|
|
383
|
+
Configuration[_a20] = "configuration";
|
|
384
384
|
|
|
385
|
-
// src/features/
|
|
385
|
+
// src/features/Page.ts
|
|
386
386
|
var _a21;
|
|
387
|
-
var
|
|
387
|
+
var Page = class extends BaseModel {
|
|
388
388
|
/**
|
|
389
389
|
* 加载数据
|
|
390
390
|
*/
|
|
@@ -396,23 +396,17 @@ _a21 = IMPL_KEY;
|
|
|
396
396
|
/**
|
|
397
397
|
* @internal
|
|
398
398
|
*/
|
|
399
|
-
|
|
399
|
+
Page[_a21] = "page";
|
|
400
400
|
|
|
401
|
-
// src/features/
|
|
401
|
+
// src/features/Script.ts
|
|
402
402
|
var _a22;
|
|
403
|
-
var
|
|
404
|
-
/**
|
|
405
|
-
* 加载数据
|
|
406
|
-
*/
|
|
407
|
-
static load() {
|
|
408
|
-
throw new Error("not implemented");
|
|
409
|
-
}
|
|
403
|
+
var Script = class extends BaseModel {
|
|
410
404
|
};
|
|
411
405
|
_a22 = IMPL_KEY;
|
|
412
406
|
/**
|
|
413
407
|
* @internal
|
|
414
408
|
*/
|
|
415
|
-
|
|
409
|
+
Script[_a22] = "script";
|
|
416
410
|
|
|
417
411
|
// src/features/Tab.ts
|
|
418
412
|
var _a23;
|
|
@@ -512,6 +506,13 @@ var _SDKClient = class {
|
|
|
512
506
|
get button() {
|
|
513
507
|
return getImplValue(Button, this._meegoBizHub);
|
|
514
508
|
}
|
|
509
|
+
/**
|
|
510
|
+
* 脚本容器特有能力
|
|
511
|
+
* only 2.0
|
|
512
|
+
*/
|
|
513
|
+
get script() {
|
|
514
|
+
return getImplValue(Script, this._meegoBizHub);
|
|
515
|
+
}
|
|
515
516
|
/**
|
|
516
517
|
* 配置点位容器特有能力
|
|
517
518
|
* only 2.0
|
|
@@ -586,13 +587,6 @@ var _SDKClient = class {
|
|
|
586
587
|
get toast() {
|
|
587
588
|
return getImplValue(Toast, this._meegoBizHub);
|
|
588
589
|
}
|
|
589
|
-
/**
|
|
590
|
-
* 地理位置
|
|
591
|
-
* only mobile 2.0
|
|
592
|
-
*/
|
|
593
|
-
get geolocation() {
|
|
594
|
-
return getImplValue(Geolocation, this._meegoBizHub);
|
|
595
|
-
}
|
|
596
590
|
/**
|
|
597
591
|
* 富文本编辑器
|
|
598
592
|
* only 2.0
|
|
@@ -689,7 +683,7 @@ var SDKClient = _SDKClient;
|
|
|
689
683
|
/**
|
|
690
684
|
* SDK 版本号
|
|
691
685
|
*/
|
|
692
|
-
SDKClient.version = "2.
|
|
686
|
+
SDKClient.version = "2.1.1-dev.1";
|
|
693
687
|
|
|
694
688
|
// src/types/biz.ts
|
|
695
689
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -736,6 +730,10 @@ var NodeStatus = /* @__PURE__ */ ((NodeStatus2) => {
|
|
|
736
730
|
NodeStatus2[NodeStatus2["passed"] = 3] = "passed";
|
|
737
731
|
return NodeStatus2;
|
|
738
732
|
})(NodeStatus || {});
|
|
733
|
+
var EventType = /* @__PURE__ */ ((EventType2) => {
|
|
734
|
+
EventType2["clickOutside"] = "clickOutside";
|
|
735
|
+
return EventType2;
|
|
736
|
+
})(EventType || {});
|
|
739
737
|
|
|
740
738
|
// src/types/features.ts
|
|
741
739
|
var ButtonScene = /* @__PURE__ */ ((ButtonScene2) => {
|
|
@@ -872,17 +870,6 @@ var NotSupportedError = class extends CustomError {
|
|
|
872
870
|
}
|
|
873
871
|
};
|
|
874
872
|
|
|
875
|
-
// src/errors/SystemPermissionDeniedError.ts
|
|
876
|
-
var SystemPermissionDeniedError = class extends CustomError {
|
|
877
|
-
constructor(options) {
|
|
878
|
-
super({
|
|
879
|
-
message: "system permission denied",
|
|
880
|
-
originMessage: options.originMessage
|
|
881
|
-
});
|
|
882
|
-
this.name = "SystemPermissionDeniedError";
|
|
883
|
-
}
|
|
884
|
-
};
|
|
885
|
-
|
|
886
873
|
// src/index.ts
|
|
887
874
|
var src_default = SDKClient;
|
|
888
875
|
export {
|
|
@@ -900,10 +887,10 @@ export {
|
|
|
900
887
|
CustomComponent,
|
|
901
888
|
CustomComponentType,
|
|
902
889
|
CustomField,
|
|
890
|
+
EventType,
|
|
903
891
|
Field,
|
|
904
892
|
FieldType,
|
|
905
893
|
FlowMode,
|
|
906
|
-
Geolocation,
|
|
907
894
|
IMPL_KEY,
|
|
908
895
|
Intercept,
|
|
909
896
|
InterceptEvent,
|
|
@@ -921,10 +908,10 @@ export {
|
|
|
921
908
|
Page,
|
|
922
909
|
RichTextEditor,
|
|
923
910
|
SDKClient,
|
|
911
|
+
Script,
|
|
924
912
|
Shared,
|
|
925
913
|
Space,
|
|
926
914
|
Storage,
|
|
927
|
-
SystemPermissionDeniedError,
|
|
928
915
|
Tab,
|
|
929
916
|
Toast,
|
|
930
917
|
Utils,
|
package/dist/lib/index.js
CHANGED
|
@@ -62,10 +62,10 @@ __export(src_exports, {
|
|
|
62
62
|
CustomComponent: () => CustomComponent,
|
|
63
63
|
CustomComponentType: () => CustomComponentType,
|
|
64
64
|
CustomField: () => CustomField,
|
|
65
|
+
EventType: () => EventType,
|
|
65
66
|
Field: () => Field,
|
|
66
67
|
FieldType: () => FieldType,
|
|
67
68
|
FlowMode: () => FlowMode,
|
|
68
|
-
Geolocation: () => Geolocation,
|
|
69
69
|
IMPL_KEY: () => IMPL_KEY,
|
|
70
70
|
Intercept: () => Intercept,
|
|
71
71
|
InterceptEvent: () => InterceptEvent,
|
|
@@ -83,10 +83,10 @@ __export(src_exports, {
|
|
|
83
83
|
Page: () => Page,
|
|
84
84
|
RichTextEditor: () => RichTextEditor,
|
|
85
85
|
SDKClient: () => SDKClient,
|
|
86
|
+
Script: () => Script,
|
|
86
87
|
Shared: () => Shared,
|
|
87
88
|
Space: () => Space,
|
|
88
89
|
Storage: () => Storage,
|
|
89
|
-
SystemPermissionDeniedError: () => SystemPermissionDeniedError,
|
|
90
90
|
Tab: () => Tab,
|
|
91
91
|
Toast: () => Toast,
|
|
92
92
|
Utils: () => Utils,
|
|
@@ -372,11 +372,11 @@ _a15 = IMPL_KEY;
|
|
|
372
372
|
*/
|
|
373
373
|
Utils[_a15] = "utils";
|
|
374
374
|
|
|
375
|
-
// src/
|
|
375
|
+
// src/features/ContainerModal.ts
|
|
376
376
|
var _a16;
|
|
377
|
-
var
|
|
377
|
+
var ContainerModal = class extends BaseModel {
|
|
378
378
|
/**
|
|
379
|
-
*
|
|
379
|
+
* 加载数据
|
|
380
380
|
*/
|
|
381
381
|
static load() {
|
|
382
382
|
throw new Error("not implemented");
|
|
@@ -386,11 +386,11 @@ _a16 = IMPL_KEY;
|
|
|
386
386
|
/**
|
|
387
387
|
* @internal
|
|
388
388
|
*/
|
|
389
|
-
|
|
389
|
+
ContainerModal[_a16] = "containerModal";
|
|
390
390
|
|
|
391
|
-
// src/features/
|
|
391
|
+
// src/features/Intercept.ts
|
|
392
392
|
var _a17;
|
|
393
|
-
var
|
|
393
|
+
var Intercept = class extends BaseModel {
|
|
394
394
|
/**
|
|
395
395
|
* 加载数据
|
|
396
396
|
*/
|
|
@@ -402,11 +402,11 @@ _a17 = IMPL_KEY;
|
|
|
402
402
|
/**
|
|
403
403
|
* @internal
|
|
404
404
|
*/
|
|
405
|
-
|
|
405
|
+
Intercept[_a17] = "intercept";
|
|
406
406
|
|
|
407
|
-
// src/features/
|
|
407
|
+
// src/features/Control.ts
|
|
408
408
|
var _a18;
|
|
409
|
-
var
|
|
409
|
+
var Control = class extends BaseModel {
|
|
410
410
|
/**
|
|
411
411
|
* 加载数据
|
|
412
412
|
*/
|
|
@@ -418,11 +418,11 @@ _a18 = IMPL_KEY;
|
|
|
418
418
|
/**
|
|
419
419
|
* @internal
|
|
420
420
|
*/
|
|
421
|
-
|
|
421
|
+
Control[_a18] = "control";
|
|
422
422
|
|
|
423
|
-
// src/features/
|
|
423
|
+
// src/features/Button.ts
|
|
424
424
|
var _a19;
|
|
425
|
-
var
|
|
425
|
+
var Button = class extends BaseModel {
|
|
426
426
|
/**
|
|
427
427
|
* 加载数据
|
|
428
428
|
*/
|
|
@@ -434,11 +434,11 @@ _a19 = IMPL_KEY;
|
|
|
434
434
|
/**
|
|
435
435
|
* @internal
|
|
436
436
|
*/
|
|
437
|
-
|
|
437
|
+
Button[_a19] = "button";
|
|
438
438
|
|
|
439
|
-
// src/features/
|
|
439
|
+
// src/features/Configuration.ts
|
|
440
440
|
var _a20;
|
|
441
|
-
var
|
|
441
|
+
var Configuration = class extends BaseModel {
|
|
442
442
|
/**
|
|
443
443
|
* 加载数据
|
|
444
444
|
*/
|
|
@@ -450,11 +450,11 @@ _a20 = IMPL_KEY;
|
|
|
450
450
|
/**
|
|
451
451
|
* @internal
|
|
452
452
|
*/
|
|
453
|
-
|
|
453
|
+
Configuration[_a20] = "configuration";
|
|
454
454
|
|
|
455
|
-
// src/features/
|
|
455
|
+
// src/features/Page.ts
|
|
456
456
|
var _a21;
|
|
457
|
-
var
|
|
457
|
+
var Page = class extends BaseModel {
|
|
458
458
|
/**
|
|
459
459
|
* 加载数据
|
|
460
460
|
*/
|
|
@@ -466,23 +466,17 @@ _a21 = IMPL_KEY;
|
|
|
466
466
|
/**
|
|
467
467
|
* @internal
|
|
468
468
|
*/
|
|
469
|
-
|
|
469
|
+
Page[_a21] = "page";
|
|
470
470
|
|
|
471
|
-
// src/features/
|
|
471
|
+
// src/features/Script.ts
|
|
472
472
|
var _a22;
|
|
473
|
-
var
|
|
474
|
-
/**
|
|
475
|
-
* 加载数据
|
|
476
|
-
*/
|
|
477
|
-
static load() {
|
|
478
|
-
throw new Error("not implemented");
|
|
479
|
-
}
|
|
473
|
+
var Script = class extends BaseModel {
|
|
480
474
|
};
|
|
481
475
|
_a22 = IMPL_KEY;
|
|
482
476
|
/**
|
|
483
477
|
* @internal
|
|
484
478
|
*/
|
|
485
|
-
|
|
479
|
+
Script[_a22] = "script";
|
|
486
480
|
|
|
487
481
|
// src/features/Tab.ts
|
|
488
482
|
var _a23;
|
|
@@ -582,6 +576,13 @@ var _SDKClient = class {
|
|
|
582
576
|
get button() {
|
|
583
577
|
return getImplValue(Button, this._meegoBizHub);
|
|
584
578
|
}
|
|
579
|
+
/**
|
|
580
|
+
* 脚本容器特有能力
|
|
581
|
+
* only 2.0
|
|
582
|
+
*/
|
|
583
|
+
get script() {
|
|
584
|
+
return getImplValue(Script, this._meegoBizHub);
|
|
585
|
+
}
|
|
585
586
|
/**
|
|
586
587
|
* 配置点位容器特有能力
|
|
587
588
|
* only 2.0
|
|
@@ -656,13 +657,6 @@ var _SDKClient = class {
|
|
|
656
657
|
get toast() {
|
|
657
658
|
return getImplValue(Toast, this._meegoBizHub);
|
|
658
659
|
}
|
|
659
|
-
/**
|
|
660
|
-
* 地理位置
|
|
661
|
-
* only mobile 2.0
|
|
662
|
-
*/
|
|
663
|
-
get geolocation() {
|
|
664
|
-
return getImplValue(Geolocation, this._meegoBizHub);
|
|
665
|
-
}
|
|
666
660
|
/**
|
|
667
661
|
* 富文本编辑器
|
|
668
662
|
* only 2.0
|
|
@@ -759,7 +753,7 @@ var SDKClient = _SDKClient;
|
|
|
759
753
|
/**
|
|
760
754
|
* SDK 版本号
|
|
761
755
|
*/
|
|
762
|
-
SDKClient.version = "2.
|
|
756
|
+
SDKClient.version = "2.1.1-dev.1";
|
|
763
757
|
|
|
764
758
|
// src/types/biz.ts
|
|
765
759
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -806,6 +800,10 @@ var NodeStatus = /* @__PURE__ */ ((NodeStatus2) => {
|
|
|
806
800
|
NodeStatus2[NodeStatus2["passed"] = 3] = "passed";
|
|
807
801
|
return NodeStatus2;
|
|
808
802
|
})(NodeStatus || {});
|
|
803
|
+
var EventType = /* @__PURE__ */ ((EventType2) => {
|
|
804
|
+
EventType2["clickOutside"] = "clickOutside";
|
|
805
|
+
return EventType2;
|
|
806
|
+
})(EventType || {});
|
|
809
807
|
|
|
810
808
|
// src/types/features.ts
|
|
811
809
|
var ButtonScene = /* @__PURE__ */ ((ButtonScene2) => {
|
|
@@ -942,17 +940,6 @@ var NotSupportedError = class extends CustomError {
|
|
|
942
940
|
}
|
|
943
941
|
};
|
|
944
942
|
|
|
945
|
-
// src/errors/SystemPermissionDeniedError.ts
|
|
946
|
-
var SystemPermissionDeniedError = class extends CustomError {
|
|
947
|
-
constructor(options) {
|
|
948
|
-
super({
|
|
949
|
-
message: "system permission denied",
|
|
950
|
-
originMessage: options.originMessage
|
|
951
|
-
});
|
|
952
|
-
this.name = "SystemPermissionDeniedError";
|
|
953
|
-
}
|
|
954
|
-
};
|
|
955
|
-
|
|
956
943
|
// src/index.ts
|
|
957
944
|
var src_default = SDKClient;
|
|
958
945
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -971,10 +958,10 @@ var src_default = SDKClient;
|
|
|
971
958
|
CustomComponent,
|
|
972
959
|
CustomComponentType,
|
|
973
960
|
CustomField,
|
|
961
|
+
EventType,
|
|
974
962
|
Field,
|
|
975
963
|
FieldType,
|
|
976
964
|
FlowMode,
|
|
977
|
-
Geolocation,
|
|
978
965
|
IMPL_KEY,
|
|
979
966
|
Intercept,
|
|
980
967
|
InterceptEvent,
|
|
@@ -992,10 +979,10 @@ var src_default = SDKClient;
|
|
|
992
979
|
Page,
|
|
993
980
|
RichTextEditor,
|
|
994
981
|
SDKClient,
|
|
982
|
+
Script,
|
|
995
983
|
Shared,
|
|
996
984
|
Space,
|
|
997
985
|
Storage,
|
|
998
|
-
SystemPermissionDeniedError,
|
|
999
986
|
Tab,
|
|
1000
987
|
Toast,
|
|
1001
988
|
Utils,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -313,6 +313,25 @@ type Language = 'zh_CN' | 'en_US' | 'ja_JP';
|
|
|
313
313
|
* 颜色方案
|
|
314
314
|
*/
|
|
315
315
|
type ColorScheme = 'light' | 'dark';
|
|
316
|
+
/**
|
|
317
|
+
* @public
|
|
318
|
+
* 监听事件类型
|
|
319
|
+
*/
|
|
320
|
+
declare enum EventType {
|
|
321
|
+
/**
|
|
322
|
+
* 外部点击事件
|
|
323
|
+
*/
|
|
324
|
+
clickOutside = "clickOutside"
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* @public
|
|
328
|
+
* 事件 payload 映射
|
|
329
|
+
*/
|
|
330
|
+
interface EventPayloadMap {
|
|
331
|
+
[EventType.clickOutside]: {
|
|
332
|
+
timestamp: number;
|
|
333
|
+
};
|
|
334
|
+
}
|
|
316
335
|
|
|
317
336
|
/**
|
|
318
337
|
* 集成构成
|
|
@@ -448,6 +467,10 @@ interface BatchButtonFeatureContext {
|
|
|
448
467
|
* 按钮构成
|
|
449
468
|
*/
|
|
450
469
|
type ButtonFeatureContext = WorkItemButtonFeatureContext | CreateButtonFeatureContext | BatchButtonFeatureContext | ScheduleUnitButtonFeatureContext;
|
|
470
|
+
/**
|
|
471
|
+
* 脚本构成
|
|
472
|
+
*/
|
|
473
|
+
type ScriptFeatureContext = ButtonFeatureContext;
|
|
451
474
|
/**
|
|
452
475
|
* 内嵌页面构成
|
|
453
476
|
* 一个单独的导航入口+内嵌页面
|
|
@@ -717,11 +740,6 @@ interface CustomFieldFeatureContext {
|
|
|
717
740
|
* 适用场景:详情页为节点流时,且当前拓展字段位于节点表单内,该字段才有数据
|
|
718
741
|
*/
|
|
719
742
|
nodeId?: string;
|
|
720
|
-
/**
|
|
721
|
-
* 拓展字段所在的业务场景
|
|
722
|
-
* 仅移动端 >= 7.57 版本可用
|
|
723
|
-
*/
|
|
724
|
-
bizScene?: 'workItemDetail' | 'createWorkItem' | 'nodeForm' | 'stateForm' | 'nodeDeliverable' | 'taskDeliverable';
|
|
725
743
|
}
|
|
726
744
|
type FieldNumberValue = number;
|
|
727
745
|
type FieldMultiTextValue = string;
|
|
@@ -1551,24 +1569,33 @@ interface ModalOpenOptions<Context> {
|
|
|
1551
1569
|
/**
|
|
1552
1570
|
* 是否全屏
|
|
1553
1571
|
* 全屏时 width / height 无效
|
|
1572
|
+
* 仅 UI 模式支持
|
|
1554
1573
|
*/
|
|
1555
1574
|
fullScreen?: boolean;
|
|
1556
1575
|
/**
|
|
1557
1576
|
* 是否允许通过点击遮罩来关闭对话框
|
|
1577
|
+
* 仅 UI 模式支持
|
|
1558
1578
|
*/
|
|
1559
1579
|
maskClosable?: boolean;
|
|
1560
1580
|
/**
|
|
1561
1581
|
* 传入 Modal 内的上下文数据
|
|
1562
|
-
* 注:传入的数据在 Modal 内是通过 sdk.
|
|
1582
|
+
* 注:传入的数据在 Modal 内是通过 sdk.Context.load().getCustomContext() 来获取的
|
|
1563
1583
|
*/
|
|
1564
1584
|
context?: Context;
|
|
1585
|
+
/**
|
|
1586
|
+
* 弹窗标题
|
|
1587
|
+
* 仅脚本模式支持
|
|
1588
|
+
*/
|
|
1589
|
+
title?: string;
|
|
1565
1590
|
/**
|
|
1566
1591
|
* 响应弹窗内调用的 sdk.containerModal.submit 方法
|
|
1592
|
+
* 仅 UI 模式支持
|
|
1567
1593
|
* @param params 弹窗内调用的 sdk.containerModal.submit 的方法时传入的自定义参数
|
|
1568
1594
|
*/
|
|
1569
1595
|
onSubmit?: (params: unknown) => void;
|
|
1570
1596
|
/**
|
|
1571
1597
|
* 弹窗被关闭后触发的回调
|
|
1598
|
+
* 仅 UI 模式支持
|
|
1572
1599
|
*/
|
|
1573
1600
|
afterClose?: () => void;
|
|
1574
1601
|
}
|
|
@@ -1600,11 +1627,11 @@ declare abstract class Modal extends BaseModel {
|
|
|
1600
1627
|
* only web 2.0
|
|
1601
1628
|
* 打开自定义内容的模态框
|
|
1602
1629
|
* @param options
|
|
1603
|
-
* @returns 当前打开 Modal 的关闭方法
|
|
1630
|
+
* @returns 当前打开 Modal 的关闭方法 (仅 UI 模式下返回)
|
|
1604
1631
|
*/
|
|
1605
1632
|
abstract open<Context>(options: ModalOpenOptions<Context>): Promise<{
|
|
1606
1633
|
close: () => void;
|
|
1607
|
-
}>;
|
|
1634
|
+
} | void>;
|
|
1608
1635
|
}
|
|
1609
1636
|
|
|
1610
1637
|
interface IRichTextEditorImageUploadComplete {
|
|
@@ -1817,61 +1844,6 @@ declare abstract class Utils extends BaseModel {
|
|
|
1817
1844
|
abstract overwriteThemeForSemiUI(): Promise<void>;
|
|
1818
1845
|
}
|
|
1819
1846
|
|
|
1820
|
-
/**
|
|
1821
|
-
* @internal
|
|
1822
|
-
*/
|
|
1823
|
-
declare class CustomError extends Error {
|
|
1824
|
-
originMessage: string;
|
|
1825
|
-
constructor(options: {
|
|
1826
|
-
message: string;
|
|
1827
|
-
originMessage: string;
|
|
1828
|
-
});
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
/**
|
|
1832
|
-
* @public
|
|
1833
|
-
* 系统设备权限未授权使用
|
|
1834
|
-
*/
|
|
1835
|
-
declare class SystemPermissionDeniedError extends CustomError {
|
|
1836
|
-
constructor(options: {
|
|
1837
|
-
originMessage: string;
|
|
1838
|
-
});
|
|
1839
|
-
}
|
|
1840
|
-
|
|
1841
|
-
interface GeolocationCoordinates {
|
|
1842
|
-
/**
|
|
1843
|
-
* 经度
|
|
1844
|
-
*/
|
|
1845
|
-
longitude: number;
|
|
1846
|
-
/**
|
|
1847
|
-
* 纬度
|
|
1848
|
-
*/
|
|
1849
|
-
latitude: number;
|
|
1850
|
-
}
|
|
1851
|
-
interface GeolocationPosition {
|
|
1852
|
-
coords: GeolocationCoordinates;
|
|
1853
|
-
coordSystem: 'WGS-84' | 'GCJ-02';
|
|
1854
|
-
}
|
|
1855
|
-
/**
|
|
1856
|
-
* @mobile
|
|
1857
|
-
* @public
|
|
1858
|
-
* 地理位置
|
|
1859
|
-
*/
|
|
1860
|
-
declare abstract class Geolocation extends BaseModel {
|
|
1861
|
-
/**
|
|
1862
|
-
* @internal
|
|
1863
|
-
*/
|
|
1864
|
-
protected static [IMPL_KEY]: string;
|
|
1865
|
-
/**
|
|
1866
|
-
* @internal
|
|
1867
|
-
*/
|
|
1868
|
-
private static load;
|
|
1869
|
-
/**
|
|
1870
|
-
* 读取用户当前的地理位置
|
|
1871
|
-
*/
|
|
1872
|
-
abstract getCurrentPosition(callback: (error?: SystemPermissionDeniedError | Error, result?: GeolocationPosition) => void): Promise<void>;
|
|
1873
|
-
}
|
|
1874
|
-
|
|
1875
1847
|
/**
|
|
1876
1848
|
* @public
|
|
1877
1849
|
* 插件容器模态框
|
|
@@ -2065,6 +2037,27 @@ declare abstract class Page extends BaseModel {
|
|
|
2065
2037
|
abstract getContext(): Promise<PageFeatureContext>;
|
|
2066
2038
|
}
|
|
2067
2039
|
|
|
2040
|
+
/**
|
|
2041
|
+
* @public
|
|
2042
|
+
* 脚本
|
|
2043
|
+
*/
|
|
2044
|
+
declare abstract class Script extends BaseModel {
|
|
2045
|
+
/**
|
|
2046
|
+
* @internal
|
|
2047
|
+
*/
|
|
2048
|
+
protected static [IMPL_KEY]: string;
|
|
2049
|
+
/**
|
|
2050
|
+
* only web 2.0
|
|
2051
|
+
* 获取当前脚本运行环境的上下文
|
|
2052
|
+
*/
|
|
2053
|
+
abstract getContext(): Promise<ScriptFeatureContext>;
|
|
2054
|
+
/**
|
|
2055
|
+
* only web 2.0
|
|
2056
|
+
* 主动停止脚本执行
|
|
2057
|
+
*/
|
|
2058
|
+
abstract end(): Promise<void>;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2068
2061
|
/**
|
|
2069
2062
|
* @public
|
|
2070
2063
|
* 详情页
|
|
@@ -2296,6 +2289,11 @@ declare class SDKClient {
|
|
|
2296
2289
|
* only 2.0
|
|
2297
2290
|
*/
|
|
2298
2291
|
get button(): Button;
|
|
2292
|
+
/**
|
|
2293
|
+
* 脚本容器特有能力
|
|
2294
|
+
* only 2.0
|
|
2295
|
+
*/
|
|
2296
|
+
get script(): Script;
|
|
2299
2297
|
/**
|
|
2300
2298
|
* 配置点位容器特有能力
|
|
2301
2299
|
* only 2.0
|
|
@@ -2348,11 +2346,6 @@ declare class SDKClient {
|
|
|
2348
2346
|
* 提示
|
|
2349
2347
|
*/
|
|
2350
2348
|
get toast(): Toast;
|
|
2351
|
-
/**
|
|
2352
|
-
* 地理位置
|
|
2353
|
-
* only mobile 2.0
|
|
2354
|
-
*/
|
|
2355
|
-
get geolocation(): Geolocation;
|
|
2356
2349
|
/**
|
|
2357
2350
|
* 富文本编辑器
|
|
2358
2351
|
* only 2.0
|
|
@@ -2413,6 +2406,17 @@ declare class SDKClient {
|
|
|
2413
2406
|
config(options: SDKClientOptions): Promise<this>;
|
|
2414
2407
|
}
|
|
2415
2408
|
|
|
2409
|
+
/**
|
|
2410
|
+
* @internal
|
|
2411
|
+
*/
|
|
2412
|
+
declare class CustomError extends Error {
|
|
2413
|
+
originMessage: string;
|
|
2414
|
+
constructor(options: {
|
|
2415
|
+
message: string;
|
|
2416
|
+
originMessage: string;
|
|
2417
|
+
});
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2416
2420
|
/**
|
|
2417
2421
|
* @public
|
|
2418
2422
|
* 内部逻辑异常
|
|
@@ -2485,4 +2489,4 @@ declare class NotSupportedError extends CustomError {
|
|
|
2485
2489
|
* @packageDocumentation
|
|
2486
2490
|
*/
|
|
2487
2491
|
|
|
2488
|
-
export { ActionSheet, ActionSheetOptions, AttributeType, BatchButtonFeatureContext, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, BuilderComponent, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, ComponentScheduleIdentity, ComponentScheduleScene, Configuration, ConfigurationFeatureContext, ContainerModal, ContainerModalConfigureOptions, Context, Control, ControlFeatureContext, CreateButtonFeatureContext, CustomComponent, CustomComponentFeatureContext, CustomComponentProps, CustomComponentType, CustomField, CustomFieldConfig, CustomFieldFeatureContext, CustomFieldProps, CustomFieldValidateMsg, CustomFieldValueType, ExCompoundFieldValueType, Field, FieldType, FieldValue, FlowMode,
|
|
2492
|
+
export { ActionSheet, ActionSheetOptions, AttributeType, BatchButtonFeatureContext, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, BuilderComponent, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, ComponentScheduleIdentity, ComponentScheduleScene, Configuration, ConfigurationFeatureContext, ContainerModal, ContainerModalConfigureOptions, Context, Control, ControlFeatureContext, CreateButtonFeatureContext, CustomComponent, CustomComponentFeatureContext, CustomComponentProps, CustomComponentType, CustomField, CustomFieldConfig, CustomFieldFeatureContext, CustomFieldProps, CustomFieldValidateMsg, CustomFieldValueType, EventPayloadMap, EventType, ExCompoundFieldValueType, Field, FieldType, FieldValue, FlowMode, I18nTitleConfig, IMPL_KEY, IPluginCustomBuildConfig, IRichTextEditorImageUploadComplete, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, LiteAppCompLayoutConfig, LiteAppCompPropBriefConfig, LiteAppCompPropFullConfig, LiteAppCompPropSelectConfig, LiteAppCompPropValueType, LiteAppComponentConfig, LiteAppComponentFeatureContext, LiteAppComponentPreset, LiteAppComponentProps, LiteAppPropBoolean, LiteAppPropDateRange, LiteAppPropDateWithTime, LiteAppPropField, LiteAppPropLayout, LiteAppPropMultiSelect, LiteAppPropNumber, LiteAppPropSelect, LiteAppPropTemplateType, LiteAppPropText, LiteAppPropView, LiteAppPropWorkItemInstance, LiteAppPropWorkItemListAfterFilter, LiteAppPropWorkItemListAfterSort, LiteAppPropWorkItemType, MEEGO_BIZ_HUB, Modal, ModalConfirmOptions, ModalOpenOptions, Navigation, NoAuthError, NodeStatus, NotFoundError, NotSupportedError, Off, OutOfLimitError, Page, PageFeatureContext, RichTextEditor, RichTextEditorContent, RichTextEditorOptions, Role, RoleOwners, SDKClient, SDKClientOptions, ScheduleCompValidateMsg, ScheduleCompValueType, ScheduleUnitButtonFeatureContext, Script, ScriptFeatureContext, Shared, Space, Storage, SubFieldType, Tab, TabFeatureContext, Toast, ToastOptions, User, UserInfo, Utils, View, ViewFeatureContext, WbsStatus, WorkItem, WorkItemButtonFeatureContext, WorkItemCreateFormPreset, WorkItemFinder, WorkItemFinderOptions, WorkObject, SDKClient as default, unwatch };
|