@lark-project/js-sdk 2.0.2-dev.0 → 2.0.2-dev.1

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
@@ -51,7 +51,7 @@ _a = IMPL_KEY;
51
51
  /**
52
52
  * @internal
53
53
  */
54
- Context[_a] = "Context";
54
+ Context[_a] = "context";
55
55
 
56
56
  // src/model/Space.ts
57
57
  var _a2;
@@ -322,7 +322,7 @@ _a16 = IMPL_KEY;
322
322
  /**
323
323
  * @internal
324
324
  */
325
- ContainerModal[_a16] = "ContainerModal";
325
+ ContainerModal[_a16] = "containerModal";
326
326
 
327
327
  // src/features/Intercept.ts
328
328
  var _a17;
@@ -338,7 +338,7 @@ _a17 = IMPL_KEY;
338
338
  /**
339
339
  * @internal
340
340
  */
341
- Intercept[_a17] = "Intercept";
341
+ Intercept[_a17] = "intercept";
342
342
 
343
343
  // src/features/Control.ts
344
344
  var _a18;
@@ -354,7 +354,7 @@ _a18 = IMPL_KEY;
354
354
  /**
355
355
  * @internal
356
356
  */
357
- Control[_a18] = "Control";
357
+ Control[_a18] = "control";
358
358
 
359
359
  // src/features/Button.ts
360
360
  var _a19;
@@ -370,7 +370,71 @@ _a19 = IMPL_KEY;
370
370
  /**
371
371
  * @internal
372
372
  */
373
- Button[_a19] = "Button";
373
+ Button[_a19] = "button";
374
+
375
+ // src/features/Configuration.ts
376
+ var _a20;
377
+ var Configuration = class extends BaseModel {
378
+ /**
379
+ * 加载数据
380
+ */
381
+ static load() {
382
+ throw new Error("not implemented");
383
+ }
384
+ };
385
+ _a20 = IMPL_KEY;
386
+ /**
387
+ * @internal
388
+ */
389
+ Configuration[_a20] = "configuration";
390
+
391
+ // src/features/Page.ts
392
+ var _a21;
393
+ var Page = class extends BaseModel {
394
+ /**
395
+ * 加载数据
396
+ */
397
+ static load() {
398
+ throw new Error("not implemented");
399
+ }
400
+ };
401
+ _a21 = IMPL_KEY;
402
+ /**
403
+ * @internal
404
+ */
405
+ Page[_a21] = "page";
406
+
407
+ // src/features/Tab.ts
408
+ var _a22;
409
+ var Tab = class extends BaseModel {
410
+ /**
411
+ * 加载数据
412
+ */
413
+ static load() {
414
+ throw new Error("not implemented");
415
+ }
416
+ };
417
+ _a22 = IMPL_KEY;
418
+ /**
419
+ * @internal
420
+ */
421
+ Tab[_a22] = "tab";
422
+
423
+ // src/features/View.ts
424
+ var _a23;
425
+ var View = class extends BaseModel {
426
+ /**
427
+ * 加载数据
428
+ */
429
+ static load() {
430
+ throw new Error("not implemented");
431
+ }
432
+ };
433
+ _a23 = IMPL_KEY;
434
+ /**
435
+ * @internal
436
+ */
437
+ View[_a23] = "view";
374
438
 
375
439
  // src/client.ts
376
440
  function getImplClass(decl, impls) {
@@ -408,6 +472,34 @@ var _SDKClient = class {
408
472
  get button() {
409
473
  return getImplValue(Button, this._meegoBizHub);
410
474
  }
475
+ /**
476
+ * 配置点位容器特有能力
477
+ * only 2.0
478
+ */
479
+ get configuration() {
480
+ return getImplValue(Configuration, this._meegoBizHub);
481
+ }
482
+ /**
483
+ * 导航点位容器特有能力
484
+ * only 2.0
485
+ */
486
+ get page() {
487
+ return getImplValue(Page, this._meegoBizHub);
488
+ }
489
+ /**
490
+ * tab 点位容器特有能力
491
+ * only 2.0
492
+ */
493
+ get tab() {
494
+ return getImplValue(Tab, this._meegoBizHub);
495
+ }
496
+ /**
497
+ * 视图点位容器特有能力
498
+ * only 2.0
499
+ */
500
+ get view() {
501
+ return getImplValue(View, this._meegoBizHub);
502
+ }
411
503
  /**
412
504
  * 应用导航
413
505
  */
@@ -521,7 +613,7 @@ var SDKClient = _SDKClient;
521
613
  /**
522
614
  * SDK 版本号
523
615
  */
524
- SDKClient.version = "2.0.2-dev.0";
616
+ SDKClient.version = "2.0.2-dev.1";
525
617
 
526
618
  // src/types/biz.ts
527
619
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -675,6 +767,7 @@ export {
675
767
  Button,
676
768
  ButtonScene,
677
769
  Clipboard,
770
+ Configuration,
678
771
  ContainerModal,
679
772
  Context,
680
773
  Control,
@@ -694,12 +787,15 @@ export {
694
787
  NotFoundError,
695
788
  NotSupportedError,
696
789
  OutOfLimitError,
790
+ Page,
697
791
  RichTextEditor,
698
792
  SDKClient,
699
793
  Space,
700
794
  Storage,
795
+ Tab,
701
796
  Toast,
702
797
  Utils,
798
+ View,
703
799
  WorkItem,
704
800
  WorkItemFinder,
705
801
  WorkObject,
package/dist/lib/index.js CHANGED
@@ -54,6 +54,7 @@ __export(src_exports, {
54
54
  Button: () => Button,
55
55
  ButtonScene: () => ButtonScene,
56
56
  Clipboard: () => Clipboard,
57
+ Configuration: () => Configuration,
57
58
  ContainerModal: () => ContainerModal,
58
59
  Context: () => Context,
59
60
  Control: () => Control,
@@ -73,12 +74,15 @@ __export(src_exports, {
73
74
  NotFoundError: () => NotFoundError,
74
75
  NotSupportedError: () => NotSupportedError,
75
76
  OutOfLimitError: () => OutOfLimitError,
77
+ Page: () => Page,
76
78
  RichTextEditor: () => RichTextEditor,
77
79
  SDKClient: () => SDKClient,
78
80
  Space: () => Space,
79
81
  Storage: () => Storage,
82
+ Tab: () => Tab,
80
83
  Toast: () => Toast,
81
84
  Utils: () => Utils,
85
+ View: () => View,
82
86
  WorkItem: () => WorkItem,
83
87
  WorkItemFinder: () => WorkItemFinder,
84
88
  WorkObject: () => WorkObject,
@@ -109,7 +113,7 @@ _a = IMPL_KEY;
109
113
  /**
110
114
  * @internal
111
115
  */
112
- Context[_a] = "Context";
116
+ Context[_a] = "context";
113
117
 
114
118
  // src/model/Space.ts
115
119
  var _a2;
@@ -380,7 +384,7 @@ _a16 = IMPL_KEY;
380
384
  /**
381
385
  * @internal
382
386
  */
383
- ContainerModal[_a16] = "ContainerModal";
387
+ ContainerModal[_a16] = "containerModal";
384
388
 
385
389
  // src/features/Intercept.ts
386
390
  var _a17;
@@ -396,7 +400,7 @@ _a17 = IMPL_KEY;
396
400
  /**
397
401
  * @internal
398
402
  */
399
- Intercept[_a17] = "Intercept";
403
+ Intercept[_a17] = "intercept";
400
404
 
401
405
  // src/features/Control.ts
402
406
  var _a18;
@@ -412,7 +416,7 @@ _a18 = IMPL_KEY;
412
416
  /**
413
417
  * @internal
414
418
  */
415
- Control[_a18] = "Control";
419
+ Control[_a18] = "control";
416
420
 
417
421
  // src/features/Button.ts
418
422
  var _a19;
@@ -428,7 +432,71 @@ _a19 = IMPL_KEY;
428
432
  /**
429
433
  * @internal
430
434
  */
431
- Button[_a19] = "Button";
435
+ Button[_a19] = "button";
436
+
437
+ // src/features/Configuration.ts
438
+ var _a20;
439
+ var Configuration = class extends BaseModel {
440
+ /**
441
+ * 加载数据
442
+ */
443
+ static load() {
444
+ throw new Error("not implemented");
445
+ }
446
+ };
447
+ _a20 = IMPL_KEY;
448
+ /**
449
+ * @internal
450
+ */
451
+ Configuration[_a20] = "configuration";
452
+
453
+ // src/features/Page.ts
454
+ var _a21;
455
+ var Page = class extends BaseModel {
456
+ /**
457
+ * 加载数据
458
+ */
459
+ static load() {
460
+ throw new Error("not implemented");
461
+ }
462
+ };
463
+ _a21 = IMPL_KEY;
464
+ /**
465
+ * @internal
466
+ */
467
+ Page[_a21] = "page";
468
+
469
+ // src/features/Tab.ts
470
+ var _a22;
471
+ var Tab = class extends BaseModel {
472
+ /**
473
+ * 加载数据
474
+ */
475
+ static load() {
476
+ throw new Error("not implemented");
477
+ }
478
+ };
479
+ _a22 = IMPL_KEY;
480
+ /**
481
+ * @internal
482
+ */
483
+ Tab[_a22] = "tab";
484
+
485
+ // src/features/View.ts
486
+ var _a23;
487
+ var View = class extends BaseModel {
488
+ /**
489
+ * 加载数据
490
+ */
491
+ static load() {
492
+ throw new Error("not implemented");
493
+ }
494
+ };
495
+ _a23 = IMPL_KEY;
496
+ /**
497
+ * @internal
498
+ */
499
+ View[_a23] = "view";
432
500
 
433
501
  // src/client.ts
434
502
  function getImplClass(decl, impls) {
@@ -466,6 +534,34 @@ var _SDKClient = class {
466
534
  get button() {
467
535
  return getImplValue(Button, this._meegoBizHub);
468
536
  }
537
+ /**
538
+ * 配置点位容器特有能力
539
+ * only 2.0
540
+ */
541
+ get configuration() {
542
+ return getImplValue(Configuration, this._meegoBizHub);
543
+ }
544
+ /**
545
+ * 导航点位容器特有能力
546
+ * only 2.0
547
+ */
548
+ get page() {
549
+ return getImplValue(Page, this._meegoBizHub);
550
+ }
551
+ /**
552
+ * tab 点位容器特有能力
553
+ * only 2.0
554
+ */
555
+ get tab() {
556
+ return getImplValue(Tab, this._meegoBizHub);
557
+ }
558
+ /**
559
+ * 视图点位容器特有能力
560
+ * only 2.0
561
+ */
562
+ get view() {
563
+ return getImplValue(View, this._meegoBizHub);
564
+ }
469
565
  /**
470
566
  * 应用导航
471
567
  */
@@ -579,7 +675,7 @@ var SDKClient = _SDKClient;
579
675
  /**
580
676
  * SDK 版本号
581
677
  */
582
- SDKClient.version = "2.0.2-dev.0";
678
+ SDKClient.version = "2.0.2-dev.1";
583
679
 
584
680
  // src/types/biz.ts
585
681
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -734,6 +830,7 @@ var src_default = SDKClient;
734
830
  Button,
735
831
  ButtonScene,
736
832
  Clipboard,
833
+ Configuration,
737
834
  ContainerModal,
738
835
  Context,
739
836
  Control,
@@ -753,12 +850,15 @@ var src_default = SDKClient;
753
850
  NotFoundError,
754
851
  NotSupportedError,
755
852
  OutOfLimitError,
853
+ Page,
756
854
  RichTextEditor,
757
855
  SDKClient,
758
856
  Space,
759
857
  Storage,
858
+ Tab,
760
859
  Toast,
761
860
  Utils,
861
+ View,
762
862
  WorkItem,
763
863
  WorkItemFinder,
764
864
  WorkObject
@@ -358,6 +358,16 @@ interface CreateButtonFeatureContext {
358
358
  * 空间标识
359
359
  */
360
360
  spaceId: string;
361
+ /**
362
+ * 工作项类型标识
363
+ * 适用场景:新建按钮出现在视图页时,该字段才有数据
364
+ */
365
+ workObjectId?: string;
366
+ /**
367
+ * 视图标识
368
+ * 适用场景:新建按钮出现在视图页时,该字段才有数据
369
+ */
370
+ viewId?: string;
361
371
  }
362
372
  /**
363
373
  * 按钮构成
@@ -373,6 +383,15 @@ interface PageFeatureContext {
373
383
  */
374
384
  spaceId: string;
375
385
  }
386
+ /**
387
+ * 配置页面构成
388
+ */
389
+ interface ConfigFeatureContext {
390
+ /**
391
+ * 空间标识
392
+ */
393
+ spaceId: string;
394
+ }
376
395
  /**
377
396
  * 详情页 Tab 构成
378
397
  * 工作项详情页中的 Tab 页面
@@ -388,6 +407,7 @@ interface TabFeatureContext {
388
407
  workObjectId: string;
389
408
  /**
390
409
  * 工作项实例唯一标识
410
+ * 适用场景:仅在工作项实例场景下,该字段才有数据,在工作项配置侧该字段为空
391
411
  */
392
412
  workItemId: number;
393
413
  }
@@ -432,6 +452,11 @@ interface ControlFeatureContext {
432
452
  * 详情页可能为空,不推荐强依赖 UUID 读取自有数据
433
453
  */
434
454
  UUID?: string;
455
+ /**
456
+ * 当前节点标识
457
+ * 适用场景:详情页为节点流时,且当前控件位于节点表单内,该字段才有数据
458
+ */
459
+ nodeId?: string;
435
460
  }
436
461
  /**
437
462
  * 拦截事件类型
@@ -1274,12 +1299,10 @@ declare abstract class Utils extends BaseModel {
1274
1299
  }
1275
1300
 
1276
1301
  interface IBroadcastDetailPageWorkItemValueChangedEvent {
1277
- workItems: Array<{
1278
- id: number;
1279
- spaceId: string;
1280
- workObjectId: string;
1281
- changedKeys: Array<AttributeType | string>;
1282
- }>;
1302
+ id: number;
1303
+ spaceId: string;
1304
+ workObjectId: string;
1305
+ changedKeys: Array<AttributeType | string>;
1283
1306
  }
1284
1307
  /**
1285
1308
  * @public
@@ -1322,6 +1345,7 @@ declare abstract class ContainerModal extends BaseModel {
1322
1345
  */
1323
1346
  abstract submit?: <Params, Result>(params: Params) => Promise<Result>;
1324
1347
  /**
1348
+ * mobile version ≥ 7.22.0
1325
1349
  * 关闭插件当前激活的容器模态框
1326
1350
  */
1327
1351
  abstract close(): Promise<void>;
@@ -1341,6 +1365,7 @@ declare abstract class Intercept extends BaseModel {
1341
1365
  */
1342
1366
  static load(): Promise<Intercept>;
1343
1367
  /**
1368
+ * mobile version ≥ 7.22.0
1344
1369
  * 获取当前触发的拦截事件上下文
1345
1370
  */
1346
1371
  abstract getContext<T = any>(): Promise<InterceptFeatureContext<T>>;
@@ -1360,6 +1385,7 @@ declare abstract class Control extends BaseModel {
1360
1385
  */
1361
1386
  static load(): Promise<Control>;
1362
1387
  /**
1388
+ * mobile version ≥ 7.25.0
1363
1389
  * 获取当前控件所在的上下文
1364
1390
  */
1365
1391
  abstract getContext(): Promise<ControlFeatureContext>;
@@ -1369,6 +1395,7 @@ declare abstract class Control extends BaseModel {
1369
1395
  */
1370
1396
  abstract getCreateWorkItemFormItemValues(keys: Array<string | AttributeType>): Promise<Record<string | AttributeType, any>>;
1371
1397
  /**
1398
+ * only web 2.0
1372
1399
  * 监听新建工作项表单项值变化
1373
1400
  * @param watchKeys 需要监听的工作项属性 / 字段 ID 列表,一次限制读取 10 个 keys
1374
1401
  * @param callback 当监听值发生变化时触发,changedKeys 为变化的 keys
@@ -1390,11 +1417,88 @@ declare abstract class Button extends BaseModel {
1390
1417
  */
1391
1418
  static load(): Promise<Button>;
1392
1419
  /**
1420
+ * mobile version ≥ 7.24.0
1393
1421
  * 获取当前按钮的上下文
1394
1422
  */
1395
1423
  abstract getContext(): Promise<ButtonFeatureContext>;
1396
1424
  }
1397
1425
 
1426
+ /**
1427
+ * @public
1428
+ * 控件
1429
+ */
1430
+ declare abstract class Configuration extends BaseModel {
1431
+ /**
1432
+ * @internal
1433
+ */
1434
+ protected static [IMPL_KEY]: string;
1435
+ /**
1436
+ * 加载数据
1437
+ */
1438
+ static load(): Promise<Configuration>;
1439
+ /**
1440
+ * 获取当前配置点位的上下文
1441
+ */
1442
+ abstract getContext(): Promise<ConfigFeatureContext>;
1443
+ }
1444
+
1445
+ /**
1446
+ * @public
1447
+ * 控件
1448
+ */
1449
+ declare abstract class Page extends BaseModel {
1450
+ /**
1451
+ * @internal
1452
+ */
1453
+ protected static [IMPL_KEY]: string;
1454
+ /**
1455
+ * 加载数据
1456
+ */
1457
+ static load(): Promise<Page>;
1458
+ /**
1459
+ * 获取当前内嵌页面的上下文
1460
+ */
1461
+ abstract getContext(): Promise<PageFeatureContext>;
1462
+ }
1463
+
1464
+ /**
1465
+ * @public
1466
+ * 控件
1467
+ */
1468
+ declare abstract class Tab extends BaseModel {
1469
+ /**
1470
+ * @internal
1471
+ */
1472
+ protected static [IMPL_KEY]: string;
1473
+ /**
1474
+ * 加载数据
1475
+ */
1476
+ static load(): Promise<Tab>;
1477
+ /**
1478
+ * 获取当前详情页 Tab 的上下文
1479
+ */
1480
+ abstract getContext(): Promise<TabFeatureContext>;
1481
+ }
1482
+
1483
+ /**
1484
+ * @public
1485
+ * 控件
1486
+ */
1487
+ declare abstract class View extends BaseModel {
1488
+ /**
1489
+ * @internal
1490
+ */
1491
+ protected static [IMPL_KEY]: string;
1492
+ /**
1493
+ * 加载数据
1494
+ */
1495
+ static load(): Promise<View>;
1496
+ /**
1497
+ * 获取当前视图的上下文
1498
+ */
1499
+ abstract getContext(): Promise<ViewFeatureContext>;
1500
+ }
1501
+
1398
1502
  /**
1399
1503
  * @public
1400
1504
  * SDKClient 的配置项
@@ -1432,6 +1536,26 @@ declare class SDKClient {
1432
1536
  * only 2.0
1433
1537
  */
1434
1538
  get button(): Button;
1539
+ /**
1540
+ * 配置点位容器特有能力
1541
+ * only 2.0
1542
+ */
1543
+ get configuration(): Configuration;
1544
+ /**
1545
+ * 导航点位容器特有能力
1546
+ * only 2.0
1547
+ */
1548
+ get page(): Page;
1549
+ /**
1550
+ * tab 点位容器特有能力
1551
+ * only 2.0
1552
+ */
1553
+ get tab(): Tab;
1554
+ /**
1555
+ * 视图点位容器特有能力
1556
+ * only 2.0
1557
+ */
1558
+ get view(): View;
1435
1559
  /**
1436
1560
  * 应用导航
1437
1561
  */
@@ -1583,4 +1707,4 @@ declare class NotSupportedError extends CustomError {
1583
1707
  * @packageDocumentation
1584
1708
  */
1585
1709
 
1586
- export { ActionSheet, ActionSheetOptions, AttributeType, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, Broadcast, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, ContainerModal, Context, Control, ControlFeatureContext, CreateButtonFeatureContext, Field, FieldType, FlowMode, IBroadcastDetailPageWorkItemValueChangedEvent, IMPL_KEY, IPluginCustomBuildConfig, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, MEEGO_BIZ_HUB, Modal, ModalConfirmOptions, Navigation, NoAuthError, NodeStatus, NotFoundError, NotSupportedError, Off, OutOfLimitError, PageFeatureContext, RichTextEditor, RichTextEditorContent, RichTextEditorOptions, Role, RoleOwners, SDKClient, SDKClientOptions, Space, Storage, TabFeatureContext, Toast, ToastOptions, User, Utils, ViewFeatureContext, WorkItem, WorkItemButtonFeatureContext, WorkItemCreateFormPreset, WorkItemFinder, WorkItemFinderOptions, WorkObject, SDKClient as default, unwatch };
1710
+ export { ActionSheet, ActionSheetOptions, AttributeType, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, Broadcast, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, ConfigFeatureContext, Configuration, ContainerModal, Context, Control, ControlFeatureContext, CreateButtonFeatureContext, Field, FieldType, FlowMode, IBroadcastDetailPageWorkItemValueChangedEvent, IMPL_KEY, IPluginCustomBuildConfig, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, MEEGO_BIZ_HUB, Modal, ModalConfirmOptions, Navigation, NoAuthError, NodeStatus, NotFoundError, NotSupportedError, Off, OutOfLimitError, Page, PageFeatureContext, RichTextEditor, RichTextEditorContent, RichTextEditorOptions, Role, RoleOwners, SDKClient, SDKClientOptions, Space, Storage, Tab, TabFeatureContext, Toast, ToastOptions, User, Utils, View, ViewFeatureContext, 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.0.2-dev.0",
3
+ "version": "2.0.2-dev.1",
4
4
  "runtimeMinVersions": {
5
5
  "web": "2.1.0",
6
6
  "mobile": "1.1.0"