@yugu-ui/flow-ui 0.1.17 → 0.1.18

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/dist/style.css CHANGED
@@ -2205,11 +2205,6 @@ to {
2205
2205
  .flow-node__record-file[data-v-c730ebf8]:hover {
2206
2206
  color: var(--flow-primary-color);
2207
2207
  }
2208
- /* Developed collaboratively with vscode - 改动代码行数: 3行 */
2209
- .reject-node-list[data-v-4d9540ab] {
2210
- width: 100%;
2211
- }
2212
-
2213
2208
  .base-card-item[data-v-e9115957] {
2214
2209
  background: var(--n-color) !important;
2215
2210
  padding: 0 !important;
@@ -2303,55 +2298,8 @@ to {
2303
2298
  padding: 0 16px 16px;
2304
2299
  }
2305
2300
  /* Developed collaboratively with vscode - 改动代码行数: 3行 */
2306
- .yg-confirm[data-v-a65cb6d5] {
2307
- display: inline-block;
2308
- }
2309
-
2310
- /* Developed collaboratively with vscode - 改动代码行数: 7行 */
2311
- .base-card-wrapper[data-v-956107d8] {
2312
- height: 100%;
2313
- background: #f0f2f5;
2314
- display: flex;
2315
- flex-direction: column;
2316
- }
2317
- .dark .base-card-wrapper[data-v-956107d8] {
2318
- background: #141414;
2319
- }
2320
-
2321
- /* Developed collaboratively with vscode - 改动代码行数: 6行 */
2322
- .base-card-content[data-v-956107d8] {
2323
- flex: 1;
2324
- overflow: auto;
2325
- padding: 16px;
2326
- }
2327
- /* NSpin 容器需继承 flex:1 撑满剩余空间 */
2328
- .base-card-content[data-v-956107d8] .n-spin-container {
2329
- height: 100%;
2330
- }
2331
-
2332
- /* Developed collaboratively with vscode - 改动代码行数: 10行 */
2333
- /* BaseCardItem 之间的间距 */
2334
- .base-card-content[data-v-956107d8] .base-card-item-spacing {
2335
- margin-bottom: 16px !important;
2336
- }
2337
- .base-card-content[data-v-956107d8] .base-card-item-spacing:last-child {
2338
- margin-bottom: 0 !important;
2339
- }
2340
-
2341
- /* Developed collaboratively with vscode - 改动代码行数: 20行 */
2342
- .base-card-footer[data-v-956107d8] {
2343
- flex-shrink: 0;
2344
- height: 56px;
2345
- background: #ffffff;
2346
- box-shadow: 0 -8px 12px 0 rgba(0, 0, 0, 0.04);
2347
- display: flex;
2348
- align-items: center;
2349
- justify-content: flex-end;
2350
- padding: 0 24px;
2351
- }
2352
- .dark .base-card-footer[data-v-956107d8] {
2353
- background: #1e1e1e;
2354
- box-shadow: 0 -8px 12px 0 rgba(255, 255, 255, 0.04);
2301
+ .reject-node-list[data-v-4d9540ab] {
2302
+ width: 100%;
2355
2303
  }
2356
2304
 
2357
2305
  .flow-item[data-v-315b70f6] {
@@ -0,0 +1,17 @@
1
+ import { FlowApprovalData } from './timeline-mapping';
2
+ /** 操作按钮组件 props */
3
+ type __VLS_Props = {
4
+ /** 审批操作数据:流程实例详情(undo_id 同意/驳回接口入参、undo_finished=0 未处理时展示按钮、nodes 驳回弹窗候选) */
5
+ data?: FlowApprovalData;
6
+ /** 是否审批处理模式(默认 true):false=纯查看,不渲染操作按钮与审批弹窗 */
7
+ approval?: boolean;
8
+ };
9
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
10
+ success: () => any;
11
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onSuccess?: (() => any) | undefined;
13
+ }>, {
14
+ approval: boolean;
15
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -2,6 +2,8 @@ import { FlowNodeItem, FlowNodeUserRecord } from './FlowNode';
2
2
  import { WflowTodoDetail, WflowTodoRecord } from '../adapter/wflow';
3
3
  /** display 模式原始详情数据:节点快照自带任务状态与每人处理结果 + status/finished 实例状态 */
4
4
  export type FlowTimelineData = Pick<WflowTodoDetail, 'nodes' | 'finished' | 'status'>;
5
+ /** FlowActions 审批操作数据:FlowTimelineData 基础上补充 undo_id(同意/驳回接口入参)与 undo_finished(操作按钮显隐)——待办详情接口整份数据可直接传入 */
6
+ export type FlowApprovalData = FlowTimelineData & Pick<WflowTodoDetail, 'undo_id' | 'undo_finished'>;
5
7
  /** 流程状态标签(getFlowStatusTag 返回):颜色映射 已同意=success / 已拒绝=error / 进行中=warning */
6
8
  export interface FlowStatusTag {
7
9
  text: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yugu-ui/flow-ui",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "堉古商城流程组件库:流程设计器(config)/ 审批时间线(timeline)/ 流程列表(FlowList)",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -1,48 +0,0 @@
1
- import { WflowTodoDetail } from '../adapter/wflow';
2
- /** 页面加载状态(透传给 BaseCard,控制内容区 loading 遮罩);flowId=流程 ID(display 模式传流程实例 ID 仅作标识,同意/驳回接口入参为详情返回的 undo_id;form 模式作为提交数据 flow_id) */
3
- type __VLS_Props = {
4
- loading?: boolean;
5
- flowId?: string | number;
6
- /** 渲染模式:display=审批详情(同意/驳回);form=发起流程(节点无状态、自选审批人为选择器、底部提交) */
7
- mode?: 'display' | 'form';
8
- /** form 模式提交前置校验钩子:返回 false 阻止提交(页面注入表单必填校验) */
9
- beforeSubmit?: () => Promise<boolean> | boolean;
10
- /** form 模式提交数据获取钩子:校验全部通过后调用,返回页面表单数据用于组装并打印提交数据 */
11
- getFormData?: () => Record<string, unknown>;
12
- /** display 模式原始数据:流程实例详情(节点快照自带任务状态与每人处理结果 + status/finished 实例状态 + undo_id 待办审批记录 ID + undo_finished 处理状态),组件内部映射为审批时间线并对接同意/驳回接口,页面无需转换;nodes 为空时节点区展示空态提示 */
13
- timelineData?: Pick<WflowTodoDetail, 'nodes' | 'finished' | 'status' | 'undo_id' | 'undo_finished'>;
14
- /** 是否审批处理模式(仅 display 模式生效,默认 true):按 undo_finished 判断展示同意/驳回;false=纯查看,仅展示流程节点与关闭按钮 */
15
- approval?: boolean;
16
- };
17
- /** 条件字段是否全部填写完成:条件字段值取自父组件表单数据(数组非空 / 非 null / 非空串;流程无条件字段时视为填齐),暴露给父组件提交校验调用 */
18
- declare function isConditionsFilled(): boolean;
19
- /** 请求流程节点(暴露给父组件在表单变化防抖后调用):先等待流程配置就绪(条件字段提取完成)再校验条件字段填齐,随后携带整份表单数据 + 流程 ID 请求,后端按表单值匹配条件分支;条件字段未填齐/请求失败/返回为空时节点链保持不变(节点区空态提示) */
20
- declare function fetchFlowNodes(): Promise<void>;
21
- declare var __VLS_10: {}, __VLS_34: {};
22
- type __VLS_Slots = {} & {
23
- default?: (props: typeof __VLS_10) => any;
24
- } & {
25
- 'footer-center'?: (props: typeof __VLS_34) => any;
26
- };
27
- declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
28
- fetchFlowNodes: typeof fetchFlowNodes;
29
- isConditionsFilled: typeof isConditionsFilled;
30
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
31
- success: () => any;
32
- close: () => any;
33
- submitted: () => any;
34
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
35
- onSuccess?: (() => any) | undefined;
36
- onClose?: (() => any) | undefined;
37
- onSubmitted?: (() => any) | undefined;
38
- }>, {
39
- approval: boolean;
40
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
41
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
42
- declare const _default: typeof __VLS_export;
43
- export default _default;
44
- type __VLS_WithSlots<T, S> = T & {
45
- new (): {
46
- $slots: S;
47
- };
48
- };