@lark-project/js-sdk 2.0.7-dev.1 → 2.0.7

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,6 +1,13 @@
1
1
  # Change Log
2
+ ## 2.0.7 (2025/01/23)
3
+ - 「Add」新增 Control onWorkItemFormValueChanged / getDisplayInfo / openFullScreenPlugin
4
+ - 「Add」新增 Button onWorkItemFormValueChanged
5
+ - 「Add」新增 Tab onWorkItemFormValueChanged
6
+ - 「Add」新增 CustomComponent - schedule 点位
7
+
2
8
  ## 2.0.6 (2024/09/12)
3
9
  - 「Add」新增 Fullscreen Modal
10
+ - 「Add」新增 Context loginUser tenantId
4
11
 
5
12
  ## 2.0.5 (2024/08/13)
6
13
  - 「Add」新增 Button Context
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-dev.1";
627
+ SDKClient.version = "2.0.7";
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-dev.1";
692
+ SDKClient.version = "2.0.7";
693
693
 
694
694
  // src/types/biz.ts
695
695
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -15,6 +15,11 @@ interface User {
15
15
  * 用户头像
16
16
  */
17
17
  avatar: string;
18
+ /**
19
+ * 所属租户
20
+ * @mobile_version >= 7.37
21
+ */
22
+ tenantId?: string;
18
23
  }
19
24
  /**
20
25
  * @public
@@ -544,7 +549,7 @@ declare enum WorkItemNodeType {
544
549
  Node = "node",
545
550
  SubTask = "sub_task",
546
551
  SubWorkItem = "sub_workitem",
547
- SuInstance = "sub_instance"
552
+ SubInstance = "sub_instance"
548
553
  }
549
554
  interface WorkItemInfo {
550
555
  spaceId: string;
@@ -1549,7 +1554,7 @@ declare abstract class Control extends BaseModel {
1549
1554
  */
1550
1555
  abstract getCreateWorkItemFormItemValues(keys: Array<{
1551
1556
  key: string | AttributeType;
1552
- type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting>;
1557
+ type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting | FieldType.simpleVoting>;
1553
1558
  }>): Promise<Record<string | AttributeType, any>>;
1554
1559
  /**
1555
1560
  * only web 2.0
@@ -1564,9 +1569,32 @@ declare abstract class Control extends BaseModel {
1564
1569
  abstract onCreateWorkItemFormValueChanged(options: {
1565
1570
  watchKeys: Array<{
1566
1571
  key: string | AttributeType;
1567
- type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting>;
1572
+ type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting | FieldType.simpleVoting>;
1568
1573
  }>;
1569
1574
  }, callback: (changedKeys: Array<string | AttributeType>) => void): Off;
1575
+ /**
1576
+ * 监听工作项表单项值变化
1577
+ * @param options.watchKeys 需要监听的工作项 字段 ID 列表
1578
+ * @param callback 当监听值发生变化时触发,changedValue 为变化的 kv
1579
+ */
1580
+ abstract onWorkItemFormValueChanged(options: {
1581
+ watchKeys: Array<{
1582
+ key: string | AttributeType;
1583
+ type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting | FieldType.simpleVoting>;
1584
+ }>;
1585
+ }, callback: (changedValue: Record<string, unknown>) => void): Promise<Off>;
1586
+ /**
1587
+ * only mobile 7.35.0+
1588
+ * 获取插件的展示态信息
1589
+ */
1590
+ abstract getDisplayInfo(): Promise<{
1591
+ display_height: number;
1592
+ }>;
1593
+ /**
1594
+ * only mobile 7.35.0+
1595
+ * 打开全屏插件
1596
+ */
1597
+ abstract openFullScreenPlugin(): void;
1570
1598
  }
1571
1599
 
1572
1600
  /**
@@ -1587,11 +1615,23 @@ declare abstract class Button extends BaseModel {
1587
1615
  * 获取当前按钮的上下文
1588
1616
  */
1589
1617
  abstract getContext(): Promise<ButtonFeatureContext>;
1618
+ /**
1619
+ * only web 2.0
1620
+ * 监听工作项表单项值变化
1621
+ * @param options.watchKeys 需要监听的工作项 字段 ID 列表
1622
+ * @param callback 当监听值发生变化时触发,changedValue 为变化的 kv
1623
+ */
1624
+ abstract onWorkItemFormValueChanged(options: {
1625
+ watchKeys: Array<{
1626
+ key: string | AttributeType;
1627
+ type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting | FieldType.simpleVoting>;
1628
+ }>;
1629
+ }, callback: (changedValue: Record<string, unknown>) => void): Promise<Off>;
1590
1630
  }
1591
1631
 
1592
1632
  /**
1593
1633
  * @public
1594
- * 控件
1634
+ * 插件配置
1595
1635
  */
1596
1636
  declare abstract class Configuration extends BaseModel {
1597
1637
  /**
@@ -1610,7 +1650,7 @@ declare abstract class Configuration extends BaseModel {
1610
1650
 
1611
1651
  /**
1612
1652
  * @public
1613
- * 控件
1653
+ * 内嵌页面
1614
1654
  */
1615
1655
  declare abstract class Page extends BaseModel {
1616
1656
  /**
@@ -1629,7 +1669,7 @@ declare abstract class Page extends BaseModel {
1629
1669
 
1630
1670
  /**
1631
1671
  * @public
1632
- * 控件
1672
+ * 详情页
1633
1673
  */
1634
1674
  declare abstract class Tab extends BaseModel {
1635
1675
  /**
@@ -1644,11 +1684,23 @@ declare abstract class Tab extends BaseModel {
1644
1684
  * 获取当前详情页 Tab 的上下文
1645
1685
  */
1646
1686
  abstract getContext(): Promise<TabFeatureContext>;
1687
+ /**
1688
+ * only web 2.0
1689
+ * 监听工作项表单项值变化
1690
+ * @param options.watchKeys 需要监听的工作项 字段 ID 列表
1691
+ * @param callback 当监听值发生变化时触发,changedValue 为变化的 kv
1692
+ */
1693
+ abstract onWorkItemFormValueChanged(options: {
1694
+ watchKeys: Array<{
1695
+ key: string | AttributeType;
1696
+ type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting | FieldType.simpleVoting>;
1697
+ }>;
1698
+ }, callback: (changedValue: Record<string, unknown>) => void): Promise<Off>;
1647
1699
  }
1648
1700
 
1649
1701
  /**
1650
1702
  * @public
1651
- * 控件
1703
+ * 视图
1652
1704
  */
1653
1705
  declare abstract class View extends BaseModel {
1654
1706
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-project/js-sdk",
3
- "version": "2.0.7-dev.1",
3
+ "version": "2.0.7",
4
4
  "runtimeMinVersions": {
5
5
  "web": "2.1.0",
6
6
  "mobile": "1.1.0"