@lark-project/js-sdk 2.0.1-alpha.7 → 2.0.1-alpha.8

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,8 @@
1
1
  # Change Log
2
+ ## 2.0.2(2024/07/11)
3
+ - 「Add」新增 ContainerModal
4
+ - 「Add」新增 Intercept
5
+
2
6
  ## 2.0.1(2024/05/22)
3
7
  - 「Add」新增 RichTextEditor
4
8
 
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/Intercept.ts
279
+ // src/features/ContainerModal.ts
280
280
  var _a14;
281
- var Intercept = class extends BaseModel {
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
- Intercept[_a14] = "Intercept";
293
+ ContainerModal[_a14] = "ContainerModal";
294
294
 
295
- // src/features/ContainerModal.ts
295
+ // src/features/Intercept.ts
296
296
  var _a15;
297
- var ContainerModal = class extends BaseModel {
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
- ContainerModal[_a15] = "ContainerModal";
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,12 +334,14 @@ 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);
@@ -354,6 +372,7 @@ var _SDKClient = class {
354
372
  }
355
373
  /**
356
374
  * 富文本编辑器
375
+ * only 2.0
357
376
  */
358
377
  get richTextEditor() {
359
378
  return getImplValue(RichTextEditor, this._meegoBizHub);
@@ -366,6 +385,7 @@ var _SDKClient = class {
366
385
  }
367
386
  /**
368
387
  * 操作菜单
388
+ * only mobile 2.0
369
389
  */
370
390
  get actionSheet() {
371
391
  return getImplValue(ActionSheet, this._meegoBizHub);
@@ -432,7 +452,7 @@ var SDKClient = _SDKClient;
432
452
  /**
433
453
  * SDK 版本号
434
454
  */
435
- SDKClient.version = "2.0.1-alpha.7";
455
+ SDKClient.version = "2.0.1-alpha.8";
436
456
 
437
457
  // src/types/biz.ts
438
458
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -575,6 +595,7 @@ export {
575
595
  Clipboard,
576
596
  ContainerModal,
577
597
  Context,
598
+ Control,
578
599
  Field,
579
600
  FieldType,
580
601
  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/Intercept.ts
333
+ // src/features/ContainerModal.ts
333
334
  var _a14;
334
- var Intercept = class extends BaseModel {
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
- Intercept[_a14] = "Intercept";
347
+ ContainerModal[_a14] = "ContainerModal";
347
348
 
348
- // src/features/ContainerModal.ts
349
+ // src/features/Intercept.ts
349
350
  var _a15;
350
- var ContainerModal = class extends BaseModel {
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
- ContainerModal[_a15] = "ContainerModal";
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,12 +388,14 @@ 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);
@@ -407,6 +426,7 @@ var _SDKClient = class {
407
426
  }
408
427
  /**
409
428
  * 富文本编辑器
429
+ * only 2.0
410
430
  */
411
431
  get richTextEditor() {
412
432
  return getImplValue(RichTextEditor, this._meegoBizHub);
@@ -419,6 +439,7 @@ var _SDKClient = class {
419
439
  }
420
440
  /**
421
441
  * 操作菜单
442
+ * only mobile 2.0
422
443
  */
423
444
  get actionSheet() {
424
445
  return getImplValue(ActionSheet, this._meegoBizHub);
@@ -485,7 +506,7 @@ var SDKClient = _SDKClient;
485
506
  /**
486
507
  * SDK 版本号
487
508
  */
488
- SDKClient.version = "2.0.1-alpha.7";
509
+ SDKClient.version = "2.0.1-alpha.8";
489
510
 
490
511
  // src/types/biz.ts
491
512
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -629,6 +650,7 @@ var src_default = SDKClient;
629
650
  Clipboard,
630
651
  ContainerModal,
631
652
  Context,
653
+ Control,
632
654
  Field,
633
655
  FieldType,
634
656
  FlowMode,
@@ -397,10 +397,27 @@ interface ViewFeatureContext {
397
397
  }
398
398
  /**
399
399
  * 控件构成
400
- * 可被配置于详情页、节点流转、状态流转表单、表格页并可用于筛选和分组
401
400
  */
402
401
  interface ControlFeatureContext {
403
- [key: string]: any;
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 ContainerModal extends BaseModel {
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<ContainerModal>;
1196
+ static load(): Promise<Control>;
1161
1197
  /**
1162
- * 关闭插件当前激活的容器模态框
1198
+ * 获取当前控件的上下文
1163
1199
  */
1164
- abstract closeModal: Promise<void>;
1200
+ abstract getContext(): Promise<ControlFeatureContext>;
1165
1201
  }
1166
1202
 
1167
1203
  /**
@@ -1183,10 +1219,12 @@ 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;
1192
1230
  /**
@@ -1207,6 +1245,7 @@ declare class SDKClient {
1207
1245
  get toast(): Toast;
1208
1246
  /**
1209
1247
  * 富文本编辑器
1248
+ * only 2.0
1210
1249
  */
1211
1250
  get richTextEditor(): RichTextEditor;
1212
1251
  /**
@@ -1215,6 +1254,7 @@ declare class SDKClient {
1215
1254
  get modal(): Modal;
1216
1255
  /**
1217
1256
  * 操作菜单
1257
+ * only mobile 2.0
1218
1258
  */
1219
1259
  get actionSheet(): ActionSheet;
1220
1260
  /**
@@ -1323,4 +1363,4 @@ declare class InvalidParamsError extends CustomError {
1323
1363
  * @packageDocumentation
1324
1364
  */
1325
1365
 
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 };
1366
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-project/js-sdk",
3
- "version": "2.0.1-alpha.7",
3
+ "version": "2.0.1-alpha.8",
4
4
  "runtimeMinVersions": {
5
5
  "web": "2.1.0",
6
6
  "mobile": "1.1.0"