@lark-project/js-sdk 2.1.4 → 2.1.5-alpha.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/CHANGELOG.md CHANGED
@@ -1,4 +1,6 @@
1
1
  # Change Log
2
+ # 2.1.4(2025/1/14)
3
+ - 「Add」新增 LiteAppPropDataSource 类型相关定义
2
4
 
3
5
  ## 2.1.3(2025/12/19)
4
6
  - 「Add」新增 geolocation.getCurrentPosition
package/dist/es/index.js CHANGED
@@ -722,7 +722,7 @@ var SDKClient = _SDKClient;
722
722
  /**
723
723
  * SDK 版本号
724
724
  */
725
- SDKClient.version = "2.1.4";
725
+ SDKClient.version = "2.1.5-alpha.1";
726
726
 
727
727
  // src/types/biz.ts
728
728
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -822,6 +822,17 @@ var LiteAppPropTemplateType = /* @__PURE__ */ ((LiteAppPropTemplateType2) => {
822
822
  LiteAppPropTemplateType2["workItemTypeWithField"] = "workItemTypeWithField";
823
823
  return LiteAppPropTemplateType2;
824
824
  })(LiteAppPropTemplateType || {});
825
+ var LiteAppSubscribedPropertyType = /* @__PURE__ */ ((LiteAppSubscribedPropertyType2) => {
826
+ LiteAppSubscribedPropertyType2["Text"] = "text";
827
+ LiteAppSubscribedPropertyType2["Number"] = "number";
828
+ LiteAppSubscribedPropertyType2["DatePrecise"] = "precise_date";
829
+ LiteAppSubscribedPropertyType2["DateRange"] = "date_range";
830
+ LiteAppSubscribedPropertyType2["View"] = "view";
831
+ LiteAppSubscribedPropertyType2["WorkItemInstance"] = "work_item_instance";
832
+ LiteAppSubscribedPropertyType2["WorkItemType"] = "work_item_type";
833
+ LiteAppSubscribedPropertyType2["DataSource"] = "dataSource";
834
+ return LiteAppSubscribedPropertyType2;
835
+ })(LiteAppSubscribedPropertyType || {});
825
836
 
826
837
  // src/errors/CustomError.ts
827
838
  var CustomError = class extends Error {
@@ -949,6 +960,7 @@ export {
949
960
  InternalError,
950
961
  InvalidParamsError,
951
962
  LiteAppPropTemplateType,
963
+ LiteAppSubscribedPropertyType,
952
964
  MEEGO_BIZ_HUB,
953
965
  Modal,
954
966
  Navigation,
package/dist/lib/index.js CHANGED
@@ -74,6 +74,7 @@ __export(src_exports, {
74
74
  InternalError: () => InternalError,
75
75
  InvalidParamsError: () => InvalidParamsError,
76
76
  LiteAppPropTemplateType: () => LiteAppPropTemplateType,
77
+ LiteAppSubscribedPropertyType: () => LiteAppSubscribedPropertyType,
77
78
  MEEGO_BIZ_HUB: () => MEEGO_BIZ_HUB,
78
79
  Modal: () => Modal,
79
80
  Navigation: () => Navigation,
@@ -795,7 +796,7 @@ var SDKClient = _SDKClient;
795
796
  /**
796
797
  * SDK 版本号
797
798
  */
798
- SDKClient.version = "2.1.4";
799
+ SDKClient.version = "2.1.5-alpha.1";
799
800
 
800
801
  // src/types/biz.ts
801
802
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -895,6 +896,17 @@ var LiteAppPropTemplateType = /* @__PURE__ */ ((LiteAppPropTemplateType2) => {
895
896
  LiteAppPropTemplateType2["workItemTypeWithField"] = "workItemTypeWithField";
896
897
  return LiteAppPropTemplateType2;
897
898
  })(LiteAppPropTemplateType || {});
899
+ var LiteAppSubscribedPropertyType = /* @__PURE__ */ ((LiteAppSubscribedPropertyType2) => {
900
+ LiteAppSubscribedPropertyType2["Text"] = "text";
901
+ LiteAppSubscribedPropertyType2["Number"] = "number";
902
+ LiteAppSubscribedPropertyType2["DatePrecise"] = "precise_date";
903
+ LiteAppSubscribedPropertyType2["DateRange"] = "date_range";
904
+ LiteAppSubscribedPropertyType2["View"] = "view";
905
+ LiteAppSubscribedPropertyType2["WorkItemInstance"] = "work_item_instance";
906
+ LiteAppSubscribedPropertyType2["WorkItemType"] = "work_item_type";
907
+ LiteAppSubscribedPropertyType2["DataSource"] = "dataSource";
908
+ return LiteAppSubscribedPropertyType2;
909
+ })(LiteAppSubscribedPropertyType || {});
898
910
 
899
911
  // src/errors/CustomError.ts
900
912
  var CustomError = class extends Error {
@@ -1023,6 +1035,7 @@ var src_default = SDKClient;
1023
1035
  InternalError,
1024
1036
  InvalidParamsError,
1025
1037
  LiteAppPropTemplateType,
1038
+ LiteAppSubscribedPropertyType,
1026
1039
  MEEGO_BIZ_HUB,
1027
1040
  Modal,
1028
1041
  Navigation,
@@ -844,12 +844,18 @@ interface LiteAppComponentFeatureContext {
844
844
  /**
845
845
  * liteapp 组件属性值类型
846
846
  */
847
+ /**
848
+ * 系统内置的通用值类型
849
+ */
847
850
  type LiteAppPropLayout = {
848
851
  width: number;
849
852
  height: number;
850
853
  positionX: number;
851
854
  positionY: number;
852
855
  };
856
+ /**
857
+ * 可配置的属性及值类型
858
+ */
853
859
  declare enum LiteAppPropTemplateType {
854
860
  Text = "text",
855
861
  Number = "number",
@@ -900,11 +906,48 @@ type LiteAppPropDataSource = {
900
906
  };
901
907
  type LiteAppPropView = {
902
908
  viewId: string;
909
+ /**
910
+ * 是否是全景视图
911
+ */
903
912
  isMultiProject: boolean;
904
913
  };
905
914
  type LiteAppPropWorkItemListAfterFilter = LiteAppPropWorkItemInstance[];
906
915
  type LiteAppPropWorkItemListAfterSort = LiteAppPropWorkItemInstance[];
907
916
  type LiteAppCompPropValueType = LiteAppPropText | LiteAppPropNumber | LiteAppPropSelect | LiteAppPropBoolean | LiteAppPropMultiSelect | LiteAppPropDateWithTime | LiteAppPropDateRange | LiteAppPropWorkItemType | LiteAppPropWorkItemInstance | LiteAppPropView | LiteAppPropWorkItemListAfterFilter | LiteAppPropWorkItemListAfterSort | LiteAppPropDataSource;
917
+ type LiteAppSubscribedPropertyText = string;
918
+ type LiteAppSubscribedPropertyNumber = number;
919
+ type LiteAppSubscribedPropertyDatePrecise = number;
920
+ type LiteAppSubscribedPropertyDateRange = {
921
+ start: number;
922
+ end: number;
923
+ };
924
+ type LiteAppSubscribedPropertyView = {
925
+ viewId: string;
926
+ };
927
+ type LiteAppSubscribedPropertyWorkItemInstance = {
928
+ spaceId: string;
929
+ workObjectId: string;
930
+ workItemId: number;
931
+ };
932
+ type LiteAppSubscribedPropertyWorkItemType = {
933
+ spaceId: string;
934
+ workObjectId: string;
935
+ };
936
+ type LiteAppSubscribedPropertyDataSource = {
937
+ spaceId: string;
938
+ moql: string;
939
+ };
940
+ type LiteAppSubscribedPropertyValueType = LiteAppSubscribedPropertyText | LiteAppSubscribedPropertyNumber | LiteAppSubscribedPropertyDatePrecise | LiteAppSubscribedPropertyDateRange | LiteAppSubscribedPropertyView | LiteAppSubscribedPropertyWorkItemInstance | LiteAppSubscribedPropertyWorkItemType | LiteAppSubscribedPropertyDataSource;
941
+ declare enum LiteAppSubscribedPropertyType {
942
+ Text = "text",
943
+ Number = "number",
944
+ DatePrecise = "precise_date",
945
+ DateRange = "date_range",
946
+ View = "view",
947
+ WorkItemInstance = "work_item_instance",
948
+ WorkItemType = "work_item_type",
949
+ DataSource = "dataSource"
950
+ }
908
951
  /**
909
952
  * liteapp 组件不同的属性类型对应的可读配置
910
953
  */
@@ -931,11 +974,17 @@ type LiteAppCompPropFullConfig = LiteAppCompPropBriefConfig | LiteAppCompPropSel
931
974
  * liteapp 组件入参定义
932
975
  */
933
976
  type LiteAppComponentProps = {
977
+ /**
978
+ * 实例 ID
979
+ */
934
980
  instanceId: string;
935
981
  layout?: LiteAppPropLayout;
936
982
  } & {
937
983
  [propName: string]: LiteAppCompPropValueType;
938
984
  };
985
+ /**
986
+ * liteapp 组件属性配置定义
987
+ */
939
988
  type LiteAppCompLayoutConfig =
940
989
  /** 定高模式 */
941
990
  {
@@ -952,17 +1001,38 @@ type LiteAppCompLayoutConfig =
952
1001
  maxHeight: number;
953
1002
  };
954
1003
  type LiteAppComponentConfig = {
1004
+ /**
1005
+ * 组件 id(与实例 id 区分)
1006
+ */
955
1007
  id: string;
1008
+ /**
1009
+ * 组件名称
1010
+ */
1011
+ /**
1012
+ * 组件 icon
1013
+ */
1014
+ /**
1015
+ * layout 配置
1016
+ */
956
1017
  layout: LiteAppCompLayoutConfig;
957
1018
  } & {
1019
+ /**
1020
+ * 属性配置
1021
+ */
958
1022
  [keyOfProp: string]: LiteAppCompPropBriefConfig;
959
1023
  };
1024
+ /**
1025
+ * liteapp 组件预设值(默认值)
1026
+ */
960
1027
  interface LiteAppComponentPreset {
961
1028
  layout?: {
962
1029
  width: number;
963
1030
  height: number;
964
1031
  };
965
1032
  }
1033
+ /**
1034
+ * liteapp 工作项实例定义
1035
+ */
966
1036
  type LiteAppWorkItemInstance = {
967
1037
  /**
968
1038
  * 唯一标识
@@ -1002,8 +1072,17 @@ type LiteAppWorkItemInstance = {
1002
1072
  fields?: Record<string, unknown>;
1003
1073
  };
1004
1074
  type LiteAppComponentDataSourceResult = {
1075
+ /**
1076
+ * 工作项实例列表
1077
+ */
1005
1078
  data: LiteAppWorkItemInstance[];
1079
+ /**
1080
+ * 数据总数
1081
+ */
1006
1082
  total: number;
1083
+ /**
1084
+ * 是否有更多数据
1085
+ */
1007
1086
  hasMore: boolean;
1008
1087
  };
1009
1088
 
@@ -2386,6 +2465,7 @@ declare abstract class BuilderComponent extends BaseModel {
2386
2465
  pageNum: number;
2387
2466
  pageSize: number;
2388
2467
  }) => Promise<LiteAppComponentDataSourceResult>;
2468
+ abstract notify: (key: string, value: LiteAppSubscribedPropertyValueType) => Promise<void>;
2389
2469
  }
2390
2470
 
2391
2471
  /**
@@ -2623,4 +2703,4 @@ declare class NotSupportedError extends CustomError {
2623
2703
  * @packageDocumentation
2624
2704
  */
2625
2705
 
2626
- export { ActionSheet, ActionSheetOptions, AttributeType, BatchButtonFeatureContext, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, BuilderComponent, 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, Event, EventPayloadMap, EventType, ExCompoundFieldValueType, Field, FieldType, FieldValue, FlowMode, Geolocation, GeolocationCoordinates, GeolocationPosition, I18nTitleConfig, IMPL_KEY, IPluginCustomBuildConfig, IRichTextEditorImageUploadComplete, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, LiteAppCompLayoutConfig, LiteAppCompPropBriefConfig, LiteAppCompPropFullConfig, LiteAppCompPropSelectConfig, LiteAppCompPropValueType, LiteAppComponentConfig, LiteAppComponentDataSourceResult, LiteAppComponentFeatureContext, LiteAppComponentPreset, LiteAppComponentProps, LiteAppPropBoolean, LiteAppPropDataSource, LiteAppPropDateRange, LiteAppPropDateWithTime, LiteAppPropField, LiteAppPropLayout, LiteAppPropMultiSelect, LiteAppPropNumber, LiteAppPropSelect, LiteAppPropTemplateType, LiteAppPropText, LiteAppPropView, LiteAppPropWorkItemInstance, LiteAppPropWorkItemListAfterFilter, LiteAppPropWorkItemListAfterSort, LiteAppPropWorkItemType, LiteAppWorkItemInstance, 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, Script, ScriptFeatureContext, Shared, Space, Storage, SubFieldType, SystemPermissionDeniedError, Tab, TabFeatureContext, Toast, ToastOptions, User, UserInfo, Utils, View, ViewFeatureContext, WbsStatus, WorkItem, WorkItemButtonFeatureContext, WorkItemCreateFormPreset, WorkItemFinder, WorkItemFinderOptions, WorkObject, SDKClient as default, unwatch };
2706
+ export { ActionSheet, ActionSheetOptions, AttributeType, BatchButtonFeatureContext, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, BuilderComponent, 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, Event, EventPayloadMap, EventType, ExCompoundFieldValueType, Field, FieldType, FieldValue, FlowMode, Geolocation, GeolocationCoordinates, GeolocationPosition, I18nTitleConfig, IMPL_KEY, IPluginCustomBuildConfig, IRichTextEditorImageUploadComplete, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, LiteAppCompLayoutConfig, LiteAppCompPropBriefConfig, LiteAppCompPropFullConfig, LiteAppCompPropSelectConfig, LiteAppCompPropValueType, LiteAppComponentConfig, LiteAppComponentDataSourceResult, LiteAppComponentFeatureContext, LiteAppComponentPreset, LiteAppComponentProps, LiteAppPropBoolean, LiteAppPropDataSource, LiteAppPropDateRange, LiteAppPropDateWithTime, LiteAppPropField, LiteAppPropLayout, LiteAppPropMultiSelect, LiteAppPropNumber, LiteAppPropSelect, LiteAppPropTemplateType, LiteAppPropText, LiteAppPropView, LiteAppPropWorkItemInstance, LiteAppPropWorkItemListAfterFilter, LiteAppPropWorkItemListAfterSort, LiteAppPropWorkItemType, LiteAppSubscribedPropertyType, LiteAppSubscribedPropertyValueType, LiteAppWorkItemInstance, 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, Script, ScriptFeatureContext, Shared, Space, Storage, SubFieldType, SystemPermissionDeniedError, 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.1.4",
3
+ "version": "2.1.5-alpha.1",
4
4
  "runtimeMinVersions": {
5
5
  "web": "2.1.0",
6
6
  "mobile": "1.1.0"