@lark-project/js-sdk 2.0.7-dev.1 → 2.0.8-dev.0
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 +7 -0
- package/dist/es/index.js +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/types/index.d.ts +87 -9
- package/package.json +1 -1
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
package/dist/lib/index.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -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
|
|
@@ -374,10 +379,36 @@ interface CreateButtonFeatureContext {
|
|
|
374
379
|
*/
|
|
375
380
|
viewId?: string;
|
|
376
381
|
}
|
|
382
|
+
/**
|
|
383
|
+
* 视图批量按钮上下文
|
|
384
|
+
* 适用场景:普通视图、工作项主页视图、工作台视图组件
|
|
385
|
+
*/
|
|
386
|
+
interface BatchButtonFeatureContext {
|
|
387
|
+
/**
|
|
388
|
+
* 视图所属空间标识
|
|
389
|
+
*/
|
|
390
|
+
spaceId: string;
|
|
391
|
+
/**
|
|
392
|
+
* 视图所属工作项类型标识
|
|
393
|
+
*/
|
|
394
|
+
workObjectId: string;
|
|
395
|
+
/**
|
|
396
|
+
* 视图标识
|
|
397
|
+
*/
|
|
398
|
+
viewId?: string;
|
|
399
|
+
/**
|
|
400
|
+
* 勾选的工作项实例
|
|
401
|
+
*/
|
|
402
|
+
selectedWorkItems: Array<{
|
|
403
|
+
spaceId: string;
|
|
404
|
+
workObjectId: string;
|
|
405
|
+
workItemIds: number[];
|
|
406
|
+
}>;
|
|
407
|
+
}
|
|
377
408
|
/**
|
|
378
409
|
* 按钮构成
|
|
379
410
|
*/
|
|
380
|
-
type ButtonFeatureContext = WorkItemButtonFeatureContext | CreateButtonFeatureContext;
|
|
411
|
+
type ButtonFeatureContext = WorkItemButtonFeatureContext | CreateButtonFeatureContext | BatchButtonFeatureContext;
|
|
381
412
|
/**
|
|
382
413
|
* 内嵌页面构成
|
|
383
414
|
* 一个单独的导航入口+内嵌页面
|
|
@@ -544,7 +575,7 @@ declare enum WorkItemNodeType {
|
|
|
544
575
|
Node = "node",
|
|
545
576
|
SubTask = "sub_task",
|
|
546
577
|
SubWorkItem = "sub_workitem",
|
|
547
|
-
|
|
578
|
+
SubInstance = "sub_instance"
|
|
548
579
|
}
|
|
549
580
|
interface WorkItemInfo {
|
|
550
581
|
spaceId: string;
|
|
@@ -1549,7 +1580,7 @@ declare abstract class Control extends BaseModel {
|
|
|
1549
1580
|
*/
|
|
1550
1581
|
abstract getCreateWorkItemFormItemValues(keys: Array<{
|
|
1551
1582
|
key: string | AttributeType;
|
|
1552
|
-
type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting>;
|
|
1583
|
+
type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting | FieldType.simpleVoting>;
|
|
1553
1584
|
}>): Promise<Record<string | AttributeType, any>>;
|
|
1554
1585
|
/**
|
|
1555
1586
|
* only web 2.0
|
|
@@ -1564,9 +1595,32 @@ declare abstract class Control extends BaseModel {
|
|
|
1564
1595
|
abstract onCreateWorkItemFormValueChanged(options: {
|
|
1565
1596
|
watchKeys: Array<{
|
|
1566
1597
|
key: string | AttributeType;
|
|
1567
|
-
type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting>;
|
|
1598
|
+
type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting | FieldType.simpleVoting>;
|
|
1568
1599
|
}>;
|
|
1569
1600
|
}, callback: (changedKeys: Array<string | AttributeType>) => void): Off;
|
|
1601
|
+
/**
|
|
1602
|
+
* 监听工作项表单项值变化
|
|
1603
|
+
* @param options.watchKeys 需要监听的工作项 字段 ID 列表
|
|
1604
|
+
* @param callback 当监听值发生变化时触发,changedValue 为变化的 kv
|
|
1605
|
+
*/
|
|
1606
|
+
abstract onWorkItemFormValueChanged(options: {
|
|
1607
|
+
watchKeys: Array<{
|
|
1608
|
+
key: string | AttributeType;
|
|
1609
|
+
type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting | FieldType.simpleVoting>;
|
|
1610
|
+
}>;
|
|
1611
|
+
}, callback: (changedValue: Record<string, unknown>) => void): Promise<Off>;
|
|
1612
|
+
/**
|
|
1613
|
+
* only mobile 7.35.0+
|
|
1614
|
+
* 获取插件的展示态信息
|
|
1615
|
+
*/
|
|
1616
|
+
abstract getDisplayInfo(): Promise<{
|
|
1617
|
+
display_height: number;
|
|
1618
|
+
}>;
|
|
1619
|
+
/**
|
|
1620
|
+
* only mobile 7.35.0+
|
|
1621
|
+
* 打开全屏插件
|
|
1622
|
+
*/
|
|
1623
|
+
abstract openFullScreenPlugin(): void;
|
|
1570
1624
|
}
|
|
1571
1625
|
|
|
1572
1626
|
/**
|
|
@@ -1587,11 +1641,23 @@ declare abstract class Button extends BaseModel {
|
|
|
1587
1641
|
* 获取当前按钮的上下文
|
|
1588
1642
|
*/
|
|
1589
1643
|
abstract getContext(): Promise<ButtonFeatureContext>;
|
|
1644
|
+
/**
|
|
1645
|
+
* only web 2.0
|
|
1646
|
+
* 监听工作项表单项值变化
|
|
1647
|
+
* @param options.watchKeys 需要监听的工作项 字段 ID 列表
|
|
1648
|
+
* @param callback 当监听值发生变化时触发,changedValue 为变化的 kv
|
|
1649
|
+
*/
|
|
1650
|
+
abstract onWorkItemFormValueChanged(options: {
|
|
1651
|
+
watchKeys: Array<{
|
|
1652
|
+
key: string | AttributeType;
|
|
1653
|
+
type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting | FieldType.simpleVoting>;
|
|
1654
|
+
}>;
|
|
1655
|
+
}, callback: (changedValue: Record<string, unknown>) => void): Promise<Off>;
|
|
1590
1656
|
}
|
|
1591
1657
|
|
|
1592
1658
|
/**
|
|
1593
1659
|
* @public
|
|
1594
|
-
*
|
|
1660
|
+
* 插件配置
|
|
1595
1661
|
*/
|
|
1596
1662
|
declare abstract class Configuration extends BaseModel {
|
|
1597
1663
|
/**
|
|
@@ -1610,7 +1676,7 @@ declare abstract class Configuration extends BaseModel {
|
|
|
1610
1676
|
|
|
1611
1677
|
/**
|
|
1612
1678
|
* @public
|
|
1613
|
-
*
|
|
1679
|
+
* 内嵌页面
|
|
1614
1680
|
*/
|
|
1615
1681
|
declare abstract class Page extends BaseModel {
|
|
1616
1682
|
/**
|
|
@@ -1629,7 +1695,7 @@ declare abstract class Page extends BaseModel {
|
|
|
1629
1695
|
|
|
1630
1696
|
/**
|
|
1631
1697
|
* @public
|
|
1632
|
-
*
|
|
1698
|
+
* 详情页
|
|
1633
1699
|
*/
|
|
1634
1700
|
declare abstract class Tab extends BaseModel {
|
|
1635
1701
|
/**
|
|
@@ -1644,11 +1710,23 @@ declare abstract class Tab extends BaseModel {
|
|
|
1644
1710
|
* 获取当前详情页 Tab 的上下文
|
|
1645
1711
|
*/
|
|
1646
1712
|
abstract getContext(): Promise<TabFeatureContext>;
|
|
1713
|
+
/**
|
|
1714
|
+
* only web 2.0
|
|
1715
|
+
* 监听工作项表单项值变化
|
|
1716
|
+
* @param options.watchKeys 需要监听的工作项 字段 ID 列表
|
|
1717
|
+
* @param callback 当监听值发生变化时触发,changedValue 为变化的 kv
|
|
1718
|
+
*/
|
|
1719
|
+
abstract onWorkItemFormValueChanged(options: {
|
|
1720
|
+
watchKeys: Array<{
|
|
1721
|
+
key: string | AttributeType;
|
|
1722
|
+
type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting | FieldType.simpleVoting>;
|
|
1723
|
+
}>;
|
|
1724
|
+
}, callback: (changedValue: Record<string, unknown>) => void): Promise<Off>;
|
|
1647
1725
|
}
|
|
1648
1726
|
|
|
1649
1727
|
/**
|
|
1650
1728
|
* @public
|
|
1651
|
-
*
|
|
1729
|
+
* 视图
|
|
1652
1730
|
*/
|
|
1653
1731
|
declare abstract class View extends BaseModel {
|
|
1654
1732
|
/**
|
|
@@ -1905,4 +1983,4 @@ declare class NotSupportedError extends CustomError {
|
|
|
1905
1983
|
* @packageDocumentation
|
|
1906
1984
|
*/
|
|
1907
1985
|
|
|
1908
|
-
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 };
|
|
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 };
|