poi-plugin-kai-planner 1.0.10 → 1.0.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poi-plugin-kai-planner",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "main": "index.js",
5
5
  "author": "aulu",
6
6
  "contributors": ["aulu"],
@@ -1,61 +1,84 @@
1
1
  /* src/app/components/EquipTypeIconFilter.js */
2
2
 
3
3
  const React = require("react");
4
- const { SlotitemTypeIcon } = require("./SlotitemTypeIcon");
4
+
5
+ let SlotitemIcon = null;
6
+ try {
7
+ ({ SlotitemIcon } = require("views/components/etc/icon"));
8
+ } catch {}
5
9
 
6
10
  function EquipTypeIconFilter({ options, selectedKeys, onToggle, onClear }) {
7
11
  if (!Array.isArray(options) || options.length === 0) return null;
8
12
 
9
13
  const selectedSet = new Set((selectedKeys || []).map(String));
10
- const baseButtonStyle = {
14
+ const areaStyle = {
15
+ display: "flex",
16
+ flexWrap: "wrap",
17
+ alignItems: "center",
18
+ };
19
+ const entryStyle = {
11
20
  display: "inline-flex",
12
21
  alignItems: "center",
13
- justifyContent: "center",
14
- minWidth: 44,
15
- height: 44,
16
- padding: 0,
17
- borderRadius: 8,
22
+ marginRight: "1em",
23
+ marginBottom: 8,
24
+ cursor: "pointer",
25
+ };
26
+ const checkboxStyle = {
27
+ verticalAlign: "middle",
28
+ display: "inline-block",
29
+ margin: 0,
30
+ marginRight: 4,
31
+ };
32
+ const actionButtonStyle = {
33
+ marginTop: 10,
34
+ marginBottom: 10,
35
+ minWidth: 120,
36
+ height: 24,
18
37
  border: "1px solid rgba(255,255,255,0.12)",
19
- background: "rgba(255,255,255,0.04)",
38
+ background: "rgba(255,255,255,0.08)",
20
39
  color: "#e5e7eb",
21
40
  cursor: "pointer",
22
- flexShrink: 0,
23
41
  };
24
42
 
25
43
  return React.createElement(
26
44
  "div",
27
- { style: { display: "flex", gap: 8, flexWrap: "wrap", alignItems: "center" } },
45
+ null,
28
46
  React.createElement(
29
- "button",
30
- {
31
- type: "button",
32
- onClick: onClear,
33
- style: {
34
- ...baseButtonStyle,
35
- padding: "0 10px",
36
- background: selectedSet.size === 0 ? "rgba(255,255,255,0.14)" : "rgba(255,255,255,0.04)",
37
- },
38
- },
39
- "全部"
47
+ "div",
48
+ { style: areaStyle },
49
+ ...options.map((option) => {
50
+ const key = String(option.key);
51
+ const active = selectedSet.has(key);
52
+ return React.createElement(
53
+ "label",
54
+ {
55
+ key,
56
+ style: entryStyle,
57
+ title: option.name || key,
58
+ },
59
+ React.createElement("input", {
60
+ type: "checkbox",
61
+ checked: active,
62
+ onChange: () => onToggle(key),
63
+ style: checkboxStyle,
64
+ }),
65
+ SlotitemIcon ? React.createElement(SlotitemIcon, { slotitemId: option.iconType }) : null
66
+ );
67
+ })
40
68
  ),
41
- ...options.map((option) => {
42
- const key = String(option.key);
43
- const active = selectedSet.has(key);
44
- return React.createElement(
69
+ React.createElement(
70
+ "div",
71
+ { style: { display: "flex", gap: 12, flexWrap: "wrap" } },
72
+ React.createElement(
45
73
  "button",
46
74
  {
47
- key,
48
75
  type: "button",
49
- onClick: () => onToggle(key),
50
- "aria-label": option.name || key,
51
- style: {
52
- ...baseButtonStyle,
53
- background: active ? "rgba(255,255,255,0.14)" : "rgba(255,255,255,0.04)",
54
- },
76
+ onClick: onClear,
77
+ style: actionButtonStyle,
55
78
  },
56
- React.createElement(SlotitemTypeIcon, { iconType: option.iconType })
57
- );
58
- })
79
+ "重置选项"
80
+ )
81
+ )
59
82
  );
60
83
  }
61
84
 
@@ -2,7 +2,10 @@
2
2
 
3
3
  const React = require("react");
4
4
 
5
- const { SlotitemTypeIcon } = require("../../components/SlotitemTypeIcon");
5
+ let SlotitemIcon = null;
6
+ try {
7
+ ({ SlotitemIcon } = require("views/components/etc/icon"));
8
+ } catch {}
6
9
 
7
10
  const { EquipTypeIconFilter } = require("../../components/EquipTypeIconFilter");
8
11
 
@@ -828,10 +831,9 @@ React.createElement("th", { style: { ...thStyle, ...upgradeColStyle } }, "可进
828
831
  foldIcon,
829
832
  ),
830
833
 
831
- React.createElement(SlotitemTypeIcon, {
832
- iconType: r.iconType,
833
- title: r.equipTypeName,
834
- }),
834
+ SlotitemIcon && r.iconType
835
+ ? React.createElement(SlotitemIcon, { slotitemId: r.iconType })
836
+ : null,
835
837
 
836
838
  React.createElement(
837
839
  "div",
@@ -1,7 +1,10 @@
1
1
  /* src/app/tabs/wishlist/components/WishlistTable.js */
2
2
 
3
3
  const React = require("react");
4
- const { SlotitemTypeIcon } = require("../../../components/SlotitemTypeIcon");
4
+ let SlotitemIcon = null;
5
+ try {
6
+ ({ SlotitemIcon } = require("views/components/etc/icon"));
7
+ } catch {}
5
8
 
6
9
  const PRIORITY_STYLE_MAP = {
7
10
  P0: { color: "#fecaca", borderColor: "rgba(239,68,68,0.55)", background: "rgba(239,68,68,0.16)" },
@@ -133,10 +136,9 @@ function WishlistTable({
133
136
  },
134
137
  expandIcon
135
138
  ),
136
- React.createElement(SlotitemTypeIcon, {
137
- iconType: rowVm.targetIconType,
138
- title: rowVm.targetEquipTypeName,
139
- }),
139
+ SlotitemIcon && rowVm.targetIconType
140
+ ? React.createElement(SlotitemIcon, { slotitemId: rowVm.targetIconType })
141
+ : null,
140
142
  React.createElement(
141
143
  "div",
142
144
  null,