@shwfed/config 2.12.5 → 2.12.7

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.
Files changed (137) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +5 -0
  3. package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/runtime.vue +54 -50
  4. package/dist/runtime/components/config/index.vue +23 -3
  5. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +22 -22
  6. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +22 -22
  7. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +16 -16
  8. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +16 -16
  9. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +16 -16
  10. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +16 -16
  11. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +24 -24
  12. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +24 -24
  13. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +16 -16
  14. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +16 -16
  15. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +26 -26
  16. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +26 -26
  17. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +2 -2
  18. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +2 -2
  19. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +30 -28
  20. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +38 -0
  21. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +30 -28
  22. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +11 -2
  23. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +3 -0
  24. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.js +7 -0
  25. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +6 -6
  26. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +6 -6
  27. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +22 -22
  28. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +22 -22
  29. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +16 -16
  30. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +16 -16
  31. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +10 -10
  32. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +10 -10
  33. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +16 -16
  34. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +16 -16
  35. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +24 -24
  36. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +24 -24
  37. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +16 -16
  38. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +16 -16
  39. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +10 -10
  40. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +10 -10
  41. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +10 -10
  42. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +10 -10
  43. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +10 -10
  44. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +10 -10
  45. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +10 -10
  46. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +10 -10
  47. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +10 -10
  48. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +10 -10
  49. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +10 -10
  50. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +10 -10
  51. package/dist/runtime/components/sidebar/index.d.vue.ts +22 -3
  52. package/dist/runtime/components/sidebar/index.vue +66 -5
  53. package/dist/runtime/components/sidebar/index.vue.d.ts +22 -3
  54. package/dist/runtime/components/sidebar/node.d.vue.ts +1 -1
  55. package/dist/runtime/components/sidebar/node.vue +33 -13
  56. package/dist/runtime/components/sidebar/node.vue.d.ts +1 -1
  57. package/dist/runtime/components/sidebar/tree.vue +113 -83
  58. package/dist/runtime/components/sidebar/types.d.ts +8 -0
  59. package/dist/runtime/components/sidebar/types.js +1 -0
  60. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/runtime.vue +6 -73
  61. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  62. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  63. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue +44 -0
  64. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue +8 -2
  65. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +3 -0
  66. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.js +7 -0
  67. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +6 -6
  68. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +6 -6
  69. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
  70. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
  71. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  72. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  73. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +6 -6
  74. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +6 -6
  75. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
  76. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
  77. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  78. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  79. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
  80. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
  81. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  82. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  83. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
  84. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
  85. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
  86. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
  87. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
  88. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
  89. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  90. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  91. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  92. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  93. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
  94. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
  95. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
  96. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
  97. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  98. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  99. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  100. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  101. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
  102. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
  103. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
  104. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
  105. package/dist/runtime/components/table/utils/row-reorder.d.ts +3 -2
  106. package/dist/runtime/components/table/utils/row-reorder.js +1 -12
  107. package/dist/runtime/components/tabs/index.d.vue.ts +9 -0
  108. package/dist/runtime/components/tabs/index.vue +92 -0
  109. package/dist/runtime/components/tabs/index.vue.d.ts +9 -0
  110. package/dist/runtime/components/tabs/tab.d.vue.ts +22 -0
  111. package/dist/runtime/components/tabs/tab.vue +85 -0
  112. package/dist/runtime/components/tabs/tab.vue.d.ts +22 -0
  113. package/dist/runtime/components/tabs/types.d.ts +19 -0
  114. package/dist/runtime/components/tabs/types.js +0 -0
  115. package/dist/runtime/components/tabs/use-reorder.d.ts +10 -0
  116. package/dist/runtime/components/tabs/use-reorder.js +90 -0
  117. package/dist/runtime/components/tabs/use-tabs.d.ts +46 -0
  118. package/dist/runtime/components/tabs/use-tabs.js +101 -0
  119. package/dist/runtime/components/ui/date-picker/DatePickerInput.d.vue.ts +1 -1
  120. package/dist/runtime/components/ui/date-picker/DatePickerInput.vue.d.ts +1 -1
  121. package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.d.vue.ts +1 -1
  122. package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue.d.ts +1 -1
  123. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.d.vue.ts +1 -1
  124. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue.d.ts +1 -1
  125. package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.d.vue.ts +2 -2
  126. package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue.d.ts +2 -2
  127. package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue +1 -1
  128. package/dist/runtime/components/ui/sidebar/index.js +2 -2
  129. package/dist/runtime/share/number-format.d.ts +7 -0
  130. package/dist/runtime/share/number-format.js +72 -0
  131. package/dist/runtime/share/reorder.d.ts +2 -0
  132. package/dist/runtime/share/reorder.js +12 -0
  133. package/dist/runtime/utils/nav-registry.d.ts +19 -0
  134. package/dist/runtime/utils/nav-registry.js +14 -0
  135. package/dist/runtime/utils/page-title-registry.d.ts +3 -0
  136. package/dist/runtime/utils/page-title-registry.js +11 -0
  137. package/package.json +1 -1
@@ -0,0 +1,72 @@
1
+ const CHINESE_DIGITS = ["\u96F6", "\u58F9", "\u8D30", "\u53C1", "\u8086", "\u4F0D", "\u9646", "\u67D2", "\u634C", "\u7396"];
2
+ const CHINESE_UNITS = ["", "\u62FE", "\u4F70", "\u4EDF"];
3
+ const CHINESE_GROUP_UNITS = ["", "\u4E07", "\u4EBF", "\u5146"];
4
+ export function toChineseUppercase(n) {
5
+ if (Number.isNaN(n)) return "-";
6
+ if (n === 0) return "\u96F6";
7
+ const isNegative = n < 0;
8
+ const absN = Math.abs(n);
9
+ const [intPart, decPart] = String(absN).split(".");
10
+ let result = "";
11
+ const digits = intPart.split("").reverse();
12
+ let zeroFlag = false;
13
+ for (let i = 0; i < digits.length; i++) {
14
+ const d = Number(digits[i]);
15
+ const groupIndex = Math.floor(i / 4);
16
+ const posInGroup = i % 4;
17
+ if (d === 0) {
18
+ zeroFlag = true;
19
+ } else {
20
+ if (zeroFlag) {
21
+ result = CHINESE_DIGITS[0] + result;
22
+ zeroFlag = false;
23
+ }
24
+ result = CHINESE_DIGITS[d] + CHINESE_UNITS[posInGroup] + result;
25
+ }
26
+ if (posInGroup === 0 && groupIndex > 0 && !zeroFlag) {
27
+ result = (CHINESE_GROUP_UNITS[groupIndex] ?? "") + result;
28
+ }
29
+ }
30
+ if (decPart) {
31
+ result += "\u70B9";
32
+ for (const ch of decPart) {
33
+ result += CHINESE_DIGITS[Number(ch)];
34
+ }
35
+ }
36
+ return isNegative ? `\u8D1F${result}` : result;
37
+ }
38
+ export function formatNumberDisplay(value, opts) {
39
+ if (value === void 0 || value === null) return "-";
40
+ const n = Number(value);
41
+ if (Number.isNaN(n)) return "-";
42
+ const displayMode = opts.displayMode ?? "plain";
43
+ if (displayMode === "uppercaseChinese") {
44
+ return toChineseUppercase(n);
45
+ }
46
+ let result;
47
+ if (opts.precision !== void 0) {
48
+ const mode = opts.roundingMode ?? "round";
49
+ const digits = opts.precision;
50
+ const factor = 10 ** digits;
51
+ let processed;
52
+ switch (mode) {
53
+ case "floor":
54
+ processed = Math.floor(n * factor) / factor;
55
+ break;
56
+ case "ceil":
57
+ processed = Math.ceil(n * factor) / factor;
58
+ break;
59
+ default:
60
+ processed = Math.round(n * factor) / factor;
61
+ }
62
+ result = processed.toFixed(digits);
63
+ } else {
64
+ result = String(n);
65
+ }
66
+ if (displayMode === "monoThousand") {
67
+ const [integer, decimal] = result.split(".");
68
+ const formattedInt = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
69
+ result = decimal !== void 0 ? `${formattedInt}.${decimal}` : formattedInt;
70
+ }
71
+ return result;
72
+ }
@@ -0,0 +1,2 @@
1
+ export type ReorderInstruction = 'reorder-above' | 'reorder-below';
2
+ export declare function applyReorder<T>(items: ReadonlyArray<T>, sourceIndex: number, targetIndex: number, position: ReorderInstruction): ReadonlyArray<T>;
@@ -0,0 +1,12 @@
1
+ export function applyReorder(items, sourceIndex, targetIndex, position) {
2
+ if (sourceIndex === targetIndex) return items;
3
+ if (sourceIndex < 0 || sourceIndex >= items.length) return items;
4
+ if (targetIndex < 0 || targetIndex >= items.length) return items;
5
+ let insertIdx = targetIndex + (position === "reorder-below" ? 1 : 0);
6
+ if (sourceIndex < targetIndex) insertIdx -= 1;
7
+ if (insertIdx === sourceIndex) return items;
8
+ const next = items.slice();
9
+ const [moved] = next.splice(sourceIndex, 1);
10
+ next.splice(insertIdx, 0, moved);
11
+ return next;
12
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Route → nav-label index, published by the sidebar and read by the tab strip.
3
+ * A client singleton (not a Nuxt injection). This is title source #2 in the
4
+ * tab-title precedence chain (page title → nav label → raw path).
5
+ *
6
+ * Two indexes so a tab title can be QUERY-AWARE while tab identity stays
7
+ * path-only: `fullMap` keys by the node's exact route (path + query, hash
8
+ * stripped) so `/orders?status=open` and `/orders?status=closed` resolve to
9
+ * their own labels; `pathMap` keys by path (first-wins) as the fallback for a
10
+ * location that matches no exact node route. The sidebar owns the whole map
11
+ * (one nav per app), so publishing wholesale-replaces both.
12
+ */
13
+ export interface NavLabel {
14
+ label: string;
15
+ icon?: string;
16
+ }
17
+ export declare function publishNavLabels(full: Map<string, NavLabel>, path: Map<string, NavLabel>): void;
18
+ export declare function clearNavLabels(): void;
19
+ export declare function readNavLabel(fullPath: string, path: string): NavLabel | undefined;
@@ -0,0 +1,14 @@
1
+ import { ref } from "vue";
2
+ const fullMap = ref(/* @__PURE__ */ new Map());
3
+ const pathMap = ref(/* @__PURE__ */ new Map());
4
+ export function publishNavLabels(full, path) {
5
+ fullMap.value = new Map(full);
6
+ pathMap.value = new Map(path);
7
+ }
8
+ export function clearNavLabels() {
9
+ if (fullMap.value.size > 0) fullMap.value = /* @__PURE__ */ new Map();
10
+ if (pathMap.value.size > 0) pathMap.value = /* @__PURE__ */ new Map();
11
+ }
12
+ export function readNavLabel(fullPath, path) {
13
+ return fullMap.value.get(fullPath.split("#")[0] ?? fullPath) ?? pathMap.value.get(path);
14
+ }
@@ -0,0 +1,3 @@
1
+ import type { LocaleValue } from '../share/locale.js';
2
+ export declare function publishPageTitle(path: string, title: LocaleValue | undefined): void;
3
+ export declare function readPageTitle(path: string): LocaleValue | undefined;
@@ -0,0 +1,11 @@
1
+ import { ref } from "vue";
2
+ const registry = ref(/* @__PURE__ */ new Map());
3
+ export function publishPageTitle(path, title) {
4
+ const next = new Map(registry.value);
5
+ if (title && title.length > 0) next.set(path, title);
6
+ else next.delete(path);
7
+ registry.value = next;
8
+ }
9
+ export function readPageTitle(path) {
10
+ return registry.value.get(path);
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/config",
3
- "version": "2.12.5",
3
+ "version": "2.12.7",
4
4
  "description": "Configurable UI for SHWFED",
5
5
  "type": "module",
6
6
  "publishConfig": {