@lark-project/js-sdk 2.0.11 → 2.0.12
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/dist/es/index.js +20 -14
- package/dist/lib/index.js +21 -16
- package/dist/types/index.d.ts +56 -46
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -440,15 +440,15 @@ _a24 = IMPL_KEY;
|
|
|
440
440
|
*/
|
|
441
441
|
CustomComponent[_a24] = "customComponent";
|
|
442
442
|
|
|
443
|
-
// src/features/
|
|
443
|
+
// src/features/CustomField.ts
|
|
444
444
|
var _a25;
|
|
445
|
-
var
|
|
445
|
+
var CustomField = class extends BaseModel {
|
|
446
446
|
};
|
|
447
447
|
_a25 = IMPL_KEY;
|
|
448
448
|
/**
|
|
449
449
|
* @internal
|
|
450
450
|
*/
|
|
451
|
-
|
|
451
|
+
CustomField[_a25] = "exField";
|
|
452
452
|
|
|
453
453
|
// src/client.ts
|
|
454
454
|
function getImplClass(decl, impls) {
|
|
@@ -514,6 +514,21 @@ var _SDKClient = class {
|
|
|
514
514
|
get view() {
|
|
515
515
|
return getImplValue(View, this._meegoBizHub);
|
|
516
516
|
}
|
|
517
|
+
/**
|
|
518
|
+
* 组件点位容器特有能力
|
|
519
|
+
* 现有组件:节点排期 schedule
|
|
520
|
+
* only 2.0
|
|
521
|
+
*/
|
|
522
|
+
get customComponent() {
|
|
523
|
+
return getImplValue(CustomComponent, this._meegoBizHub);
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* 实例字段点位容器特有能力
|
|
527
|
+
* only 2.0
|
|
528
|
+
*/
|
|
529
|
+
get customField() {
|
|
530
|
+
return getImplValue(CustomField, this._meegoBizHub);
|
|
531
|
+
}
|
|
517
532
|
/**
|
|
518
533
|
* 应用导航
|
|
519
534
|
*/
|
|
@@ -634,7 +649,7 @@ var SDKClient = _SDKClient;
|
|
|
634
649
|
/**
|
|
635
650
|
* SDK 版本号
|
|
636
651
|
*/
|
|
637
|
-
SDKClient.version = "2.0.
|
|
652
|
+
SDKClient.version = "2.0.12";
|
|
638
653
|
|
|
639
654
|
// src/types/biz.ts
|
|
640
655
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -715,14 +730,6 @@ var CustomComponentType = /* @__PURE__ */ ((CustomComponentType2) => {
|
|
|
715
730
|
CustomComponentType2["Schedule"] = "schedule";
|
|
716
731
|
return CustomComponentType2;
|
|
717
732
|
})(CustomComponentType || {});
|
|
718
|
-
var SubFieldType = /* @__PURE__ */ ((SubFieldType2) => {
|
|
719
|
-
SubFieldType2["FieldNumber"] = "number";
|
|
720
|
-
SubFieldType2["FieldMultiText"] = "text";
|
|
721
|
-
SubFieldType2["FieldTreeSelect"] = "tree-multi-select";
|
|
722
|
-
SubFieldType2["FieldDatePrecise"] = "date";
|
|
723
|
-
SubFieldType2["FieldMultiUser"] = "multi-user";
|
|
724
|
-
return SubFieldType2;
|
|
725
|
-
})(SubFieldType || {});
|
|
726
733
|
|
|
727
734
|
// src/errors/CustomError.ts
|
|
728
735
|
var CustomError = class extends Error {
|
|
@@ -825,7 +832,7 @@ export {
|
|
|
825
832
|
Control,
|
|
826
833
|
CustomComponent,
|
|
827
834
|
CustomComponentType,
|
|
828
|
-
|
|
835
|
+
CustomField,
|
|
829
836
|
Field,
|
|
830
837
|
FieldType,
|
|
831
838
|
FlowMode,
|
|
@@ -848,7 +855,6 @@ export {
|
|
|
848
855
|
Shared,
|
|
849
856
|
Space,
|
|
850
857
|
Storage,
|
|
851
|
-
SubFieldType,
|
|
852
858
|
Tab,
|
|
853
859
|
Toast,
|
|
854
860
|
Utils,
|
package/dist/lib/index.js
CHANGED
|
@@ -60,7 +60,7 @@ __export(src_exports, {
|
|
|
60
60
|
Control: () => Control,
|
|
61
61
|
CustomComponent: () => CustomComponent,
|
|
62
62
|
CustomComponentType: () => CustomComponentType,
|
|
63
|
-
|
|
63
|
+
CustomField: () => CustomField,
|
|
64
64
|
Field: () => Field,
|
|
65
65
|
FieldType: () => FieldType,
|
|
66
66
|
FlowMode: () => FlowMode,
|
|
@@ -83,7 +83,6 @@ __export(src_exports, {
|
|
|
83
83
|
Shared: () => Shared,
|
|
84
84
|
Space: () => Space,
|
|
85
85
|
Storage: () => Storage,
|
|
86
|
-
SubFieldType: () => SubFieldType,
|
|
87
86
|
Tab: () => Tab,
|
|
88
87
|
Toast: () => Toast,
|
|
89
88
|
Utils: () => Utils,
|
|
@@ -507,15 +506,15 @@ _a24 = IMPL_KEY;
|
|
|
507
506
|
*/
|
|
508
507
|
CustomComponent[_a24] = "customComponent";
|
|
509
508
|
|
|
510
|
-
// src/features/
|
|
509
|
+
// src/features/CustomField.ts
|
|
511
510
|
var _a25;
|
|
512
|
-
var
|
|
511
|
+
var CustomField = class extends BaseModel {
|
|
513
512
|
};
|
|
514
513
|
_a25 = IMPL_KEY;
|
|
515
514
|
/**
|
|
516
515
|
* @internal
|
|
517
516
|
*/
|
|
518
|
-
|
|
517
|
+
CustomField[_a25] = "exField";
|
|
519
518
|
|
|
520
519
|
// src/client.ts
|
|
521
520
|
function getImplClass(decl, impls) {
|
|
@@ -581,6 +580,21 @@ var _SDKClient = class {
|
|
|
581
580
|
get view() {
|
|
582
581
|
return getImplValue(View, this._meegoBizHub);
|
|
583
582
|
}
|
|
583
|
+
/**
|
|
584
|
+
* 组件点位容器特有能力
|
|
585
|
+
* 现有组件:节点排期 schedule
|
|
586
|
+
* only 2.0
|
|
587
|
+
*/
|
|
588
|
+
get customComponent() {
|
|
589
|
+
return getImplValue(CustomComponent, this._meegoBizHub);
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* 实例字段点位容器特有能力
|
|
593
|
+
* only 2.0
|
|
594
|
+
*/
|
|
595
|
+
get customField() {
|
|
596
|
+
return getImplValue(CustomField, this._meegoBizHub);
|
|
597
|
+
}
|
|
584
598
|
/**
|
|
585
599
|
* 应用导航
|
|
586
600
|
*/
|
|
@@ -701,7 +715,7 @@ var SDKClient = _SDKClient;
|
|
|
701
715
|
/**
|
|
702
716
|
* SDK 版本号
|
|
703
717
|
*/
|
|
704
|
-
SDKClient.version = "2.0.
|
|
718
|
+
SDKClient.version = "2.0.12";
|
|
705
719
|
|
|
706
720
|
// src/types/biz.ts
|
|
707
721
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -782,14 +796,6 @@ var CustomComponentType = /* @__PURE__ */ ((CustomComponentType2) => {
|
|
|
782
796
|
CustomComponentType2["Schedule"] = "schedule";
|
|
783
797
|
return CustomComponentType2;
|
|
784
798
|
})(CustomComponentType || {});
|
|
785
|
-
var SubFieldType = /* @__PURE__ */ ((SubFieldType2) => {
|
|
786
|
-
SubFieldType2["FieldNumber"] = "number";
|
|
787
|
-
SubFieldType2["FieldMultiText"] = "text";
|
|
788
|
-
SubFieldType2["FieldTreeSelect"] = "tree-multi-select";
|
|
789
|
-
SubFieldType2["FieldDatePrecise"] = "date";
|
|
790
|
-
SubFieldType2["FieldMultiUser"] = "multi-user";
|
|
791
|
-
return SubFieldType2;
|
|
792
|
-
})(SubFieldType || {});
|
|
793
799
|
|
|
794
800
|
// src/errors/CustomError.ts
|
|
795
801
|
var CustomError = class extends Error {
|
|
@@ -893,7 +899,7 @@ var src_default = SDKClient;
|
|
|
893
899
|
Control,
|
|
894
900
|
CustomComponent,
|
|
895
901
|
CustomComponentType,
|
|
896
|
-
|
|
902
|
+
CustomField,
|
|
897
903
|
Field,
|
|
898
904
|
FieldType,
|
|
899
905
|
FlowMode,
|
|
@@ -916,7 +922,6 @@ var src_default = SDKClient;
|
|
|
916
922
|
Shared,
|
|
917
923
|
Space,
|
|
918
924
|
Storage,
|
|
919
|
-
SubFieldType,
|
|
920
925
|
Tab,
|
|
921
926
|
Toast,
|
|
922
927
|
Utils,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -698,7 +698,7 @@ interface CustomComponentProps {
|
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
700
|
/** ----------------------- 拓展字段构成类型 ----------------------- */
|
|
701
|
-
interface
|
|
701
|
+
interface CustomFieldFeatureContext {
|
|
702
702
|
/**
|
|
703
703
|
* 拓展字段当前所属空间标识
|
|
704
704
|
*/
|
|
@@ -731,55 +731,54 @@ interface ExCompoundFieldValueType {
|
|
|
731
731
|
value?: FieldValue;
|
|
732
732
|
}[][];
|
|
733
733
|
}
|
|
734
|
-
type
|
|
735
|
-
interface
|
|
736
|
-
value:
|
|
734
|
+
type CustomFieldValueType = ExCompoundFieldValueType;
|
|
735
|
+
interface CustomFieldProps {
|
|
736
|
+
value: CustomFieldValueType;
|
|
737
737
|
disabled?: boolean;
|
|
738
738
|
}
|
|
739
|
-
interface
|
|
739
|
+
interface CustomFieldConfig {
|
|
740
740
|
key: string;
|
|
741
|
-
type:
|
|
741
|
+
type: FieldType.compoundField | SubFieldType;
|
|
742
742
|
name: string;
|
|
743
|
-
children?:
|
|
743
|
+
children?: CustomFieldConfig[];
|
|
744
744
|
}
|
|
745
|
-
interface
|
|
745
|
+
interface CustomFieldValidateMsg {
|
|
746
746
|
/**
|
|
747
747
|
* code 为 200 时 msg 按照正常成功数据返回外
|
|
748
|
-
* 401 |
|
|
748
|
+
* 401 | 402 | 403 | 404 | 405 | 406 按照 InvalidParams 类型异常返回,可以通过该异常的 errCode、errMsg 属性查看具体出错原因
|
|
749
749
|
* 其余执行过程异常按照 InternalError 异常抛出
|
|
750
750
|
* 具体的 code 和对应的 msg 信息及解释可参考开发者手册的详细介绍
|
|
751
751
|
*/
|
|
752
|
-
code: 200 | 401 |
|
|
752
|
+
code: 200 | 401 | 402 | 403 | 404 | 405 | 406;
|
|
753
753
|
msg: string;
|
|
754
754
|
}
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
}
|
|
755
|
+
type SubFieldType =
|
|
756
|
+
/**
|
|
757
|
+
* 数字类型
|
|
758
|
+
*/
|
|
759
|
+
FieldType.number
|
|
760
|
+
/**
|
|
761
|
+
* 多行文本
|
|
762
|
+
* 字段类型为 text
|
|
763
|
+
* 在字段模型中和单行文本字段的区别为 multi = true
|
|
764
|
+
*/
|
|
765
|
+
| FieldType.text
|
|
766
|
+
/**
|
|
767
|
+
* 级联多选
|
|
768
|
+
* 如果写入不存在的选项可能导致接口报错/提示
|
|
769
|
+
*/
|
|
770
|
+
| FieldType.treeMultiSelect
|
|
771
|
+
/**
|
|
772
|
+
* 时间+日期
|
|
773
|
+
* 字段类型为 date
|
|
774
|
+
* 在字段模型中和普通日期字段的区别是本时间精确度为 "YYYY-MM-DD HH:mm:ss"(普通为 YYYY-MM-DD)
|
|
775
|
+
*/
|
|
776
|
+
| FieldType.date
|
|
777
|
+
/**
|
|
778
|
+
* 多选人员
|
|
779
|
+
* 如果写入不存在的人员可能导致接口报错/提示
|
|
780
|
+
*/
|
|
781
|
+
| FieldType.multiUser;
|
|
783
782
|
/**
|
|
784
783
|
* 构成弹窗配置
|
|
785
784
|
*/
|
|
@@ -1942,13 +1941,13 @@ declare abstract class CustomComponent extends BaseModel {
|
|
|
1942
1941
|
* @public
|
|
1943
1942
|
* 自定义组件构成
|
|
1944
1943
|
*/
|
|
1945
|
-
declare abstract class
|
|
1944
|
+
declare abstract class CustomField extends BaseModel {
|
|
1946
1945
|
/**
|
|
1947
1946
|
* @internal
|
|
1948
1947
|
*/
|
|
1949
1948
|
protected static [IMPL_KEY]: string;
|
|
1950
|
-
abstract getContext: () => Promise<
|
|
1951
|
-
abstract getProps: () => Promise<
|
|
1949
|
+
abstract getContext: () => Promise<CustomFieldFeatureContext>;
|
|
1950
|
+
abstract getProps: () => Promise<CustomFieldProps>;
|
|
1952
1951
|
/**
|
|
1953
1952
|
* only for form
|
|
1954
1953
|
* 用于监听 props 变更
|
|
@@ -1956,9 +1955,9 @@ declare abstract class ExField extends BaseModel {
|
|
|
1956
1955
|
* @param watchKeys 监听的 key,只能监听属性的 key(不能监听 api key),不传默认监听所有 key。监听的 key 对应的值变更会触发回调
|
|
1957
1956
|
* @returns
|
|
1958
1957
|
*/
|
|
1959
|
-
abstract watch: (callback: (next:
|
|
1960
|
-
abstract saveFieldValue: (value:
|
|
1961
|
-
abstract getFieldConfig: () => Promise<
|
|
1958
|
+
abstract watch: (callback: (next: CustomFieldProps | Record<string, never>) => void, watchKeys?: (keyof CustomFieldProps)[]) => Promise<Off>;
|
|
1959
|
+
abstract saveFieldValue: (value: CustomFieldValueType) => Promise<CustomFieldValidateMsg>;
|
|
1960
|
+
abstract getFieldConfig: () => Promise<CustomFieldConfig>;
|
|
1962
1961
|
/**
|
|
1963
1962
|
* 获取新建工作项表单项的值
|
|
1964
1963
|
* mobile version ≥ 7.29.0
|
|
@@ -1987,7 +1986,7 @@ declare abstract class ExField extends BaseModel {
|
|
|
1987
1986
|
* only web for table
|
|
1988
1987
|
* 打开全屏插件
|
|
1989
1988
|
*/
|
|
1990
|
-
abstract getTableCellInitProps(): Promise<
|
|
1989
|
+
abstract getTableCellInitProps(): Promise<CustomFieldProps>;
|
|
1991
1990
|
/**
|
|
1992
1991
|
* only mobile 7.35.0+
|
|
1993
1992
|
* 获取插件的展示态信息
|
|
@@ -2059,6 +2058,17 @@ declare class SDKClient {
|
|
|
2059
2058
|
* only 2.0
|
|
2060
2059
|
*/
|
|
2061
2060
|
get view(): View;
|
|
2061
|
+
/**
|
|
2062
|
+
* 组件点位容器特有能力
|
|
2063
|
+
* 现有组件:节点排期 schedule
|
|
2064
|
+
* only 2.0
|
|
2065
|
+
*/
|
|
2066
|
+
get customComponent(): CustomComponent;
|
|
2067
|
+
/**
|
|
2068
|
+
* 实例字段点位容器特有能力
|
|
2069
|
+
* only 2.0
|
|
2070
|
+
*/
|
|
2071
|
+
get customField(): CustomField;
|
|
2062
2072
|
/**
|
|
2063
2073
|
* 应用导航
|
|
2064
2074
|
*/
|
|
@@ -2218,4 +2228,4 @@ declare class NotSupportedError extends CustomError {
|
|
|
2218
2228
|
* @packageDocumentation
|
|
2219
2229
|
*/
|
|
2220
2230
|
|
|
2221
|
-
export { ActionSheet, ActionSheetOptions, AttributeType, BatchButtonFeatureContext, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, ComponentScheduleIdentity, ComponentScheduleScene, Configuration, ConfigurationFeatureContext, ContainerModal, ContainerModalConfigureOptions, Context, Control, ControlFeatureContext, CreateButtonFeatureContext, CustomComponent, CustomComponentFeatureContext, CustomComponentProps, CustomComponentType,
|
|
2231
|
+
export { ActionSheet, ActionSheetOptions, AttributeType, BatchButtonFeatureContext, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, 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, 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 };
|