@next-bricks/advanced 0.42.8 → 0.43.0

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.
Files changed (31) hide show
  1. package/dist/bricks.json +14 -13
  2. package/dist/chunks/7157.d2e43b0c.js +2 -0
  3. package/dist/chunks/7157.d2e43b0c.js.map +1 -0
  4. package/dist/chunks/eo-table.2d3928a8.js +2 -0
  5. package/dist/chunks/eo-table.2d3928a8.js.map +1 -0
  6. package/dist/chunks/eo-workbench-layout-v2.4b7795b6.js +2 -0
  7. package/dist/chunks/eo-workbench-layout-v2.4b7795b6.js.map +1 -0
  8. package/dist/chunks/main.166e0ca4.js +2 -0
  9. package/dist/chunks/{main.3d7675a4.js.map → main.166e0ca4.js.map} +1 -1
  10. package/dist/examples.json +3 -3
  11. package/dist/index.9df00b4a.js +2 -0
  12. package/dist/index.9df00b4a.js.map +1 -0
  13. package/dist/manifest.json +129 -118
  14. package/dist/types.json +191 -260
  15. package/dist-types/interfaces/index.d.ts +1 -0
  16. package/dist-types/interfaces/workbench.d.ts +9 -0
  17. package/dist-types/workbench-layout-v2/DraggableComponentMenuItem.d.ts +7 -0
  18. package/dist-types/workbench-layout-v2/DraggableComponentMenuItem.spec.d.ts +1 -0
  19. package/dist-types/workbench-layout-v2/DroppableComponentLayoutItem.d.ts +9 -0
  20. package/dist-types/workbench-layout-v2/DroppableComponentLayoutItem.spec.d.ts +1 -0
  21. package/dist-types/workbench-layout-v2/index.d.ts +9 -10
  22. package/package.json +2 -2
  23. package/dist/chunks/2197.b7d70cdc.js +0 -2
  24. package/dist/chunks/2197.b7d70cdc.js.map +0 -1
  25. package/dist/chunks/eo-table.be1334ae.js +0 -2
  26. package/dist/chunks/eo-table.be1334ae.js.map +0 -1
  27. package/dist/chunks/eo-workbench-layout-v2.6c93b89d.js +0 -2
  28. package/dist/chunks/eo-workbench-layout-v2.6c93b89d.js.map +0 -1
  29. package/dist/chunks/main.3d7675a4.js +0 -2
  30. package/dist/index.83301ddd.js +0 -2
  31. package/dist/index.83301ddd.js.map +0 -1
package/dist/types.json CHANGED
@@ -509,266 +509,6 @@
509
509
  }
510
510
  ]
511
511
  },
512
- "eo-workbench-layout-v2": {
513
- "properties": [
514
- {
515
- "name": "cardTitle",
516
- "annotation": {
517
- "type": "keyword",
518
- "value": "string"
519
- }
520
- },
521
- {
522
- "name": "isEdit",
523
- "annotation": {
524
- "type": "keyword",
525
- "value": "boolean"
526
- }
527
- },
528
- {
529
- "name": "layouts",
530
- "annotation": {
531
- "type": "array",
532
- "elementType": {
533
- "type": "reference",
534
- "typeName": {
535
- "type": "identifier",
536
- "name": "Layout"
537
- }
538
- }
539
- }
540
- },
541
- {
542
- "name": "toolbarBricks",
543
- "annotation": {
544
- "type": "typeLiteral",
545
- "members": [
546
- {
547
- "type": "propertySignature",
548
- "key": {
549
- "type": "identifier",
550
- "name": "useBrick"
551
- },
552
- "annotation": {
553
- "type": "array",
554
- "elementType": {
555
- "type": "reference",
556
- "typeName": {
557
- "type": "identifier",
558
- "name": "UseSingleBrickConf"
559
- }
560
- }
561
- },
562
- "computed": false
563
- }
564
- ]
565
- }
566
- },
567
- {
568
- "name": "componentList",
569
- "annotation": {
570
- "type": "array",
571
- "elementType": {
572
- "type": "reference",
573
- "typeName": {
574
- "type": "identifier",
575
- "name": "Item"
576
- }
577
- }
578
- }
579
- }
580
- ],
581
- "events": [
582
- {
583
- "name": "change",
584
- "detail": {
585
- "annotation": {
586
- "type": "array",
587
- "elementType": {
588
- "type": "reference",
589
- "typeName": {
590
- "type": "identifier",
591
- "name": "Layout"
592
- }
593
- }
594
- }
595
- }
596
- },
597
- {
598
- "name": "save",
599
- "detail": {
600
- "annotation": {
601
- "type": "array",
602
- "elementType": {
603
- "type": "reference",
604
- "typeName": {
605
- "type": "identifier",
606
- "name": "Layout"
607
- }
608
- }
609
- }
610
- }
611
- },
612
- {
613
- "name": "cancel",
614
- "detail": {
615
- "annotation": {
616
- "type": "keyword",
617
- "value": "void"
618
- }
619
- }
620
- },
621
- {
622
- "name": "action.click",
623
- "detail": {
624
- "annotation": {
625
- "type": "typeLiteral",
626
- "members": [
627
- {
628
- "type": "propertySignature",
629
- "key": {
630
- "type": "identifier",
631
- "name": "action"
632
- },
633
- "annotation": {
634
- "type": "reference",
635
- "typeName": {
636
- "type": "identifier",
637
- "name": "SimpleAction"
638
- }
639
- },
640
- "computed": false
641
- },
642
- {
643
- "type": "propertySignature",
644
- "key": {
645
- "type": "identifier",
646
- "name": "layouts"
647
- },
648
- "annotation": {
649
- "type": "array",
650
- "elementType": {
651
- "type": "reference",
652
- "typeName": {
653
- "type": "identifier",
654
- "name": "Layout"
655
- }
656
- }
657
- },
658
- "computed": false
659
- }
660
- ]
661
- }
662
- }
663
- }
664
- ],
665
- "methods": [
666
- {
667
- "name": "setLayouts",
668
- "params": [
669
- {
670
- "name": "layouts",
671
- "annotation": {
672
- "type": "array",
673
- "elementType": {
674
- "type": "reference",
675
- "typeName": {
676
- "type": "identifier",
677
- "name": "Layout"
678
- }
679
- }
680
- }
681
- }
682
- ],
683
- "returns": {}
684
- }
685
- ],
686
- "types": [
687
- {
688
- "type": "interface",
689
- "name": "Item",
690
- "body": [
691
- {
692
- "type": "propertySignature",
693
- "key": {
694
- "type": "identifier",
695
- "name": "position"
696
- },
697
- "annotation": {
698
- "type": "reference",
699
- "typeName": {
700
- "type": "identifier",
701
- "name": "Layout"
702
- }
703
- },
704
- "computed": false
705
- },
706
- {
707
- "type": "propertySignature",
708
- "key": {
709
- "type": "identifier",
710
- "name": "key"
711
- },
712
- "annotation": {
713
- "type": "keyword",
714
- "value": "string"
715
- },
716
- "computed": false
717
- },
718
- {
719
- "type": "propertySignature",
720
- "key": {
721
- "type": "identifier",
722
- "name": "title"
723
- },
724
- "annotation": {
725
- "type": "keyword",
726
- "value": "string"
727
- },
728
- "computed": false
729
- },
730
- {
731
- "type": "propertySignature",
732
- "key": {
733
- "type": "identifier",
734
- "name": "style"
735
- },
736
- "annotation": {
737
- "type": "reference",
738
- "typeName": {
739
- "type": "qualifiedName",
740
- "left": {
741
- "type": "identifier",
742
- "name": "React"
743
- },
744
- "right": {
745
- "type": "identifier",
746
- "name": "CSSProperties"
747
- }
748
- }
749
- },
750
- "optional": true,
751
- "computed": false
752
- },
753
- {
754
- "type": "propertySignature",
755
- "key": {
756
- "type": "identifier",
757
- "name": "useBrick"
758
- },
759
- "annotation": {
760
- "type": "reference",
761
- "typeName": {
762
- "type": "identifier",
763
- "name": "UseSingleBrickConf"
764
- }
765
- },
766
- "computed": false
767
- }
768
- ]
769
- }
770
- ]
771
- },
772
512
  "eo-tree": {
773
513
  "properties": [
774
514
  {
@@ -1748,6 +1488,197 @@
1748
1488
  }
1749
1489
  ]
1750
1490
  },
1491
+ "eo-workbench-layout-v2": {
1492
+ "properties": [
1493
+ {
1494
+ "name": "cardTitle",
1495
+ "annotation": {
1496
+ "type": "keyword",
1497
+ "value": "string"
1498
+ }
1499
+ },
1500
+ {
1501
+ "name": "isEdit",
1502
+ "annotation": {
1503
+ "type": "keyword",
1504
+ "value": "boolean"
1505
+ }
1506
+ },
1507
+ {
1508
+ "name": "layouts",
1509
+ "annotation": {
1510
+ "type": "array",
1511
+ "elementType": {
1512
+ "type": "reference",
1513
+ "typeName": {
1514
+ "type": "identifier",
1515
+ "name": "Layout"
1516
+ }
1517
+ }
1518
+ }
1519
+ },
1520
+ {
1521
+ "name": "toolbarBricks",
1522
+ "annotation": {
1523
+ "type": "typeLiteral",
1524
+ "members": [
1525
+ {
1526
+ "type": "propertySignature",
1527
+ "key": {
1528
+ "type": "identifier",
1529
+ "name": "useBrick"
1530
+ },
1531
+ "annotation": {
1532
+ "type": "array",
1533
+ "elementType": {
1534
+ "type": "reference",
1535
+ "typeName": {
1536
+ "type": "identifier",
1537
+ "name": "UseSingleBrickConf"
1538
+ }
1539
+ }
1540
+ },
1541
+ "computed": false
1542
+ }
1543
+ ]
1544
+ }
1545
+ },
1546
+ {
1547
+ "name": "componentList",
1548
+ "annotation": {
1549
+ "type": "array",
1550
+ "elementType": {
1551
+ "type": "reference",
1552
+ "typeName": {
1553
+ "type": "identifier",
1554
+ "name": "WorkbenchComponent"
1555
+ }
1556
+ }
1557
+ }
1558
+ },
1559
+ {
1560
+ "name": "showSettingButton",
1561
+ "annotation": {
1562
+ "type": "keyword",
1563
+ "value": "boolean"
1564
+ }
1565
+ }
1566
+ ],
1567
+ "events": [
1568
+ {
1569
+ "name": "change",
1570
+ "detail": {
1571
+ "annotation": {
1572
+ "type": "array",
1573
+ "elementType": {
1574
+ "type": "reference",
1575
+ "typeName": {
1576
+ "type": "identifier",
1577
+ "name": "Layout"
1578
+ }
1579
+ }
1580
+ }
1581
+ }
1582
+ },
1583
+ {
1584
+ "name": "save",
1585
+ "detail": {
1586
+ "annotation": {
1587
+ "type": "array",
1588
+ "elementType": {
1589
+ "type": "reference",
1590
+ "typeName": {
1591
+ "type": "identifier",
1592
+ "name": "Layout"
1593
+ }
1594
+ }
1595
+ }
1596
+ }
1597
+ },
1598
+ {
1599
+ "name": "cancel",
1600
+ "detail": {
1601
+ "annotation": {
1602
+ "type": "keyword",
1603
+ "value": "void"
1604
+ }
1605
+ }
1606
+ },
1607
+ {
1608
+ "name": "setting",
1609
+ "detail": {
1610
+ "annotation": {
1611
+ "type": "keyword",
1612
+ "value": "void"
1613
+ }
1614
+ }
1615
+ },
1616
+ {
1617
+ "name": "action.click",
1618
+ "detail": {
1619
+ "annotation": {
1620
+ "type": "typeLiteral",
1621
+ "members": [
1622
+ {
1623
+ "type": "propertySignature",
1624
+ "key": {
1625
+ "type": "identifier",
1626
+ "name": "action"
1627
+ },
1628
+ "annotation": {
1629
+ "type": "reference",
1630
+ "typeName": {
1631
+ "type": "identifier",
1632
+ "name": "SimpleAction"
1633
+ }
1634
+ },
1635
+ "computed": false
1636
+ },
1637
+ {
1638
+ "type": "propertySignature",
1639
+ "key": {
1640
+ "type": "identifier",
1641
+ "name": "layouts"
1642
+ },
1643
+ "annotation": {
1644
+ "type": "array",
1645
+ "elementType": {
1646
+ "type": "reference",
1647
+ "typeName": {
1648
+ "type": "identifier",
1649
+ "name": "Layout"
1650
+ }
1651
+ }
1652
+ },
1653
+ "computed": false
1654
+ }
1655
+ ]
1656
+ }
1657
+ }
1658
+ }
1659
+ ],
1660
+ "methods": [
1661
+ {
1662
+ "name": "setLayouts",
1663
+ "params": [
1664
+ {
1665
+ "name": "layouts",
1666
+ "annotation": {
1667
+ "type": "array",
1668
+ "elementType": {
1669
+ "type": "reference",
1670
+ "typeName": {
1671
+ "type": "identifier",
1672
+ "name": "Layout"
1673
+ }
1674
+ }
1675
+ }
1676
+ }
1677
+ ],
1678
+ "returns": {}
1679
+ }
1680
+ ]
1681
+ },
1751
1682
  "eo-table": {
1752
1683
  "properties": [
1753
1684
  {
@@ -0,0 +1 @@
1
+ export * from "./workbench";
@@ -0,0 +1,9 @@
1
+ import { UseSingleBrickConf } from "@next-core/types";
2
+ import { Layout } from "react-grid-layout";
3
+ export type WorkbenchComponent = {
4
+ position: Layout;
5
+ key: string;
6
+ title: string;
7
+ style?: React.CSSProperties;
8
+ useBrick: UseSingleBrickConf;
9
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { WorkbenchComponent } from "../interfaces";
3
+ export interface DraggableComponentMenuItemProps {
4
+ component: WorkbenchComponent;
5
+ onClick?(): void;
6
+ }
7
+ export declare function DraggableComponentMenuItem(props: DraggableComponentMenuItemProps): React.ReactElement;
@@ -0,0 +1 @@
1
+ import "@testing-library/jest-dom";
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { WorkbenchComponent } from "../interfaces";
3
+ export interface DroppableComponentLayoutItemProps {
4
+ component: WorkbenchComponent;
5
+ isEdit?: boolean;
6
+ onDrop?(component: WorkbenchComponent): void;
7
+ onDelete?(): void;
8
+ }
9
+ export declare function DroppableComponentLayoutItem(props: DroppableComponentLayoutItemProps): React.ReactElement;
@@ -0,0 +1 @@
1
+ import "@testing-library/jest-dom";
@@ -4,22 +4,17 @@ import { UseSingleBrickConf } from "@next-core/types";
4
4
  import { Layout } from "react-grid-layout";
5
5
  import "@next-core/theme";
6
6
  import { SimpleAction } from "@next-bricks/basic/actions";
7
+ import { WorkbenchComponent } from "../interfaces";
7
8
  import "./styles.css";
8
- type Item = {
9
- position: Layout;
10
- key: string;
11
- title: string;
12
- style?: React.CSSProperties;
13
- useBrick: UseSingleBrickConf;
14
- };
15
9
  export interface EoWorkbenchLayoutV2Props {
16
10
  cardTitle?: string;
17
11
  layouts?: Layout[];
18
12
  toolbarBricks?: {
19
13
  useBrick: UseSingleBrickConf[];
20
14
  };
21
- componentList?: Item[];
15
+ componentList?: WorkbenchComponent[];
22
16
  isEdit?: boolean;
17
+ showSettingButton?: boolean;
23
18
  }
24
19
  export interface EoWorkbenchLayoutV2ComponentRef {
25
20
  setLayouts(layouts: Layout[]): void;
@@ -29,6 +24,7 @@ export interface EoWorkbenchLayoutV2ComponentProps extends EoWorkbenchLayoutV2Pr
29
24
  onSave?: (layout: Layout[]) => void;
30
25
  onCancel?: () => void;
31
26
  onActionClick?: (action: SimpleAction, layouts: Layout[]) => void;
27
+ onSetting?: () => void;
32
28
  }
33
29
  export declare const EoWorkbenchLayoutComponent: React.ForwardRefExoticComponent<EoWorkbenchLayoutV2ComponentProps & React.RefAttributes<EoWorkbenchLayoutV2ComponentRef>>;
34
30
  /**
@@ -42,9 +38,12 @@ export declare class EoWorkbenchLayoutV2 extends ReactNextElement {
42
38
  accessor toolbarBricks: {
43
39
  useBrick: UseSingleBrickConf[];
44
40
  } | undefined;
45
- accessor componentList: Item[] | undefined;
41
+ accessor componentList: WorkbenchComponent[] | undefined;
42
+ /**
43
+ * description: 用于设置页面样式和布局的按钮
44
+ */
45
+ accessor showSettingButton: boolean | undefined;
46
46
  setLayouts(layouts: Layout[]): void;
47
47
  connectedCallback(): void;
48
48
  render(): React.JSX.Element;
49
49
  }
50
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/advanced",
3
- "version": "0.42.8",
3
+ "version": "0.43.0",
4
4
  "homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/advanced",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,5 +45,5 @@
45
45
  "@next-bricks/icons": "*",
46
46
  "@next-bricks/markdown": "*"
47
47
  },
48
- "gitHead": "77728717e861ef1853d7e00165ff55c850f3c6eb"
48
+ "gitHead": "6d031d35aacd2f57a07f46d7da681080de2dd44a"
49
49
  }