@lark-project/js-sdk 2.0.1-alpha.7 → 2.0.1-alpha.9
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 +4 -0
- package/dist/es/index.js +35 -7
- package/dist/lib/index.js +36 -7
- package/dist/types/index.d.ts +53 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/es/index.js
CHANGED
|
@@ -276,9 +276,9 @@ _a13 = IMPL_KEY;
|
|
|
276
276
|
*/
|
|
277
277
|
Utils[_a13] = "utils";
|
|
278
278
|
|
|
279
|
-
// src/features/
|
|
279
|
+
// src/features/ContainerModal.ts
|
|
280
280
|
var _a14;
|
|
281
|
-
var
|
|
281
|
+
var ContainerModal = class extends BaseModel {
|
|
282
282
|
/**
|
|
283
283
|
* 加载数据
|
|
284
284
|
*/
|
|
@@ -290,11 +290,11 @@ _a14 = IMPL_KEY;
|
|
|
290
290
|
/**
|
|
291
291
|
* @internal
|
|
292
292
|
*/
|
|
293
|
-
|
|
293
|
+
ContainerModal[_a14] = "ContainerModal";
|
|
294
294
|
|
|
295
|
-
// src/features/
|
|
295
|
+
// src/features/Intercept.ts
|
|
296
296
|
var _a15;
|
|
297
|
-
var
|
|
297
|
+
var Intercept = class extends BaseModel {
|
|
298
298
|
/**
|
|
299
299
|
* 加载数据
|
|
300
300
|
*/
|
|
@@ -306,7 +306,23 @@ _a15 = IMPL_KEY;
|
|
|
306
306
|
/**
|
|
307
307
|
* @internal
|
|
308
308
|
*/
|
|
309
|
-
|
|
309
|
+
Intercept[_a15] = "Intercept";
|
|
310
|
+
|
|
311
|
+
// src/features/Control.ts
|
|
312
|
+
var _a16;
|
|
313
|
+
var Control = class extends BaseModel {
|
|
314
|
+
/**
|
|
315
|
+
* 加载数据
|
|
316
|
+
*/
|
|
317
|
+
static load() {
|
|
318
|
+
throw new Error("not implemented");
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
_a16 = IMPL_KEY;
|
|
322
|
+
/**
|
|
323
|
+
* @internal
|
|
324
|
+
*/
|
|
325
|
+
Control[_a16] = "Control";
|
|
310
326
|
|
|
311
327
|
// src/client.ts
|
|
312
328
|
function getImplClass(decl, impls) {
|
|
@@ -318,16 +334,25 @@ function getImplValue(decl, impls) {
|
|
|
318
334
|
var _SDKClient = class {
|
|
319
335
|
/**
|
|
320
336
|
* 插件容器模态框
|
|
337
|
+
* only 2.0
|
|
321
338
|
*/
|
|
322
339
|
get containerModal() {
|
|
323
340
|
return getImplValue(ContainerModal, this._meegoBizHub);
|
|
324
341
|
}
|
|
325
342
|
/**
|
|
326
343
|
* 拦截事件点位容器特有能力
|
|
344
|
+
* only 2.0
|
|
327
345
|
*/
|
|
328
346
|
get intercept() {
|
|
329
347
|
return getImplValue(Intercept, this._meegoBizHub);
|
|
330
348
|
}
|
|
349
|
+
/**
|
|
350
|
+
* 控件点位容器特有能力
|
|
351
|
+
* only 2.0
|
|
352
|
+
*/
|
|
353
|
+
get control() {
|
|
354
|
+
return getImplValue(Control, this._meegoBizHub);
|
|
355
|
+
}
|
|
331
356
|
/**
|
|
332
357
|
* 应用导航
|
|
333
358
|
*/
|
|
@@ -354,6 +379,7 @@ var _SDKClient = class {
|
|
|
354
379
|
}
|
|
355
380
|
/**
|
|
356
381
|
* 富文本编辑器
|
|
382
|
+
* only 2.0
|
|
357
383
|
*/
|
|
358
384
|
get richTextEditor() {
|
|
359
385
|
return getImplValue(RichTextEditor, this._meegoBizHub);
|
|
@@ -366,6 +392,7 @@ var _SDKClient = class {
|
|
|
366
392
|
}
|
|
367
393
|
/**
|
|
368
394
|
* 操作菜单
|
|
395
|
+
* only mobile 2.0
|
|
369
396
|
*/
|
|
370
397
|
get actionSheet() {
|
|
371
398
|
return getImplValue(ActionSheet, this._meegoBizHub);
|
|
@@ -432,7 +459,7 @@ var SDKClient = _SDKClient;
|
|
|
432
459
|
/**
|
|
433
460
|
* SDK 版本号
|
|
434
461
|
*/
|
|
435
|
-
SDKClient.version = "2.0.1-alpha.
|
|
462
|
+
SDKClient.version = "2.0.1-alpha.9";
|
|
436
463
|
|
|
437
464
|
// src/types/biz.ts
|
|
438
465
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -575,6 +602,7 @@ export {
|
|
|
575
602
|
Clipboard,
|
|
576
603
|
ContainerModal,
|
|
577
604
|
Context,
|
|
605
|
+
Control,
|
|
578
606
|
Field,
|
|
579
607
|
FieldType,
|
|
580
608
|
FlowMode,
|
package/dist/lib/index.js
CHANGED
|
@@ -54,6 +54,7 @@ __export(src_exports, {
|
|
|
54
54
|
Clipboard: () => Clipboard,
|
|
55
55
|
ContainerModal: () => ContainerModal,
|
|
56
56
|
Context: () => Context,
|
|
57
|
+
Control: () => Control,
|
|
57
58
|
Field: () => Field,
|
|
58
59
|
FieldType: () => FieldType,
|
|
59
60
|
FlowMode: () => FlowMode,
|
|
@@ -329,9 +330,9 @@ _a13 = IMPL_KEY;
|
|
|
329
330
|
*/
|
|
330
331
|
Utils[_a13] = "utils";
|
|
331
332
|
|
|
332
|
-
// src/features/
|
|
333
|
+
// src/features/ContainerModal.ts
|
|
333
334
|
var _a14;
|
|
334
|
-
var
|
|
335
|
+
var ContainerModal = class extends BaseModel {
|
|
335
336
|
/**
|
|
336
337
|
* 加载数据
|
|
337
338
|
*/
|
|
@@ -343,11 +344,11 @@ _a14 = IMPL_KEY;
|
|
|
343
344
|
/**
|
|
344
345
|
* @internal
|
|
345
346
|
*/
|
|
346
|
-
|
|
347
|
+
ContainerModal[_a14] = "ContainerModal";
|
|
347
348
|
|
|
348
|
-
// src/features/
|
|
349
|
+
// src/features/Intercept.ts
|
|
349
350
|
var _a15;
|
|
350
|
-
var
|
|
351
|
+
var Intercept = class extends BaseModel {
|
|
351
352
|
/**
|
|
352
353
|
* 加载数据
|
|
353
354
|
*/
|
|
@@ -359,7 +360,23 @@ _a15 = IMPL_KEY;
|
|
|
359
360
|
/**
|
|
360
361
|
* @internal
|
|
361
362
|
*/
|
|
362
|
-
|
|
363
|
+
Intercept[_a15] = "Intercept";
|
|
364
|
+
|
|
365
|
+
// src/features/Control.ts
|
|
366
|
+
var _a16;
|
|
367
|
+
var Control = class extends BaseModel {
|
|
368
|
+
/**
|
|
369
|
+
* 加载数据
|
|
370
|
+
*/
|
|
371
|
+
static load() {
|
|
372
|
+
throw new Error("not implemented");
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
_a16 = IMPL_KEY;
|
|
376
|
+
/**
|
|
377
|
+
* @internal
|
|
378
|
+
*/
|
|
379
|
+
Control[_a16] = "Control";
|
|
363
380
|
|
|
364
381
|
// src/client.ts
|
|
365
382
|
function getImplClass(decl, impls) {
|
|
@@ -371,16 +388,25 @@ function getImplValue(decl, impls) {
|
|
|
371
388
|
var _SDKClient = class {
|
|
372
389
|
/**
|
|
373
390
|
* 插件容器模态框
|
|
391
|
+
* only 2.0
|
|
374
392
|
*/
|
|
375
393
|
get containerModal() {
|
|
376
394
|
return getImplValue(ContainerModal, this._meegoBizHub);
|
|
377
395
|
}
|
|
378
396
|
/**
|
|
379
397
|
* 拦截事件点位容器特有能力
|
|
398
|
+
* only 2.0
|
|
380
399
|
*/
|
|
381
400
|
get intercept() {
|
|
382
401
|
return getImplValue(Intercept, this._meegoBizHub);
|
|
383
402
|
}
|
|
403
|
+
/**
|
|
404
|
+
* 控件点位容器特有能力
|
|
405
|
+
* only 2.0
|
|
406
|
+
*/
|
|
407
|
+
get control() {
|
|
408
|
+
return getImplValue(Control, this._meegoBizHub);
|
|
409
|
+
}
|
|
384
410
|
/**
|
|
385
411
|
* 应用导航
|
|
386
412
|
*/
|
|
@@ -407,6 +433,7 @@ var _SDKClient = class {
|
|
|
407
433
|
}
|
|
408
434
|
/**
|
|
409
435
|
* 富文本编辑器
|
|
436
|
+
* only 2.0
|
|
410
437
|
*/
|
|
411
438
|
get richTextEditor() {
|
|
412
439
|
return getImplValue(RichTextEditor, this._meegoBizHub);
|
|
@@ -419,6 +446,7 @@ var _SDKClient = class {
|
|
|
419
446
|
}
|
|
420
447
|
/**
|
|
421
448
|
* 操作菜单
|
|
449
|
+
* only mobile 2.0
|
|
422
450
|
*/
|
|
423
451
|
get actionSheet() {
|
|
424
452
|
return getImplValue(ActionSheet, this._meegoBizHub);
|
|
@@ -485,7 +513,7 @@ var SDKClient = _SDKClient;
|
|
|
485
513
|
/**
|
|
486
514
|
* SDK 版本号
|
|
487
515
|
*/
|
|
488
|
-
SDKClient.version = "2.0.1-alpha.
|
|
516
|
+
SDKClient.version = "2.0.1-alpha.9";
|
|
489
517
|
|
|
490
518
|
// src/types/biz.ts
|
|
491
519
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -629,6 +657,7 @@ var src_default = SDKClient;
|
|
|
629
657
|
Clipboard,
|
|
630
658
|
ContainerModal,
|
|
631
659
|
Context,
|
|
660
|
+
Control,
|
|
632
661
|
Field,
|
|
633
662
|
FieldType,
|
|
634
663
|
FlowMode,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -397,10 +397,27 @@ interface ViewFeatureContext {
|
|
|
397
397
|
}
|
|
398
398
|
/**
|
|
399
399
|
* 控件构成
|
|
400
|
-
* 可被配置于详情页、节点流转、状态流转表单、表格页并可用于筛选和分组
|
|
401
400
|
*/
|
|
402
401
|
interface ControlFeatureContext {
|
|
403
|
-
|
|
402
|
+
/**
|
|
403
|
+
* 控件当前所属空间标识
|
|
404
|
+
*/
|
|
405
|
+
spaceId: string;
|
|
406
|
+
/**
|
|
407
|
+
* 控件当前所属工作项类型标识
|
|
408
|
+
*/
|
|
409
|
+
workObjectId: string;
|
|
410
|
+
/**
|
|
411
|
+
* 控件当前所属工作项实例标识
|
|
412
|
+
* 新建页表单内该值为空
|
|
413
|
+
*/
|
|
414
|
+
workItemId?: number;
|
|
415
|
+
/**
|
|
416
|
+
* 控件唯一标识
|
|
417
|
+
* 新建场景结合 webhook 用于关联自有数据
|
|
418
|
+
* 详情页可能为空,不推荐强依赖 UUID 读取自有数据
|
|
419
|
+
*/
|
|
420
|
+
UUID?: string;
|
|
404
421
|
}
|
|
405
422
|
/**
|
|
406
423
|
* 拦截事件类型
|
|
@@ -1126,6 +1143,25 @@ declare abstract class Utils extends BaseModel {
|
|
|
1126
1143
|
}>;
|
|
1127
1144
|
}
|
|
1128
1145
|
|
|
1146
|
+
/**
|
|
1147
|
+
* @public
|
|
1148
|
+
* 插件容器模态框
|
|
1149
|
+
*/
|
|
1150
|
+
declare abstract class ContainerModal extends BaseModel {
|
|
1151
|
+
/**
|
|
1152
|
+
* @internal
|
|
1153
|
+
*/
|
|
1154
|
+
protected static [IMPL_KEY]: string;
|
|
1155
|
+
/**
|
|
1156
|
+
* 加载数据
|
|
1157
|
+
*/
|
|
1158
|
+
static load(): Promise<ContainerModal>;
|
|
1159
|
+
/**
|
|
1160
|
+
* 关闭插件当前激活的容器模态框
|
|
1161
|
+
*/
|
|
1162
|
+
abstract closeModal: Promise<void>;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1129
1165
|
/**
|
|
1130
1166
|
* @public
|
|
1131
1167
|
* 拦截事件模态框
|
|
@@ -1147,9 +1183,9 @@ declare abstract class Intercept extends BaseModel {
|
|
|
1147
1183
|
|
|
1148
1184
|
/**
|
|
1149
1185
|
* @public
|
|
1150
|
-
*
|
|
1186
|
+
* 控件
|
|
1151
1187
|
*/
|
|
1152
|
-
declare abstract class
|
|
1188
|
+
declare abstract class Control extends BaseModel {
|
|
1153
1189
|
/**
|
|
1154
1190
|
* @internal
|
|
1155
1191
|
*/
|
|
@@ -1157,11 +1193,11 @@ declare abstract class ContainerModal extends BaseModel {
|
|
|
1157
1193
|
/**
|
|
1158
1194
|
* 加载数据
|
|
1159
1195
|
*/
|
|
1160
|
-
static load(): Promise<
|
|
1196
|
+
static load(): Promise<Control>;
|
|
1161
1197
|
/**
|
|
1162
|
-
*
|
|
1198
|
+
* 获取当前控件的上下文
|
|
1163
1199
|
*/
|
|
1164
|
-
abstract
|
|
1200
|
+
abstract getContext(): Promise<ControlFeatureContext>;
|
|
1165
1201
|
}
|
|
1166
1202
|
|
|
1167
1203
|
/**
|
|
@@ -1183,12 +1219,19 @@ declare class SDKClient {
|
|
|
1183
1219
|
static version: string;
|
|
1184
1220
|
/**
|
|
1185
1221
|
* 插件容器模态框
|
|
1222
|
+
* only 2.0
|
|
1186
1223
|
*/
|
|
1187
1224
|
get containerModal(): ContainerModal;
|
|
1188
1225
|
/**
|
|
1189
1226
|
* 拦截事件点位容器特有能力
|
|
1227
|
+
* only 2.0
|
|
1190
1228
|
*/
|
|
1191
1229
|
get intercept(): Intercept;
|
|
1230
|
+
/**
|
|
1231
|
+
* 控件点位容器特有能力
|
|
1232
|
+
* only 2.0
|
|
1233
|
+
*/
|
|
1234
|
+
get control(): Control;
|
|
1192
1235
|
/**
|
|
1193
1236
|
* 应用导航
|
|
1194
1237
|
*/
|
|
@@ -1207,6 +1250,7 @@ declare class SDKClient {
|
|
|
1207
1250
|
get toast(): Toast;
|
|
1208
1251
|
/**
|
|
1209
1252
|
* 富文本编辑器
|
|
1253
|
+
* only 2.0
|
|
1210
1254
|
*/
|
|
1211
1255
|
get richTextEditor(): RichTextEditor;
|
|
1212
1256
|
/**
|
|
@@ -1215,6 +1259,7 @@ declare class SDKClient {
|
|
|
1215
1259
|
get modal(): Modal;
|
|
1216
1260
|
/**
|
|
1217
1261
|
* 操作菜单
|
|
1262
|
+
* only mobile 2.0
|
|
1218
1263
|
*/
|
|
1219
1264
|
get actionSheet(): ActionSheet;
|
|
1220
1265
|
/**
|
|
@@ -1323,4 +1368,4 @@ declare class InvalidParamsError extends CustomError {
|
|
|
1323
1368
|
* @packageDocumentation
|
|
1324
1369
|
*/
|
|
1325
1370
|
|
|
1326
|
-
export { ActionSheet, ActionSheetOptions, AttributeType, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, ContainerModal, Context, ControlFeatureContext, Field, FieldType, FlowMode, IMPL_KEY, IPluginCustomBuildConfig, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, MEEGO_BIZ_HUB, Modal, ModalOptions, Navigation, NoAuthError, NodeStatus, NotFoundError, OutOfLimitError, PageFeatureContext, RichTextEditor, RichTextEditorContent, RichTextEditorOptions, Role, RoleOwners, SDKClient, SDKClientOptions, Space, Storage, TabFeatureContext, Toast, ToastOptions, User, Utils, ViewFeatureContext, WorkItem, WorkItemCreateFormPreset, WorkObject, SDKClient as default, unwatch };
|
|
1371
|
+
export { ActionSheet, ActionSheetOptions, AttributeType, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, ContainerModal, Context, Control, ControlFeatureContext, Field, FieldType, FlowMode, IMPL_KEY, IPluginCustomBuildConfig, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, MEEGO_BIZ_HUB, Modal, ModalOptions, Navigation, NoAuthError, NodeStatus, NotFoundError, OutOfLimitError, PageFeatureContext, RichTextEditor, RichTextEditorContent, RichTextEditorOptions, Role, RoleOwners, SDKClient, SDKClientOptions, Space, Storage, TabFeatureContext, Toast, ToastOptions, User, Utils, ViewFeatureContext, WorkItem, WorkItemCreateFormPreset, WorkObject, SDKClient as default, unwatch };
|