@lark-project/js-sdk 2.0.1-dev.22 → 2.0.2-alpha.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/dist/es/index.js +2 -1
- package/dist/lib/index.js +2 -1
- package/dist/types/index.d.ts +42 -2
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -597,7 +597,7 @@ var SDKClient = _SDKClient;
|
|
|
597
597
|
/**
|
|
598
598
|
* SDK 版本号
|
|
599
599
|
*/
|
|
600
|
-
SDKClient.version = "2.0.
|
|
600
|
+
SDKClient.version = "2.0.2-alpha.0";
|
|
601
601
|
|
|
602
602
|
// src/types/biz.ts
|
|
603
603
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -607,6 +607,7 @@ var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
|
607
607
|
})(AttributeType || {});
|
|
608
608
|
var FieldType = /* @__PURE__ */ ((FieldType2) => {
|
|
609
609
|
FieldType2["unknown"] = "unknown";
|
|
610
|
+
FieldType2["control"] = "control";
|
|
610
611
|
FieldType2["text"] = "text";
|
|
611
612
|
FieldType2["richText"] = "multi_text";
|
|
612
613
|
FieldType2["select"] = "select";
|
package/dist/lib/index.js
CHANGED
|
@@ -658,7 +658,7 @@ var SDKClient = _SDKClient;
|
|
|
658
658
|
/**
|
|
659
659
|
* SDK 版本号
|
|
660
660
|
*/
|
|
661
|
-
SDKClient.version = "2.0.
|
|
661
|
+
SDKClient.version = "2.0.2-alpha.0";
|
|
662
662
|
|
|
663
663
|
// src/types/biz.ts
|
|
664
664
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -668,6 +668,7 @@ var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
|
668
668
|
})(AttributeType || {});
|
|
669
669
|
var FieldType = /* @__PURE__ */ ((FieldType2) => {
|
|
670
670
|
FieldType2["unknown"] = "unknown";
|
|
671
|
+
FieldType2["control"] = "control";
|
|
671
672
|
FieldType2["text"] = "text";
|
|
672
673
|
FieldType2["richText"] = "multi_text";
|
|
673
674
|
FieldType2["select"] = "select";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -40,6 +40,11 @@ declare enum FieldType {
|
|
|
40
40
|
* 未知字段类型
|
|
41
41
|
*/
|
|
42
42
|
unknown = "unknown",
|
|
43
|
+
/**
|
|
44
|
+
* 平台控件
|
|
45
|
+
* e.g. 角色与人员
|
|
46
|
+
*/
|
|
47
|
+
control = "control",
|
|
43
48
|
/**
|
|
44
49
|
* 文本(单行、多行)
|
|
45
50
|
*
|
|
@@ -522,6 +527,7 @@ interface InterceptFeatureContext<T> {
|
|
|
522
527
|
* @internal
|
|
523
528
|
*/
|
|
524
529
|
type unwatch = () => void;
|
|
530
|
+
type Off = unwatch;
|
|
525
531
|
|
|
526
532
|
type IIgnore = string | RegExp | ((value: string) => boolean);
|
|
527
533
|
interface IPluginCustomBuildConfig {
|
|
@@ -1250,6 +1256,7 @@ declare abstract class WorkItemFinder extends BaseModel {
|
|
|
1250
1256
|
*/
|
|
1251
1257
|
private static load;
|
|
1252
1258
|
/**
|
|
1259
|
+
* only web 2.0
|
|
1253
1260
|
* 打开工作项实例筛选条件面板
|
|
1254
1261
|
* @param options
|
|
1255
1262
|
* @param callback
|
|
@@ -1317,6 +1324,7 @@ declare abstract class ContainerModal extends BaseModel {
|
|
|
1317
1324
|
*/
|
|
1318
1325
|
abstract submit?: <Params, Result>(params: Params) => Promise<Result>;
|
|
1319
1326
|
/**
|
|
1327
|
+
* mobile version ≥ 7.22.0
|
|
1320
1328
|
* 关闭插件当前激活的容器模态框
|
|
1321
1329
|
*/
|
|
1322
1330
|
abstract close(): Promise<void>;
|
|
@@ -1336,6 +1344,7 @@ declare abstract class Intercept extends BaseModel {
|
|
|
1336
1344
|
*/
|
|
1337
1345
|
static load(): Promise<Intercept>;
|
|
1338
1346
|
/**
|
|
1347
|
+
* mobile version ≥ 7.22.0
|
|
1339
1348
|
* 获取当前触发的拦截事件上下文
|
|
1340
1349
|
*/
|
|
1341
1350
|
abstract getContext<T = any>(): Promise<InterceptFeatureContext<T>>;
|
|
@@ -1355,9 +1364,39 @@ declare abstract class Control extends BaseModel {
|
|
|
1355
1364
|
*/
|
|
1356
1365
|
static load(): Promise<Control>;
|
|
1357
1366
|
/**
|
|
1358
|
-
*
|
|
1367
|
+
* mobile version ≥ 7.25.0
|
|
1368
|
+
* 获取当前控件所在的上下文
|
|
1359
1369
|
*/
|
|
1360
1370
|
abstract getContext(): Promise<ControlFeatureContext>;
|
|
1371
|
+
/**
|
|
1372
|
+
* 获取新建工作项表单项的值
|
|
1373
|
+
* mobile version ≥ 7.29.0
|
|
1374
|
+
* @param keys 需要获取的工作项属性 / 字段 ID 列表,一次限制读取 10 个 keys
|
|
1375
|
+
* @param keys.key 工作项属性 / 字段 ID
|
|
1376
|
+
* @param keys.type 类型
|
|
1377
|
+
* 工作项属性 name 为 FieldType.text,工作项属性 template 为 FieldType.number
|
|
1378
|
+
* 控件 role_owners 为 FieldType.control
|
|
1379
|
+
*/
|
|
1380
|
+
abstract getCreateWorkItemFormItemValues(keys: Array<{
|
|
1381
|
+
key: string | AttributeType;
|
|
1382
|
+
type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting>;
|
|
1383
|
+
}>): Promise<Record<string | AttributeType, any>>;
|
|
1384
|
+
/**
|
|
1385
|
+
* only web 2.0
|
|
1386
|
+
* 监听新建工作项表单项值变化
|
|
1387
|
+
* @param options.watchKeys 需要监听的工作项属性 / 字段 ID 列表,一次限制读取 10 个 keys
|
|
1388
|
+
* @param options.watchKeys.key 工作项属性 / 字段 ID
|
|
1389
|
+
* @param options.watchKeys.type 类型
|
|
1390
|
+
* 工作项属性 name 为 FieldType.text,工作项属性 template 为 FieldType.number
|
|
1391
|
+
* 控件 role_owners 为 FieldType.control
|
|
1392
|
+
* @param callback 当监听值发生变化时触发,changedKeys 为变化的 keys
|
|
1393
|
+
*/
|
|
1394
|
+
abstract onCreateWorkItemFormValueChanged(options: {
|
|
1395
|
+
watchKeys: Array<{
|
|
1396
|
+
key: string | AttributeType;
|
|
1397
|
+
type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting>;
|
|
1398
|
+
}>;
|
|
1399
|
+
}, callback: (changedKeys: Array<string | AttributeType>) => void): Off;
|
|
1361
1400
|
}
|
|
1362
1401
|
|
|
1363
1402
|
/**
|
|
@@ -1374,6 +1413,7 @@ declare abstract class Button extends BaseModel {
|
|
|
1374
1413
|
*/
|
|
1375
1414
|
static load(): Promise<Button>;
|
|
1376
1415
|
/**
|
|
1416
|
+
* mobile version ≥ 7.24.0
|
|
1377
1417
|
* 获取当前按钮的上下文
|
|
1378
1418
|
*/
|
|
1379
1419
|
abstract getContext(): Promise<ButtonFeatureContext>;
|
|
@@ -1663,4 +1703,4 @@ declare class NotSupportedError extends CustomError {
|
|
|
1663
1703
|
* @packageDocumentation
|
|
1664
1704
|
*/
|
|
1665
1705
|
|
|
1666
|
-
export { ActionSheet, ActionSheetOptions, AttributeType, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, Configuration, ConfigurationFeatureContext, ContainerModal, Context, Control, ControlFeatureContext, CreateButtonFeatureContext, Field, FieldType, FlowMode, IMPL_KEY, IPluginCustomBuildConfig, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, MEEGO_BIZ_HUB, Modal, ModalConfirmOptions, Navigation, NoAuthError, NodeStatus, NotFoundError, NotSupportedError, OutOfLimitError, Page, PageFeatureContext, RichTextEditor, RichTextEditorContent, RichTextEditorOptions, Role, RoleOwners, SDKClient, SDKClientOptions, Space, Storage, Tab, TabFeatureContext, Toast, ToastOptions, User, Utils, View, ViewFeatureContext, WorkItem, WorkItemButtonFeatureContext, WorkItemCreateFormPreset, WorkItemFinder, WorkItemFinderOptions, WorkObject, SDKClient as default, unwatch };
|
|
1706
|
+
export { ActionSheet, ActionSheetOptions, AttributeType, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, Configuration, ConfigurationFeatureContext, ContainerModal, Context, Control, ControlFeatureContext, CreateButtonFeatureContext, Field, FieldType, FlowMode, IMPL_KEY, IPluginCustomBuildConfig, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, MEEGO_BIZ_HUB, Modal, ModalConfirmOptions, Navigation, NoAuthError, NodeStatus, NotFoundError, NotSupportedError, Off, OutOfLimitError, Page, PageFeatureContext, RichTextEditor, RichTextEditorContent, RichTextEditorOptions, Role, RoleOwners, SDKClient, SDKClientOptions, Space, Storage, Tab, TabFeatureContext, Toast, ToastOptions, User, Utils, View, ViewFeatureContext, WorkItem, WorkItemButtonFeatureContext, WorkItemCreateFormPreset, WorkItemFinder, WorkItemFinderOptions, WorkObject, SDKClient as default, unwatch };
|