@lark-project/js-sdk 2.0.1-alpha.0 → 2.0.1-alpha.10
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 +11 -0
- package/dist/es/index.js +111 -19
- package/dist/lib/index.js +116 -20
- package/dist/types/index.d.ts +149 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
# Change Log
|
|
2
|
+
## 2.0.3(2024/07/22)
|
|
3
|
+
- 「Add」新增 Control Context
|
|
4
|
+
- 「Add」新增 NotSupportedError
|
|
5
|
+
|
|
6
|
+
## 2.0.2(2024/07/11)
|
|
7
|
+
- 「Add」新增 ContainerModal
|
|
8
|
+
- 「Add」新增 Intercept
|
|
9
|
+
|
|
10
|
+
## 2.0.1(2024/05/22)
|
|
11
|
+
- 「Add」新增 RichTextEditor
|
|
12
|
+
|
|
2
13
|
## 2.0.0(2024/03/27)
|
|
3
14
|
- 「Add」新增 Modal / ActionSheet(mobile)/ Utils
|
|
4
15
|
|
package/dist/es/index.js
CHANGED
|
@@ -276,6 +276,54 @@ _a13 = IMPL_KEY;
|
|
|
276
276
|
*/
|
|
277
277
|
Utils[_a13] = "utils";
|
|
278
278
|
|
|
279
|
+
// src/features/ContainerModal.ts
|
|
280
|
+
var _a14;
|
|
281
|
+
var ContainerModal = class extends BaseModel {
|
|
282
|
+
/**
|
|
283
|
+
* 加载数据
|
|
284
|
+
*/
|
|
285
|
+
static load() {
|
|
286
|
+
throw new Error("not implemented");
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
_a14 = IMPL_KEY;
|
|
290
|
+
/**
|
|
291
|
+
* @internal
|
|
292
|
+
*/
|
|
293
|
+
ContainerModal[_a14] = "ContainerModal";
|
|
294
|
+
|
|
295
|
+
// src/features/Intercept.ts
|
|
296
|
+
var _a15;
|
|
297
|
+
var Intercept = class extends BaseModel {
|
|
298
|
+
/**
|
|
299
|
+
* 加载数据
|
|
300
|
+
*/
|
|
301
|
+
static load() {
|
|
302
|
+
throw new Error("not implemented");
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
_a15 = IMPL_KEY;
|
|
306
|
+
/**
|
|
307
|
+
* @internal
|
|
308
|
+
*/
|
|
309
|
+
Intercept[_a15] = "Intercept";
|
|
310
|
+
|
|
311
|
+
// src/features/Control.ts
|
|
312
|
+
var _a16;
|
|
313
|
+
var Control = class extends BaseModel {
|
|
314
|
+
/**
|
|
315
|
+
* 加载数据
|
|
316
|
+
*/
|
|
317
|
+
static load() {
|
|
318
|
+
throw new Error("not implemented");
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
_a16 = IMPL_KEY;
|
|
322
|
+
/**
|
|
323
|
+
* @internal
|
|
324
|
+
*/
|
|
325
|
+
Control[_a16] = "Control";
|
|
326
|
+
|
|
279
327
|
// src/client.ts
|
|
280
328
|
function getImplClass(decl, impls) {
|
|
281
329
|
return impls == null ? void 0 : impls[decl[IMPL_KEY]];
|
|
@@ -284,6 +332,27 @@ function getImplValue(decl, impls) {
|
|
|
284
332
|
return impls == null ? void 0 : impls[decl[IMPL_KEY]];
|
|
285
333
|
}
|
|
286
334
|
var _SDKClient = class {
|
|
335
|
+
/**
|
|
336
|
+
* 插件容器模态框
|
|
337
|
+
* only 2.0
|
|
338
|
+
*/
|
|
339
|
+
get containerModal() {
|
|
340
|
+
return getImplValue(ContainerModal, this._meegoBizHub);
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* 拦截事件点位容器特有能力
|
|
344
|
+
* only 2.0
|
|
345
|
+
*/
|
|
346
|
+
get intercept() {
|
|
347
|
+
return getImplValue(Intercept, this._meegoBizHub);
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* 控件点位容器特有能力
|
|
351
|
+
* only 2.0
|
|
352
|
+
*/
|
|
353
|
+
get control() {
|
|
354
|
+
return getImplValue(Control, this._meegoBizHub);
|
|
355
|
+
}
|
|
287
356
|
/**
|
|
288
357
|
* 应用导航
|
|
289
358
|
*/
|
|
@@ -308,6 +377,13 @@ var _SDKClient = class {
|
|
|
308
377
|
get toast() {
|
|
309
378
|
return getImplValue(Toast, this._meegoBizHub);
|
|
310
379
|
}
|
|
380
|
+
/**
|
|
381
|
+
* 富文本编辑器
|
|
382
|
+
* only 2.0
|
|
383
|
+
*/
|
|
384
|
+
get richTextEditor() {
|
|
385
|
+
return getImplValue(RichTextEditor, this._meegoBizHub);
|
|
386
|
+
}
|
|
311
387
|
/**
|
|
312
388
|
* 模态框
|
|
313
389
|
*/
|
|
@@ -316,6 +392,7 @@ var _SDKClient = class {
|
|
|
316
392
|
}
|
|
317
393
|
/**
|
|
318
394
|
* 操作菜单
|
|
395
|
+
* only mobile 2.0
|
|
319
396
|
*/
|
|
320
397
|
get actionSheet() {
|
|
321
398
|
return getImplValue(ActionSheet, this._meegoBizHub);
|
|
@@ -382,7 +459,7 @@ var SDKClient = _SDKClient;
|
|
|
382
459
|
/**
|
|
383
460
|
* SDK 版本号
|
|
384
461
|
*/
|
|
385
|
-
SDKClient.version = "2.0.1-alpha.
|
|
462
|
+
SDKClient.version = "2.0.1-alpha.10";
|
|
386
463
|
|
|
387
464
|
// src/types/biz.ts
|
|
388
465
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -435,23 +512,23 @@ var ButtonScene = /* @__PURE__ */ ((ButtonScene2) => {
|
|
|
435
512
|
ButtonScene2[ButtonScene2["workItemNode"] = 4] = "workItemNode";
|
|
436
513
|
return ButtonScene2;
|
|
437
514
|
})(ButtonScene || {});
|
|
438
|
-
var
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
return
|
|
454
|
-
})(
|
|
515
|
+
var InterceptEvent = /* @__PURE__ */ ((InterceptEvent2) => {
|
|
516
|
+
InterceptEvent2[InterceptEvent2["CreateWorkItem"] = 1001] = "CreateWorkItem";
|
|
517
|
+
InterceptEvent2[InterceptEvent2["DeleteWorkItem"] = 1002] = "DeleteWorkItem";
|
|
518
|
+
InterceptEvent2[InterceptEvent2["BatchDeleteWorkItem"] = 1003] = "BatchDeleteWorkItem";
|
|
519
|
+
InterceptEvent2[InterceptEvent2["RecoveryWorkItem"] = 1004] = "RecoveryWorkItem";
|
|
520
|
+
InterceptEvent2[InterceptEvent2["AbortWorkItem"] = 1005] = "AbortWorkItem";
|
|
521
|
+
InterceptEvent2[InterceptEvent2["UpgradeTemplate"] = 1006] = "UpgradeTemplate";
|
|
522
|
+
InterceptEvent2[InterceptEvent2["BatchUpgradeTemplate"] = 1007] = "BatchUpgradeTemplate";
|
|
523
|
+
InterceptEvent2[InterceptEvent2["ExportWorkItem"] = 1008] = "ExportWorkItem";
|
|
524
|
+
InterceptEvent2[InterceptEvent2["FinishNode"] = 2001] = "FinishNode";
|
|
525
|
+
InterceptEvent2[InterceptEvent2["DeleteNode"] = 2002] = "DeleteNode";
|
|
526
|
+
InterceptEvent2[InterceptEvent2["RecoveryNode"] = 2003] = "RecoveryNode";
|
|
527
|
+
InterceptEvent2[InterceptEvent2["RollBackNode"] = 2004] = "RollBackNode";
|
|
528
|
+
InterceptEvent2[InterceptEvent2["EditSchedule"] = 2005] = "EditSchedule";
|
|
529
|
+
InterceptEvent2[InterceptEvent2["UpdateState"] = 3001] = "UpdateState";
|
|
530
|
+
return InterceptEvent2;
|
|
531
|
+
})(InterceptEvent || {});
|
|
455
532
|
|
|
456
533
|
// src/errors/CustomError.ts
|
|
457
534
|
var CustomError = class extends Error {
|
|
@@ -516,6 +593,17 @@ var InvalidParamsError = class extends CustomError {
|
|
|
516
593
|
}
|
|
517
594
|
};
|
|
518
595
|
|
|
596
|
+
// src/errors/NotSupportedError.ts
|
|
597
|
+
var NotSupportedError = class extends CustomError {
|
|
598
|
+
constructor(options) {
|
|
599
|
+
super({
|
|
600
|
+
message: "the api is not supported",
|
|
601
|
+
originMessage: options.originMessage
|
|
602
|
+
});
|
|
603
|
+
this.name = "NotSupportedError";
|
|
604
|
+
}
|
|
605
|
+
};
|
|
606
|
+
|
|
519
607
|
// src/index.ts
|
|
520
608
|
var src_default = SDKClient;
|
|
521
609
|
export {
|
|
@@ -523,12 +611,15 @@ export {
|
|
|
523
611
|
AttributeType,
|
|
524
612
|
ButtonScene,
|
|
525
613
|
Clipboard,
|
|
614
|
+
ContainerModal,
|
|
526
615
|
Context,
|
|
616
|
+
Control,
|
|
527
617
|
Field,
|
|
528
618
|
FieldType,
|
|
529
619
|
FlowMode,
|
|
530
620
|
IMPL_KEY,
|
|
531
|
-
|
|
621
|
+
Intercept,
|
|
622
|
+
InterceptEvent,
|
|
532
623
|
InternalError,
|
|
533
624
|
InvalidParamsError,
|
|
534
625
|
MEEGO_BIZ_HUB,
|
|
@@ -537,6 +628,7 @@ export {
|
|
|
537
628
|
NoAuthError,
|
|
538
629
|
NodeStatus,
|
|
539
630
|
NotFoundError,
|
|
631
|
+
NotSupportedError,
|
|
540
632
|
OutOfLimitError,
|
|
541
633
|
RichTextEditor,
|
|
542
634
|
SDKClient,
|
package/dist/lib/index.js
CHANGED
|
@@ -52,12 +52,15 @@ __export(src_exports, {
|
|
|
52
52
|
AttributeType: () => AttributeType,
|
|
53
53
|
ButtonScene: () => ButtonScene,
|
|
54
54
|
Clipboard: () => Clipboard,
|
|
55
|
+
ContainerModal: () => ContainerModal,
|
|
55
56
|
Context: () => Context,
|
|
57
|
+
Control: () => Control,
|
|
56
58
|
Field: () => Field,
|
|
57
59
|
FieldType: () => FieldType,
|
|
58
60
|
FlowMode: () => FlowMode,
|
|
59
61
|
IMPL_KEY: () => IMPL_KEY,
|
|
60
|
-
|
|
62
|
+
Intercept: () => Intercept,
|
|
63
|
+
InterceptEvent: () => InterceptEvent,
|
|
61
64
|
InternalError: () => InternalError,
|
|
62
65
|
InvalidParamsError: () => InvalidParamsError,
|
|
63
66
|
MEEGO_BIZ_HUB: () => MEEGO_BIZ_HUB,
|
|
@@ -66,6 +69,7 @@ __export(src_exports, {
|
|
|
66
69
|
NoAuthError: () => NoAuthError,
|
|
67
70
|
NodeStatus: () => NodeStatus,
|
|
68
71
|
NotFoundError: () => NotFoundError,
|
|
72
|
+
NotSupportedError: () => NotSupportedError,
|
|
69
73
|
OutOfLimitError: () => OutOfLimitError,
|
|
70
74
|
RichTextEditor: () => RichTextEditor,
|
|
71
75
|
SDKClient: () => SDKClient,
|
|
@@ -327,6 +331,54 @@ _a13 = IMPL_KEY;
|
|
|
327
331
|
*/
|
|
328
332
|
Utils[_a13] = "utils";
|
|
329
333
|
|
|
334
|
+
// src/features/ContainerModal.ts
|
|
335
|
+
var _a14;
|
|
336
|
+
var ContainerModal = class extends BaseModel {
|
|
337
|
+
/**
|
|
338
|
+
* 加载数据
|
|
339
|
+
*/
|
|
340
|
+
static load() {
|
|
341
|
+
throw new Error("not implemented");
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
_a14 = IMPL_KEY;
|
|
345
|
+
/**
|
|
346
|
+
* @internal
|
|
347
|
+
*/
|
|
348
|
+
ContainerModal[_a14] = "ContainerModal";
|
|
349
|
+
|
|
350
|
+
// src/features/Intercept.ts
|
|
351
|
+
var _a15;
|
|
352
|
+
var Intercept = class extends BaseModel {
|
|
353
|
+
/**
|
|
354
|
+
* 加载数据
|
|
355
|
+
*/
|
|
356
|
+
static load() {
|
|
357
|
+
throw new Error("not implemented");
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
_a15 = IMPL_KEY;
|
|
361
|
+
/**
|
|
362
|
+
* @internal
|
|
363
|
+
*/
|
|
364
|
+
Intercept[_a15] = "Intercept";
|
|
365
|
+
|
|
366
|
+
// src/features/Control.ts
|
|
367
|
+
var _a16;
|
|
368
|
+
var Control = class extends BaseModel {
|
|
369
|
+
/**
|
|
370
|
+
* 加载数据
|
|
371
|
+
*/
|
|
372
|
+
static load() {
|
|
373
|
+
throw new Error("not implemented");
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
_a16 = IMPL_KEY;
|
|
377
|
+
/**
|
|
378
|
+
* @internal
|
|
379
|
+
*/
|
|
380
|
+
Control[_a16] = "Control";
|
|
381
|
+
|
|
330
382
|
// src/client.ts
|
|
331
383
|
function getImplClass(decl, impls) {
|
|
332
384
|
return impls == null ? void 0 : impls[decl[IMPL_KEY]];
|
|
@@ -335,6 +387,27 @@ function getImplValue(decl, impls) {
|
|
|
335
387
|
return impls == null ? void 0 : impls[decl[IMPL_KEY]];
|
|
336
388
|
}
|
|
337
389
|
var _SDKClient = class {
|
|
390
|
+
/**
|
|
391
|
+
* 插件容器模态框
|
|
392
|
+
* only 2.0
|
|
393
|
+
*/
|
|
394
|
+
get containerModal() {
|
|
395
|
+
return getImplValue(ContainerModal, this._meegoBizHub);
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* 拦截事件点位容器特有能力
|
|
399
|
+
* only 2.0
|
|
400
|
+
*/
|
|
401
|
+
get intercept() {
|
|
402
|
+
return getImplValue(Intercept, this._meegoBizHub);
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* 控件点位容器特有能力
|
|
406
|
+
* only 2.0
|
|
407
|
+
*/
|
|
408
|
+
get control() {
|
|
409
|
+
return getImplValue(Control, this._meegoBizHub);
|
|
410
|
+
}
|
|
338
411
|
/**
|
|
339
412
|
* 应用导航
|
|
340
413
|
*/
|
|
@@ -359,6 +432,13 @@ var _SDKClient = class {
|
|
|
359
432
|
get toast() {
|
|
360
433
|
return getImplValue(Toast, this._meegoBizHub);
|
|
361
434
|
}
|
|
435
|
+
/**
|
|
436
|
+
* 富文本编辑器
|
|
437
|
+
* only 2.0
|
|
438
|
+
*/
|
|
439
|
+
get richTextEditor() {
|
|
440
|
+
return getImplValue(RichTextEditor, this._meegoBizHub);
|
|
441
|
+
}
|
|
362
442
|
/**
|
|
363
443
|
* 模态框
|
|
364
444
|
*/
|
|
@@ -367,6 +447,7 @@ var _SDKClient = class {
|
|
|
367
447
|
}
|
|
368
448
|
/**
|
|
369
449
|
* 操作菜单
|
|
450
|
+
* only mobile 2.0
|
|
370
451
|
*/
|
|
371
452
|
get actionSheet() {
|
|
372
453
|
return getImplValue(ActionSheet, this._meegoBizHub);
|
|
@@ -433,7 +514,7 @@ var SDKClient = _SDKClient;
|
|
|
433
514
|
/**
|
|
434
515
|
* SDK 版本号
|
|
435
516
|
*/
|
|
436
|
-
SDKClient.version = "2.0.1-alpha.
|
|
517
|
+
SDKClient.version = "2.0.1-alpha.10";
|
|
437
518
|
|
|
438
519
|
// src/types/biz.ts
|
|
439
520
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -486,23 +567,23 @@ var ButtonScene = /* @__PURE__ */ ((ButtonScene2) => {
|
|
|
486
567
|
ButtonScene2[ButtonScene2["workItemNode"] = 4] = "workItemNode";
|
|
487
568
|
return ButtonScene2;
|
|
488
569
|
})(ButtonScene || {});
|
|
489
|
-
var
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
return
|
|
505
|
-
})(
|
|
570
|
+
var InterceptEvent = /* @__PURE__ */ ((InterceptEvent2) => {
|
|
571
|
+
InterceptEvent2[InterceptEvent2["CreateWorkItem"] = 1001] = "CreateWorkItem";
|
|
572
|
+
InterceptEvent2[InterceptEvent2["DeleteWorkItem"] = 1002] = "DeleteWorkItem";
|
|
573
|
+
InterceptEvent2[InterceptEvent2["BatchDeleteWorkItem"] = 1003] = "BatchDeleteWorkItem";
|
|
574
|
+
InterceptEvent2[InterceptEvent2["RecoveryWorkItem"] = 1004] = "RecoveryWorkItem";
|
|
575
|
+
InterceptEvent2[InterceptEvent2["AbortWorkItem"] = 1005] = "AbortWorkItem";
|
|
576
|
+
InterceptEvent2[InterceptEvent2["UpgradeTemplate"] = 1006] = "UpgradeTemplate";
|
|
577
|
+
InterceptEvent2[InterceptEvent2["BatchUpgradeTemplate"] = 1007] = "BatchUpgradeTemplate";
|
|
578
|
+
InterceptEvent2[InterceptEvent2["ExportWorkItem"] = 1008] = "ExportWorkItem";
|
|
579
|
+
InterceptEvent2[InterceptEvent2["FinishNode"] = 2001] = "FinishNode";
|
|
580
|
+
InterceptEvent2[InterceptEvent2["DeleteNode"] = 2002] = "DeleteNode";
|
|
581
|
+
InterceptEvent2[InterceptEvent2["RecoveryNode"] = 2003] = "RecoveryNode";
|
|
582
|
+
InterceptEvent2[InterceptEvent2["RollBackNode"] = 2004] = "RollBackNode";
|
|
583
|
+
InterceptEvent2[InterceptEvent2["EditSchedule"] = 2005] = "EditSchedule";
|
|
584
|
+
InterceptEvent2[InterceptEvent2["UpdateState"] = 3001] = "UpdateState";
|
|
585
|
+
return InterceptEvent2;
|
|
586
|
+
})(InterceptEvent || {});
|
|
506
587
|
|
|
507
588
|
// src/errors/CustomError.ts
|
|
508
589
|
var CustomError = class extends Error {
|
|
@@ -567,6 +648,17 @@ var InvalidParamsError = class extends CustomError {
|
|
|
567
648
|
}
|
|
568
649
|
};
|
|
569
650
|
|
|
651
|
+
// src/errors/NotSupportedError.ts
|
|
652
|
+
var NotSupportedError = class extends CustomError {
|
|
653
|
+
constructor(options) {
|
|
654
|
+
super({
|
|
655
|
+
message: "the api is not supported",
|
|
656
|
+
originMessage: options.originMessage
|
|
657
|
+
});
|
|
658
|
+
this.name = "NotSupportedError";
|
|
659
|
+
}
|
|
660
|
+
};
|
|
661
|
+
|
|
570
662
|
// src/index.ts
|
|
571
663
|
var src_default = SDKClient;
|
|
572
664
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -575,12 +667,15 @@ var src_default = SDKClient;
|
|
|
575
667
|
AttributeType,
|
|
576
668
|
ButtonScene,
|
|
577
669
|
Clipboard,
|
|
670
|
+
ContainerModal,
|
|
578
671
|
Context,
|
|
672
|
+
Control,
|
|
579
673
|
Field,
|
|
580
674
|
FieldType,
|
|
581
675
|
FlowMode,
|
|
582
676
|
IMPL_KEY,
|
|
583
|
-
|
|
677
|
+
Intercept,
|
|
678
|
+
InterceptEvent,
|
|
584
679
|
InternalError,
|
|
585
680
|
InvalidParamsError,
|
|
586
681
|
MEEGO_BIZ_HUB,
|
|
@@ -589,6 +684,7 @@ var src_default = SDKClient;
|
|
|
589
684
|
NoAuthError,
|
|
590
685
|
NodeStatus,
|
|
591
686
|
NotFoundError,
|
|
687
|
+
NotSupportedError,
|
|
592
688
|
OutOfLimitError,
|
|
593
689
|
RichTextEditor,
|
|
594
690
|
SDKClient,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -397,15 +397,32 @@ interface ViewFeatureContext {
|
|
|
397
397
|
}
|
|
398
398
|
/**
|
|
399
399
|
* 控件构成
|
|
400
|
-
* 可被配置于详情页、节点流转、状态流转表单、表格页并可用于筛选和分组
|
|
401
400
|
*/
|
|
402
401
|
interface ControlFeatureContext {
|
|
403
|
-
|
|
402
|
+
/**
|
|
403
|
+
* 控件当前所属空间标识
|
|
404
|
+
*/
|
|
405
|
+
spaceId: string;
|
|
406
|
+
/**
|
|
407
|
+
* 控件当前所属工作项类型标识
|
|
408
|
+
*/
|
|
409
|
+
workObjectId: string;
|
|
410
|
+
/**
|
|
411
|
+
* 控件当前所属工作项实例标识
|
|
412
|
+
* 新建页表单内该值为空
|
|
413
|
+
*/
|
|
414
|
+
workItemId?: number;
|
|
415
|
+
/**
|
|
416
|
+
* 控件唯一标识
|
|
417
|
+
* 新建场景结合 webhook 用于关联自有数据
|
|
418
|
+
* 详情页可能为空,不推荐强依赖 UUID 读取自有数据
|
|
419
|
+
*/
|
|
420
|
+
UUID?: string;
|
|
404
421
|
}
|
|
405
422
|
/**
|
|
406
423
|
* 拦截事件类型
|
|
407
424
|
*/
|
|
408
|
-
declare enum
|
|
425
|
+
declare enum InterceptEvent {
|
|
409
426
|
/** 创建工作项 */
|
|
410
427
|
CreateWorkItem = 1001,
|
|
411
428
|
/** 删除工作项 */
|
|
@@ -439,10 +456,16 @@ declare enum InterceptionEvent {
|
|
|
439
456
|
* 拦截构成
|
|
440
457
|
* 用于拦截用户行为,包括拦截位置、触发规则和提示等相关配置
|
|
441
458
|
*/
|
|
442
|
-
interface
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
workItems: Array<BriefWorkItem
|
|
459
|
+
interface InterceptFeatureContext<T> {
|
|
460
|
+
message: string;
|
|
461
|
+
eventType: InterceptEvent;
|
|
462
|
+
workItems: Array<BriefWorkItem & {
|
|
463
|
+
/**
|
|
464
|
+
* 当前触发事件
|
|
465
|
+
*/
|
|
466
|
+
changedValue?: any;
|
|
467
|
+
}>;
|
|
468
|
+
customData: T;
|
|
446
469
|
}
|
|
447
470
|
|
|
448
471
|
/**
|
|
@@ -1023,17 +1046,41 @@ interface RichTextEditorOptions {
|
|
|
1023
1046
|
*/
|
|
1024
1047
|
title?: string;
|
|
1025
1048
|
/**
|
|
1026
|
-
*
|
|
1049
|
+
* 富文本默认内容,对应 RichTextEditorContent.doc
|
|
1027
1050
|
*/
|
|
1028
1051
|
defaultValue?: string;
|
|
1029
1052
|
/**
|
|
1030
|
-
*
|
|
1053
|
+
* 额外的上下文
|
|
1054
|
+
*/
|
|
1055
|
+
context: {
|
|
1056
|
+
/**
|
|
1057
|
+
* 空间 id
|
|
1058
|
+
* @人 下拉人员列表会按空间推荐
|
|
1059
|
+
* 附件上传会关联该空间权限控制
|
|
1060
|
+
*/
|
|
1061
|
+
spaceId: string;
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
/**
|
|
1065
|
+
* 富文本完整内容
|
|
1066
|
+
*/
|
|
1067
|
+
interface RichTextEditorContent {
|
|
1068
|
+
/**
|
|
1069
|
+
* 富文本结构化数据
|
|
1031
1070
|
*/
|
|
1032
|
-
|
|
1071
|
+
doc?: string;
|
|
1033
1072
|
/**
|
|
1034
|
-
*
|
|
1073
|
+
* 富文本 HTML 版本
|
|
1035
1074
|
*/
|
|
1036
|
-
|
|
1075
|
+
doc_html?: string;
|
|
1076
|
+
/**
|
|
1077
|
+
* 富文本的纯文本概要
|
|
1078
|
+
*/
|
|
1079
|
+
doc_text?: string;
|
|
1080
|
+
/**
|
|
1081
|
+
* 是否为空
|
|
1082
|
+
*/
|
|
1083
|
+
is_empty: boolean;
|
|
1037
1084
|
}
|
|
1038
1085
|
/**
|
|
1039
1086
|
* @public
|
|
@@ -1059,7 +1106,7 @@ declare abstract class RichTextEditor extends BaseModel {
|
|
|
1059
1106
|
abstract show(options: RichTextEditorOptions, callback: (result: {
|
|
1060
1107
|
confirmed: boolean;
|
|
1061
1108
|
canceled: boolean;
|
|
1062
|
-
|
|
1109
|
+
content?: RichTextEditorContent;
|
|
1063
1110
|
}) => void): Promise<void>;
|
|
1064
1111
|
}
|
|
1065
1112
|
|
|
@@ -1096,6 +1143,63 @@ declare abstract class Utils extends BaseModel {
|
|
|
1096
1143
|
}>;
|
|
1097
1144
|
}
|
|
1098
1145
|
|
|
1146
|
+
/**
|
|
1147
|
+
* @public
|
|
1148
|
+
* 插件容器模态框
|
|
1149
|
+
*/
|
|
1150
|
+
declare abstract class ContainerModal extends BaseModel {
|
|
1151
|
+
/**
|
|
1152
|
+
* @internal
|
|
1153
|
+
*/
|
|
1154
|
+
protected static [IMPL_KEY]: string;
|
|
1155
|
+
/**
|
|
1156
|
+
* 加载数据
|
|
1157
|
+
*/
|
|
1158
|
+
static load(): Promise<ContainerModal>;
|
|
1159
|
+
/**
|
|
1160
|
+
* 关闭插件当前激活的容器模态框
|
|
1161
|
+
*/
|
|
1162
|
+
abstract closeModal: Promise<void>;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* @public
|
|
1167
|
+
* 拦截事件模态框
|
|
1168
|
+
*/
|
|
1169
|
+
declare abstract class Intercept extends BaseModel {
|
|
1170
|
+
/**
|
|
1171
|
+
* @internal
|
|
1172
|
+
*/
|
|
1173
|
+
protected static [IMPL_KEY]: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* 加载数据
|
|
1176
|
+
*/
|
|
1177
|
+
static load(): Promise<Intercept>;
|
|
1178
|
+
/**
|
|
1179
|
+
* 获取当前触发的拦截事件上下文
|
|
1180
|
+
*/
|
|
1181
|
+
abstract getEventCtx<T = any>(): Promise<InterceptFeatureContext<T>>;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
/**
|
|
1185
|
+
* @public
|
|
1186
|
+
* 控件
|
|
1187
|
+
*/
|
|
1188
|
+
declare abstract class Control extends BaseModel {
|
|
1189
|
+
/**
|
|
1190
|
+
* @internal
|
|
1191
|
+
*/
|
|
1192
|
+
protected static [IMPL_KEY]: string;
|
|
1193
|
+
/**
|
|
1194
|
+
* 加载数据
|
|
1195
|
+
*/
|
|
1196
|
+
static load(): Promise<Control>;
|
|
1197
|
+
/**
|
|
1198
|
+
* 获取当前控件的上下文
|
|
1199
|
+
*/
|
|
1200
|
+
abstract getContext(): Promise<ControlFeatureContext>;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1099
1203
|
/**
|
|
1100
1204
|
* @public
|
|
1101
1205
|
* SDKClient 的配置项
|
|
@@ -1113,6 +1217,21 @@ declare class SDKClient {
|
|
|
1113
1217
|
* SDK 版本号
|
|
1114
1218
|
*/
|
|
1115
1219
|
static version: string;
|
|
1220
|
+
/**
|
|
1221
|
+
* 插件容器模态框
|
|
1222
|
+
* only 2.0
|
|
1223
|
+
*/
|
|
1224
|
+
get containerModal(): ContainerModal;
|
|
1225
|
+
/**
|
|
1226
|
+
* 拦截事件点位容器特有能力
|
|
1227
|
+
* only 2.0
|
|
1228
|
+
*/
|
|
1229
|
+
get intercept(): Intercept;
|
|
1230
|
+
/**
|
|
1231
|
+
* 控件点位容器特有能力
|
|
1232
|
+
* only 2.0
|
|
1233
|
+
*/
|
|
1234
|
+
get control(): Control;
|
|
1116
1235
|
/**
|
|
1117
1236
|
* 应用导航
|
|
1118
1237
|
*/
|
|
@@ -1129,12 +1248,18 @@ declare class SDKClient {
|
|
|
1129
1248
|
* 提示
|
|
1130
1249
|
*/
|
|
1131
1250
|
get toast(): Toast;
|
|
1251
|
+
/**
|
|
1252
|
+
* 富文本编辑器
|
|
1253
|
+
* only 2.0
|
|
1254
|
+
*/
|
|
1255
|
+
get richTextEditor(): RichTextEditor;
|
|
1132
1256
|
/**
|
|
1133
1257
|
* 模态框
|
|
1134
1258
|
*/
|
|
1135
1259
|
get modal(): Modal;
|
|
1136
1260
|
/**
|
|
1137
1261
|
* 操作菜单
|
|
1262
|
+
* only mobile 2.0
|
|
1138
1263
|
*/
|
|
1139
1264
|
get actionSheet(): ActionSheet;
|
|
1140
1265
|
/**
|
|
@@ -1234,6 +1359,16 @@ declare class InvalidParamsError extends CustomError {
|
|
|
1234
1359
|
});
|
|
1235
1360
|
}
|
|
1236
1361
|
|
|
1362
|
+
/**
|
|
1363
|
+
* @public
|
|
1364
|
+
* API 在当前环境不支持
|
|
1365
|
+
*/
|
|
1366
|
+
declare class NotSupportedError extends CustomError {
|
|
1367
|
+
constructor(options: {
|
|
1368
|
+
originMessage: string;
|
|
1369
|
+
});
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1237
1372
|
/**
|
|
1238
1373
|
* 用于飞书项目插件读取系统数据的 JSSDK
|
|
1239
1374
|
*
|
|
@@ -1243,4 +1378,4 @@ declare class InvalidParamsError extends CustomError {
|
|
|
1243
1378
|
* @packageDocumentation
|
|
1244
1379
|
*/
|
|
1245
1380
|
|
|
1246
|
-
export { ActionSheet, ActionSheetOptions, AttributeType, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, Context, ControlFeatureContext, Field, FieldType, FlowMode, IMPL_KEY, IPluginCustomBuildConfig, IntegrationFeatureContext,
|
|
1381
|
+
export { ActionSheet, ActionSheetOptions, AttributeType, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, ContainerModal, Context, Control, ControlFeatureContext, Field, FieldType, FlowMode, IMPL_KEY, IPluginCustomBuildConfig, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, MEEGO_BIZ_HUB, Modal, ModalOptions, Navigation, NoAuthError, NodeStatus, NotFoundError, NotSupportedError, OutOfLimitError, PageFeatureContext, RichTextEditor, RichTextEditorContent, RichTextEditorOptions, Role, RoleOwners, SDKClient, SDKClientOptions, Space, Storage, TabFeatureContext, Toast, ToastOptions, User, Utils, ViewFeatureContext, WorkItem, WorkItemCreateFormPreset, WorkObject, SDKClient as default, unwatch };
|