@lark-project/js-sdk 2.0.1-alpha.3 → 2.0.1-alpha.5

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 CHANGED
@@ -276,6 +276,38 @@ _a13 = IMPL_KEY;
276
276
  */
277
277
  Utils[_a13] = "utils";
278
278
 
279
+ // src/features/Intercept.ts
280
+ var _a14;
281
+ var Intercept = class extends BaseModel {
282
+ /**
283
+ * 加载数据
284
+ */
285
+ static load() {
286
+ throw new Error("not implemented");
287
+ }
288
+ };
289
+ _a14 = IMPL_KEY;
290
+ /**
291
+ * @internal
292
+ */
293
+ Intercept[_a14] = "Intercept";
294
+
295
+ // src/features/ContainerModal.ts
296
+ var _a15;
297
+ var ContainerModal = class extends BaseModel {
298
+ /**
299
+ * 加载数据
300
+ */
301
+ static load() {
302
+ throw new Error("not implemented");
303
+ }
304
+ };
305
+ _a15 = IMPL_KEY;
306
+ /**
307
+ * @internal
308
+ */
309
+ ContainerModal[_a15] = "ContainerModal";
310
+
279
311
  // src/client.ts
280
312
  function getImplClass(decl, impls) {
281
313
  return impls == null ? void 0 : impls[decl[IMPL_KEY]];
@@ -284,6 +316,18 @@ function getImplValue(decl, impls) {
284
316
  return impls == null ? void 0 : impls[decl[IMPL_KEY]];
285
317
  }
286
318
  var _SDKClient = class {
319
+ /**
320
+ * 插件容器模态框
321
+ */
322
+ get containerModal() {
323
+ return getImplValue(ContainerModal, this._meegoBizHub);
324
+ }
325
+ /**
326
+ * 拦截事件点位容器特有能力
327
+ */
328
+ get intercept() {
329
+ return getImplValue(Intercept, this._meegoBizHub);
330
+ }
287
331
  /**
288
332
  * 应用导航
289
333
  */
@@ -388,7 +432,7 @@ var SDKClient = _SDKClient;
388
432
  /**
389
433
  * SDK 版本号
390
434
  */
391
- SDKClient.version = "2.0.1-alpha.3";
435
+ SDKClient.version = "2.0.1-alpha.5";
392
436
 
393
437
  // src/types/biz.ts
394
438
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -441,23 +485,23 @@ var ButtonScene = /* @__PURE__ */ ((ButtonScene2) => {
441
485
  ButtonScene2[ButtonScene2["workItemNode"] = 4] = "workItemNode";
442
486
  return ButtonScene2;
443
487
  })(ButtonScene || {});
444
- var InterceptionEvent = /* @__PURE__ */ ((InterceptionEvent2) => {
445
- InterceptionEvent2[InterceptionEvent2["CreateWorkItem"] = 1001] = "CreateWorkItem";
446
- InterceptionEvent2[InterceptionEvent2["DeleteWorkItem"] = 1002] = "DeleteWorkItem";
447
- InterceptionEvent2[InterceptionEvent2["BatchDeleteWorkItem"] = 1003] = "BatchDeleteWorkItem";
448
- InterceptionEvent2[InterceptionEvent2["RecoveryWorkItem"] = 1004] = "RecoveryWorkItem";
449
- InterceptionEvent2[InterceptionEvent2["AbortWorkItem"] = 1005] = "AbortWorkItem";
450
- InterceptionEvent2[InterceptionEvent2["UpgradeTemplate"] = 1006] = "UpgradeTemplate";
451
- InterceptionEvent2[InterceptionEvent2["BatchUpgradeTemplate"] = 1007] = "BatchUpgradeTemplate";
452
- InterceptionEvent2[InterceptionEvent2["ExportWorkItem"] = 1008] = "ExportWorkItem";
453
- InterceptionEvent2[InterceptionEvent2["FinishNode"] = 2001] = "FinishNode";
454
- InterceptionEvent2[InterceptionEvent2["DeleteNode"] = 2002] = "DeleteNode";
455
- InterceptionEvent2[InterceptionEvent2["RecoveryNode"] = 2003] = "RecoveryNode";
456
- InterceptionEvent2[InterceptionEvent2["RollBackNode"] = 2004] = "RollBackNode";
457
- InterceptionEvent2[InterceptionEvent2["EditSchedule"] = 2005] = "EditSchedule";
458
- InterceptionEvent2[InterceptionEvent2["UpdateState"] = 3001] = "UpdateState";
459
- return InterceptionEvent2;
460
- })(InterceptionEvent || {});
488
+ var InterceptEvent = /* @__PURE__ */ ((InterceptEvent2) => {
489
+ InterceptEvent2[InterceptEvent2["CreateWorkItem"] = 1001] = "CreateWorkItem";
490
+ InterceptEvent2[InterceptEvent2["DeleteWorkItem"] = 1002] = "DeleteWorkItem";
491
+ InterceptEvent2[InterceptEvent2["BatchDeleteWorkItem"] = 1003] = "BatchDeleteWorkItem";
492
+ InterceptEvent2[InterceptEvent2["RecoveryWorkItem"] = 1004] = "RecoveryWorkItem";
493
+ InterceptEvent2[InterceptEvent2["AbortWorkItem"] = 1005] = "AbortWorkItem";
494
+ InterceptEvent2[InterceptEvent2["UpgradeTemplate"] = 1006] = "UpgradeTemplate";
495
+ InterceptEvent2[InterceptEvent2["BatchUpgradeTemplate"] = 1007] = "BatchUpgradeTemplate";
496
+ InterceptEvent2[InterceptEvent2["ExportWorkItem"] = 1008] = "ExportWorkItem";
497
+ InterceptEvent2[InterceptEvent2["FinishNode"] = 2001] = "FinishNode";
498
+ InterceptEvent2[InterceptEvent2["DeleteNode"] = 2002] = "DeleteNode";
499
+ InterceptEvent2[InterceptEvent2["RecoveryNode"] = 2003] = "RecoveryNode";
500
+ InterceptEvent2[InterceptEvent2["RollBackNode"] = 2004] = "RollBackNode";
501
+ InterceptEvent2[InterceptEvent2["EditSchedule"] = 2005] = "EditSchedule";
502
+ InterceptEvent2[InterceptEvent2["UpdateState"] = 3001] = "UpdateState";
503
+ return InterceptEvent2;
504
+ })(InterceptEvent || {});
461
505
 
462
506
  // src/errors/CustomError.ts
463
507
  var CustomError = class extends Error {
@@ -529,12 +573,14 @@ export {
529
573
  AttributeType,
530
574
  ButtonScene,
531
575
  Clipboard,
576
+ ContainerModal,
532
577
  Context,
533
578
  Field,
534
579
  FieldType,
535
580
  FlowMode,
536
581
  IMPL_KEY,
537
- InterceptionEvent,
582
+ Intercept,
583
+ InterceptEvent,
538
584
  InternalError,
539
585
  InvalidParamsError,
540
586
  MEEGO_BIZ_HUB,
package/dist/lib/index.js CHANGED
@@ -52,12 +52,14 @@ __export(src_exports, {
52
52
  AttributeType: () => AttributeType,
53
53
  ButtonScene: () => ButtonScene,
54
54
  Clipboard: () => Clipboard,
55
+ ContainerModal: () => ContainerModal,
55
56
  Context: () => Context,
56
57
  Field: () => Field,
57
58
  FieldType: () => FieldType,
58
59
  FlowMode: () => FlowMode,
59
60
  IMPL_KEY: () => IMPL_KEY,
60
- InterceptionEvent: () => InterceptionEvent,
61
+ Intercept: () => Intercept,
62
+ InterceptEvent: () => InterceptEvent,
61
63
  InternalError: () => InternalError,
62
64
  InvalidParamsError: () => InvalidParamsError,
63
65
  MEEGO_BIZ_HUB: () => MEEGO_BIZ_HUB,
@@ -327,6 +329,38 @@ _a13 = IMPL_KEY;
327
329
  */
328
330
  Utils[_a13] = "utils";
329
331
 
332
+ // src/features/Intercept.ts
333
+ var _a14;
334
+ var Intercept = class extends BaseModel {
335
+ /**
336
+ * 加载数据
337
+ */
338
+ static load() {
339
+ throw new Error("not implemented");
340
+ }
341
+ };
342
+ _a14 = IMPL_KEY;
343
+ /**
344
+ * @internal
345
+ */
346
+ Intercept[_a14] = "Intercept";
347
+
348
+ // src/features/ContainerModal.ts
349
+ var _a15;
350
+ var ContainerModal = class extends BaseModel {
351
+ /**
352
+ * 加载数据
353
+ */
354
+ static load() {
355
+ throw new Error("not implemented");
356
+ }
357
+ };
358
+ _a15 = IMPL_KEY;
359
+ /**
360
+ * @internal
361
+ */
362
+ ContainerModal[_a15] = "ContainerModal";
363
+
330
364
  // src/client.ts
331
365
  function getImplClass(decl, impls) {
332
366
  return impls == null ? void 0 : impls[decl[IMPL_KEY]];
@@ -335,6 +369,18 @@ function getImplValue(decl, impls) {
335
369
  return impls == null ? void 0 : impls[decl[IMPL_KEY]];
336
370
  }
337
371
  var _SDKClient = class {
372
+ /**
373
+ * 插件容器模态框
374
+ */
375
+ get containerModal() {
376
+ return getImplValue(ContainerModal, this._meegoBizHub);
377
+ }
378
+ /**
379
+ * 拦截事件点位容器特有能力
380
+ */
381
+ get intercept() {
382
+ return getImplValue(Intercept, this._meegoBizHub);
383
+ }
338
384
  /**
339
385
  * 应用导航
340
386
  */
@@ -439,7 +485,7 @@ var SDKClient = _SDKClient;
439
485
  /**
440
486
  * SDK 版本号
441
487
  */
442
- SDKClient.version = "2.0.1-alpha.3";
488
+ SDKClient.version = "2.0.1-alpha.5";
443
489
 
444
490
  // src/types/biz.ts
445
491
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -492,23 +538,23 @@ var ButtonScene = /* @__PURE__ */ ((ButtonScene2) => {
492
538
  ButtonScene2[ButtonScene2["workItemNode"] = 4] = "workItemNode";
493
539
  return ButtonScene2;
494
540
  })(ButtonScene || {});
495
- var InterceptionEvent = /* @__PURE__ */ ((InterceptionEvent2) => {
496
- InterceptionEvent2[InterceptionEvent2["CreateWorkItem"] = 1001] = "CreateWorkItem";
497
- InterceptionEvent2[InterceptionEvent2["DeleteWorkItem"] = 1002] = "DeleteWorkItem";
498
- InterceptionEvent2[InterceptionEvent2["BatchDeleteWorkItem"] = 1003] = "BatchDeleteWorkItem";
499
- InterceptionEvent2[InterceptionEvent2["RecoveryWorkItem"] = 1004] = "RecoveryWorkItem";
500
- InterceptionEvent2[InterceptionEvent2["AbortWorkItem"] = 1005] = "AbortWorkItem";
501
- InterceptionEvent2[InterceptionEvent2["UpgradeTemplate"] = 1006] = "UpgradeTemplate";
502
- InterceptionEvent2[InterceptionEvent2["BatchUpgradeTemplate"] = 1007] = "BatchUpgradeTemplate";
503
- InterceptionEvent2[InterceptionEvent2["ExportWorkItem"] = 1008] = "ExportWorkItem";
504
- InterceptionEvent2[InterceptionEvent2["FinishNode"] = 2001] = "FinishNode";
505
- InterceptionEvent2[InterceptionEvent2["DeleteNode"] = 2002] = "DeleteNode";
506
- InterceptionEvent2[InterceptionEvent2["RecoveryNode"] = 2003] = "RecoveryNode";
507
- InterceptionEvent2[InterceptionEvent2["RollBackNode"] = 2004] = "RollBackNode";
508
- InterceptionEvent2[InterceptionEvent2["EditSchedule"] = 2005] = "EditSchedule";
509
- InterceptionEvent2[InterceptionEvent2["UpdateState"] = 3001] = "UpdateState";
510
- return InterceptionEvent2;
511
- })(InterceptionEvent || {});
541
+ var InterceptEvent = /* @__PURE__ */ ((InterceptEvent2) => {
542
+ InterceptEvent2[InterceptEvent2["CreateWorkItem"] = 1001] = "CreateWorkItem";
543
+ InterceptEvent2[InterceptEvent2["DeleteWorkItem"] = 1002] = "DeleteWorkItem";
544
+ InterceptEvent2[InterceptEvent2["BatchDeleteWorkItem"] = 1003] = "BatchDeleteWorkItem";
545
+ InterceptEvent2[InterceptEvent2["RecoveryWorkItem"] = 1004] = "RecoveryWorkItem";
546
+ InterceptEvent2[InterceptEvent2["AbortWorkItem"] = 1005] = "AbortWorkItem";
547
+ InterceptEvent2[InterceptEvent2["UpgradeTemplate"] = 1006] = "UpgradeTemplate";
548
+ InterceptEvent2[InterceptEvent2["BatchUpgradeTemplate"] = 1007] = "BatchUpgradeTemplate";
549
+ InterceptEvent2[InterceptEvent2["ExportWorkItem"] = 1008] = "ExportWorkItem";
550
+ InterceptEvent2[InterceptEvent2["FinishNode"] = 2001] = "FinishNode";
551
+ InterceptEvent2[InterceptEvent2["DeleteNode"] = 2002] = "DeleteNode";
552
+ InterceptEvent2[InterceptEvent2["RecoveryNode"] = 2003] = "RecoveryNode";
553
+ InterceptEvent2[InterceptEvent2["RollBackNode"] = 2004] = "RollBackNode";
554
+ InterceptEvent2[InterceptEvent2["EditSchedule"] = 2005] = "EditSchedule";
555
+ InterceptEvent2[InterceptEvent2["UpdateState"] = 3001] = "UpdateState";
556
+ return InterceptEvent2;
557
+ })(InterceptEvent || {});
512
558
 
513
559
  // src/errors/CustomError.ts
514
560
  var CustomError = class extends Error {
@@ -581,12 +627,14 @@ var src_default = SDKClient;
581
627
  AttributeType,
582
628
  ButtonScene,
583
629
  Clipboard,
630
+ ContainerModal,
584
631
  Context,
585
632
  Field,
586
633
  FieldType,
587
634
  FlowMode,
588
635
  IMPL_KEY,
589
- InterceptionEvent,
636
+ Intercept,
637
+ InterceptEvent,
590
638
  InternalError,
591
639
  InvalidParamsError,
592
640
  MEEGO_BIZ_HUB,
@@ -405,7 +405,7 @@ interface ControlFeatureContext {
405
405
  /**
406
406
  * 拦截事件类型
407
407
  */
408
- declare enum InterceptionEvent {
408
+ declare enum InterceptEvent {
409
409
  /** 创建工作项 */
410
410
  CreateWorkItem = 1001,
411
411
  /** 删除工作项 */
@@ -439,10 +439,11 @@ declare enum InterceptionEvent {
439
439
  * 拦截构成
440
440
  * 用于拦截用户行为,包括拦截位置、触发规则和提示等相关配置
441
441
  */
442
- interface InterceptionFeatureContext {
443
- eventType: InterceptionEvent;
444
- spaceId: string;
442
+ interface InterceptFeatureContext<T> {
443
+ message: string;
444
+ eventType: InterceptEvent;
445
445
  workItems: Array<BriefWorkItem>;
446
+ customData: T;
446
447
  }
447
448
 
448
449
  /**
@@ -1120,6 +1121,44 @@ declare abstract class Utils extends BaseModel {
1120
1121
  }>;
1121
1122
  }
1122
1123
 
1124
+ /**
1125
+ * @public
1126
+ * 拦截事件模态框
1127
+ */
1128
+ declare abstract class Intercept extends BaseModel {
1129
+ /**
1130
+ * @internal
1131
+ */
1132
+ protected static [IMPL_KEY]: string;
1133
+ /**
1134
+ * 加载数据
1135
+ */
1136
+ static load(): Promise<Intercept>;
1137
+ /**
1138
+ * 获取当前触发的拦截事件上下文
1139
+ */
1140
+ abstract getEventCtx<T = any>(): Promise<InterceptFeatureContext<T>>;
1141
+ }
1142
+
1143
+ /**
1144
+ * @public
1145
+ * 插件容器模态框
1146
+ */
1147
+ declare abstract class ContainerModal extends BaseModel {
1148
+ /**
1149
+ * @internal
1150
+ */
1151
+ protected static [IMPL_KEY]: string;
1152
+ /**
1153
+ * 加载数据
1154
+ */
1155
+ static load(): Promise<ContainerModal>;
1156
+ /**
1157
+ * 关闭插件当前激活的容器模态框
1158
+ */
1159
+ abstract close: Promise<void>;
1160
+ }
1161
+
1123
1162
  /**
1124
1163
  * @public
1125
1164
  * SDKClient 的配置项
@@ -1137,6 +1176,14 @@ declare class SDKClient {
1137
1176
  * SDK 版本号
1138
1177
  */
1139
1178
  static version: string;
1179
+ /**
1180
+ * 插件容器模态框
1181
+ */
1182
+ get containerModal(): ContainerModal;
1183
+ /**
1184
+ * 拦截事件点位容器特有能力
1185
+ */
1186
+ get intercept(): Intercept;
1140
1187
  /**
1141
1188
  * 应用导航
1142
1189
  */
@@ -1271,4 +1318,4 @@ declare class InvalidParamsError extends CustomError {
1271
1318
  * @packageDocumentation
1272
1319
  */
1273
1320
 
1274
- export { ActionSheet, ActionSheetOptions, AttributeType, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, Context, ControlFeatureContext, Field, FieldType, FlowMode, IMPL_KEY, IPluginCustomBuildConfig, IntegrationFeatureContext, InterceptionEvent, InterceptionFeatureContext, 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 };
1321
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-project/js-sdk",
3
- "version": "2.0.1-alpha.3",
3
+ "version": "2.0.1-alpha.5",
4
4
  "runtimeMinVersions": {
5
5
  "web": "2.1.0",
6
6
  "mobile": "1.1.0"