@pdfme/ui 3.2.0 → 3.2.1-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/types/contexts.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { Plugins, UIOptions } from '@pdfme/common';
|
3
|
-
export declare const I18nContext: import("react").Context<(key: "height" | "width" | "type" | "rotate" | "opacity" | "cancel" | "field" | "fieldName" | "align" | "edit" | "plsInputName" | "fieldMustUniq" | "notUniq" | "noKeyName" | "fieldsList" | "addNewField" | "editField" | "errorOccurred" | "errorBulkUpdateFieldName" | "commitBulkUpdateFieldName" | "bulkUpdateFieldName" | "hexColorPrompt" | "schemas.color" | "schemas.borderWidth" | "schemas.borderColor" | "schemas.textColor" | "schemas.bgColor" | "schemas.horizontal" | "schemas.vertical" | "schemas.left" | "schemas.center" | "schemas.right" | "schemas.top" | "schemas.middle" | "schemas.bottom" | "schemas.text.fontName" | "schemas.text.size" | "schemas.text.spacing" | "schemas.text.textAlign" | "schemas.text.verticalAlign" | "schemas.text.lineHeight" | "schemas.text.min" | "schemas.text.max" | "schemas.text.fit" | "schemas.text.dynamicFontSize" | "schemas.barcodes.barColor", dict?: {
|
3
|
+
export declare const I18nContext: import("react").Context<(key: "height" | "width" | "type" | "rotate" | "opacity" | "cancel" | "field" | "fieldName" | "align" | "edit" | "plsInputName" | "fieldMustUniq" | "notUniq" | "noKeyName" | "fieldsList" | "addNewField" | "editField" | "errorOccurred" | "errorBulkUpdateFieldName" | "commitBulkUpdateFieldName" | "bulkUpdateFieldName" | "hexColorPrompt" | "schemas.color" | "schemas.borderWidth" | "schemas.borderColor" | "schemas.textColor" | "schemas.bgColor" | "schemas.horizontal" | "schemas.vertical" | "schemas.left" | "schemas.center" | "schemas.right" | "schemas.top" | "schemas.middle" | "schemas.bottom" | "schemas.text.fontName" | "schemas.text.size" | "schemas.text.spacing" | "schemas.text.textAlign" | "schemas.text.verticalAlign" | "schemas.text.lineHeight" | "schemas.text.min" | "schemas.text.max" | "schemas.text.fit" | "schemas.text.dynamicFontSize" | "schemas.barcodes.barColor" | "schemas.barcodes.includetext", dict?: {
|
4
4
|
cancel: string;
|
5
5
|
field: string;
|
6
6
|
fieldName: string;
|
@@ -47,6 +47,7 @@ export declare const I18nContext: import("react").Context<(key: "height" | "widt
|
|
47
47
|
'schemas.text.fit': string;
|
48
48
|
'schemas.text.dynamicFontSize': string;
|
49
49
|
'schemas.barcodes.barColor': string;
|
50
|
+
'schemas.barcodes.includetext': string;
|
50
51
|
} | undefined) => string>;
|
51
52
|
export declare const FontContext: import("react").Context<Record<string, {
|
52
53
|
data: (string | Uint8Array | ArrayBuffer) & (string | Uint8Array | ArrayBuffer | undefined);
|
package/package.json
CHANGED
@@ -382,7 +382,9 @@ const Canvas = (props: Props, ref: Ref<HTMLDivElement>) => {
|
|
382
382
|
changeSchemas([{ key: 'data', value, schemaId: schema.id }]);
|
383
383
|
}}
|
384
384
|
stopEditing={() => setEditing(false)}
|
385
|
-
outline={`1px ${hoveringSchemaId === schema.id ? 'solid' : 'dashed'} ${
|
385
|
+
outline={`1px ${hoveringSchemaId === schema.id ? 'solid' : 'dashed'} ${
|
386
|
+
schema.readOnly ? 'transparent' : token.colorPrimary
|
387
|
+
}`}
|
386
388
|
scale={scale}
|
387
389
|
/>
|
388
390
|
)}
|
@@ -97,7 +97,7 @@ const TemplateEditor = ({
|
|
97
97
|
const changeSchemas: ChangeSchemas = useCallback(
|
98
98
|
(objs) => {
|
99
99
|
const newSchemas = objs.reduce((acc, { key, value, schemaId }) => {
|
100
|
-
const tgt = acc.find((s) => s.id === schemaId)! as SchemaForUI;
|
100
|
+
const tgt = acc.find((s) => s.id === schemaId)! as SchemaForUI;
|
101
101
|
// Assign to reference
|
102
102
|
set(tgt, key, value);
|
103
103
|
|
package/src/i18n.ts
CHANGED
@@ -49,6 +49,7 @@ const dictEn: { [key in keyof Dict]: string } = {
|
|
49
49
|
'schemas.text.fit': 'Fit',
|
50
50
|
'schemas.text.dynamicFontSize': 'Dynamic Font Size',
|
51
51
|
'schemas.barcodes.barColor': 'Bar Color',
|
52
|
+
'schemas.barcodes.includetext': 'Include Text',
|
52
53
|
};
|
53
54
|
|
54
55
|
const dictJa: { [key in keyof Dict]: string } = {
|
@@ -98,6 +99,7 @@ const dictJa: { [key in keyof Dict]: string } = {
|
|
98
99
|
'schemas.text.fit': 'フィット',
|
99
100
|
'schemas.text.dynamicFontSize': '動的フォントサイズ',
|
100
101
|
'schemas.barcodes.barColor': 'バーの色',
|
102
|
+
'schemas.barcodes.includetext': 'テキストを含める',
|
101
103
|
};
|
102
104
|
|
103
105
|
const dictAr: { [key in keyof Dict]: string } = {
|
@@ -147,6 +149,7 @@ const dictAr: { [key in keyof Dict]: string } = {
|
|
147
149
|
'schemas.text.fit': 'ملاءمة',
|
148
150
|
'schemas.text.dynamicFontSize': 'حجم الخط الديناميكي',
|
149
151
|
'schemas.barcodes.barColor': 'لون الشريط',
|
152
|
+
'schemas.barcodes.includetext': 'تضمين النص',
|
150
153
|
};
|
151
154
|
|
152
155
|
const dictTh: { [key in keyof Dict]: string } = {
|
@@ -196,6 +199,7 @@ const dictTh: { [key in keyof Dict]: string } = {
|
|
196
199
|
'schemas.text.fit': 'พอดี',
|
197
200
|
'schemas.text.dynamicFontSize': 'ขนาดตัวอักษรแบบไดนามิก',
|
198
201
|
'schemas.barcodes.barColor': 'สีบาร์',
|
202
|
+
'schemas.barcodes.includetext': 'รวมข้อความ',
|
199
203
|
};
|
200
204
|
|
201
205
|
const dictIt: { [key in keyof Dict]: string } = {
|
@@ -246,6 +250,7 @@ const dictIt: { [key in keyof Dict]: string } = {
|
|
246
250
|
'schemas.text.fit': 'Adatta',
|
247
251
|
'schemas.text.dynamicFontSize': 'Dimensione font dinamica',
|
248
252
|
'schemas.barcodes.barColor': 'Colore barra',
|
253
|
+
'schemas.barcodes.includetext': 'Includi testo',
|
249
254
|
};
|
250
255
|
|
251
256
|
const dictPl: { [key in keyof Dict]: string } = {
|
@@ -295,6 +300,7 @@ const dictPl: { [key in keyof Dict]: string } = {
|
|
295
300
|
'schemas.text.fit': 'Dopasowanie',
|
296
301
|
'schemas.text.dynamicFontSize': 'Dynamiczny rozmiar czcionki',
|
297
302
|
'schemas.barcodes.barColor': 'Kolor paska',
|
303
|
+
'schemas.barcodes.includetext': 'Dołącz tekst',
|
298
304
|
};
|
299
305
|
|
300
306
|
const dictDe: { [key in keyof Dict]: string } = {
|
@@ -345,6 +351,7 @@ const dictDe: { [key in keyof Dict]: string } = {
|
|
345
351
|
'schemas.text.fit': 'Anpassen',
|
346
352
|
'schemas.text.dynamicFontSize': 'Dynamische Schriftgröße',
|
347
353
|
'schemas.barcodes.barColor': 'Strichcodefarbe',
|
354
|
+
'schemas.barcodes.includetext': 'Text anzeigen',
|
348
355
|
};
|
349
356
|
|
350
357
|
const dictionaries: { [key in Lang]: Dict } = {
|