Skip to content

Commit 83e5b95

Browse files
feat(barcode-generator-web): add Data Matrix widget properties
Adds "Data Matrix" to the top-level barcode format and a new "Advanced Data Matrix Settings" group (GS1 mode toggle, square/rectangle shape, size). Regenerates the widget prop typings to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent eb3d994 commit 83e5b95

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

packages/pluggableWidgets/barcode-generator-web/src/BarcodeGenerator.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<enumerationValues>
2020
<enumerationValue key="CODE128">Barcode</enumerationValue>
2121
<enumerationValue key="QRCode">QR Code</enumerationValue>
22+
<enumerationValue key="DataMatrix">Data Matrix</enumerationValue>
2223
<enumerationValue key="Custom">Custom</enumerationValue>
2324
</enumerationValues>
2425
</property>
@@ -135,6 +136,24 @@
135136
<description>The size of the QR box. Note: In preview, the max height is 200px. The QR code will render at full size in your application.</description>
136137
</property>
137138
</propertyGroup>
139+
<propertyGroup caption="Advanced Data Matrix Settings">
140+
<property key="dmGs1Mode" type="boolean" defaultValue="false">
141+
<caption>GS1 Data Matrix</caption>
142+
<description>Encode as GS1 Data Matrix (FNC1 + Application Identifiers), e.g. (01)09501101020917(17)261231(10)ABC123. Used for pharma serialization.</description>
143+
</property>
144+
<property key="dmShape" type="enumeration" required="true" defaultValue="square">
145+
<caption>Symbol shape</caption>
146+
<description>Choose square or rectangular Data Matrix symbol shape</description>
147+
<enumerationValues>
148+
<enumerationValue key="square">Square</enumerationValue>
149+
<enumerationValue key="rectangle">Rectangle</enumerationValue>
150+
</enumerationValues>
151+
</property>
152+
<property key="dmSize" type="integer" required="true" defaultValue="128">
153+
<caption>Data Matrix size</caption>
154+
<description>The size of the Data Matrix symbol in pixels. Note: In preview, the max height is 200px. The symbol will render at full size in your application.</description>
155+
</property>
156+
</propertyGroup>
138157
<propertyGroup caption="Development">
139158
<property key="logLevel" type="enumeration" required="true" defaultValue="None">
140159
<caption>Log Level</caption>

packages/pluggableWidgets/barcode-generator-web/typings/BarcodeGeneratorProps.d.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { DynamicValue, WebImage } from "mendix";
77
import { Big } from "big.js";
88
import { CSSProperties } from "react";
99

10-
export type CodeFormatEnum = "CODE128" | "QRCode" | "Custom";
10+
export type CodeFormatEnum = "CODE128" | "QRCode" | "DataMatrix" | "Custom";
1111

1212
export type ButtonPositionEnum = "top" | "bottom";
1313

@@ -17,6 +17,8 @@ export type AddonFormatEnum = "None" | "EAN5" | "EAN2";
1717

1818
export type QrLevelEnum = "L" | "M" | "Q" | "H";
1919

20+
export type DmShapeEnum = "square" | "rectangle";
21+
2022
export type LogLevelEnum = "None" | "Info" | "Debug";
2123

2224
export interface BarcodeGeneratorContainerProps {
@@ -42,6 +44,9 @@ export interface BarcodeGeneratorContainerProps {
4244
addonSpacing: number;
4345
qrLevel: QrLevelEnum;
4446
qrSize: number;
47+
dmGs1Mode: boolean;
48+
dmShape: DmShapeEnum;
49+
dmSize: number;
4550
logLevel: LogLevelEnum;
4651
displayValue: boolean;
4752
showAsCard: boolean;
@@ -91,6 +96,9 @@ export interface BarcodeGeneratorPreviewProps {
9196
addonSpacing: number | null;
9297
qrLevel: QrLevelEnum;
9398
qrSize: number | null;
99+
dmGs1Mode: boolean;
100+
dmShape: DmShapeEnum;
101+
dmSize: number | null;
94102
logLevel: LogLevelEnum;
95103
displayValue: boolean;
96104
showAsCard: boolean;

0 commit comments

Comments
 (0)