@lark-project/js-sdk 2.1.1-dev.1 → 2.1.1-dev.2

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,5 +1,8 @@
1
1
  # Change Log
2
- ## 2.0.16 (2025/08/12)
2
+ ## 2.1.1 (2025/11/14)
3
+ - 「Add」新增 Event 相关定义
4
+
5
+ ## 2.1.0 (2025/08/12)
3
6
  - 「Add」新增 Script 点位相关定义
4
7
 
5
8
  ## 2.0.12 (2025/07/16)
package/dist/es/index.js CHANGED
@@ -302,8 +302,18 @@ _a15 = IMPL_KEY;
302
302
  */
303
303
  Utils[_a15] = "utils";
304
304
 
305
- // src/features/ContainerModal.ts
305
+ // src/biz/Event.ts
306
306
  var _a16;
307
+ var Event = class extends BaseModel {
308
+ };
309
+ _a16 = IMPL_KEY;
310
+ /**
311
+ * @internal
312
+ */
313
+ Event[_a16] = "event";
314
+
315
+ // src/features/ContainerModal.ts
316
+ var _a17;
307
317
  var ContainerModal = class extends BaseModel {
308
318
  /**
309
319
  * 加载数据
@@ -312,14 +322,14 @@ var ContainerModal = class extends BaseModel {
312
322
  throw new Error("not implemented");
313
323
  }
314
324
  };
315
- _a16 = IMPL_KEY;
325
+ _a17 = IMPL_KEY;
316
326
  /**
317
327
  * @internal
318
328
  */
319
- ContainerModal[_a16] = "containerModal";
329
+ ContainerModal[_a17] = "containerModal";
320
330
 
321
331
  // src/features/Intercept.ts
322
- var _a17;
332
+ var _a18;
323
333
  var Intercept = class extends BaseModel {
324
334
  /**
325
335
  * 加载数据
@@ -328,14 +338,14 @@ var Intercept = class extends BaseModel {
328
338
  throw new Error("not implemented");
329
339
  }
330
340
  };
331
- _a17 = IMPL_KEY;
341
+ _a18 = IMPL_KEY;
332
342
  /**
333
343
  * @internal
334
344
  */
335
- Intercept[_a17] = "intercept";
345
+ Intercept[_a18] = "intercept";
336
346
 
337
347
  // src/features/Control.ts
338
- var _a18;
348
+ var _a19;
339
349
  var Control = class extends BaseModel {
340
350
  /**
341
351
  * 加载数据
@@ -344,14 +354,14 @@ var Control = class extends BaseModel {
344
354
  throw new Error("not implemented");
345
355
  }
346
356
  };
347
- _a18 = IMPL_KEY;
357
+ _a19 = IMPL_KEY;
348
358
  /**
349
359
  * @internal
350
360
  */
351
- Control[_a18] = "control";
361
+ Control[_a19] = "control";
352
362
 
353
363
  // src/features/Button.ts
354
- var _a19;
364
+ var _a20;
355
365
  var Button = class extends BaseModel {
356
366
  /**
357
367
  * 加载数据
@@ -360,14 +370,14 @@ var Button = class extends BaseModel {
360
370
  throw new Error("not implemented");
361
371
  }
362
372
  };
363
- _a19 = IMPL_KEY;
373
+ _a20 = IMPL_KEY;
364
374
  /**
365
375
  * @internal
366
376
  */
367
- Button[_a19] = "button";
377
+ Button[_a20] = "button";
368
378
 
369
379
  // src/features/Configuration.ts
370
- var _a20;
380
+ var _a21;
371
381
  var Configuration = class extends BaseModel {
372
382
  /**
373
383
  * 加载数据
@@ -376,14 +386,14 @@ var Configuration = class extends BaseModel {
376
386
  throw new Error("not implemented");
377
387
  }
378
388
  };
379
- _a20 = IMPL_KEY;
389
+ _a21 = IMPL_KEY;
380
390
  /**
381
391
  * @internal
382
392
  */
383
- Configuration[_a20] = "configuration";
393
+ Configuration[_a21] = "configuration";
384
394
 
385
395
  // src/features/Page.ts
386
- var _a21;
396
+ var _a22;
387
397
  var Page = class extends BaseModel {
388
398
  /**
389
399
  * 加载数据
@@ -392,24 +402,24 @@ var Page = class extends BaseModel {
392
402
  throw new Error("not implemented");
393
403
  }
394
404
  };
395
- _a21 = IMPL_KEY;
405
+ _a22 = IMPL_KEY;
396
406
  /**
397
407
  * @internal
398
408
  */
399
- Page[_a21] = "page";
409
+ Page[_a22] = "page";
400
410
 
401
411
  // src/features/Script.ts
402
- var _a22;
412
+ var _a23;
403
413
  var Script = class extends BaseModel {
404
414
  };
405
- _a22 = IMPL_KEY;
415
+ _a23 = IMPL_KEY;
406
416
  /**
407
417
  * @internal
408
418
  */
409
- Script[_a22] = "script";
419
+ Script[_a23] = "script";
410
420
 
411
421
  // src/features/Tab.ts
412
- var _a23;
422
+ var _a24;
413
423
  var Tab = class extends BaseModel {
414
424
  /**
415
425
  * 加载数据
@@ -418,14 +428,14 @@ var Tab = class extends BaseModel {
418
428
  throw new Error("not implemented");
419
429
  }
420
430
  };
421
- _a23 = IMPL_KEY;
431
+ _a24 = IMPL_KEY;
422
432
  /**
423
433
  * @internal
424
434
  */
425
- Tab[_a23] = "tab";
435
+ Tab[_a24] = "tab";
426
436
 
427
437
  // src/features/View.ts
428
- var _a24;
438
+ var _a25;
429
439
  var View = class extends BaseModel {
430
440
  /**
431
441
  * 加载数据
@@ -434,41 +444,41 @@ var View = class extends BaseModel {
434
444
  throw new Error("not implemented");
435
445
  }
436
446
  };
437
- _a24 = IMPL_KEY;
447
+ _a25 = IMPL_KEY;
438
448
  /**
439
449
  * @internal
440
450
  */
441
- View[_a24] = "view";
451
+ View[_a25] = "view";
442
452
 
443
453
  // src/features/CustomComponent.ts
444
- var _a25;
454
+ var _a26;
445
455
  var CustomComponent = class extends BaseModel {
446
456
  };
447
- _a25 = IMPL_KEY;
457
+ _a26 = IMPL_KEY;
448
458
  /**
449
459
  * @internal
450
460
  */
451
- CustomComponent[_a25] = "customComponent";
461
+ CustomComponent[_a26] = "customComponent";
452
462
 
453
463
  // src/features/CustomField.ts
454
- var _a26;
464
+ var _a27;
455
465
  var CustomField = class extends BaseModel {
456
466
  };
457
- _a26 = IMPL_KEY;
467
+ _a27 = IMPL_KEY;
458
468
  /**
459
469
  * @internal
460
470
  */
461
- CustomField[_a26] = "customField";
471
+ CustomField[_a27] = "customField";
462
472
 
463
473
  // src/features/BuilderComponent.ts
464
- var _a27;
474
+ var _a28;
465
475
  var BuilderComponent = class extends BaseModel {
466
476
  };
467
- _a27 = IMPL_KEY;
477
+ _a28 = IMPL_KEY;
468
478
  /**
469
479
  * @internal
470
480
  */
471
- BuilderComponent[_a27] = "liteAppComponent";
481
+ BuilderComponent[_a28] = "liteAppComponent";
472
482
 
473
483
  // src/client.ts
474
484
  function getImplClass(decl, impls) {
@@ -627,6 +637,12 @@ var _SDKClient = class {
627
637
  get utils() {
628
638
  return getImplValue(Utils, this._meegoBizHub);
629
639
  }
640
+ /**
641
+ * 事件
642
+ */
643
+ get event() {
644
+ return getImplValue(Event, this._meegoBizHub);
645
+ }
630
646
  /**
631
647
  * 应用上下文
632
648
  */
@@ -683,7 +699,7 @@ var SDKClient = _SDKClient;
683
699
  /**
684
700
  * SDK 版本号
685
701
  */
686
- SDKClient.version = "2.1.1-dev.1";
702
+ SDKClient.version = "2.1.1-dev.2";
687
703
 
688
704
  // src/types/biz.ts
689
705
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -887,6 +903,7 @@ export {
887
903
  CustomComponent,
888
904
  CustomComponentType,
889
905
  CustomField,
906
+ Event,
890
907
  EventType,
891
908
  Field,
892
909
  FieldType,
package/dist/lib/index.js CHANGED
@@ -62,6 +62,7 @@ __export(src_exports, {
62
62
  CustomComponent: () => CustomComponent,
63
63
  CustomComponentType: () => CustomComponentType,
64
64
  CustomField: () => CustomField,
65
+ Event: () => Event,
65
66
  EventType: () => EventType,
66
67
  Field: () => Field,
67
68
  FieldType: () => FieldType,
@@ -372,8 +373,18 @@ _a15 = IMPL_KEY;
372
373
  */
373
374
  Utils[_a15] = "utils";
374
375
 
375
- // src/features/ContainerModal.ts
376
+ // src/biz/Event.ts
376
377
  var _a16;
378
+ var Event = class extends BaseModel {
379
+ };
380
+ _a16 = IMPL_KEY;
381
+ /**
382
+ * @internal
383
+ */
384
+ Event[_a16] = "event";
385
+
386
+ // src/features/ContainerModal.ts
387
+ var _a17;
377
388
  var ContainerModal = class extends BaseModel {
378
389
  /**
379
390
  * 加载数据
@@ -382,14 +393,14 @@ var ContainerModal = class extends BaseModel {
382
393
  throw new Error("not implemented");
383
394
  }
384
395
  };
385
- _a16 = IMPL_KEY;
396
+ _a17 = IMPL_KEY;
386
397
  /**
387
398
  * @internal
388
399
  */
389
- ContainerModal[_a16] = "containerModal";
400
+ ContainerModal[_a17] = "containerModal";
390
401
 
391
402
  // src/features/Intercept.ts
392
- var _a17;
403
+ var _a18;
393
404
  var Intercept = class extends BaseModel {
394
405
  /**
395
406
  * 加载数据
@@ -398,14 +409,14 @@ var Intercept = class extends BaseModel {
398
409
  throw new Error("not implemented");
399
410
  }
400
411
  };
401
- _a17 = IMPL_KEY;
412
+ _a18 = IMPL_KEY;
402
413
  /**
403
414
  * @internal
404
415
  */
405
- Intercept[_a17] = "intercept";
416
+ Intercept[_a18] = "intercept";
406
417
 
407
418
  // src/features/Control.ts
408
- var _a18;
419
+ var _a19;
409
420
  var Control = class extends BaseModel {
410
421
  /**
411
422
  * 加载数据
@@ -414,14 +425,14 @@ var Control = class extends BaseModel {
414
425
  throw new Error("not implemented");
415
426
  }
416
427
  };
417
- _a18 = IMPL_KEY;
428
+ _a19 = IMPL_KEY;
418
429
  /**
419
430
  * @internal
420
431
  */
421
- Control[_a18] = "control";
432
+ Control[_a19] = "control";
422
433
 
423
434
  // src/features/Button.ts
424
- var _a19;
435
+ var _a20;
425
436
  var Button = class extends BaseModel {
426
437
  /**
427
438
  * 加载数据
@@ -430,14 +441,14 @@ var Button = class extends BaseModel {
430
441
  throw new Error("not implemented");
431
442
  }
432
443
  };
433
- _a19 = IMPL_KEY;
444
+ _a20 = IMPL_KEY;
434
445
  /**
435
446
  * @internal
436
447
  */
437
- Button[_a19] = "button";
448
+ Button[_a20] = "button";
438
449
 
439
450
  // src/features/Configuration.ts
440
- var _a20;
451
+ var _a21;
441
452
  var Configuration = class extends BaseModel {
442
453
  /**
443
454
  * 加载数据
@@ -446,14 +457,14 @@ var Configuration = class extends BaseModel {
446
457
  throw new Error("not implemented");
447
458
  }
448
459
  };
449
- _a20 = IMPL_KEY;
460
+ _a21 = IMPL_KEY;
450
461
  /**
451
462
  * @internal
452
463
  */
453
- Configuration[_a20] = "configuration";
464
+ Configuration[_a21] = "configuration";
454
465
 
455
466
  // src/features/Page.ts
456
- var _a21;
467
+ var _a22;
457
468
  var Page = class extends BaseModel {
458
469
  /**
459
470
  * 加载数据
@@ -462,24 +473,24 @@ var Page = class extends BaseModel {
462
473
  throw new Error("not implemented");
463
474
  }
464
475
  };
465
- _a21 = IMPL_KEY;
476
+ _a22 = IMPL_KEY;
466
477
  /**
467
478
  * @internal
468
479
  */
469
- Page[_a21] = "page";
480
+ Page[_a22] = "page";
470
481
 
471
482
  // src/features/Script.ts
472
- var _a22;
483
+ var _a23;
473
484
  var Script = class extends BaseModel {
474
485
  };
475
- _a22 = IMPL_KEY;
486
+ _a23 = IMPL_KEY;
476
487
  /**
477
488
  * @internal
478
489
  */
479
- Script[_a22] = "script";
490
+ Script[_a23] = "script";
480
491
 
481
492
  // src/features/Tab.ts
482
- var _a23;
493
+ var _a24;
483
494
  var Tab = class extends BaseModel {
484
495
  /**
485
496
  * 加载数据
@@ -488,14 +499,14 @@ var Tab = class extends BaseModel {
488
499
  throw new Error("not implemented");
489
500
  }
490
501
  };
491
- _a23 = IMPL_KEY;
502
+ _a24 = IMPL_KEY;
492
503
  /**
493
504
  * @internal
494
505
  */
495
- Tab[_a23] = "tab";
506
+ Tab[_a24] = "tab";
496
507
 
497
508
  // src/features/View.ts
498
- var _a24;
509
+ var _a25;
499
510
  var View = class extends BaseModel {
500
511
  /**
501
512
  * 加载数据
@@ -504,41 +515,41 @@ var View = class extends BaseModel {
504
515
  throw new Error("not implemented");
505
516
  }
506
517
  };
507
- _a24 = IMPL_KEY;
518
+ _a25 = IMPL_KEY;
508
519
  /**
509
520
  * @internal
510
521
  */
511
- View[_a24] = "view";
522
+ View[_a25] = "view";
512
523
 
513
524
  // src/features/CustomComponent.ts
514
- var _a25;
525
+ var _a26;
515
526
  var CustomComponent = class extends BaseModel {
516
527
  };
517
- _a25 = IMPL_KEY;
528
+ _a26 = IMPL_KEY;
518
529
  /**
519
530
  * @internal
520
531
  */
521
- CustomComponent[_a25] = "customComponent";
532
+ CustomComponent[_a26] = "customComponent";
522
533
 
523
534
  // src/features/CustomField.ts
524
- var _a26;
535
+ var _a27;
525
536
  var CustomField = class extends BaseModel {
526
537
  };
527
- _a26 = IMPL_KEY;
538
+ _a27 = IMPL_KEY;
528
539
  /**
529
540
  * @internal
530
541
  */
531
- CustomField[_a26] = "customField";
542
+ CustomField[_a27] = "customField";
532
543
 
533
544
  // src/features/BuilderComponent.ts
534
- var _a27;
545
+ var _a28;
535
546
  var BuilderComponent = class extends BaseModel {
536
547
  };
537
- _a27 = IMPL_KEY;
548
+ _a28 = IMPL_KEY;
538
549
  /**
539
550
  * @internal
540
551
  */
541
- BuilderComponent[_a27] = "liteAppComponent";
552
+ BuilderComponent[_a28] = "liteAppComponent";
542
553
 
543
554
  // src/client.ts
544
555
  function getImplClass(decl, impls) {
@@ -697,6 +708,12 @@ var _SDKClient = class {
697
708
  get utils() {
698
709
  return getImplValue(Utils, this._meegoBizHub);
699
710
  }
711
+ /**
712
+ * 事件
713
+ */
714
+ get event() {
715
+ return getImplValue(Event, this._meegoBizHub);
716
+ }
700
717
  /**
701
718
  * 应用上下文
702
719
  */
@@ -753,7 +770,7 @@ var SDKClient = _SDKClient;
753
770
  /**
754
771
  * SDK 版本号
755
772
  */
756
- SDKClient.version = "2.1.1-dev.1";
773
+ SDKClient.version = "2.1.1-dev.2";
757
774
 
758
775
  // src/types/biz.ts
759
776
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -958,6 +975,7 @@ var src_default = SDKClient;
958
975
  CustomComponent,
959
976
  CustomComponentType,
960
977
  CustomField,
978
+ Event,
961
979
  EventType,
962
980
  Field,
963
981
  FieldType,
@@ -1844,6 +1844,24 @@ declare abstract class Utils extends BaseModel {
1844
1844
  abstract overwriteThemeForSemiUI(): Promise<void>;
1845
1845
  }
1846
1846
 
1847
+ /**
1848
+ * @public
1849
+ * 事件
1850
+ */
1851
+ declare abstract class Event extends BaseModel {
1852
+ /**
1853
+ * @internal
1854
+ */
1855
+ protected static [IMPL_KEY]: string;
1856
+ /**
1857
+ * 监听事件
1858
+ * @param eventType 事件类型
1859
+ * @param callback 事件回调
1860
+ * @returns 取消监听事件的方法
1861
+ */
1862
+ abstract onMessage<T extends EventType>(eventType: T, callback: (payload: EventPayloadMap[T]) => void): Promise<Off>;
1863
+ }
1864
+
1847
1865
  /**
1848
1866
  * @public
1849
1867
  * 插件容器模态框
@@ -2374,6 +2392,10 @@ declare class SDKClient {
2374
2392
  * 工具方法
2375
2393
  */
2376
2394
  get utils(): Utils;
2395
+ /**
2396
+ * 事件
2397
+ */
2398
+ get event(): Event;
2377
2399
  /**
2378
2400
  * 应用上下文
2379
2401
  */
@@ -2489,4 +2511,4 @@ declare class NotSupportedError extends CustomError {
2489
2511
  * @packageDocumentation
2490
2512
  */
2491
2513
 
2492
- export { ActionSheet, ActionSheetOptions, AttributeType, BatchButtonFeatureContext, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, BuilderComponent, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, ComponentScheduleIdentity, ComponentScheduleScene, Configuration, ConfigurationFeatureContext, ContainerModal, ContainerModalConfigureOptions, Context, Control, ControlFeatureContext, CreateButtonFeatureContext, CustomComponent, CustomComponentFeatureContext, CustomComponentProps, CustomComponentType, CustomField, CustomFieldConfig, CustomFieldFeatureContext, CustomFieldProps, CustomFieldValidateMsg, CustomFieldValueType, EventPayloadMap, EventType, ExCompoundFieldValueType, Field, FieldType, FieldValue, FlowMode, I18nTitleConfig, IMPL_KEY, IPluginCustomBuildConfig, IRichTextEditorImageUploadComplete, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, LiteAppCompLayoutConfig, LiteAppCompPropBriefConfig, LiteAppCompPropFullConfig, LiteAppCompPropSelectConfig, LiteAppCompPropValueType, LiteAppComponentConfig, LiteAppComponentFeatureContext, LiteAppComponentPreset, LiteAppComponentProps, LiteAppPropBoolean, LiteAppPropDateRange, LiteAppPropDateWithTime, LiteAppPropField, LiteAppPropLayout, LiteAppPropMultiSelect, LiteAppPropNumber, LiteAppPropSelect, LiteAppPropTemplateType, LiteAppPropText, LiteAppPropView, LiteAppPropWorkItemInstance, LiteAppPropWorkItemListAfterFilter, LiteAppPropWorkItemListAfterSort, LiteAppPropWorkItemType, MEEGO_BIZ_HUB, Modal, ModalConfirmOptions, ModalOpenOptions, Navigation, NoAuthError, NodeStatus, NotFoundError, NotSupportedError, Off, OutOfLimitError, Page, PageFeatureContext, RichTextEditor, RichTextEditorContent, RichTextEditorOptions, Role, RoleOwners, SDKClient, SDKClientOptions, ScheduleCompValidateMsg, ScheduleCompValueType, ScheduleUnitButtonFeatureContext, Script, ScriptFeatureContext, Shared, Space, Storage, SubFieldType, Tab, TabFeatureContext, Toast, ToastOptions, User, UserInfo, Utils, View, ViewFeatureContext, WbsStatus, WorkItem, WorkItemButtonFeatureContext, WorkItemCreateFormPreset, WorkItemFinder, WorkItemFinderOptions, WorkObject, SDKClient as default, unwatch };
2514
+ export { ActionSheet, ActionSheetOptions, AttributeType, BatchButtonFeatureContext, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, BuilderComponent, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, ComponentScheduleIdentity, ComponentScheduleScene, Configuration, ConfigurationFeatureContext, ContainerModal, ContainerModalConfigureOptions, Context, Control, ControlFeatureContext, CreateButtonFeatureContext, CustomComponent, CustomComponentFeatureContext, CustomComponentProps, CustomComponentType, CustomField, CustomFieldConfig, CustomFieldFeatureContext, CustomFieldProps, CustomFieldValidateMsg, CustomFieldValueType, Event, EventPayloadMap, EventType, ExCompoundFieldValueType, Field, FieldType, FieldValue, FlowMode, I18nTitleConfig, IMPL_KEY, IPluginCustomBuildConfig, IRichTextEditorImageUploadComplete, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, LiteAppCompLayoutConfig, LiteAppCompPropBriefConfig, LiteAppCompPropFullConfig, LiteAppCompPropSelectConfig, LiteAppCompPropValueType, LiteAppComponentConfig, LiteAppComponentFeatureContext, LiteAppComponentPreset, LiteAppComponentProps, LiteAppPropBoolean, LiteAppPropDateRange, LiteAppPropDateWithTime, LiteAppPropField, LiteAppPropLayout, LiteAppPropMultiSelect, LiteAppPropNumber, LiteAppPropSelect, LiteAppPropTemplateType, LiteAppPropText, LiteAppPropView, LiteAppPropWorkItemInstance, LiteAppPropWorkItemListAfterFilter, LiteAppPropWorkItemListAfterSort, LiteAppPropWorkItemType, MEEGO_BIZ_HUB, Modal, ModalConfirmOptions, ModalOpenOptions, Navigation, NoAuthError, NodeStatus, NotFoundError, NotSupportedError, Off, OutOfLimitError, Page, PageFeatureContext, RichTextEditor, RichTextEditorContent, RichTextEditorOptions, Role, RoleOwners, SDKClient, SDKClientOptions, ScheduleCompValidateMsg, ScheduleCompValueType, ScheduleUnitButtonFeatureContext, Script, ScriptFeatureContext, Shared, Space, Storage, SubFieldType, Tab, TabFeatureContext, Toast, ToastOptions, User, UserInfo, Utils, View, ViewFeatureContext, WbsStatus, WorkItem, WorkItemButtonFeatureContext, WorkItemCreateFormPreset, WorkItemFinder, WorkItemFinderOptions, 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.1.1-dev.1",
3
+ "version": "2.1.1-dev.2",
4
4
  "runtimeMinVersions": {
5
5
  "web": "2.1.0",
6
6
  "mobile": "1.1.0"