@m3ui-vue/m3ui-vue 1.10.2 → 1.11.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 +19 -4
- package/dist/API.md +195 -56
- package/dist/MButton-gWoOzFWf.js +284 -0
- package/dist/MButton-gWoOzFWf.js.map +1 -0
- package/dist/MColorPickerModal-CJYMvlgK.js +466 -0
- package/dist/MColorPickerModal-CJYMvlgK.js.map +1 -0
- package/dist/MDialog-CU8EYgCC.js +226 -0
- package/dist/MDialog-CU8EYgCC.js.map +1 -0
- package/dist/{MIcon-BSsJZhK7.js → MIcon-CkUc9kuQ.js} +10 -4
- package/dist/MIcon-CkUc9kuQ.js.map +1 -0
- package/dist/MIconButton-DTFOfsTy.js +317 -0
- package/dist/MIconButton-DTFOfsTy.js.map +1 -0
- package/dist/MListItem-Cdw2FqCT.js +1306 -0
- package/dist/MListItem-Cdw2FqCT.js.map +1 -0
- package/dist/MLoadingIndicator-BxAy2x7P.js +115 -0
- package/dist/MLoadingIndicator-BxAy2x7P.js.map +1 -0
- package/dist/{MMenuItem-US0Zbglq.js → MMenuItem-CEIKYvaX.js} +216 -214
- package/dist/MMenuItem-CEIKYvaX.js.map +1 -0
- package/dist/{MPdfViewer-DL9mRsd2.js → MPdfViewer-CEfyXGq2.js} +674 -671
- package/dist/MPdfViewer-CEfyXGq2.js.map +1 -0
- package/dist/MProgressBar-BzZMxq7M.js.map +1 -1
- package/dist/MSeekBar-B3_D-PwH.js +435 -0
- package/dist/MSeekBar-B3_D-PwH.js.map +1 -0
- package/dist/{MSegmentedButton-DMou-8sG.js → MSegmentedButton-Dg07j-4r.js} +4 -4
- package/dist/{MSegmentedButton-DMou-8sG.js.map → MSegmentedButton-Dg07j-4r.js.map} +1 -1
- package/dist/{MSignaturePad-WuvE_Cyl.js → MSignaturePad-3nddtLKI.js} +2 -2
- package/dist/{MSignaturePad-WuvE_Cyl.js.map → MSignaturePad-3nddtLKI.js.map} +1 -1
- package/dist/{MSlider-7TzhFHKS.js → MSlider-BrpLbqwt.js} +4 -4
- package/dist/{MSlider-7TzhFHKS.js.map → MSlider-BrpLbqwt.js.map} +1 -1
- package/dist/{MSpinner-CkIVBuGE.js → MSpinner-CLwzDH33.js} +2 -2
- package/dist/{MSpinner-CkIVBuGE.js.map → MSpinner-CLwzDH33.js.map} +1 -1
- package/dist/{MTextField-B6_iOczK.js → MTextField-CZRizAwA.js} +136 -134
- package/dist/MTextField-CZRizAwA.js.map +1 -0
- package/dist/{_useFieldValidation-COBJ1tWr.js → _useFieldValidation-DVcqyy9g.js} +2 -2
- package/dist/{_useFieldValidation-COBJ1tWr.js.map → _useFieldValidation-DVcqyy9g.js.map} +1 -1
- package/dist/api.json +1 -1
- package/dist/chart.js +1 -1
- package/dist/code-editor.js +3 -3
- package/dist/code-editor.js.map +1 -1
- package/dist/components/MAlert.vue.d.ts +1 -1
- package/dist/components/MAudioPlayer.vue.d.ts +3 -3
- package/dist/components/MAvatar.vue.d.ts +19 -1
- package/dist/components/MButton.vue.d.ts +2 -1
- package/dist/components/MChatBubble.vue.d.ts +2 -0
- package/dist/components/MCheckbox.vue.d.ts +2 -0
- package/dist/components/MDataTable.vue.d.ts +31 -3
- package/dist/components/MFlow.vue.d.ts +1 -1
- package/dist/components/MHotkeys.vue.d.ts +1 -0
- package/dist/components/MIcon.vue.d.ts +6 -0
- package/dist/components/MIconButton.vue.d.ts +5 -0
- package/dist/components/MKanban.vue.d.ts +1 -1
- package/dist/components/MLink.vue.d.ts +59 -0
- package/dist/components/MListItem.vue.d.ts +3 -1
- package/dist/components/MMapControl.vue.d.ts +1 -1
- package/dist/components/MNotificationCenter.vue.d.ts +1 -1
- package/dist/components/MNumberField.vue.d.ts +1 -1
- package/dist/components/MPagination.vue.d.ts +14 -1
- package/dist/components/MPdfSigner.vue.d.ts +2 -2
- package/dist/components/MRadio.vue.d.ts +2 -0
- package/dist/components/MRadioGroup.vue.d.ts +2 -0
- package/dist/components/MStatCard.vue.d.ts +2 -2
- package/dist/components/MSwitch.vue.d.ts +2 -0
- package/dist/components/MText.vue.d.ts +4 -2
- package/dist/components/MTextField.vue.d.ts +2 -0
- package/dist/components/_MDrawerItemList.vue.d.ts +6 -0
- package/dist/composables/_menuGroups.d.ts +10 -1
- package/dist/composables/_splitAttrs.d.ts +6 -0
- package/dist/composables/_springAnimation.d.ts +2 -2
- package/dist/composables/_useFocusTrap.d.ts +15 -0
- package/dist/composables/_usePaneResize.d.ts +1 -1
- package/dist/composables/_useSpring.d.ts +4 -4
- package/dist/composables/dynamicColor.d.ts +9 -1
- package/dist/composables/motion.d.ts +63 -0
- package/dist/composables/useConfirm.d.ts +28 -0
- package/dist/composables/useDevice.d.ts +8 -1
- package/dist/composables/useLocale.d.ts +14 -0
- package/dist/composables/useScrollReveal.d.ts +1 -1
- package/dist/composables/useTheme.d.ts +1 -0
- package/dist/composables/useToast.d.ts +7 -0
- package/dist/draw.js +556 -556
- package/dist/draw.js.map +1 -1
- package/dist/flow.js +854 -851
- package/dist/flow.js.map +1 -1
- package/dist/gantt.js +1118 -1096
- package/dist/gantt.js.map +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/locales/index.d.ts +1 -0
- package/dist/locales/index.js +833 -1
- package/dist/locales/index.js.map +1 -1
- package/dist/locales/pl.d.ts +2 -0
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +10327 -9796
- package/dist/m3ui.js.map +1 -1
- package/dist/map.js +860 -860
- package/dist/map.js.map +1 -1
- package/dist/{material-color-utilities-CEFytLsr.js → material-color-utilities-BZsBNIhi.js} +276 -217
- package/dist/material-color-utilities-BZsBNIhi.js.map +1 -0
- package/dist/media.js +7 -7
- package/dist/{motion-BcejVTeX.js → motion-BqYcqcim.js} +15 -5
- package/dist/motion-BqYcqcim.js.map +1 -0
- package/dist/pdf-sign.js +140 -137
- package/dist/pdf-sign.js.map +1 -1
- package/dist/pdf.js +1 -1
- package/dist/plugin.d.ts +11 -0
- package/dist/rich-text-editor.js +7 -7
- package/dist/styles/theme.css +40 -0
- package/dist/styles.css +1 -1
- package/dist/terminal.js +1 -1
- package/dist/{useLocale-YRaOT12S.js → useLocale-BjcYauXr.js} +60 -4
- package/dist/useLocale-BjcYauXr.js.map +1 -0
- package/dist/{useThemeTokens-DyAdPQB0.js → useThemeTokens-D5nr5KHf.js} +28 -27
- package/dist/useThemeTokens-D5nr5KHf.js.map +1 -0
- package/package.json +17 -2
- package/src/__tests__/MAvatarImage.test.ts +37 -0
- package/src/__tests__/MDataTableControlled.test.ts +68 -0
- package/src/__tests__/MHotkeysSequence.test.ts +53 -0
- package/src/__tests__/MIconAxes.test.ts +16 -0
- package/src/__tests__/MIconButtonWidth.test.ts +22 -0
- package/src/__tests__/MLink.test.ts +46 -0
- package/src/__tests__/MPaginationPages.test.ts +43 -0
- package/src/__tests__/MTextEmphasized.test.ts +14 -0
- package/src/__tests__/controlDescription.test.ts +34 -0
- package/src/__tests__/customColor.test.ts +27 -0
- package/src/__tests__/dynamicColor.test.ts +3 -2
- package/src/__tests__/focusTrap.test.ts +124 -0
- package/src/__tests__/formatMessage.test.ts +20 -0
- package/src/__tests__/inputAttrs.test.ts +103 -0
- package/src/__tests__/localePresets.test.ts +2 -0
- package/src/__tests__/menuGroupsRemount.test.ts +40 -0
- package/src/__tests__/menuHydration.test.ts +41 -0
- package/src/__tests__/motionPrefs.test.ts +28 -0
- package/src/__tests__/ssr.test.ts +11 -0
- package/src/__tests__/ssrToast.test.ts +20 -0
- package/src/__tests__/toastDetails.test.ts +39 -0
- package/src/__tests__/useConfirm.test.ts +47 -0
- package/src/__tests__/useTheme.test.ts +14 -0
- package/src/__tests__/warningRole.test.ts +22 -0
- package/src/components/MAlert.vue +2 -2
- package/src/components/MAnimatedNumber.vue +9 -3
- package/src/components/MAutocomplete.vue +16 -4
- package/src/components/MAvailabilityCalendar.vue +3 -3
- package/src/components/MAvatar.vue +32 -5
- package/src/components/MAvatarGroup.vue +7 -2
- package/src/components/MBottomSheet.vue +18 -2
- package/src/components/MButton.vue +18 -5
- package/src/components/MCarousel.vue +3 -3
- package/src/components/MChatBubble.vue +14 -1
- package/src/components/MCheckbox.vue +21 -4
- package/src/components/MChip.vue +4 -2
- package/src/components/MCollapse.vue +7 -1
- package/src/components/MCommandPalette.vue +6 -2
- package/src/components/MContextMenu.vue +4 -4
- package/src/components/MCreditCardInput.vue +5 -0
- package/src/components/MDashboardGrid.vue +2 -1
- package/src/components/MDataTable.vue +63 -16
- package/src/components/MDialog.vue +21 -3
- package/src/components/MDiffViewer.vue +3 -3
- package/src/components/MDrawLayers.vue +3 -3
- package/src/components/MFabMenu.vue +7 -0
- package/src/components/MFloorPlan.vue +3 -3
- package/src/components/MFloorPlanInspector.vue +3 -3
- package/src/components/MFlow.vue +9 -5
- package/src/components/MFlowControls.vue +6 -0
- package/src/components/MFormBuilder.vue +1 -1
- package/src/components/MGantt.vue +10 -10
- package/src/components/MHotkeys.vue +61 -16
- package/src/components/MIcon.vue +17 -1
- package/src/components/MIconButton.vue +29 -6
- package/src/components/MImageCropper.vue +1 -1
- package/src/components/MKanban.vue +2 -1
- package/src/components/MLightbox.vue +5 -4
- package/src/components/MLink.vue +136 -0
- package/src/components/MListDetail.vue +7 -0
- package/src/components/MListItem.vue +7 -4
- package/src/components/MLoadingIndicator.vue +2 -1
- package/src/components/MMap.vue +3 -0
- package/src/components/MMapCluster.vue +2 -2
- package/src/components/MMapControl.vue +2 -2
- package/src/components/MMapMeasure.vue +1 -1
- package/src/components/MMaskField.vue +16 -3
- package/src/components/MMenu.vue +4 -4
- package/src/components/MMenuItem.vue +2 -2
- package/src/components/MMeterGroup.vue +3 -2
- package/src/components/MMortgageCalculator.vue +3 -3
- package/src/components/MMultiAutocomplete.vue +19 -7
- package/src/components/MMultiSelect.vue +19 -7
- package/src/components/MNavigationDrawer.vue +10 -3
- package/src/components/MNavigationRail.vue +5 -1
- package/src/components/MNotificationCenter.vue +2 -1
- package/src/components/MNotificationHost.vue +3 -3
- package/src/components/MNumberField.vue +23 -6
- package/src/components/MOdontogram.vue +4 -4
- package/src/components/MOrderBook.vue +4 -0
- package/src/components/MPagination.vue +91 -12
- package/src/components/MPdfSigner.vue +3 -3
- package/src/components/MPdfViewer.vue +7 -7
- package/src/components/MPhoneInput.vue +17 -4
- package/src/components/MProductConfigurator.vue +4 -4
- package/src/components/MProgressBar.vue +5 -0
- package/src/components/MQuiz.vue +8 -5
- package/src/components/MRadio.vue +24 -5
- package/src/components/MRadioGroup.vue +3 -0
- package/src/components/MReactions.vue +2 -2
- package/src/components/MResourceTimeline.vue +3 -3
- package/src/components/MResult.vue +1 -1
- package/src/components/MScrollField.vue +1 -1
- package/src/components/MSearchField.vue +6 -5
- package/src/components/MSeatMap.vue +5 -0
- package/src/components/MSeekBar.vue +3 -2
- package/src/components/MSelect.vue +16 -4
- package/src/components/MSideSheet.vue +25 -3
- package/src/components/MSimpleCarousel.vue +2 -2
- package/src/components/MSnackbar.vue +16 -13
- package/src/components/MSparkline.vue +2 -1
- package/src/components/MSpinner.vue +8 -0
- package/src/components/MSplitter.vue +1 -1
- package/src/components/MSpotlightSearch.vue +6 -2
- package/src/components/MSpreadsheet.vue +1 -1
- package/src/components/MStatCard.vue +2 -1
- package/src/components/MSwitch.vue +21 -4
- package/src/components/MTabs.vue +2 -1
- package/src/components/MTagInput.vue +19 -6
- package/src/components/MText.vue +23 -4
- package/src/components/MTextField.vue +25 -6
- package/src/components/MTimeline.vue +5 -5
- package/src/components/MToolbar.vue +2 -2
- package/src/components/MTour.vue +3 -0
- package/src/components/MTrackingTimeline.vue +6 -0
- package/src/components/MTypewriter.vue +7 -1
- package/src/components/MWindow.vue +10 -1
- package/src/components/_MColorPanel.vue +4 -4
- package/src/components/_MComment.vue +3 -2
- package/src/components/_MFlowNodeShell.vue +1 -1
- package/src/components/_MPdfPage.vue +1 -1
- package/src/components/_MTransferPane.vue +10 -0
- package/src/composables/_effectCanvas.ts +2 -1
- package/src/composables/_menuGroups.ts +10 -1
- package/src/composables/_splitAttrs.ts +29 -0
- package/src/composables/_springAnimation.ts +3 -3
- package/src/composables/_themeTransition.ts +3 -2
- package/src/composables/_useFocusTrap.ts +142 -0
- package/src/composables/_useMenuNav.ts +3 -3
- package/src/composables/_usePaneResize.ts +2 -1
- package/src/composables/_useSheetMotion.ts +3 -4
- package/src/composables/_useSpring.ts +16 -10
- package/src/composables/cron.ts +7 -6
- package/src/composables/dynamicColor.ts +21 -2
- package/src/composables/motion.ts +27 -0
- package/src/composables/useConfirm.ts +116 -0
- package/src/composables/useDevice.ts +23 -3
- package/src/composables/useFieldBg.ts +4 -0
- package/src/composables/useLocale.ts +74 -0
- package/src/composables/useNotification.ts +3 -0
- package/src/composables/useScrollReveal.ts +3 -3
- package/src/composables/useTheme.ts +8 -2
- package/src/composables/useToast.ts +27 -4
- package/src/directives/vSparkle.ts +2 -1
- package/src/index.ts +8 -5
- package/src/locales/ar.ts +7 -0
- package/src/locales/de.ts +7 -0
- package/src/locales/es.ts +7 -0
- package/src/locales/fr.ts +7 -0
- package/src/locales/index.ts +1 -0
- package/src/locales/ja.ts +7 -0
- package/src/locales/ko.ts +7 -0
- package/src/locales/pl.ts +807 -0
- package/src/locales/pt.ts +7 -0
- package/src/locales/zh.ts +7 -0
- package/src/plugin.ts +16 -0
- package/src/styles/theme.css +40 -0
- package/dist/MButton-B9RCM06i.js +0 -171
- package/dist/MButton-B9RCM06i.js.map +0 -1
- package/dist/MColorPickerModal-ChRtcZOo.js +0 -577
- package/dist/MColorPickerModal-ChRtcZOo.js.map +0 -1
- package/dist/MDialog-dk07tify.js +0 -167
- package/dist/MDialog-dk07tify.js.map +0 -1
- package/dist/MIcon-BSsJZhK7.js.map +0 -1
- package/dist/MIconButton-CrBPZidd.js +0 -288
- package/dist/MIconButton-CrBPZidd.js.map +0 -1
- package/dist/MListItem-h9H223vx.js +0 -1239
- package/dist/MListItem-h9H223vx.js.map +0 -1
- package/dist/MLoadingIndicator-YTV1Ov5w.js +0 -114
- package/dist/MLoadingIndicator-YTV1Ov5w.js.map +0 -1
- package/dist/MMenuItem-US0Zbglq.js.map +0 -1
- package/dist/MPdfViewer-DL9mRsd2.js.map +0 -1
- package/dist/MSeekBar-JFZcoJ8y.js +0 -434
- package/dist/MSeekBar-JFZcoJ8y.js.map +0 -1
- package/dist/MTextField-B6_iOczK.js.map +0 -1
- package/dist/material-color-utilities-CEFytLsr.js.map +0 -1
- package/dist/motion-BcejVTeX.js.map +0 -1
- package/dist/useLocale-YRaOT12S.js.map +0 -1
- package/dist/useThemeTokens-DyAdPQB0.js.map +0 -1
package/dist/pdf-sign.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { t as e } from "./MPdfViewer-
|
|
2
|
-
import { t } from "./MSignaturePad-
|
|
3
|
-
import { t as n } from "./MDialog-
|
|
4
|
-
import { t as r } from "./MButton-
|
|
5
|
-
import { t as i } from "./MIcon-
|
|
6
|
-
import { t as a } from "./MIconButton-
|
|
7
|
-
import { t as o } from "./MSegmentedButton-
|
|
8
|
-
import { t as s } from "./MTextField-
|
|
9
|
-
import {
|
|
10
|
-
import { Fragment as
|
|
1
|
+
import { t as e } from "./MPdfViewer-CEfyXGq2.js";
|
|
2
|
+
import { t } from "./MSignaturePad-3nddtLKI.js";
|
|
3
|
+
import { t as n } from "./MDialog-CU8EYgCC.js";
|
|
4
|
+
import { t as r } from "./MButton-gWoOzFWf.js";
|
|
5
|
+
import { t as i } from "./MIcon-CkUc9kuQ.js";
|
|
6
|
+
import { t as a } from "./MIconButton-DTFOfsTy.js";
|
|
7
|
+
import { t as o } from "./MSegmentedButton-Dg07j-4r.js";
|
|
8
|
+
import { t as s } from "./MTextField-CZRizAwA.js";
|
|
9
|
+
import { a as c, i as l } from "./useLocale-BjcYauXr.js";
|
|
10
|
+
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, mergeProps as ee, nextTick as te, normalizeClass as ne, normalizeStyle as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, useId as re, watch as ie, withCtx as T, withKeys as ae, withModifiers as E } from "vue";
|
|
11
11
|
// src/composables/pdfSign.ts
|
|
12
|
-
var
|
|
13
|
-
function
|
|
12
|
+
var D = (e) => (e.required ?? (e.type === "signature" || e.type === "initials")) && !e.value;
|
|
13
|
+
function O(e, t, n) {
|
|
14
14
|
let r = (n % 360 + 360) % 360, i = e.x, a = e.y + e.height, o, s;
|
|
15
15
|
return r === 90 ? (o = a, s = i) : r === 180 ? (o = t.width - i, s = a) : r === 270 ? (o = t.width - a, s = t.height - i) : (o = i, s = t.height - a), {
|
|
16
16
|
x: t.x + o,
|
|
@@ -18,7 +18,7 @@ function k(e, t, n) {
|
|
|
18
18
|
rotate: r
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
async function
|
|
21
|
+
async function k(e, t, n, r) {
|
|
22
22
|
if (!e.value) return null;
|
|
23
23
|
if ((e.type === "signature" || e.type === "initials") && e.value.startsWith("data:image/png")) return A(e.value);
|
|
24
24
|
let i = document.createElement("canvas");
|
|
@@ -42,7 +42,7 @@ function A(e) {
|
|
|
42
42
|
for (let e = 0; e < n.length; e++) r[e] = n.charCodeAt(e);
|
|
43
43
|
return r;
|
|
44
44
|
}
|
|
45
|
-
async function
|
|
45
|
+
async function oe(e, t, n = {}) {
|
|
46
46
|
let { PDFDocument: r, degrees: i } = await import("pdf-lib"), a = await r.load(e), o = a.getPages(), s = n.font ?? "system-ui, sans-serif";
|
|
47
47
|
for (let e of t) {
|
|
48
48
|
let t = o[e.page - 1];
|
|
@@ -52,14 +52,14 @@ async function ae(e, t, n = {}) {
|
|
|
52
52
|
y: e.y * u,
|
|
53
53
|
width: e.width * l,
|
|
54
54
|
height: e.height * u
|
|
55
|
-
}, f = await
|
|
55
|
+
}, f = await k(e, d.width, d.height, s);
|
|
56
56
|
if (!f) continue;
|
|
57
57
|
let p = await a.embedPng(f), { width: m, height: h } = d, g = 0, _ = 0;
|
|
58
58
|
if (e.type === "signature" || e.type === "initials") {
|
|
59
59
|
let e = Math.min(d.width / p.width, d.height / p.height);
|
|
60
60
|
m = p.width * e, h = p.height * e, g = (d.width - m) / 2, _ = (d.height - h) / 2;
|
|
61
61
|
}
|
|
62
|
-
let v =
|
|
62
|
+
let v = O({
|
|
63
63
|
x: d.x + g,
|
|
64
64
|
y: d.y + _,
|
|
65
65
|
width: m,
|
|
@@ -81,10 +81,10 @@ async function ae(e, t, n = {}) {
|
|
|
81
81
|
return n.producer && a.setProducer(n.producer), a.setModificationDate(/* @__PURE__ */ new Date()), a.save();
|
|
82
82
|
}
|
|
83
83
|
// src/components/MPdfSigner.vue?vue&type=script&setup=true&lang.ts
|
|
84
|
-
var
|
|
84
|
+
var se = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-outline-variant bg-surface-container px-3 py-2" }, ce = {
|
|
85
85
|
class: "text-body-medium text-on-surface",
|
|
86
86
|
"aria-live": "polite"
|
|
87
|
-
},
|
|
87
|
+
}, le = { class: "mr-1 text-label-large text-on-surface-variant" }, ue = { class: "pointer-events-none absolute inset-0" }, de = [
|
|
88
88
|
"id",
|
|
89
89
|
"data-field",
|
|
90
90
|
"data-type",
|
|
@@ -93,13 +93,13 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
|
|
|
93
93
|
"onClick",
|
|
94
94
|
"onPointerdown",
|
|
95
95
|
"onKeydown"
|
|
96
|
-
],
|
|
96
|
+
], fe = ["src"], pe = {
|
|
97
97
|
key: 3,
|
|
98
98
|
class: "flex min-w-0 items-center gap-1 truncate px-1 text-label-medium"
|
|
99
|
-
},
|
|
99
|
+
}, me = { class: "truncate" }, he = ["onPointerdown"], ge = {
|
|
100
100
|
key: 0,
|
|
101
101
|
class: "flex flex-col gap-4"
|
|
102
|
-
}, j = "\"Segoe Script\", \"Brush Script MT\", \"Snell Roundhand\", \"URW Chancery L\", cursive", M = /* @__PURE__ */
|
|
102
|
+
}, j = "\"Segoe Script\", \"Brush Script MT\", \"Snell Roundhand\", \"URW Chancery L\", cursive", M = /* @__PURE__ */ v({
|
|
103
103
|
inheritAttrs: !1,
|
|
104
104
|
__name: "MPdfSigner",
|
|
105
105
|
props: {
|
|
@@ -125,8 +125,8 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
|
|
|
125
125
|
"finish",
|
|
126
126
|
"loaded"
|
|
127
127
|
],
|
|
128
|
-
setup(
|
|
129
|
-
let A =
|
|
128
|
+
setup(v, { expose: O, emit: k }) {
|
|
129
|
+
let A = v, M = k, N = c(), _e = re(), P = x(), F = {
|
|
130
130
|
signature: {
|
|
131
131
|
icon: "signature",
|
|
132
132
|
key: "pdfSignSignature",
|
|
@@ -163,15 +163,18 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
|
|
|
163
163
|
w: .03,
|
|
164
164
|
h: .022
|
|
165
165
|
}
|
|
166
|
-
}, I = (e) => N[F[e].key], L = (e) => !A.signer || !e.signer || e.signer === A.signer,
|
|
166
|
+
}, I = (e) => N[F[e].key], L = (e) => !A.signer || !e.signer || e.signer === A.signer, ve = d(() => {
|
|
167
167
|
let e = /* @__PURE__ */ new Map();
|
|
168
168
|
for (let t of A.fields) e.set(t.page, [...e.get(t.page) ?? [], t]);
|
|
169
169
|
return e;
|
|
170
|
-
}), R =
|
|
171
|
-
|
|
170
|
+
}), R = d(() => A.fields.filter((e) => L(e) && (e.required ?? (e.type === "signature" || e.type === "initials")))), z = d(() => R.value.filter((e) => !D(e)).length), B = d(() => z.value === R.value.length);
|
|
171
|
+
ie(B, (e, t) => {
|
|
172
172
|
e && !t && A.mode === "sign" && M("complete");
|
|
173
173
|
});
|
|
174
|
-
let
|
|
174
|
+
let ye = d(() => l(N.pdfSignProgress, {
|
|
175
|
+
done: String(z.value),
|
|
176
|
+
total: String(R.value.length)
|
|
177
|
+
}, N.lang));
|
|
175
178
|
function V(e, t) {
|
|
176
179
|
M("update:fields", A.fields.map((n) => n.id === e ? {
|
|
177
180
|
...n,
|
|
@@ -179,47 +182,47 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
|
|
|
179
182
|
} : n));
|
|
180
183
|
}
|
|
181
184
|
let H = x({}), U = x(null), W = x(), G = x(!0), K = x(), q = x(400);
|
|
182
|
-
|
|
185
|
+
ie(() => U.value?.tab, () => te(() => {
|
|
183
186
|
K.value?.clientWidth && (q.value = K.value.clientWidth - 2);
|
|
184
187
|
}));
|
|
185
|
-
function
|
|
188
|
+
function be() {
|
|
186
189
|
return new Intl.DateTimeFormat(void 0, A.dateFormat).format(/* @__PURE__ */ new Date());
|
|
187
190
|
}
|
|
188
|
-
function
|
|
191
|
+
function xe(e, t = !1) {
|
|
189
192
|
if (A.mode !== "sign" || !L(e)) return;
|
|
190
193
|
if (e.type === "checkbox") return V(e.id, { value: e.value === "true" ? void 0 : "true" });
|
|
191
|
-
if (e.type === "date" && !e.value) return V(e.id, { value:
|
|
194
|
+
if (e.type === "date" && !e.value) return V(e.id, { value: be() });
|
|
192
195
|
if (e.type === "name" && !e.value && A.signerName) return V(e.id, { value: A.signerName });
|
|
193
196
|
if ((e.type === "signature" || e.type === "initials") && !t) {
|
|
194
197
|
let t = H.value[e.type];
|
|
195
198
|
if (t && !e.value) return V(e.id, { value: t });
|
|
196
199
|
}
|
|
197
|
-
let n = e.type === "initials" ?
|
|
200
|
+
let n = e.type === "initials" ? Se(A.signerName ?? "") : A.signerName ?? "";
|
|
198
201
|
U.value = {
|
|
199
202
|
field: e,
|
|
200
203
|
tab: e.type === "signature" || e.type === "initials" ? "draw" : "type",
|
|
201
204
|
text: e.type === "signature" || e.type === "initials" ? n : e.value ?? (e.type === "name" ? n : "")
|
|
202
205
|
}, G.value = !0;
|
|
203
206
|
}
|
|
204
|
-
let
|
|
205
|
-
function
|
|
207
|
+
let Se = (e) => e.split(/\s+/).filter(Boolean).map((e) => e[0].toUpperCase()).join("");
|
|
208
|
+
function Ce(e) {
|
|
206
209
|
let t = document.createElement("canvas"), n = t.getContext("2d");
|
|
207
210
|
return n ? (n.font = `96px ${j}`, t.width = Math.ceil(n.measureText(e).width) + 40, t.height = 96 * 1.6, n.font = `96px ${j}`, n.fillStyle = "#1a237e", n.textBaseline = "middle", n.fillText(e, 20, t.height / 2), t.toDataURL("image/png")) : "";
|
|
208
211
|
}
|
|
209
|
-
let
|
|
212
|
+
let J = d(() => U.value?.field.type === "signature" || U.value?.field.type === "initials"), we = d(() => {
|
|
210
213
|
let e = U.value;
|
|
211
|
-
return e ?
|
|
214
|
+
return e ? J.value && e.tab === "draw" ? !G.value : e.text.trim() !== "" : !1;
|
|
212
215
|
});
|
|
213
|
-
async function
|
|
216
|
+
async function Te() {
|
|
214
217
|
let e = U.value;
|
|
215
|
-
if (!e || !
|
|
218
|
+
if (!e || !we.value) return;
|
|
216
219
|
let t;
|
|
217
|
-
|
|
220
|
+
J.value ? (t = e.tab === "draw" ? await Ee(W.value?.toDataURL() ?? "") : Ce(e.text.trim()), H.value = {
|
|
218
221
|
...H.value,
|
|
219
222
|
[e.field.type]: t
|
|
220
223
|
}) : t = e.text.trim(), V(e.field.id, { value: t }), U.value = null;
|
|
221
224
|
}
|
|
222
|
-
async function
|
|
225
|
+
async function Ee(e) {
|
|
223
226
|
if (!e || typeof document > "u") return e;
|
|
224
227
|
let t = new Image();
|
|
225
228
|
t.src = e;
|
|
@@ -241,18 +244,18 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
|
|
|
241
244
|
let d = document.createElement("canvas");
|
|
242
245
|
return d.width = l - s + 1, d.height = u - c + 1, d.getContext("2d")?.drawImage(n, s, c, d.width, d.height, 0, 0, d.width, d.height), d.toDataURL("image/png");
|
|
243
246
|
}
|
|
244
|
-
function
|
|
245
|
-
let e = R.value, t = e.find((e) =>
|
|
247
|
+
function De() {
|
|
248
|
+
let e = R.value, t = e.find((e) => D(e)) ?? e[0];
|
|
246
249
|
if (!t) return;
|
|
247
|
-
let n = document.getElementById(
|
|
250
|
+
let n = document.getElementById(Y(t));
|
|
248
251
|
n?.scrollIntoView({
|
|
249
252
|
behavior: "smooth",
|
|
250
253
|
block: "center"
|
|
251
254
|
}), n?.focus({ preventScroll: !0 });
|
|
252
255
|
}
|
|
253
|
-
let
|
|
254
|
-
function
|
|
255
|
-
let t = F[e], n = $.value, r = `${e}-${Date.now().toString(36)}-${++
|
|
256
|
+
let Y = (e) => `${_e}-f-${e.id}`, X = x(null), Oe = 0;
|
|
257
|
+
function ke(e) {
|
|
258
|
+
let t = F[e], n = $.value, r = `${e}-${Date.now().toString(36)}-${++Oe}`, i = {
|
|
256
259
|
id: r,
|
|
257
260
|
type: e,
|
|
258
261
|
page: n,
|
|
@@ -264,11 +267,11 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
|
|
|
264
267
|
};
|
|
265
268
|
(e === "signature" || e === "initials") && (i.required = !0), M("update:fields", [...A.fields, i]), X.value = r;
|
|
266
269
|
}
|
|
267
|
-
function
|
|
270
|
+
function Ae(e) {
|
|
268
271
|
M("update:fields", A.fields.filter((t) => t.id !== e)), X.value === e && (X.value = null);
|
|
269
272
|
}
|
|
270
273
|
let Z = null;
|
|
271
|
-
function
|
|
274
|
+
function je(e, t, n, r) {
|
|
272
275
|
A.mode === "prepare" && e.button === 0 && (e.preventDefault(), e.stopPropagation(), X.value = t.id, Z = {
|
|
273
276
|
id: t.id,
|
|
274
277
|
kind: n,
|
|
@@ -279,7 +282,7 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
|
|
|
279
282
|
h: r.height
|
|
280
283
|
}, e.currentTarget.setPointerCapture?.(e.pointerId));
|
|
281
284
|
}
|
|
282
|
-
function
|
|
285
|
+
function Me(e) {
|
|
283
286
|
if (!Z) return;
|
|
284
287
|
let t = (e.clientX - Z.x) / Z.w, n = (e.clientY - Z.y) / Z.h, r = Z.start;
|
|
285
288
|
Z.kind === "move" ? V(Z.id, {
|
|
@@ -290,13 +293,13 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
|
|
|
290
293
|
height: Q(r.height + n, .015, 1 - r.y)
|
|
291
294
|
});
|
|
292
295
|
}
|
|
293
|
-
function
|
|
296
|
+
function Ne() {
|
|
294
297
|
Z = null;
|
|
295
298
|
}
|
|
296
299
|
let Q = (e, t, n) => Math.min(Math.max(e, t), n);
|
|
297
|
-
function
|
|
300
|
+
function Pe(e, t) {
|
|
298
301
|
if (A.mode === "sign") {
|
|
299
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
302
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), xe(t));
|
|
300
303
|
return;
|
|
301
304
|
}
|
|
302
305
|
let n = e.shiftKey ? .02 : .005, r = {
|
|
@@ -312,10 +315,10 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
|
|
|
312
315
|
x: Q(t.x + n, 0, 1 - t.width),
|
|
313
316
|
y: Q(t.y + i, 0, 1 - t.height)
|
|
314
317
|
});
|
|
315
|
-
} else (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(),
|
|
318
|
+
} else (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), Ae(t.id));
|
|
316
319
|
}
|
|
317
320
|
let $ = x(1);
|
|
318
|
-
function
|
|
321
|
+
function Fe(e) {
|
|
319
322
|
let t = e.rotation, n = t % 180 != 0, r = n ? e.height : e.width, i = n ? e.width : e.height, a = t === 90 ? "rotate(90deg) translateY(-100%)" : t === 180 ? "rotate(180deg) translate(-100%, -100%)" : t === 270 ? "rotate(270deg) translateX(-100%)" : void 0;
|
|
320
323
|
return {
|
|
321
324
|
width: `${r}px`,
|
|
@@ -324,172 +327,172 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
|
|
|
324
327
|
transformOrigin: "top left"
|
|
325
328
|
};
|
|
326
329
|
}
|
|
327
|
-
let
|
|
330
|
+
let Ie = (e) => ({
|
|
328
331
|
left: `${e.x * 100}%`,
|
|
329
332
|
top: `${e.y * 100}%`,
|
|
330
333
|
width: `${e.width * 100}%`,
|
|
331
334
|
height: `${e.height * 100}%`
|
|
332
335
|
});
|
|
333
|
-
async function
|
|
336
|
+
async function Le(e) {
|
|
334
337
|
if (e instanceof Uint8Array || e instanceof ArrayBuffer) return e;
|
|
335
338
|
if (typeof Blob < "u" && e instanceof Blob) return e.arrayBuffer();
|
|
336
339
|
let t = await fetch(String(e));
|
|
337
340
|
if (!t.ok) throw Error(`PDF ${t.status}`);
|
|
338
341
|
return t.arrayBuffer();
|
|
339
342
|
}
|
|
340
|
-
async function
|
|
343
|
+
async function Re(e) {
|
|
341
344
|
if (!A.src) throw Error("No PDF");
|
|
342
|
-
return
|
|
345
|
+
return oe(await Le(A.src), A.fields, e);
|
|
343
346
|
}
|
|
344
|
-
return
|
|
345
|
-
save:
|
|
346
|
-
next:
|
|
347
|
+
return O({
|
|
348
|
+
save: Re,
|
|
349
|
+
next: De,
|
|
347
350
|
complete: B,
|
|
348
351
|
viewer: P
|
|
349
|
-
}), (c,
|
|
350
|
-
|
|
351
|
-
|
|
352
|
+
}), (c, l) => (b(), m("div", ee({ class: "m3-pdf-signer" }, c.$attrs), [
|
|
353
|
+
h("div", se, [v.mode === "sign" ? (b(), m(u, { key: 0 }, [
|
|
354
|
+
_(i, {
|
|
352
355
|
name: B.value ? "task_alt" : "edit_document",
|
|
353
356
|
size: 20,
|
|
354
|
-
class:
|
|
357
|
+
class: ne(B.value ? "text-primary" : "text-on-surface-variant")
|
|
355
358
|
}, null, 8, ["name", "class"]),
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
B.value ?
|
|
359
|
+
h("span", ce, C(B.value ? w(N).pdfSignComplete : ye.value), 1),
|
|
360
|
+
l[12] ||= h("span", { class: "flex-1" }, null, -1),
|
|
361
|
+
B.value ? p("", !0) : (b(), f(r, {
|
|
359
362
|
key: 0,
|
|
360
363
|
variant: "tonal",
|
|
361
364
|
icon: "arrow_downward",
|
|
362
|
-
onClick:
|
|
365
|
+
onClick: De
|
|
363
366
|
}, {
|
|
364
|
-
default:
|
|
367
|
+
default: T(() => [g(C(w(N).pdfSignNext), 1)]),
|
|
365
368
|
_: 1
|
|
366
369
|
})),
|
|
367
|
-
|
|
370
|
+
_(r, {
|
|
368
371
|
disabled: !B.value,
|
|
369
372
|
icon: "check",
|
|
370
|
-
onClick:
|
|
373
|
+
onClick: l[0] ||= (e) => M("finish")
|
|
371
374
|
}, {
|
|
372
|
-
default:
|
|
375
|
+
default: T(() => [g(C(w(N).pdfSignFinish), 1)]),
|
|
373
376
|
_: 1
|
|
374
377
|
}, 8, ["disabled"])
|
|
375
|
-
], 64)) : (b(),
|
|
378
|
+
], 64)) : (b(), m(u, { key: 1 }, [h("span", le, C(w(N).pdfSignAddField), 1), (b(!0), m(u, null, S(v.types, (e) => (b(), f(r, {
|
|
376
379
|
key: e,
|
|
377
380
|
variant: "tonal",
|
|
378
381
|
size: "sm",
|
|
379
382
|
icon: F[e].icon,
|
|
380
383
|
"data-add": e,
|
|
381
|
-
onClick: (t) =>
|
|
384
|
+
onClick: (t) => ke(e)
|
|
382
385
|
}, {
|
|
383
|
-
default:
|
|
386
|
+
default: T(() => [g(C(I(e)), 1)]),
|
|
384
387
|
_: 2
|
|
385
388
|
}, 1032, [
|
|
386
389
|
"icon",
|
|
387
390
|
"data-add",
|
|
388
391
|
"onClick"
|
|
389
392
|
]))), 128))], 64))]),
|
|
390
|
-
|
|
393
|
+
_(e, {
|
|
391
394
|
ref_key: "viewer",
|
|
392
395
|
ref: P,
|
|
393
|
-
src:
|
|
394
|
-
"worker-src":
|
|
396
|
+
src: v.src,
|
|
397
|
+
"worker-src": v.workerSrc,
|
|
395
398
|
class: "min-h-0 flex-1",
|
|
396
|
-
"onUpdate:page":
|
|
397
|
-
onLoaded:
|
|
399
|
+
"onUpdate:page": l[2] ||= (e) => $.value = e,
|
|
400
|
+
onLoaded: l[3] ||= (e) => M("loaded", e)
|
|
398
401
|
}, {
|
|
399
|
-
page:
|
|
402
|
+
page: T((e) => [h("div", ue, [h("div", {
|
|
400
403
|
class: "absolute left-0 top-0",
|
|
401
|
-
style: y(
|
|
402
|
-
}, [(b(!0),
|
|
403
|
-
id:
|
|
404
|
+
style: y(Fe(e))
|
|
405
|
+
}, [(b(!0), m(u, null, S(ve.value.get(e.page) ?? [], (t) => (b(), m("div", {
|
|
406
|
+
id: Y(t),
|
|
404
407
|
key: t.id,
|
|
405
|
-
class:
|
|
406
|
-
|
|
408
|
+
class: ne(["m3-pdf-sign-field pointer-events-auto absolute flex items-center justify-center rounded-xs outline-none focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary", [
|
|
409
|
+
v.mode === "prepare" ? "cursor-move" : L(t) ? "cursor-pointer" : "cursor-default opacity-40",
|
|
407
410
|
t.value ? "m3-pdf-sign-filled" : "m3-pdf-sign-empty",
|
|
408
|
-
|
|
409
|
-
X.value === t.id &&
|
|
411
|
+
v.mode === "sign" && L(t) && w(D)(t) ? "m3-pdf-sign-todo" : "",
|
|
412
|
+
X.value === t.id && v.mode === "prepare" ? "m3-pdf-sign-selected" : ""
|
|
410
413
|
]]),
|
|
411
|
-
style: y(
|
|
414
|
+
style: y(Ie(t)),
|
|
412
415
|
"data-field": t.id,
|
|
413
416
|
"data-type": t.type,
|
|
414
417
|
role: "button",
|
|
415
|
-
tabindex:
|
|
418
|
+
tabindex: v.mode === "prepare" || L(t) ? 0 : -1,
|
|
416
419
|
"aria-label": `${t.label ?? I(t.type)}${t.value ? "" : t.required ?? (t.type === "signature" || t.type === "initials") ? ` (${w(N).pdfSignRequired})` : ""}`,
|
|
417
|
-
onClick: (e) =>
|
|
418
|
-
onPointerdown: (n) =>
|
|
420
|
+
onClick: (e) => v.mode === "sign" ? xe(t, !!t.value) : X.value = t.id,
|
|
421
|
+
onPointerdown: (n) => je(n, t, "move", {
|
|
419
422
|
width: e.rotation % 180 ? e.height : e.width,
|
|
420
423
|
height: e.rotation % 180 ? e.width : e.height
|
|
421
424
|
}),
|
|
422
|
-
onPointermove:
|
|
423
|
-
onPointerup:
|
|
424
|
-
onPointercancel:
|
|
425
|
-
onKeydown: (e) =>
|
|
426
|
-
}, [t.value && (t.type === "signature" || t.type === "initials") ? (b(),
|
|
425
|
+
onPointermove: Me,
|
|
426
|
+
onPointerup: Ne,
|
|
427
|
+
onPointercancel: Ne,
|
|
428
|
+
onKeydown: (e) => Pe(e, t)
|
|
429
|
+
}, [t.value && (t.type === "signature" || t.type === "initials") ? (b(), m("img", {
|
|
427
430
|
key: 0,
|
|
428
431
|
src: t.value,
|
|
429
432
|
alt: "",
|
|
430
433
|
class: "h-full w-full object-contain",
|
|
431
434
|
draggable: "false"
|
|
432
|
-
}, null, 8,
|
|
435
|
+
}, null, 8, fe)) : t.type === "checkbox" && t.value === "true" ? (b(), f(i, {
|
|
433
436
|
key: 1,
|
|
434
437
|
name: "check",
|
|
435
438
|
class: "text-on-surface",
|
|
436
439
|
size: Math.max(12, e.height * t.height * .9)
|
|
437
|
-
}, null, 8, ["size"])) : t.value ? (b(),
|
|
440
|
+
}, null, 8, ["size"])) : t.value ? (b(), m("span", {
|
|
438
441
|
key: 2,
|
|
439
442
|
class: "m3-pdf-sign-text w-full truncate px-1 text-left",
|
|
440
443
|
style: y({ fontSize: `${Math.max(8, e.height * t.height * .6)}px` })
|
|
441
|
-
}, C(t.value), 5)) : t.type === "checkbox" ?
|
|
444
|
+
}, C(t.value), 5)) : t.type === "checkbox" ? p("", !0) : (b(), m("span", pe, [_(i, {
|
|
442
445
|
name: F[t.type].icon,
|
|
443
446
|
size: 16
|
|
444
|
-
}, null, 8, ["name"]),
|
|
447
|
+
}, null, 8, ["name"]), h("span", me, C(t.type === "signature" && v.mode === "sign" ? w(N).pdfSignHere : t.label ?? I(t.type)), 1)])), v.mode === "prepare" && X.value === t.id ? (b(), m(u, { key: 4 }, [h("span", {
|
|
445
448
|
class: "absolute -right-1.5 -bottom-1.5 h-3 w-3 cursor-nwse-resize rounded-full border-2 border-surface bg-primary touch-none",
|
|
446
449
|
"aria-hidden": "true",
|
|
447
|
-
onPointerdown: (n) =>
|
|
450
|
+
onPointerdown: (n) => je(n, t, "resize", {
|
|
448
451
|
width: e.rotation % 180 ? e.height : e.width,
|
|
449
452
|
height: e.rotation % 180 ? e.width : e.height
|
|
450
453
|
})
|
|
451
|
-
}, null, 40,
|
|
454
|
+
}, null, 40, he), h("div", {
|
|
452
455
|
class: "absolute -top-11 left-0 flex items-center gap-1 rounded-full bg-surface-container-high px-1 shadow-elevation-2",
|
|
453
|
-
onPointerdown:
|
|
454
|
-
}, [
|
|
456
|
+
onPointerdown: l[1] ||= E(() => {}, ["stop"])
|
|
457
|
+
}, [_(r, {
|
|
455
458
|
variant: t.required ?? (t.type === "signature" || t.type === "initials") ? "filled" : "text",
|
|
456
459
|
size: "xs",
|
|
457
|
-
onClick:
|
|
460
|
+
onClick: E((e) => V(t.id, { required: !(t.required ?? (t.type === "signature" || t.type === "initials")) }), ["stop"])
|
|
458
461
|
}, {
|
|
459
|
-
default:
|
|
462
|
+
default: T(() => [g(C(w(N).pdfSignRequired), 1)]),
|
|
460
463
|
_: 1
|
|
461
|
-
}, 8, ["variant", "onClick"]),
|
|
464
|
+
}, 8, ["variant", "onClick"]), _(a, {
|
|
462
465
|
icon: "delete",
|
|
463
466
|
size: "xs",
|
|
464
467
|
label: w(N).pdfSignDelete,
|
|
465
|
-
onClick:
|
|
466
|
-
}, null, 8, ["label", "onClick"])], 32)], 64)) :
|
|
468
|
+
onClick: E((e) => Ae(t.id), ["stop"])
|
|
469
|
+
}, null, 8, ["label", "onClick"])], 32)], 64)) : p("", !0)], 46, de))), 128))], 4)])]),
|
|
467
470
|
_: 1
|
|
468
471
|
}, 8, ["src", "worker-src"]),
|
|
469
|
-
|
|
472
|
+
_(n, {
|
|
470
473
|
"model-value": !!U.value,
|
|
471
474
|
title: U.value ? U.value.field.label ?? I(U.value.field.type) : "",
|
|
472
475
|
"max-width": "560px",
|
|
473
|
-
"onUpdate:modelValue":
|
|
476
|
+
"onUpdate:modelValue": l[11] ||= (e) => {
|
|
474
477
|
e || (U.value = null);
|
|
475
478
|
}
|
|
476
479
|
}, {
|
|
477
|
-
actions:
|
|
480
|
+
actions: T(() => [_(r, {
|
|
478
481
|
variant: "text",
|
|
479
|
-
onClick:
|
|
482
|
+
onClick: l[10] ||= (e) => U.value = null
|
|
480
483
|
}, {
|
|
481
|
-
default:
|
|
484
|
+
default: T(() => [g(C(w(N).cancel), 1)]),
|
|
482
485
|
_: 1
|
|
483
|
-
}),
|
|
484
|
-
disabled: !
|
|
485
|
-
onClick:
|
|
486
|
+
}), _(r, {
|
|
487
|
+
disabled: !we.value,
|
|
488
|
+
onClick: Te
|
|
486
489
|
}, {
|
|
487
|
-
default:
|
|
490
|
+
default: T(() => [g(C(J.value ? w(N).pdfSignAdopt : w(N).ok), 1)]),
|
|
488
491
|
_: 1
|
|
489
492
|
}, 8, ["disabled"])]),
|
|
490
|
-
default:
|
|
493
|
+
default: T(() => [U.value ? (b(), m("div", ge, [J.value ? (b(), m(u, { key: 0 }, [_(o, {
|
|
491
494
|
modelValue: U.value.tab,
|
|
492
|
-
"onUpdate:modelValue":
|
|
495
|
+
"onUpdate:modelValue": l[4] ||= (e) => U.value.tab = e,
|
|
493
496
|
options: [{
|
|
494
497
|
value: "draw",
|
|
495
498
|
label: w(N).pdfSignDraw,
|
|
@@ -500,49 +503,49 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
|
|
|
500
503
|
icon: "keyboard"
|
|
501
504
|
}],
|
|
502
505
|
density: "compact"
|
|
503
|
-
}, null, 8, ["modelValue", "options"]), U.value.tab === "draw" ? (b(),
|
|
506
|
+
}, null, 8, ["modelValue", "options"]), U.value.tab === "draw" ? (b(), m("div", {
|
|
504
507
|
key: 0,
|
|
505
508
|
ref_key: "padBox",
|
|
506
509
|
ref: K,
|
|
507
510
|
class: "flex flex-col gap-2"
|
|
508
|
-
}, [(b(),
|
|
511
|
+
}, [(b(), f(t, {
|
|
509
512
|
ref_key: "pad",
|
|
510
513
|
ref: W,
|
|
511
514
|
key: q.value,
|
|
512
515
|
width: q.value,
|
|
513
516
|
height: 180,
|
|
514
|
-
onEnd:
|
|
515
|
-
onChange:
|
|
516
|
-
}, null, 8, ["width"])),
|
|
517
|
+
onEnd: l[5] ||= (e) => G.value = !1,
|
|
518
|
+
onChange: l[6] ||= (e) => G.value = !!W.value?.isEmpty()
|
|
519
|
+
}, null, 8, ["width"])), _(r, {
|
|
517
520
|
variant: "text",
|
|
518
521
|
icon: "ink_eraser",
|
|
519
522
|
class: "self-start",
|
|
520
|
-
onClick:
|
|
523
|
+
onClick: l[7] ||= (e) => {
|
|
521
524
|
W.value?.clear(), G.value = !0;
|
|
522
525
|
}
|
|
523
526
|
}, {
|
|
524
|
-
default:
|
|
527
|
+
default: T(() => [g(C(w(N).clear), 1)]),
|
|
525
528
|
_: 1
|
|
526
|
-
})], 512)) : (b(),
|
|
529
|
+
})], 512)) : (b(), m(u, { key: 1 }, [_(s, {
|
|
527
530
|
modelValue: U.value.text,
|
|
528
|
-
"onUpdate:modelValue":
|
|
531
|
+
"onUpdate:modelValue": l[8] ||= (e) => U.value.text = e,
|
|
529
532
|
label: I(U.value.field.type),
|
|
530
533
|
autocomplete: "name"
|
|
531
|
-
}, null, 8, ["modelValue", "label"]),
|
|
534
|
+
}, null, 8, ["modelValue", "label"]), h("div", {
|
|
532
535
|
class: "flex h-24 items-center overflow-hidden rounded-lg bg-surface-container-highest px-4 text-[2.5rem] text-[#1a237e] dark:text-[#c5cae9]",
|
|
533
536
|
style: y({ fontFamily: j })
|
|
534
|
-
}, C(U.value.text), 5)], 64))], 64)) : (b(),
|
|
537
|
+
}, C(U.value.text), 5)], 64))], 64)) : (b(), f(s, {
|
|
535
538
|
key: 1,
|
|
536
539
|
modelValue: U.value.text,
|
|
537
|
-
"onUpdate:modelValue":
|
|
540
|
+
"onUpdate:modelValue": l[9] ||= (e) => U.value.text = e,
|
|
538
541
|
label: U.value.field.label ?? I(U.value.field.type),
|
|
539
|
-
onKeydown:
|
|
540
|
-
}, null, 8, ["modelValue", "label"]))])) :
|
|
542
|
+
onKeydown: ae(Te, ["enter"])
|
|
543
|
+
}, null, 8, ["modelValue", "label"]))])) : p("", !0)]),
|
|
541
544
|
_: 1
|
|
542
545
|
}, 8, ["model-value", "title"])
|
|
543
546
|
], 16));
|
|
544
547
|
}
|
|
545
548
|
});
|
|
546
|
-
export { M as MPdfSigner,
|
|
549
|
+
export { M as MPdfSigner, D as fieldMissing, O as shownToUser, oe as signPdf };
|
|
547
550
|
|
|
548
551
|
//# sourceMappingURL=pdf-sign.js.map
|