@lark-project/js-sdk 2.0.16-alpha.5 → 2.0.16-dev.builder.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 +0 -3
- package/dist/es/index.js +46 -30
- package/dist/lib/index.js +48 -31
- package/dist/types/index.d.ts +189 -65
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/es/index.js
CHANGED
|
@@ -398,18 +398,8 @@ _a21 = IMPL_KEY;
|
|
|
398
398
|
*/
|
|
399
399
|
Page[_a21] = "page";
|
|
400
400
|
|
|
401
|
-
// src/features/Script.ts
|
|
402
|
-
var _a22;
|
|
403
|
-
var Script = class extends BaseModel {
|
|
404
|
-
};
|
|
405
|
-
_a22 = IMPL_KEY;
|
|
406
|
-
/**
|
|
407
|
-
* @internal
|
|
408
|
-
*/
|
|
409
|
-
Script[_a22] = "script";
|
|
410
|
-
|
|
411
401
|
// src/features/Tab.ts
|
|
412
|
-
var
|
|
402
|
+
var _a22;
|
|
413
403
|
var Tab = class extends BaseModel {
|
|
414
404
|
/**
|
|
415
405
|
* 加载数据
|
|
@@ -418,14 +408,14 @@ var Tab = class extends BaseModel {
|
|
|
418
408
|
throw new Error("not implemented");
|
|
419
409
|
}
|
|
420
410
|
};
|
|
421
|
-
|
|
411
|
+
_a22 = IMPL_KEY;
|
|
422
412
|
/**
|
|
423
413
|
* @internal
|
|
424
414
|
*/
|
|
425
|
-
Tab[
|
|
415
|
+
Tab[_a22] = "tab";
|
|
426
416
|
|
|
427
417
|
// src/features/View.ts
|
|
428
|
-
var
|
|
418
|
+
var _a23;
|
|
429
419
|
var View = class extends BaseModel {
|
|
430
420
|
/**
|
|
431
421
|
* 加载数据
|
|
@@ -434,31 +424,41 @@ var View = class extends BaseModel {
|
|
|
434
424
|
throw new Error("not implemented");
|
|
435
425
|
}
|
|
436
426
|
};
|
|
437
|
-
|
|
427
|
+
_a23 = IMPL_KEY;
|
|
438
428
|
/**
|
|
439
429
|
* @internal
|
|
440
430
|
*/
|
|
441
|
-
View[
|
|
431
|
+
View[_a23] = "view";
|
|
442
432
|
|
|
443
433
|
// src/features/CustomComponent.ts
|
|
444
|
-
var
|
|
434
|
+
var _a24;
|
|
445
435
|
var CustomComponent = class extends BaseModel {
|
|
446
436
|
};
|
|
447
|
-
|
|
437
|
+
_a24 = IMPL_KEY;
|
|
448
438
|
/**
|
|
449
439
|
* @internal
|
|
450
440
|
*/
|
|
451
|
-
CustomComponent[
|
|
441
|
+
CustomComponent[_a24] = "customComponent";
|
|
452
442
|
|
|
453
443
|
// src/features/CustomField.ts
|
|
454
|
-
var
|
|
444
|
+
var _a25;
|
|
455
445
|
var CustomField = class extends BaseModel {
|
|
456
446
|
};
|
|
447
|
+
_a25 = IMPL_KEY;
|
|
448
|
+
/**
|
|
449
|
+
* @internal
|
|
450
|
+
*/
|
|
451
|
+
CustomField[_a25] = "customField";
|
|
452
|
+
|
|
453
|
+
// src/features/BuilderComponent.ts
|
|
454
|
+
var _a26;
|
|
455
|
+
var BuilderComponent = class extends BaseModel {
|
|
456
|
+
};
|
|
457
457
|
_a26 = IMPL_KEY;
|
|
458
458
|
/**
|
|
459
459
|
* @internal
|
|
460
460
|
*/
|
|
461
|
-
|
|
461
|
+
BuilderComponent[_a26] = "builderComp";
|
|
462
462
|
|
|
463
463
|
// src/client.ts
|
|
464
464
|
function getImplClass(decl, impls) {
|
|
@@ -496,13 +496,6 @@ var _SDKClient = class {
|
|
|
496
496
|
get button() {
|
|
497
497
|
return getImplValue(Button, this._meegoBizHub);
|
|
498
498
|
}
|
|
499
|
-
/**
|
|
500
|
-
* 脚本容器特有能力
|
|
501
|
-
* only 2.0
|
|
502
|
-
*/
|
|
503
|
-
get script() {
|
|
504
|
-
return getImplValue(Script, this._meegoBizHub);
|
|
505
|
-
}
|
|
506
499
|
/**
|
|
507
500
|
* 配置点位容器特有能力
|
|
508
501
|
* only 2.0
|
|
@@ -546,6 +539,13 @@ var _SDKClient = class {
|
|
|
546
539
|
get customField() {
|
|
547
540
|
return getImplValue(CustomField, this._meegoBizHub);
|
|
548
541
|
}
|
|
542
|
+
/**
|
|
543
|
+
* 应用主页组件点位容器特有能力
|
|
544
|
+
* only 2.0
|
|
545
|
+
*/
|
|
546
|
+
get builderComponent() {
|
|
547
|
+
return getImplValue(BuilderComponent, this._meegoBizHub);
|
|
548
|
+
}
|
|
549
549
|
/**
|
|
550
550
|
* 应用导航
|
|
551
551
|
*/
|
|
@@ -666,7 +666,7 @@ var SDKClient = _SDKClient;
|
|
|
666
666
|
/**
|
|
667
667
|
* SDK 版本号
|
|
668
668
|
*/
|
|
669
|
-
SDKClient.version = "2.0.16-
|
|
669
|
+
SDKClient.version = "2.0.16-dev.builder.1";
|
|
670
670
|
|
|
671
671
|
// src/types/biz.ts
|
|
672
672
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -747,6 +747,21 @@ var CustomComponentType = /* @__PURE__ */ ((CustomComponentType2) => {
|
|
|
747
747
|
CustomComponentType2["Schedule"] = "schedule";
|
|
748
748
|
return CustomComponentType2;
|
|
749
749
|
})(CustomComponentType || {});
|
|
750
|
+
var BuilderPropTemplateType = /* @__PURE__ */ ((BuilderPropTemplateType2) => {
|
|
751
|
+
BuilderPropTemplateType2["Text"] = "text";
|
|
752
|
+
BuilderPropTemplateType2["Number"] = "number";
|
|
753
|
+
BuilderPropTemplateType2["Select"] = "select";
|
|
754
|
+
BuilderPropTemplateType2["Boolean"] = "boolean";
|
|
755
|
+
BuilderPropTemplateType2["MultiSelect"] = "multiSelect";
|
|
756
|
+
BuilderPropTemplateType2["DatePrecise"] = "dateWithTime";
|
|
757
|
+
BuilderPropTemplateType2["DateRange"] = "dateRange";
|
|
758
|
+
BuilderPropTemplateType2["WorkItemInstance"] = "workItemInstance";
|
|
759
|
+
BuilderPropTemplateType2["WorkItemTypeSelect"] = "workItemTypeSelect";
|
|
760
|
+
BuilderPropTemplateType2["ViewSelect"] = "viewSelect";
|
|
761
|
+
BuilderPropTemplateType2["workItemInstanceWithField"] = "workItemInstanceWithField";
|
|
762
|
+
BuilderPropTemplateType2["workItemTypeWithField"] = "workItemTypeWithField";
|
|
763
|
+
return BuilderPropTemplateType2;
|
|
764
|
+
})(BuilderPropTemplateType || {});
|
|
750
765
|
|
|
751
766
|
// src/errors/CustomError.ts
|
|
752
767
|
var CustomError = class extends Error {
|
|
@@ -839,6 +854,8 @@ var src_default = SDKClient;
|
|
|
839
854
|
export {
|
|
840
855
|
ActionSheet,
|
|
841
856
|
AttributeType,
|
|
857
|
+
BuilderComponent,
|
|
858
|
+
BuilderPropTemplateType,
|
|
842
859
|
Button,
|
|
843
860
|
ButtonScene,
|
|
844
861
|
Clipboard,
|
|
@@ -869,7 +886,6 @@ export {
|
|
|
869
886
|
Page,
|
|
870
887
|
RichTextEditor,
|
|
871
888
|
SDKClient,
|
|
872
|
-
Script,
|
|
873
889
|
Shared,
|
|
874
890
|
Space,
|
|
875
891
|
Storage,
|
package/dist/lib/index.js
CHANGED
|
@@ -50,6 +50,8 @@ var src_exports = {};
|
|
|
50
50
|
__export(src_exports, {
|
|
51
51
|
ActionSheet: () => ActionSheet,
|
|
52
52
|
AttributeType: () => AttributeType,
|
|
53
|
+
BuilderComponent: () => BuilderComponent,
|
|
54
|
+
BuilderPropTemplateType: () => BuilderPropTemplateType,
|
|
53
55
|
Button: () => Button,
|
|
54
56
|
ButtonScene: () => ButtonScene,
|
|
55
57
|
Clipboard: () => Clipboard,
|
|
@@ -80,7 +82,6 @@ __export(src_exports, {
|
|
|
80
82
|
Page: () => Page,
|
|
81
83
|
RichTextEditor: () => RichTextEditor,
|
|
82
84
|
SDKClient: () => SDKClient,
|
|
83
|
-
Script: () => Script,
|
|
84
85
|
Shared: () => Shared,
|
|
85
86
|
Space: () => Space,
|
|
86
87
|
Storage: () => Storage,
|
|
@@ -465,18 +466,8 @@ _a21 = IMPL_KEY;
|
|
|
465
466
|
*/
|
|
466
467
|
Page[_a21] = "page";
|
|
467
468
|
|
|
468
|
-
// src/features/Script.ts
|
|
469
|
-
var _a22;
|
|
470
|
-
var Script = class extends BaseModel {
|
|
471
|
-
};
|
|
472
|
-
_a22 = IMPL_KEY;
|
|
473
|
-
/**
|
|
474
|
-
* @internal
|
|
475
|
-
*/
|
|
476
|
-
Script[_a22] = "script";
|
|
477
|
-
|
|
478
469
|
// src/features/Tab.ts
|
|
479
|
-
var
|
|
470
|
+
var _a22;
|
|
480
471
|
var Tab = class extends BaseModel {
|
|
481
472
|
/**
|
|
482
473
|
* 加载数据
|
|
@@ -485,14 +476,14 @@ var Tab = class extends BaseModel {
|
|
|
485
476
|
throw new Error("not implemented");
|
|
486
477
|
}
|
|
487
478
|
};
|
|
488
|
-
|
|
479
|
+
_a22 = IMPL_KEY;
|
|
489
480
|
/**
|
|
490
481
|
* @internal
|
|
491
482
|
*/
|
|
492
|
-
Tab[
|
|
483
|
+
Tab[_a22] = "tab";
|
|
493
484
|
|
|
494
485
|
// src/features/View.ts
|
|
495
|
-
var
|
|
486
|
+
var _a23;
|
|
496
487
|
var View = class extends BaseModel {
|
|
497
488
|
/**
|
|
498
489
|
* 加载数据
|
|
@@ -501,31 +492,41 @@ var View = class extends BaseModel {
|
|
|
501
492
|
throw new Error("not implemented");
|
|
502
493
|
}
|
|
503
494
|
};
|
|
504
|
-
|
|
495
|
+
_a23 = IMPL_KEY;
|
|
505
496
|
/**
|
|
506
497
|
* @internal
|
|
507
498
|
*/
|
|
508
|
-
View[
|
|
499
|
+
View[_a23] = "view";
|
|
509
500
|
|
|
510
501
|
// src/features/CustomComponent.ts
|
|
511
|
-
var
|
|
502
|
+
var _a24;
|
|
512
503
|
var CustomComponent = class extends BaseModel {
|
|
513
504
|
};
|
|
514
|
-
|
|
505
|
+
_a24 = IMPL_KEY;
|
|
515
506
|
/**
|
|
516
507
|
* @internal
|
|
517
508
|
*/
|
|
518
|
-
CustomComponent[
|
|
509
|
+
CustomComponent[_a24] = "customComponent";
|
|
519
510
|
|
|
520
511
|
// src/features/CustomField.ts
|
|
521
|
-
var
|
|
512
|
+
var _a25;
|
|
522
513
|
var CustomField = class extends BaseModel {
|
|
523
514
|
};
|
|
515
|
+
_a25 = IMPL_KEY;
|
|
516
|
+
/**
|
|
517
|
+
* @internal
|
|
518
|
+
*/
|
|
519
|
+
CustomField[_a25] = "customField";
|
|
520
|
+
|
|
521
|
+
// src/features/BuilderComponent.ts
|
|
522
|
+
var _a26;
|
|
523
|
+
var BuilderComponent = class extends BaseModel {
|
|
524
|
+
};
|
|
524
525
|
_a26 = IMPL_KEY;
|
|
525
526
|
/**
|
|
526
527
|
* @internal
|
|
527
528
|
*/
|
|
528
|
-
|
|
529
|
+
BuilderComponent[_a26] = "builderComp";
|
|
529
530
|
|
|
530
531
|
// src/client.ts
|
|
531
532
|
function getImplClass(decl, impls) {
|
|
@@ -563,13 +564,6 @@ var _SDKClient = class {
|
|
|
563
564
|
get button() {
|
|
564
565
|
return getImplValue(Button, this._meegoBizHub);
|
|
565
566
|
}
|
|
566
|
-
/**
|
|
567
|
-
* 脚本容器特有能力
|
|
568
|
-
* only 2.0
|
|
569
|
-
*/
|
|
570
|
-
get script() {
|
|
571
|
-
return getImplValue(Script, this._meegoBizHub);
|
|
572
|
-
}
|
|
573
567
|
/**
|
|
574
568
|
* 配置点位容器特有能力
|
|
575
569
|
* only 2.0
|
|
@@ -613,6 +607,13 @@ var _SDKClient = class {
|
|
|
613
607
|
get customField() {
|
|
614
608
|
return getImplValue(CustomField, this._meegoBizHub);
|
|
615
609
|
}
|
|
610
|
+
/**
|
|
611
|
+
* 应用主页组件点位容器特有能力
|
|
612
|
+
* only 2.0
|
|
613
|
+
*/
|
|
614
|
+
get builderComponent() {
|
|
615
|
+
return getImplValue(BuilderComponent, this._meegoBizHub);
|
|
616
|
+
}
|
|
616
617
|
/**
|
|
617
618
|
* 应用导航
|
|
618
619
|
*/
|
|
@@ -733,7 +734,7 @@ var SDKClient = _SDKClient;
|
|
|
733
734
|
/**
|
|
734
735
|
* SDK 版本号
|
|
735
736
|
*/
|
|
736
|
-
SDKClient.version = "2.0.16-
|
|
737
|
+
SDKClient.version = "2.0.16-dev.builder.1";
|
|
737
738
|
|
|
738
739
|
// src/types/biz.ts
|
|
739
740
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -814,6 +815,21 @@ var CustomComponentType = /* @__PURE__ */ ((CustomComponentType2) => {
|
|
|
814
815
|
CustomComponentType2["Schedule"] = "schedule";
|
|
815
816
|
return CustomComponentType2;
|
|
816
817
|
})(CustomComponentType || {});
|
|
818
|
+
var BuilderPropTemplateType = /* @__PURE__ */ ((BuilderPropTemplateType2) => {
|
|
819
|
+
BuilderPropTemplateType2["Text"] = "text";
|
|
820
|
+
BuilderPropTemplateType2["Number"] = "number";
|
|
821
|
+
BuilderPropTemplateType2["Select"] = "select";
|
|
822
|
+
BuilderPropTemplateType2["Boolean"] = "boolean";
|
|
823
|
+
BuilderPropTemplateType2["MultiSelect"] = "multiSelect";
|
|
824
|
+
BuilderPropTemplateType2["DatePrecise"] = "dateWithTime";
|
|
825
|
+
BuilderPropTemplateType2["DateRange"] = "dateRange";
|
|
826
|
+
BuilderPropTemplateType2["WorkItemInstance"] = "workItemInstance";
|
|
827
|
+
BuilderPropTemplateType2["WorkItemTypeSelect"] = "workItemTypeSelect";
|
|
828
|
+
BuilderPropTemplateType2["ViewSelect"] = "viewSelect";
|
|
829
|
+
BuilderPropTemplateType2["workItemInstanceWithField"] = "workItemInstanceWithField";
|
|
830
|
+
BuilderPropTemplateType2["workItemTypeWithField"] = "workItemTypeWithField";
|
|
831
|
+
return BuilderPropTemplateType2;
|
|
832
|
+
})(BuilderPropTemplateType || {});
|
|
817
833
|
|
|
818
834
|
// src/errors/CustomError.ts
|
|
819
835
|
var CustomError = class extends Error {
|
|
@@ -907,6 +923,8 @@ var src_default = SDKClient;
|
|
|
907
923
|
0 && (module.exports = {
|
|
908
924
|
ActionSheet,
|
|
909
925
|
AttributeType,
|
|
926
|
+
BuilderComponent,
|
|
927
|
+
BuilderPropTemplateType,
|
|
910
928
|
Button,
|
|
911
929
|
ButtonScene,
|
|
912
930
|
Clipboard,
|
|
@@ -937,7 +955,6 @@ var src_default = SDKClient;
|
|
|
937
955
|
Page,
|
|
938
956
|
RichTextEditor,
|
|
939
957
|
SDKClient,
|
|
940
|
-
Script,
|
|
941
958
|
Shared,
|
|
942
959
|
Space,
|
|
943
960
|
Storage,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -448,38 +448,6 @@ interface BatchButtonFeatureContext {
|
|
|
448
448
|
* 按钮构成
|
|
449
449
|
*/
|
|
450
450
|
type ButtonFeatureContext = WorkItemButtonFeatureContext | CreateButtonFeatureContext | BatchButtonFeatureContext | ScheduleUnitButtonFeatureContext;
|
|
451
|
-
/**
|
|
452
|
-
* 脚本构成
|
|
453
|
-
*/
|
|
454
|
-
type ScriptFeatureContext = ButtonFeatureContext;
|
|
455
|
-
/**
|
|
456
|
-
* 按钮弹窗配置
|
|
457
|
-
*/
|
|
458
|
-
interface ButtonModalOpenOptions<Context> {
|
|
459
|
-
/**
|
|
460
|
-
* 标题
|
|
461
|
-
*/
|
|
462
|
-
title?: string;
|
|
463
|
-
/**
|
|
464
|
-
* 初始宽度
|
|
465
|
-
* 默认: 448
|
|
466
|
-
*/
|
|
467
|
-
width?: number;
|
|
468
|
-
/**
|
|
469
|
-
* 初始高度
|
|
470
|
-
* 默认: 400
|
|
471
|
-
*/
|
|
472
|
-
height?: number;
|
|
473
|
-
/**
|
|
474
|
-
* 传入 ButtonModal 内的上下文数据
|
|
475
|
-
* 注:传入的数据在 ButtonModal 内是通过 sdk.Context.load().getCustomContext() 来获取的
|
|
476
|
-
*/
|
|
477
|
-
context?: Context;
|
|
478
|
-
/**
|
|
479
|
-
* 指定 ButtonModal 内容的代码入口,即在入口文件中导出的模块名
|
|
480
|
-
*/
|
|
481
|
-
entry?: string;
|
|
482
|
-
}
|
|
483
451
|
/**
|
|
484
452
|
* 内嵌页面构成
|
|
485
453
|
* 一个单独的导航入口+内嵌页面
|
|
@@ -829,6 +797,131 @@ interface ContainerModalConfigureOptions {
|
|
|
829
797
|
content: string;
|
|
830
798
|
};
|
|
831
799
|
}
|
|
800
|
+
/** ----------------------- builder 组件构成类型 ----------------------- */
|
|
801
|
+
interface BuilderComponentFeatureContext {
|
|
802
|
+
/**
|
|
803
|
+
* builder 组件当前所属空间标识
|
|
804
|
+
*/
|
|
805
|
+
spaceId: string;
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* builder 组件属性值类型
|
|
809
|
+
*/
|
|
810
|
+
type BuilderPropLayout = {
|
|
811
|
+
width: number;
|
|
812
|
+
height: number;
|
|
813
|
+
positionX: number;
|
|
814
|
+
positionY: number;
|
|
815
|
+
};
|
|
816
|
+
declare enum BuilderPropTemplateType {
|
|
817
|
+
Text = "text",
|
|
818
|
+
Number = "number",
|
|
819
|
+
Select = "select",
|
|
820
|
+
Boolean = "boolean",
|
|
821
|
+
MultiSelect = "multiSelect",
|
|
822
|
+
DatePrecise = "dateWithTime",
|
|
823
|
+
DateRange = "dateRange",
|
|
824
|
+
WorkItemInstance = "workItemInstance",
|
|
825
|
+
WorkItemTypeSelect = "workItemTypeSelect",
|
|
826
|
+
ViewSelect = "viewSelect",
|
|
827
|
+
workItemInstanceWithField = "workItemInstanceWithField",
|
|
828
|
+
workItemTypeWithField = "workItemTypeWithField"
|
|
829
|
+
}
|
|
830
|
+
type BuilderPropText = string;
|
|
831
|
+
type BuilderPropNumber = number;
|
|
832
|
+
type BuilderPropSelect = string;
|
|
833
|
+
type BuilderPropBoolean = boolean;
|
|
834
|
+
type BuilderPropMultiSelect = string[];
|
|
835
|
+
type BuilderPropDateWithTime = number;
|
|
836
|
+
type BuilderPropDateRange = {
|
|
837
|
+
start: number;
|
|
838
|
+
end: number;
|
|
839
|
+
};
|
|
840
|
+
type BuilderPropWorkItemType = {
|
|
841
|
+
spaceId: string;
|
|
842
|
+
workObjectId: string;
|
|
843
|
+
};
|
|
844
|
+
type BuilderPropWorkItemInstance = {
|
|
845
|
+
spaceId: string;
|
|
846
|
+
workObjectId: string;
|
|
847
|
+
workItemId: number;
|
|
848
|
+
};
|
|
849
|
+
type BuilderPropField = {
|
|
850
|
+
spaceId: string;
|
|
851
|
+
workObjectId: string;
|
|
852
|
+
fieldClass: 'field' | 'role';
|
|
853
|
+
fieldKey: string;
|
|
854
|
+
roleId: string;
|
|
855
|
+
};
|
|
856
|
+
type BuilderPropWorkItemTypeWithField = BuilderPropWorkItemType & {
|
|
857
|
+
fieldList: BuilderPropField[];
|
|
858
|
+
};
|
|
859
|
+
type BuilderPropWorkItemInsWithField = BuilderPropWorkItemInstance & {
|
|
860
|
+
fieldList: BuilderPropField[];
|
|
861
|
+
};
|
|
862
|
+
type BuilderPropView = {
|
|
863
|
+
viewId: string;
|
|
864
|
+
};
|
|
865
|
+
type BuilderPropWorkItemListAfterFilter = BuilderPropWorkItemInstance[];
|
|
866
|
+
type BuilderPropWorkItemListAfterSort = BuilderPropWorkItemInstance[];
|
|
867
|
+
type BuilderCompPropValueType = BuilderPropText | BuilderPropNumber | BuilderPropSelect | BuilderPropBoolean | BuilderPropMultiSelect | BuilderPropDateWithTime | BuilderPropDateRange | BuilderPropWorkItemType | BuilderPropWorkItemInstance | BuilderPropWorkItemTypeWithField | BuilderPropWorkItemInsWithField | BuilderPropView | BuilderPropWorkItemListAfterFilter | BuilderPropWorkItemListAfterSort;
|
|
868
|
+
/**
|
|
869
|
+
* builder 组件不同的属性类型对应的可读配置
|
|
870
|
+
*/
|
|
871
|
+
type I18nTitleConfig = {
|
|
872
|
+
zh?: string;
|
|
873
|
+
en?: string;
|
|
874
|
+
ja?: string;
|
|
875
|
+
raw?: string;
|
|
876
|
+
};
|
|
877
|
+
type BuilderCompPropSelectConfig = {
|
|
878
|
+
title: I18nTitleConfig;
|
|
879
|
+
propType: BuilderPropTemplateType.Select | BuilderPropTemplateType.MultiSelect;
|
|
880
|
+
options: {
|
|
881
|
+
label: I18nTitleConfig;
|
|
882
|
+
value: string;
|
|
883
|
+
}[];
|
|
884
|
+
};
|
|
885
|
+
type BuilderCompPropBriefConfig = {
|
|
886
|
+
title: I18nTitleConfig;
|
|
887
|
+
propType: BuilderPropTemplateType;
|
|
888
|
+
};
|
|
889
|
+
type BuilderCompPropFullConfig = BuilderCompPropBriefConfig | BuilderCompPropSelectConfig;
|
|
890
|
+
/**
|
|
891
|
+
* builder 组件入参定义
|
|
892
|
+
*/
|
|
893
|
+
type BuilderComponentProps = {
|
|
894
|
+
instanceId: string;
|
|
895
|
+
layout?: BuilderPropLayout;
|
|
896
|
+
} & {
|
|
897
|
+
[propName: string]: BuilderCompPropValueType;
|
|
898
|
+
};
|
|
899
|
+
type BuilderCompLayoutConfig =
|
|
900
|
+
/** 定高模式 */
|
|
901
|
+
{
|
|
902
|
+
mode: 0;
|
|
903
|
+
staticHeight: number;
|
|
904
|
+
}
|
|
905
|
+
/** 栅格模式 */
|
|
906
|
+
| {
|
|
907
|
+
mode: 1;
|
|
908
|
+
minWidth: number;
|
|
909
|
+
minHeight: number;
|
|
910
|
+
maxWidth: number;
|
|
911
|
+
maxHeight: number;
|
|
912
|
+
};
|
|
913
|
+
type BuilderComponentConfig = {
|
|
914
|
+
id: string;
|
|
915
|
+
layout: BuilderCompLayoutConfig;
|
|
916
|
+
} & {
|
|
917
|
+
[keyOfProp: string]: BuilderCompPropBriefConfig;
|
|
918
|
+
};
|
|
919
|
+
interface BuilderComponentPreset {
|
|
920
|
+
layout?: {
|
|
921
|
+
width: number;
|
|
922
|
+
height: number;
|
|
923
|
+
};
|
|
924
|
+
}
|
|
832
925
|
|
|
833
926
|
/**
|
|
834
927
|
* @internal
|
|
@@ -1453,7 +1546,7 @@ interface ModalOpenOptions<Context> {
|
|
|
1453
1546
|
maskClosable?: boolean;
|
|
1454
1547
|
/**
|
|
1455
1548
|
* 传入 Modal 内的上下文数据
|
|
1456
|
-
* 注:传入的数据在 Modal 内是通过 sdk.
|
|
1549
|
+
* 注:传入的数据在 Modal 内是通过 sdk.containerModal.getContext() 来获取的
|
|
1457
1550
|
*/
|
|
1458
1551
|
context?: Context;
|
|
1459
1552
|
/**
|
|
@@ -1530,6 +1623,10 @@ interface RichTextEditorOptions {
|
|
|
1530
1623
|
/**
|
|
1531
1624
|
* 额外的上下文
|
|
1532
1625
|
*/
|
|
1626
|
+
/**
|
|
1627
|
+
* 进入编辑时是否自动获取焦点
|
|
1628
|
+
*/
|
|
1629
|
+
autoFocus?: boolean;
|
|
1533
1630
|
context: {
|
|
1534
1631
|
/**
|
|
1535
1632
|
* 空间 id
|
|
@@ -1900,32 +1997,6 @@ declare abstract class Page extends BaseModel {
|
|
|
1900
1997
|
abstract getContext(): Promise<PageFeatureContext>;
|
|
1901
1998
|
}
|
|
1902
1999
|
|
|
1903
|
-
/**
|
|
1904
|
-
* @public
|
|
1905
|
-
* 脚本
|
|
1906
|
-
*/
|
|
1907
|
-
declare abstract class Script extends BaseModel {
|
|
1908
|
-
/**
|
|
1909
|
-
* @internal
|
|
1910
|
-
*/
|
|
1911
|
-
protected static [IMPL_KEY]: string;
|
|
1912
|
-
/**
|
|
1913
|
-
* only web 2.0
|
|
1914
|
-
* 获取当前脚本运行环境的上下文
|
|
1915
|
-
*/
|
|
1916
|
-
abstract getContext(): Promise<ScriptFeatureContext>;
|
|
1917
|
-
/**
|
|
1918
|
-
* only web 2.0
|
|
1919
|
-
*
|
|
1920
|
-
*/
|
|
1921
|
-
abstract openButtonModal<Context>(options: ButtonModalOpenOptions<Context>): Promise<void>;
|
|
1922
|
-
/**
|
|
1923
|
-
* only web 2.0
|
|
1924
|
-
* 主动停止脚本执行
|
|
1925
|
-
*/
|
|
1926
|
-
abstract end(): Promise<void>;
|
|
1927
|
-
}
|
|
1928
|
-
|
|
1929
2000
|
/**
|
|
1930
2001
|
* @public
|
|
1931
2002
|
* 详情页
|
|
@@ -2067,6 +2138,59 @@ declare abstract class CustomField extends BaseModel {
|
|
|
2067
2138
|
abstract openFullScreenPlugin(): void;
|
|
2068
2139
|
}
|
|
2069
2140
|
|
|
2141
|
+
/**
|
|
2142
|
+
* @public
|
|
2143
|
+
* 自定义组件构成
|
|
2144
|
+
*/
|
|
2145
|
+
declare abstract class BuilderComponent extends BaseModel {
|
|
2146
|
+
/**
|
|
2147
|
+
* @internal
|
|
2148
|
+
*/
|
|
2149
|
+
protected static [IMPL_KEY]: string;
|
|
2150
|
+
/**
|
|
2151
|
+
* 获取 builder 组件上下文信息
|
|
2152
|
+
*/
|
|
2153
|
+
abstract getContext: () => Promise<BuilderComponentFeatureContext>;
|
|
2154
|
+
/**
|
|
2155
|
+
* 获取 builder 组件入参
|
|
2156
|
+
* 每个 builder 组件一共有 3种数据:
|
|
2157
|
+
* * 组件实例数据(流入的属性值、组件当前的系统属性值)
|
|
2158
|
+
* * 组件配置数据(属于开发者后台的配置,用于描述组件所具有的属性)
|
|
2159
|
+
* * 组件预设值/默认值(属于开发者后台配置,只不过用于给组件提供默认值)
|
|
2160
|
+
* getProps 获取的即第一种数据 - 组件实例数据:
|
|
2161
|
+
* * 系统内置的所有组件通用属性值
|
|
2162
|
+
* * 开发者后台申明的组件入参特化属性值
|
|
2163
|
+
* 不同类型属性的数据结构可参考 JSSDK 包中的类型定义或开发者手册
|
|
2164
|
+
*/
|
|
2165
|
+
abstract getProps: () => Promise<BuilderComponentProps>;
|
|
2166
|
+
/**
|
|
2167
|
+
* 用于监听 props 变更
|
|
2168
|
+
* @param callback 返回组件新的 props
|
|
2169
|
+
* @param watchKeys 监听的 key,只能监听属性的 key(不能监听 api key),不传默认监听所有 key。监听的 key 对应的值变更会触发回调
|
|
2170
|
+
* @returns
|
|
2171
|
+
*/
|
|
2172
|
+
abstract watch: (callback: (next: BuilderComponentProps | Record<string, never>) => void, watchKeys?: keyof BuilderComponentProps | (keyof BuilderComponentProps)[]) => Promise<Off>;
|
|
2173
|
+
/**
|
|
2174
|
+
* 获取 builder 组件配置:
|
|
2175
|
+
* - 名称
|
|
2176
|
+
* - icon 地址
|
|
2177
|
+
* - layout
|
|
2178
|
+
* - 属性对应的配置
|
|
2179
|
+
*/
|
|
2180
|
+
abstract getConfig: (propKeys?: string | string[]) => Promise<BuilderComponentConfig>;
|
|
2181
|
+
/**
|
|
2182
|
+
* 根据属性 key 点查属性的完整配置
|
|
2183
|
+
* - 单选多选类型的选项列表
|
|
2184
|
+
*/
|
|
2185
|
+
abstract getPropFullConfig: (propKey: string) => Promise<BuilderCompPropFullConfig>;
|
|
2186
|
+
/**
|
|
2187
|
+
* 获取 builder 组件预设值:
|
|
2188
|
+
* - layout
|
|
2189
|
+
* 暂时不支持指定多组预设值/指定预设id(统一走 default),未来视诉求开放
|
|
2190
|
+
*/
|
|
2191
|
+
abstract getPreset: (propKeys?: string[]) => Promise<BuilderComponentPreset>;
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2070
2194
|
/**
|
|
2071
2195
|
* @public
|
|
2072
2196
|
* SDKClient 的配置项
|
|
@@ -2104,11 +2228,6 @@ declare class SDKClient {
|
|
|
2104
2228
|
* only 2.0
|
|
2105
2229
|
*/
|
|
2106
2230
|
get button(): Button;
|
|
2107
|
-
/**
|
|
2108
|
-
* 脚本容器特有能力
|
|
2109
|
-
* only 2.0
|
|
2110
|
-
*/
|
|
2111
|
-
get script(): Script;
|
|
2112
2231
|
/**
|
|
2113
2232
|
* 配置点位容器特有能力
|
|
2114
2233
|
* only 2.0
|
|
@@ -2140,6 +2259,11 @@ declare class SDKClient {
|
|
|
2140
2259
|
* only 2.0
|
|
2141
2260
|
*/
|
|
2142
2261
|
get customField(): CustomField;
|
|
2262
|
+
/**
|
|
2263
|
+
* 应用主页组件点位容器特有能力
|
|
2264
|
+
* only 2.0
|
|
2265
|
+
*/
|
|
2266
|
+
get builderComponent(): BuilderComponent;
|
|
2143
2267
|
/**
|
|
2144
2268
|
* 应用导航
|
|
2145
2269
|
*/
|
|
@@ -2299,4 +2423,4 @@ declare class NotSupportedError extends CustomError {
|
|
|
2299
2423
|
* @packageDocumentation
|
|
2300
2424
|
*/
|
|
2301
2425
|
|
|
2302
|
-
export { ActionSheet, ActionSheetOptions, AttributeType, BatchButtonFeatureContext, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, Button, ButtonFeatureContext,
|
|
2426
|
+
export { ActionSheet, ActionSheetOptions, AttributeType, BatchButtonFeatureContext, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, BuilderCompLayoutConfig, BuilderCompPropBriefConfig, BuilderCompPropFullConfig, BuilderCompPropSelectConfig, BuilderCompPropValueType, BuilderComponent, BuilderComponentConfig, BuilderComponentFeatureContext, BuilderComponentPreset, BuilderComponentProps, BuilderPropBoolean, BuilderPropDateRange, BuilderPropDateWithTime, BuilderPropField, BuilderPropLayout, BuilderPropMultiSelect, BuilderPropNumber, BuilderPropSelect, BuilderPropTemplateType, BuilderPropText, BuilderPropView, BuilderPropWorkItemInsWithField, BuilderPropWorkItemInstance, BuilderPropWorkItemListAfterFilter, BuilderPropWorkItemListAfterSort, BuilderPropWorkItemType, BuilderPropWorkItemTypeWithField, 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, I18nTitleConfig, IMPL_KEY, IPluginCustomBuildConfig, IRichTextEditorImageUploadComplete, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, 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, Shared, Space, Storage, SubFieldType, Tab, TabFeatureContext, Toast, ToastOptions, User, UserInfo, Utils, View, ViewFeatureContext, WbsStatus, WorkItem, WorkItemButtonFeatureContext, WorkItemCreateFormPreset, WorkItemFinder, WorkItemFinderOptions, WorkObject, SDKClient as default, unwatch };
|