@pdfme/ui 4.2.4-dev.9 → 4.2.5-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +159 -114
- package/dist/index.umd.js +8 -8
- package/dist/types/contexts.d.ts +3 -2
- package/package.json +1 -1
- package/src/Designer.tsx +1 -0
- package/src/components/Designer/RightSidebar/DetailView/index.tsx +34 -11
- package/src/components/Designer/index.tsx +10 -1
- package/src/i18n.ts +22 -11
package/dist/index.es.js
CHANGED
@@ -9264,7 +9264,9 @@ z.object({
|
|
9264
9264
|
addPageAfter: z.string(),
|
9265
9265
|
removePage: z.string(),
|
9266
9266
|
removePageConfirm: z.string(),
|
9267
|
-
|
9267
|
+
// --------------------validation-------------------
|
9268
|
+
"validation.uniqueName": z.string(),
|
9269
|
+
"validation.hexColor": z.string(),
|
9268
9270
|
// -----------------used in schemas-----------------
|
9269
9271
|
"schemas.color": z.string(),
|
9270
9272
|
"schemas.borderWidth": z.string(),
|
@@ -81828,7 +81830,7 @@ const UseDynamicFontSize = (a) => {
|
|
81828
81830
|
rules: [
|
81829
81831
|
{
|
81830
81832
|
pattern: HEX_COLOR_PATTERN,
|
81831
|
-
message: $("
|
81833
|
+
message: $("validation.hexColor")
|
81832
81834
|
}
|
81833
81835
|
]
|
81834
81836
|
},
|
@@ -81839,7 +81841,7 @@ const UseDynamicFontSize = (a) => {
|
|
81839
81841
|
rules: [
|
81840
81842
|
{
|
81841
81843
|
pattern: HEX_COLOR_PATTERN,
|
81842
|
-
message: $("
|
81844
|
+
message: $("validation.hexColor")
|
81843
81845
|
}
|
81844
81846
|
]
|
81845
81847
|
}
|
@@ -85573,7 +85575,7 @@ function _typeof$q(a) {
|
|
85573
85575
|
return s && typeof Symbol == "function" && s.constructor === Symbol && s !== Symbol.prototype ? "symbol" : typeof s;
|
85574
85576
|
}, _typeof$q(a);
|
85575
85577
|
}
|
85576
|
-
function toPrimitive$
|
85578
|
+
function toPrimitive$3(a, s) {
|
85577
85579
|
if (_typeof$q(a) != "object" || !a)
|
85578
85580
|
return a;
|
85579
85581
|
var $ = a[Symbol.toPrimitive];
|
@@ -85586,7 +85588,7 @@ function toPrimitive$4(a, s) {
|
|
85586
85588
|
return (s === "string" ? String : Number)(a);
|
85587
85589
|
}
|
85588
85590
|
function toPropertyKey$1(a) {
|
85589
|
-
var s = toPrimitive$
|
85591
|
+
var s = toPrimitive$3(a, "string");
|
85590
85592
|
return _typeof$q(s) == "symbol" ? s : String(s);
|
85591
85593
|
}
|
85592
85594
|
function _defineProperty$c(a, s, $) {
|
@@ -135174,7 +135176,8 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
|
|
135174
135176
|
addPageAfter: "Add Page After",
|
135175
135177
|
removePage: "Remove Current Page",
|
135176
135178
|
removePageConfirm: "Are you sure you want to delete this page? This action cannot be undone.",
|
135177
|
-
|
135179
|
+
"validation.hexColor": "Please enter a valid hex color code.",
|
135180
|
+
"validation.uniqueName": "Please enter a unique name.",
|
135178
135181
|
"schemas.color": "Color",
|
135179
135182
|
"schemas.borderWidth": "Border Width",
|
135180
135183
|
"schemas.borderColor": "Border Color",
|
@@ -135236,7 +135239,8 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
|
|
135236
135239
|
addPageAfter: "在之后添加页面",
|
135237
135240
|
removePage: "删除当前页面",
|
135238
135241
|
removePageConfirm: "您确定要删除此页面吗?此操作无法撤销。",
|
135239
|
-
|
135242
|
+
"validation.hexColor": "请输入有效的十六进制颜色代码。",
|
135243
|
+
"validation.uniqueName": "请输入一个唯一的名称。",
|
135240
135244
|
"schemas.color": "颜色",
|
135241
135245
|
"schemas.borderWidth": "边框宽度",
|
135242
135246
|
"schemas.borderColor": "边框颜色",
|
@@ -135298,7 +135302,8 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
|
|
135298
135302
|
addPageAfter: "次にページを追加",
|
135299
135303
|
removePage: "現在のページを削除",
|
135300
135304
|
removePageConfirm: "ページを削除してもよろしいですか?この操作は元に戻せません。",
|
135301
|
-
|
135305
|
+
"validation.hexColor": "有効な16進数のカラーコードを入力してください。",
|
135306
|
+
"validation.uniqueName": "一意の名前を入力してください。",
|
135302
135307
|
"schemas.color": "色",
|
135303
135308
|
"schemas.borderWidth": "枠線の太さ",
|
135304
135309
|
"schemas.borderColor": "枠線の色",
|
@@ -135360,7 +135365,8 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
|
|
135360
135365
|
addPageAfter: "다음에 페이지 추가",
|
135361
135366
|
removePage: "현재 페이지 제거",
|
135362
135367
|
removePageConfirm: "이 페이지를 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",
|
135363
|
-
|
135368
|
+
"validation.hexColor": "유효한 16진수 색상 코드를 입력하세요.",
|
135369
|
+
"validation.uniqueName": "고유한 이름을 입력하세요.",
|
135364
135370
|
"schemas.color": "색상",
|
135365
135371
|
"schemas.borderWidth": "테두리 너비",
|
135366
135372
|
"schemas.borderColor": "테두리 색상",
|
@@ -135422,7 +135428,8 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
|
|
135422
135428
|
addPageAfter: "إضافة صفحة بعد",
|
135423
135429
|
removePage: "احذف الصفحة الحالية",
|
135424
135430
|
removePageConfirm: "هل أنت متأكد من رغبتك في حذف هذه الصفحة؟ لا يمكن التراجع عن هذا الإجراء.",
|
135425
|
-
|
135431
|
+
"validation.hexColor": "الرجاء إدخال رمز لون سداسي عشري صالح.",
|
135432
|
+
"validation.uniqueName": "الرجاء إدخال اسم فريد.",
|
135426
135433
|
"schemas.color": "اللون",
|
135427
135434
|
"schemas.borderWidth": "عرض الحدود",
|
135428
135435
|
"schemas.borderColor": "لون الحدود",
|
@@ -135484,7 +135491,8 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
|
|
135484
135491
|
addPageAfter: "เพิ่มหน้าถัดไป",
|
135485
135492
|
removePage: "ลบหน้าปัจจุบัน",
|
135486
135493
|
removePageConfirm: "คุณแน่ใจหรือไม่ว่าต้องการลบหน้านี้? การกระทำนี้ไม่สามารถย้อนกลับได้",
|
135487
|
-
|
135494
|
+
"validation.hexColor": "กรุณาใส่รหัสสีแบบฐานสิบหกที่ถูกต้อง",
|
135495
|
+
"validation.uniqueName": "กรุณาระบุชื่อที่ไม่ซ้ำ",
|
135488
135496
|
"schemas.color": "สี",
|
135489
135497
|
"schemas.borderWidth": "ความกว้างของเส้นขอบ",
|
135490
135498
|
"schemas.borderColor": "สีขอบ",
|
@@ -135546,7 +135554,8 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
|
|
135546
135554
|
addPageAfter: "Aggiungi pagina dopo",
|
135547
135555
|
removePage: "Rimuovi la Pagina Corrente",
|
135548
135556
|
removePageConfirm: "Sei sicuro di voler eliminare questa pagina? Questa azione non può essere annullata.",
|
135549
|
-
|
135557
|
+
"validation.hexColor": "Inserisci un codice colore esadecimale valido.",
|
135558
|
+
"validation.uniqueName": "Inserisci un nome univoco.",
|
135550
135559
|
"schemas.color": "Colore",
|
135551
135560
|
"schemas.borderWidth": "Spessore bordo",
|
135552
135561
|
"schemas.borderColor": "Colore bordo",
|
@@ -135608,7 +135617,8 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
|
|
135608
135617
|
addPageAfter: "Dodaj stronę po",
|
135609
135618
|
removePage: "Usuń Bieżącą Stronę",
|
135610
135619
|
removePageConfirm: "Czy na pewno chcesz usunąć tę stronę? Tej operacji nie można cofnąć.",
|
135611
|
-
|
135620
|
+
"validation.hexColor": "Wprowadź poprawny kod koloru szesnastkowego.",
|
135621
|
+
"validation.uniqueName": "Proszę wpisać unikalną nazwę.",
|
135612
135622
|
"schemas.color": "Kolor",
|
135613
135623
|
"schemas.borderWidth": "Szerokość obramowania",
|
135614
135624
|
"schemas.borderColor": "Kolor obramowania",
|
@@ -135670,7 +135680,8 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
|
|
135670
135680
|
addPageAfter: "Seite danach hinzufügen",
|
135671
135681
|
removePage: "Aktuelle Seite entfernen",
|
135672
135682
|
removePageConfirm: "Sind Sie sicher, dass Sie diese Seite löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",
|
135673
|
-
|
135683
|
+
"validation.hexColor": "Bitte geben Sie einen gültigen Hex-Farbcode ein.",
|
135684
|
+
"validation.uniqueName": "Bitte geben Sie einen eindeutigen Namen ein.",
|
135674
135685
|
"schemas.color": "Farbe",
|
135675
135686
|
"schemas.borderWidth": "Rahmenbreite",
|
135676
135687
|
"schemas.borderColor": "Rahmenfarbe",
|
@@ -135732,7 +135743,8 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
|
|
135732
135743
|
addPageAfter: "Insertar página",
|
135733
135744
|
removePage: "Eliminar página actual",
|
135734
135745
|
removePageConfirm: "¿Estás seguro de que quieres eliminar esta página? Esta acción no se puede deshacer.",
|
135735
|
-
|
135746
|
+
"validation.hexColor": "Introduce un código de color hexadecimal válido.",
|
135747
|
+
"validation.uniqueName": "Por favor, introduzca un nombre único.",
|
135736
135748
|
"schemas.color": "Color",
|
135737
135749
|
"schemas.borderWidth": "Ancho del borde",
|
135738
135750
|
"schemas.borderColor": "Color del borde",
|
@@ -135794,7 +135806,8 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
|
|
135794
135806
|
addPageAfter: "Ajouter une page après",
|
135795
135807
|
removePage: "Supprimer la page actuelle",
|
135796
135808
|
removePageConfirm: "Êtes-vous sûr de vouloir supprimer cette page ? Cette action est irréversible.",
|
135797
|
-
|
135809
|
+
"validation.hexColor": "Veuillez entrer un code couleur hexadécimal valide.",
|
135810
|
+
"validation.uniqueName": "Veuillez saisir un nom unique.",
|
135798
135811
|
"schemas.color": "Couleur",
|
135799
135812
|
"schemas.borderWidth": "Largeur de la bordure",
|
135800
135813
|
"schemas.borderColor": "Couleur de la bordure",
|
@@ -142360,28 +142373,38 @@ function require_domCreate() {
|
|
142360
142373
|
return $ ? s.createElement(_) : {};
|
142361
142374
|
}, _domCreate;
|
142362
142375
|
}
|
142363
|
-
var _ie8DomDefine
|
142364
|
-
|
142365
|
-
|
142366
|
-
|
142367
|
-
|
142376
|
+
var _ie8DomDefine, hasRequired_ie8DomDefine;
|
142377
|
+
function require_ie8DomDefine() {
|
142378
|
+
return hasRequired_ie8DomDefine || (hasRequired_ie8DomDefine = 1, _ie8DomDefine = !require_descriptors() && !require_fails()(function() {
|
142379
|
+
return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
|
142380
|
+
return 7;
|
142381
|
+
} }).a != 7;
|
142382
|
+
})), _ie8DomDefine;
|
142383
|
+
}
|
142384
|
+
var isObject$4 = _isObject, _toPrimitive$5 = function(a, s) {
|
142368
142385
|
if (!isObject$4(a))
|
142369
142386
|
return a;
|
142370
142387
|
var $, _;
|
142371
142388
|
if (s && typeof ($ = a.toString) == "function" && !isObject$4(_ = $.call(a)) || typeof ($ = a.valueOf) == "function" && !isObject$4(_ = $.call(a)) || !s && typeof ($ = a.toString) == "function" && !isObject$4(_ = $.call(a)))
|
142372
142389
|
return _;
|
142373
142390
|
throw TypeError("Can't convert object to primitive value");
|
142374
|
-
},
|
142375
|
-
|
142376
|
-
if (
|
142377
|
-
|
142378
|
-
|
142379
|
-
|
142380
|
-
|
142381
|
-
|
142382
|
-
|
142383
|
-
|
142384
|
-
}
|
142391
|
+
}, hasRequired_objectDp;
|
142392
|
+
function require_objectDp() {
|
142393
|
+
if (hasRequired_objectDp)
|
142394
|
+
return _objectDp;
|
142395
|
+
hasRequired_objectDp = 1;
|
142396
|
+
var a = _anObject, s = require_ie8DomDefine(), $ = _toPrimitive$5, _ = Object.defineProperty;
|
142397
|
+
return _objectDp.f = require_descriptors() ? Object.defineProperty : function(tt, nt, at) {
|
142398
|
+
if (a(tt), nt = $(nt, !0), a(at), s)
|
142399
|
+
try {
|
142400
|
+
return _(tt, nt, at);
|
142401
|
+
} catch {
|
142402
|
+
}
|
142403
|
+
if ("get" in at || "set" in at)
|
142404
|
+
throw TypeError("Accessors not supported!");
|
142405
|
+
return "value" in at && (tt[nt] = at.value), tt;
|
142406
|
+
}, _objectDp;
|
142407
|
+
}
|
142385
142408
|
var _propertyDesc = function(a, s) {
|
142386
142409
|
return {
|
142387
142410
|
enumerable: !(a & 1),
|
@@ -142389,7 +142412,7 @@ var _propertyDesc = function(a, s) {
|
|
142389
142412
|
writable: !(a & 4),
|
142390
142413
|
value: s
|
142391
142414
|
};
|
142392
|
-
}, dP$2 =
|
142415
|
+
}, dP$2 = require_objectDp(), createDesc$2 = _propertyDesc, _hide = require_descriptors() ? function(a, s, $) {
|
142393
142416
|
return dP$2.f(a, s, createDesc$2(1, $));
|
142394
142417
|
} : function(a, s, $) {
|
142395
142418
|
return a[s] = $, a;
|
@@ -143220,7 +143243,7 @@ var _default$g = function(a, s) {
|
|
143220
143243
|
if (!(a instanceof s))
|
143221
143244
|
throw new TypeError("Cannot call a class as a function");
|
143222
143245
|
}, $export$3 = _export;
|
143223
|
-
$export$3($export$3.S + $export$3.F * !require_descriptors(), "Object", { defineProperty:
|
143246
|
+
$export$3($export$3.S + $export$3.F * !require_descriptors(), "Object", { defineProperty: require_objectDp().f });
|
143224
143247
|
var $Object$1 = _coreExports.Object, defineProperty$3 = function a(s, $, _) {
|
143225
143248
|
return $Object$1.defineProperty(s, $, _);
|
143226
143249
|
}, defineProperty$2 = { default: defineProperty$3, __esModule: !0 }, _defineProperty$8 = defineProperty$2, _defineProperty2$1 = _interopRequireDefault$f(_defineProperty$8);
|
@@ -143242,7 +143265,7 @@ var _default$f = /* @__PURE__ */ function() {
|
|
143242
143265
|
var _ = String(defined(s)), _e = toInteger($), tt = _.length, nt, at;
|
143243
143266
|
return _e < 0 || _e >= tt ? a ? "" : void 0 : (nt = _.charCodeAt(_e), nt < 55296 || nt > 56319 || _e + 1 === tt || (at = _.charCodeAt(_e + 1)) < 56320 || at > 57343 ? a ? _.charAt(_e) : nt : a ? _.slice(_e, _e + 2) : (nt - 55296 << 10) + (at - 56320) + 65536);
|
143244
143267
|
};
|
143245
|
-
}, _redefine = _hide, _iterators = {}, dP$1 =
|
143268
|
+
}, _redefine = _hide, _iterators = {}, dP$1 = require_objectDp(), anObject$2 = _anObject, getKeys$2 = require_objectKeys(), _objectDps = require_descriptors() ? Object.defineProperties : function a(s, $) {
|
143246
143269
|
anObject$2(s);
|
143247
143270
|
for (var _ = getKeys$2($), _e = _.length, tt = 0, nt; _e > tt; )
|
143248
143271
|
dP$1.f(s, nt = _[tt++], $[nt]);
|
@@ -143268,7 +143291,7 @@ var anObject$1 = _anObject, dPs = _objectDps, enumBugKeys = _enumBugKeys, IE_PRO
|
|
143268
143291
|
return store[a] || (store[a] = USE_SYMBOL && Symbol$1[a] || (USE_SYMBOL ? Symbol$1 : uid$1)("Symbol." + a));
|
143269
143292
|
};
|
143270
143293
|
$exports.store = store;
|
143271
|
-
var _wksExports = _wks.exports, def =
|
143294
|
+
var _wksExports = _wks.exports, def = require_objectDp().f, has$3 = _has, TAG = _wksExports("toStringTag"), _setToStringTag = function(a, s, $) {
|
143272
143295
|
a && !has$3(a = $ ? a : a.prototype, TAG) && def(a, TAG, { configurable: !0, value: s });
|
143273
143296
|
}, _iterCreate, hasRequired_iterCreate;
|
143274
143297
|
function require_iterCreate() {
|
@@ -143358,7 +143381,7 @@ for (var i = 0; i < DOMIterables.length; i++) {
|
|
143358
143381
|
}
|
143359
143382
|
var _wksExt = {};
|
143360
143383
|
_wksExt.f = _wksExports;
|
143361
|
-
var iterator$1 = _wksExt.f("iterator"), iterator = { default: iterator$1, __esModule: !0 }, _meta = { exports: {} }, META$1 = _uid("meta"), isObject$3 = _isObject, has$2 = _has, setDesc =
|
143384
|
+
var iterator$1 = _wksExt.f("iterator"), iterator = { default: iterator$1, __esModule: !0 }, _meta = { exports: {} }, META$1 = _uid("meta"), isObject$3 = _isObject, has$2 = _has, setDesc = require_objectDp().f, id = 0, isExtensible = Object.isExtensible || function() {
|
143362
143385
|
return !0;
|
143363
143386
|
}, FREEZE = !require_fails()(function() {
|
143364
143387
|
return isExtensible(Object.preventExtensions({}));
|
@@ -143397,7 +143420,7 @@ var iterator$1 = _wksExt.f("iterator"), iterator = { default: iterator$1, __esMo
|
|
143397
143420
|
fastKey,
|
143398
143421
|
getWeak,
|
143399
143422
|
onFreeze
|
143400
|
-
}, _metaExports = _meta.exports, core = _coreExports, wksExt$1 = _wksExt, defineProperty$1 =
|
143423
|
+
}, _metaExports = _meta.exports, core = _coreExports, wksExt$1 = _wksExt, defineProperty$1 = require_objectDp().f, _wksDefine = function(a) {
|
143401
143424
|
var s = core.Symbol || (core.Symbol = {});
|
143402
143425
|
a.charAt(0) != "_" && !(a in s) && defineProperty$1(s, a, { value: wksExt$1.f(a) });
|
143403
143426
|
}, getKeys$1 = require_objectKeys(), gOPS = require_objectGops(), pIE$1 = require_objectPie(), _enumKeys = function(a) {
|
@@ -143422,7 +143445,7 @@ var toIObject$2 = _toIobject, gOPN$1 = _objectGopn.f, toString$1 = {}.toString,
|
|
143422
143445
|
_objectGopnExt.f = function a(s) {
|
143423
143446
|
return windowNames && toString$1.call(s) == "[object Window]" ? getWindowNames(s) : gOPN$1(toIObject$2(s));
|
143424
143447
|
};
|
143425
|
-
var _objectGopd = {}, pIE = require_objectPie(), createDesc$1 = _propertyDesc, toIObject$1 = _toIobject, toPrimitive$2 = _toPrimitive$5, has$1 = _has, IE8_DOM_DEFINE =
|
143448
|
+
var _objectGopd = {}, pIE = require_objectPie(), createDesc$1 = _propertyDesc, toIObject$1 = _toIobject, toPrimitive$2 = _toPrimitive$5, has$1 = _has, IE8_DOM_DEFINE = require_ie8DomDefine(), gOPD$1 = Object.getOwnPropertyDescriptor;
|
143426
143449
|
_objectGopd.f = require_descriptors() ? gOPD$1 : function a(s, $) {
|
143427
143450
|
if (s = toIObject$1(s), $ = toPrimitive$2($, !0), IE8_DOM_DEFINE)
|
143428
143451
|
try {
|
@@ -143432,7 +143455,7 @@ _objectGopd.f = require_descriptors() ? gOPD$1 : function a(s, $) {
|
|
143432
143455
|
if (has$1(s, $))
|
143433
143456
|
return createDesc$1(!pIE.f.call(s, $), s[$]);
|
143434
143457
|
};
|
143435
|
-
var global$1 = _globalExports, has = _has, DESCRIPTORS = require_descriptors(), $export$2 = _export, redefine = _redefine, META = _metaExports.KEY, $fails = require_fails(), shared = _sharedExports, setToStringTag = _setToStringTag, uid = _uid, wks = _wksExports, wksExt = _wksExt, wksDefine = _wksDefine, enumKeys = _enumKeys, isArray$1 = _isArray, anObject = _anObject, isObject$2 = _isObject, toObject = require_toObject(), toIObject = _toIobject, toPrimitive$1 = _toPrimitive$5, createDesc = _propertyDesc, _create$1 = _objectCreate, gOPNExt = _objectGopnExt, $GOPD = _objectGopd, $GOPS = require_objectGops(), $DP =
|
143458
|
+
var global$1 = _globalExports, has = _has, DESCRIPTORS = require_descriptors(), $export$2 = _export, redefine = _redefine, META = _metaExports.KEY, $fails = require_fails(), shared = _sharedExports, setToStringTag = _setToStringTag, uid = _uid, wks = _wksExports, wksExt = _wksExt, wksDefine = _wksDefine, enumKeys = _enumKeys, isArray$1 = _isArray, anObject = _anObject, isObject$2 = _isObject, toObject = require_toObject(), toIObject = _toIobject, toPrimitive$1 = _toPrimitive$5, createDesc = _propertyDesc, _create$1 = _objectCreate, gOPNExt = _objectGopnExt, $GOPD = _objectGopd, $GOPS = require_objectGops(), $DP = require_objectDp(), $keys = require_objectKeys(), gOPD = $GOPD.f, dP = $DP.f, gOPN = gOPNExt.f, $Symbol = global$1.Symbol, $JSON = global$1.JSON, _stringify = $JSON && $JSON.stringify, PROTOTYPE = "prototype", HIDDEN = wks("_hidden"), TO_PRIMITIVE = wks("toPrimitive"), isEnum = {}.propertyIsEnumerable, SymbolRegistry = shared("symbol-registry"), AllSymbols = shared("symbols"), OPSymbols = shared("op-symbols"), ObjectProto = Object[PROTOTYPE], USE_NATIVE = typeof $Symbol == "function" && !!$GOPS.f, QObject = global$1.QObject, setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild, setSymbolDesc = DESCRIPTORS && $fails(function() {
|
143436
143459
|
return _create$1(dP({}, "a", {
|
143437
143460
|
get: function() {
|
143438
143461
|
return dP(this, "a", { value: 7 }).a;
|
@@ -151921,85 +151944,102 @@ const FormRender = withProvider(FormCore, defaultWidgets), svgBaseProp = {
|
|
151921
151944
|
);
|
151922
151945
|
}) }) });
|
151923
151946
|
}, ButtonGroupWidget$1 = ButtonGroupWidget, { Text: Text$2 } = Typography$1, DetailView = (a) => {
|
151924
|
-
const { token: s } = theme.useToken(), { size: $,
|
151947
|
+
const { token: s } = theme.useToken(), { size: $, schemas: _, changeSchemas: _e, deselectSchema: tt, activeSchema: nt } = a, at = useForm(), ot = reactExports.useContext(I18nContext), rt = reactExports.useContext(PluginsRegistry), st = reactExports.useContext(OptionsContext), [lt, et] = reactExports.useState({});
|
151925
151948
|
reactExports.useEffect(() => {
|
151926
|
-
const
|
151927
|
-
AlignWidget: (
|
151949
|
+
const ct = {
|
151950
|
+
AlignWidget: (vt) => /* @__PURE__ */ jsxRuntimeExports.jsx(AlignWidget$1, { ...vt, ...a, options: st }),
|
151928
151951
|
Divider: () => /* @__PURE__ */ jsxRuntimeExports.jsx(Divider$1, { style: { marginTop: s.marginXS, marginBottom: s.marginXS } }),
|
151929
|
-
ButtonGroup: (
|
151952
|
+
ButtonGroup: (vt) => /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonGroupWidget$1, { ...vt, ...a, options: st })
|
151930
151953
|
};
|
151931
|
-
for (const
|
151932
|
-
const
|
151933
|
-
Object.entries(
|
151934
|
-
|
151954
|
+
for (const vt of Object.values(rt)) {
|
151955
|
+
const At = (vt == null ? void 0 : vt.propPanel.widgets) || {};
|
151956
|
+
Object.entries(At).forEach(([xt, bt]) => {
|
151957
|
+
ct[xt] = (Et) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
151935
151958
|
WidgetRenderer$1,
|
151936
151959
|
{
|
151937
|
-
...
|
151960
|
+
...Et,
|
151938
151961
|
...a,
|
151939
|
-
options:
|
151962
|
+
options: st,
|
151940
151963
|
theme: s,
|
151941
|
-
i18n:
|
151942
|
-
widget:
|
151964
|
+
i18n: ot,
|
151965
|
+
widget: bt
|
151943
151966
|
}
|
151944
151967
|
);
|
151945
151968
|
});
|
151946
151969
|
}
|
151947
|
-
|
151948
|
-
}, [
|
151949
|
-
const
|
151950
|
-
|
151951
|
-
}, [
|
151952
|
-
|
151953
|
-
|
151954
|
-
|
151955
|
-
|
151956
|
-
|
151970
|
+
et(ct);
|
151971
|
+
}, [nt, rt, JSON.stringify(st)]), reactExports.useEffect(() => {
|
151972
|
+
const ct = { ...nt };
|
151973
|
+
ct.x = ct.position.x, ct.y = ct.position.y, delete ct.position, at.setValues(ct);
|
151974
|
+
}, [nt, at]), reactExports.useEffect(() => at.resetFields(), [nt.id]), reactExports.useEffect(() => {
|
151975
|
+
it.current = (ct) => {
|
151976
|
+
for (const vt of Object.values(_))
|
151977
|
+
if (vt.key === ct && vt.id !== nt.id)
|
151978
|
+
return !1;
|
151979
|
+
return !0;
|
151980
|
+
};
|
151981
|
+
}, [_, nt]);
|
151982
|
+
const it = reactExports.useRef((ct) => !0), ut = (ct, vt) => it.current(vt), ft = debounce$1((ct) => {
|
151983
|
+
const vt = (xt, bt) => typeof xt == "object" ? JSON.stringify(xt) !== JSON.stringify(bt) : xt !== bt;
|
151984
|
+
let At = [];
|
151985
|
+
for (let xt in ct) {
|
151986
|
+
if (["id", "content"].includes(xt))
|
151957
151987
|
continue;
|
151958
|
-
let
|
151959
|
-
["x", "y"].includes(
|
151988
|
+
let bt = ct[xt], Et = !1;
|
151989
|
+
["x", "y"].includes(xt) ? (Et = bt !== nt.position[xt], xt = "position." + xt) : Et = vt(bt, nt[xt]), Et && (bt === null && ["rotate", "opacity"].includes(xt) && (bt = void 0), At.push({ key: xt, value: bt, schemaId: nt.id }));
|
151960
151990
|
}
|
151961
|
-
|
151962
|
-
|
151963
|
-
(
|
151964
|
-
))),
|
151991
|
+
At.length && at.validateFields().then(() => _e(At)).catch((xt) => {
|
151992
|
+
xt.errorFields.length && (At = At.filter((bt) => !xt.errorFields.find(
|
151993
|
+
(Et) => Et.name.includes(bt.key)
|
151994
|
+
))), At.length && _e(At);
|
151965
151995
|
});
|
151966
|
-
},
|
151967
|
-
(
|
151968
|
-
),
|
151969
|
-
|
151996
|
+
}, 500), ht = Object.values(rt).find(
|
151997
|
+
(ct) => (ct == null ? void 0 : ct.propPanel.defaultSchema.type) === nt.type
|
151998
|
+
), dt = ht == null ? void 0 : ht.propPanel.schema;
|
151999
|
+
dt || console.error(`[@pdfme/ui] No propPanel.schema for ${nt.type}.
|
151970
152000
|
Check this document: https://pdfme.com/docs/custom-schemas`);
|
151971
|
-
const
|
151972
|
-
label:
|
151973
|
-
value:
|
151974
|
-
})),
|
152001
|
+
const gt = Object.entries(rt).map(([ct, vt]) => ({
|
152002
|
+
label: ct,
|
152003
|
+
value: vt == null ? void 0 : vt.propPanel.defaultSchema.type
|
152004
|
+
})), pt = ht.propPanel.defaultSchema, mt = {
|
151975
152005
|
type: "object",
|
151976
152006
|
column: 2,
|
151977
152007
|
properties: {
|
151978
152008
|
type: {
|
151979
|
-
title:
|
152009
|
+
title: ot("type"),
|
151980
152010
|
type: "string",
|
151981
152011
|
widget: "select",
|
151982
|
-
props: { options:
|
152012
|
+
props: { options: gt },
|
151983
152013
|
required: !0,
|
151984
152014
|
span: 12
|
151985
152015
|
},
|
151986
|
-
key: {
|
151987
|
-
|
152016
|
+
key: {
|
152017
|
+
title: ot("fieldName"),
|
152018
|
+
type: "string",
|
152019
|
+
required: !0,
|
152020
|
+
span: 12,
|
152021
|
+
rules: [{
|
152022
|
+
validator: ut,
|
152023
|
+
message: ot("validation.uniqueName")
|
152024
|
+
}],
|
152025
|
+
props: { autoComplete: "off" }
|
152026
|
+
},
|
152027
|
+
required: { title: ot("required"), type: "boolean", span: 8, hidden: pt == null ? void 0 : pt.readOnly },
|
151988
152028
|
"-": { type: "void", widget: "Divider" },
|
151989
|
-
align: { title:
|
152029
|
+
align: { title: ot("align"), type: "void", widget: "AlignWidget" },
|
151990
152030
|
x: { title: "X", type: "number", widget: "inputNumber", required: !0, span: 8, min: 0 },
|
151991
152031
|
y: { title: "Y", type: "number", widget: "inputNumber", required: !0, span: 8, min: 0 },
|
151992
152032
|
rotate: {
|
151993
|
-
title:
|
152033
|
+
title: ot("rotate"),
|
151994
152034
|
type: "number",
|
151995
152035
|
widget: "inputNumber",
|
151996
|
-
disabled: (
|
152036
|
+
disabled: (pt == null ? void 0 : pt.rotate) === void 0,
|
151997
152037
|
max: 360,
|
151998
152038
|
props: { min: 0 },
|
151999
152039
|
span: 8
|
152000
152040
|
},
|
152001
152041
|
width: {
|
152002
|
-
title:
|
152042
|
+
title: ot("width"),
|
152003
152043
|
type: "number",
|
152004
152044
|
widget: "inputNumber",
|
152005
152045
|
required: !0,
|
@@ -152007,7 +152047,7 @@ Check this document: https://pdfme.com/docs/custom-schemas`);
|
|
152007
152047
|
props: { min: 0 }
|
152008
152048
|
},
|
152009
152049
|
height: {
|
152010
|
-
title:
|
152050
|
+
title: ot("height"),
|
152011
152051
|
type: "number",
|
152012
152052
|
widget: "inputNumber",
|
152013
152053
|
required: !0,
|
@@ -152015,33 +152055,33 @@ Check this document: https://pdfme.com/docs/custom-schemas`);
|
|
152015
152055
|
props: { min: 0 }
|
152016
152056
|
},
|
152017
152057
|
opacity: {
|
152018
|
-
title:
|
152058
|
+
title: ot("opacity"),
|
152019
152059
|
type: "number",
|
152020
152060
|
widget: "inputNumber",
|
152021
|
-
disabled: (
|
152061
|
+
disabled: (pt == null ? void 0 : pt.opacity) === void 0,
|
152022
152062
|
props: { step: 0.1, min: 0, max: 1 },
|
152023
152063
|
span: 8
|
152024
152064
|
}
|
152025
152065
|
}
|
152026
152066
|
};
|
152027
|
-
if (typeof
|
152028
|
-
const
|
152067
|
+
if (typeof dt == "function") {
|
152068
|
+
const ct = dt({
|
152029
152069
|
...a,
|
152030
|
-
options:
|
152070
|
+
options: st,
|
152031
152071
|
theme: s,
|
152032
|
-
i18n:
|
152072
|
+
i18n: ot
|
152033
152073
|
}) || {};
|
152034
|
-
|
152035
|
-
...
|
152036
|
-
...Object.keys(
|
152037
|
-
...
|
152074
|
+
mt.properties = {
|
152075
|
+
...mt.properties,
|
152076
|
+
...Object.keys(ct).length === 0 ? {} : { "--": { type: "void", widget: "Divider" } },
|
152077
|
+
...ct
|
152038
152078
|
};
|
152039
152079
|
} else {
|
152040
|
-
const
|
152041
|
-
|
152042
|
-
...
|
152043
|
-
...Object.keys(
|
152044
|
-
...
|
152080
|
+
const ct = dt || {};
|
152081
|
+
mt.properties = {
|
152082
|
+
...mt.properties,
|
152083
|
+
...Object.keys(ct).length === 0 ? {} : { "--": { type: "void", widget: "Divider" } },
|
152084
|
+
...ct
|
152045
152085
|
};
|
152046
152086
|
}
|
152047
152087
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
@@ -152056,11 +152096,11 @@ Check this document: https://pdfme.com/docs/custom-schemas`);
|
|
152056
152096
|
alignItems: "center",
|
152057
152097
|
justifyContent: "center"
|
152058
152098
|
},
|
152059
|
-
onClick:
|
152099
|
+
onClick: tt,
|
152060
152100
|
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(MenuOutlined$1, {})
|
152061
152101
|
}
|
152062
152102
|
),
|
152063
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$2, { strong: !0, style: { textAlign: "center", width: "100%" }, children:
|
152103
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$2, { strong: !0, style: { textAlign: "center", width: "100%" }, children: ot("editField") })
|
152064
152104
|
] }),
|
152065
152105
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider$1, { style: { marginTop: s.marginXS, marginBottom: s.marginXS } }),
|
152066
152106
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -152074,10 +152114,10 @@ Check this document: https://pdfme.com/docs/custom-schemas`);
|
|
152074
152114
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
152075
152115
|
FormRender,
|
152076
152116
|
{
|
152077
|
-
form:
|
152078
|
-
schema:
|
152079
|
-
widgets:
|
152080
|
-
watch: { "#":
|
152117
|
+
form: at,
|
152118
|
+
schema: mt,
|
152119
|
+
widgets: lt,
|
152120
|
+
watch: { "#": ft },
|
152081
152121
|
locale: "en-US"
|
152082
152122
|
}
|
152083
152123
|
)
|
@@ -162392,21 +162432,26 @@ const Guides$2 = Guides$1, guideStyle = (a, s, $, _) => ({
|
|
162392
162432
|
const Dt = await template2SchemasList(Tt);
|
162393
162433
|
dt(Dt), Ct(), pt(0), (Ut = at.current) != null && Ut.scroll && at.current.scroll({ top: 0, behavior: "smooth" });
|
162394
162434
|
}, []), jt = (Tt) => {
|
162395
|
-
const [Dt, Ut, Vt, Qt] = isBlankPdf(a.basePdf) ? a.basePdf.padding : [0, 0, 0, 0], qt = St[gt], Zt = (
|
162435
|
+
const [Dt, Ut, Vt, Qt] = isBlankPdf(a.basePdf) ? a.basePdf.padding : [0, 0, 0, 0], qt = St[gt], Zt = (rr) => {
|
162436
|
+
let Yt = ht[gt].length + 1, Kt = rr + Yt;
|
162437
|
+
for (; ht[gt].find((nr) => nr.key === Kt); )
|
162438
|
+
Yt++, Kt = rr + Yt;
|
162439
|
+
return Kt;
|
162440
|
+
}, ar = (rr, Yt, Kt) => Math.min(Math.max(rr, Yt), Kt), Jt = {
|
162396
162441
|
id: uuid$6(),
|
162397
|
-
key:
|
162442
|
+
key: Zt(rt("field")),
|
162398
162443
|
...Tt,
|
162399
162444
|
position: {
|
162400
|
-
x:
|
162401
|
-
y:
|
162445
|
+
x: ar(Qt, Tt.position.x, qt.width - Ut - Tt.width),
|
162446
|
+
y: ar(Dt, Tt.position.y, qt.height - Vt - Tt.height)
|
162402
162447
|
},
|
162403
162448
|
required: Tt.readOnly ? !1 : lt.requiredByDefault || Tt.required || !1
|
162404
162449
|
};
|
162405
162450
|
if (Tt.position.y === 0) {
|
162406
|
-
const
|
162407
|
-
|
162451
|
+
const rr = ot.current[gt], Yt = rr ? rr.getBoundingClientRect().top : 0;
|
162452
|
+
Jt.position.y = Yt > 0 ? Dt : St[gt].height / 2;
|
162408
162453
|
}
|
162409
|
-
It(ht[gt].concat(
|
162454
|
+
It(ht[gt].concat(Jt)), setTimeout(() => wt([document.getElementById(Jt.id)]));
|
162410
162455
|
}, Ht = (Tt) => {
|
162411
162456
|
It(Tt);
|
162412
162457
|
}, Ft = (Tt) => {
|
@@ -162582,7 +162627,7 @@ class Designer extends BaseUIClass {
|
|
162582
162627
|
{
|
162583
162628
|
template: this.template,
|
162584
162629
|
onSaveTemplate: (s) => {
|
162585
|
-
this.template = s, this.onSaveTemplateCallback && this.onSaveTemplateCallback(s);
|
162630
|
+
this.template = s, this.template.pdfmeVersion = PDFME_VERSION, this.onSaveTemplateCallback && this.onSaveTemplateCallback(s);
|
162586
162631
|
},
|
162587
162632
|
onChangeTemplate: (s) => {
|
162588
162633
|
this.template = s, this.template.pdfmeVersion = PDFME_VERSION, this.onChangeTemplateCallback && this.onChangeTemplateCallback(s);
|