@lark-project/js-sdk 2.0.4-dev.4 → 2.0.6-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/dist/es/index.js +1 -24
- package/dist/lib/index.js +1 -27
- package/dist/types/index.d.ts +12 -140
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/es/index.js
CHANGED
|
@@ -430,16 +430,6 @@ _a23 = IMPL_KEY;
|
|
|
430
430
|
*/
|
|
431
431
|
View[_a23] = "view";
|
|
432
432
|
|
|
433
|
-
// src/features/CustomComponent.ts
|
|
434
|
-
var _a24;
|
|
435
|
-
var CustomComponent = class extends BaseModel {
|
|
436
|
-
};
|
|
437
|
-
_a24 = IMPL_KEY;
|
|
438
|
-
/**
|
|
439
|
-
* @internal
|
|
440
|
-
*/
|
|
441
|
-
CustomComponent[_a24] = "customComponent";
|
|
442
|
-
|
|
443
433
|
// src/client.ts
|
|
444
434
|
function getImplClass(decl, impls) {
|
|
445
435
|
return impls == null ? void 0 : impls[decl[IMPL_KEY]];
|
|
@@ -624,7 +614,7 @@ var SDKClient = _SDKClient;
|
|
|
624
614
|
/**
|
|
625
615
|
* SDK 版本号
|
|
626
616
|
*/
|
|
627
|
-
SDKClient.version = "2.0.
|
|
617
|
+
SDKClient.version = "2.0.6-dev.0";
|
|
628
618
|
|
|
629
619
|
// src/types/biz.ts
|
|
630
620
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -695,16 +685,6 @@ var InterceptEvent = /* @__PURE__ */ ((InterceptEvent2) => {
|
|
|
695
685
|
InterceptEvent2[InterceptEvent2["UpdateState"] = 3001] = "UpdateState";
|
|
696
686
|
return InterceptEvent2;
|
|
697
687
|
})(InterceptEvent || {});
|
|
698
|
-
var ComponentScheduleScene = /* @__PURE__ */ ((ComponentScheduleScene2) => {
|
|
699
|
-
ComponentScheduleScene2[ComponentScheduleScene2["ALL"] = 0] = "ALL";
|
|
700
|
-
ComponentScheduleScene2[ComponentScheduleScene2["workItemNode"] = 1] = "workItemNode";
|
|
701
|
-
ComponentScheduleScene2[ComponentScheduleScene2["scheduleTable"] = 2] = "scheduleTable";
|
|
702
|
-
return ComponentScheduleScene2;
|
|
703
|
-
})(ComponentScheduleScene || {});
|
|
704
|
-
var CustomComponentType = /* @__PURE__ */ ((CustomComponentType2) => {
|
|
705
|
-
CustomComponentType2["Schedule"] = "schedule";
|
|
706
|
-
return CustomComponentType2;
|
|
707
|
-
})(CustomComponentType || {});
|
|
708
688
|
|
|
709
689
|
// src/errors/CustomError.ts
|
|
710
690
|
var CustomError = class extends Error {
|
|
@@ -788,13 +768,10 @@ export {
|
|
|
788
768
|
Button,
|
|
789
769
|
ButtonScene,
|
|
790
770
|
Clipboard,
|
|
791
|
-
ComponentScheduleScene,
|
|
792
771
|
Configuration,
|
|
793
772
|
ContainerModal,
|
|
794
773
|
Context,
|
|
795
774
|
Control,
|
|
796
|
-
CustomComponent,
|
|
797
|
-
CustomComponentType,
|
|
798
775
|
Field,
|
|
799
776
|
FieldType,
|
|
800
777
|
FlowMode,
|
package/dist/lib/index.js
CHANGED
|
@@ -53,13 +53,10 @@ __export(src_exports, {
|
|
|
53
53
|
Button: () => Button,
|
|
54
54
|
ButtonScene: () => ButtonScene,
|
|
55
55
|
Clipboard: () => Clipboard,
|
|
56
|
-
ComponentScheduleScene: () => ComponentScheduleScene,
|
|
57
56
|
Configuration: () => Configuration,
|
|
58
57
|
ContainerModal: () => ContainerModal,
|
|
59
58
|
Context: () => Context,
|
|
60
59
|
Control: () => Control,
|
|
61
|
-
CustomComponent: () => CustomComponent,
|
|
62
|
-
CustomComponentType: () => CustomComponentType,
|
|
63
60
|
Field: () => Field,
|
|
64
61
|
FieldType: () => FieldType,
|
|
65
62
|
FlowMode: () => FlowMode,
|
|
@@ -495,16 +492,6 @@ _a23 = IMPL_KEY;
|
|
|
495
492
|
*/
|
|
496
493
|
View[_a23] = "view";
|
|
497
494
|
|
|
498
|
-
// src/features/CustomComponent.ts
|
|
499
|
-
var _a24;
|
|
500
|
-
var CustomComponent = class extends BaseModel {
|
|
501
|
-
};
|
|
502
|
-
_a24 = IMPL_KEY;
|
|
503
|
-
/**
|
|
504
|
-
* @internal
|
|
505
|
-
*/
|
|
506
|
-
CustomComponent[_a24] = "customComponent";
|
|
507
|
-
|
|
508
495
|
// src/client.ts
|
|
509
496
|
function getImplClass(decl, impls) {
|
|
510
497
|
return impls == null ? void 0 : impls[decl[IMPL_KEY]];
|
|
@@ -689,7 +676,7 @@ var SDKClient = _SDKClient;
|
|
|
689
676
|
/**
|
|
690
677
|
* SDK 版本号
|
|
691
678
|
*/
|
|
692
|
-
SDKClient.version = "2.0.
|
|
679
|
+
SDKClient.version = "2.0.6-dev.0";
|
|
693
680
|
|
|
694
681
|
// src/types/biz.ts
|
|
695
682
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -760,16 +747,6 @@ var InterceptEvent = /* @__PURE__ */ ((InterceptEvent2) => {
|
|
|
760
747
|
InterceptEvent2[InterceptEvent2["UpdateState"] = 3001] = "UpdateState";
|
|
761
748
|
return InterceptEvent2;
|
|
762
749
|
})(InterceptEvent || {});
|
|
763
|
-
var ComponentScheduleScene = /* @__PURE__ */ ((ComponentScheduleScene2) => {
|
|
764
|
-
ComponentScheduleScene2[ComponentScheduleScene2["ALL"] = 0] = "ALL";
|
|
765
|
-
ComponentScheduleScene2[ComponentScheduleScene2["workItemNode"] = 1] = "workItemNode";
|
|
766
|
-
ComponentScheduleScene2[ComponentScheduleScene2["scheduleTable"] = 2] = "scheduleTable";
|
|
767
|
-
return ComponentScheduleScene2;
|
|
768
|
-
})(ComponentScheduleScene || {});
|
|
769
|
-
var CustomComponentType = /* @__PURE__ */ ((CustomComponentType2) => {
|
|
770
|
-
CustomComponentType2["Schedule"] = "schedule";
|
|
771
|
-
return CustomComponentType2;
|
|
772
|
-
})(CustomComponentType || {});
|
|
773
750
|
|
|
774
751
|
// src/errors/CustomError.ts
|
|
775
752
|
var CustomError = class extends Error {
|
|
@@ -854,13 +831,10 @@ var src_default = SDKClient;
|
|
|
854
831
|
Button,
|
|
855
832
|
ButtonScene,
|
|
856
833
|
Clipboard,
|
|
857
|
-
ComponentScheduleScene,
|
|
858
834
|
Configuration,
|
|
859
835
|
ContainerModal,
|
|
860
836
|
Context,
|
|
861
837
|
Control,
|
|
862
|
-
CustomComponent,
|
|
863
|
-
CustomComponentType,
|
|
864
838
|
Field,
|
|
865
839
|
FieldType,
|
|
866
840
|
FlowMode,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -15,6 +15,11 @@ interface User {
|
|
|
15
15
|
* 用户头像
|
|
16
16
|
*/
|
|
17
17
|
avatar: string;
|
|
18
|
+
/**
|
|
19
|
+
* 所属租户
|
|
20
|
+
* only web 2.0
|
|
21
|
+
*/
|
|
22
|
+
tenantId?: string;
|
|
18
23
|
}
|
|
19
24
|
/**
|
|
20
25
|
* @public
|
|
@@ -522,113 +527,6 @@ interface InterceptFeatureContext<T> {
|
|
|
522
527
|
}>;
|
|
523
528
|
customData: T;
|
|
524
529
|
}
|
|
525
|
-
/** ----------------------- 拓展组件-排期组件特化属性 ----------------------- */
|
|
526
|
-
/**
|
|
527
|
-
* 排期组件位置
|
|
528
|
-
*/
|
|
529
|
-
declare enum ComponentScheduleScene {
|
|
530
|
-
/**
|
|
531
|
-
* 全部
|
|
532
|
-
*/
|
|
533
|
-
ALL = 0,
|
|
534
|
-
/**
|
|
535
|
-
* 工作项节点/子任务
|
|
536
|
-
*/
|
|
537
|
-
workItemNode = 1,
|
|
538
|
-
/**
|
|
539
|
-
* 计划表
|
|
540
|
-
*/
|
|
541
|
-
scheduleTable = 2
|
|
542
|
-
}
|
|
543
|
-
declare enum WorkItemNodeType {
|
|
544
|
-
Node = "node",
|
|
545
|
-
SubTask = "sub_task",
|
|
546
|
-
SubWorkItem = "sub_workitem",
|
|
547
|
-
SuInstance = "sub_instance"
|
|
548
|
-
}
|
|
549
|
-
interface WorkItemInfo {
|
|
550
|
-
spaceId: string;
|
|
551
|
-
workObjectId: string;
|
|
552
|
-
workItemId: string;
|
|
553
|
-
}
|
|
554
|
-
type ComponentScheduleIdentity = WorkItemInfo & {
|
|
555
|
-
type: WorkItemNodeType;
|
|
556
|
-
nodeId: string;
|
|
557
|
-
taskId: string;
|
|
558
|
-
};
|
|
559
|
-
interface WbsStatus {
|
|
560
|
-
wbsStatus: string;
|
|
561
|
-
}
|
|
562
|
-
interface UserInfo {
|
|
563
|
-
role: string;
|
|
564
|
-
userName: string;
|
|
565
|
-
id: string;
|
|
566
|
-
}
|
|
567
|
-
type ScheduleCompValueType = string[];
|
|
568
|
-
/**
|
|
569
|
-
* schedule 组件类型校验返回值
|
|
570
|
-
*/
|
|
571
|
-
interface ScheduleCompValidateMsg {
|
|
572
|
-
code: 200 | number;
|
|
573
|
-
msg: string;
|
|
574
|
-
}
|
|
575
|
-
/** ----------------------- 拓展点位通用类型 ----------------------- */
|
|
576
|
-
/**
|
|
577
|
-
* 自定义组件构成
|
|
578
|
-
* 支持的定义组件类型
|
|
579
|
-
*/
|
|
580
|
-
declare enum CustomComponentType {
|
|
581
|
-
Schedule = "schedule"
|
|
582
|
-
}
|
|
583
|
-
/**
|
|
584
|
-
* 自定义组件构成
|
|
585
|
-
* 允许用户定制指定业务组件类型的UI
|
|
586
|
-
*/
|
|
587
|
-
interface CustomComponentFeatureContext<I extends {
|
|
588
|
-
/**
|
|
589
|
-
* 组件节点标识
|
|
590
|
-
* 适用场景:详情页为节点流时,且当前控件位于节点表单/计划表内,该字段才有数据
|
|
591
|
-
*/
|
|
592
|
-
nodeId?: string;
|
|
593
|
-
/**
|
|
594
|
-
* 组件子任务标识
|
|
595
|
-
* 适用场景:详情页为节点流时,且当前控件位于节点表单/计划表内,该字段才有数据
|
|
596
|
-
*/
|
|
597
|
-
taskId?: string;
|
|
598
|
-
}, S extends ComponentScheduleScene> {
|
|
599
|
-
/**
|
|
600
|
-
* 组件所处场景
|
|
601
|
-
*/
|
|
602
|
-
scene: S;
|
|
603
|
-
/**
|
|
604
|
-
* 组件当前所属空间标识
|
|
605
|
-
*/
|
|
606
|
-
spaceId: string;
|
|
607
|
-
/**
|
|
608
|
-
* 组件当前所属工作项类型标识
|
|
609
|
-
*/
|
|
610
|
-
workObjectId: string;
|
|
611
|
-
/**
|
|
612
|
-
* 组件当前所属工作项实例标识
|
|
613
|
-
* 新建页表单内该值为空
|
|
614
|
-
*/
|
|
615
|
-
workItemId?: number;
|
|
616
|
-
/**
|
|
617
|
-
* 组件唯一标识
|
|
618
|
-
* 组件所属节点的所属空间/工作项/工作项实例以及节点任务标识
|
|
619
|
-
*/
|
|
620
|
-
identity?: I;
|
|
621
|
-
}
|
|
622
|
-
/**
|
|
623
|
-
* 自定义组件构成
|
|
624
|
-
* 各业务组件类型拥有的 props
|
|
625
|
-
*/
|
|
626
|
-
interface CustomComponentProps {
|
|
627
|
-
[CustomComponentType.Schedule]: {
|
|
628
|
-
value: ScheduleCompValueType;
|
|
629
|
-
disabled?: boolean;
|
|
630
|
-
};
|
|
631
|
-
}
|
|
632
530
|
|
|
633
531
|
/**
|
|
634
532
|
* @internal
|
|
@@ -689,10 +587,6 @@ declare abstract class Context extends BaseModel {
|
|
|
689
587
|
* 当前登录用户信息
|
|
690
588
|
*/
|
|
691
589
|
abstract loginUser: User;
|
|
692
|
-
/**
|
|
693
|
-
* 主空间信息(左侧导航栏选中的空间)
|
|
694
|
-
*/
|
|
695
|
-
abstract mainSpace?: BriefSpace;
|
|
696
590
|
/**
|
|
697
591
|
* 当前打开的工作项(仅工作项详情页可用)
|
|
698
592
|
*/
|
|
@@ -1213,7 +1107,11 @@ interface ModalConfirmOptions {
|
|
|
1213
1107
|
/**
|
|
1214
1108
|
* Modal 展示配置
|
|
1215
1109
|
*/
|
|
1216
|
-
interface
|
|
1110
|
+
interface ModalOpenOptions<Context> {
|
|
1111
|
+
/**
|
|
1112
|
+
* 指定 modal 内容的代码入口,即在入口文件中导出的模块名
|
|
1113
|
+
*/
|
|
1114
|
+
entry: string;
|
|
1217
1115
|
/**
|
|
1218
1116
|
* 宽度
|
|
1219
1117
|
* 默认: 448
|
|
@@ -1273,7 +1171,7 @@ declare abstract class Modal extends BaseModel {
|
|
|
1273
1171
|
* @param options
|
|
1274
1172
|
* @returns 当前打开 Modal 的关闭方法
|
|
1275
1173
|
*/
|
|
1276
|
-
abstract open<Context>(options:
|
|
1174
|
+
abstract open<Context>(options: ModalOpenOptions<Context>): Promise<{
|
|
1277
1175
|
close: () => void;
|
|
1278
1176
|
}>;
|
|
1279
1177
|
}
|
|
@@ -1646,32 +1544,6 @@ declare abstract class View extends BaseModel {
|
|
|
1646
1544
|
abstract getContext(): Promise<ViewFeatureContext>;
|
|
1647
1545
|
}
|
|
1648
1546
|
|
|
1649
|
-
/**
|
|
1650
|
-
* @public
|
|
1651
|
-
* 自定义组件构成
|
|
1652
|
-
*/
|
|
1653
|
-
declare abstract class CustomComponent extends BaseModel {
|
|
1654
|
-
/**
|
|
1655
|
-
* @internal
|
|
1656
|
-
*/
|
|
1657
|
-
protected static [IMPL_KEY]: string;
|
|
1658
|
-
abstract [CustomComponentType.Schedule]: {
|
|
1659
|
-
getProps: () => Promise<CustomComponentProps[CustomComponentType.Schedule]>;
|
|
1660
|
-
/**
|
|
1661
|
-
* 用于监听 props 变更
|
|
1662
|
-
* @param callback 返回 schedule 组件新的 props
|
|
1663
|
-
* @param watchKeys 监听的 key,只能监听属性的 key(不能监听 api key),不传默认监听所有 key。监听的 key 对应的值变更会触发回调
|
|
1664
|
-
* @returns
|
|
1665
|
-
*/
|
|
1666
|
-
watch: (callback: (next: CustomComponentProps[CustomComponentType.Schedule]) => void, watchKeys?: (keyof CustomComponentProps[CustomComponentType.Schedule])[]) => Off;
|
|
1667
|
-
getContext: () => Promise<CustomComponentFeatureContext<ComponentScheduleIdentity, ComponentScheduleScene>>;
|
|
1668
|
-
resizeContainer: (width?: number, height?: number) => Promise<undefined>;
|
|
1669
|
-
getWbsStatus?: () => Promise<WbsStatus>;
|
|
1670
|
-
getOwnersInfo?: () => Promise<UserInfo[]>;
|
|
1671
|
-
handleSubmit: (value: ScheduleCompValueType) => Promise<ScheduleCompValidateMsg>;
|
|
1672
|
-
};
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
1547
|
/**
|
|
1676
1548
|
* @public
|
|
1677
1549
|
* SDKClient 的配置项
|
|
@@ -1885,4 +1757,4 @@ declare class NotSupportedError extends CustomError {
|
|
|
1885
1757
|
* @packageDocumentation
|
|
1886
1758
|
*/
|
|
1887
1759
|
|
|
1888
|
-
export { ActionSheet, ActionSheetOptions, AttributeType, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme,
|
|
1760
|
+
export { ActionSheet, ActionSheetOptions, AttributeType, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, Configuration, ConfigurationFeatureContext, ContainerModal, Context, Control, ControlFeatureContext, CreateButtonFeatureContext, Field, FieldType, FlowMode, IMPL_KEY, IPluginCustomBuildConfig, 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, Shared, Space, Storage, Tab, TabFeatureContext, Toast, ToastOptions, User, Utils, View, ViewFeatureContext, WorkItem, WorkItemButtonFeatureContext, WorkItemCreateFormPreset, WorkItemFinder, WorkItemFinderOptions, WorkObject, SDKClient as default, unwatch };
|