@lark-project/js-sdk 2.0.8-dev.0 → 2.0.8-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/CHANGELOG.md CHANGED
@@ -1,4 +1,7 @@
1
1
  # Change Log
2
+ ## 2.0.8 (2025/03/20)
3
+ - 「Add」新增 Button 计划表单元按钮 Context
4
+ - 「Add」新增 Button 视图批量按钮 Context
2
5
  ## 2.0.7 (2025/01/23)
3
6
  - 「Add」新增 Control onWorkItemFormValueChanged / getDisplayInfo / openFullScreenPlugin
4
7
  - 「Add」新增 Button onWorkItemFormValueChanged
package/dist/es/index.js CHANGED
@@ -624,7 +624,7 @@ var SDKClient = _SDKClient;
624
624
  /**
625
625
  * SDK 版本号
626
626
  */
627
- SDKClient.version = "2.0.8-dev.0";
627
+ SDKClient.version = "2.0.8-dev.1";
628
628
 
629
629
  // src/types/biz.ts
630
630
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
package/dist/lib/index.js CHANGED
@@ -689,7 +689,7 @@ var SDKClient = _SDKClient;
689
689
  /**
690
690
  * SDK 版本号
691
691
  */
692
- SDKClient.version = "2.0.8-dev.0";
692
+ SDKClient.version = "2.0.8-dev.1";
693
693
 
694
694
  // src/types/biz.ts
695
695
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -379,6 +379,45 @@ interface CreateButtonFeatureContext {
379
379
  */
380
380
  viewId?: string;
381
381
  }
382
+ interface ScheduleUnitButtonFeatureContext {
383
+ /**
384
+ * 空间标识
385
+ */
386
+ spaceId: string;
387
+ /**
388
+ * 工作项类型标识
389
+ */
390
+ workObjectId: string;
391
+ /**
392
+ * 工作项实例唯一标识
393
+ */
394
+ workItemId: number;
395
+ /**
396
+ * 计划表单元上下文信息
397
+ */
398
+ scheduleUnitCtx: {
399
+ /**
400
+ * 计划表编辑草稿标识
401
+ */
402
+ draftId: string;
403
+ /**
404
+ * 计划表单元父节点标识
405
+ */
406
+ parentUUID: string;
407
+ /**
408
+ * 计划表单元标识
409
+ */
410
+ uuid: string;
411
+ /**
412
+ * 计划表单元类型
413
+ */
414
+ type: string;
415
+ /**
416
+ * 计划表单元值
417
+ */
418
+ value: Record<string, any>;
419
+ };
420
+ }
382
421
  /**
383
422
  * 视图批量按钮上下文
384
423
  * 适用场景:普通视图、工作项主页视图、工作台视图组件
@@ -408,7 +447,7 @@ interface BatchButtonFeatureContext {
408
447
  /**
409
448
  * 按钮构成
410
449
  */
411
- type ButtonFeatureContext = WorkItemButtonFeatureContext | CreateButtonFeatureContext | BatchButtonFeatureContext;
450
+ type ButtonFeatureContext = WorkItemButtonFeatureContext | CreateButtonFeatureContext | BatchButtonFeatureContext | ScheduleUnitButtonFeatureContext;
412
451
  /**
413
452
  * 内嵌页面构成
414
453
  * 一个单独的导航入口+内嵌页面
@@ -658,6 +697,24 @@ interface CustomComponentProps {
658
697
  disabled?: boolean;
659
698
  };
660
699
  }
700
+ /**
701
+ * 构成弹窗配置
702
+ */
703
+ interface ContainerModalConfigureOptions {
704
+ /**
705
+ * 关闭前确认
706
+ */
707
+ confirmBeforeClose?: {
708
+ /**
709
+ * 弹窗标题,仅支持字符串
710
+ */
711
+ title: string;
712
+ /**
713
+ * 弹窗内容,仅支持字符串
714
+ */
715
+ content: string;
716
+ };
717
+ }
661
718
 
662
719
  /**
663
720
  * @internal
@@ -1529,6 +1586,11 @@ declare abstract class ContainerModal extends BaseModel {
1529
1586
  * 关闭插件当前激活的容器模态框
1530
1587
  */
1531
1588
  abstract close(): Promise<void>;
1589
+ /**
1590
+ * only web 2.0
1591
+ * 配置当前弹窗,如点击关闭时是否需要确认
1592
+ */
1593
+ abstract configure(options: ContainerModalConfigureOptions): Promise<void>;
1532
1594
  }
1533
1595
 
1534
1596
  /**
@@ -1983,4 +2045,4 @@ declare class NotSupportedError extends CustomError {
1983
2045
  * @packageDocumentation
1984
2046
  */
1985
2047
 
1986
- 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, Field, FieldType, 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, Shared, Space, Storage, Tab, TabFeatureContext, Toast, ToastOptions, User, UserInfo, Utils, View, ViewFeatureContext, WbsStatus, WorkItem, WorkItemButtonFeatureContext, WorkItemCreateFormPreset, WorkItemFinder, WorkItemFinderOptions, WorkObject, SDKClient as default, unwatch };
2048
+ 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, Field, FieldType, 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, 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.8-dev.0",
3
+ "version": "2.0.8-dev.1",
4
4
  "runtimeMinVersions": {
5
5
  "web": "2.1.0",
6
6
  "mobile": "1.1.0"