@veztraa/report-designer 0.4.1 → 0.4.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.
- package/dist/index.js +341 -341
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('@import"https://cdn.jsdelivr.net/npm/@fontsource/inter/300.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/inter/400.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/inter/500.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/inter/600.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/inter/700.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/roboto/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/open-sans/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/lato/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/montserrat/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/poppins/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/nunito/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/raleway/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/ubuntu/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/playfair-display/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/merriweather/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/source-code-pro/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/great-vibes/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/dancing-script/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/pacifico/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/sacramento/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/noto-sans/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/noto-sans-sc/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/noto-sans-jp/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/noto-sans-kr/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/noto-sans-arabic/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/noto-sans-hebrew/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/noto-sans-devanagari/index.css";@import"https://cdn.jsdelivr.net/npm/@fontsource/noto-sans-thai/index.css";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.z-10{z-index:10}.z-50{z-index:50}.mb-2{margin-bottom:.5rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mt-1{margin-top:.25rem}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.min-h-0{min-height:0px}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize-none{resize:none}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.gap-0\\.5{gap:.125rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-amber-800\\/60{border-color:#92400e99}.border-amber-900\\/50{border-color:#78350f80}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.bg-amber-900\\/60{background-color:#78350f99}.bg-amber-950\\/40{background-color:#451a0366}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-blue-900{--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity, 1))}.bg-green-900{--tw-bg-opacity: 1;background-color:rgb(20 83 45 / var(--tw-bg-opacity, 1))}.bg-orange-900{--tw-bg-opacity: 1;background-color:rgb(124 45 18 / var(--tw-bg-opacity, 1))}.bg-purple-900{--tw-bg-opacity: 1;background-color:rgb(88 28 135 / var(--tw-bg-opacity, 1))}.bg-yellow-900{--tw-bg-opacity: 1;background-color:rgb(113 63 18 / var(--tw-bg-opacity, 1))}.p-0\\.5{padding:.125rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.tracking-wider{letter-spacing:.05em}.text-amber-200{--tw-text-opacity: 1;color:rgb(253 230 138 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-green-300{--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-orange-300{--tw-text-opacity: 1;color:rgb(253 186 116 / var(--tw-text-opacity, 1))}.text-purple-300{--tw-text-opacity: 1;color:rgb(216 180 254 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}:root{--bg: #eeeef4;--panel: #ffffff;--card: #f4f4f9;--input: #eaeaf2;--hover: #e2e2ec;--active: #d8d8e8;--border: rgba(0,0,0,.1);--border-h: rgba(0,0,0,.18);--border-s: rgba(0,0,0,.28);--text-1: #111118;--text-2: #3c3c52;--text-3: #6c6c84;--accent: #6c63ff;--accent-h: #7b73ff;--accent-dim: rgba(108,99,255,.1);--accent-ring: rgba(108,99,255,.22);--danger: #dc2626;--success: #16a34a;--warn: #d97706}[data-theme=dark]{--bg: #0c0c10;--panel: #111115;--card: #17171c;--input: #1e1e25;--hover: #242430;--active: #2c2c3a;--border: rgba(255,255,255,.07);--border-h: rgba(255,255,255,.13);--border-s: rgba(255,255,255,.2);--text-1: #e4e4ef;--text-2: #8080a0;--text-3: #404055;--accent: #7c6af7;--accent-h: #9585f9;--accent-dim: rgba(124,106,247,.14);--accent-ring: rgba(124,106,247,.4);--danger: #f87171;--success: #4ade80;--warn: #fbbf24}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--bg);color:var(--text-1);height:100vh;overflow:hidden;font-size:13px;line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#root{height:100vh;display:flex;flex-direction:column}::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border-h);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--border-s)}input:focus-visible,textarea:focus-visible,select:focus-visible,button:focus-visible{outline:1.5px solid var(--accent);outline-offset:1px}.resize-handle{position:absolute;width:8px;height:8px;background:var(--accent);border:1.5px solid rgba(255,255,255,.85);border-radius:2.5px;z-index:10;transition:transform .12s ease}.resize-handle:hover{transform:scale(1.4)}.canvas-grid{background-image:radial-gradient(circle,rgba(0,0,0,.09) 1px,transparent 1px);background-size:20px 20px}[data-theme=dark] .canvas-grid{background-image:radial-gradient(circle,rgba(255,255,255,.07) 1px,transparent 1px)}.font-mono{font-family:JetBrains Mono,Fira Code,Cascadia Code,ui-monospace,monospace}.section-label{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;position:absolute;top:4px;left:8px;pointer-events:none;opacity:.75}.hover\\:bg-amber-700\\/70:hover{background-color:#b45309b3}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-800\\/50:hover{background-color:#1f293780}.hover\\:text-gray-200:hover{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.hover\\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.focus\\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
2
|
import { jsxs as m, jsx as e, Fragment as X } from "react/jsx-runtime";
|
|
3
|
-
import { useState as Z, useEffect as an, useRef as
|
|
3
|
+
import { useState as Z, useEffect as an, useRef as $, useMemo as Ae, useCallback as lo, useLayoutEffect as uo } from "react";
|
|
4
4
|
import { create as hi } from "zustand";
|
|
5
5
|
import { SUPPORTED_FONTS as dr } from "@veztraa/report-core";
|
|
6
6
|
import { createPortal as fr } from "react-dom";
|
|
@@ -1045,7 +1045,7 @@ function Ui(n, r = "") {
|
|
|
1045
1045
|
return i;
|
|
1046
1046
|
}
|
|
1047
1047
|
function Lo({ previewDataJson: n, onSelect: r }) {
|
|
1048
|
-
const [i, a] = Z(!1), [o, u] = Z(""), A =
|
|
1048
|
+
const [i, a] = Z(!1), [o, u] = Z(""), A = $(null), f = Ae(() => {
|
|
1049
1049
|
try {
|
|
1050
1050
|
return Ui(JSON.parse(n));
|
|
1051
1051
|
} catch {
|
|
@@ -1173,7 +1173,7 @@ function Br(n, r) {
|
|
|
1173
1173
|
return n.replace(/dddd/g, o[t]).replace(/ddd/g, u[t]).replace(/MMMM/g, i[f]).replace(/MMM/g, a[f]).replace(/MM/g, c(f + 1)).replace(/M/g, String(f + 1)).replace(/YYYY/g, String(d)).replace(/YY/g, String(d).slice(-2)).replace(/Do/g, s(A)).replace(/DD/g, c(A)).replace(/D/g, String(A));
|
|
1174
1174
|
}
|
|
1175
1175
|
function Go({ value: n, onChange: r }) {
|
|
1176
|
-
const [i, a] = Z(!1), [o, u] = Z(""), A =
|
|
1176
|
+
const [i, a] = Z(!1), [o, u] = Z(""), A = $(null), f = Ae(() => /* @__PURE__ */ new Date(), []);
|
|
1177
1177
|
an(() => {
|
|
1178
1178
|
if (!i) return;
|
|
1179
1179
|
const c = (l) => {
|
|
@@ -1314,7 +1314,7 @@ function Wo(n) {
|
|
|
1314
1314
|
);
|
|
1315
1315
|
}
|
|
1316
1316
|
function Ho({ value: n, onChange: r, error: i }) {
|
|
1317
|
-
const a =
|
|
1317
|
+
const a = $(null), o = $(null), u = $(null), [A, f] = Z(!1), d = () => {
|
|
1318
1318
|
const p = a.current;
|
|
1319
1319
|
p && (o.current && (o.current.scrollTop = p.scrollTop, o.current.scrollLeft = p.scrollLeft), u.current && (u.current.scrollTop = p.scrollTop));
|
|
1320
1320
|
}, t = Ae(() => Wo(n), [n]), s = Ae(() => n.split(`
|
|
@@ -1566,7 +1566,7 @@ function Di({ field: n, depth: r = 0, onUpdate: i, onRemove: a }) {
|
|
|
1566
1566
|
] });
|
|
1567
1567
|
}
|
|
1568
1568
|
function qo() {
|
|
1569
|
-
const { previewData: n, setPreviewData: r, setFieldTypes: i } = en(), [a, o] = Z([]), [u, A] = Z(n), [f, d] = Z(""), [t, s] = Z(!1), c =
|
|
1569
|
+
const { previewData: n, setPreviewData: r, setFieldTypes: i } = en(), [a, o] = Z([]), [u, A] = Z(n), [f, d] = Z(""), [t, s] = Z(!1), c = $(null);
|
|
1570
1570
|
an(() => {
|
|
1571
1571
|
if (n !== c.current) {
|
|
1572
1572
|
c.current = n;
|
|
@@ -2031,13 +2031,13 @@ function _o({ margin: n, onUpdate: r }) {
|
|
|
2031
2031
|
] });
|
|
2032
2032
|
}
|
|
2033
2033
|
function $o() {
|
|
2034
|
-
var M,
|
|
2035
|
-
const { template: n, updatePage: r, updateMargin: i, updateHeaderHeight: a, updateFooterHeight: o, updateHeaderEnabled: u, updateFooterEnabled: A, updateHeaderDisplay: f, updateFooterDisplay: d } = en(), t = n.page ?? { size: "A4", orientation: "portrait", margin: { top: 20, right: 20, bottom: 20, left: 20 } }, s = t.margin ?? { top: 20, right: 20, bottom: 20, left: 20 }, c = ((M = n.header) == null ? void 0 : M.height) ?? 60, l = ((
|
|
2034
|
+
var M, R, D, H, z, q;
|
|
2035
|
+
const { template: n, updatePage: r, updateMargin: i, updateHeaderHeight: a, updateFooterHeight: o, updateHeaderEnabled: u, updateFooterEnabled: A, updateHeaderDisplay: f, updateFooterDisplay: d } = en(), t = n.page ?? { size: "A4", orientation: "portrait", margin: { top: 20, right: 20, bottom: 20, left: 20 } }, s = t.margin ?? { top: 20, right: 20, bottom: 20, left: 20 }, c = ((M = n.header) == null ? void 0 : M.height) ?? 60, l = ((R = n.footer) == null ? void 0 : R.height) ?? 40, h = ((D = n.header) == null ? void 0 : D.enabled) !== !1, p = ((H = n.footer) == null ? void 0 : H.enabled) !== !1, g = ((z = n.header) == null ? void 0 : z.display) ?? "always", b = ((q = n.footer) == null ? void 0 : q.display) ?? "always", y = t.watermark ?? {}, w = y.enabled ?? !1, k = y.type ?? "text", B = (N) => r({ watermark: { ...y, ...N } }), I = (N) => {
|
|
2036
2036
|
var Y;
|
|
2037
|
-
const
|
|
2038
|
-
if (N.target.value = "", !
|
|
2039
|
-
const
|
|
2040
|
-
|
|
2037
|
+
const G = (Y = N.target.files) == null ? void 0 : Y[0];
|
|
2038
|
+
if (N.target.value = "", !G || !(G.type === "image/png" || /\.png$/i.test(G.name))) return;
|
|
2039
|
+
const nn = new FileReader();
|
|
2040
|
+
nn.onload = () => B({ type: "logo", imageSrc: String(nn.result) }), nn.readAsDataURL(G);
|
|
2041
2041
|
}, v = t.size ?? "A4", E = t.orientation === "landscape", [P, C] = Xo[v] ?? [794, 1123], S = E ? C : P, x = E ? P : C, Q = t.customHeight ?? x;
|
|
2042
2042
|
return /* @__PURE__ */ m("div", { className: "flex-1 overflow-y-auto", style: { paddingBottom: 24 }, children: [
|
|
2043
2043
|
/* @__PURE__ */ e(ge, { children: "Page Format" }),
|
|
@@ -2092,11 +2092,11 @@ function $o() {
|
|
|
2092
2092
|
color: t.orientation === N ? "#fff" : "var(--text-2)",
|
|
2093
2093
|
transition: "color 0.18s"
|
|
2094
2094
|
},
|
|
2095
|
-
onMouseEnter: (
|
|
2096
|
-
t.orientation !== N && (
|
|
2095
|
+
onMouseEnter: (G) => {
|
|
2096
|
+
t.orientation !== N && (G.currentTarget.style.color = "var(--text-1)");
|
|
2097
2097
|
},
|
|
2098
|
-
onMouseLeave: (
|
|
2099
|
-
t.orientation !== N && (
|
|
2098
|
+
onMouseLeave: (G) => {
|
|
2099
|
+
t.orientation !== N && (G.currentTarget.style.color = "var(--text-2)");
|
|
2100
2100
|
},
|
|
2101
2101
|
children: N === "portrait" ? /* @__PURE__ */ m(X, { children: [
|
|
2102
2102
|
/* @__PURE__ */ m("svg", { width: "10", height: "13", viewBox: "0 0 10 13", fill: "currentColor", children: [
|
|
@@ -2280,11 +2280,11 @@ function $o() {
|
|
|
2280
2280
|
color: k === N ? "#fff" : "var(--text-2)",
|
|
2281
2281
|
transition: "color 0.18s"
|
|
2282
2282
|
},
|
|
2283
|
-
onMouseEnter: (
|
|
2284
|
-
k !== N && (
|
|
2283
|
+
onMouseEnter: (G) => {
|
|
2284
|
+
k !== N && (G.currentTarget.style.color = "var(--text-1)");
|
|
2285
2285
|
},
|
|
2286
|
-
onMouseLeave: (
|
|
2287
|
-
k !== N && (
|
|
2286
|
+
onMouseLeave: (G) => {
|
|
2287
|
+
k !== N && (G.currentTarget.style.color = "var(--text-2)");
|
|
2288
2288
|
},
|
|
2289
2289
|
children: N === "text" ? /* @__PURE__ */ m(X, { children: [
|
|
2290
2290
|
/* @__PURE__ */ m("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "currentColor", children: [
|
|
@@ -2640,7 +2640,7 @@ function es() {
|
|
|
2640
2640
|
] });
|
|
2641
2641
|
}
|
|
2642
2642
|
function ts({ section: n, elements: r, selectedId: i, onSelect: a, onToggleVisible: o, onToggleLock: u, onDelete: A, onReorder: f }) {
|
|
2643
|
-
const d =
|
|
2643
|
+
const d = $(null), [t, s] = Z(null), c = (g) => {
|
|
2644
2644
|
d.current = g;
|
|
2645
2645
|
}, l = (g, b) => {
|
|
2646
2646
|
g.preventDefault(), g.dataTransfer.dropEffect = "move";
|
|
@@ -2894,7 +2894,7 @@ function as() {
|
|
|
2894
2894
|
return `${n.getFullYear()}${r(n.getMonth() + 1)}${r(n.getDate())}${r(n.getHours())}${r(n.getMinutes())}`;
|
|
2895
2895
|
}
|
|
2896
2896
|
function is({ config: n, elements: r } = {}) {
|
|
2897
|
-
var M,
|
|
2897
|
+
var M, R;
|
|
2898
2898
|
const {
|
|
2899
2899
|
template: i,
|
|
2900
2900
|
undo: a,
|
|
@@ -2919,7 +2919,7 @@ function is({ config: n, elements: r } = {}) {
|
|
|
2919
2919
|
} = en(), v = n ?? {}, E = (D) => v[D] !== !1, P = v.actions ?? [], C = E("duplicate") || E("delete"), S = {
|
|
2920
2920
|
header: ((M = i.header) == null ? void 0 : M.enabled) !== !1,
|
|
2921
2921
|
body: !0,
|
|
2922
|
-
footer: ((
|
|
2922
|
+
footer: ((R = i.footer) == null ? void 0 : R.enabled) !== !1
|
|
2923
2923
|
};
|
|
2924
2924
|
an(() => {
|
|
2925
2925
|
S[c] || l("body");
|
|
@@ -2929,8 +2929,8 @@ function is({ config: n, elements: r } = {}) {
|
|
|
2929
2929
|
v.onSave(b());
|
|
2930
2930
|
return;
|
|
2931
2931
|
}
|
|
2932
|
-
const D = JSON.stringify(b(), null, 2),
|
|
2933
|
-
Object.assign(document.createElement("a"), { href:
|
|
2932
|
+
const D = JSON.stringify(b(), null, 2), H = URL.createObjectURL(new Blob([D], { type: "application/json" }));
|
|
2933
|
+
Object.assign(document.createElement("a"), { href: H, download: `${as()}.json` }).click(), URL.revokeObjectURL(H);
|
|
2934
2934
|
}, Q = () => {
|
|
2935
2935
|
if (v.onLoad) {
|
|
2936
2936
|
v.onLoad();
|
|
@@ -2938,16 +2938,16 @@ function is({ config: n, elements: r } = {}) {
|
|
|
2938
2938
|
}
|
|
2939
2939
|
const D = Object.assign(document.createElement("input"), { type: "file", accept: ".json" });
|
|
2940
2940
|
D.onchange = async () => {
|
|
2941
|
-
var
|
|
2942
|
-
const
|
|
2943
|
-
if (
|
|
2941
|
+
var z, q;
|
|
2942
|
+
const H = (z = D.files) == null ? void 0 : z[0];
|
|
2943
|
+
if (H)
|
|
2944
2944
|
try {
|
|
2945
|
-
const N = JSON.parse(await
|
|
2946
|
-
if (!
|
|
2945
|
+
const N = JSON.parse(await H.text()), G = N && typeof N == "object" && "template" in N ? N.template : N;
|
|
2946
|
+
if (!G || typeof G != "object" || !Array.isArray((q = G.body) == null ? void 0 : q.elements)) {
|
|
2947
2947
|
alert("Invalid template: missing required structure (body.elements).");
|
|
2948
2948
|
return;
|
|
2949
2949
|
}
|
|
2950
|
-
g(
|
|
2950
|
+
g(G), N && "data" in N && N.data && I(typeof N.data == "string" ? N.data : JSON.stringify(N.data, null, 2));
|
|
2951
2951
|
} catch {
|
|
2952
2952
|
alert("Invalid template JSON — could not parse file.");
|
|
2953
2953
|
}
|
|
@@ -2960,7 +2960,7 @@ function is({ config: n, elements: r } = {}) {
|
|
|
2960
2960
|
style: { height: 46, padding: "0 12px", background: "var(--panel)", borderBottom: "1px solid var(--border)", gap: 0 },
|
|
2961
2961
|
children: [
|
|
2962
2962
|
(() => {
|
|
2963
|
-
const D = r != null && r.hidden ? Ct.filter((q) => q.id !== "components") : Ct,
|
|
2963
|
+
const D = r != null && r.hidden ? Ct.filter((q) => q.id !== "components") : Ct, H = D.find((q) => q.id === h) ? h : D[0].id, z = D.findIndex((q) => q.id === H);
|
|
2964
2964
|
return /* @__PURE__ */ m("div", { style: { display: "flex", padding: 3, borderRadius: 9, background: "var(--card)", border: "1px solid var(--border)", position: "relative", gap: 0, width: 333, flexShrink: 0 }, children: [
|
|
2965
2965
|
/* @__PURE__ */ e("div", { "aria-hidden": !0, style: {
|
|
2966
2966
|
position: "absolute",
|
|
@@ -2971,7 +2971,7 @@ function is({ config: n, elements: r } = {}) {
|
|
|
2971
2971
|
borderRadius: 6,
|
|
2972
2972
|
background: "var(--accent)",
|
|
2973
2973
|
pointerEvents: "none",
|
|
2974
|
-
transform: `translateX(calc(${
|
|
2974
|
+
transform: `translateX(calc(${z} * 100%))`,
|
|
2975
2975
|
transition: "transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1)"
|
|
2976
2976
|
} }),
|
|
2977
2977
|
D.map((q) => /* @__PURE__ */ m(
|
|
@@ -2991,18 +2991,18 @@ function is({ config: n, elements: r } = {}) {
|
|
|
2991
2991
|
border: "none",
|
|
2992
2992
|
cursor: "pointer",
|
|
2993
2993
|
fontSize: 10,
|
|
2994
|
-
fontWeight:
|
|
2994
|
+
fontWeight: H === q.id ? 600 : 500,
|
|
2995
2995
|
fontFamily: "inherit",
|
|
2996
2996
|
whiteSpace: "nowrap",
|
|
2997
2997
|
background: "transparent",
|
|
2998
|
-
color:
|
|
2998
|
+
color: H === q.id ? "#fff" : "var(--text-3)",
|
|
2999
2999
|
transition: "color 0.18s"
|
|
3000
3000
|
},
|
|
3001
3001
|
onMouseEnter: (N) => {
|
|
3002
|
-
|
|
3002
|
+
H !== q.id && (N.currentTarget.style.color = "var(--text-1)");
|
|
3003
3003
|
},
|
|
3004
3004
|
onMouseLeave: (N) => {
|
|
3005
|
-
|
|
3005
|
+
H !== q.id && (N.currentTarget.style.color = "var(--text-3)");
|
|
3006
3006
|
},
|
|
3007
3007
|
children: [
|
|
3008
3008
|
q.icon,
|
|
@@ -3029,7 +3029,7 @@ function is({ config: n, elements: r } = {}) {
|
|
|
3029
3029
|
E("duplicate") && /* @__PURE__ */ e(Dn, { onClick: s, title: "Duplicate (Ctrl+D)", children: /* @__PURE__ */ e(fo, { size: 13 }) }),
|
|
3030
3030
|
E("delete") && /* @__PURE__ */ e(Dn, { onClick: t, title: "Delete (Del)", danger: !0, children: /* @__PURE__ */ e(Et, { size: 13 }) }),
|
|
3031
3031
|
E("sections") && (() => {
|
|
3032
|
-
const D = ["header", "body", "footer"],
|
|
3032
|
+
const D = ["header", "body", "footer"], H = D.indexOf(c);
|
|
3033
3033
|
return /* @__PURE__ */ m("div", { style: { display: "flex", padding: 3, borderRadius: 9, background: "var(--card)", border: "1px solid var(--border)", position: "relative", gap: 0, marginLeft: 6 }, children: [
|
|
3034
3034
|
/* @__PURE__ */ e("div", { "aria-hidden": !0, style: {
|
|
3035
3035
|
position: "absolute",
|
|
@@ -3040,19 +3040,19 @@ function is({ config: n, elements: r } = {}) {
|
|
|
3040
3040
|
borderRadius: 6,
|
|
3041
3041
|
background: "var(--accent)",
|
|
3042
3042
|
pointerEvents: "none",
|
|
3043
|
-
transform: `translateX(calc(${
|
|
3043
|
+
transform: `translateX(calc(${H} * 100%))`,
|
|
3044
3044
|
transition: "transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1)"
|
|
3045
3045
|
} }),
|
|
3046
|
-
D.map((
|
|
3047
|
-
const q = S[
|
|
3046
|
+
D.map((z) => {
|
|
3047
|
+
const q = S[z];
|
|
3048
3048
|
return /* @__PURE__ */ e(
|
|
3049
3049
|
"button",
|
|
3050
3050
|
{
|
|
3051
3051
|
onClick: () => {
|
|
3052
|
-
q && l(
|
|
3052
|
+
q && l(z);
|
|
3053
3053
|
},
|
|
3054
3054
|
disabled: !q,
|
|
3055
|
-
title: q ? void 0 : `${
|
|
3055
|
+
title: q ? void 0 : `${z.charAt(0).toUpperCase() + z.slice(1)} is disabled — enable it in the Page panel`,
|
|
3056
3056
|
style: {
|
|
3057
3057
|
flex: 1,
|
|
3058
3058
|
position: "relative",
|
|
@@ -3062,24 +3062,24 @@ function is({ config: n, elements: r } = {}) {
|
|
|
3062
3062
|
border: "none",
|
|
3063
3063
|
cursor: q ? "pointer" : "not-allowed",
|
|
3064
3064
|
fontSize: 11,
|
|
3065
|
-
fontWeight: c ===
|
|
3065
|
+
fontWeight: c === z ? 600 : 500,
|
|
3066
3066
|
fontFamily: "inherit",
|
|
3067
3067
|
textTransform: "capitalize",
|
|
3068
3068
|
background: "transparent",
|
|
3069
3069
|
whiteSpace: "nowrap",
|
|
3070
3070
|
opacity: q ? 1 : 0.4,
|
|
3071
|
-
color: c ===
|
|
3071
|
+
color: c === z ? "#fff" : "var(--text-2)",
|
|
3072
3072
|
transition: "color 0.18s"
|
|
3073
3073
|
},
|
|
3074
3074
|
onMouseEnter: (N) => {
|
|
3075
|
-
q && c !==
|
|
3075
|
+
q && c !== z && (N.currentTarget.style.color = "var(--text-1)");
|
|
3076
3076
|
},
|
|
3077
3077
|
onMouseLeave: (N) => {
|
|
3078
|
-
q && c !==
|
|
3078
|
+
q && c !== z && (N.currentTarget.style.color = "var(--text-2)");
|
|
3079
3079
|
},
|
|
3080
|
-
children:
|
|
3080
|
+
children: z.charAt(0).toUpperCase() + z.slice(1)
|
|
3081
3081
|
},
|
|
3082
|
-
|
|
3082
|
+
z
|
|
3083
3083
|
);
|
|
3084
3084
|
})
|
|
3085
3085
|
] });
|
|
@@ -3194,7 +3194,7 @@ function fe(n, r, i) {
|
|
|
3194
3194
|
];
|
|
3195
3195
|
}
|
|
3196
3196
|
function Cn({ onPick: n, filterType: r = "all", paths: i, wrapInExpr: a = !0, showBuiltIns: o = !1, groups: u }) {
|
|
3197
|
-
const [A, f] = Z(!1), [d, t] = Z({ top: 0, left: 0 }), { previewData: s, fieldTypes: c } = en(), l =
|
|
3197
|
+
const [A, f] = Z(!1), [d, t] = Z({ top: 0, left: 0 }), { previewData: s, fieldTypes: c } = en(), l = $(null), h = lo(() => {
|
|
3198
3198
|
if (!l.current) return;
|
|
3199
3199
|
const B = l.current.getBoundingClientRect();
|
|
3200
3200
|
t({ top: B.bottom + 4, left: B.right - 220 });
|
|
@@ -3354,7 +3354,7 @@ function Pn({ children: n }) {
|
|
|
3354
3354
|
/* @__PURE__ */ e("div", { style: { flex: 1, height: 1, background: "var(--border)" } })
|
|
3355
3355
|
] });
|
|
3356
3356
|
}
|
|
3357
|
-
function
|
|
3357
|
+
function L({ label: n, children: r, span2: i = !1 }) {
|
|
3358
3358
|
return /* @__PURE__ */ m("div", { style: { gridColumn: i ? "1 / -1" : void 0 }, children: [
|
|
3359
3359
|
/* @__PURE__ */ e("label", { style: { display: "block", fontSize: 10, color: "var(--text-3)", marginBottom: 4, fontWeight: 500 }, children: n }),
|
|
3360
3360
|
r
|
|
@@ -3580,19 +3580,19 @@ const As = {
|
|
|
3580
3580
|
};
|
|
3581
3581
|
function ds({ el: n }) {
|
|
3582
3582
|
var S, x, Q, M;
|
|
3583
|
-
const { updateElement: r, template: i } = en(), a = i.page ?? {}, o = a.orientation === "landscape", [u, A] = As[a.size ?? "A4"] ?? [794, 1123], f = o ? A : u, d = a.customHeight ?? (o ? u : A), t = a.margin ?? { top: 0, right: 0, bottom: 0, left: 0 }, s = t.left ?? 0, c = t.right ?? 0, l = t.top ?? 0, h = t.bottom ?? 0, p = Math.max(100, f - s - c), g = Math.max(200, d - l - h), b = ((S = i.header) == null ? void 0 : S.enabled) !== !1 ? ((x = i.header) == null ? void 0 : x.height) ?? 60 : 0, y = ((Q = i.footer) == null ? void 0 : Q.enabled) !== !1 ? ((M = i.footer) == null ? void 0 : M.height) ?? 40 : 0, w = Ln(i, n.id), k = (w == null ? void 0 : w.section) === "header", B = (w == null ? void 0 : w.section) === "footer", I = w == null ? void 0 : w.parent, v = I ? I.width : p, E = I ? I.height : k ? b : B ? y : Math.max(100, g - b - y), P = (
|
|
3584
|
-
const
|
|
3585
|
-
let
|
|
3586
|
-
|
|
3583
|
+
const { updateElement: r, template: i } = en(), a = i.page ?? {}, o = a.orientation === "landscape", [u, A] = As[a.size ?? "A4"] ?? [794, 1123], f = o ? A : u, d = a.customHeight ?? (o ? u : A), t = a.margin ?? { top: 0, right: 0, bottom: 0, left: 0 }, s = t.left ?? 0, c = t.right ?? 0, l = t.top ?? 0, h = t.bottom ?? 0, p = Math.max(100, f - s - c), g = Math.max(200, d - l - h), b = ((S = i.header) == null ? void 0 : S.enabled) !== !1 ? ((x = i.header) == null ? void 0 : x.height) ?? 60 : 0, y = ((Q = i.footer) == null ? void 0 : Q.enabled) !== !1 ? ((M = i.footer) == null ? void 0 : M.height) ?? 40 : 0, w = Ln(i, n.id), k = (w == null ? void 0 : w.section) === "header", B = (w == null ? void 0 : w.section) === "footer", I = w == null ? void 0 : w.parent, v = I ? I.width : p, E = I ? I.height : k ? b : B ? y : Math.max(100, g - b - y), P = (R, D) => {
|
|
3584
|
+
const H = Math.round(Number(D));
|
|
3585
|
+
let z = H;
|
|
3586
|
+
R === "x" && (z = Math.max(0, Math.min(H, v - 10))), R === "y" && (z = Math.max(0, Math.min(H, E - 5))), R === "width" && (z = Math.max(10, Math.min(H, v - n.x))), R === "height" && (z = Math.max(5, Math.min(H, E - n.y))), r(n.id, { [R]: z });
|
|
3587
3587
|
}, C = n.type === "table";
|
|
3588
3588
|
return /* @__PURE__ */ m(X, { children: [
|
|
3589
3589
|
/* @__PURE__ */ e(Pn, { children: "Position & Size" }),
|
|
3590
3590
|
/* @__PURE__ */ e("div", { style: { padding: "0 14px" }, children: /* @__PURE__ */ m(Xn, { children: [
|
|
3591
|
-
/* @__PURE__ */ e(
|
|
3592
|
-
/* @__PURE__ */ e(
|
|
3593
|
-
/* @__PURE__ */ e(
|
|
3594
|
-
!C && /* @__PURE__ */ e(
|
|
3595
|
-
C && /* @__PURE__ */ e(
|
|
3591
|
+
/* @__PURE__ */ e(L, { label: "X", children: /* @__PURE__ */ e(_, { type: "number", value: n.x, onChange: (R) => P("x", R) }) }),
|
|
3592
|
+
/* @__PURE__ */ e(L, { label: "Y", children: /* @__PURE__ */ e(_, { type: "number", value: n.y, onChange: (R) => P("y", R) }) }),
|
|
3593
|
+
/* @__PURE__ */ e(L, { label: `Width (max ${v - n.x})`, children: /* @__PURE__ */ e(_, { type: "number", value: n.width, onChange: (R) => P("width", R) }) }),
|
|
3594
|
+
!C && /* @__PURE__ */ e(L, { label: `Height (max ${E - n.y})`, children: /* @__PURE__ */ e(_, { type: "number", value: n.height, onChange: (R) => P("height", R) }) }),
|
|
3595
|
+
C && /* @__PURE__ */ e(L, { label: "Height", children: /* @__PURE__ */ m("div", { style: {
|
|
3596
3596
|
padding: "5px 9px",
|
|
3597
3597
|
borderRadius: 7,
|
|
3598
3598
|
fontSize: 12,
|
|
@@ -3643,7 +3643,7 @@ function hs(n) {
|
|
|
3643
3643
|
}
|
|
3644
3644
|
function gs({ el: n, onClose: r }) {
|
|
3645
3645
|
if (n.type !== "richtext") return null;
|
|
3646
|
-
const { updateElementDebounced: i } = en(), { itemPaths: a, globalPaths: o, scopeLabel: u } = de(n.id), A =
|
|
3646
|
+
const { updateElementDebounced: i } = en(), { itemPaths: a, globalPaths: o, scopeLabel: u } = de(n.id), A = $(null), f = $(null), d = $(null), [t, s] = Z({
|
|
3647
3647
|
b: !1,
|
|
3648
3648
|
i: !1,
|
|
3649
3649
|
u: !1,
|
|
@@ -4031,7 +4031,7 @@ function ps({ el: n }) {
|
|
|
4031
4031
|
] }),
|
|
4032
4032
|
u && /* @__PURE__ */ e(gs, { el: n, onClose: () => A(!1) }),
|
|
4033
4033
|
/* @__PURE__ */ m("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginTop: 4 }, children: [
|
|
4034
|
-
/* @__PURE__ */ e(
|
|
4034
|
+
/* @__PURE__ */ e(L, { label: "Lines to show", children: /* @__PURE__ */ e(
|
|
4035
4035
|
he,
|
|
4036
4036
|
{
|
|
4037
4037
|
value: n.maxLines && n.maxLines > 0 ? "fixed" : "all",
|
|
@@ -4042,7 +4042,7 @@ function ps({ el: n }) {
|
|
|
4042
4042
|
]
|
|
4043
4043
|
}
|
|
4044
4044
|
) }),
|
|
4045
|
-
n.maxLines && n.maxLines > 0 ? /* @__PURE__ */ e(
|
|
4045
|
+
n.maxLines && n.maxLines > 0 ? /* @__PURE__ */ e(L, { label: "Max lines", children: /* @__PURE__ */ e(
|
|
4046
4046
|
_,
|
|
4047
4047
|
{
|
|
4048
4048
|
type: "number",
|
|
@@ -4111,7 +4111,7 @@ function ys({ el: n }) {
|
|
|
4111
4111
|
return /* @__PURE__ */ m(X, { children: [
|
|
4112
4112
|
/* @__PURE__ */ e(Pn, { children: "Table" }),
|
|
4113
4113
|
/* @__PURE__ */ m("div", { style: { padding: "0 14px", display: "flex", flexDirection: "column", gap: 10 }, children: [
|
|
4114
|
-
/* @__PURE__ */ e(
|
|
4114
|
+
/* @__PURE__ */ e(L, { label: "Data Source", children: /* @__PURE__ */ m("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4115
4115
|
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(_, { value: n.dataSource, onChange: (I) => r(n.id, { dataSource: I }), placeholder: "items" }) }),
|
|
4116
4116
|
/* @__PURE__ */ e(Cn, { paths: k, wrapInExpr: !1, onPick: (I) => r(n.id, { dataSource: I }) })
|
|
4117
4117
|
] }) }),
|
|
@@ -4140,7 +4140,7 @@ function ys({ el: n }) {
|
|
|
4140
4140
|
] })
|
|
4141
4141
|
] }),
|
|
4142
4142
|
/* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: n.columns.map((I, v) => {
|
|
4143
|
-
var P, C, S, x, Q, M,
|
|
4143
|
+
var P, C, S, x, Q, M, R, D, H, z, q, N, G, j, nn, Y;
|
|
4144
4144
|
const E = A.has(v);
|
|
4145
4145
|
return /* @__PURE__ */ m("div", { style: {
|
|
4146
4146
|
borderRadius: 8,
|
|
@@ -4214,46 +4214,46 @@ function ys({ el: n }) {
|
|
|
4214
4214
|
}
|
|
4215
4215
|
),
|
|
4216
4216
|
/* @__PURE__ */ e(ue, { open: E, children: /* @__PURE__ */ m("div", { style: { padding: "10px", borderTop: "1px solid var(--border)", display: "flex", flexDirection: "column", gap: 8, background: "var(--bg)" }, children: [
|
|
4217
|
-
/* @__PURE__ */ e(
|
|
4217
|
+
/* @__PURE__ */ e(L, { label: "Field Key", children: /* @__PURE__ */ m("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4218
4218
|
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(
|
|
4219
4219
|
_,
|
|
4220
4220
|
{
|
|
4221
4221
|
value: I.key,
|
|
4222
4222
|
placeholder: "{{field}} or literal text",
|
|
4223
4223
|
onChange: (F) => {
|
|
4224
|
-
const
|
|
4225
|
-
|
|
4224
|
+
const T = [...n.columns];
|
|
4225
|
+
T[v] = { ...T[v], key: F }, r(n.id, { columns: T });
|
|
4226
4226
|
}
|
|
4227
4227
|
}
|
|
4228
4228
|
) }),
|
|
4229
4229
|
/* @__PURE__ */ e(Cn, { paths: B, wrapInExpr: !0, onPick: (F) => {
|
|
4230
|
-
const
|
|
4231
|
-
|
|
4230
|
+
const T = [...n.columns];
|
|
4231
|
+
T[v] = { ...T[v], key: F }, r(n.id, { columns: T });
|
|
4232
4232
|
} })
|
|
4233
4233
|
] }) }),
|
|
4234
|
-
/* @__PURE__ */ e(
|
|
4234
|
+
/* @__PURE__ */ e(L, { label: "Header Label", children: /* @__PURE__ */ e(
|
|
4235
4235
|
_,
|
|
4236
4236
|
{
|
|
4237
4237
|
value: I.label,
|
|
4238
4238
|
placeholder: "Column header text",
|
|
4239
4239
|
onChange: (F) => {
|
|
4240
|
-
const
|
|
4241
|
-
|
|
4240
|
+
const T = [...n.columns];
|
|
4241
|
+
T[v] = { ...T[v], label: F }, r(n.id, { columns: T });
|
|
4242
4242
|
}
|
|
4243
4243
|
}
|
|
4244
4244
|
) }),
|
|
4245
4245
|
/* @__PURE__ */ m(Xn, { children: [
|
|
4246
|
-
/* @__PURE__ */ e(
|
|
4247
|
-
const
|
|
4248
|
-
|
|
4246
|
+
/* @__PURE__ */ e(L, { label: "Width", children: /* @__PURE__ */ e(_, { type: "number", value: I.width, suffix: "px", onChange: (F) => {
|
|
4247
|
+
const T = [...n.columns];
|
|
4248
|
+
T[v] = { ...T[v], width: Math.max(20, Number(F)) }, r(n.id, { columns: T });
|
|
4249
4249
|
} }) }),
|
|
4250
|
-
/* @__PURE__ */ e(
|
|
4250
|
+
/* @__PURE__ */ e(L, { label: "Alignment", children: /* @__PURE__ */ e(
|
|
4251
4251
|
ce,
|
|
4252
4252
|
{
|
|
4253
4253
|
value: I.align ?? "left",
|
|
4254
4254
|
onChange: (F) => {
|
|
4255
|
-
const
|
|
4256
|
-
|
|
4255
|
+
const T = [...n.columns];
|
|
4256
|
+
T[v] = { ...T[v], align: F }, r(n.id, { columns: T });
|
|
4257
4257
|
},
|
|
4258
4258
|
options: [
|
|
4259
4259
|
{ value: "left", icon: /* @__PURE__ */ e(Tn, { size: 12, strokeWidth: 2 }), title: "Left" },
|
|
@@ -4266,47 +4266,47 @@ function ys({ el: n }) {
|
|
|
4266
4266
|
/* @__PURE__ */ m("div", { style: { paddingTop: 8, borderTop: "1px dashed var(--border)" }, children: [
|
|
4267
4267
|
/* @__PURE__ */ e("span", { style: { fontSize: 9, fontWeight: 700, color: "var(--text-3)", letterSpacing: "0.07em", textTransform: "uppercase", display: "block", marginBottom: 6 }, children: "Header Cell Style" }),
|
|
4268
4268
|
/* @__PURE__ */ m(Xn, { children: [
|
|
4269
|
-
/* @__PURE__ */ e(
|
|
4270
|
-
const
|
|
4271
|
-
|
|
4269
|
+
/* @__PURE__ */ e(L, { label: "Background", children: /* @__PURE__ */ e(hn, { value: ((P = I.headerStyle) == null ? void 0 : P.backgroundColor) ?? l.backgroundColor ?? "", onChange: (F) => {
|
|
4270
|
+
const T = [...n.columns];
|
|
4271
|
+
T[v] = { ...T[v], headerStyle: { ...I.headerStyle, backgroundColor: F } }, i(n.id, { columns: T });
|
|
4272
4272
|
} }) }),
|
|
4273
|
-
/* @__PURE__ */ e(
|
|
4274
|
-
const
|
|
4275
|
-
|
|
4273
|
+
/* @__PURE__ */ e(L, { label: "Text Color", children: /* @__PURE__ */ e(hn, { value: ((C = I.headerStyle) == null ? void 0 : C.color) ?? l.color ?? "", onChange: (F) => {
|
|
4274
|
+
const T = [...n.columns];
|
|
4275
|
+
T[v] = { ...T[v], headerStyle: { ...I.headerStyle, color: F } }, i(n.id, { columns: T });
|
|
4276
4276
|
} }) }),
|
|
4277
|
-
/* @__PURE__ */ e(
|
|
4277
|
+
/* @__PURE__ */ e(L, { label: "Font Size", children: /* @__PURE__ */ e(
|
|
4278
4278
|
_,
|
|
4279
4279
|
{
|
|
4280
4280
|
type: "number",
|
|
4281
4281
|
suffix: "px",
|
|
4282
4282
|
value: ((S = I.headerStyle) == null ? void 0 : S.fontSize) ?? l.fontSize ?? s.fontSize ?? 10,
|
|
4283
4283
|
onChange: (F) => {
|
|
4284
|
-
const
|
|
4285
|
-
|
|
4284
|
+
const T = [...n.columns];
|
|
4285
|
+
T[v] = { ...T[v], headerStyle: { ...I.headerStyle, fontSize: Number(F) } }, r(n.id, { columns: T });
|
|
4286
4286
|
}
|
|
4287
4287
|
}
|
|
4288
4288
|
) }),
|
|
4289
|
-
/* @__PURE__ */ e(
|
|
4289
|
+
/* @__PURE__ */ e(L, { label: "Padding", children: /* @__PURE__ */ e(
|
|
4290
4290
|
_,
|
|
4291
4291
|
{
|
|
4292
4292
|
type: "number",
|
|
4293
4293
|
suffix: "px",
|
|
4294
4294
|
value: ((x = I.headerStyle) == null ? void 0 : x.padding) ?? l.padding ?? s.padding ?? 4,
|
|
4295
4295
|
onChange: (F) => {
|
|
4296
|
-
const
|
|
4297
|
-
|
|
4296
|
+
const T = [...n.columns];
|
|
4297
|
+
T[v] = { ...T[v], headerStyle: { ...I.headerStyle, padding: Number(F) } }, r(n.id, { columns: T });
|
|
4298
4298
|
}
|
|
4299
4299
|
}
|
|
4300
4300
|
) }),
|
|
4301
|
-
/* @__PURE__ */ e(
|
|
4301
|
+
/* @__PURE__ */ e(L, { label: "Letter Spacing", children: /* @__PURE__ */ e(
|
|
4302
4302
|
_,
|
|
4303
4303
|
{
|
|
4304
4304
|
type: "number",
|
|
4305
4305
|
suffix: "px",
|
|
4306
4306
|
value: ((Q = I.headerStyle) == null ? void 0 : Q.letterSpacing) ?? l.letterSpacing ?? s.letterSpacing ?? 0,
|
|
4307
4307
|
onChange: (F) => {
|
|
4308
|
-
const
|
|
4309
|
-
|
|
4308
|
+
const T = [...n.columns];
|
|
4309
|
+
T[v] = { ...T[v], headerStyle: { ...I.headerStyle, letterSpacing: Number(F) } }, r(n.id, { columns: T });
|
|
4310
4310
|
}
|
|
4311
4311
|
}
|
|
4312
4312
|
) })
|
|
@@ -4321,8 +4321,8 @@ function ys({ el: n }) {
|
|
|
4321
4321
|
title: "Bold",
|
|
4322
4322
|
onClick: () => {
|
|
4323
4323
|
var U;
|
|
4324
|
-
const F = (((U = I.headerStyle) == null ? void 0 : U.fontWeight) ?? l.fontWeight) === "bold" ? "normal" : "bold",
|
|
4325
|
-
|
|
4324
|
+
const F = (((U = I.headerStyle) == null ? void 0 : U.fontWeight) ?? l.fontWeight) === "bold" ? "normal" : "bold", T = [...n.columns];
|
|
4325
|
+
T[v] = { ...T[v], headerStyle: { ...I.headerStyle, fontWeight: F } }, r(n.id, { columns: T });
|
|
4326
4326
|
},
|
|
4327
4327
|
children: /* @__PURE__ */ e(xe, { size: 12, strokeWidth: 2.5 })
|
|
4328
4328
|
}
|
|
@@ -4330,12 +4330,12 @@ function ys({ el: n }) {
|
|
|
4330
4330
|
/* @__PURE__ */ e(
|
|
4331
4331
|
Sn,
|
|
4332
4332
|
{
|
|
4333
|
-
active: (((
|
|
4333
|
+
active: (((R = I.headerStyle) == null ? void 0 : R.fontStyle) ?? l.fontStyle) === "italic",
|
|
4334
4334
|
title: "Italic",
|
|
4335
4335
|
onClick: () => {
|
|
4336
4336
|
var U;
|
|
4337
|
-
const F = (((U = I.headerStyle) == null ? void 0 : U.fontStyle) ?? l.fontStyle) === "italic" ? "normal" : "italic",
|
|
4338
|
-
|
|
4337
|
+
const F = (((U = I.headerStyle) == null ? void 0 : U.fontStyle) ?? l.fontStyle) === "italic" ? "normal" : "italic", T = [...n.columns];
|
|
4338
|
+
T[v] = { ...T[v], headerStyle: { ...I.headerStyle, fontStyle: F } }, r(n.id, { columns: T });
|
|
4339
4339
|
},
|
|
4340
4340
|
children: /* @__PURE__ */ e(Be, { size: 12, strokeWidth: 2.5 })
|
|
4341
4341
|
}
|
|
@@ -4349,8 +4349,8 @@ function ys({ el: n }) {
|
|
|
4349
4349
|
{
|
|
4350
4350
|
value: ((D = I.headerStyle) == null ? void 0 : D.textAlign) ?? l.textAlign ?? "left",
|
|
4351
4351
|
onChange: (F) => {
|
|
4352
|
-
const
|
|
4353
|
-
|
|
4352
|
+
const T = [...n.columns];
|
|
4353
|
+
T[v] = { ...T[v], headerStyle: { ...I.headerStyle, textAlign: F } }, r(n.id, { columns: T });
|
|
4354
4354
|
},
|
|
4355
4355
|
options: [
|
|
4356
4356
|
{ value: "left", icon: /* @__PURE__ */ e(Tn, { size: 12, strokeWidth: 2 }), title: "Left" },
|
|
@@ -4364,47 +4364,47 @@ function ys({ el: n }) {
|
|
|
4364
4364
|
/* @__PURE__ */ m("div", { style: { paddingTop: 8, borderTop: "1px dashed var(--border)" }, children: [
|
|
4365
4365
|
/* @__PURE__ */ e("span", { style: { fontSize: 9, fontWeight: 700, color: "var(--text-3)", letterSpacing: "0.07em", textTransform: "uppercase", display: "block", marginBottom: 6 }, children: "Data Cell Style" }),
|
|
4366
4366
|
/* @__PURE__ */ m(Xn, { children: [
|
|
4367
|
-
/* @__PURE__ */ e(
|
|
4368
|
-
const
|
|
4369
|
-
|
|
4367
|
+
/* @__PURE__ */ e(L, { label: "Text Color", children: /* @__PURE__ */ e(hn, { value: ((H = I.style) == null ? void 0 : H.color) ?? s.color ?? "", onChange: (F) => {
|
|
4368
|
+
const T = [...n.columns];
|
|
4369
|
+
T[v] = { ...T[v], style: { ...I.style, color: F } }, i(n.id, { columns: T });
|
|
4370
4370
|
} }) }),
|
|
4371
|
-
/* @__PURE__ */ e(
|
|
4372
|
-
const
|
|
4373
|
-
|
|
4371
|
+
/* @__PURE__ */ e(L, { label: "Background", children: /* @__PURE__ */ e(hn, { value: ((z = I.style) == null ? void 0 : z.backgroundColor) ?? s.backgroundColor ?? "", onChange: (F) => {
|
|
4372
|
+
const T = [...n.columns];
|
|
4373
|
+
T[v] = { ...T[v], style: { ...I.style, backgroundColor: F } }, i(n.id, { columns: T });
|
|
4374
4374
|
} }) }),
|
|
4375
|
-
/* @__PURE__ */ e(
|
|
4375
|
+
/* @__PURE__ */ e(L, { label: "Font Size", children: /* @__PURE__ */ e(
|
|
4376
4376
|
_,
|
|
4377
4377
|
{
|
|
4378
4378
|
type: "number",
|
|
4379
4379
|
suffix: "px",
|
|
4380
4380
|
value: ((q = I.style) == null ? void 0 : q.fontSize) ?? s.fontSize ?? 10,
|
|
4381
4381
|
onChange: (F) => {
|
|
4382
|
-
const
|
|
4383
|
-
|
|
4382
|
+
const T = [...n.columns];
|
|
4383
|
+
T[v] = { ...T[v], style: { ...I.style, fontSize: Number(F) } }, r(n.id, { columns: T });
|
|
4384
4384
|
}
|
|
4385
4385
|
}
|
|
4386
4386
|
) }),
|
|
4387
|
-
/* @__PURE__ */ e(
|
|
4387
|
+
/* @__PURE__ */ e(L, { label: "Padding", children: /* @__PURE__ */ e(
|
|
4388
4388
|
_,
|
|
4389
4389
|
{
|
|
4390
4390
|
type: "number",
|
|
4391
4391
|
suffix: "px",
|
|
4392
4392
|
value: ((N = I.style) == null ? void 0 : N.padding) ?? s.padding ?? 4,
|
|
4393
4393
|
onChange: (F) => {
|
|
4394
|
-
const
|
|
4395
|
-
|
|
4394
|
+
const T = [...n.columns];
|
|
4395
|
+
T[v] = { ...T[v], style: { ...I.style, padding: Number(F) } }, r(n.id, { columns: T });
|
|
4396
4396
|
}
|
|
4397
4397
|
}
|
|
4398
4398
|
) }),
|
|
4399
|
-
/* @__PURE__ */ e(
|
|
4399
|
+
/* @__PURE__ */ e(L, { label: "Letter Spacing", children: /* @__PURE__ */ e(
|
|
4400
4400
|
_,
|
|
4401
4401
|
{
|
|
4402
4402
|
type: "number",
|
|
4403
4403
|
suffix: "px",
|
|
4404
|
-
value: ((
|
|
4404
|
+
value: ((G = I.style) == null ? void 0 : G.letterSpacing) ?? s.letterSpacing ?? 0,
|
|
4405
4405
|
onChange: (F) => {
|
|
4406
|
-
const
|
|
4407
|
-
|
|
4406
|
+
const T = [...n.columns];
|
|
4407
|
+
T[v] = { ...T[v], style: { ...I.style, letterSpacing: Number(F) } }, r(n.id, { columns: T });
|
|
4408
4408
|
}
|
|
4409
4409
|
}
|
|
4410
4410
|
) })
|
|
@@ -4419,8 +4419,8 @@ function ys({ el: n }) {
|
|
|
4419
4419
|
title: "Bold",
|
|
4420
4420
|
onClick: () => {
|
|
4421
4421
|
var U;
|
|
4422
|
-
const F = ((U = I.style) == null ? void 0 : U.fontWeight) === "bold" ? "normal" : "bold",
|
|
4423
|
-
|
|
4422
|
+
const F = ((U = I.style) == null ? void 0 : U.fontWeight) === "bold" ? "normal" : "bold", T = [...n.columns];
|
|
4423
|
+
T[v] = { ...T[v], style: { ...I.style, fontWeight: F } }, r(n.id, { columns: T });
|
|
4424
4424
|
},
|
|
4425
4425
|
children: /* @__PURE__ */ e(xe, { size: 12, strokeWidth: 2.5 })
|
|
4426
4426
|
}
|
|
@@ -4428,12 +4428,12 @@ function ys({ el: n }) {
|
|
|
4428
4428
|
/* @__PURE__ */ e(
|
|
4429
4429
|
Sn,
|
|
4430
4430
|
{
|
|
4431
|
-
active: ((
|
|
4431
|
+
active: ((nn = I.style) == null ? void 0 : nn.fontStyle) === "italic",
|
|
4432
4432
|
title: "Italic",
|
|
4433
4433
|
onClick: () => {
|
|
4434
4434
|
var U;
|
|
4435
|
-
const F = ((U = I.style) == null ? void 0 : U.fontStyle) === "italic" ? "normal" : "italic",
|
|
4436
|
-
|
|
4435
|
+
const F = ((U = I.style) == null ? void 0 : U.fontStyle) === "italic" ? "normal" : "italic", T = [...n.columns];
|
|
4436
|
+
T[v] = { ...T[v], style: { ...I.style, fontStyle: F } }, r(n.id, { columns: T });
|
|
4437
4437
|
},
|
|
4438
4438
|
children: /* @__PURE__ */ e(Be, { size: 12, strokeWidth: 2.5 })
|
|
4439
4439
|
}
|
|
@@ -4447,8 +4447,8 @@ function ys({ el: n }) {
|
|
|
4447
4447
|
{
|
|
4448
4448
|
value: ((Y = I.style) == null ? void 0 : Y.textAlign) ?? I.align ?? "left",
|
|
4449
4449
|
onChange: (F) => {
|
|
4450
|
-
const
|
|
4451
|
-
|
|
4450
|
+
const T = [...n.columns];
|
|
4451
|
+
T[v] = { ...T[v], style: { ...I.style, textAlign: F } }, r(n.id, { columns: T });
|
|
4452
4452
|
},
|
|
4453
4453
|
options: [
|
|
4454
4454
|
{ value: "left", icon: /* @__PURE__ */ e(Tn, { size: 12, strokeWidth: 2 }), title: "Left" },
|
|
@@ -4494,7 +4494,7 @@ function ys({ el: n }) {
|
|
|
4494
4494
|
/* @__PURE__ */ e("code", { style: { fontFamily: "monospace", color: "var(--accent)" }, children: "{{value}}" }),
|
|
4495
4495
|
" for the cell value."
|
|
4496
4496
|
] }),
|
|
4497
|
-
/* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: (I.conditionalStyles ?? []).map((F,
|
|
4497
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: (I.conditionalStyles ?? []).map((F, T) => /* @__PURE__ */ m("div", { style: { borderRadius: 7, border: "1px solid var(--border)", padding: "8px", background: "var(--card)", display: "flex", flexDirection: "column", gap: 6 }, children: [
|
|
4498
4498
|
/* @__PURE__ */ m("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
|
|
4499
4499
|
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "var(--text-3)", fontWeight: 600, flexShrink: 0 }, children: "if" }),
|
|
4500
4500
|
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(
|
|
@@ -4504,7 +4504,7 @@ function ys({ el: n }) {
|
|
|
4504
4504
|
placeholder: "{{value}} > 100",
|
|
4505
4505
|
onChange: (U) => {
|
|
4506
4506
|
const O = [...n.columns], W = [...I.conditionalStyles ?? []];
|
|
4507
|
-
W[
|
|
4507
|
+
W[T] = { ...W[T], condition: U }, O[v] = { ...O[v], conditionalStyles: W }, r(n.id, { columns: O });
|
|
4508
4508
|
}
|
|
4509
4509
|
}
|
|
4510
4510
|
) }),
|
|
@@ -4513,7 +4513,7 @@ function ys({ el: n }) {
|
|
|
4513
4513
|
{
|
|
4514
4514
|
onClick: () => {
|
|
4515
4515
|
const U = [...n.columns];
|
|
4516
|
-
U[v] = { ...U[v], conditionalStyles: (I.conditionalStyles ?? []).filter((O, W) => W !==
|
|
4516
|
+
U[v] = { ...U[v], conditionalStyles: (I.conditionalStyles ?? []).filter((O, W) => W !== T) }, r(n.id, { columns: U });
|
|
4517
4517
|
},
|
|
4518
4518
|
style: {
|
|
4519
4519
|
width: 22,
|
|
@@ -4533,15 +4533,15 @@ function ys({ el: n }) {
|
|
|
4533
4533
|
)
|
|
4534
4534
|
] }),
|
|
4535
4535
|
/* @__PURE__ */ m(Xn, { children: [
|
|
4536
|
-
/* @__PURE__ */ e(
|
|
4536
|
+
/* @__PURE__ */ e(L, { label: "Text Color", children: /* @__PURE__ */ e(hn, { value: F.style.color ?? "", onChange: (U) => {
|
|
4537
4537
|
const O = [...n.columns], W = [...I.conditionalStyles ?? []];
|
|
4538
|
-
W[
|
|
4538
|
+
W[T] = { ...W[T], style: { ...W[T].style, color: U } }, O[v] = { ...O[v], conditionalStyles: W }, i(n.id, { columns: O });
|
|
4539
4539
|
} }) }),
|
|
4540
|
-
/* @__PURE__ */ e(
|
|
4540
|
+
/* @__PURE__ */ e(L, { label: "Background", children: /* @__PURE__ */ e(hn, { value: F.style.backgroundColor ?? "", onChange: (U) => {
|
|
4541
4541
|
const O = [...n.columns], W = [...I.conditionalStyles ?? []];
|
|
4542
|
-
W[
|
|
4542
|
+
W[T] = { ...W[T], style: { ...W[T].style, backgroundColor: U } }, O[v] = { ...O[v], conditionalStyles: W }, i(n.id, { columns: O });
|
|
4543
4543
|
} }) }),
|
|
4544
|
-
/* @__PURE__ */ e(
|
|
4544
|
+
/* @__PURE__ */ e(L, { label: "Font Size", children: /* @__PURE__ */ e(
|
|
4545
4545
|
_,
|
|
4546
4546
|
{
|
|
4547
4547
|
type: "number",
|
|
@@ -4549,11 +4549,11 @@ function ys({ el: n }) {
|
|
|
4549
4549
|
value: F.style.fontSize ?? "",
|
|
4550
4550
|
onChange: (U) => {
|
|
4551
4551
|
const O = [...n.columns], W = [...I.conditionalStyles ?? []];
|
|
4552
|
-
W[
|
|
4552
|
+
W[T] = { ...W[T], style: { ...W[T].style, fontSize: Number(U) || void 0 } }, O[v] = { ...O[v], conditionalStyles: W }, r(n.id, { columns: O });
|
|
4553
4553
|
}
|
|
4554
4554
|
}
|
|
4555
4555
|
) }),
|
|
4556
|
-
/* @__PURE__ */ e(
|
|
4556
|
+
/* @__PURE__ */ e(L, { label: "Letter Spacing", children: /* @__PURE__ */ e(
|
|
4557
4557
|
_,
|
|
4558
4558
|
{
|
|
4559
4559
|
type: "number",
|
|
@@ -4561,7 +4561,7 @@ function ys({ el: n }) {
|
|
|
4561
4561
|
value: F.style.letterSpacing ?? "",
|
|
4562
4562
|
onChange: (U) => {
|
|
4563
4563
|
const O = [...n.columns], W = [...I.conditionalStyles ?? []];
|
|
4564
|
-
W[
|
|
4564
|
+
W[T] = { ...W[T], style: { ...W[T].style, letterSpacing: Number(U) || void 0 } }, O[v] = { ...O[v], conditionalStyles: W }, r(n.id, { columns: O });
|
|
4565
4565
|
}
|
|
4566
4566
|
}
|
|
4567
4567
|
) })
|
|
@@ -4576,7 +4576,7 @@ function ys({ el: n }) {
|
|
|
4576
4576
|
title: "Bold",
|
|
4577
4577
|
onClick: () => {
|
|
4578
4578
|
const U = [...n.columns], O = [...I.conditionalStyles ?? []];
|
|
4579
|
-
O[
|
|
4579
|
+
O[T] = { ...O[T], style: { ...O[T].style, fontWeight: F.style.fontWeight === "bold" ? "normal" : "bold" } }, U[v] = { ...U[v], conditionalStyles: O }, r(n.id, { columns: U });
|
|
4580
4580
|
},
|
|
4581
4581
|
children: /* @__PURE__ */ e(xe, { size: 12, strokeWidth: 2.5 })
|
|
4582
4582
|
}
|
|
@@ -4588,22 +4588,22 @@ function ys({ el: n }) {
|
|
|
4588
4588
|
title: "Italic",
|
|
4589
4589
|
onClick: () => {
|
|
4590
4590
|
const U = [...n.columns], O = [...I.conditionalStyles ?? []];
|
|
4591
|
-
O[
|
|
4591
|
+
O[T] = { ...O[T], style: { ...O[T].style, fontStyle: F.style.fontStyle === "italic" ? "normal" : "italic" } }, U[v] = { ...U[v], conditionalStyles: O }, r(n.id, { columns: U });
|
|
4592
4592
|
},
|
|
4593
4593
|
children: /* @__PURE__ */ e(Be, { size: 12, strokeWidth: 2.5 })
|
|
4594
4594
|
}
|
|
4595
4595
|
)
|
|
4596
4596
|
] })
|
|
4597
4597
|
] })
|
|
4598
|
-
] },
|
|
4598
|
+
] }, T)) })
|
|
4599
4599
|
] })
|
|
4600
4600
|
] }) })
|
|
4601
4601
|
] }, v);
|
|
4602
4602
|
}) })
|
|
4603
4603
|
] }),
|
|
4604
4604
|
/* @__PURE__ */ e(ms, { title: "Row Colors", open: d, onToggle: () => t((I) => !I), children: /* @__PURE__ */ m(Xn, { children: [
|
|
4605
|
-
/* @__PURE__ */ e(
|
|
4606
|
-
/* @__PURE__ */ e(
|
|
4605
|
+
/* @__PURE__ */ e(L, { label: "Odd rows", children: /* @__PURE__ */ e(hn, { value: s.backgroundColor ?? "", onChange: (I) => y("backgroundColor", I) }) }),
|
|
4606
|
+
/* @__PURE__ */ e(L, { label: "Even rows", children: /* @__PURE__ */ e(hn, { value: c.backgroundColor ?? "", onChange: (I) => w("backgroundColor", I) }) })
|
|
4607
4607
|
] }) })
|
|
4608
4608
|
] })
|
|
4609
4609
|
] });
|
|
@@ -4641,7 +4641,7 @@ function bs({ el: n }) {
|
|
|
4641
4641
|
return /* @__PURE__ */ m(X, { children: [
|
|
4642
4642
|
/* @__PURE__ */ e(Pn, { children: "Chart" }),
|
|
4643
4643
|
/* @__PURE__ */ m("div", { style: { padding: "0 14px", display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
4644
|
-
/* @__PURE__ */ e(
|
|
4644
|
+
/* @__PURE__ */ e(L, { label: "Chart Type", children: (() => {
|
|
4645
4645
|
const c = ["bar", "line", "pie"], l = c.indexOf(n.chartType);
|
|
4646
4646
|
return /* @__PURE__ */ m("div", { style: { display: "flex", padding: 3, borderRadius: 9, background: "var(--card)", border: "1px solid var(--border)", position: "relative", gap: 0 }, children: [
|
|
4647
4647
|
/* @__PURE__ */ e("div", { "aria-hidden": !0, style: {
|
|
@@ -4689,11 +4689,11 @@ function bs({ el: n }) {
|
|
|
4689
4689
|
))
|
|
4690
4690
|
] });
|
|
4691
4691
|
})() }),
|
|
4692
|
-
/* @__PURE__ */ e(
|
|
4692
|
+
/* @__PURE__ */ e(L, { label: "Data Source", children: /* @__PURE__ */ m("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4693
4693
|
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(_, { value: n.dataSource, onChange: (c) => r(n.id, { dataSource: c }), placeholder: "chartData" }) }),
|
|
4694
4694
|
/* @__PURE__ */ e(Cn, { paths: u, wrapInExpr: !1, onPick: (c) => r(n.id, { dataSource: c }) })
|
|
4695
4695
|
] }) }),
|
|
4696
|
-
n.chartType !== "pie" && /* @__PURE__ */ e(
|
|
4696
|
+
n.chartType !== "pie" && /* @__PURE__ */ e(L, { label: "X Axis Key", children: /* @__PURE__ */ m("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4697
4697
|
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(_, { value: n.xAxisKey ?? "", onChange: (c) => r(n.id, { xAxisKey: c }), placeholder: "label" }) }),
|
|
4698
4698
|
/* @__PURE__ */ e(Cn, { paths: A, wrapInExpr: !1, onPick: (c) => r(n.id, { xAxisKey: c }) })
|
|
4699
4699
|
] }) }),
|
|
@@ -4742,12 +4742,12 @@ function bs({ el: n }) {
|
|
|
4742
4742
|
}
|
|
4743
4743
|
)
|
|
4744
4744
|
] }),
|
|
4745
|
-
/* @__PURE__ */ e(
|
|
4746
|
-
/* @__PURE__ */ e(
|
|
4745
|
+
/* @__PURE__ */ e(L, { label: "Color", children: /* @__PURE__ */ e(hn, { value: c.color ?? "#6c63ff", onChange: (h) => d(l, { color: h || "#6c63ff" }) }) }),
|
|
4746
|
+
/* @__PURE__ */ e(L, { label: "Data Key", children: /* @__PURE__ */ m("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4747
4747
|
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(_, { value: c.dataKey, onChange: (h) => f(l, { dataKey: h }), placeholder: "value" }) }),
|
|
4748
4748
|
/* @__PURE__ */ e(Cn, { paths: A, wrapInExpr: !1, onPick: (h) => f(l, { dataKey: h }) })
|
|
4749
4749
|
] }) }),
|
|
4750
|
-
/* @__PURE__ */ e(
|
|
4750
|
+
/* @__PURE__ */ e(L, { label: "Label", children: /* @__PURE__ */ e(_, { value: c.label, onChange: (h) => f(l, { label: h }), placeholder: "Series name" }) })
|
|
4751
4751
|
] }, l))
|
|
4752
4752
|
] }),
|
|
4753
4753
|
/* @__PURE__ */ m("div", { style: {
|
|
@@ -4805,7 +4805,7 @@ function vs({ el: n }) {
|
|
|
4805
4805
|
return /* @__PURE__ */ m(X, { children: [
|
|
4806
4806
|
/* @__PURE__ */ e(Pn, { children: "Image" }),
|
|
4807
4807
|
/* @__PURE__ */ m("div", { style: { padding: "0 14px", display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
4808
|
-
/* @__PURE__ */ e(
|
|
4808
|
+
/* @__PURE__ */ e(L, { label: "Source URL", children: /* @__PURE__ */ m("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4809
4809
|
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(_, { value: n.src, onChange: (f) => r(n.id, { src: f }), placeholder: "https://… or {{imageUrl}}" }) }),
|
|
4810
4810
|
/* @__PURE__ */ e(
|
|
4811
4811
|
Cn,
|
|
@@ -4835,7 +4835,7 @@ function vs({ el: n }) {
|
|
|
4835
4835
|
children: "↑ Upload image file"
|
|
4836
4836
|
}
|
|
4837
4837
|
),
|
|
4838
|
-
/* @__PURE__ */ e(
|
|
4838
|
+
/* @__PURE__ */ e(L, { label: "Object Fit", children: /* @__PURE__ */ e(
|
|
4839
4839
|
he,
|
|
4840
4840
|
{
|
|
4841
4841
|
value: n.objectFit ?? "contain",
|
|
@@ -4843,9 +4843,9 @@ function vs({ el: n }) {
|
|
|
4843
4843
|
options: [{ value: "contain", label: "Contain" }, { value: "cover", label: "Cover" }, { value: "fill", label: "Fill" }]
|
|
4844
4844
|
}
|
|
4845
4845
|
) }),
|
|
4846
|
-
/* @__PURE__ */ e(
|
|
4847
|
-
/* @__PURE__ */ e(
|
|
4848
|
-
/* @__PURE__ */ e(
|
|
4846
|
+
/* @__PURE__ */ e(L, { label: "Horizontal", children: /* @__PURE__ */ e(Wn, { children: ["left", "center", "right"].map((f) => /* @__PURE__ */ e(Sn, { active: (n.horizontalAlign ?? "center") === f, onClick: () => r(n.id, { horizontalAlign: f }), title: f.charAt(0).toUpperCase() + f.slice(1), children: f === "left" ? /* @__PURE__ */ e(Tn, { size: 13 }) : f === "center" ? /* @__PURE__ */ e(Gn, { size: 13 }) : /* @__PURE__ */ e(jn, { size: 13 }) }, f)) }) }),
|
|
4847
|
+
/* @__PURE__ */ e(L, { label: "Vertical", children: /* @__PURE__ */ e(Wn, { children: ["top", "middle", "bottom"].map((f) => /* @__PURE__ */ e(Sn, { active: (n.verticalAlign ?? "middle") === f, onClick: () => r(n.id, { verticalAlign: f }), title: f.charAt(0).toUpperCase() + f.slice(1), children: f === "top" ? /* @__PURE__ */ e(St, { size: 13 }) : f === "middle" ? /* @__PURE__ */ e(kt, { size: 13 }) : /* @__PURE__ */ e(Qt, { size: 13 }) }, f)) }) }),
|
|
4848
|
+
/* @__PURE__ */ e(L, { label: "Background", children: /* @__PURE__ */ e(hn, { value: n.backgroundColor ?? "", onChange: (f) => i(n.id, { backgroundColor: f || void 0 }) }) })
|
|
4849
4849
|
] })
|
|
4850
4850
|
] });
|
|
4851
4851
|
}
|
|
@@ -4854,7 +4854,7 @@ function Es({ el: n }) {
|
|
|
4854
4854
|
return n.type !== "barcode" ? null : /* @__PURE__ */ m(X, { children: [
|
|
4855
4855
|
/* @__PURE__ */ e(Pn, { children: "Barcode" }),
|
|
4856
4856
|
/* @__PURE__ */ m("div", { style: { padding: "0 14px", display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
4857
|
-
/* @__PURE__ */ e(
|
|
4857
|
+
/* @__PURE__ */ e(L, { label: "Value", children: /* @__PURE__ */ m("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4858
4858
|
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(_, { value: n.value, onChange: (A) => r(n.id, { value: A }), placeholder: "12345 or {{barcodeField}}" }) }),
|
|
4859
4859
|
/* @__PURE__ */ e(
|
|
4860
4860
|
Cn,
|
|
@@ -4865,7 +4865,7 @@ function Es({ el: n }) {
|
|
|
4865
4865
|
}
|
|
4866
4866
|
)
|
|
4867
4867
|
] }) }),
|
|
4868
|
-
/* @__PURE__ */ e(
|
|
4868
|
+
/* @__PURE__ */ e(L, { label: "Format", children: /* @__PURE__ */ e(
|
|
4869
4869
|
he,
|
|
4870
4870
|
{
|
|
4871
4871
|
value: n.format ?? "CODE128",
|
|
@@ -4878,10 +4878,10 @@ function Es({ el: n }) {
|
|
|
4878
4878
|
]
|
|
4879
4879
|
}
|
|
4880
4880
|
) }),
|
|
4881
|
-
/* @__PURE__ */ e(
|
|
4882
|
-
/* @__PURE__ */ e(
|
|
4883
|
-
/* @__PURE__ */ e(
|
|
4884
|
-
/* @__PURE__ */ e(
|
|
4881
|
+
/* @__PURE__ */ e(L, { label: "Horizontal", children: /* @__PURE__ */ e(Wn, { children: ["left", "center", "right"].map((A) => /* @__PURE__ */ e(Sn, { active: (n.horizontalAlign ?? "center") === A, onClick: () => r(n.id, { horizontalAlign: A }), title: A.charAt(0).toUpperCase() + A.slice(1), children: A === "left" ? /* @__PURE__ */ e(Tn, { size: 13 }) : A === "center" ? /* @__PURE__ */ e(Gn, { size: 13 }) : /* @__PURE__ */ e(jn, { size: 13 }) }, A)) }) }),
|
|
4882
|
+
/* @__PURE__ */ e(L, { label: "Vertical", children: /* @__PURE__ */ e(Wn, { children: ["top", "middle", "bottom"].map((A) => /* @__PURE__ */ e(Sn, { active: (n.verticalAlign ?? "middle") === A, onClick: () => r(n.id, { verticalAlign: A }), title: A.charAt(0).toUpperCase() + A.slice(1), children: A === "top" ? /* @__PURE__ */ e(St, { size: 13 }) : A === "middle" ? /* @__PURE__ */ e(kt, { size: 13 }) : /* @__PURE__ */ e(Qt, { size: 13 }) }, A)) }) }),
|
|
4883
|
+
/* @__PURE__ */ e(L, { label: "Background", children: /* @__PURE__ */ e(hn, { value: n.backgroundColor ?? "", onChange: (A) => i(n.id, { backgroundColor: A || void 0 }) }) }),
|
|
4884
|
+
/* @__PURE__ */ e(L, { label: "Bar Color", children: /* @__PURE__ */ e(hn, { value: n.lineColor ?? "#000000", onChange: (A) => i(n.id, { lineColor: A || "#000000" }) }) })
|
|
4885
4885
|
] })
|
|
4886
4886
|
] });
|
|
4887
4887
|
}
|
|
@@ -4890,7 +4890,7 @@ function Is({ el: n }) {
|
|
|
4890
4890
|
return n.type !== "qrcode" ? null : /* @__PURE__ */ m(X, { children: [
|
|
4891
4891
|
/* @__PURE__ */ e(Pn, { children: "QR Code" }),
|
|
4892
4892
|
/* @__PURE__ */ m("div", { style: { padding: "0 14px", display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
4893
|
-
/* @__PURE__ */ e(
|
|
4893
|
+
/* @__PURE__ */ e(L, { label: "Value / URL", children: /* @__PURE__ */ m("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4894
4894
|
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(_, { value: n.value, onChange: (A) => r(n.id, { value: A }), placeholder: "https://… or {{qrField}}" }) }),
|
|
4895
4895
|
/* @__PURE__ */ e(
|
|
4896
4896
|
Cn,
|
|
@@ -4901,10 +4901,10 @@ function Is({ el: n }) {
|
|
|
4901
4901
|
}
|
|
4902
4902
|
)
|
|
4903
4903
|
] }) }),
|
|
4904
|
-
/* @__PURE__ */ e(
|
|
4905
|
-
/* @__PURE__ */ e(
|
|
4906
|
-
/* @__PURE__ */ e(
|
|
4907
|
-
/* @__PURE__ */ e(
|
|
4904
|
+
/* @__PURE__ */ e(L, { label: "Horizontal", children: /* @__PURE__ */ e(Wn, { children: ["left", "center", "right"].map((A) => /* @__PURE__ */ e(Sn, { active: (n.horizontalAlign ?? "center") === A, onClick: () => r(n.id, { horizontalAlign: A }), title: A.charAt(0).toUpperCase() + A.slice(1), children: A === "left" ? /* @__PURE__ */ e(Tn, { size: 13 }) : A === "center" ? /* @__PURE__ */ e(Gn, { size: 13 }) : /* @__PURE__ */ e(jn, { size: 13 }) }, A)) }) }),
|
|
4905
|
+
/* @__PURE__ */ e(L, { label: "Vertical", children: /* @__PURE__ */ e(Wn, { children: ["top", "middle", "bottom"].map((A) => /* @__PURE__ */ e(Sn, { active: (n.verticalAlign ?? "middle") === A, onClick: () => r(n.id, { verticalAlign: A }), title: A.charAt(0).toUpperCase() + A.slice(1), children: A === "top" ? /* @__PURE__ */ e(St, { size: 13 }) : A === "middle" ? /* @__PURE__ */ e(kt, { size: 13 }) : /* @__PURE__ */ e(Qt, { size: 13 }) }, A)) }) }),
|
|
4906
|
+
/* @__PURE__ */ e(L, { label: "Background", children: /* @__PURE__ */ e(hn, { value: n.backgroundColor ?? "", onChange: (A) => i(n.id, { backgroundColor: A || void 0 }) }) }),
|
|
4907
|
+
/* @__PURE__ */ e(L, { label: "Foreground", children: /* @__PURE__ */ e(hn, { value: n.foregroundColor ?? "#000000", onChange: (A) => i(n.id, { foregroundColor: A || "#000000" }) }) })
|
|
4908
4908
|
] })
|
|
4909
4909
|
] });
|
|
4910
4910
|
}
|
|
@@ -4928,7 +4928,7 @@ function ws({ el: n }) {
|
|
|
4928
4928
|
return /* @__PURE__ */ m(X, { children: [
|
|
4929
4929
|
/* @__PURE__ */ e(Pn, { children: "Container" }),
|
|
4930
4930
|
/* @__PURE__ */ m("div", { style: { padding: "0 14px", display: "flex", flexDirection: "column", gap: 10 }, children: [
|
|
4931
|
-
/* @__PURE__ */ e(
|
|
4931
|
+
/* @__PURE__ */ e(L, { label: "Repeat over (data array)", children: /* @__PURE__ */ m("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4932
4932
|
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(_, { value: n.dataSource ?? "", onChange: (o) => r(n.id, { dataSource: o || void 0 }), placeholder: "items (blank = static group)" }) }),
|
|
4933
4933
|
/* @__PURE__ */ e(Cn, { paths: a, wrapInExpr: !1, onPick: (o) => r(n.id, { dataSource: o }) })
|
|
4934
4934
|
] }) }),
|
|
@@ -4939,7 +4939,7 @@ function ws({ el: n }) {
|
|
|
4939
4939
|
/* @__PURE__ */ e("code", { style: { fontFamily: "monospace", color: "var(--accent)" }, children: "{{name}}" }),
|
|
4940
4940
|
"."
|
|
4941
4941
|
] }) : "No data array — renders once as a static group. Set a data array to make it repeat." }),
|
|
4942
|
-
/* @__PURE__ */ e(Xn, { children: /* @__PURE__ */ e(
|
|
4942
|
+
/* @__PURE__ */ e(Xn, { children: /* @__PURE__ */ e(L, { label: "Gap between items", children: /* @__PURE__ */ e(_, { type: "number", suffix: "px", value: n.gap ?? 0, onChange: (o) => r(n.id, { gap: Math.max(0, Math.round(Number(o) || 0)) }) }) }) }),
|
|
4943
4943
|
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "var(--text-3)", lineHeight: 1.5 }, children: "The band is transparent. Its canvas height is a baseline — in the PDF each item grows beyond it to fit children like rich text. Style individual children for borders or backgrounds." })
|
|
4944
4944
|
] })
|
|
4945
4945
|
] });
|
|
@@ -4951,10 +4951,10 @@ function Cs({ el: n }) {
|
|
|
4951
4951
|
return /* @__PURE__ */ m(X, { children: [
|
|
4952
4952
|
/* @__PURE__ */ e(Pn, { children: "Style" }),
|
|
4953
4953
|
/* @__PURE__ */ m("div", { style: { padding: "0 14px", display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
4954
|
-
A && /* @__PURE__ */ e(
|
|
4954
|
+
A && /* @__PURE__ */ e(L, { label: "Font Family", children: /* @__PURE__ */ e(he, { value: a.fontFamily ?? "Helvetica", onChange: (f) => o("fontFamily", f), options: cs }) }),
|
|
4955
4955
|
/* @__PURE__ */ m("div", { style: { display: "flex", gap: 8 }, children: [
|
|
4956
|
-
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(
|
|
4957
|
-
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(
|
|
4956
|
+
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(L, { label: "Font Size", children: /* @__PURE__ */ e(_, { type: "number", value: a.fontSize ?? 12, onChange: (f) => o("fontSize", Number(f)), suffix: "px" }) }) }),
|
|
4957
|
+
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(L, { label: "Letter Spacing", children: /* @__PURE__ */ e(_, { type: "number", value: a.letterSpacing ?? 0, onChange: (f) => o("letterSpacing", Number(f)), suffix: "px" }) }) })
|
|
4958
4958
|
] }),
|
|
4959
4959
|
A && /* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
4960
4960
|
/* @__PURE__ */ e("span", { style: { fontSize: 11, color: "var(--text-3)", fontWeight: 500, flexShrink: 0, width: 68 }, children: "Text style" }),
|
|
@@ -4996,12 +4996,12 @@ function Cs({ el: n }) {
|
|
|
4996
4996
|
}
|
|
4997
4997
|
) })
|
|
4998
4998
|
] }),
|
|
4999
|
-
A && /* @__PURE__ */ e(
|
|
5000
|
-
/* @__PURE__ */ e(
|
|
5001
|
-
/* @__PURE__ */ e(
|
|
4999
|
+
A && /* @__PURE__ */ e(L, { label: "Line Height", children: /* @__PURE__ */ e(_, { type: "number", value: a.lineHeight ?? 1.2, onChange: (f) => o("lineHeight", Number(f)), suffix: "px" }) }),
|
|
5000
|
+
/* @__PURE__ */ e(L, { label: "Color", children: /* @__PURE__ */ e(hn, { value: a.color ?? "#000000", onChange: (f) => u("color", f) }) }),
|
|
5001
|
+
/* @__PURE__ */ e(L, { label: "Background", children: /* @__PURE__ */ e(hn, { value: a.backgroundColor ?? "", onChange: (f) => u("backgroundColor", f) }) }),
|
|
5002
5002
|
(n.type === "rectangle" || n.type === "table") && /* @__PURE__ */ m(X, { children: [
|
|
5003
|
-
/* @__PURE__ */ e(
|
|
5004
|
-
/* @__PURE__ */ e(
|
|
5003
|
+
/* @__PURE__ */ e(L, { label: "Border Color", children: /* @__PURE__ */ e(hn, { value: a.borderColor ?? "#cccccc", onChange: (f) => u("borderColor", f) }) }),
|
|
5004
|
+
/* @__PURE__ */ e(L, { label: "Border Width", children: /* @__PURE__ */ e(_, { type: "number", value: a.borderWidth ?? 1, onChange: (f) => o("borderWidth", Number(f)) }) })
|
|
5005
5005
|
] })
|
|
5006
5006
|
] })
|
|
5007
5007
|
] });
|
|
@@ -5011,7 +5011,7 @@ function xs({ el: n }) {
|
|
|
5011
5011
|
return n.type !== "line" ? null : /* @__PURE__ */ m(X, { children: [
|
|
5012
5012
|
/* @__PURE__ */ e(Pn, { children: "Line" }),
|
|
5013
5013
|
/* @__PURE__ */ m("div", { style: { padding: "0 14px", display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
5014
|
-
/* @__PURE__ */ e(
|
|
5014
|
+
/* @__PURE__ */ e(L, { label: "Direction", children: /* @__PURE__ */ e(
|
|
5015
5015
|
he,
|
|
5016
5016
|
{
|
|
5017
5017
|
value: n.direction ?? "horizontal",
|
|
@@ -5019,14 +5019,14 @@ function xs({ el: n }) {
|
|
|
5019
5019
|
options: [{ value: "horizontal", label: "Horizontal" }, { value: "vertical", label: "Vertical" }]
|
|
5020
5020
|
}
|
|
5021
5021
|
) }),
|
|
5022
|
-
/* @__PURE__ */ e(
|
|
5023
|
-
/* @__PURE__ */ e(
|
|
5022
|
+
/* @__PURE__ */ e(L, { label: "Color", children: /* @__PURE__ */ e(hn, { value: n.color ?? "#000000", onChange: (a) => i(n.id, { color: a }) }) }),
|
|
5023
|
+
/* @__PURE__ */ e(L, { label: "Thickness", children: /* @__PURE__ */ e(_, { type: "number", value: n.thickness ?? 1, onChange: (a) => r(n.id, { thickness: Number(a) }) }) })
|
|
5024
5024
|
] })
|
|
5025
5025
|
] });
|
|
5026
5026
|
}
|
|
5027
5027
|
const Bs = dr.filter((n) => n.category === "handwriting");
|
|
5028
5028
|
function Ss({ font: n, initial: r, onSave: i, onCancel: a }) {
|
|
5029
|
-
const o =
|
|
5029
|
+
const o = $(null), u = $(!1), [A, f] = Z(!1), d = () => o.current.getContext("2d");
|
|
5030
5030
|
an(() => {
|
|
5031
5031
|
const g = o.current;
|
|
5032
5032
|
if (!g) return;
|
|
@@ -5139,7 +5139,7 @@ function ks({ el: n }) {
|
|
|
5139
5139
|
onCancel: () => f(!1)
|
|
5140
5140
|
}
|
|
5141
5141
|
),
|
|
5142
|
-
!h && /* @__PURE__ */ e(
|
|
5142
|
+
!h && /* @__PURE__ */ e(L, { label: "Signature Font (typed name)", children: /* @__PURE__ */ e(
|
|
5143
5143
|
he,
|
|
5144
5144
|
{
|
|
5145
5145
|
value: n.scriptFont ?? "Great Vibes",
|
|
@@ -5148,23 +5148,23 @@ function ks({ el: n }) {
|
|
|
5148
5148
|
}
|
|
5149
5149
|
) }),
|
|
5150
5150
|
g("Signer details"),
|
|
5151
|
-
/* @__PURE__ */ e(
|
|
5151
|
+
/* @__PURE__ */ e(L, { label: "Signer Name", children: /* @__PURE__ */ m("div", { style: { display: "flex", gap: 6 }, children: [
|
|
5152
5152
|
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(_, { value: n.name ?? "", onChange: (b) => r(n.id, { name: b }), placeholder: "Jane Doe or {{signer.name}}" }) }),
|
|
5153
5153
|
/* @__PURE__ */ e(Cn, { groups: d, onPick: (b) => r(n.id, { name: (n.name ?? "") + b }) })
|
|
5154
5154
|
] }) }),
|
|
5155
|
-
/* @__PURE__ */ e(
|
|
5155
|
+
/* @__PURE__ */ e(L, { label: "Title / Subtext", children: /* @__PURE__ */ m("div", { style: { display: "flex", gap: 6 }, children: [
|
|
5156
5156
|
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(_, { value: n.title ?? "", onChange: (b) => r(n.id, { title: b }), placeholder: "CEO, Acme Inc." }) }),
|
|
5157
5157
|
/* @__PURE__ */ e(Cn, { groups: d, onPick: (b) => r(n.id, { title: (n.title ?? "") + b }) })
|
|
5158
5158
|
] }) }),
|
|
5159
5159
|
/* @__PURE__ */ m(Xn, { children: [
|
|
5160
|
-
/* @__PURE__ */ e(
|
|
5161
|
-
/* @__PURE__ */ e(
|
|
5160
|
+
/* @__PURE__ */ e(L, { label: "Label", children: /* @__PURE__ */ e(_, { value: n.label ?? "", onChange: (b) => r(n.id, { label: b || void 0 }), placeholder: "SIGNED BY" }) }),
|
|
5161
|
+
/* @__PURE__ */ e(L, { label: "Date", children: /* @__PURE__ */ m("div", { style: { display: "flex", gap: 6 }, children: [
|
|
5162
5162
|
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: /* @__PURE__ */ e(_, { value: n.date ?? "", onChange: (b) => r(n.id, { date: b || void 0 }), placeholder: "{{date}}" }) }),
|
|
5163
5163
|
/* @__PURE__ */ e(Cn, { groups: d, onPick: (b) => r(n.id, { date: (n.date ?? "") + b }) })
|
|
5164
5164
|
] }) })
|
|
5165
5165
|
] }),
|
|
5166
5166
|
g("Appearance"),
|
|
5167
|
-
/* @__PURE__ */ e(
|
|
5167
|
+
/* @__PURE__ */ e(L, { label: "Alignment", children: /* @__PURE__ */ e(
|
|
5168
5168
|
ce,
|
|
5169
5169
|
{
|
|
5170
5170
|
value: n.align ?? "left",
|
|
@@ -5177,8 +5177,8 @@ function ks({ el: n }) {
|
|
|
5177
5177
|
}
|
|
5178
5178
|
) }),
|
|
5179
5179
|
/* @__PURE__ */ m(Xn, { children: [
|
|
5180
|
-
/* @__PURE__ */ e(
|
|
5181
|
-
!h && /* @__PURE__ */ e(
|
|
5180
|
+
/* @__PURE__ */ e(L, { label: "Line Color", children: /* @__PURE__ */ e(hn, { value: n.lineColor ?? "#94a3b8", onChange: (b) => i(n.id, { lineColor: b }) }) }),
|
|
5181
|
+
!h && /* @__PURE__ */ e(L, { label: "Ink Color", children: /* @__PURE__ */ e(hn, { value: n.scriptColor ?? "#1e293b", onChange: (b) => i(n.id, { scriptColor: b }) }) })
|
|
5182
5182
|
] }),
|
|
5183
5183
|
/* @__PURE__ */ m("label", { style: { display: "flex", alignItems: "center", gap: 8, cursor: "pointer", marginTop: 2 }, children: [
|
|
5184
5184
|
/* @__PURE__ */ e(
|
|
@@ -5199,7 +5199,7 @@ function Qs({ el: n }) {
|
|
|
5199
5199
|
return /* @__PURE__ */ m(X, { children: [
|
|
5200
5200
|
/* @__PURE__ */ e(Pn, { children: "Visibility" }),
|
|
5201
5201
|
/* @__PURE__ */ m("div", { style: { padding: "0 14px", display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
5202
|
-
/* @__PURE__ */ e(
|
|
5202
|
+
/* @__PURE__ */ e(L, { label: "Condition (optional)", children: /* @__PURE__ */ e(_, { value: n.condition ?? "", onChange: (i) => r(n.id, { condition: i || void 0 }), placeholder: "{{status}} === 'active'" }) }),
|
|
5203
5203
|
/* @__PURE__ */ m("label", { style: { display: "flex", alignItems: "center", gap: 8, cursor: "pointer" }, children: [
|
|
5204
5204
|
/* @__PURE__ */ e(
|
|
5205
5205
|
"div",
|
|
@@ -6603,8 +6603,8 @@ function Xs() {
|
|
|
6603
6603
|
const x = C[S][0], Q = C[S][1];
|
|
6604
6604
|
for (let M = -1; M <= 7; M++)
|
|
6605
6605
|
if (!(x + M <= -1 || P <= x + M))
|
|
6606
|
-
for (let
|
|
6607
|
-
Q +
|
|
6606
|
+
for (let R = -1; R <= 7; R++)
|
|
6607
|
+
Q + R <= -1 || P <= Q + R || (M >= 0 && M <= 6 && (R === 0 || R === 6) || R >= 0 && R <= 6 && (M === 0 || M === 6) || M >= 2 && M <= 4 && R >= 2 && R <= 4 ? v.set(x + M, Q + R, !0, !0) : v.set(x + M, Q + R, !1, !0));
|
|
6608
6608
|
}
|
|
6609
6609
|
}
|
|
6610
6610
|
function p(v) {
|
|
@@ -6641,10 +6641,10 @@ function Xs() {
|
|
|
6641
6641
|
let C = -1, S = P - 1, x = 7, Q = 0;
|
|
6642
6642
|
for (let M = P - 1; M > 0; M -= 2)
|
|
6643
6643
|
for (M === 6 && M--; ; ) {
|
|
6644
|
-
for (let
|
|
6645
|
-
if (!v.isReserved(S, M -
|
|
6644
|
+
for (let R = 0; R < 2; R++)
|
|
6645
|
+
if (!v.isReserved(S, M - R)) {
|
|
6646
6646
|
let D = !1;
|
|
6647
|
-
Q < E.length && (D = (E[Q] >>> x & 1) === 1), v.set(S, M -
|
|
6647
|
+
Q < E.length && (D = (E[Q] >>> x & 1) === 1), v.set(S, M - R, D), x--, x === -1 && (Q++, x = 7);
|
|
6648
6648
|
}
|
|
6649
6649
|
if (S += C, S < 0 || P <= S) {
|
|
6650
6650
|
S -= C, C = -C;
|
|
@@ -6654,36 +6654,36 @@ function Xs() {
|
|
|
6654
6654
|
}
|
|
6655
6655
|
function k(v, E, P) {
|
|
6656
6656
|
const C = new i();
|
|
6657
|
-
P.forEach(function(
|
|
6658
|
-
C.put(
|
|
6657
|
+
P.forEach(function(R) {
|
|
6658
|
+
C.put(R.mode.bit, 4), C.put(R.getLength(), c.getCharCountIndicator(R.mode, v)), R.write(C);
|
|
6659
6659
|
});
|
|
6660
6660
|
const S = n.getSymbolTotalCodewords(v), x = f.getTotalCodewordsCount(v, E), Q = (S - x) * 8;
|
|
6661
6661
|
for (C.getLengthInBits() + 4 <= Q && C.put(0, 4); C.getLengthInBits() % 8 !== 0; )
|
|
6662
6662
|
C.putBit(0);
|
|
6663
6663
|
const M = (Q - C.getLengthInBits()) / 8;
|
|
6664
|
-
for (let
|
|
6665
|
-
C.put(
|
|
6664
|
+
for (let R = 0; R < M; R++)
|
|
6665
|
+
C.put(R % 2 ? 17 : 236, 8);
|
|
6666
6666
|
return B(C, v, E);
|
|
6667
6667
|
}
|
|
6668
6668
|
function B(v, E, P) {
|
|
6669
|
-
const C = n.getSymbolTotalCodewords(E), S = f.getTotalCodewordsCount(E, P), x = C - S, Q = f.getBlocksCount(E, P), M = C % Q,
|
|
6670
|
-
let
|
|
6671
|
-
const j = new Array(Q),
|
|
6669
|
+
const C = n.getSymbolTotalCodewords(E), S = f.getTotalCodewordsCount(E, P), x = C - S, Q = f.getBlocksCount(E, P), M = C % Q, R = Q - M, D = Math.floor(C / Q), H = Math.floor(x / Q), z = H + 1, q = D - H, N = new d(q);
|
|
6670
|
+
let G = 0;
|
|
6671
|
+
const j = new Array(Q), nn = new Array(Q);
|
|
6672
6672
|
let Y = 0;
|
|
6673
6673
|
const F = new Uint8Array(v.buffer);
|
|
6674
6674
|
for (let rn = 0; rn < Q; rn++) {
|
|
6675
|
-
const An = rn <
|
|
6676
|
-
j[rn] = F.slice(
|
|
6675
|
+
const An = rn < R ? H : z;
|
|
6676
|
+
j[rn] = F.slice(G, G + An), nn[rn] = N.encode(j[rn]), G += An, Y = Math.max(Y, An);
|
|
6677
6677
|
}
|
|
6678
|
-
const
|
|
6678
|
+
const T = new Uint8Array(C);
|
|
6679
6679
|
let U = 0, O, W;
|
|
6680
6680
|
for (O = 0; O < Y; O++)
|
|
6681
6681
|
for (W = 0; W < Q; W++)
|
|
6682
|
-
O < j[W].length && (
|
|
6682
|
+
O < j[W].length && (T[U++] = j[W][O]);
|
|
6683
6683
|
for (O = 0; O < q; O++)
|
|
6684
6684
|
for (W = 0; W < Q; W++)
|
|
6685
|
-
|
|
6686
|
-
return
|
|
6685
|
+
T[U++] = nn[W][O];
|
|
6686
|
+
return T;
|
|
6687
6687
|
}
|
|
6688
6688
|
function I(v, E, P, C) {
|
|
6689
6689
|
let S;
|
|
@@ -6692,8 +6692,8 @@ function Xs() {
|
|
|
6692
6692
|
else if (typeof v == "string") {
|
|
6693
6693
|
let D = E;
|
|
6694
6694
|
if (!D) {
|
|
6695
|
-
const
|
|
6696
|
-
D = t.getBestVersionForData(
|
|
6695
|
+
const H = l.rawSplit(v);
|
|
6696
|
+
D = t.getBestVersionForData(H, P);
|
|
6697
6697
|
}
|
|
6698
6698
|
S = l.fromString(v, D || 40);
|
|
6699
6699
|
} else
|
|
@@ -6710,12 +6710,12 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
6710
6710
|
Minimum version required to store current data is: ` + x + `.
|
|
6711
6711
|
`
|
|
6712
6712
|
);
|
|
6713
|
-
const Q = k(E, P, S), M = n.getSymbolSize(E),
|
|
6714
|
-
return h(
|
|
6715
|
-
|
|
6716
|
-
y.bind(null,
|
|
6717
|
-
)), A.applyMask(C,
|
|
6718
|
-
modules:
|
|
6713
|
+
const Q = k(E, P, S), M = n.getSymbolSize(E), R = new a(M);
|
|
6714
|
+
return h(R, E), p(R), g(R, E), y(R, P, 0), E >= 7 && b(R, E), w(R, Q), isNaN(C) && (C = A.getBestMask(
|
|
6715
|
+
R,
|
|
6716
|
+
y.bind(null, R, P)
|
|
6717
|
+
)), A.applyMask(C, R), y(R, P, C), {
|
|
6718
|
+
modules: R,
|
|
6719
6719
|
version: E,
|
|
6720
6720
|
errorCorrectionLevel: P,
|
|
6721
6721
|
maskPattern: C,
|
|
@@ -9552,10 +9552,10 @@ function Dl() {
|
|
|
9552
9552
|
var M = this;
|
|
9553
9553
|
return M._errorHandler.wrapBarcodeCall(function() {
|
|
9554
9554
|
Q.text = typeof Q.text > "u" ? void 0 : "" + Q.text;
|
|
9555
|
-
var
|
|
9556
|
-
|
|
9557
|
-
var D = C[S],
|
|
9558
|
-
return M._encodings.push(
|
|
9555
|
+
var R = (0, a.default)(M._options, Q);
|
|
9556
|
+
R = (0, c.default)(R);
|
|
9557
|
+
var D = C[S], H = v(x, D, R);
|
|
9558
|
+
return M._encodings.push(H), M;
|
|
9559
9559
|
});
|
|
9560
9560
|
};
|
|
9561
9561
|
}
|
|
@@ -9566,8 +9566,8 @@ function Dl() {
|
|
|
9566
9566
|
throw new p.InvalidInputException(Q.constructor.name, C);
|
|
9567
9567
|
var M = Q.encode();
|
|
9568
9568
|
M = (0, u.default)(M);
|
|
9569
|
-
for (var
|
|
9570
|
-
M[
|
|
9569
|
+
for (var R = 0; R < M.length; R++)
|
|
9570
|
+
M[R].options = (0, a.default)(x, M[R].options);
|
|
9571
9571
|
return M;
|
|
9572
9572
|
}
|
|
9573
9573
|
function E() {
|
|
@@ -9586,8 +9586,8 @@ function Dl() {
|
|
|
9586
9586
|
C = this._renderProperties[S];
|
|
9587
9587
|
var x = (0, a.default)(this._options, C.options);
|
|
9588
9588
|
x.format == "auto" && (x.format = E()), this._errorHandler.wrapBarcodeCall(function() {
|
|
9589
|
-
var Q = x.value, M = r.default[x.format.toUpperCase()],
|
|
9590
|
-
P(C,
|
|
9589
|
+
var Q = x.value, M = r.default[x.format.toUpperCase()], R = v(Q, M, x);
|
|
9590
|
+
P(C, R, x);
|
|
9591
9591
|
});
|
|
9592
9592
|
}
|
|
9593
9593
|
}
|
|
@@ -9606,8 +9606,8 @@ function Dl() {
|
|
|
9606
9606
|
for (var Q = 0; Q < S.length; Q++)
|
|
9607
9607
|
S[Q].options = (0, a.default)(x, S[Q].options), (0, f.default)(S[Q].options);
|
|
9608
9608
|
(0, f.default)(x);
|
|
9609
|
-
var M = C.renderer,
|
|
9610
|
-
|
|
9609
|
+
var M = C.renderer, R = new M(C.element, S, x);
|
|
9610
|
+
R.render(), C.afterRender && C.afterRender();
|
|
9611
9611
|
}
|
|
9612
9612
|
return typeof window < "u" && (window.JsBarcode = k), typeof jQuery < "u" && (jQuery.fn.JsBarcode = function(C, S) {
|
|
9613
9613
|
var x = [];
|
|
@@ -9769,44 +9769,44 @@ function Yl({ el: n }) {
|
|
|
9769
9769
|
}
|
|
9770
9770
|
function Xl({ el: n }) {
|
|
9771
9771
|
if (n.type !== "table") return null;
|
|
9772
|
-
const { updateElement: r, selectedId: i, zoom: a } = en(), o = i === n.id, u = n.style ?? {}, A = n.headerStyle ?? {}, f = n.altRowStyle ?? {}, d = n.previewRows ?? (n.dataSource ? [{}] : Array.from({ length: n.rowCount ?? 1 }, () => ({}))), t = n.columns.reduce((
|
|
9772
|
+
const { updateElement: r, selectedId: i, zoom: a } = en(), o = i === n.id, u = n.style ?? {}, A = n.headerStyle ?? {}, f = n.altRowStyle ?? {}, d = n.previewRows ?? (n.dataSource ? [{}] : Array.from({ length: n.rowCount ?? 1 }, () => ({}))), t = n.columns.reduce((G, j) => G + j.width, 0) || 1, [s, c] = Z(null), [l, h] = Z(null), [p, g] = Z(null), [b, y] = Z(null), [w, k] = Z(null), [B, I] = Z(null), v = $(null), E = (G) => {
|
|
9773
9773
|
if (d.length <= 1) return;
|
|
9774
|
-
const j = d.filter((
|
|
9774
|
+
const j = d.filter((nn, Y) => Y !== G);
|
|
9775
9775
|
r(n.id, { previewRows: j, rowCount: j.length });
|
|
9776
9776
|
}, P = () => {
|
|
9777
|
-
const
|
|
9778
|
-
r(n.id, { previewRows:
|
|
9779
|
-
}, C = (
|
|
9780
|
-
|
|
9781
|
-
const
|
|
9782
|
-
v.current = { colIdx: j, startX:
|
|
9783
|
-
const Y = (
|
|
9777
|
+
const G = [...d, {}];
|
|
9778
|
+
r(n.id, { previewRows: G, rowCount: G.length });
|
|
9779
|
+
}, C = (G, j) => {
|
|
9780
|
+
G.stopPropagation(), G.preventDefault();
|
|
9781
|
+
const nn = n.columns[j].width / t * n.width;
|
|
9782
|
+
v.current = { colIdx: j, startX: G.clientX, startDocWidth: nn };
|
|
9783
|
+
const Y = (T) => {
|
|
9784
9784
|
if (!v.current) return;
|
|
9785
|
-
const U = Math.max(24, v.current.startDocWidth + (
|
|
9785
|
+
const U = Math.max(24, v.current.startDocWidth + (T.clientX - v.current.startX) / (a || 1)), O = [...n.columns];
|
|
9786
9786
|
O[v.current.colIdx] = { ...O[v.current.colIdx], width: Math.max(20, U / n.width * t) }, r(n.id, { columns: O });
|
|
9787
9787
|
}, F = () => {
|
|
9788
9788
|
v.current = null, window.removeEventListener("mousemove", Y), window.removeEventListener("mouseup", F);
|
|
9789
9789
|
};
|
|
9790
9790
|
window.addEventListener("mousemove", Y), window.addEventListener("mouseup", F);
|
|
9791
|
-
}, S = (
|
|
9792
|
-
if (p === null || p ===
|
|
9791
|
+
}, S = (G) => {
|
|
9792
|
+
if (p === null || p === G) {
|
|
9793
9793
|
g(null), y(null);
|
|
9794
9794
|
return;
|
|
9795
9795
|
}
|
|
9796
|
-
const j = [...n.columns], [
|
|
9797
|
-
j.splice(
|
|
9798
|
-
}, x = (
|
|
9799
|
-
if (w === null || w ===
|
|
9796
|
+
const j = [...n.columns], [nn] = j.splice(p, 1);
|
|
9797
|
+
j.splice(G, 0, nn), r(n.id, { columns: j }), g(null), y(null);
|
|
9798
|
+
}, x = (G) => {
|
|
9799
|
+
if (w === null || w === G) {
|
|
9800
9800
|
k(null), I(null);
|
|
9801
9801
|
return;
|
|
9802
9802
|
}
|
|
9803
|
-
const j = [...d], [
|
|
9804
|
-
j.splice(
|
|
9805
|
-
}, Q = u.borderWidth ?? 0.5, M = u.borderColor ?? "#e2e8f0",
|
|
9806
|
-
return /* @__PURE__ */ e("div", { style: { width: "100%", fontSize:
|
|
9807
|
-
/* @__PURE__ */ e("colgroup", { children: n.columns.map((
|
|
9808
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: n.columns.map((
|
|
9809
|
-
const
|
|
9803
|
+
const j = [...d], [nn] = j.splice(w, 1);
|
|
9804
|
+
j.splice(G, 0, nn), r(n.id, { previewRows: j }), k(null), I(null);
|
|
9805
|
+
}, Q = u.borderWidth ?? 0.5, M = u.borderColor ?? "#e2e8f0", R = `${Q}px solid ${M}`, D = `${Math.max(Q, 1)}px solid ${M}`, H = u.padding ?? 6, z = u.fontSize ?? 10, q = A.backgroundColor ?? u.backgroundColor ?? "#f8fafc", N = 18;
|
|
9806
|
+
return /* @__PURE__ */ e("div", { style: { width: "100%", fontSize: z, fontFamily: "inherit", overflow: "visible" }, children: /* @__PURE__ */ m("table", { style: { borderCollapse: "collapse", tableLayout: "fixed", width: "100%", lineHeight: 1.4 }, children: [
|
|
9807
|
+
/* @__PURE__ */ e("colgroup", { children: n.columns.map((G, j) => /* @__PURE__ */ e("col", { style: { width: `${G.width / t * 100}%` } }, j)) }),
|
|
9808
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: n.columns.map((G, j) => {
|
|
9809
|
+
const nn = G.headerStyle ?? {}, Y = o && b === j, F = o && l === j, T = nn.padding ?? A.padding ?? H, U = j === n.columns.length - 1;
|
|
9810
9810
|
return /* @__PURE__ */ m(
|
|
9811
9811
|
"th",
|
|
9812
9812
|
{
|
|
@@ -9828,17 +9828,17 @@ function Xl({ el: n }) {
|
|
|
9828
9828
|
onClick: o ? (O) => O.stopPropagation() : void 0,
|
|
9829
9829
|
style: {
|
|
9830
9830
|
position: "relative",
|
|
9831
|
-
border: Y ? "2px solid var(--accent, #6c63ff)" :
|
|
9831
|
+
border: Y ? "2px solid var(--accent, #6c63ff)" : R,
|
|
9832
9832
|
borderBottom: Y ? "2px solid var(--accent, #6c63ff)" : D,
|
|
9833
9833
|
// Last header: overflow visible so resize handle doesn't clip
|
|
9834
9834
|
overflow: U ? "visible" : "hidden",
|
|
9835
|
-
padding: `${
|
|
9836
|
-
textAlign:
|
|
9837
|
-
fontWeight:
|
|
9838
|
-
fontStyle:
|
|
9839
|
-
fontSize: `${
|
|
9840
|
-
color: Y ? "var(--accent, #6c63ff)" :
|
|
9841
|
-
backgroundColor: Y ? "var(--accent-dim, rgba(108,99,255,0.07))" :
|
|
9835
|
+
padding: `${T}px`,
|
|
9836
|
+
textAlign: nn.textAlign ?? A.textAlign ?? G.align ?? "left",
|
|
9837
|
+
fontWeight: nn.fontWeight ?? A.fontWeight ?? "bold",
|
|
9838
|
+
fontStyle: nn.fontStyle ?? A.fontStyle ?? "normal",
|
|
9839
|
+
fontSize: `${nn.fontSize ?? A.fontSize ?? z}px`,
|
|
9840
|
+
color: Y ? "var(--accent, #6c63ff)" : nn.color ?? A.color ?? u.color ?? "#1e293b",
|
|
9841
|
+
backgroundColor: Y ? "var(--accent-dim, rgba(108,99,255,0.07))" : nn.backgroundColor ?? q,
|
|
9842
9842
|
cursor: o ? "grab" : "default",
|
|
9843
9843
|
userSelect: "none",
|
|
9844
9844
|
whiteSpace: "nowrap",
|
|
@@ -9846,7 +9846,7 @@ function Xl({ el: n }) {
|
|
|
9846
9846
|
transition: "background-color 0.12s, color 0.12s, opacity 0.12s"
|
|
9847
9847
|
},
|
|
9848
9848
|
children: [
|
|
9849
|
-
|
|
9849
|
+
G.label || /* @__PURE__ */ m("span", { style: { color: "rgba(100,116,139,0.4)", fontStyle: "italic", fontWeight: 400, letterSpacing: 0 }, children: [
|
|
9850
9850
|
"Column ",
|
|
9851
9851
|
j + 1
|
|
9852
9852
|
] }),
|
|
@@ -9881,14 +9881,14 @@ function Xl({ el: n }) {
|
|
|
9881
9881
|
j
|
|
9882
9882
|
);
|
|
9883
9883
|
}) }) }),
|
|
9884
|
-
/* @__PURE__ */ e("tbody", { children: d.map((
|
|
9885
|
-
const Y = j % 2 === 1 ? f.backgroundColor ?? "rgba(0,0,0,0.022)" : u.backgroundColor ?? "transparent", F = o && s === j,
|
|
9884
|
+
/* @__PURE__ */ e("tbody", { children: d.map((G, j) => {
|
|
9885
|
+
const Y = j % 2 === 1 ? f.backgroundColor ?? "rgba(0,0,0,0.022)" : u.backgroundColor ?? "transparent", F = o && s === j, T = o && B === j;
|
|
9886
9886
|
return /* @__PURE__ */ e(
|
|
9887
9887
|
"tr",
|
|
9888
9888
|
{
|
|
9889
9889
|
style: {
|
|
9890
|
-
background:
|
|
9891
|
-
outline:
|
|
9890
|
+
background: T ? "var(--accent-dim, rgba(108,99,255,0.07))" : F ? "rgba(0,0,0,0.025)" : Y,
|
|
9891
|
+
outline: T ? "1.5px solid var(--accent, #6c63ff)" : "none",
|
|
9892
9892
|
outlineOffset: -1,
|
|
9893
9893
|
opacity: o && w === j ? 0.35 : 1,
|
|
9894
9894
|
transition: "background 0.08s, opacity 0.1s"
|
|
@@ -9902,7 +9902,7 @@ function Xl({ el: n }) {
|
|
|
9902
9902
|
O.stopPropagation(), x(j);
|
|
9903
9903
|
} : void 0,
|
|
9904
9904
|
children: n.columns.map((O, W) => {
|
|
9905
|
-
const rn = O.style ?? {}, An = W === 0, pn = W === n.columns.length - 1, mn = O.key, Mn = rn.padding ??
|
|
9905
|
+
const rn = O.style ?? {}, An = W === 0, pn = W === n.columns.length - 1, mn = O.key, Mn = rn.padding ?? H, On = o && (An || pn);
|
|
9906
9906
|
return /* @__PURE__ */ m(
|
|
9907
9907
|
"td",
|
|
9908
9908
|
{
|
|
@@ -9910,9 +9910,9 @@ function Xl({ el: n }) {
|
|
|
9910
9910
|
style: {
|
|
9911
9911
|
position: "relative",
|
|
9912
9912
|
overflow: On ? "visible" : "hidden",
|
|
9913
|
-
border:
|
|
9913
|
+
border: R,
|
|
9914
9914
|
padding: `${Mn}px`,
|
|
9915
|
-
fontSize: `${rn.fontSize ??
|
|
9915
|
+
fontSize: `${rn.fontSize ?? z}px`,
|
|
9916
9916
|
fontWeight: rn.fontWeight ?? "normal",
|
|
9917
9917
|
fontStyle: rn.fontStyle === "italic" ? "italic" : "normal",
|
|
9918
9918
|
textAlign: rn.textAlign ?? O.align ?? "left",
|
|
@@ -10026,17 +10026,17 @@ function Xl({ el: n }) {
|
|
|
10026
10026
|
"td",
|
|
10027
10027
|
{
|
|
10028
10028
|
colSpan: n.columns.length,
|
|
10029
|
-
onClick: (
|
|
10030
|
-
|
|
10029
|
+
onClick: (G) => {
|
|
10030
|
+
G.stopPropagation(), P();
|
|
10031
10031
|
},
|
|
10032
|
-
onMouseDown: (
|
|
10032
|
+
onMouseDown: (G) => G.stopPropagation(),
|
|
10033
10033
|
style: {
|
|
10034
10034
|
border: "1.5px dashed var(--accent, #6c63ff)",
|
|
10035
10035
|
borderTop: "none",
|
|
10036
10036
|
padding: "5px 10px",
|
|
10037
10037
|
textAlign: "center",
|
|
10038
10038
|
cursor: "pointer",
|
|
10039
|
-
fontSize: `${
|
|
10039
|
+
fontSize: `${z * 0.95}px`,
|
|
10040
10040
|
color: "var(--accent, #6c63ff)",
|
|
10041
10041
|
fontWeight: 600,
|
|
10042
10042
|
letterSpacing: "0.02em",
|
|
@@ -10044,11 +10044,11 @@ function Xl({ el: n }) {
|
|
|
10044
10044
|
background: "transparent",
|
|
10045
10045
|
transition: "background 0.1s"
|
|
10046
10046
|
},
|
|
10047
|
-
onMouseEnter: (
|
|
10048
|
-
|
|
10047
|
+
onMouseEnter: (G) => {
|
|
10048
|
+
G.currentTarget.style.background = "var(--accent-dim, rgba(108,99,255,0.06))";
|
|
10049
10049
|
},
|
|
10050
|
-
onMouseLeave: (
|
|
10051
|
-
|
|
10050
|
+
onMouseLeave: (G) => {
|
|
10051
|
+
G.currentTarget.style.background = "transparent";
|
|
10052
10052
|
},
|
|
10053
10053
|
children: "+ Add Row"
|
|
10054
10054
|
}
|
|
@@ -10188,7 +10188,7 @@ function n0({ el: n }) {
|
|
|
10188
10188
|
}
|
|
10189
10189
|
function e0({ el: n }) {
|
|
10190
10190
|
if (n.type !== "qrcode") return null;
|
|
10191
|
-
const r =
|
|
10191
|
+
const r = $(null), i = n.value || "https://example.com", a = n.horizontalAlign ?? "center", o = n.verticalAlign ?? "middle", u = a === "left" ? "flex-start" : a === "right" ? "flex-end" : "center", A = o === "top" ? "flex-start" : o === "bottom" ? "flex-end" : "center";
|
|
10192
10192
|
return an(() => {
|
|
10193
10193
|
r.current && nl.toCanvas(r.current, i, {
|
|
10194
10194
|
width: Math.min(n.width, n.height),
|
|
@@ -10200,7 +10200,7 @@ function e0({ el: n }) {
|
|
|
10200
10200
|
}
|
|
10201
10201
|
function t0({ el: n }) {
|
|
10202
10202
|
if (n.type !== "barcode") return null;
|
|
10203
|
-
const r =
|
|
10203
|
+
const r = $(null), i = n.value || "12345", a = n.format || "CODE128", o = n.horizontalAlign ?? "center", u = n.verticalAlign ?? "middle", A = o === "left" ? "flex-start" : o === "right" ? "flex-end" : "center", f = u === "top" ? "flex-start" : u === "bottom" ? "flex-end" : "center";
|
|
10204
10204
|
return an(() => {
|
|
10205
10205
|
if (r.current)
|
|
10206
10206
|
try {
|
|
@@ -10354,12 +10354,12 @@ function ui(n, r, i, a, o, u, A) {
|
|
|
10354
10354
|
for (const C of o) {
|
|
10355
10355
|
const S = [C.x, C.x + C.width / 2, C.x + C.width], x = [C.y, C.y + C.height / 2, C.y + C.height];
|
|
10356
10356
|
for (const Q of f) for (const M of S) {
|
|
10357
|
-
const
|
|
10358
|
-
Math.abs(
|
|
10357
|
+
const R = M - Q;
|
|
10358
|
+
Math.abs(R) < Math.abs(c) && (c = R, h = R);
|
|
10359
10359
|
}
|
|
10360
10360
|
for (const Q of d) for (const M of x) {
|
|
10361
|
-
const
|
|
10362
|
-
Math.abs(
|
|
10361
|
+
const R = M - Q;
|
|
10362
|
+
Math.abs(R) < Math.abs(l) && (l = R, p = R);
|
|
10363
10363
|
}
|
|
10364
10364
|
}
|
|
10365
10365
|
Math.abs(c) > si && (h = 0), Math.abs(l) > si && (p = 0);
|
|
@@ -10378,8 +10378,8 @@ function ui(n, r, i, a, o, u, A) {
|
|
|
10378
10378
|
const C = [I, I + i / 2, I + i], S = [v, v + a / 2, v + a];
|
|
10379
10379
|
for (const x of o) {
|
|
10380
10380
|
const Q = [x.x, x.x + x.width / 2, x.x + x.width], M = [x.y, x.y + x.height / 2, x.y + x.height];
|
|
10381
|
-
for (const
|
|
10382
|
-
for (const
|
|
10381
|
+
for (const R of C) for (const D of Q) Math.abs(R - D) < 2 && E.add(Math.round(D));
|
|
10382
|
+
for (const R of S) for (const D of M) Math.abs(R - D) < 2 && P.add(Math.round(D));
|
|
10383
10383
|
}
|
|
10384
10384
|
for (const x of C) for (const Q of t) Math.abs(x - Q) < 2 && E.add(Math.round(Q));
|
|
10385
10385
|
for (const x of S) for (const Q of s) Math.abs(x - Q) < 2 && P.add(Math.round(Q));
|
|
@@ -10445,7 +10445,7 @@ function bt({ el: n, zoom: r, sectionWidth: i, sectionHeight: a, parentId: o })
|
|
|
10445
10445
|
bringForward: g,
|
|
10446
10446
|
sendBack: b,
|
|
10447
10447
|
template: y
|
|
10448
|
-
} = en(), { set: w, clear: k } = Gi(), B = A.includes(n.id), I = u === n.id, v = A.length > 1, E = n.type === "pagebreak", P = n.type === "table", C = n.type === "container", S = !!o, x =
|
|
10448
|
+
} = en(), { set: w, clear: k } = Gi(), B = A.includes(n.id), I = u === n.id, v = A.length > 1, E = n.type === "pagebreak", P = n.type === "table", C = n.type === "container", S = !!o, x = $(null), Q = $(null), M = $(null), [R, D] = Z(null), { canBringForward: H, canSendBack: z } = (() => {
|
|
10449
10449
|
var rn, An;
|
|
10450
10450
|
const U = Ln(y, n.id);
|
|
10451
10451
|
if (!U) return { canBringForward: !1, canSendBack: !1 };
|
|
@@ -10453,14 +10453,14 @@ function bt({ el: n, zoom: r, sectionWidth: i, sectionHeight: a, parentId: o })
|
|
|
10453
10453
|
return { canBringForward: W >= 0 && W < O.length - 1, canSendBack: W > 0 };
|
|
10454
10454
|
})();
|
|
10455
10455
|
an(() => {
|
|
10456
|
-
if (!
|
|
10456
|
+
if (!R) return;
|
|
10457
10457
|
const U = () => D(null), O = (W) => {
|
|
10458
10458
|
W.key === "Escape" && U();
|
|
10459
10459
|
};
|
|
10460
10460
|
return window.addEventListener("mousedown", U), window.addEventListener("keydown", O), () => {
|
|
10461
10461
|
window.removeEventListener("mousedown", U), window.removeEventListener("keydown", O);
|
|
10462
10462
|
};
|
|
10463
|
-
}, [
|
|
10463
|
+
}, [R]);
|
|
10464
10464
|
const q = (U) => {
|
|
10465
10465
|
U.preventDefault(), U.stopPropagation(), f(n.id), D({ x: U.clientX, y: U.clientY });
|
|
10466
10466
|
};
|
|
@@ -10524,7 +10524,7 @@ function bt({ el: n, zoom: r, sectionWidth: i, sectionHeight: a, parentId: o })
|
|
|
10524
10524
|
x.current = null, k(), window.removeEventListener("mousemove", Mn), window.removeEventListener("mouseup", On);
|
|
10525
10525
|
};
|
|
10526
10526
|
window.addEventListener("mousemove", Mn), window.addEventListener("mouseup", On);
|
|
10527
|
-
},
|
|
10527
|
+
}, G = (U, O) => {
|
|
10528
10528
|
U.stopPropagation(), U.preventDefault(), Q.current = { handle: O, mx: U.clientX, my: U.clientY, x: n.x, y: n.y, w: n.width, h: n.height };
|
|
10529
10529
|
let W = !1;
|
|
10530
10530
|
const rn = (pn) => {
|
|
@@ -10551,7 +10551,7 @@ function bt({ el: n, zoom: r, sectionWidth: i, sectionHeight: a, parentId: o })
|
|
|
10551
10551
|
if (W.type === "pagebreak") return;
|
|
10552
10552
|
const rn = U.currentTarget.getBoundingClientRect(), An = W.width ?? 120, pn = W.height ?? 24, mn = wn(Math.round((U.clientX - rn.left) / r), 0, Math.max(0, n.width - An)), Mn = wn(Math.round((U.clientY - rn.top) / r), 0, Math.max(0, n.height - pn));
|
|
10553
10553
|
l(n.id, { ...W, x: mn, y: Mn, width: An, height: pn });
|
|
10554
|
-
},
|
|
10554
|
+
}, nn = E ? s0 : P ? l0 : yr, Y = C && n.type === "container" && n.dataSource ? n.dataSource : null, F = R ? Math.min(R.x, window.innerWidth - 184) : 0, T = R ? Math.min(R.y, window.innerHeight - 134) : 0;
|
|
10555
10555
|
return /* @__PURE__ */ m(X, { children: [
|
|
10556
10556
|
/* @__PURE__ */ m(
|
|
10557
10557
|
"div",
|
|
@@ -10610,19 +10610,19 @@ function bt({ el: n, zoom: r, sectionWidth: i, sectionHeight: a, parentId: o })
|
|
|
10610
10610
|
Y,
|
|
10611
10611
|
"[ ]"
|
|
10612
10612
|
] }),
|
|
10613
|
-
I && !n.locked && !v &&
|
|
10613
|
+
I && !n.locked && !v && nn.map((U) => /* @__PURE__ */ e(
|
|
10614
10614
|
"div",
|
|
10615
10615
|
{
|
|
10616
10616
|
className: "resize-handle",
|
|
10617
10617
|
style: { ...U },
|
|
10618
|
-
onMouseDown: (O) =>
|
|
10618
|
+
onMouseDown: (O) => G(O, U.id)
|
|
10619
10619
|
},
|
|
10620
10620
|
U.id
|
|
10621
10621
|
))
|
|
10622
10622
|
]
|
|
10623
10623
|
}
|
|
10624
10624
|
),
|
|
10625
|
-
|
|
10625
|
+
R && fr(
|
|
10626
10626
|
/* @__PURE__ */ e(
|
|
10627
10627
|
"div",
|
|
10628
10628
|
{
|
|
@@ -10630,7 +10630,7 @@ function bt({ el: n, zoom: r, sectionWidth: i, sectionHeight: a, parentId: o })
|
|
|
10630
10630
|
style: {
|
|
10631
10631
|
position: "fixed",
|
|
10632
10632
|
left: F,
|
|
10633
|
-
top:
|
|
10633
|
+
top: T,
|
|
10634
10634
|
zIndex: 99999,
|
|
10635
10635
|
background: "var(--panel)",
|
|
10636
10636
|
border: "1px solid var(--border-h)",
|
|
@@ -10657,10 +10657,10 @@ function bt({ el: n, zoom: r, sectionWidth: i, sectionHeight: a, parentId: o })
|
|
|
10657
10657
|
p(), D(null);
|
|
10658
10658
|
} }),
|
|
10659
10659
|
/* @__PURE__ */ e("div", { style: { height: 1, background: "var(--border)", margin: "4px 0" } }),
|
|
10660
|
-
/* @__PURE__ */ e(Ce, { label: "Bring Forward", hint: "Ctrl+]", disabled: !
|
|
10660
|
+
/* @__PURE__ */ e(Ce, { label: "Bring Forward", hint: "Ctrl+]", disabled: !H, onClick: () => {
|
|
10661
10661
|
g(), D(null);
|
|
10662
10662
|
} }),
|
|
10663
|
-
/* @__PURE__ */ e(Ce, { label: "Send Back", hint: "Ctrl+[", disabled: !
|
|
10663
|
+
/* @__PURE__ */ e(Ce, { label: "Send Back", hint: "Ctrl+[", disabled: !z, onClick: () => {
|
|
10664
10664
|
b(), D(null);
|
|
10665
10665
|
} })
|
|
10666
10666
|
] })
|
|
@@ -10706,22 +10706,22 @@ const A0 = {
|
|
|
10706
10706
|
{ id: "se", cursor: "se-resize", bottom: -5, right: -5 }
|
|
10707
10707
|
];
|
|
10708
10708
|
function g0({ wm: n, pageWidth: r, pageHeight: i, zoom: a, updateWm: o, editable: u }) {
|
|
10709
|
-
const A =
|
|
10709
|
+
const A = $(null), f = $(null), d = $(null), [t, s] = Z([]), c = (v, E, P) => Math.max(E, Math.min(P, v)), l = n.imageSrc ?? "", h = n.logoWidth ?? 200, p = n.logoHeight ?? 200, g = n.logoX ?? Math.round((r - h) / 2), b = n.logoY ?? Math.round((i - p) / 2), y = 6, w = (v, E) => {
|
|
10710
10710
|
const P = [0, r / 2, r], C = [0, i / 2, i], S = [v, v + h / 2, v + h], x = [E, E + p / 2, E + p];
|
|
10711
10711
|
let Q = v, M = E;
|
|
10712
|
-
const
|
|
10713
|
-
let D = 1 / 0,
|
|
10714
|
-
for (const N of S) for (const
|
|
10715
|
-
const j =
|
|
10716
|
-
Math.abs(j) < Math.abs(D) && (D = j,
|
|
10717
|
-
}
|
|
10718
|
-
Math.abs(D) <= y &&
|
|
10719
|
-
let
|
|
10720
|
-
for (const N of x) for (const
|
|
10721
|
-
const j =
|
|
10722
|
-
Math.abs(j) < Math.abs(
|
|
10723
|
-
}
|
|
10724
|
-
return Math.abs(
|
|
10712
|
+
const R = [];
|
|
10713
|
+
let D = 1 / 0, H = null;
|
|
10714
|
+
for (const N of S) for (const G of P) {
|
|
10715
|
+
const j = G - N;
|
|
10716
|
+
Math.abs(j) < Math.abs(D) && (D = j, H = G);
|
|
10717
|
+
}
|
|
10718
|
+
Math.abs(D) <= y && H !== null && (Q = v + D, R.push({ axis: "v", pos: H }));
|
|
10719
|
+
let z = 1 / 0, q = null;
|
|
10720
|
+
for (const N of x) for (const G of C) {
|
|
10721
|
+
const j = G - N;
|
|
10722
|
+
Math.abs(j) < Math.abs(z) && (z = j, q = G);
|
|
10723
|
+
}
|
|
10724
|
+
return Math.abs(z) <= y && q !== null && (M = E + z, R.push({ axis: "h", pos: q })), { x: Q, y: M, guides: R };
|
|
10725
10725
|
};
|
|
10726
10726
|
if (!l)
|
|
10727
10727
|
return u ? /* @__PURE__ */ e("div", { style: {
|
|
@@ -10763,8 +10763,8 @@ function g0({ wm: n, pageWidth: r, pageHeight: i, zoom: a, updateWm: o, editable
|
|
|
10763
10763
|
const x = d.current;
|
|
10764
10764
|
if (!x) return;
|
|
10765
10765
|
const Q = (S.clientX - x.mx) / a, M = (S.clientY - x.my) / a;
|
|
10766
|
-
let
|
|
10767
|
-
E.includes("e") && (
|
|
10766
|
+
let R = x.x, D = x.y, H = x.w, z = x.h;
|
|
10767
|
+
E.includes("e") && (H = Math.max(20, x.w + Q)), E.includes("w") && (H = Math.max(20, x.w - Q), R = x.x + (x.w - H)), E.includes("s") && (z = Math.max(20, x.h + M)), E.includes("n") && (z = Math.max(20, x.h - M), D = x.y + (x.h - z)), R = c(Math.round(R), 0, r - 20), D = c(Math.round(D), 0, i - 20), H = c(Math.round(H), 20, r - R), z = c(Math.round(z), 20, i - D), o({ logoX: R, logoY: D, logoWidth: H, logoHeight: z });
|
|
10768
10768
|
}, C = () => {
|
|
10769
10769
|
d.current = null, window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", C);
|
|
10770
10770
|
};
|
|
@@ -10920,8 +10920,8 @@ function cr({
|
|
|
10920
10920
|
] });
|
|
10921
10921
|
}
|
|
10922
10922
|
function m0() {
|
|
10923
|
-
var
|
|
10924
|
-
const { template: n, zoom: r, selectElement: i, setSelectedIds: a, addElement: o, activeSection: u, updatePage: A } = en(), f =
|
|
10923
|
+
var T, U, O, W, rn, An, pn, mn, Mn, On, K;
|
|
10924
|
+
const { template: n, zoom: r, selectElement: i, setSelectedIds: a, addElement: o, activeSection: u, updatePage: A } = en(), f = $(null), d = $(null), t = $(null), { guides: s, elBounds: c } = Gi(), [l, h] = Z(null), p = $(null), g = (J, dn, bn) => {
|
|
10925
10925
|
const vn = J.getBoundingClientRect();
|
|
10926
10926
|
return { x: (dn - vn.left) / r, y: (bn - vn.top) / r };
|
|
10927
10927
|
}, b = (J) => (dn) => {
|
|
@@ -10946,21 +10946,21 @@ function m0() {
|
|
|
10946
10946
|
br.length > 0 ? a(br) : i(null);
|
|
10947
10947
|
};
|
|
10948
10948
|
window.addEventListener("mousemove", gn), window.addEventListener("mouseup", on);
|
|
10949
|
-
}, y = n.page ?? {}, w = y.size ?? "A4", k = y.orientation === "landscape", B = y.margin ?? { top: 0, right: 0, bottom: 0, left: 0 }, [I, v] = A0[w] ?? [794, 1123], E = k ? v : I, P = k ? I : v, C = y.customHeight ?? P, S = B.left ?? 0, x = B.right ?? 0, Q = B.top ?? 0, M = B.bottom ?? 0,
|
|
10949
|
+
}, y = n.page ?? {}, w = y.size ?? "A4", k = y.orientation === "landscape", B = y.margin ?? { top: 0, right: 0, bottom: 0, left: 0 }, [I, v] = A0[w] ?? [794, 1123], E = k ? v : I, P = k ? I : v, C = y.customHeight ?? P, S = B.left ?? 0, x = B.right ?? 0, Q = B.top ?? 0, M = B.bottom ?? 0, R = Math.max(100, E - S - x), D = Math.max(200, C - Q - M), H = ((T = n.header) == null ? void 0 : T.enabled) !== !1, z = ((U = n.footer) == null ? void 0 : U.enabled) !== !1, q = H ? ((O = n.header) == null ? void 0 : O.height) ?? 60 : 0, N = z ? ((W = n.footer) == null ? void 0 : W.height) ?? 40 : 0, G = Math.max(100, D - q - N), j = (J, dn, bn) => (vn) => {
|
|
10950
10950
|
vn.preventDefault();
|
|
10951
10951
|
const Qn = vn.dataTransfer.getData("application/reportforge");
|
|
10952
10952
|
if (!Qn) return;
|
|
10953
|
-
const gn = JSON.parse(Qn), on = J.current.getBoundingClientRect(), sn = gn.width ?? 200, tn = gn.height ?? 30, ln = gn.type === "pagebreak", fn = ln ? 0 : Math.max(0, Math.min(Math.round((vn.clientX - on.left) / r),
|
|
10953
|
+
const gn = JSON.parse(Qn), on = J.current.getBoundingClientRect(), sn = gn.width ?? 200, tn = gn.height ?? 30, ln = gn.type === "pagebreak", fn = ln ? 0 : Math.max(0, Math.min(Math.round((vn.clientX - on.left) / r), R - sn));
|
|
10954
10954
|
let In = Math.max(0, Math.min(Math.round((vn.clientY - on.top) / r), bn - tn));
|
|
10955
|
-
const Rn =
|
|
10955
|
+
const Rn = nn[dn];
|
|
10956
10956
|
if (ln)
|
|
10957
10957
|
for (const un of Rn)
|
|
10958
10958
|
un.type !== "pagebreak" && In < un.y + un.height && In + tn > un.y && (In = un.y + un.height);
|
|
10959
10959
|
else
|
|
10960
10960
|
for (const un of Rn)
|
|
10961
10961
|
un.type === "pagebreak" && In < un.y + un.height && In + tn > un.y && (In = un.y + un.height);
|
|
10962
|
-
In = Math.max(0, Math.min(In, bn - tn)), o({ ...gn, x: fn, y: In, width: ln ?
|
|
10963
|
-
},
|
|
10962
|
+
In = Math.max(0, Math.min(In, bn - tn)), o({ ...gn, x: fn, y: In, width: ln ? R : sn });
|
|
10963
|
+
}, nn = {
|
|
10964
10964
|
header: ((rn = n.header) == null ? void 0 : rn.elements) ?? [],
|
|
10965
10965
|
body: n.body.elements,
|
|
10966
10966
|
footer: ((An = n.footer) == null ? void 0 : An.elements) ?? []
|
|
@@ -10993,15 +10993,15 @@ function m0() {
|
|
|
10993
10993
|
position: "absolute",
|
|
10994
10994
|
top: Q,
|
|
10995
10995
|
left: S,
|
|
10996
|
-
width:
|
|
10996
|
+
width: R,
|
|
10997
10997
|
background: "white"
|
|
10998
10998
|
}, children: [
|
|
10999
|
-
|
|
10999
|
+
H ? /* @__PURE__ */ m(
|
|
11000
11000
|
"div",
|
|
11001
11001
|
{
|
|
11002
11002
|
ref: f,
|
|
11003
11003
|
style: {
|
|
11004
|
-
width:
|
|
11004
|
+
width: R,
|
|
11005
11005
|
height: q,
|
|
11006
11006
|
position: "relative",
|
|
11007
11007
|
background: "#ffffff",
|
|
@@ -11012,7 +11012,7 @@ function m0() {
|
|
|
11012
11012
|
onMouseDown: Y("header") ? b("header") : void 0,
|
|
11013
11013
|
children: [
|
|
11014
11014
|
((Mn = n.page) == null ? void 0 : Mn.showGrid) !== !1 && /* @__PURE__ */ e("div", { style: { position: "absolute", inset: 0, pointerEvents: "none", zIndex: 0, backgroundImage: "radial-gradient(circle, rgba(0,0,0,0.07) 1px, transparent 1px)", backgroundSize: "20px 20px" } }),
|
|
11015
|
-
|
|
11015
|
+
nn.header.map((J) => /* @__PURE__ */ e(bt, { el: J, zoom: r, sectionWidth: R, sectionHeight: q }, J.id)),
|
|
11016
11016
|
Y("header") && /* @__PURE__ */ e(cr, { guides: s, elBounds: c }),
|
|
11017
11017
|
(l == null ? void 0 : l.section) === "header" && /* @__PURE__ */ e(ur, { x1: l.x1, y1: l.y1, x2: l.x2, y2: l.y2 }),
|
|
11018
11018
|
!Y("header") && /* @__PURE__ */ e("div", { style: { position: "absolute", inset: 0, background: "rgba(0,0,0,0.07)", zIndex: 10, cursor: "default" } })
|
|
@@ -11024,14 +11024,14 @@ function m0() {
|
|
|
11024
11024
|
{
|
|
11025
11025
|
ref: d,
|
|
11026
11026
|
style: {
|
|
11027
|
-
width:
|
|
11028
|
-
height:
|
|
11027
|
+
width: R,
|
|
11028
|
+
height: G,
|
|
11029
11029
|
position: "relative",
|
|
11030
11030
|
background: "#ffffff",
|
|
11031
11031
|
outline: "none",
|
|
11032
11032
|
outlineOffset: -1
|
|
11033
11033
|
},
|
|
11034
|
-
onDrop: Y("body") ? j(d, "body",
|
|
11034
|
+
onDrop: Y("body") ? j(d, "body", G) : void 0,
|
|
11035
11035
|
onDragOver: Y("body") ? (J) => J.preventDefault() : void 0,
|
|
11036
11036
|
onMouseDown: Y("body") ? b("body") : void 0,
|
|
11037
11037
|
children: [
|
|
@@ -11043,19 +11043,19 @@ function m0() {
|
|
|
11043
11043
|
backgroundImage: "radial-gradient(circle, rgba(0,0,0,0.07) 1px, transparent 1px)",
|
|
11044
11044
|
backgroundSize: "20px 20px"
|
|
11045
11045
|
} }),
|
|
11046
|
-
|
|
11046
|
+
nn.body.map((J) => /* @__PURE__ */ e(bt, { el: J, zoom: r, sectionWidth: R, sectionHeight: G }, J.id)),
|
|
11047
11047
|
Y("body") && /* @__PURE__ */ e(cr, { guides: s, elBounds: c }),
|
|
11048
11048
|
(l == null ? void 0 : l.section) === "body" && /* @__PURE__ */ e(ur, { x1: l.x1, y1: l.y1, x2: l.x2, y2: l.y2 }),
|
|
11049
11049
|
!Y("body") && /* @__PURE__ */ e("div", { style: { position: "absolute", inset: 0, background: "rgba(0,0,0,0.07)", zIndex: 10, cursor: "default" } })
|
|
11050
11050
|
]
|
|
11051
11051
|
}
|
|
11052
11052
|
),
|
|
11053
|
-
|
|
11053
|
+
z ? /* @__PURE__ */ m(
|
|
11054
11054
|
"div",
|
|
11055
11055
|
{
|
|
11056
11056
|
ref: t,
|
|
11057
11057
|
style: {
|
|
11058
|
-
width:
|
|
11058
|
+
width: R,
|
|
11059
11059
|
height: N,
|
|
11060
11060
|
position: "relative",
|
|
11061
11061
|
background: "#ffffff",
|
|
@@ -11066,7 +11066,7 @@ function m0() {
|
|
|
11066
11066
|
onMouseDown: Y("footer") ? b("footer") : void 0,
|
|
11067
11067
|
children: [
|
|
11068
11068
|
((K = n.page) == null ? void 0 : K.showGrid) !== !1 && /* @__PURE__ */ e("div", { style: { position: "absolute", inset: 0, pointerEvents: "none", zIndex: 0, backgroundImage: "radial-gradient(circle, rgba(0,0,0,0.07) 1px, transparent 1px)", backgroundSize: "20px 20px" } }),
|
|
11069
|
-
|
|
11069
|
+
nn.footer.map((J) => /* @__PURE__ */ e(bt, { el: J, zoom: r, sectionWidth: R, sectionHeight: N }, J.id)),
|
|
11070
11070
|
Y("footer") && /* @__PURE__ */ e(cr, { guides: s, elBounds: c }),
|
|
11071
11071
|
(l == null ? void 0 : l.section) === "footer" && /* @__PURE__ */ e(ur, { x1: l.x1, y1: l.y1, x2: l.x2, y2: l.y2 }),
|
|
11072
11072
|
!Y("footer") && /* @__PURE__ */ e("div", { style: { position: "absolute", inset: 0, background: "rgba(0,0,0,0.07)", zIndex: 10, cursor: "default" } })
|
|
@@ -114693,7 +114693,7 @@ function di(n) {
|
|
|
114693
114693
|
}), r;
|
|
114694
114694
|
}
|
|
114695
114695
|
function E0(n, r) {
|
|
114696
|
-
const [i, a] = Z(""), [o, u] = Z(!0), [A, f] = Z(""), d =
|
|
114696
|
+
const [i, a] = Z(""), [o, u] = Z(!0), [A, f] = Z(""), d = $(null), t = $(!1), s = $("");
|
|
114697
114697
|
return an(() => {
|
|
114698
114698
|
if (typeof Worker > "u") {
|
|
114699
114699
|
u(!1), f("PDF preview requires a browser environment.");
|
|
@@ -114842,7 +114842,7 @@ function x0({ onClose: n } = {}) {
|
|
|
114842
114842
|
const { template: r, previewData: i, setPreviewData: a } = en(), [o, u] = Z(() => ({
|
|
114843
114843
|
template: di(r),
|
|
114844
114844
|
data: Ai(i)
|
|
114845
|
-
})), [A, f] = Z(!1), [d, t] = Z(""), s =
|
|
114845
|
+
})), [A, f] = Z(!1), [d, t] = Z(""), s = $(null), c = $({ template: r, previewData: i });
|
|
114846
114846
|
an(() => {
|
|
114847
114847
|
if (!(c.current.template === r && c.current.previewData === i))
|
|
114848
114848
|
return c.current = { template: r, previewData: i }, s.current && clearTimeout(s.current), s.current = setTimeout(() => {
|
|
@@ -114938,9 +114938,9 @@ function B0(n) {
|
|
|
114938
114938
|
};
|
|
114939
114939
|
}
|
|
114940
114940
|
function fi(n, r) {
|
|
114941
|
-
const i =
|
|
114941
|
+
const i = $(r);
|
|
114942
114942
|
i.current = r;
|
|
114943
|
-
const a =
|
|
114943
|
+
const a = $(!0);
|
|
114944
114944
|
an(() => {
|
|
114945
114945
|
var o;
|
|
114946
114946
|
if (a.current) {
|
|
@@ -114980,39 +114980,39 @@ function M0({
|
|
|
114980
114980
|
setPreviewData: C,
|
|
114981
114981
|
setTheme: S,
|
|
114982
114982
|
setZoom: x
|
|
114983
|
-
} = c, Q =
|
|
114983
|
+
} = c, Q = $(P);
|
|
114984
114984
|
Q.current = P;
|
|
114985
|
-
const M =
|
|
114985
|
+
const M = $(void 0);
|
|
114986
114986
|
an(() => {
|
|
114987
114987
|
!n || n === M.current || (M.current = n, Q.current(n));
|
|
114988
114988
|
}, [n]), uo(() => {
|
|
114989
114989
|
d !== void 0 && x(d);
|
|
114990
114990
|
}, []);
|
|
114991
|
-
const
|
|
114991
|
+
const R = r === void 0 ? void 0 : typeof r == "string" ? r : JSON.stringify(r, null, 2), D = $(void 0);
|
|
114992
114992
|
return an(() => {
|
|
114993
|
-
|
|
114994
|
-
}, [
|
|
114993
|
+
R === void 0 || R === D.current || (D.current = R, C(R));
|
|
114994
|
+
}, [R, C]), an(() => {
|
|
114995
114995
|
a && a !== v && S(a);
|
|
114996
114996
|
}, [a, v, S]), fi(E, i), fi(v, o), an(() => {
|
|
114997
114997
|
document.documentElement.setAttribute("data-theme", v);
|
|
114998
114998
|
}, [v]), an(() => {
|
|
114999
|
-
const
|
|
115000
|
-
var
|
|
114999
|
+
const H = (z) => {
|
|
115000
|
+
var N, G;
|
|
115001
115001
|
if (z.key === "Escape") {
|
|
115002
115002
|
B && I();
|
|
115003
115003
|
return;
|
|
115004
115004
|
}
|
|
115005
|
-
const
|
|
115006
|
-
if (!(
|
|
115007
|
-
const { selectedId:
|
|
115008
|
-
if (!
|
|
115005
|
+
const q = z.target.tagName;
|
|
115006
|
+
if (!(q === "INPUT" || q === "TEXTAREA" || q === "SELECT") && !z.target.isContentEditable && ((z.metaKey || z.ctrlKey) && z.key === "z" && (z.preventDefault(), l()), (z.metaKey || z.ctrlKey) && (z.key === "y" || z.shiftKey && z.key === "z") && (z.preventDefault(), h()), (z.metaKey || z.ctrlKey) && z.key === "c" && (z.preventDefault(), b()), (z.metaKey || z.ctrlKey) && z.key === "v" && (z.preventDefault(), y()), (z.metaKey || z.ctrlKey) && z.key === "d" && (z.preventDefault(), g()), (z.metaKey || z.ctrlKey) && z.key === "]" && (z.preventDefault(), w()), (z.metaKey || z.ctrlKey) && z.key === "[" && (z.preventDefault(), k()), (z.key === "Delete" || z.key === "Backspace") && p(), z.key === "ArrowUp" || z.key === "ArrowDown" || z.key === "ArrowLeft" || z.key === "ArrowRight")) {
|
|
115007
|
+
const { selectedId: j, updateElement: nn } = c;
|
|
115008
|
+
if (!j) return;
|
|
115009
115009
|
z.preventDefault();
|
|
115010
|
-
const
|
|
115011
|
-
if (!
|
|
115012
|
-
j
|
|
115010
|
+
const Y = z.shiftKey ? 10 : 1, F = z.key === "ArrowLeft" ? -Y : z.key === "ArrowRight" ? Y : 0, T = z.key === "ArrowUp" ? -Y : z.key === "ArrowDown" ? Y : 0, U = [...((N = c.template.header) == null ? void 0 : N.elements) ?? [], ...c.template.body.elements, ...((G = c.template.footer) == null ? void 0 : G.elements) ?? []].find((O) => O.id === j);
|
|
115011
|
+
if (!U) return;
|
|
115012
|
+
nn(j, { x: U.x + F, y: U.y + T });
|
|
115013
115013
|
}
|
|
115014
115014
|
};
|
|
115015
|
-
return window.addEventListener("keydown",
|
|
115015
|
+
return window.addEventListener("keydown", H), () => window.removeEventListener("keydown", H);
|
|
115016
115016
|
}, [l, h, p, g, b, y, w, k, B, I, c]), /* @__PURE__ */ m(
|
|
115017
115017
|
"div",
|
|
115018
115018
|
{
|
|
@@ -115031,8 +115031,8 @@ function M0({
|
|
|
115031
115031
|
{
|
|
115032
115032
|
className: "fixed inset-0 flex items-center justify-center",
|
|
115033
115033
|
style: { background: "rgba(0,0,0,0.82)", backdropFilter: "blur(12px)", zIndex: 9999 },
|
|
115034
|
-
onMouseDown: (
|
|
115035
|
-
|
|
115034
|
+
onMouseDown: (H) => {
|
|
115035
|
+
H.target === H.currentTarget && I();
|
|
115036
115036
|
},
|
|
115037
115037
|
children: /* @__PURE__ */ e(
|
|
115038
115038
|
"div",
|