dsh-workbench-salary 0.4.8 → 0.4.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/lib/client.js +56 -7
- package/package.json +3 -3
package/lib/client.js
CHANGED
|
@@ -39,6 +39,25 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
39
39
|
};
|
|
40
40
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
41
41
|
|
|
42
|
+
// packages/addons/lib/icon-label.cjs
|
|
43
|
+
var require_icon_label = __commonJS({
|
|
44
|
+
"packages/addons/lib/icon-label.cjs"(exports2, module2) {
|
|
45
|
+
"use strict";
|
|
46
|
+
var VISUALLY_HIDDEN = "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap";
|
|
47
|
+
module2.exports = function iconLabel(h, Icon2, text, options) {
|
|
48
|
+
var opts = options || {};
|
|
49
|
+
var cls = "wb-icon-label" + (opts.short ? " wb-icon-label-short" : "") + (Icon2 ? "" : " wb-icon-label-fallback");
|
|
50
|
+
return h(
|
|
51
|
+
"span",
|
|
52
|
+
{ className: cls, title: typeof text === "string" ? text : void 0 },
|
|
53
|
+
Icon2 ? h(Icon2, { size: 14, strokeWidth: 2, "aria-hidden": true, focusable: false }) : null,
|
|
54
|
+
h("span", { className: "wb-icon-label-text" }, text)
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
module2.exports.styles = ".wb-icon-label{display:inline-flex;align-items:center;gap:5px;max-width:100%;vertical-align:middle;text-align:start}.wb-icon-label>svg{flex:none}.wb-icon-label>span{min-width:0;overflow-wrap:anywhere}button .wb-icon-label:not(.wb-icon-label-fallback) .wb-icon-label-text{" + VISUALLY_HIDDEN + "}button .wb-icon-label.wb-icon-label-short .wb-icon-label-text{position:static;width:auto;height:auto;margin:0;overflow:visible;clip-path:none;white-space:normal}";
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
42
61
|
// packages/addons/lib/icons.cjs
|
|
43
62
|
var require_icons = __commonJS({
|
|
44
63
|
"packages/addons/lib/icons.cjs"(exports2, module2) {
|
|
@@ -62,6 +81,11 @@ var require_icons = __commonJS({
|
|
|
62
81
|
return h(C, attrs);
|
|
63
82
|
}
|
|
64
83
|
var set = { ICONS, Icon: Icon2 };
|
|
84
|
+
set.label = function(name, text, options2) {
|
|
85
|
+
return require_icon_label()(h, function NamedIcon(props) {
|
|
86
|
+
return h(Icon2, Object.assign({ name }, props));
|
|
87
|
+
}, text, options2);
|
|
88
|
+
};
|
|
65
89
|
if (opts.tabIcon) {
|
|
66
90
|
set.tabIcon = function(name) {
|
|
67
91
|
return function TabIcon() {
|
|
@@ -469,6 +493,29 @@ var init_wallet = __esm({
|
|
|
469
493
|
}
|
|
470
494
|
});
|
|
471
495
|
|
|
496
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/plus.mjs
|
|
497
|
+
var plus_exports = {};
|
|
498
|
+
__export(plus_exports, {
|
|
499
|
+
__iconData: () => __iconData5,
|
|
500
|
+
default: () => Plus
|
|
501
|
+
});
|
|
502
|
+
var __iconData5, Plus;
|
|
503
|
+
var init_plus = __esm({
|
|
504
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/plus.mjs"() {
|
|
505
|
+
init_createLucideIcon();
|
|
506
|
+
__iconData5 = {
|
|
507
|
+
name: "plus",
|
|
508
|
+
size: 24,
|
|
509
|
+
node: [
|
|
510
|
+
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
511
|
+
["path", { d: "M12 5v14", key: "s699le" }]
|
|
512
|
+
]
|
|
513
|
+
};
|
|
514
|
+
__iconData5.node;
|
|
515
|
+
Plus = createLucideIcon(__iconData5);
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
|
|
472
519
|
// packages/addons/salary/client/ui/icons.cjs
|
|
473
520
|
var require_icons2 = __commonJS({
|
|
474
521
|
"packages/addons/salary/client/ui/icons.cjs"(exports2, module2) {
|
|
@@ -478,9 +525,10 @@ var require_icons2 = __commonJS({
|
|
|
478
525
|
"chart-column": (init_chart_column(), __toCommonJS(chart_column_exports)).default,
|
|
479
526
|
"database": (init_database(), __toCommonJS(database_exports)).default,
|
|
480
527
|
"list": (init_list(), __toCommonJS(list_exports)).default,
|
|
481
|
-
"wallet": (init_wallet(), __toCommonJS(wallet_exports)).default
|
|
528
|
+
"wallet": (init_wallet(), __toCommonJS(wallet_exports)).default,
|
|
529
|
+
"plus": (init_plus(), __toCommonJS(plus_exports)).default
|
|
482
530
|
});
|
|
483
|
-
module2.exports = { ICONS: set.ICONS, Icon: set.Icon };
|
|
531
|
+
module2.exports = { ICONS: set.ICONS, Icon: set.Icon, label: set.label };
|
|
484
532
|
}
|
|
485
533
|
});
|
|
486
534
|
|
|
@@ -526,7 +574,7 @@ var require_client_base_styles = __commonJS({
|
|
|
526
574
|
s + "-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}",
|
|
527
575
|
// 窄屏:页面容器不再自带左右内边距(宿主的 .wb-immersive-main 已经给过),
|
|
528
576
|
// 卡片与栅格收紧,把宽度尽量留给内容——窄屏下两侧留白比桌面更影响可读性。
|
|
529
|
-
"@media(max-width:760px){" + s + "-wrap{padding:0 0 8px;gap:10px}" + s + "-card{padding:12px;border-radius:10px}" + s + "-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px}" + s + "-form{grid-template-columns:minmax(0,1fr)}" + s + "-title{font-size:15px}" + s + "-table-wrap{overflow-x:auto;max-width:100%}" + s + "-table{width:max-content;min-width:100%}}@media(max-width:420px){" + s + "-wrap{padding:0 0 6px}" + s + "-card{padding:10px}" + s + "-grid{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}}"
|
|
577
|
+
"@media(max-width:760px){" + s + "-wrap{padding:0 0 8px;gap:10px}" + s + "-card{padding:12px;border-radius:10px}" + s + "-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px}" + s + "-form{grid-template-columns:minmax(0,1fr)}" + s + "-title{font-size:15px}" + s + "-btn." + s + "-icon-text ." + s + "-btn-label{display:none}" + s + "-btn." + s + "-icon-text{padding-left:8px;padding-right:8px}" + s + "-table-wrap{overflow-x:auto;max-width:100%}" + s + "-table{width:max-content;min-width:100%}}button .wb-icon-label:not(.wb-icon-label-fallback) .wb-icon-label-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}button .wb-icon-label.wb-icon-label-short .wb-icon-label-text{position:static;width:auto;height:auto;margin:0;overflow:visible;clip-path:none;white-space:normal}@media(max-width:420px){" + s + "-wrap{padding:0 0 6px}" + s + "-card{padding:10px}" + s + "-grid{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}}"
|
|
530
578
|
]);
|
|
531
579
|
};
|
|
532
580
|
module2.exports.secretFieldStyles = SECRET_FIELD;
|
|
@@ -1462,7 +1510,7 @@ var require_switch = __commonJS({
|
|
|
1462
1510
|
"packages/addons/lib/switch.cjs"(exports2, module2) {
|
|
1463
1511
|
"use strict";
|
|
1464
1512
|
var SWITCH_STYLES = [
|
|
1465
|
-
".wbctl-switch{display:inline-flex;align-items:center;gap:7px;min-height:24px;padding:2px;border:0;background:transparent;font:inherit;font-size:12px;color:var(--wb-muted,#6b7280);cursor:pointer;user-select:none;border-radius:999px}",
|
|
1513
|
+
".wbctl-switch{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;min-height:24px;padding:2px;border:0;background:transparent;font:inherit;font-size:12px;color:var(--wb-muted,#6b7280);cursor:pointer;user-select:none;border-radius:999px}",
|
|
1466
1514
|
".wbctl-switch-track{position:relative;display:inline-flex;align-items:center;box-sizing:border-box;width:34px;height:20px;padding:2px;border-radius:999px;background:color-mix(in oklab,currentColor 22%,transparent);transition:background .16s ease;flex:none}",
|
|
1467
1515
|
".wbctl-switch-knob{display:block;width:16px;height:16px;border-radius:50%;background:var(--wb-card,#fff);box-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .16s ease}",
|
|
1468
1516
|
".wbctl-switch[aria-checked=true]{color:var(--wb-accent,#2563eb)}",
|
|
@@ -3537,6 +3585,7 @@ var require_records = __commonJS({
|
|
|
3537
3585
|
"use strict";
|
|
3538
3586
|
var staged = require_staged_dialog();
|
|
3539
3587
|
var salaryCommon = require_common();
|
|
3588
|
+
var salaryIcons = require_icons2();
|
|
3540
3589
|
var NF = require_number_field();
|
|
3541
3590
|
var FormDialog = staged.createStagedDialog({
|
|
3542
3591
|
maskClass: "wbsal-mask",
|
|
@@ -4054,7 +4103,7 @@ var require_records = __commonJS({
|
|
|
4054
4103
|
filter.year || filter.cycle || filter.employmentType ? h(C.Btn, { h, onClick: function() {
|
|
4055
4104
|
setFilter({ year: "", cycle: "", employmentType: "" });
|
|
4056
4105
|
} }, "\u6E05\u9664\u7B5B\u9009") : null,
|
|
4057
|
-
h(C.Btn, { h, kind: "primary", onClick: openCreate }, "
|
|
4106
|
+
h(C.Btn, { h, kind: "primary", onClick: openCreate }, salaryIcons.label("plus", "\u8BB0\u8D26", { short: true }))
|
|
4058
4107
|
)
|
|
4059
4108
|
);
|
|
4060
4109
|
} else {
|
|
@@ -4139,7 +4188,7 @@ var require_records = __commonJS({
|
|
|
4139
4188
|
"div",
|
|
4140
4189
|
{ className: "wbsal-toolbar-end" },
|
|
4141
4190
|
h("span", { className: "wbsal-toolbar-count" }, "\u5171 ", h("b", null, total), " \u7B14"),
|
|
4142
|
-
h(C.Btn, { h, kind: "primary", onClick: openCreate }, "
|
|
4191
|
+
h(C.Btn, { h, kind: "primary", onClick: openCreate }, salaryIcons.label("plus", "\u8BB0\u8D26", { short: true }))
|
|
4143
4192
|
)
|
|
4144
4193
|
),
|
|
4145
4194
|
h(C.Notice, { h, kind: msg && msg.kind, text: msg && !form ? msg.text : "" }),
|
|
@@ -6108,7 +6157,7 @@ var GLYPHS = require_icons2().ICONS;
|
|
|
6108
6157
|
ensureStyles();
|
|
6109
6158
|
host.registerAddon({
|
|
6110
6159
|
id: "wb-addon-salary",
|
|
6111
|
-
version: "0.4.
|
|
6160
|
+
version: "0.4.10",
|
|
6112
6161
|
icon: GLYPHS["wallet"],
|
|
6113
6162
|
views: [
|
|
6114
6163
|
{ id: "stats", icon: tabIcon("stats"), title: { zh: "\u7EDF\u8BA1", en: "Stats" }, component: withProps(require_stats(), "\u7EDF\u8BA1") },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-workbench-salary",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.10",
|
|
4
4
|
"description": "个人工作台工资插件:按发薪日期记录工资构成、扣款与实发",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"addon": {
|
|
17
17
|
"id": "wb-addon-salary",
|
|
18
18
|
"title": "工资",
|
|
19
|
-
"version": "0.4.
|
|
19
|
+
"version": "0.4.10",
|
|
20
20
|
"minShell": "0.8.0",
|
|
21
21
|
"tables": [
|
|
22
22
|
"salary_record"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"dsh-workbench-host": "^0.10.
|
|
46
|
+
"dsh-workbench-host": "^0.10.4"
|
|
47
47
|
},
|
|
48
48
|
"dsh": {
|
|
49
49
|
"bundle": {
|