@captureid/datatypes 1.0.38 → 1.0.40
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/esm2022/lib/model/labeldesigner/label-designer-object.mjs +16 -0
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/captureid-datatypes.mjs +17 -1
- package/fesm2022/captureid-datatypes.mjs.map +1 -1
- package/lib/model/labeldesigner/label-designer-object.d.ts +219 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
export type TLabelLocation = 'labelItems' | 'backSideLabelItems';
|
|
2
|
+
export declare enum QRCodeErrorCorrectionLevel {
|
|
3
|
+
levelL = "L",
|
|
4
|
+
levelM = "M",
|
|
5
|
+
levelQ = "Q",
|
|
6
|
+
levelH = "H"
|
|
7
|
+
}
|
|
8
|
+
export declare enum FieldType {
|
|
9
|
+
qrCode = "qr-code",
|
|
10
|
+
domain = "domain",
|
|
11
|
+
uri = "uri",
|
|
12
|
+
id = "id",
|
|
13
|
+
text = "text"
|
|
14
|
+
}
|
|
15
|
+
export interface PresetSetup {
|
|
16
|
+
name: string;
|
|
17
|
+
setup: ISetup;
|
|
18
|
+
availableFields?: ILabelField[];
|
|
19
|
+
}
|
|
20
|
+
export interface ILabelPdf {
|
|
21
|
+
filename?: string;
|
|
22
|
+
html: string;
|
|
23
|
+
}
|
|
24
|
+
export interface IFontStyle {
|
|
25
|
+
'font-family'?: string;
|
|
26
|
+
'font-size.pt'?: number;
|
|
27
|
+
'font-weight'?: string;
|
|
28
|
+
'font-style'?: string;
|
|
29
|
+
'text-decoration'?: string;
|
|
30
|
+
'text-align'?: string;
|
|
31
|
+
'line-height'?: string;
|
|
32
|
+
'text-transform'?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface IPageStyle extends IFontStyle {
|
|
35
|
+
'height.mm'?: number;
|
|
36
|
+
'width.mm'?: number;
|
|
37
|
+
'paddingTop.mm'?: number;
|
|
38
|
+
'paddingLeft.mm'?: number;
|
|
39
|
+
'paddingBottom.mm'?: number;
|
|
40
|
+
'paddingRight.mm'?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface ILabelStyle extends IFontStyle {
|
|
43
|
+
'height.mm'?: number;
|
|
44
|
+
'width.mm'?: number;
|
|
45
|
+
'marginTop.mm'?: number;
|
|
46
|
+
'marginLeft.mm'?: number;
|
|
47
|
+
'marginBottom.mm'?: number;
|
|
48
|
+
'marginRight.mm'?: number;
|
|
49
|
+
'top.mm'?: number;
|
|
50
|
+
'left.mm'?: number;
|
|
51
|
+
}
|
|
52
|
+
export interface ILabelItem {
|
|
53
|
+
/**
|
|
54
|
+
* @ignore
|
|
55
|
+
*/
|
|
56
|
+
_id?: number;
|
|
57
|
+
/**
|
|
58
|
+
* x position in mm.
|
|
59
|
+
*/
|
|
60
|
+
x: number;
|
|
61
|
+
/**
|
|
62
|
+
* y position in mm.
|
|
63
|
+
*/
|
|
64
|
+
y: number;
|
|
65
|
+
/**
|
|
66
|
+
* Type of the label item.
|
|
67
|
+
*/
|
|
68
|
+
type: 'field';
|
|
69
|
+
/**
|
|
70
|
+
* Fields that belong to this label item.
|
|
71
|
+
*/
|
|
72
|
+
fields: ILabelField[];
|
|
73
|
+
/**
|
|
74
|
+
* Styling for this label item.
|
|
75
|
+
*/
|
|
76
|
+
style?: ILabelStyle;
|
|
77
|
+
/**
|
|
78
|
+
* Order of the item.
|
|
79
|
+
*/
|
|
80
|
+
order?: number;
|
|
81
|
+
}
|
|
82
|
+
export interface ILabelField {
|
|
83
|
+
/**
|
|
84
|
+
* Key value in the data object.
|
|
85
|
+
*/
|
|
86
|
+
field: string;
|
|
87
|
+
/**
|
|
88
|
+
* Name of this field when picking from the available fields list.
|
|
89
|
+
*/
|
|
90
|
+
label: string;
|
|
91
|
+
/**
|
|
92
|
+
* Prefix added to the data if there is a value.
|
|
93
|
+
*/
|
|
94
|
+
prefix?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Suffix added to the data if there is a value.
|
|
97
|
+
*/
|
|
98
|
+
suffix?: string;
|
|
99
|
+
/**
|
|
100
|
+
* If the value can hold array of different values this is used to join the values together.
|
|
101
|
+
*/
|
|
102
|
+
join?: string;
|
|
103
|
+
/**
|
|
104
|
+
* This is the content of the given fields.
|
|
105
|
+
*/
|
|
106
|
+
content?: string;
|
|
107
|
+
/**
|
|
108
|
+
* This is what separates this field from the following field.
|
|
109
|
+
*/
|
|
110
|
+
separator?: string;
|
|
111
|
+
/**
|
|
112
|
+
* If this is true then the separator is always displayed even when there no when.
|
|
113
|
+
*
|
|
114
|
+
* if this is false then the separator is not displayed if there is no value.
|
|
115
|
+
*/
|
|
116
|
+
separatorAlways?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* This tells if the field can hold array value or not
|
|
119
|
+
*/
|
|
120
|
+
isArray?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* What kind of field this is.
|
|
123
|
+
*/
|
|
124
|
+
type?: FieldType;
|
|
125
|
+
/**
|
|
126
|
+
* Styling specific only for this field.
|
|
127
|
+
*/
|
|
128
|
+
style?: IFontStyle;
|
|
129
|
+
/**
|
|
130
|
+
* Targets the styling only this part of the label.
|
|
131
|
+
*/
|
|
132
|
+
styleAppliesTo?: 'content' | 'prefix' | 'suffix' | 'all' | 'contentPrefix' | 'contentSuffix' | 'prefixSuffix';
|
|
133
|
+
/**
|
|
134
|
+
* @ignore
|
|
135
|
+
*/
|
|
136
|
+
_menuOpen?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Map field value from the given to another.
|
|
139
|
+
*/
|
|
140
|
+
valueMap?: {
|
|
141
|
+
[from: string]: string;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
export interface IViewSettings {
|
|
145
|
+
/**
|
|
146
|
+
* Editor is magnified by this amount.
|
|
147
|
+
*/
|
|
148
|
+
magnification: number;
|
|
149
|
+
/**
|
|
150
|
+
* Preview is magnified by this amount.
|
|
151
|
+
*/
|
|
152
|
+
previewMagnification?: number;
|
|
153
|
+
/**
|
|
154
|
+
* Grid density.
|
|
155
|
+
*/
|
|
156
|
+
grid?: number;
|
|
157
|
+
/**
|
|
158
|
+
* Show grid or not.
|
|
159
|
+
*/
|
|
160
|
+
gridVisible?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Display the editor in fullscreen.
|
|
163
|
+
*/
|
|
164
|
+
fullscreen?: boolean;
|
|
165
|
+
}
|
|
166
|
+
export interface ISetup {
|
|
167
|
+
/**
|
|
168
|
+
* Setup version. Used in the future if there is breaking changes introduced in the setup.
|
|
169
|
+
*/
|
|
170
|
+
version?: number;
|
|
171
|
+
/**
|
|
172
|
+
* Pages size object
|
|
173
|
+
*/
|
|
174
|
+
page: IPageStyle;
|
|
175
|
+
/**
|
|
176
|
+
* true - print odd pages using labelItems and even pages using backSideLabelItems
|
|
177
|
+
* false - print all pages using labelItems
|
|
178
|
+
*/
|
|
179
|
+
twoSided?: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Skip this many items from the start
|
|
182
|
+
*/
|
|
183
|
+
skip?: number;
|
|
184
|
+
/**
|
|
185
|
+
* Global styling for the label.
|
|
186
|
+
*/
|
|
187
|
+
label: ILabelStyle;
|
|
188
|
+
/**
|
|
189
|
+
* Items on the frontside of the label
|
|
190
|
+
*/
|
|
191
|
+
labelItems: ILabelItem[];
|
|
192
|
+
/**
|
|
193
|
+
* Label items on the backside
|
|
194
|
+
*/
|
|
195
|
+
backSideLabelItems?: ILabelItem[];
|
|
196
|
+
/**
|
|
197
|
+
* Border styling on the labels.
|
|
198
|
+
*/
|
|
199
|
+
border?: string;
|
|
200
|
+
/**
|
|
201
|
+
* Map values to new one
|
|
202
|
+
*/
|
|
203
|
+
valueMap?: ILabelValueMap;
|
|
204
|
+
}
|
|
205
|
+
export interface IAddLabelEvent {
|
|
206
|
+
item: ILabelItem;
|
|
207
|
+
location: TLabelLocation;
|
|
208
|
+
}
|
|
209
|
+
export interface ILabelValueMap {
|
|
210
|
+
[field: string]: {
|
|
211
|
+
[value: string]: string;
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
export interface IColumnMap {
|
|
215
|
+
[col: string]: string;
|
|
216
|
+
}
|
|
217
|
+
export interface ILabelData {
|
|
218
|
+
[key: string]: string | number | boolean | string[];
|
|
219
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export * from './lib/model/esl/esl-pool-object';
|
|
|
68
68
|
export * from './lib/model/esl/esl-association-object';
|
|
69
69
|
export * from './lib/model/esl/esl-template-object';
|
|
70
70
|
export * from './lib/model/esl/esl-update-object';
|
|
71
|
+
export * from './lib/model/labeldesigner/label-designer-object';
|
|
71
72
|
export * from './lib/model/payment/payment-terminal-object';
|
|
72
73
|
export * from './lib/model/payment/payment-detail-object';
|
|
73
74
|
export * from './lib/model/print/label-object';
|