@lark-project/js-sdk 2.0.8 → 2.0.9-dev.2
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 +5 -14
- package/dist/lib/index.js +6 -16
- package/dist/types/index.d.ts +45 -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) {
|
|
@@ -634,7 +634,7 @@ var SDKClient = _SDKClient;
|
|
|
634
634
|
/**
|
|
635
635
|
* SDK 版本号
|
|
636
636
|
*/
|
|
637
|
-
SDKClient.version = "2.0.
|
|
637
|
+
SDKClient.version = "2.0.9-dev.2";
|
|
638
638
|
|
|
639
639
|
// src/types/biz.ts
|
|
640
640
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -715,14 +715,6 @@ var CustomComponentType = /* @__PURE__ */ ((CustomComponentType2) => {
|
|
|
715
715
|
CustomComponentType2["Schedule"] = "schedule";
|
|
716
716
|
return CustomComponentType2;
|
|
717
717
|
})(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
718
|
|
|
727
719
|
// src/errors/CustomError.ts
|
|
728
720
|
var CustomError = class extends Error {
|
|
@@ -825,7 +817,7 @@ export {
|
|
|
825
817
|
Control,
|
|
826
818
|
CustomComponent,
|
|
827
819
|
CustomComponentType,
|
|
828
|
-
|
|
820
|
+
CustomField,
|
|
829
821
|
Field,
|
|
830
822
|
FieldType,
|
|
831
823
|
FlowMode,
|
|
@@ -848,7 +840,6 @@ export {
|
|
|
848
840
|
Shared,
|
|
849
841
|
Space,
|
|
850
842
|
Storage,
|
|
851
|
-
SubFieldType,
|
|
852
843
|
Tab,
|
|
853
844
|
Toast,
|
|
854
845
|
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) {
|
|
@@ -701,7 +700,7 @@ var SDKClient = _SDKClient;
|
|
|
701
700
|
/**
|
|
702
701
|
* SDK 版本号
|
|
703
702
|
*/
|
|
704
|
-
SDKClient.version = "2.0.
|
|
703
|
+
SDKClient.version = "2.0.9-dev.2";
|
|
705
704
|
|
|
706
705
|
// src/types/biz.ts
|
|
707
706
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -782,14 +781,6 @@ var CustomComponentType = /* @__PURE__ */ ((CustomComponentType2) => {
|
|
|
782
781
|
CustomComponentType2["Schedule"] = "schedule";
|
|
783
782
|
return CustomComponentType2;
|
|
784
783
|
})(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
784
|
|
|
794
785
|
// src/errors/CustomError.ts
|
|
795
786
|
var CustomError = class extends Error {
|
|
@@ -893,7 +884,7 @@ var src_default = SDKClient;
|
|
|
893
884
|
Control,
|
|
894
885
|
CustomComponent,
|
|
895
886
|
CustomComponentType,
|
|
896
|
-
|
|
887
|
+
CustomField,
|
|
897
888
|
Field,
|
|
898
889
|
FieldType,
|
|
899
890
|
FlowMode,
|
|
@@ -916,7 +907,6 @@ var src_default = SDKClient;
|
|
|
916
907
|
Shared,
|
|
917
908
|
Space,
|
|
918
909
|
Storage,
|
|
919
|
-
SubFieldType,
|
|
920
910
|
Tab,
|
|
921
911
|
Toast,
|
|
922
912
|
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
|
*/
|
|
@@ -1928,13 +1927,13 @@ declare abstract class CustomComponent extends BaseModel {
|
|
|
1928
1927
|
* @public
|
|
1929
1928
|
* 自定义组件构成
|
|
1930
1929
|
*/
|
|
1931
|
-
declare abstract class
|
|
1930
|
+
declare abstract class CustomField extends BaseModel {
|
|
1932
1931
|
/**
|
|
1933
1932
|
* @internal
|
|
1934
1933
|
*/
|
|
1935
1934
|
protected static [IMPL_KEY]: string;
|
|
1936
|
-
abstract getContext: () => Promise<
|
|
1937
|
-
abstract getProps: () => Promise<
|
|
1935
|
+
abstract getContext: () => Promise<CustomFieldFeatureContext>;
|
|
1936
|
+
abstract getProps: () => Promise<CustomFieldProps>;
|
|
1938
1937
|
/**
|
|
1939
1938
|
* only for form
|
|
1940
1939
|
* 用于监听 props 变更
|
|
@@ -1942,9 +1941,9 @@ declare abstract class ExField extends BaseModel {
|
|
|
1942
1941
|
* @param watchKeys 监听的 key,只能监听属性的 key(不能监听 api key),不传默认监听所有 key。监听的 key 对应的值变更会触发回调
|
|
1943
1942
|
* @returns
|
|
1944
1943
|
*/
|
|
1945
|
-
abstract watch: (callback: (next:
|
|
1946
|
-
abstract saveFieldValue: (value:
|
|
1947
|
-
abstract getFieldConfig: () => Promise<
|
|
1944
|
+
abstract watch: (callback: (next: CustomFieldProps | Record<string, never>) => void, watchKeys?: (keyof CustomFieldProps)[]) => Promise<Off>;
|
|
1945
|
+
abstract saveFieldValue: (value: CustomFieldValueType) => Promise<CustomFieldValidateMsg>;
|
|
1946
|
+
abstract getFieldConfig: () => Promise<CustomFieldConfig>;
|
|
1948
1947
|
/**
|
|
1949
1948
|
* 获取新建工作项表单项的值
|
|
1950
1949
|
* mobile version ≥ 7.29.0
|
|
@@ -1973,7 +1972,7 @@ declare abstract class ExField extends BaseModel {
|
|
|
1973
1972
|
* only web for table
|
|
1974
1973
|
* 打开全屏插件
|
|
1975
1974
|
*/
|
|
1976
|
-
abstract getTableCellInitProps(): Promise<
|
|
1975
|
+
abstract getTableCellInitProps(): Promise<CustomFieldProps>;
|
|
1977
1976
|
/**
|
|
1978
1977
|
* only mobile 7.35.0+
|
|
1979
1978
|
* 获取插件的展示态信息
|
|
@@ -2204,4 +2203,4 @@ declare class NotSupportedError extends CustomError {
|
|
|
2204
2203
|
* @packageDocumentation
|
|
2205
2204
|
*/
|
|
2206
2205
|
|
|
2207
|
-
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,
|
|
2206
|
+
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 };
|