@agile-team/wl-skills-ui 1.8.5 → 1.8.6

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.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to **@agile-team/wl-skills-ui** will be documented in this f
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [1.8.6] - 2026-05-17
8
+
9
+ ### Added
10
+
11
+ - **`renderOps` 运行时类型守门**:dev 模式下检测到 `OpItem.type` 不在 `view | edit | del | danger | log | ok | send | chip | link` 集合中时,`console.warn` 一次性提示并按 `link` 兜底渲染。修复下游项目(`strict: false`)传错 type 时图标静默降级为纯文字、毫无察觉的隐性体验问题。production 环境无任何副作用。
12
+
7
13
  ## [1.8.5] - 2026-05-17
8
14
 
9
15
  ### Added
@@ -166,8 +166,40 @@ function isOpVisible(item) {
166
166
  if (typeof item.show === "function") return item.show();
167
167
  return item.show !== false;
168
168
  }
169
+ var KNOWN_OP_TYPES = /* @__PURE__ */ new Set([
170
+ "view",
171
+ "edit",
172
+ "del",
173
+ "danger",
174
+ "log",
175
+ "ok",
176
+ "send",
177
+ "chip",
178
+ "link"
179
+ ]);
180
+ var __opWarned = /* @__PURE__ */ new Set();
181
+ function warnUnknownOpType(item) {
182
+ let isDev = true;
183
+ try {
184
+ const g = globalThis;
185
+ if (g.process && g.process.env && g.process.env.NODE_ENV === "production") {
186
+ isDev = false;
187
+ }
188
+ } catch {
189
+ }
190
+ if (!isDev) return;
191
+ const t = item.type;
192
+ if (t && KNOWN_OP_TYPES.has(t)) return;
193
+ const key = String(t);
194
+ if (__opWarned.has(key)) return;
195
+ __opWarned.add(key);
196
+ console.warn(
197
+ '[@agile-team/wl-skills-ui renderOps] \u68C0\u6D4B\u5230\u672A\u77E5\u7684 type="' + key + '"\uFF0C\u5C06\u6309 link \u515C\u5E95\u6E32\u67D3\u4E3A\u6587\u5B57\u6309\u94AE\u3002\n \u8BF7\u6539\u4E3A\uFF1Aview | edit | del | danger | log | ok | send | chip | link\n \u8BE6\u89C1 runtime/core/types.ts OpItem \u5B9A\u4E49\u3002'
198
+ );
199
+ }
169
200
  function renderOps(items) {
170
201
  const visible = items.filter(isOpVisible);
202
+ if (visible.length) visible.forEach(warnUnknownOpType);
171
203
  const iconItems = visible.filter((i) => i.type in ICON_PRESETS);
172
204
  const otherItems = visible.filter((i) => !(i.type in ICON_PRESETS));
173
205
  const nodes = [];
@@ -1,5 +1,5 @@
1
- import { renderTagNode, renderClassifyTag, registerColumnAutoMaps, renderRatingLevel, renderBadge } from './chunk-QDTNMM7W.js';
2
- export { registerDictColorMap, registerDictColorMaps, renderDictClassifyTag, setDictResolver } from './chunk-QDTNMM7W.js';
1
+ import { renderTagNode, renderClassifyTag, registerColumnAutoMaps, renderRatingLevel, renderBadge } from './chunk-FMVZ54BY.js';
2
+ export { registerDictColorMap, registerDictColorMaps, renderDictClassifyTag, setDictResolver } from './chunk-FMVZ54BY.js';
3
3
 
4
4
  // runtime/presets/common.ts
5
5
  var RISK_LEVEL_MAP = {
package/es/index.js CHANGED
@@ -1 +1 @@
1
- export { AUDIT_STATUS_MAP, ENABLE_STATUS_MAP, RATING_LEVEL_COLORS, VERIFY_STATUS_MAP, clearColumnAutoMap, defineColumns, getColumnAutoMap, registerColumnAutoMap, registerColumnAutoMaps, registerDictColorMap, registerDictColorMaps, renderAuditStatus, renderBadge, renderClassifyTag, renderCountBadge, renderDangerText, renderDictClassifyTag, renderEnableStatus, renderOps, renderRatingLevel, renderTagNode, renderTagSlot, renderVerifyStatus, setDictResolver } from './chunk-QDTNMM7W.js';
1
+ export { AUDIT_STATUS_MAP, ENABLE_STATUS_MAP, RATING_LEVEL_COLORS, VERIFY_STATUS_MAP, clearColumnAutoMap, defineColumns, getColumnAutoMap, registerColumnAutoMap, registerColumnAutoMaps, registerDictColorMap, registerDictColorMaps, renderAuditStatus, renderBadge, renderClassifyTag, renderCountBadge, renderDangerText, renderDictClassifyTag, renderEnableStatus, renderOps, renderRatingLevel, renderTagNode, renderTagSlot, renderVerifyStatus, setDictResolver } from './chunk-FMVZ54BY.js';
@@ -1,4 +1,4 @@
1
- import { renderTagNode, registerDictColorMaps, registerColumnAutoMaps } from '../chunk-QDTNMM7W.js';
1
+ import { renderTagNode, registerDictColorMaps, registerColumnAutoMaps } from '../chunk-FMVZ54BY.js';
2
2
 
3
3
  // runtime/presets/security.ts
4
4
  var VIOLATION_STATUS_MAP = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agile-team/wl-skills-ui",
3
- "version": "1.8.5",
3
+ "version": "1.8.6",
4
4
  "description": "企业级 UI 风格对齐框架 — Vue + Element Plus 项目通用化妆/原生双模式(tokens / element / vendors / layouts / runtime / scanner / fixer / skills)",
5
5
  "type": "module",
6
6
  "main": "./es/index.js",
@@ -134,4 +134,4 @@
134
134
  "eslint --fix --no-cache"
135
135
  ]
136
136
  }
137
- }
137
+ }