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

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/Interception.ts
280
+ var _a14;
281
+ var Interception = 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
+ Interception[_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 interception() {
329
+ return getImplValue(Interception, 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.4";
392
436
 
393
437
  // src/types/biz.ts
394
438
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -529,11 +573,13 @@ 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,
582
+ Interception,
537
583
  InterceptionEvent,
538
584
  InternalError,
539
585
  InvalidParamsError,
package/dist/lib/index.js CHANGED
@@ -52,11 +52,13 @@ __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,
61
+ Interception: () => Interception,
60
62
  InterceptionEvent: () => InterceptionEvent,
61
63
  InternalError: () => InternalError,
62
64
  InvalidParamsError: () => InvalidParamsError,
@@ -327,6 +329,38 @@ _a13 = IMPL_KEY;
327
329
  */
328
330
  Utils[_a13] = "utils";
329
331
 
332
+ // src/features/Interception.ts
333
+ var _a14;
334
+ var Interception = 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
+ Interception[_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 interception() {
382
+ return getImplValue(Interception, 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.4";
443
489
 
444
490
  // src/types/biz.ts
445
491
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -581,11 +627,13 @@ 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,
636
+ Interception,
589
637
  InterceptionEvent,
590
638
  InternalError,
591
639
  InvalidParamsError,
@@ -439,10 +439,11 @@ declare enum InterceptionEvent {
439
439
  * 拦截构成
440
440
  * 用于拦截用户行为,包括拦截位置、触发规则和提示等相关配置
441
441
  */
442
- interface InterceptionFeatureContext {
442
+ interface InterceptionFeatureContext<T> {
443
+ message: string;
443
444
  eventType: InterceptionEvent;
444
- spaceId: string;
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 Interception extends BaseModel {
1129
+ /**
1130
+ * @internal
1131
+ */
1132
+ protected static [IMPL_KEY]: string;
1133
+ /**
1134
+ * 加载数据
1135
+ */
1136
+ static load(): Promise<Interception>;
1137
+ /**
1138
+ * 获取当前触发的拦截事件上下文
1139
+ */
1140
+ abstract getEventContext<T = any>(): Promise<InterceptionFeatureContext<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 interception(): Interception;
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, Interception, 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 };
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.4",
4
4
  "runtimeMinVersions": {
5
5
  "web": "2.1.0",
6
6
  "mobile": "1.1.0"