@lark-project/js-sdk 2.0.9-dev.2 → 2.0.9

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 CHANGED
@@ -440,15 +440,15 @@ _a24 = IMPL_KEY;
440
440
  */
441
441
  CustomComponent[_a24] = "customComponent";
442
442
 
443
- // src/features/CustomField.ts
443
+ // src/features/ExField.ts
444
444
  var _a25;
445
- var CustomField = class extends BaseModel {
445
+ var ExField = class extends BaseModel {
446
446
  };
447
447
  _a25 = IMPL_KEY;
448
448
  /**
449
449
  * @internal
450
450
  */
451
- CustomField[_a25] = "exField";
451
+ ExField[_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.9-dev.2";
637
+ SDKClient.version = "2.0.9";
638
638
 
639
639
  // src/types/biz.ts
640
640
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -715,6 +715,14 @@ 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 || {});
718
726
 
719
727
  // src/errors/CustomError.ts
720
728
  var CustomError = class extends Error {
@@ -817,7 +825,7 @@ export {
817
825
  Control,
818
826
  CustomComponent,
819
827
  CustomComponentType,
820
- CustomField,
828
+ ExField,
821
829
  Field,
822
830
  FieldType,
823
831
  FlowMode,
@@ -840,6 +848,7 @@ export {
840
848
  Shared,
841
849
  Space,
842
850
  Storage,
851
+ SubFieldType,
843
852
  Tab,
844
853
  Toast,
845
854
  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
- CustomField: () => CustomField,
63
+ ExField: () => ExField,
64
64
  Field: () => Field,
65
65
  FieldType: () => FieldType,
66
66
  FlowMode: () => FlowMode,
@@ -83,6 +83,7 @@ __export(src_exports, {
83
83
  Shared: () => Shared,
84
84
  Space: () => Space,
85
85
  Storage: () => Storage,
86
+ SubFieldType: () => SubFieldType,
86
87
  Tab: () => Tab,
87
88
  Toast: () => Toast,
88
89
  Utils: () => Utils,
@@ -506,15 +507,15 @@ _a24 = IMPL_KEY;
506
507
  */
507
508
  CustomComponent[_a24] = "customComponent";
508
509
 
509
- // src/features/CustomField.ts
510
+ // src/features/ExField.ts
510
511
  var _a25;
511
- var CustomField = class extends BaseModel {
512
+ var ExField = class extends BaseModel {
512
513
  };
513
514
  _a25 = IMPL_KEY;
514
515
  /**
515
516
  * @internal
516
517
  */
517
- CustomField[_a25] = "exField";
518
+ ExField[_a25] = "exField";
518
519
 
519
520
  // src/client.ts
520
521
  function getImplClass(decl, impls) {
@@ -700,7 +701,7 @@ var SDKClient = _SDKClient;
700
701
  /**
701
702
  * SDK 版本号
702
703
  */
703
- SDKClient.version = "2.0.9-dev.2";
704
+ SDKClient.version = "2.0.9";
704
705
 
705
706
  // src/types/biz.ts
706
707
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -781,6 +782,14 @@ var CustomComponentType = /* @__PURE__ */ ((CustomComponentType2) => {
781
782
  CustomComponentType2["Schedule"] = "schedule";
782
783
  return CustomComponentType2;
783
784
  })(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 || {});
784
793
 
785
794
  // src/errors/CustomError.ts
786
795
  var CustomError = class extends Error {
@@ -884,7 +893,7 @@ var src_default = SDKClient;
884
893
  Control,
885
894
  CustomComponent,
886
895
  CustomComponentType,
887
- CustomField,
896
+ ExField,
888
897
  Field,
889
898
  FieldType,
890
899
  FlowMode,
@@ -907,6 +916,7 @@ var src_default = SDKClient;
907
916
  Shared,
908
917
  Space,
909
918
  Storage,
919
+ SubFieldType,
910
920
  Tab,
911
921
  Toast,
912
922
  Utils,
@@ -698,7 +698,7 @@ interface CustomComponentProps {
698
698
  };
699
699
  }
700
700
  /** ----------------------- 拓展字段构成类型 ----------------------- */
701
- interface CustomFieldFeatureContext {
701
+ interface ExFieldFeatureContext {
702
702
  /**
703
703
  * 拓展字段当前所属空间标识
704
704
  */
@@ -731,54 +731,55 @@ interface ExCompoundFieldValueType {
731
731
  value?: FieldValue;
732
732
  }[][];
733
733
  }
734
- type CustomFieldValueType = ExCompoundFieldValueType;
735
- interface CustomFieldProps {
736
- value: CustomFieldValueType;
734
+ type ExFieldValueType = ExCompoundFieldValueType;
735
+ interface ExFieldProps {
736
+ value: ExFieldValueType;
737
737
  disabled?: boolean;
738
738
  }
739
- interface CustomFieldConfig {
739
+ interface ExFieldConfig {
740
740
  key: string;
741
- type: FieldType.compoundField | SubFieldType;
741
+ type: string;
742
742
  name: string;
743
- children?: CustomFieldConfig[];
743
+ children?: ExFieldConfig[];
744
744
  }
745
- interface CustomFieldValidateMsg {
745
+ interface ExFieldValidateMsg {
746
746
  /**
747
747
  * code 为 200 时 msg 按照正常成功数据返回外
748
- * 401 | 402 | 403 | 404 | 405 | 406 按照 InvalidParams 类型异常返回,可以通过该异常的 errCode、errMsg 属性查看具体出错原因
748
+ * 401 | 401 | 403 | 404 | 405 | 406 按照 InvalidParams 类型异常返回,可以通过该异常的 errCode、errMsg 属性查看具体出错原因
749
749
  * 其余执行过程异常按照 InternalError 异常抛出
750
750
  * 具体的 code 和对应的 msg 信息及解释可参考开发者手册的详细介绍
751
751
  */
752
- code: 200 | 401 | 402 | 403 | 404 | 405 | 406;
752
+ code: 200 | 401 | 401 | 403 | 404 | 405 | 406;
753
753
  msg: string;
754
754
  }
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;
755
+ declare enum SubFieldType {
756
+ /**
757
+ * 数字类型
758
+ */
759
+ FieldNumber = "number",
760
+ /**
761
+ * 多行文本
762
+ * 字段类型为 text
763
+ * 在字段模型中和单行文本字段的区别为 multi = true
764
+ */
765
+ FieldMultiText = "text",
766
+ /**
767
+ * 级联多选
768
+ * 如果写入不存在的选项可能导致接口报错/提示
769
+ */
770
+ FieldTreeSelect = "tree-multi-select",
771
+ /**
772
+ * 时间+日期
773
+ * 字段类型为 date
774
+ * 在字段模型中和普通日期字段的区别是本时间精确度为 "YYYY-MM-DD HH:mm:ss"(普通为 YYYY-MM-DD)
775
+ */
776
+ FieldDatePrecise = "date",
777
+ /**
778
+ * 多选人员
779
+ * 如果写入不存在的人员可能导致接口报错/提示
780
+ */
781
+ FieldMultiUser = "multi-user"
782
+ }
782
783
  /**
783
784
  * 构成弹窗配置
784
785
  */
@@ -1148,14 +1149,19 @@ declare abstract class Navigation extends BaseModel {
1148
1149
  /**
1149
1150
  * 打开指定空间工作项新建页
1150
1151
  * @param options
1151
- * @param options.spaceSimpleName 空间标识,非空间唯一标识
1152
+ * @param options.spaceId 空间唯一标识
1153
+ * @param options.spaceSimpleName [废弃]空间标识,非空间唯一标识
1152
1154
  * @param options.workObjectId 工作项类型唯一标识,如 story、issue
1153
1155
  * @param options.supportedWorkObjectIds 新建页支持切换的工作项类型列表,默认所有都展示
1154
1156
  * @param options.formPreset 新建工作项表单预填值
1155
1157
  * @param callback 新建完成回调,当 err 为 undefined 时为新建成功,可以通过 result.workItemId 取新建工作项实例 id
1156
1158
  */
1157
1159
  abstract openWorkItemCreatePage(options: {
1158
- spaceSimpleName: string;
1160
+ spaceId: string;
1161
+ /**
1162
+ * @deprecated
1163
+ */
1164
+ spaceSimpleName?: string;
1159
1165
  workObjectId: string;
1160
1166
  supportedWorkObjectIds?: string[];
1161
1167
  formPreset?: WorkItemCreateFormPreset;
@@ -1165,12 +1171,17 @@ declare abstract class Navigation extends BaseModel {
1165
1171
  /**
1166
1172
  * 打开指定空间工作项实例
1167
1173
  * @param options
1168
- * @param options.spaceSimpleName 空间标识,非空间唯一标识
1174
+ * @param options.spaceId 空间唯一标识
1175
+ * @param options.spaceSimpleName [废弃]空间标识,非空间唯一标识
1169
1176
  * @param options.workObjectId 工作项类型唯一标识,如 story、issue
1170
1177
  * @param options.workItemId 工作项实例唯一标识
1171
1178
  */
1172
1179
  abstract openWorkItemDetailPage(options: {
1173
- spaceSimpleName: string;
1180
+ spaceId: string;
1181
+ /**
1182
+ * @deprecated
1183
+ */
1184
+ spaceSimpleName?: string;
1174
1185
  workObjectId: string;
1175
1186
  workItemId: number;
1176
1187
  }): void;
@@ -1927,13 +1938,13 @@ declare abstract class CustomComponent extends BaseModel {
1927
1938
  * @public
1928
1939
  * 自定义组件构成
1929
1940
  */
1930
- declare abstract class CustomField extends BaseModel {
1941
+ declare abstract class ExField extends BaseModel {
1931
1942
  /**
1932
1943
  * @internal
1933
1944
  */
1934
1945
  protected static [IMPL_KEY]: string;
1935
- abstract getContext: () => Promise<CustomFieldFeatureContext>;
1936
- abstract getProps: () => Promise<CustomFieldProps>;
1946
+ abstract getContext: () => Promise<ExFieldFeatureContext>;
1947
+ abstract getProps: () => Promise<ExFieldProps>;
1937
1948
  /**
1938
1949
  * only for form
1939
1950
  * 用于监听 props 变更
@@ -1941,9 +1952,9 @@ declare abstract class CustomField extends BaseModel {
1941
1952
  * @param watchKeys 监听的 key,只能监听属性的 key(不能监听 api key),不传默认监听所有 key。监听的 key 对应的值变更会触发回调
1942
1953
  * @returns
1943
1954
  */
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>;
1955
+ abstract watch: (callback: (next: ExFieldProps | Record<string, never>) => void, watchKeys?: (keyof ExFieldProps)[]) => Promise<Off>;
1956
+ abstract saveFieldValue: (value: ExFieldValueType) => Promise<ExFieldValidateMsg>;
1957
+ abstract getFieldConfig: () => Promise<ExFieldConfig>;
1947
1958
  /**
1948
1959
  * 获取新建工作项表单项的值
1949
1960
  * mobile version ≥ 7.29.0
@@ -1972,7 +1983,7 @@ declare abstract class CustomField extends BaseModel {
1972
1983
  * only web for table
1973
1984
  * 打开全屏插件
1974
1985
  */
1975
- abstract getTableCellInitProps(): Promise<CustomFieldProps>;
1986
+ abstract getTableCellInitProps(): Promise<ExFieldProps>;
1976
1987
  /**
1977
1988
  * only mobile 7.35.0+
1978
1989
  * 获取插件的展示态信息
@@ -2203,4 +2214,4 @@ declare class NotSupportedError extends CustomError {
2203
2214
  * @packageDocumentation
2204
2215
  */
2205
2216
 
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 };
2217
+ 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, ExCompoundFieldValueType, ExField, ExFieldConfig, ExFieldFeatureContext, ExFieldProps, ExFieldValidateMsg, ExFieldValueType, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-project/js-sdk",
3
- "version": "2.0.9-dev.2",
3
+ "version": "2.0.9",
4
4
  "runtimeMinVersions": {
5
5
  "web": "2.1.0",
6
6
  "mobile": "1.1.0"