@qn-pandora/pandora-component 4.0.7 → 4.0.10

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.json CHANGED
@@ -1,6 +1,75 @@
1
1
  {
2
2
  "name": "@qn-pandora/pandora-component",
3
3
  "entries": [
4
+ {
5
+ "version": "4.0.10",
6
+ "tag": "@qn-pandora/pandora-component_v4.0.10",
7
+ "date": "Tue, 23 May 2023 03:12:29 GMT",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "comment": "2023.05.23发布"
12
+ }
13
+ ],
14
+ "dependency": [
15
+ {
16
+ "comment": "Updating dependency \"@qn-pandora/pandora-component-icons\" from `^3.0.12` to `^3.0.13`"
17
+ },
18
+ {
19
+ "comment": "Updating dependency \"@qn-pandora/app-sdk\" from `^3.0.12` to `^3.0.13`"
20
+ },
21
+ {
22
+ "comment": "Updating dependency \"@qn-pandora/pandora-tools\" from `^2.0.11` to `^2.0.12`"
23
+ }
24
+ ]
25
+ }
26
+ },
27
+ {
28
+ "version": "4.0.9",
29
+ "tag": "@qn-pandora/pandora-component_v4.0.9",
30
+ "date": "Wed, 19 Apr 2023 03:15:25 GMT",
31
+ "comments": {
32
+ "patch": [
33
+ {
34
+ "comment": "2023.04.19发包"
35
+ }
36
+ ],
37
+ "dependency": [
38
+ {
39
+ "comment": "Updating dependency \"@qn-pandora/pandora-component-icons\" from `^3.0.11` to `^3.0.12`"
40
+ },
41
+ {
42
+ "comment": "Updating dependency \"@qn-pandora/app-sdk\" from `^3.0.11` to `^3.0.12`"
43
+ },
44
+ {
45
+ "comment": "Updating dependency \"@qn-pandora/pandora-tools\" from `^2.0.10` to `^2.0.11`"
46
+ }
47
+ ]
48
+ }
49
+ },
50
+ {
51
+ "version": "4.0.8",
52
+ "tag": "@qn-pandora/pandora-component_v4.0.8",
53
+ "date": "Tue, 04 Apr 2023 08:26:02 GMT",
54
+ "comments": {
55
+ "patch": [
56
+ {
57
+ "comment": "2023.04.04"
58
+ }
59
+ ],
60
+ "dependency": [
61
+ {
62
+ "comment": "Updating dependency \"@qn-pandora/pandora-component-icons\" from `^3.0.10` to `^3.0.11`"
63
+ },
64
+ {
65
+ "comment": "Updating dependency \"@qn-pandora/app-sdk\" from `^3.0.10` to `^3.0.11`"
66
+ },
67
+ {
68
+ "comment": "Updating dependency \"@qn-pandora/pandora-tools\" from `^2.0.9` to `^2.0.10`"
69
+ }
70
+ ]
71
+ }
72
+ },
4
73
  {
5
74
  "version": "4.0.7",
6
75
  "tag": "@qn-pandora/pandora-component_v4.0.7",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,30 @@
1
1
  # Change Log - @qn-pandora/pandora-component
2
2
 
3
- This log was last generated on Thu, 23 Mar 2023 07:12:05 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 23 May 2023 03:12:29 GMT and should not be manually modified.
4
+
5
+ ## 4.0.10
6
+
7
+ Tue, 23 May 2023 03:12:29 GMT
8
+
9
+ ### Patches
10
+
11
+ - 2023.05.23 发布
12
+
13
+ ## 4.0.9
14
+
15
+ Wed, 19 Apr 2023 03:15:25 GMT
16
+
17
+ ### Patches
18
+
19
+ - 2023.04.19 发包
20
+
21
+ ## 4.0.8
22
+
23
+ Tue, 04 Apr 2023 08:26:02 GMT
24
+
25
+ ### Patches
26
+
27
+ - 2023.04.04
4
28
 
5
29
  ## 4.0.7
6
30
 
@@ -4,6 +4,7 @@ import { ECollapseType } from '../index';
4
4
  export interface ICollapsePanelProps extends CollapsePanelProps {
5
5
  children?: any;
6
6
  type?: ECollapseType;
7
+ onItemClick?: (key: number | string) => void;
7
8
  }
8
9
  export declare function CollapsePanel(props: ICollapsePanelProps): JSX.Element;
9
10
  export default CollapsePanel;
@@ -29,7 +29,7 @@ export function CollapsePanel(props) {
29
29
  var type = props.type, header = props.header, key = props.key, children = props.children, className = props.className, others = __rest(props, ["type", "header", "key", "children", "className"]);
30
30
  var newHeader = useMemo(function () {
31
31
  if (type === ECollapseType.Primary) {
32
- return (React.createElement("span", null,
32
+ return (React.createElement("span", { className: SDK_PREFIX + "-header-container" },
33
33
  React.createElement("div", { className: SDK_PREFIX + "-header-line" }),
34
34
  React.createElement("span", null, header)));
35
35
  }
@@ -34,9 +34,11 @@ export var ECollapseType;
34
34
  ECollapseType["Dashed"] = "dashed";
35
35
  })(ECollapseType || (ECollapseType = {}));
36
36
  export function Collapse(props) {
37
- var children = props.children, className = props.className, _a = props.type, type = _a === void 0 ? ECollapseType.Simple : _a, _b = props.expandIconPosition, expandIconPosition = _b === void 0 ? 'left' : _b, onDelete = props.onDelete, others = __rest(props, ["children", "className", "type", "expandIconPosition", "onDelete"]);
37
+ var children = props.children, className = props.className, _a = props.type, type = _a === void 0 ? ECollapseType.Simple : _a, expandIconPosition = props.expandIconPosition, onDelete = props.onDelete, others = __rest(props, ["children", "className", "type", "expandIconPosition", "onDelete"]);
38
38
  var position = useMemo(function () {
39
- return type === ECollapseType.Primary ? 'right' : expandIconPosition;
39
+ return type === ECollapseType.Primary && !expandIconPosition
40
+ ? 'right'
41
+ : expandIconPosition || 'left';
40
42
  }, [expandIconPosition, type]);
41
43
  var showArrow = useMemo(function () {
42
44
  return type !== ECollapseType.Dashed;