@voicenter-team/voicenter-ui-plus 3.3.4 → 3.4.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.
- package/library/components/VcModal/VcConfirmModal.vue.mjs +30 -12
- package/library/components/VcPdfViewer/VcPdfDocument.vue.mjs +2 -2
- package/library/components/VcPdfViewer/VcPdfDocumentPage.vue.mjs +3 -3
- package/library/components/VcPdfViewer/pdf.worker.min.js +4 -4
- package/library/components/VcPdfViewer/pdfjslib.mjs +2 -2
- package/library/composables/useConfirmModal.mjs +8 -0
- package/library/types/components/VcPdfViewer/VcPdfDocument.vue.d.ts +2 -2
- package/library/types/components/VcPdfViewer/VcPdfDocumentPage.vue.d.ts +1 -1
- package/library/types/components/VcPdfViewer/pdfjslib.d.ts +2 -2
- package/library/types/composables/useConfirmModal.d.ts +9 -0
- package/package.json +3 -3
|
@@ -2,8 +2,8 @@ let pdfPromise = null;
|
|
|
2
2
|
function loadPdf() {
|
|
3
3
|
if (!pdfPromise) {
|
|
4
4
|
pdfPromise = (async () => {
|
|
5
|
-
const pdfImport = import("pdfjs-dist/
|
|
6
|
-
const viewerImport = import("pdfjs-dist/
|
|
5
|
+
const pdfImport = import("pdfjs-dist/build/pdf.js");
|
|
6
|
+
const viewerImport = import("pdfjs-dist/web/pdf_viewer");
|
|
7
7
|
const [pdf, viewer] = await Promise.all([pdfImport, viewerImport]);
|
|
8
8
|
pdf.GlobalWorkerOptions.workerSrc = new URL("./pdf.worker.min.js", import.meta.url).toString();
|
|
9
9
|
return {
|
|
@@ -12,6 +12,10 @@ class ConfirmStateClass {
|
|
|
12
12
|
__publicField(this, "modalConfirmLabel");
|
|
13
13
|
__publicField(this, "modalCancelLabel");
|
|
14
14
|
__publicField(this, "renderContent");
|
|
15
|
+
__publicField(this, "showMessage");
|
|
16
|
+
__publicField(this, "contentWrapperClass");
|
|
17
|
+
__publicField(this, "contentClass");
|
|
18
|
+
__publicField(this, "buttonSize");
|
|
15
19
|
}
|
|
16
20
|
openModal(params) {
|
|
17
21
|
this.header = params.header || "";
|
|
@@ -20,6 +24,10 @@ class ConfirmStateClass {
|
|
|
20
24
|
this.renderContent = params.renderContent || void 0;
|
|
21
25
|
this.modalCancelLabel = params.modalCancelLabel;
|
|
22
26
|
this.modalConfirmLabel = params.modalConfirmLabel;
|
|
27
|
+
this.showMessage = params.hideMessage === void 0 ? true : !params.hideMessage;
|
|
28
|
+
this.contentClass = params.contentClass;
|
|
29
|
+
this.contentWrapperClass = params.contentWrapperClass;
|
|
30
|
+
this.buttonSize = params.buttonSize;
|
|
23
31
|
this.open = true;
|
|
24
32
|
}
|
|
25
33
|
closeModal() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PDFDocumentProxy } from 'pdfjs-dist/types/display/api';
|
|
1
|
+
import { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
|
|
2
2
|
declare function downloadPdfFile(): Promise<Blob | undefined>;
|
|
3
3
|
declare function openFile(): Promise<void>;
|
|
4
4
|
declare function onPrintDocument(dpi?: number, pageNumberOnly?: Array<number>): Promise<void> | undefined;
|
|
@@ -9,7 +9,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
9
9
|
id: undefined;
|
|
10
10
|
document: string;
|
|
11
11
|
}>>, {
|
|
12
|
-
pdfDocument: import("vue").
|
|
12
|
+
pdfDocument: import("vue").ShallowRef<PDFDocumentProxy | undefined, PDFDocumentProxy | undefined>;
|
|
13
13
|
pageCount: import("vue").Ref<number, number>;
|
|
14
14
|
currentPage: import("vue").Ref<number, number>;
|
|
15
15
|
isOpenPreview: import("vue").Ref<boolean, boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type * as PdfNs from 'pdfjs-dist
|
|
2
|
-
import type { PDFLinkService as PDFLinkServiceCtor } from 'pdfjs-dist/
|
|
1
|
+
import type * as PdfNs from 'pdfjs-dist';
|
|
2
|
+
import type { PDFLinkService as PDFLinkServiceCtor } from 'pdfjs-dist/web/pdf_viewer';
|
|
3
3
|
export type PdfLib = typeof PdfNs;
|
|
4
4
|
export type PdfLinkServiceCtor = typeof PDFLinkServiceCtor;
|
|
5
5
|
export declare function loadPdf(): Promise<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Ref, VNode } from 'vue';
|
|
2
|
+
import { ButtonSize } from '../types';
|
|
2
3
|
declare global {
|
|
3
4
|
interface VcGlobalSingletons {
|
|
4
5
|
confirmModalState: Ref<ConfirmObjectType>;
|
|
@@ -11,6 +12,10 @@ type paramsType = {
|
|
|
11
12
|
renderContent?: VNode;
|
|
12
13
|
modalConfirmLabel?: string;
|
|
13
14
|
modalCancelLabel?: string;
|
|
15
|
+
contentWrapperClass?: string;
|
|
16
|
+
contentClass?: string;
|
|
17
|
+
buttonSize?: ButtonSize;
|
|
18
|
+
hideMessage?: boolean;
|
|
14
19
|
};
|
|
15
20
|
type ConfirmObjectType = {
|
|
16
21
|
open: boolean;
|
|
@@ -24,6 +29,10 @@ type ConfirmObjectType = {
|
|
|
24
29
|
modalCancelLabel?: string;
|
|
25
30
|
onClose?: () => void;
|
|
26
31
|
onConfirm?: () => void;
|
|
32
|
+
showMessage?: boolean;
|
|
33
|
+
contentWrapperClass?: string;
|
|
34
|
+
contentClass?: string;
|
|
35
|
+
buttonSize?: ButtonSize;
|
|
27
36
|
};
|
|
28
37
|
export declare const confirmModalState: Ref<ConfirmObjectType>;
|
|
29
38
|
declare const useConfirmModal: (params: paramsType) => Promise<boolean>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voicenter-team/voicenter-ui-plus",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite",
|
|
6
6
|
"build": "vite build",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"libphonenumber-js": "^1.10.13",
|
|
116
116
|
"lodash-es": "^4.17.21",
|
|
117
117
|
"maska": "^3.2.0",
|
|
118
|
-
"pdfjs-dist": "^2.
|
|
118
|
+
"pdfjs-dist": "^2.16.105",
|
|
119
119
|
"vue": "^3.5.13",
|
|
120
120
|
"vue-advanced-cropper": "^2.8.3",
|
|
121
121
|
"vue-codemirror6": "^1.3.12",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"husky": "^9.1.7",
|
|
159
159
|
"jsdom": "^26.1.0",
|
|
160
160
|
"lint-staged": "^17.3.0",
|
|
161
|
-
"pdfjs-dist": "2.
|
|
161
|
+
"pdfjs-dist": "2.16.105",
|
|
162
162
|
"postcss": "8.5.24",
|
|
163
163
|
"readline-sync": "^1.4.10",
|
|
164
164
|
"sass": "1.93.3",
|