@done-coding/forge-core 0.101.0 → 0.101.1-alpha.0

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/README.md CHANGED
@@ -50,3 +50,9 @@ MIT,Copyright (c) JustSoSu。完整许可见本包 LICENSE。
50
50
  - `vite.config.ts`:全部公开桶入口的 ESM/声明构建。
51
51
 
52
52
  <!-- repo-map:end -->
53
+
54
+ ## 登录守卫与外部登录
55
+
56
+ `createGuard` 检测到未登录时固定跳 `loginPath` 并带 `from` query;接口 401 经 `bridge.goToLogin` 走同一登录页。外部 IdP(如 OIDC `signinRedirect`、iframe 登录)由登录页自行发起,回调参数与 `from` 回跳也在登录页(或其回调路由)收拢;登录页与回调路由需列入免登录校验路由。forge 不提供守卫级外跳钩子,以免守卫与 `goToLogin` 两个入口行为分叉。
57
+
58
+ 导出列协议 ExportColumn 的 label 来自 Element Plus 根入口 TableColumnCtx,不从组件构造器反推 props;列渲染与导出行为不变。
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./BadgeMark.vue2.mjs";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const BadgeMark = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7cf20885"]]);
4
+ const BadgeMark = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8f9f5379"]]);
5
5
  export {
6
6
  BadgeMark as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent, inject, computed, useTemplateRef, openBlock, createBlock, unref, normalizeProps, createSlots, withCtx, renderSlot, createElementVNode, toDisplayString } from "vue";
1
+ import { defineComponent, inject, computed, shallowRef, openBlock, createBlock, unref, normalizeProps, createSlots, withCtx, renderSlot, createElementVNode, toDisplayString } from "vue";
2
2
  import { ElBadge } from "element-plus";
3
3
  import { BADGE_KEY_ATTR } from "../../../config/badge-attr.mjs";
4
4
  import { CORE_BRIDGE_KEY } from "../../../inject/key.mjs";
@@ -33,7 +33,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
33
  );
34
34
  }
35
35
  );
36
- const badgeRef = useTemplateRef("badgeRef");
36
+ const badgeRef = shallowRef(null);
37
+ const setBadgeRef = (instance) => {
38
+ badgeRef.value = instance;
39
+ };
37
40
  useBadgeMask(
38
41
  () => {
39
42
  var _a;
@@ -48,8 +51,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
48
51
  var _a;
49
52
  return resolved.value ? (openBlock(), createBlock(unref(ElBadge), normalizeProps({
50
53
  key: 0,
51
- ref_key: "badgeRef",
52
- ref: badgeRef,
54
+ ref: setBadgeRef,
53
55
  class: ["dc-badge-mark badge-mark", [
54
56
  `badge-mark_${__props.align ?? "middle"}`,
55
57
  { "badge-mark_hidden": resolved.value.hidden }
package/es/style.css CHANGED
@@ -69,14 +69,14 @@
69
69
  justify-content: flex-end;
70
70
  gap: 8px;
71
71
  }
72
- .badge-mark[data-v-7cf20885] .el-badge__content.is-fixed {
72
+ .badge-mark[data-v-8f9f5379] .el-badge__content.is-fixed {
73
73
  right: 0;
74
74
  transform: translateY(-50%) translateX(calc(100% + 2px));
75
75
  }
76
- .badge-mark_middle[data-v-7cf20885] .el-badge__content.is-fixed {
76
+ .badge-mark_middle[data-v-8f9f5379] .el-badge__content.is-fixed {
77
77
  top: 50%;
78
78
  }
79
- .badge-mark_hidden[data-v-7cf20885] .el-badge__content {
79
+ .badge-mark_hidden[data-v-8f9f5379] .el-badge__content {
80
80
  width: 0;
81
81
  height: 0;
82
82
  min-width: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@done-coding/forge-core",
3
- "version": "0.101.0",
3
+ "version": "0.101.1-alpha.0",
4
4
  "description": "Forge 配置化底座:桥接、共享契约、路由与状态工具及基础组件",
5
5
  "private": false,
6
6
  "main": "es/index.mjs",
@@ -228,5 +228,5 @@
228
228
  "engines": {
229
229
  "node": ">=18.0.0"
230
230
  },
231
- "gitHead": "f37906ad04e937ca5c4cf4777357c6ebf1b0d326"
231
+ "gitHead": "fa0e35f3a055d6e5895f05f5cc97dc96e7e723c6"
232
232
  }
@@ -1,7 +1,7 @@
1
1
  import { ActionBtnProps } from '../display-contracts';
2
2
  declare const _default: <T = void>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
3
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
- readonly onClick?: ((evt: MouseEvent) => any) | undefined;
4
+ readonly onClick?: ((event: MouseEvent) => any) | undefined;
5
5
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onClick"> & ActionBtnProps<T> & Partial<{}>> & import('vue').PublicProps;
6
6
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
7
7
  attrs: any;
@@ -9,7 +9,7 @@ declare const _default: <T = void>(__VLS_props: NonNullable<Awaited<typeof __VLS
9
9
  default?(_: {}): any;
10
10
  default?(_: {}): any;
11
11
  };
12
- emit: (evt: "click", evt: MouseEvent) => void;
12
+ emit: (evt: "click", event: MouseEvent) => void;
13
13
  }>) => import('vue').VNode & {
14
14
  __ctx?: Awaited<typeof __VLS_setup>;
15
15
  };
@@ -1,4 +1,3 @@
1
- import { ComponentPublicInstance } from 'vue';
2
1
  import { BadgeKeyInput } from './use-badge';
3
2
  type __VLS_Props = {
4
3
  /**
@@ -48,161 +47,11 @@ declare function __VLS_template(): {
48
47
  default?(_: {}): any;
49
48
  default?(_: {}): any;
50
49
  };
51
- refs: {
52
- badgeRef: ({
53
- $: import('vue').ComponentInternalInstance;
54
- $data: {};
55
- $props: {
56
- readonly value?: string | number | undefined;
57
- readonly max?: number | undefined;
58
- readonly isDot?: boolean | undefined;
59
- readonly hidden?: boolean | undefined;
60
- readonly type?: "primary" | "success" | "warning" | "info" | "danger" | undefined;
61
- readonly showZero?: boolean | undefined;
62
- readonly color?: string | undefined;
63
- readonly badgeStyle?: import('vue').StyleValue;
64
- readonly offset?: [number, number] | undefined;
65
- readonly badgeClass?: string | undefined;
66
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
67
- $attrs: import('vue').Attrs;
68
- $refs: {
69
- [x: string]: unknown;
70
- };
71
- $slots: Readonly<{
72
- [name: string]: import('vue').Slot<any> | undefined;
73
- }>;
74
- $root: ComponentPublicInstance | null;
75
- $parent: ComponentPublicInstance | null;
76
- $host: Element | null;
77
- $emit: (event: string, ...args: any[]) => void;
78
- $el: any;
79
- $options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').BadgeProps> & Readonly<{}>, {
80
- content: import('vue').ComputedRef<string>;
81
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
82
- offset: [number, number];
83
- type: "primary" | "success" | "warning" | "info" | "danger";
84
- value: string | number;
85
- max: number;
86
- showZero: boolean;
87
- badgeStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
88
- }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
89
- beforeCreate?: (() => void) | (() => void)[];
90
- created?: (() => void) | (() => void)[];
91
- beforeMount?: (() => void) | (() => void)[];
92
- mounted?: (() => void) | (() => void)[];
93
- beforeUpdate?: (() => void) | (() => void)[];
94
- updated?: (() => void) | (() => void)[];
95
- activated?: (() => void) | (() => void)[];
96
- deactivated?: (() => void) | (() => void)[];
97
- beforeDestroy?: (() => void) | (() => void)[];
98
- beforeUnmount?: (() => void) | (() => void)[];
99
- destroyed?: (() => void) | (() => void)[];
100
- unmounted?: (() => void) | (() => void)[];
101
- renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
102
- renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
103
- errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
104
- };
105
- $forceUpdate: () => void;
106
- $nextTick: typeof import('vue').nextTick;
107
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
108
- } & Readonly<{
109
- offset: [number, number];
110
- type: "primary" | "success" | "warning" | "info" | "danger";
111
- value: string | number;
112
- max: number;
113
- showZero: boolean;
114
- badgeStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
115
- }> & Omit<Readonly<import('element-plus').BadgeProps> & Readonly<{}>, "type" | "value" | "max" | "content" | "offset" | "showZero" | "badgeStyle"> & {
116
- content: string;
117
- } & {} & import('vue').ComponentCustomProperties & {} & {
118
- $slots: {
119
- default?: (props: {}) => any;
120
- } & {
121
- content?: (props: {
122
- value: string;
123
- }) => any;
124
- };
125
- }) | null;
126
- };
50
+ refs: {};
127
51
  rootEl: any;
128
52
  };
129
53
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
130
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
131
- badgeRef: ({
132
- $: import('vue').ComponentInternalInstance;
133
- $data: {};
134
- $props: {
135
- readonly value?: string | number | undefined;
136
- readonly max?: number | undefined;
137
- readonly isDot?: boolean | undefined;
138
- readonly hidden?: boolean | undefined;
139
- readonly type?: "primary" | "success" | "warning" | "info" | "danger" | undefined;
140
- readonly showZero?: boolean | undefined;
141
- readonly color?: string | undefined;
142
- readonly badgeStyle?: import('vue').StyleValue;
143
- readonly offset?: [number, number] | undefined;
144
- readonly badgeClass?: string | undefined;
145
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
146
- $attrs: import('vue').Attrs;
147
- $refs: {
148
- [x: string]: unknown;
149
- };
150
- $slots: Readonly<{
151
- [name: string]: import('vue').Slot<any> | undefined;
152
- }>;
153
- $root: ComponentPublicInstance | null;
154
- $parent: ComponentPublicInstance | null;
155
- $host: Element | null;
156
- $emit: (event: string, ...args: any[]) => void;
157
- $el: any;
158
- $options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').BadgeProps> & Readonly<{}>, {
159
- content: import('vue').ComputedRef<string>;
160
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
161
- offset: [number, number];
162
- type: "primary" | "success" | "warning" | "info" | "danger";
163
- value: string | number;
164
- max: number;
165
- showZero: boolean;
166
- badgeStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
167
- }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
168
- beforeCreate?: (() => void) | (() => void)[];
169
- created?: (() => void) | (() => void)[];
170
- beforeMount?: (() => void) | (() => void)[];
171
- mounted?: (() => void) | (() => void)[];
172
- beforeUpdate?: (() => void) | (() => void)[];
173
- updated?: (() => void) | (() => void)[];
174
- activated?: (() => void) | (() => void)[];
175
- deactivated?: (() => void) | (() => void)[];
176
- beforeDestroy?: (() => void) | (() => void)[];
177
- beforeUnmount?: (() => void) | (() => void)[];
178
- destroyed?: (() => void) | (() => void)[];
179
- unmounted?: (() => void) | (() => void)[];
180
- renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
181
- renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
182
- errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
183
- };
184
- $forceUpdate: () => void;
185
- $nextTick: typeof import('vue').nextTick;
186
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
187
- } & Readonly<{
188
- offset: [number, number];
189
- type: "primary" | "success" | "warning" | "info" | "danger";
190
- value: string | number;
191
- max: number;
192
- showZero: boolean;
193
- badgeStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
194
- }> & Omit<Readonly<import('element-plus').BadgeProps> & Readonly<{}>, "type" | "value" | "max" | "content" | "offset" | "showZero" | "badgeStyle"> & {
195
- content: string;
196
- } & {} & import('vue').ComponentCustomProperties & {} & {
197
- $slots: {
198
- default?: (props: {}) => any;
199
- } & {
200
- content?: (props: {
201
- value: string;
202
- }) => any;
203
- };
204
- }) | null;
205
- }, any>;
54
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
206
55
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
207
56
  export default _default;
208
57
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,5 +1,4 @@
1
- import { ElTableColumn } from 'element-plus';
2
- import { ExtractPropTypes } from 'vue';
1
+ import { TableColumnCtx } from 'element-plus';
3
2
  /** 操作列标记 prop。消费方以此值标记操作列,导出时自动过滤 */
4
3
  export declare const OPERATE_COLUMN_PROP = "OPERATE";
5
4
  /** 前端导出最大行数 */
@@ -7,7 +6,7 @@ export declare const EXPORT_MAX_LIMIT = 10000;
7
6
  /** 通用导出列协议:保留表格列的 prop/label/type 形态,不依赖组件实现。 */
8
7
  export type ExportColumn<T extends Record<string, any>,
9
8
  /** 保留旧的第二泛型参数;导出只读取列字段,不消费插槽 scope。 */
10
- _F extends Record<string, any> = {}> = Pick<ExtractPropTypes<typeof ElTableColumn>, "label"> & Partial<{
9
+ _F extends Record<string, any> = {}> = Partial<Pick<TableColumnCtx<T>, "label">> & Partial<{
11
10
  prop: Exclude<Extract<keyof T, string>, "custom-view-item" | "item"> | `${Uppercase<string>}`;
12
11
  type: "default" | "selection" | "index" | "expand";
13
12
  }>;