@hb-hellotech/hb-ui 2.2.1 → 2.2.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AAOzC,OAAO,oBAAoB,CAAC;AAG5B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKnB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAa,KAAK,GAAG,EAAE,UAAS,kBAAuB,SAa1E,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AAEnC,cAAc,0BAA0B,CAAC;AAOzC,OAAO,oBAAoB,CAAC;AAG5B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKnB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAa,KAAK,GAAG,EAAE,UAAS,kBAAuB,SAa1E,CAAC"}
@@ -5,9 +5,11 @@
5
5
 
6
6
  import { ref, computed, type Ref, type ComputedRef } from 'vue';
7
7
  import { message } from 'ant-design-vue';
8
- import { resolveAttachmentIndexInList } from '../src/components/func_comp/hb_func_file_preview/src/util';
9
- import { triggerBrowserDownload } from '../src/components/utils/triggerBrowserDownload';
10
- import { HbFileItem_Intf } from '../src/components/func_comp/hb_func_file_preview_safe/src/type';
8
+ import {
9
+ resolveAttachmentIndexInList,
10
+ type HbFileItem_Intf,
11
+ } from '../utils/util';
12
+ import { triggerBrowserDownload } from '../utils/triggerBrowserDownload';
11
13
 
12
14
  export interface FilePreviewDetail {
13
15
  // 附件列表
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hb-hellotech/hb-ui",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "type": "module",
5
5
  "main": "dist/hb_component_lib.umd.cjs",
6
6
  "module": "dist/hb_component_lib.js",
@@ -23,7 +23,8 @@
23
23
  "README.md",
24
24
  "LICENSE",
25
25
  "dist",
26
- "hooks"
26
+ "hooks",
27
+ "utils"
27
28
  ],
28
29
  "scripts": {
29
30
  "dev": "vite --port 3003",
@@ -1,10 +0,0 @@
1
- export interface HbFileItem_Intf {
2
- fileName: string;
3
- previewUrl: string;
4
- downloadUrl: string;
5
- attachmentDesc?: string;
6
- attachmentId?: string;
7
- uploadDate?: string;
8
- [key: string]: unknown;
9
- }
10
- //# sourceMappingURL=type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../../src/components/func_comp/hb_func_file_preview/src/type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAE9B,QAAQ,EAAE,MAAM,CAAC;IAEjB,UAAU,EAAE,MAAM,CAAC;IAEnB,WAAW,EAAE,MAAM,CAAC;IAEpB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
@@ -1,17 +0,0 @@
1
- import { HbFileItem_Intf } from './type';
2
- /** 可从文件名或完整 URL 解析扩展名(忽略 ?# 后参数) */
3
- export declare const getFileExtensionFromName: (nameOrUrl: string) => string;
4
- /** 是否为可内嵌预览的图片类型(依据文件名或 URL) */
5
- export declare const isAttachmentImagePreview: (fileNameOrUrl: string) => boolean;
6
- /** 供应商附件:仅 PDF 与常见图片支持内嵌预览 */
7
- export declare const isAttachmentPreviewable: (fileName: string) => boolean;
8
- export declare const getAttachmentDownloadUrl: <T extends HbFileItem_Intf>(row: T) => string;
9
- /**
10
- * @desc 在 `attachmentInfos` 中定位被点击的附件下标。
11
- * 仅依赖 fileUuid 会在接口缺省、全空或重复时始终命中第一项,需结合列表下标与预览/下载地址兜底。
12
- */
13
- export declare const resolveAttachmentIndexInList: <T extends HbFileItem_Intf>(list: T[], item: T, options?: {
14
- /** 列表 v-for 下标,优先使用 */
15
- preferredIndex?: number;
16
- }) => number;
17
- //# sourceMappingURL=util.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/components/func_comp/hb_func_file_preview/src/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,oCAAoC;AACpC,eAAO,MAAM,wBAAwB,GAAI,WAAW,MAAM,KAAG,MAI5D,CAAC;AAIF,gCAAgC;AAChC,eAAO,MAAM,wBAAwB,GAAI,eAAe,MAAM,KAAG,OAEhE,CAAC;AAEF,8BAA8B;AAC9B,eAAO,MAAM,uBAAuB,GAAI,UAAU,MAAM,KAAG,OAG1D,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,CAAC,SAAS,eAAe,EAAE,KAAK,CAAC,KAAG,MAE5E,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GAAI,CAAC,SAAS,eAAe,EACpE,MAAM,CAAC,EAAE,EACT,MAAM,CAAC,EACP,UAAU;IACR,uBAAuB;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,KACA,MAsCF,CAAC"}