@lark-project/js-sdk 2.0.8-dev.3 → 2.0.8-dev.4
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 +2 -0
- package/dist/es/index.js +5 -5
- package/dist/lib/index.js +5 -5
- package/dist/types/index.d.ts +25 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
## 2.0.8 (2025/03/20)
|
|
3
3
|
- 「Add」新增 Button 计划表单元按钮 Context
|
|
4
4
|
- 「Add」新增 Button 视图批量按钮 Context
|
|
5
|
+
- 「Add」新增 ContainerModal 关闭时配置二次确认弹窗
|
|
6
|
+
- 「Deprecated」弃用 Context activeWorkItem
|
|
5
7
|
## 2.0.7 (2025/01/23)
|
|
6
8
|
- 「Add」新增 Control onWorkItemFormValueChanged / getDisplayInfo / openFullScreenPlugin
|
|
7
9
|
- 「Add」新增 Button onWorkItemFormValueChanged
|
package/dist/es/index.js
CHANGED
|
@@ -634,7 +634,7 @@ var SDKClient = _SDKClient;
|
|
|
634
634
|
/**
|
|
635
635
|
* SDK 版本号
|
|
636
636
|
*/
|
|
637
|
-
SDKClient.version = "2.0.8-dev.
|
|
637
|
+
SDKClient.version = "2.0.8-dev.4";
|
|
638
638
|
|
|
639
639
|
// src/types/biz.ts
|
|
640
640
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -727,7 +727,7 @@ var SubFieldType = /* @__PURE__ */ ((SubFieldType2) => {
|
|
|
727
727
|
// src/errors/CustomError.ts
|
|
728
728
|
var CustomError = class extends Error {
|
|
729
729
|
constructor(options) {
|
|
730
|
-
super(options.message);
|
|
730
|
+
super(`${options.message}, ${options.originMessage}`);
|
|
731
731
|
this.originMessage = options.originMessage;
|
|
732
732
|
}
|
|
733
733
|
};
|
|
@@ -786,15 +786,15 @@ var InvalidParamsError = class extends CustomError {
|
|
|
786
786
|
this.errCode = -1;
|
|
787
787
|
this.errMsg = "unkown error";
|
|
788
788
|
this.name = "InvalidParamsError";
|
|
789
|
+
this.errMsg = this.originMessage;
|
|
789
790
|
this._parseErrorCode();
|
|
790
791
|
}
|
|
791
792
|
_parseErrorCode() {
|
|
792
793
|
try {
|
|
793
794
|
const { errCode, errMsg } = JSON.parse(this.originMessage);
|
|
794
|
-
this.errCode = errCode;
|
|
795
|
-
this.errMsg = errMsg;
|
|
795
|
+
errCode !== void 0 && (this.errCode = errCode);
|
|
796
|
+
errMsg !== void 0 && (this.errMsg = errMsg);
|
|
796
797
|
} catch (e) {
|
|
797
|
-
this.errMsg = this.originMessage;
|
|
798
798
|
}
|
|
799
799
|
}
|
|
800
800
|
};
|
package/dist/lib/index.js
CHANGED
|
@@ -701,7 +701,7 @@ var SDKClient = _SDKClient;
|
|
|
701
701
|
/**
|
|
702
702
|
* SDK 版本号
|
|
703
703
|
*/
|
|
704
|
-
SDKClient.version = "2.0.8-dev.
|
|
704
|
+
SDKClient.version = "2.0.8-dev.4";
|
|
705
705
|
|
|
706
706
|
// src/types/biz.ts
|
|
707
707
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -794,7 +794,7 @@ var SubFieldType = /* @__PURE__ */ ((SubFieldType2) => {
|
|
|
794
794
|
// src/errors/CustomError.ts
|
|
795
795
|
var CustomError = class extends Error {
|
|
796
796
|
constructor(options) {
|
|
797
|
-
super(options.message);
|
|
797
|
+
super(`${options.message}, ${options.originMessage}`);
|
|
798
798
|
this.originMessage = options.originMessage;
|
|
799
799
|
}
|
|
800
800
|
};
|
|
@@ -853,15 +853,15 @@ var InvalidParamsError = class extends CustomError {
|
|
|
853
853
|
this.errCode = -1;
|
|
854
854
|
this.errMsg = "unkown error";
|
|
855
855
|
this.name = "InvalidParamsError";
|
|
856
|
+
this.errMsg = this.originMessage;
|
|
856
857
|
this._parseErrorCode();
|
|
857
858
|
}
|
|
858
859
|
_parseErrorCode() {
|
|
859
860
|
try {
|
|
860
861
|
const { errCode, errMsg } = JSON.parse(this.originMessage);
|
|
861
|
-
this.errCode = errCode;
|
|
862
|
-
this.errMsg = errMsg;
|
|
862
|
+
errCode !== void 0 && (this.errCode = errCode);
|
|
863
|
+
errMsg !== void 0 && (this.errMsg = errMsg);
|
|
863
864
|
} catch (e) {
|
|
864
|
-
this.errMsg = this.originMessage;
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -762,6 +762,24 @@ declare enum SubFieldType {
|
|
|
762
762
|
FieldDatePrecise = "date",
|
|
763
763
|
FieldMultiUser = "multi-user"
|
|
764
764
|
}
|
|
765
|
+
/**
|
|
766
|
+
* 构成弹窗配置
|
|
767
|
+
*/
|
|
768
|
+
interface ContainerModalConfigureOptions {
|
|
769
|
+
/**
|
|
770
|
+
* 关闭前确认
|
|
771
|
+
*/
|
|
772
|
+
confirmBeforeClose?: {
|
|
773
|
+
/**
|
|
774
|
+
* 弹窗标题,仅支持字符串
|
|
775
|
+
*/
|
|
776
|
+
title: string;
|
|
777
|
+
/**
|
|
778
|
+
* 弹窗内容,仅支持字符串
|
|
779
|
+
*/
|
|
780
|
+
content: string;
|
|
781
|
+
};
|
|
782
|
+
}
|
|
765
783
|
|
|
766
784
|
/**
|
|
767
785
|
* @internal
|
|
@@ -823,6 +841,7 @@ declare abstract class Context extends BaseModel {
|
|
|
823
841
|
*/
|
|
824
842
|
abstract loginUser: User;
|
|
825
843
|
/**
|
|
844
|
+
* @deprecated 请使用各功能构成的上下文读取当前的工作项信息,如 JSSDK.Button.getContext()
|
|
826
845
|
* 当前打开的工作项(仅工作项详情页可用)
|
|
827
846
|
*/
|
|
828
847
|
abstract activeWorkItem?: BriefWorkItem;
|
|
@@ -1633,6 +1652,11 @@ declare abstract class ContainerModal extends BaseModel {
|
|
|
1633
1652
|
* 关闭插件当前激活的容器模态框
|
|
1634
1653
|
*/
|
|
1635
1654
|
abstract close(): Promise<void>;
|
|
1655
|
+
/**
|
|
1656
|
+
* only web 2.0
|
|
1657
|
+
* 配置当前弹窗,如点击关闭时是否需要确认
|
|
1658
|
+
*/
|
|
1659
|
+
abstract configure(options: ContainerModalConfigureOptions): Promise<void>;
|
|
1636
1660
|
}
|
|
1637
1661
|
|
|
1638
1662
|
/**
|
|
@@ -2154,4 +2178,4 @@ declare class NotSupportedError extends CustomError {
|
|
|
2154
2178
|
* @packageDocumentation
|
|
2155
2179
|
*/
|
|
2156
2180
|
|
|
2157
|
-
export { ActionSheet, ActionSheetOptions, AttributeType, BatchButtonFeatureContext, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, ComponentScheduleIdentity, ComponentScheduleScene, Configuration, ConfigurationFeatureContext, ContainerModal, 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 };
|
|
2181
|
+
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 };
|