@jt-home/mfe-components 1.0.61 → 1.0.62-beta.1

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,4 +1,4 @@
1
- export type JtAttachmentPreviewMode = 'auto' | 'image' | 'pdf' | 'video' | 'audio' | 'iframe';
1
+ export type JtAttachmentPreviewMode = 'auto' | 'image' | 'pdf';
2
2
  export interface JtAttachmentPreviewDownloadContext<Params = unknown> {
3
3
  url: string;
4
4
  name: string;
@@ -40,8 +40,6 @@ export interface JtAttachmentPreviewOptions {
40
40
  download?: JtAttachmentPreviewDownloadHandler;
41
41
  /** 弹窗层级。 */
42
42
  zIndex?: number;
43
- /** iframe sandbox 属性,不传则不限制 iframe。 */
44
- sandbox?: string;
45
43
  /** 按 Esc 时是否关闭弹窗。 */
46
44
  closeOnPressEscape?: boolean;
47
45
  /** 加载成功回调。 */
@@ -52,6 +50,7 @@ export interface JtAttachmentPreviewOptions {
52
50
  onClose?: () => void;
53
51
  }
54
52
  export type JtAttachmentPreviewFileOptions = JtAttachmentPreviewOptions;
53
+ export type JtAttachmentPreviewResolveFileHandler<Params = unknown> = (params: Params) => JtAttachmentPreviewFileOptions | Promise<JtAttachmentPreviewFileOptions>;
55
54
  export interface JtAttachmentPreviewRequestConfig<Params = unknown, Response = unknown, DownloadResponse = unknown> {
56
55
  /** 根据业务参数请求文件信息。可以直接调用 axios、fetch 或项目内 request。 */
57
56
  request: (params: Params) => Promise<Response>;
@@ -69,5 +68,8 @@ export interface JtAttachmentPreviewHandler {
69
68
  export interface JtAttachmentPreviewService {
70
69
  (options: string | JtAttachmentPreviewOptions): JtAttachmentPreviewHandler;
71
70
  openByParams: <Params = unknown>(params: Params) => JtAttachmentPreviewHandler;
72
- setup: <Params = unknown, Response = unknown, DownloadResponse = unknown>(config: JtAttachmentPreviewRequestConfig<Params, Response, DownloadResponse>) => void;
71
+ setup: {
72
+ <Params = unknown>(resolveFile: JtAttachmentPreviewResolveFileHandler<Params>): void;
73
+ <Params = unknown, Response = unknown, DownloadResponse = unknown>(config: JtAttachmentPreviewRequestConfig<Params, Response, DownloadResponse>): void;
74
+ };
73
75
  }
@@ -21,7 +21,7 @@ interface JTFormItemBaseConfig {
21
21
  prop: string;
22
22
  /** 标签文本 */
23
23
  label: string;
24
- /** 占几列,上限跟随 JtFormItems.gridColumns */
24
+ /** 占几列,1-4 */
25
25
  span?: number;
26
26
  /** 是否显示当前表单项,false 时不渲染 */
27
27
  show?: boolean;
@@ -66,9 +66,6 @@ export interface JTFormItemsProps {
66
66
  configs: JTFormItemConfig[];
67
67
  /** 表单数据对象 */
68
68
  formData: JTFormItemsForm;
69
- /** 表单 grid 总列数,默认 4,支持 1-24 */
70
- gridColumns?: number;
71
- /** 统一设置表单项占用列数,上限跟随 gridColumns */
72
69
  span?: number;
73
70
  }
74
71
  export {};
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
22
22
  onSelect?: ((item: GlobalInfoLeftNavItem, key: string) => any) | undefined;
23
23
  "onUpdate:activeKey"?: ((key: string) => any) | undefined;
24
24
  }>, {
25
- mode: "anchor" | "timeline";
26
25
  activeKey: string;
26
+ mode: "anchor" | "timeline";
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  declare const _default: typeof __VLS_export;
29
29
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import type { GlobalInfoNode, GlobalInfoSection } from './types';
2
2
  type SlotRegistry = Record<string, unknown>;
3
3
  export declare function getNodeSlotIdentity(node: Pick<GlobalInfoNode, 'code'>): string;
4
- export declare function getSectionSlotIdentity(node: Pick<GlobalInfoNode, 'code'>, section?: Pick<GlobalInfoSection, 'code'> | null): string;
4
+ export declare function getSectionSlotIdentity(node: Partial<Pick<GlobalInfoNode, 'code' | 'infSetId' | 'setId'>>, section?: Pick<GlobalInfoSection, 'code'> | null): string;
5
5
  export declare function findGlobalInfoSlotName(slotMap: SlotRegistry, prefix: string, identity: string): string;
6
6
  export {};
@@ -418,7 +418,7 @@ export interface GlobalInfoField {
418
418
  placeholder?: string;
419
419
  /** 静态或动态加载后的选项。 */
420
420
  options?: GlobalInfoFieldOption[];
421
- /** 信息集枚举来源类型:NOTRANS 不处理,REST 调接口,ENUMS 使用详情响应内联枚举。 */
421
+ /** 信息集枚举来源类型:NULL 兼容旧接口,REST 调接口,ENUMS 使用详情响应内联枚举,NOTRANS 不处理。 */
422
422
  valueListType?: string;
423
423
  /** 字段动态接口描述,常用于级联下拉。 */
424
424
  interface?: GlobalInfoApiOperation;
@@ -8,11 +8,11 @@ type __VLS_Slots = {} & {
8
8
  default?: (props: typeof __VLS_12) => any;
9
9
  };
10
10
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
- cancel: () => any;
12
11
  confirm: () => any;
12
+ cancel: () => any;
13
13
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
- onCancel?: (() => any) | undefined;
15
14
  onConfirm?: (() => any) | undefined;
15
+ onCancel?: (() => any) | undefined;
16
16
  }>, {
17
17
  title: string;
18
18
  confirmText: string;
@@ -1,11 +1,10 @@
1
1
  export { JtCrudTable, JtFilterBar, JtPagination, JtTable } from './table/index';
2
2
  export type { JtCrudColumn, JtCrudOption, JtDicItem, JtPaginationData, JtSearchType, } from './table/index';
3
3
  export { JtButton } from './JtButton/index';
4
- export { JtAttachmentPreview, JtAttachmentPreviewByParams, setupJtAttachmentPreview, } from './JtAttachmentPreview/index';
5
4
  export { JtCascader, JtDatePicker, JtFormItems, JtInput, JtSelect } from './form/index';
6
5
  export { JtPageHeader } from './JtPageHeader/index';
7
6
  export { GlobalInfoAutoRenderer, GlobalInfoDeleteConfirm, GlobalInfoFieldControl, GlobalInfoFieldValue, GlobalInfoFormRenderer, GlobalInfoGroup, GlobalInfoLeftNav, GlobalInfoMultiFormRenderer, GlobalInfoProvider, GlobalInfoSectionBlock, GlobalInfoSectionOutlet, GlobalInfoSections, GlobalInfoTableRenderer, useGlobalInfoController, buildGlobalInfoUpdatePayload, createEmptyGlobalInfoViewModel, isGlobalInfoNode, mergeGlobalInfoChildren, normalizeGlobalInfoDetail, normalizeGlobalInfoOptions, normalizeGlobalInfoTree, resolveGlobalInfoRenderType, DEFAULT_GLOBAL_INFO_REQUIRED_INFO_SET_EMPTY_MESSAGE, validateGlobalInfoRequiredInfoSet, } from './globalInfo/index';
8
7
  export type { JTCascaderFormItemConfig, JTCompatibleFormItemType, JTElementFormItemType, JTFormItemCascaderOption, JTFormItemConfig, JTFormItemEventHandler, JTFormItemType, JTFormItemsForm, JTFormItemsProps, JtOptionItem, } from './form/index';
9
8
  export type { JtPageHeaderOperate, JtPageHeaderProps } from './JtPageHeader/index';
10
- export type { JtAttachmentPreviewHandler, JtAttachmentPreviewFileOptions, JtAttachmentPreviewRequestConfig, JtAttachmentPreviewService, JtAttachmentPreviewMode, JtAttachmentPreviewOptions, JtAttachmentPreviewResolvedType, } from './JtAttachmentPreview/index';
9
+ export type { JtAttachmentPreviewHandler, JtAttachmentPreviewFileOptions, JtAttachmentPreviewRequestConfig, JtAttachmentPreviewService, JtAttachmentPreviewMode, JtAttachmentPreviewOptions, JtAttachmentPreviewResolvedType, } from './JtAttachmentPreview/types';
11
10
  export type { GlobalInfoActions, GlobalInfoApiOperation, GlobalInfoDetailParams, GlobalInfoField, GlobalInfoFieldHiddenContext, GlobalInfoFieldHiddenRule, GlobalInfoFieldOption, GlobalInfoInfoSet, GlobalInfoNode, GlobalInfoOperationContext, GlobalInfoOpenTreeParams, GlobalInfoProviderSlotProps, GlobalInfoRawRecord, GlobalInfoRequiredInfoSetEmptyMessage, GlobalInfoRequiredInfoSetEmptyMessageContext, GlobalInfoRenderConfig, GlobalInfoRenderType, GlobalInfoScheme, GlobalInfoSection, GlobalInfoSectionLoadTarget, GlobalInfoSectionSlotScope, GlobalInfoSectionStatus, GlobalInfoSectionTarget, GlobalInfoService, GlobalInfoSetMark, GlobalInfoState, GlobalInfoTableRowDeleteVisibleContext, GlobalInfoTableRowDeleteVisibleRule, GlobalInfoTemplateTreeParams, GlobalInfoUpdateParams, GlobalInfoViewModel, } from './globalInfo/index';
@@ -4,5 +4,5 @@ import type { LocaleOptions } from './locale';
4
4
  export declare function install(app: App, options?: LocaleOptions): void;
5
5
  export { getLocale as getJtLocale, installLocale, normalizeLocale, resetLocale as resetJtLocale, setLocale as setJtLocale, } from './locale';
6
6
  export type { LocaleCode, LocaleOptions, LocaleSource, } from './locale';
7
- export { GlobalInfoAutoRenderer, GlobalInfoDeleteConfirm, GlobalInfoFieldControl, GlobalInfoFieldValue, GlobalInfoFormRenderer, GlobalInfoGroup, GlobalInfoLeftNav, GlobalInfoMultiFormRenderer, GlobalInfoProvider, GlobalInfoSectionBlock, GlobalInfoSectionOutlet, GlobalInfoSections, GlobalInfoTableRenderer, JtAttachmentPreview, JtAttachmentPreviewByParams, JtCascader, JtButton, JtCrudTable, JtDatePicker, JtFilterBar, JtFormItems, JtInput, JtPageHeader, JtPagination, JtSelect, JtTable, buildGlobalInfoUpdatePayload, createEmptyGlobalInfoViewModel, isGlobalInfoNode, mergeGlobalInfoChildren, normalizeGlobalInfoDetail, normalizeGlobalInfoOptions, normalizeGlobalInfoTree, resolveGlobalInfoRenderType, setupJtAttachmentPreview, useGlobalInfoController, DEFAULT_GLOBAL_INFO_REQUIRED_INFO_SET_EMPTY_MESSAGE, validateGlobalInfoRequiredInfoSet, } from './components/index';
7
+ export { GlobalInfoAutoRenderer, GlobalInfoDeleteConfirm, GlobalInfoFieldControl, GlobalInfoFieldValue, GlobalInfoFormRenderer, GlobalInfoGroup, GlobalInfoLeftNav, GlobalInfoMultiFormRenderer, GlobalInfoProvider, GlobalInfoSectionBlock, GlobalInfoSectionOutlet, GlobalInfoSections, GlobalInfoTableRenderer, JtCascader, JtButton, JtCrudTable, JtDatePicker, JtFilterBar, JtFormItems, JtInput, JtPageHeader, JtPagination, JtSelect, JtTable, buildGlobalInfoUpdatePayload, createEmptyGlobalInfoViewModel, isGlobalInfoNode, mergeGlobalInfoChildren, normalizeGlobalInfoDetail, normalizeGlobalInfoOptions, normalizeGlobalInfoTree, resolveGlobalInfoRenderType, useGlobalInfoController, DEFAULT_GLOBAL_INFO_REQUIRED_INFO_SET_EMPTY_MESSAGE, validateGlobalInfoRequiredInfoSet, } from './components/index';
8
8
  export type { GlobalInfoActions, GlobalInfoApiOperation, GlobalInfoDetailParams, GlobalInfoField, GlobalInfoFieldHiddenContext, GlobalInfoFieldHiddenRule, GlobalInfoFieldOption, GlobalInfoInfoSet, GlobalInfoNode, GlobalInfoOperationContext, GlobalInfoOpenTreeParams, GlobalInfoProviderSlotProps, GlobalInfoRawRecord, GlobalInfoRenderConfig, GlobalInfoRenderType, GlobalInfoRequiredInfoSetEmptyMessage, GlobalInfoRequiredInfoSetEmptyMessageContext, GlobalInfoScheme, GlobalInfoSection, GlobalInfoSectionLoadTarget, GlobalInfoSectionSlotScope, GlobalInfoSectionStatus, GlobalInfoSectionTarget, GlobalInfoService, GlobalInfoSetMark, GlobalInfoState, GlobalInfoTemplateTreeParams, GlobalInfoUpdateParams, GlobalInfoViewModel, JTCascaderFormItemConfig, JtCrudColumn, JtCrudOption, JtDicItem, JTCompatibleFormItemType, JTElementFormItemType, JTFormItemConfig, JTFormItemEventHandler, JTFormItemType, JTFormItemsForm, JTFormItemsProps, JTFormItemCascaderOption, JtAttachmentPreviewHandler, JtAttachmentPreviewFileOptions, JtAttachmentPreviewRequestConfig, JtAttachmentPreviewService, JtAttachmentPreviewMode, JtAttachmentPreviewOptions, JtAttachmentPreviewResolvedType, JtOptionItem, JtPageHeaderOperate, JtPageHeaderProps, JtPaginationData, JtSearchType, } from './components/index';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jt-home/mfe-components",
3
- "version": "1.0.61",
3
+ "version": "1.0.62-beta.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -21,8 +21,7 @@
21
21
  "import": "./dist/JtAttachmentPreview/index.mjs",
22
22
  "require": "./dist/JtAttachmentPreview/index.cjs"
23
23
  },
24
- "./style.css": "./dist/style.css",
25
- "./JtAttachmentPreview/style.css": "./dist/JtAttachmentPreview/style.css"
24
+ "./style.css": "./dist/style.css"
26
25
  },
27
26
  "files": [
28
27
  "dist"
@@ -53,10 +52,9 @@
53
52
  "test:cascader-props": "tsc --skipLibCheck --module NodeNext --moduleResolution NodeNext --target ES2020 --outDir tmp/unit-tests src/components/form/item/JtCascader/cascaderProps.ts src/components/form/item/JtCascader/cascaderProps.test.ts && node tmp/unit-tests/cascaderProps.test.js"
54
53
  },
55
54
  "dependencies": {
56
- "@element-plus/icons-vue": "^2.3.2",
57
55
  "@jt-home/jt-language-tools": "^1.0.2",
58
56
  "@jt-home/sdk-tools": "1.2.1-beta.4",
59
- "pdfjs-dist": "^5.7.284"
57
+ "vue-demi": "0.14.6"
60
58
  },
61
59
  "devDependencies": {
62
60
  "@babel/eslint-parser": "^7.24.5",
@@ -68,7 +66,9 @@
68
66
  "@typescript-eslint/eslint-plugin": "^7.9.0",
69
67
  "@typescript-eslint/parser": "^7.9.0",
70
68
  "@vitejs/plugin-vue": "^5.2.4",
69
+ "@vue-office/pdf": "^2.0.2",
71
70
  "@vue/tsconfig": "^0.8.1",
71
+ "@element-plus/icons-vue": "^2.3.2",
72
72
  "element-plus": "^2.14.0",
73
73
  "eslint": "^8.57.0",
74
74
  "eslint-config-prettier": "^9.1.0",
@@ -94,7 +94,14 @@
94
94
  "vue-tsc": "^3.1.5"
95
95
  },
96
96
  "peerDependencies": {
97
+ "@element-plus/icons-vue": "^2.3.2",
98
+ "@vue-office/pdf": "^2.0.2",
97
99
  "element-plus": "^2.14.0",
98
100
  "vue": "^3.5.10"
101
+ },
102
+ "peerDependenciesMeta": {
103
+ "@vue-office/pdf": {
104
+ "optional": true
105
+ }
99
106
  }
100
107
  }