@lark-project/js-sdk 2.0.9-dev.2 → 2.0.10-dev.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/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.10-dev.1";
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.10-dev.1";
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
  */
@@ -1651,6 +1652,10 @@ declare abstract class Utils extends BaseModel {
1651
1652
  abstract getAuthCode(): Promise<{
1652
1653
  code: string;
1653
1654
  }>;
1655
+ /**
1656
+ * 重置 @douyinfe/semi-ui 组件库的主题, 使组件更贴近meego整体设计风格。
1657
+ */
1658
+ abstract setMeegleThemeForSemiUI(): Promise<void>;
1654
1659
  }
1655
1660
 
1656
1661
  /**
@@ -1927,13 +1932,13 @@ declare abstract class CustomComponent extends BaseModel {
1927
1932
  * @public
1928
1933
  * 自定义组件构成
1929
1934
  */
1930
- declare abstract class CustomField extends BaseModel {
1935
+ declare abstract class ExField extends BaseModel {
1931
1936
  /**
1932
1937
  * @internal
1933
1938
  */
1934
1939
  protected static [IMPL_KEY]: string;
1935
- abstract getContext: () => Promise<CustomFieldFeatureContext>;
1936
- abstract getProps: () => Promise<CustomFieldProps>;
1940
+ abstract getContext: () => Promise<ExFieldFeatureContext>;
1941
+ abstract getProps: () => Promise<ExFieldProps>;
1937
1942
  /**
1938
1943
  * only for form
1939
1944
  * 用于监听 props 变更
@@ -1941,9 +1946,9 @@ declare abstract class CustomField extends BaseModel {
1941
1946
  * @param watchKeys 监听的 key,只能监听属性的 key(不能监听 api key),不传默认监听所有 key。监听的 key 对应的值变更会触发回调
1942
1947
  * @returns
1943
1948
  */
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>;
1949
+ abstract watch: (callback: (next: ExFieldProps | Record<string, never>) => void, watchKeys?: (keyof ExFieldProps)[]) => Promise<Off>;
1950
+ abstract saveFieldValue: (value: ExFieldValueType) => Promise<ExFieldValidateMsg>;
1951
+ abstract getFieldConfig: () => Promise<ExFieldConfig>;
1947
1952
  /**
1948
1953
  * 获取新建工作项表单项的值
1949
1954
  * mobile version ≥ 7.29.0
@@ -1972,7 +1977,7 @@ declare abstract class CustomField extends BaseModel {
1972
1977
  * only web for table
1973
1978
  * 打开全屏插件
1974
1979
  */
1975
- abstract getTableCellInitProps(): Promise<CustomFieldProps>;
1980
+ abstract getTableCellInitProps(): Promise<ExFieldProps>;
1976
1981
  /**
1977
1982
  * only mobile 7.35.0+
1978
1983
  * 获取插件的展示态信息
@@ -2203,4 +2208,4 @@ declare class NotSupportedError extends CustomError {
2203
2208
  * @packageDocumentation
2204
2209
  */
2205
2210
 
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 };
2211
+ 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.10-dev.1",
4
4
  "runtimeMinVersions": {
5
5
  "web": "2.1.0",
6
6
  "mobile": "1.1.0"