@lark-project/js-sdk 2.0.7 → 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.7";
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.7";
692
+ SDKClient.version = "2.0.8-dev.1";
693
693
 
694
694
  // src/types/biz.ts
695
695
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -379,10 +379,75 @@ 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
+ }
421
+ /**
422
+ * 视图批量按钮上下文
423
+ * 适用场景:普通视图、工作项主页视图、工作台视图组件
424
+ */
425
+ interface BatchButtonFeatureContext {
426
+ /**
427
+ * 视图所属空间标识
428
+ */
429
+ spaceId: string;
430
+ /**
431
+ * 视图所属工作项类型标识
432
+ */
433
+ workObjectId: string;
434
+ /**
435
+ * 视图标识
436
+ */
437
+ viewId?: string;
438
+ /**
439
+ * 勾选的工作项实例
440
+ */
441
+ selectedWorkItems: Array<{
442
+ spaceId: string;
443
+ workObjectId: string;
444
+ workItemIds: number[];
445
+ }>;
446
+ }
382
447
  /**
383
448
  * 按钮构成
384
449
  */
385
- type ButtonFeatureContext = WorkItemButtonFeatureContext | CreateButtonFeatureContext;
450
+ type ButtonFeatureContext = WorkItemButtonFeatureContext | CreateButtonFeatureContext | BatchButtonFeatureContext | ScheduleUnitButtonFeatureContext;
386
451
  /**
387
452
  * 内嵌页面构成
388
453
  * 一个单独的导航入口+内嵌页面
@@ -632,6 +697,24 @@ interface CustomComponentProps {
632
697
  disabled?: boolean;
633
698
  };
634
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
+ }
635
718
 
636
719
  /**
637
720
  * @internal
@@ -1503,6 +1586,11 @@ declare abstract class ContainerModal extends BaseModel {
1503
1586
  * 关闭插件当前激活的容器模态框
1504
1587
  */
1505
1588
  abstract close(): Promise<void>;
1589
+ /**
1590
+ * only web 2.0
1591
+ * 配置当前弹窗,如点击关闭时是否需要确认
1592
+ */
1593
+ abstract configure(options: ContainerModalConfigureOptions): Promise<void>;
1506
1594
  }
1507
1595
 
1508
1596
  /**
@@ -1957,4 +2045,4 @@ declare class NotSupportedError extends CustomError {
1957
2045
  * @packageDocumentation
1958
2046
  */
1959
2047
 
1960
- export { ActionSheet, ActionSheetOptions, AttributeType, 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.7",
3
+ "version": "2.0.8-dev.1",
4
4
  "runtimeMinVersions": {
5
5
  "web": "2.1.0",
6
6
  "mobile": "1.1.0"