@lark-project/js-sdk 2.0.1-alpha.8 → 2.0.1-dev.21
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 +13 -0
- package/dist/es/index.js +80 -13
- package/dist/lib/index.js +83 -13
- package/dist/types/index.d.ts +194 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
|
+
## 2.0.6 (2024/09/12)
|
|
3
|
+
- 「Add」新增 Fullscreen Modal
|
|
4
|
+
|
|
5
|
+
## 2.0.5 (2024/08/13)
|
|
6
|
+
- 「Add」新增 Button Context
|
|
7
|
+
|
|
8
|
+
## 2.0.4(2024/08/06)
|
|
9
|
+
- 「Add」新增 WorkItemFinder
|
|
10
|
+
|
|
11
|
+
## 2.0.3(2024/07/22)
|
|
12
|
+
- 「Add」新增 Control Context
|
|
13
|
+
- 「Add」新增 NotSupportedError
|
|
14
|
+
|
|
2
15
|
## 2.0.2(2024/07/11)
|
|
3
16
|
- 「Add」新增 ContainerModal
|
|
4
17
|
- 「Add」新增 Intercept
|
package/dist/es/index.js
CHANGED
|
@@ -260,9 +260,9 @@ _a12 = IMPL_KEY;
|
|
|
260
260
|
*/
|
|
261
261
|
RichTextEditor[_a12] = "richTextEditor";
|
|
262
262
|
|
|
263
|
-
// src/biz/
|
|
263
|
+
// src/biz/WorkItemFinder.ts
|
|
264
264
|
var _a13;
|
|
265
|
-
var
|
|
265
|
+
var WorkItemFinder = class extends BaseModel {
|
|
266
266
|
/**
|
|
267
267
|
* @internal
|
|
268
268
|
*/
|
|
@@ -274,10 +274,26 @@ _a13 = IMPL_KEY;
|
|
|
274
274
|
/**
|
|
275
275
|
* @internal
|
|
276
276
|
*/
|
|
277
|
-
|
|
277
|
+
WorkItemFinder[_a13] = "workItemFinder";
|
|
278
278
|
|
|
279
|
-
// src/
|
|
279
|
+
// src/biz/Utils.ts
|
|
280
280
|
var _a14;
|
|
281
|
+
var Utils = class extends BaseModel {
|
|
282
|
+
/**
|
|
283
|
+
* @internal
|
|
284
|
+
*/
|
|
285
|
+
static load() {
|
|
286
|
+
throw new Error("not implemented");
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
_a14 = IMPL_KEY;
|
|
290
|
+
/**
|
|
291
|
+
* @internal
|
|
292
|
+
*/
|
|
293
|
+
Utils[_a14] = "utils";
|
|
294
|
+
|
|
295
|
+
// src/features/ContainerModal.ts
|
|
296
|
+
var _a15;
|
|
281
297
|
var ContainerModal = class extends BaseModel {
|
|
282
298
|
/**
|
|
283
299
|
* 加载数据
|
|
@@ -286,14 +302,14 @@ var ContainerModal = class extends BaseModel {
|
|
|
286
302
|
throw new Error("not implemented");
|
|
287
303
|
}
|
|
288
304
|
};
|
|
289
|
-
|
|
305
|
+
_a15 = IMPL_KEY;
|
|
290
306
|
/**
|
|
291
307
|
* @internal
|
|
292
308
|
*/
|
|
293
|
-
ContainerModal[
|
|
309
|
+
ContainerModal[_a15] = "ContainerModal";
|
|
294
310
|
|
|
295
311
|
// src/features/Intercept.ts
|
|
296
|
-
var
|
|
312
|
+
var _a16;
|
|
297
313
|
var Intercept = class extends BaseModel {
|
|
298
314
|
/**
|
|
299
315
|
* 加载数据
|
|
@@ -302,14 +318,14 @@ var Intercept = class extends BaseModel {
|
|
|
302
318
|
throw new Error("not implemented");
|
|
303
319
|
}
|
|
304
320
|
};
|
|
305
|
-
|
|
321
|
+
_a16 = IMPL_KEY;
|
|
306
322
|
/**
|
|
307
323
|
* @internal
|
|
308
324
|
*/
|
|
309
|
-
Intercept[
|
|
325
|
+
Intercept[_a16] = "Intercept";
|
|
310
326
|
|
|
311
327
|
// src/features/Control.ts
|
|
312
|
-
var
|
|
328
|
+
var _a17;
|
|
313
329
|
var Control = class extends BaseModel {
|
|
314
330
|
/**
|
|
315
331
|
* 加载数据
|
|
@@ -318,11 +334,27 @@ var Control = class extends BaseModel {
|
|
|
318
334
|
throw new Error("not implemented");
|
|
319
335
|
}
|
|
320
336
|
};
|
|
321
|
-
|
|
337
|
+
_a17 = IMPL_KEY;
|
|
338
|
+
/**
|
|
339
|
+
* @internal
|
|
340
|
+
*/
|
|
341
|
+
Control[_a17] = "Control";
|
|
342
|
+
|
|
343
|
+
// src/features/Button.ts
|
|
344
|
+
var _a18;
|
|
345
|
+
var Button = class extends BaseModel {
|
|
346
|
+
/**
|
|
347
|
+
* 加载数据
|
|
348
|
+
*/
|
|
349
|
+
static load() {
|
|
350
|
+
throw new Error("not implemented");
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
_a18 = IMPL_KEY;
|
|
322
354
|
/**
|
|
323
355
|
* @internal
|
|
324
356
|
*/
|
|
325
|
-
|
|
357
|
+
Button[_a18] = "Button";
|
|
326
358
|
|
|
327
359
|
// src/client.ts
|
|
328
360
|
function getImplClass(decl, impls) {
|
|
@@ -346,6 +378,20 @@ var _SDKClient = class {
|
|
|
346
378
|
get intercept() {
|
|
347
379
|
return getImplValue(Intercept, this._meegoBizHub);
|
|
348
380
|
}
|
|
381
|
+
/**
|
|
382
|
+
* 控件点位容器特有能力
|
|
383
|
+
* only 2.0
|
|
384
|
+
*/
|
|
385
|
+
get control() {
|
|
386
|
+
return getImplValue(Control, this._meegoBizHub);
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* 按钮点位容器特有能力
|
|
390
|
+
* only 2.0
|
|
391
|
+
*/
|
|
392
|
+
get button() {
|
|
393
|
+
return getImplValue(Button, this._meegoBizHub);
|
|
394
|
+
}
|
|
349
395
|
/**
|
|
350
396
|
* 应用导航
|
|
351
397
|
*/
|
|
@@ -377,6 +423,13 @@ var _SDKClient = class {
|
|
|
377
423
|
get richTextEditor() {
|
|
378
424
|
return getImplValue(RichTextEditor, this._meegoBizHub);
|
|
379
425
|
}
|
|
426
|
+
/**
|
|
427
|
+
* 工作项实例筛选器
|
|
428
|
+
* only web 2.0
|
|
429
|
+
*/
|
|
430
|
+
get workItemFinder() {
|
|
431
|
+
return getImplValue(WorkItemFinder, this._meegoBizHub);
|
|
432
|
+
}
|
|
380
433
|
/**
|
|
381
434
|
* 模态框
|
|
382
435
|
*/
|
|
@@ -452,7 +505,7 @@ var SDKClient = _SDKClient;
|
|
|
452
505
|
/**
|
|
453
506
|
* SDK 版本号
|
|
454
507
|
*/
|
|
455
|
-
SDKClient.version = "2.0.1-
|
|
508
|
+
SDKClient.version = "2.0.1-dev.21";
|
|
456
509
|
|
|
457
510
|
// src/types/biz.ts
|
|
458
511
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -586,11 +639,23 @@ var InvalidParamsError = class extends CustomError {
|
|
|
586
639
|
}
|
|
587
640
|
};
|
|
588
641
|
|
|
642
|
+
// src/errors/NotSupportedError.ts
|
|
643
|
+
var NotSupportedError = class extends CustomError {
|
|
644
|
+
constructor(options) {
|
|
645
|
+
super({
|
|
646
|
+
message: "the api is not supported",
|
|
647
|
+
originMessage: options.originMessage
|
|
648
|
+
});
|
|
649
|
+
this.name = "NotSupportedError";
|
|
650
|
+
}
|
|
651
|
+
};
|
|
652
|
+
|
|
589
653
|
// src/index.ts
|
|
590
654
|
var src_default = SDKClient;
|
|
591
655
|
export {
|
|
592
656
|
ActionSheet,
|
|
593
657
|
AttributeType,
|
|
658
|
+
Button,
|
|
594
659
|
ButtonScene,
|
|
595
660
|
Clipboard,
|
|
596
661
|
ContainerModal,
|
|
@@ -610,6 +675,7 @@ export {
|
|
|
610
675
|
NoAuthError,
|
|
611
676
|
NodeStatus,
|
|
612
677
|
NotFoundError,
|
|
678
|
+
NotSupportedError,
|
|
613
679
|
OutOfLimitError,
|
|
614
680
|
RichTextEditor,
|
|
615
681
|
SDKClient,
|
|
@@ -618,6 +684,7 @@ export {
|
|
|
618
684
|
Toast,
|
|
619
685
|
Utils,
|
|
620
686
|
WorkItem,
|
|
687
|
+
WorkItemFinder,
|
|
621
688
|
WorkObject,
|
|
622
689
|
src_default as default
|
|
623
690
|
};
|
package/dist/lib/index.js
CHANGED
|
@@ -50,6 +50,7 @@ var src_exports = {};
|
|
|
50
50
|
__export(src_exports, {
|
|
51
51
|
ActionSheet: () => ActionSheet,
|
|
52
52
|
AttributeType: () => AttributeType,
|
|
53
|
+
Button: () => Button,
|
|
53
54
|
ButtonScene: () => ButtonScene,
|
|
54
55
|
Clipboard: () => Clipboard,
|
|
55
56
|
ContainerModal: () => ContainerModal,
|
|
@@ -69,6 +70,7 @@ __export(src_exports, {
|
|
|
69
70
|
NoAuthError: () => NoAuthError,
|
|
70
71
|
NodeStatus: () => NodeStatus,
|
|
71
72
|
NotFoundError: () => NotFoundError,
|
|
73
|
+
NotSupportedError: () => NotSupportedError,
|
|
72
74
|
OutOfLimitError: () => OutOfLimitError,
|
|
73
75
|
RichTextEditor: () => RichTextEditor,
|
|
74
76
|
SDKClient: () => SDKClient,
|
|
@@ -77,6 +79,7 @@ __export(src_exports, {
|
|
|
77
79
|
Toast: () => Toast,
|
|
78
80
|
Utils: () => Utils,
|
|
79
81
|
WorkItem: () => WorkItem,
|
|
82
|
+
WorkItemFinder: () => WorkItemFinder,
|
|
80
83
|
WorkObject: () => WorkObject,
|
|
81
84
|
default: () => src_default
|
|
82
85
|
});
|
|
@@ -314,9 +317,9 @@ _a12 = IMPL_KEY;
|
|
|
314
317
|
*/
|
|
315
318
|
RichTextEditor[_a12] = "richTextEditor";
|
|
316
319
|
|
|
317
|
-
// src/biz/
|
|
320
|
+
// src/biz/WorkItemFinder.ts
|
|
318
321
|
var _a13;
|
|
319
|
-
var
|
|
322
|
+
var WorkItemFinder = class extends BaseModel {
|
|
320
323
|
/**
|
|
321
324
|
* @internal
|
|
322
325
|
*/
|
|
@@ -328,10 +331,26 @@ _a13 = IMPL_KEY;
|
|
|
328
331
|
/**
|
|
329
332
|
* @internal
|
|
330
333
|
*/
|
|
331
|
-
|
|
334
|
+
WorkItemFinder[_a13] = "workItemFinder";
|
|
332
335
|
|
|
333
|
-
// src/
|
|
336
|
+
// src/biz/Utils.ts
|
|
334
337
|
var _a14;
|
|
338
|
+
var Utils = class extends BaseModel {
|
|
339
|
+
/**
|
|
340
|
+
* @internal
|
|
341
|
+
*/
|
|
342
|
+
static load() {
|
|
343
|
+
throw new Error("not implemented");
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
_a14 = IMPL_KEY;
|
|
347
|
+
/**
|
|
348
|
+
* @internal
|
|
349
|
+
*/
|
|
350
|
+
Utils[_a14] = "utils";
|
|
351
|
+
|
|
352
|
+
// src/features/ContainerModal.ts
|
|
353
|
+
var _a15;
|
|
335
354
|
var ContainerModal = class extends BaseModel {
|
|
336
355
|
/**
|
|
337
356
|
* 加载数据
|
|
@@ -340,14 +359,14 @@ var ContainerModal = class extends BaseModel {
|
|
|
340
359
|
throw new Error("not implemented");
|
|
341
360
|
}
|
|
342
361
|
};
|
|
343
|
-
|
|
362
|
+
_a15 = IMPL_KEY;
|
|
344
363
|
/**
|
|
345
364
|
* @internal
|
|
346
365
|
*/
|
|
347
|
-
ContainerModal[
|
|
366
|
+
ContainerModal[_a15] = "ContainerModal";
|
|
348
367
|
|
|
349
368
|
// src/features/Intercept.ts
|
|
350
|
-
var
|
|
369
|
+
var _a16;
|
|
351
370
|
var Intercept = class extends BaseModel {
|
|
352
371
|
/**
|
|
353
372
|
* 加载数据
|
|
@@ -356,14 +375,14 @@ var Intercept = class extends BaseModel {
|
|
|
356
375
|
throw new Error("not implemented");
|
|
357
376
|
}
|
|
358
377
|
};
|
|
359
|
-
|
|
378
|
+
_a16 = IMPL_KEY;
|
|
360
379
|
/**
|
|
361
380
|
* @internal
|
|
362
381
|
*/
|
|
363
|
-
Intercept[
|
|
382
|
+
Intercept[_a16] = "Intercept";
|
|
364
383
|
|
|
365
384
|
// src/features/Control.ts
|
|
366
|
-
var
|
|
385
|
+
var _a17;
|
|
367
386
|
var Control = class extends BaseModel {
|
|
368
387
|
/**
|
|
369
388
|
* 加载数据
|
|
@@ -372,11 +391,27 @@ var Control = class extends BaseModel {
|
|
|
372
391
|
throw new Error("not implemented");
|
|
373
392
|
}
|
|
374
393
|
};
|
|
375
|
-
|
|
394
|
+
_a17 = IMPL_KEY;
|
|
395
|
+
/**
|
|
396
|
+
* @internal
|
|
397
|
+
*/
|
|
398
|
+
Control[_a17] = "Control";
|
|
399
|
+
|
|
400
|
+
// src/features/Button.ts
|
|
401
|
+
var _a18;
|
|
402
|
+
var Button = class extends BaseModel {
|
|
403
|
+
/**
|
|
404
|
+
* 加载数据
|
|
405
|
+
*/
|
|
406
|
+
static load() {
|
|
407
|
+
throw new Error("not implemented");
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
_a18 = IMPL_KEY;
|
|
376
411
|
/**
|
|
377
412
|
* @internal
|
|
378
413
|
*/
|
|
379
|
-
|
|
414
|
+
Button[_a18] = "Button";
|
|
380
415
|
|
|
381
416
|
// src/client.ts
|
|
382
417
|
function getImplClass(decl, impls) {
|
|
@@ -400,6 +435,20 @@ var _SDKClient = class {
|
|
|
400
435
|
get intercept() {
|
|
401
436
|
return getImplValue(Intercept, this._meegoBizHub);
|
|
402
437
|
}
|
|
438
|
+
/**
|
|
439
|
+
* 控件点位容器特有能力
|
|
440
|
+
* only 2.0
|
|
441
|
+
*/
|
|
442
|
+
get control() {
|
|
443
|
+
return getImplValue(Control, this._meegoBizHub);
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* 按钮点位容器特有能力
|
|
447
|
+
* only 2.0
|
|
448
|
+
*/
|
|
449
|
+
get button() {
|
|
450
|
+
return getImplValue(Button, this._meegoBizHub);
|
|
451
|
+
}
|
|
403
452
|
/**
|
|
404
453
|
* 应用导航
|
|
405
454
|
*/
|
|
@@ -431,6 +480,13 @@ var _SDKClient = class {
|
|
|
431
480
|
get richTextEditor() {
|
|
432
481
|
return getImplValue(RichTextEditor, this._meegoBizHub);
|
|
433
482
|
}
|
|
483
|
+
/**
|
|
484
|
+
* 工作项实例筛选器
|
|
485
|
+
* only web 2.0
|
|
486
|
+
*/
|
|
487
|
+
get workItemFinder() {
|
|
488
|
+
return getImplValue(WorkItemFinder, this._meegoBizHub);
|
|
489
|
+
}
|
|
434
490
|
/**
|
|
435
491
|
* 模态框
|
|
436
492
|
*/
|
|
@@ -506,7 +562,7 @@ var SDKClient = _SDKClient;
|
|
|
506
562
|
/**
|
|
507
563
|
* SDK 版本号
|
|
508
564
|
*/
|
|
509
|
-
SDKClient.version = "2.0.1-
|
|
565
|
+
SDKClient.version = "2.0.1-dev.21";
|
|
510
566
|
|
|
511
567
|
// src/types/biz.ts
|
|
512
568
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -640,12 +696,24 @@ var InvalidParamsError = class extends CustomError {
|
|
|
640
696
|
}
|
|
641
697
|
};
|
|
642
698
|
|
|
699
|
+
// src/errors/NotSupportedError.ts
|
|
700
|
+
var NotSupportedError = class extends CustomError {
|
|
701
|
+
constructor(options) {
|
|
702
|
+
super({
|
|
703
|
+
message: "the api is not supported",
|
|
704
|
+
originMessage: options.originMessage
|
|
705
|
+
});
|
|
706
|
+
this.name = "NotSupportedError";
|
|
707
|
+
}
|
|
708
|
+
};
|
|
709
|
+
|
|
643
710
|
// src/index.ts
|
|
644
711
|
var src_default = SDKClient;
|
|
645
712
|
// Annotate the CommonJS export names for ESM import in node:
|
|
646
713
|
0 && (module.exports = {
|
|
647
714
|
ActionSheet,
|
|
648
715
|
AttributeType,
|
|
716
|
+
Button,
|
|
649
717
|
ButtonScene,
|
|
650
718
|
Clipboard,
|
|
651
719
|
ContainerModal,
|
|
@@ -665,6 +733,7 @@ var src_default = SDKClient;
|
|
|
665
733
|
NoAuthError,
|
|
666
734
|
NodeStatus,
|
|
667
735
|
NotFoundError,
|
|
736
|
+
NotSupportedError,
|
|
668
737
|
OutOfLimitError,
|
|
669
738
|
RichTextEditor,
|
|
670
739
|
SDKClient,
|
|
@@ -673,5 +742,6 @@ var src_default = SDKClient;
|
|
|
673
742
|
Toast,
|
|
674
743
|
Utils,
|
|
675
744
|
WorkItem,
|
|
745
|
+
WorkItemFinder,
|
|
676
746
|
WorkObject
|
|
677
747
|
});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -328,10 +328,10 @@ declare enum ButtonScene {
|
|
|
328
328
|
workItemNode = 4
|
|
329
329
|
}
|
|
330
330
|
/**
|
|
331
|
-
*
|
|
332
|
-
*
|
|
331
|
+
* 工作项实例按钮上下文
|
|
332
|
+
* 适用场景:工作项-更多 / 节点-更多 / 节点流转
|
|
333
333
|
*/
|
|
334
|
-
interface
|
|
334
|
+
interface WorkItemButtonFeatureContext {
|
|
335
335
|
/**
|
|
336
336
|
* 空间标识
|
|
337
337
|
*/
|
|
@@ -345,10 +345,24 @@ interface ButtonFeatureContext {
|
|
|
345
345
|
*/
|
|
346
346
|
workItemId: number;
|
|
347
347
|
/**
|
|
348
|
-
*
|
|
348
|
+
* 按钮所属节点标识
|
|
349
|
+
* 适用场景:节点-更多 / 节点流转
|
|
350
|
+
*/
|
|
351
|
+
nodeId?: string;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* 新建按钮上下文
|
|
355
|
+
*/
|
|
356
|
+
interface CreateButtonFeatureContext {
|
|
357
|
+
/**
|
|
358
|
+
* 空间标识
|
|
349
359
|
*/
|
|
350
|
-
|
|
360
|
+
spaceId: string;
|
|
351
361
|
}
|
|
362
|
+
/**
|
|
363
|
+
* 按钮构成
|
|
364
|
+
*/
|
|
365
|
+
type ButtonFeatureContext = WorkItemButtonFeatureContext | CreateButtonFeatureContext;
|
|
352
366
|
/**
|
|
353
367
|
* 内嵌页面构成
|
|
354
368
|
* 一个单独的导航入口+内嵌页面
|
|
@@ -461,9 +475,20 @@ interface InterceptFeatureContext<T> {
|
|
|
461
475
|
eventType: InterceptEvent;
|
|
462
476
|
workItems: Array<BriefWorkItem & {
|
|
463
477
|
/**
|
|
464
|
-
*
|
|
478
|
+
* 当前触发事件,不同事件类型对应不同的 changedValue
|
|
465
479
|
*/
|
|
466
|
-
changedValue?:
|
|
480
|
+
changedValue?: {
|
|
481
|
+
fieldInfo?: Array<{
|
|
482
|
+
fieldKey: string;
|
|
483
|
+
fieldType?: string;
|
|
484
|
+
alias?: string;
|
|
485
|
+
beforeFieldValue?: unknown;
|
|
486
|
+
afterFieldValue?: unknown;
|
|
487
|
+
}>;
|
|
488
|
+
nodeInfo?: any;
|
|
489
|
+
subTaskInfo?: any;
|
|
490
|
+
transitionInfo?: any;
|
|
491
|
+
};
|
|
467
492
|
}>;
|
|
468
493
|
customData: T;
|
|
469
494
|
}
|
|
@@ -545,6 +570,12 @@ declare abstract class Context extends BaseModel {
|
|
|
545
570
|
* @param callback
|
|
546
571
|
*/
|
|
547
572
|
abstract watch(callback: (nextValue: Context) => void): unwatch;
|
|
573
|
+
/**
|
|
574
|
+
* only web 2.0
|
|
575
|
+
* 用于获取插件内设置的上下文数据
|
|
576
|
+
* 例如:在 sdk.modal.open 时传入的 context,可以通过该方法来获取
|
|
577
|
+
*/
|
|
578
|
+
abstract getCustomContext<Context>(): Promise<Context>;
|
|
548
579
|
}
|
|
549
580
|
|
|
550
581
|
/**
|
|
@@ -982,9 +1013,9 @@ declare abstract class ActionSheet extends BaseModel {
|
|
|
982
1013
|
}
|
|
983
1014
|
|
|
984
1015
|
/**
|
|
985
|
-
* Modal 展示配置
|
|
1016
|
+
* Modal confirm 展示配置
|
|
986
1017
|
*/
|
|
987
|
-
interface
|
|
1018
|
+
interface ModalConfirmOptions {
|
|
988
1019
|
/**
|
|
989
1020
|
* 标题
|
|
990
1021
|
* title 和 content 不可同时为空
|
|
@@ -1011,6 +1042,40 @@ interface ModalOptions {
|
|
|
1011
1042
|
*/
|
|
1012
1043
|
cancelText?: string;
|
|
1013
1044
|
}
|
|
1045
|
+
/**
|
|
1046
|
+
* Modal 展示配置
|
|
1047
|
+
*/
|
|
1048
|
+
interface ModalOptions<Context> {
|
|
1049
|
+
/**
|
|
1050
|
+
* 宽度
|
|
1051
|
+
* 默认: 448
|
|
1052
|
+
*/
|
|
1053
|
+
width?: number;
|
|
1054
|
+
/**
|
|
1055
|
+
* 高度
|
|
1056
|
+
*/
|
|
1057
|
+
height?: number;
|
|
1058
|
+
/**
|
|
1059
|
+
* 是否全屏
|
|
1060
|
+
* 全屏时 width / height 无效
|
|
1061
|
+
*/
|
|
1062
|
+
fullScreen?: boolean;
|
|
1063
|
+
/**
|
|
1064
|
+
* 是否允许通过点击遮罩来关闭对话框
|
|
1065
|
+
*/
|
|
1066
|
+
maskClosable?: boolean;
|
|
1067
|
+
/**
|
|
1068
|
+
* 传入 Modal 内的上下文数据
|
|
1069
|
+
* 注:传入的数据在 Modal 内是通过 sdk.containerModal.getContext() 来获取的
|
|
1070
|
+
*/
|
|
1071
|
+
context?: Context;
|
|
1072
|
+
/**
|
|
1073
|
+
* 响应弹窗内调用的 sdk.containerModal.submit 方法
|
|
1074
|
+
* @param params 弹窗内调用的 sdk.containerModal.submit 的方法时传入的自定义参数
|
|
1075
|
+
* @returns 调用 sdk.containerModal.submit 返回的自定义值
|
|
1076
|
+
*/
|
|
1077
|
+
onSubmit?: (params: unknown) => Promise<unknown>;
|
|
1078
|
+
}
|
|
1014
1079
|
/**
|
|
1015
1080
|
* @public
|
|
1016
1081
|
* Modal 用于等待用户响应、告知用户重要信息或在不丢失上下文的情况下展示更多信息
|
|
@@ -1025,16 +1090,25 @@ declare abstract class Modal extends BaseModel {
|
|
|
1025
1090
|
*/
|
|
1026
1091
|
private static load;
|
|
1027
1092
|
/**
|
|
1028
|
-
*
|
|
1093
|
+
* 使用模态框 confirm
|
|
1029
1094
|
* @param options
|
|
1030
1095
|
* @param callback
|
|
1031
1096
|
* confirmed 点击了确认
|
|
1032
1097
|
* canceled 点击了取消
|
|
1033
1098
|
*/
|
|
1034
|
-
abstract
|
|
1099
|
+
abstract confirm(options: string | ModalConfirmOptions, callback: (result: {
|
|
1035
1100
|
confirmed: boolean;
|
|
1036
1101
|
canceled: boolean;
|
|
1037
1102
|
}) => void): Promise<void>;
|
|
1103
|
+
/**
|
|
1104
|
+
* only web 2.0
|
|
1105
|
+
* 打开自定义内容的模态框
|
|
1106
|
+
* @param options
|
|
1107
|
+
* @returns 当前打开 Modal 的关闭方法
|
|
1108
|
+
*/
|
|
1109
|
+
abstract open<Context>(options: ModalOptions<Context>): Promise<{
|
|
1110
|
+
close: () => void;
|
|
1111
|
+
}>;
|
|
1038
1112
|
}
|
|
1039
1113
|
|
|
1040
1114
|
/**
|
|
@@ -1106,7 +1180,62 @@ declare abstract class RichTextEditor extends BaseModel {
|
|
|
1106
1180
|
abstract show(options: RichTextEditorOptions, callback: (result: {
|
|
1107
1181
|
confirmed: boolean;
|
|
1108
1182
|
canceled: boolean;
|
|
1109
|
-
|
|
1183
|
+
nextValue?: RichTextEditorContent;
|
|
1184
|
+
}) => void): Promise<void>;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* WorkItemFinder 配置
|
|
1189
|
+
*/
|
|
1190
|
+
interface WorkItemFinderOptions {
|
|
1191
|
+
/**
|
|
1192
|
+
* 空间标识
|
|
1193
|
+
*/
|
|
1194
|
+
spaceId: string;
|
|
1195
|
+
/**
|
|
1196
|
+
* 工作项类型标识
|
|
1197
|
+
*/
|
|
1198
|
+
workObjectId: string;
|
|
1199
|
+
/**
|
|
1200
|
+
* 筛选器标题,仅用于展示
|
|
1201
|
+
*/
|
|
1202
|
+
title?: string;
|
|
1203
|
+
/**
|
|
1204
|
+
* 搜索条件标识
|
|
1205
|
+
* 如为空则生成新 key,不为空则会覆写
|
|
1206
|
+
* searchId 与 workObjectId | spaceId 不匹配则会异常
|
|
1207
|
+
*/
|
|
1208
|
+
searchId?: string;
|
|
1209
|
+
/**
|
|
1210
|
+
* 默认 true,控制 searchId 的筛选条件是否回填到筛选器
|
|
1211
|
+
*/
|
|
1212
|
+
backfill?: boolean;
|
|
1213
|
+
}
|
|
1214
|
+
/**
|
|
1215
|
+
* @public
|
|
1216
|
+
* WorkItemFinder 用于生成工作项实例筛选条件的面板
|
|
1217
|
+
*/
|
|
1218
|
+
declare abstract class WorkItemFinder extends BaseModel {
|
|
1219
|
+
/**
|
|
1220
|
+
* @internal
|
|
1221
|
+
*/
|
|
1222
|
+
protected static [IMPL_KEY]: string;
|
|
1223
|
+
/**
|
|
1224
|
+
* @internal
|
|
1225
|
+
*/
|
|
1226
|
+
private static load;
|
|
1227
|
+
/**
|
|
1228
|
+
* 打开工作项实例筛选条件面板
|
|
1229
|
+
* @param options
|
|
1230
|
+
* @param callback
|
|
1231
|
+
* confirmed 点击了确认
|
|
1232
|
+
* canceled 点击了取消
|
|
1233
|
+
* searchId 当点击确认时,返回筛选条件标识 searchId
|
|
1234
|
+
*/
|
|
1235
|
+
abstract open(options: WorkItemFinderOptions, callback: (result: {
|
|
1236
|
+
confirmed: boolean;
|
|
1237
|
+
canceled: boolean;
|
|
1238
|
+
searchId?: string;
|
|
1110
1239
|
}) => void): Promise<void>;
|
|
1111
1240
|
}
|
|
1112
1241
|
|
|
@@ -1156,10 +1285,16 @@ declare abstract class ContainerModal extends BaseModel {
|
|
|
1156
1285
|
* 加载数据
|
|
1157
1286
|
*/
|
|
1158
1287
|
static load(): Promise<ContainerModal>;
|
|
1288
|
+
/**
|
|
1289
|
+
* only web 2.0
|
|
1290
|
+
* 只存在于 modal.open 打开的容器内
|
|
1291
|
+
* submit 调用的是 sdk.modal.open 传入的 onSubmit 方法
|
|
1292
|
+
*/
|
|
1293
|
+
abstract submit?: <Params, Result>(params: Params) => Promise<Result>;
|
|
1159
1294
|
/**
|
|
1160
1295
|
* 关闭插件当前激活的容器模态框
|
|
1161
1296
|
*/
|
|
1162
|
-
abstract
|
|
1297
|
+
abstract close(): Promise<void>;
|
|
1163
1298
|
}
|
|
1164
1299
|
|
|
1165
1300
|
/**
|
|
@@ -1178,7 +1313,7 @@ declare abstract class Intercept extends BaseModel {
|
|
|
1178
1313
|
/**
|
|
1179
1314
|
* 获取当前触发的拦截事件上下文
|
|
1180
1315
|
*/
|
|
1181
|
-
abstract
|
|
1316
|
+
abstract getContext<T = any>(): Promise<InterceptFeatureContext<T>>;
|
|
1182
1317
|
}
|
|
1183
1318
|
|
|
1184
1319
|
/**
|
|
@@ -1200,6 +1335,25 @@ declare abstract class Control extends BaseModel {
|
|
|
1200
1335
|
abstract getContext(): Promise<ControlFeatureContext>;
|
|
1201
1336
|
}
|
|
1202
1337
|
|
|
1338
|
+
/**
|
|
1339
|
+
* @public
|
|
1340
|
+
* 按钮
|
|
1341
|
+
*/
|
|
1342
|
+
declare abstract class Button extends BaseModel {
|
|
1343
|
+
/**
|
|
1344
|
+
* @internal
|
|
1345
|
+
*/
|
|
1346
|
+
protected static [IMPL_KEY]: string;
|
|
1347
|
+
/**
|
|
1348
|
+
* 加载数据
|
|
1349
|
+
*/
|
|
1350
|
+
static load(): Promise<Button>;
|
|
1351
|
+
/**
|
|
1352
|
+
* 获取当前按钮的上下文
|
|
1353
|
+
*/
|
|
1354
|
+
abstract getContext(): Promise<ButtonFeatureContext>;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1203
1357
|
/**
|
|
1204
1358
|
* @public
|
|
1205
1359
|
* SDKClient 的配置项
|
|
@@ -1227,6 +1381,16 @@ declare class SDKClient {
|
|
|
1227
1381
|
* only 2.0
|
|
1228
1382
|
*/
|
|
1229
1383
|
get intercept(): Intercept;
|
|
1384
|
+
/**
|
|
1385
|
+
* 控件点位容器特有能力
|
|
1386
|
+
* only 2.0
|
|
1387
|
+
*/
|
|
1388
|
+
get control(): Control;
|
|
1389
|
+
/**
|
|
1390
|
+
* 按钮点位容器特有能力
|
|
1391
|
+
* only 2.0
|
|
1392
|
+
*/
|
|
1393
|
+
get button(): Button;
|
|
1230
1394
|
/**
|
|
1231
1395
|
* 应用导航
|
|
1232
1396
|
*/
|
|
@@ -1248,6 +1412,11 @@ declare class SDKClient {
|
|
|
1248
1412
|
* only 2.0
|
|
1249
1413
|
*/
|
|
1250
1414
|
get richTextEditor(): RichTextEditor;
|
|
1415
|
+
/**
|
|
1416
|
+
* 工作项实例筛选器
|
|
1417
|
+
* only web 2.0
|
|
1418
|
+
*/
|
|
1419
|
+
get workItemFinder(): WorkItemFinder;
|
|
1251
1420
|
/**
|
|
1252
1421
|
* 模态框
|
|
1253
1422
|
*/
|
|
@@ -1354,6 +1523,16 @@ declare class InvalidParamsError extends CustomError {
|
|
|
1354
1523
|
});
|
|
1355
1524
|
}
|
|
1356
1525
|
|
|
1526
|
+
/**
|
|
1527
|
+
* @public
|
|
1528
|
+
* API 在当前环境不支持
|
|
1529
|
+
*/
|
|
1530
|
+
declare class NotSupportedError extends CustomError {
|
|
1531
|
+
constructor(options: {
|
|
1532
|
+
originMessage: string;
|
|
1533
|
+
});
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1357
1536
|
/**
|
|
1358
1537
|
* 用于飞书项目插件读取系统数据的 JSSDK
|
|
1359
1538
|
*
|
|
@@ -1363,4 +1542,4 @@ declare class InvalidParamsError extends CustomError {
|
|
|
1363
1542
|
* @packageDocumentation
|
|
1364
1543
|
*/
|
|
1365
1544
|
|
|
1366
|
-
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,
|
|
1545
|
+
export { ActionSheet, ActionSheetOptions, AttributeType, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, ContainerModal, Context, Control, ControlFeatureContext, CreateButtonFeatureContext, Field, FieldType, FlowMode, IMPL_KEY, IPluginCustomBuildConfig, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, MEEGO_BIZ_HUB, Modal, ModalConfirmOptions, Navigation, NoAuthError, NodeStatus, NotFoundError, NotSupportedError, OutOfLimitError, PageFeatureContext, RichTextEditor, RichTextEditorContent, RichTextEditorOptions, Role, RoleOwners, SDKClient, SDKClientOptions, Space, Storage, TabFeatureContext, Toast, ToastOptions, User, Utils, ViewFeatureContext, WorkItem, WorkItemButtonFeatureContext, WorkItemCreateFormPreset, WorkItemFinder, WorkItemFinderOptions, WorkObject, SDKClient as default, unwatch };
|