poi-plugin-kai-planner 1.0.15 → 1.0.17

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.15",
3
+ "version": "1.0.17",
4
4
  "main": "index.js",
5
5
  "author": "aulu",
6
6
  "contributors": ["aulu"],
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "poiPlugin": {
19
19
  "title": "改修规划",
20
- "description": "管理个人装备与改修计划。改修计划数据源来自明石工厂(https://akashi-list.me/)",
20
+ "description": "管理个人装备与改修计划。改修计划数据源来自 [明石工厂](https://akashi-list.me/) ",
21
21
  "icon": "tasks",
22
22
  "enableDebug": false,
23
23
  "dataSource": {
@@ -163,6 +163,7 @@ class AcquisitionTab extends React.Component {
163
163
  name: getEquipName(masterEquipsById, key),
164
164
  sortno: getEquipSortno(masterEquipsById, key),
165
165
  }))
166
+ .filter((item) => item.sortno > 0)
166
167
  .sort((a, b) => {
167
168
  if (a.sortno !== b.sortno) return a.sortno - b.sortno;
168
169
  return Number(a.id) - Number(b.id);
@@ -501,3 +502,5 @@ module.exports = AcquisitionTab;
501
502
 
502
503
 
503
504
 
505
+
506
+
@@ -18,12 +18,12 @@ function CreatePlanFormV2({
18
18
  targetInputValue,
19
19
  startInputValue,
20
20
  selectedTargetText,
21
- selectedStartText,
21
+ selectedStartTexts,
22
22
  onPatchCreate,
23
23
  onSelectTarget,
24
24
  onSelectStart,
25
25
  onClearTarget,
26
- onClearStart,
26
+ onRemoveStart,
27
27
  onSubmit,
28
28
  onCancel,
29
29
  themeTokens,
@@ -140,18 +140,21 @@ function CreatePlanFormV2({
140
140
  themeTokens: theme,
141
141
  onSelect: (value, option) => onSelectStart(value, option),
142
142
  }),
143
- selectedStartText
144
- ? React.createElement(
145
- "button",
146
- {
147
- type: "button",
148
- onClick: () => onClearStart && onClearStart(),
149
- style: chipStyle,
150
- title: "点击清空已选起点装备",
151
- },
152
- `已选:${selectedStartText} ×`
143
+ ...(Array.isArray(selectedStartTexts)
144
+ ? selectedStartTexts.map((row) =>
145
+ React.createElement(
146
+ "button",
147
+ {
148
+ key: `selected-start-${row.apiId}`,
149
+ type: "button",
150
+ onClick: () => onRemoveStart && onRemoveStart(row.apiId),
151
+ style: chipStyle,
152
+ title: "点击移除已选起点装备",
153
+ },
154
+ `已选:${row.text} ×`
155
+ )
153
156
  )
154
- : null
157
+ : [])
155
158
  ),
156
159
  React.createElement(
157
160
  "div",