@pdfme/ui 5.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -9304,7 +9304,10 @@ z.object({
9304
9304
  "schemas.table.tableStyle": z.string(),
9305
9305
  "schemas.table.headStyle": z.string(),
9306
9306
  "schemas.table.bodyStyle": z.string(),
9307
- "schemas.table.columnStyle": z.string()
9307
+ "schemas.table.columnStyle": z.string(),
9308
+ "schemas.date.format": z.string(),
9309
+ "schemas.select.options": z.string(),
9310
+ "schemas.select.optionPlaceholder": z.string()
9308
9311
  });
9309
9312
  z.enum(["viewer", "form", "designer"]);
9310
9313
  const ColorType = z.enum(["rgb", "cmyk"]).optional();
@@ -82545,7 +82548,7 @@ const UseDynamicFontSize = (a) => {
82545
82548
  backgroundColor: "transparent",
82546
82549
  textDecoration: ht.join(" ")
82547
82550
  }, gt = document.createElement("div");
82548
- return gt.id = "text-" + $.id, Object.assign(gt.style, dt), ut.appendChild(gt), gt;
82551
+ return gt.id = "text-" + String($.id), Object.assign(gt.style, dt), ut.appendChild(gt), gt;
82549
82552
  }, makeElementPlainTextContentEditable = (a) => {
82550
82553
  if (!isFirefox()) {
82551
82554
  a.contentEditable = "plaintext-only";
@@ -135264,7 +135267,10 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
135264
135267
  "schemas.table.tableStyle": "Table Style",
135265
135268
  "schemas.table.headStyle": "Header Style",
135266
135269
  "schemas.table.bodyStyle": "Body Style",
135267
- "schemas.table.columnStyle": "Column Style"
135270
+ "schemas.table.columnStyle": "Column Style",
135271
+ "schemas.date.format": "Date Format",
135272
+ "schemas.select.options": "Options",
135273
+ "schemas.select.optionPlaceholder": "Enter an option"
135268
135274
  }, dictZh = {
135269
135275
  cancel: "取消",
135270
135276
  field: "字段",
@@ -135328,7 +135334,10 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
135328
135334
  "schemas.table.tableStyle": "表格样式",
135329
135335
  "schemas.table.headStyle": "表头样式",
135330
135336
  "schemas.table.bodyStyle": "表体样式",
135331
- "schemas.table.columnStyle": "列样式"
135337
+ "schemas.table.columnStyle": "列样式",
135338
+ "schemas.date.format": "日期格式",
135339
+ "schemas.select.options": "选项",
135340
+ "schemas.select.optionPlaceholder": "请输入选项"
135332
135341
  }, dictJa = {
135333
135342
  cancel: "キャンセル",
135334
135343
  field: "入力項目",
@@ -135392,7 +135401,10 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
135392
135401
  "schemas.table.tableStyle": "テーブルスタイル",
135393
135402
  "schemas.table.headStyle": "ヘッダースタイル",
135394
135403
  "schemas.table.bodyStyle": "ボディスタイル",
135395
- "schemas.table.columnStyle": "カラムスタイル"
135404
+ "schemas.table.columnStyle": "カラムスタイル",
135405
+ "schemas.date.format": "日付形式",
135406
+ "schemas.select.options": "オプション",
135407
+ "schemas.select.optionPlaceholder": "オプションを入力してください"
135396
135408
  }, dictKo = {
135397
135409
  cancel: "취소",
135398
135410
  field: "필드",
@@ -135456,7 +135468,10 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
135456
135468
  "schemas.table.tableStyle": "테이블 스타일",
135457
135469
  "schemas.table.headStyle": "헤더 스타일",
135458
135470
  "schemas.table.bodyStyle": "본문 스타일",
135459
- "schemas.table.columnStyle": "열 스타일"
135471
+ "schemas.table.columnStyle": "열 스타일",
135472
+ "schemas.date.format": "날짜 형식",
135473
+ "schemas.select.options": "옵션",
135474
+ "schemas.select.optionPlaceholder": "옵션을 입력하세요"
135460
135475
  }, dictAr = {
135461
135476
  cancel: "إلغاء",
135462
135477
  field: "الحقل",
@@ -135520,7 +135535,10 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
135520
135535
  "schemas.table.tableStyle": "أسلوب الجدول",
135521
135536
  "schemas.table.headStyle": "أسلوب الرأس",
135522
135537
  "schemas.table.bodyStyle": "أسلوب الجسم",
135523
- "schemas.table.columnStyle": "أسلوب العمود"
135538
+ "schemas.table.columnStyle": "أسلوب العمود",
135539
+ "schemas.date.format": "تنسيق التاريخ",
135540
+ "schemas.select.options": "خيارات",
135541
+ "schemas.select.optionPlaceholder": "أدخل خيارًا"
135524
135542
  }, dictTh = {
135525
135543
  cancel: "ยกเลิก",
135526
135544
  field: "ฟิลด์",
@@ -135584,7 +135602,10 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
135584
135602
  "schemas.table.tableStyle": "สไตล์ตาราง",
135585
135603
  "schemas.table.headStyle": "สไตล์หัวข้อ",
135586
135604
  "schemas.table.bodyStyle": "สไตล์เนื้อหา",
135587
- "schemas.table.columnStyle": "สไตล์คอลัมน์"
135605
+ "schemas.table.columnStyle": "สไตล์คอลัมน์",
135606
+ "schemas.date.format": "รูปแบบวันที่",
135607
+ "schemas.select.options": "ตัวเลือก",
135608
+ "schemas.select.optionPlaceholder": "กรอกตัวเลือก"
135588
135609
  }, dictIt = {
135589
135610
  cancel: "Annulla",
135590
135611
  field: "Campo",
@@ -135648,7 +135669,10 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
135648
135669
  "schemas.table.tableStyle": "Stile della Tabella",
135649
135670
  "schemas.table.headStyle": "Stile dell'Intestazione",
135650
135671
  "schemas.table.bodyStyle": "Stile del Corpo",
135651
- "schemas.table.columnStyle": "Stile della Colonna"
135672
+ "schemas.table.columnStyle": "Stile della Colonna",
135673
+ "schemas.date.format": "Formato data",
135674
+ "schemas.select.options": "Opzioni",
135675
+ "schemas.select.optionPlaceholder": "Inserisci un'opzione"
135652
135676
  }, dictPl = {
135653
135677
  cancel: "Anuluj",
135654
135678
  field: "pole",
@@ -135712,7 +135736,10 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
135712
135736
  "schemas.table.tableStyle": "Styl tabeli",
135713
135737
  "schemas.table.headStyle": "Styl nagłówka",
135714
135738
  "schemas.table.bodyStyle": "Styl ciała",
135715
- "schemas.table.columnStyle": "Styl kolumny"
135739
+ "schemas.table.columnStyle": "Styl kolumny",
135740
+ "schemas.date.format": "Format daty",
135741
+ "schemas.select.options": "Opcje",
135742
+ "schemas.select.optionPlaceholder": "Wpisz opcję"
135716
135743
  }, dictDe = {
135717
135744
  cancel: "Abbrechen",
135718
135745
  field: "Feld",
@@ -135776,7 +135803,10 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
135776
135803
  "schemas.table.tableStyle": "Tabellenstil",
135777
135804
  "schemas.table.headStyle": "Kopfzeilenstil",
135778
135805
  "schemas.table.bodyStyle": "Körperstil",
135779
- "schemas.table.columnStyle": "Spaltenstil"
135806
+ "schemas.table.columnStyle": "Spaltenstil",
135807
+ "schemas.date.format": "Datumsformat",
135808
+ "schemas.select.options": "Optionen",
135809
+ "schemas.select.optionPlaceholder": "Geben Sie eine Option ein"
135780
135810
  }, dictEs = {
135781
135811
  cancel: "Cancelar",
135782
135812
  field: "campo",
@@ -135840,7 +135870,10 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
135840
135870
  "schemas.table.tableStyle": "Estilo de tabla",
135841
135871
  "schemas.table.headStyle": "Estilo de cabecera",
135842
135872
  "schemas.table.bodyStyle": "Estilo de cuerpo",
135843
- "schemas.table.columnStyle": "Estilo de columna"
135873
+ "schemas.table.columnStyle": "Estilo de columna",
135874
+ "schemas.date.format": "Formato de fecha",
135875
+ "schemas.select.options": "Opciones",
135876
+ "schemas.select.optionPlaceholder": "Ingrese una opción"
135844
135877
  }, dictFr = {
135845
135878
  cancel: "Annuler",
135846
135879
  field: "Champ",
@@ -135904,7 +135937,10 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
135904
135937
  "schemas.table.tableStyle": "Style de tableau",
135905
135938
  "schemas.table.headStyle": "Style d'en-tête",
135906
135939
  "schemas.table.bodyStyle": "Style de corps",
135907
- "schemas.table.columnStyle": "Style de colonne"
135940
+ "schemas.table.columnStyle": "Style de colonne",
135941
+ "schemas.date.format": "Format de date",
135942
+ "schemas.select.options": "Options",
135943
+ "schemas.select.optionPlaceholder": "Entrez une option"
135908
135944
  }, dictionaries = {
135909
135945
  en: dictEn,
135910
135946
  zh: dictZh,
@@ -162930,6 +162966,20 @@ class Form extends PreviewUI {
162930
162966
  onChangeInput(s) {
162931
162967
  this.onChangeInputCallback = s;
162932
162968
  }
162969
+ setInputs(s) {
162970
+ const $ = this.getInputs();
162971
+ super.setInputs(s);
162972
+ const _ = [];
162973
+ s.forEach((_e, tt) => {
162974
+ const nt = $[tt] || {};
162975
+ (/* @__PURE__ */ new Set([...Object.keys(_e), ...Object.keys(nt)])).forEach((ot) => {
162976
+ const rt = _e[ot], st = nt[ot];
162977
+ rt !== st && _.push({ index: tt, name: ot, value: rt });
162978
+ });
162979
+ }), _.forEach((_e) => {
162980
+ this.onChangeInputCallback && this.onChangeInputCallback(_e);
162981
+ });
162982
+ }
162933
162983
  render() {
162934
162984
  if (!this.domContainer)
162935
162985
  throw Error(DESTROYED_ERR_MSG);