@node-projects/web-component-designer-zpl 0.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.
Files changed (34) hide show
  1. package/README.md +15 -0
  2. package/dist/extensions/ZplLayoutResizeExtensionProvider.d.ts +4 -0
  3. package/dist/extensions/ZplLayoutResizeExtensionProvider.js +16 -0
  4. package/dist/index.d.ts +15 -0
  5. package/dist/index.js +15 -0
  6. package/dist/jsBarcodeOptions.d.ts +27 -0
  7. package/dist/jsBarcodeOptions.js +14 -0
  8. package/dist/qr.d.ts +11 -0
  9. package/dist/qr.js +759 -0
  10. package/dist/services/ZplImageDrop.d.ts +10 -0
  11. package/dist/services/ZplImageDrop.js +220 -0
  12. package/dist/services/ZplLayoutCopyPasteService.d.ts +6 -0
  13. package/dist/services/ZplLayoutCopyPasteService.js +19 -0
  14. package/dist/services/ZplLayoutPlacementService.d.ts +10 -0
  15. package/dist/services/ZplLayoutPlacementService.js +25 -0
  16. package/dist/services/ZplParserService.d.ts +6 -0
  17. package/dist/services/ZplParserService.js +213 -0
  18. package/dist/setupZplServiceContainer.d.ts +2 -0
  19. package/dist/setupZplServiceContainer.js +66 -0
  20. package/dist/widgets/zpl-barcode.d.ts +25 -0
  21. package/dist/widgets/zpl-barcode.js +92 -0
  22. package/dist/widgets/zpl-graphic-box.d.ts +25 -0
  23. package/dist/widgets/zpl-graphic-box.js +89 -0
  24. package/dist/widgets/zpl-graphic-circle.d.ts +23 -0
  25. package/dist/widgets/zpl-graphic-circle.js +71 -0
  26. package/dist/widgets/zpl-graphic-diagonal-line.d.ts +29 -0
  27. package/dist/widgets/zpl-graphic-diagonal-line.js +87 -0
  28. package/dist/widgets/zpl-image.d.ts +27 -0
  29. package/dist/widgets/zpl-image.js +120 -0
  30. package/dist/widgets/zpl-text.d.ts +25 -0
  31. package/dist/widgets/zpl-text.js +69 -0
  32. package/dist/zplHelper.d.ts +1 -0
  33. package/dist/zplHelper.js +5 -0
  34. package/package.json +23 -0
package/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # web-component-designer-zpl
2
+
3
+ ## NPM Package
4
+
5
+ https://www.npmjs.com/package/@node-projects/web-component-designer-zpl
6
+
7
+ npm i @node-projects/web-component-designer-zpl
8
+
9
+ ## Description
10
+
11
+ This package contains widgets and services wich help to create a zpl designer.
12
+
13
+ ## Usage
14
+
15
+ see the zpl designer sample application
@@ -0,0 +1,4 @@
1
+ import { IExtensionManager, IDesignerCanvas, IDesignItem, ResizeExtensionProvider } from '@node-projects/web-component-designer';
2
+ export declare class ZplLayoutResizeExtensionProvider extends ResizeExtensionProvider {
3
+ shouldExtend(extensionManager: IExtensionManager, designerView: IDesignerCanvas, designItem: IDesignItem): boolean;
4
+ }
@@ -0,0 +1,16 @@
1
+ import { ResizeExtensionProvider } from '@node-projects/web-component-designer';
2
+ import { ZplImage } from '../widgets/zpl-image.js';
3
+ import { ZplBarcode } from '../widgets/zpl-barcode.js';
4
+ import { ZplText } from '../widgets/zpl-text.js';
5
+ export class ZplLayoutResizeExtensionProvider extends ResizeExtensionProvider {
6
+ shouldExtend(extensionManager, designerView, designItem) {
7
+ //return designItem.element.localName !== MfcConfigRoute.is;
8
+ switch (designItem.name) {
9
+ case ZplImage.is:
10
+ case ZplBarcode.is:
11
+ case ZplText.is:
12
+ return false;
13
+ }
14
+ return true;
15
+ }
16
+ }
@@ -0,0 +1,15 @@
1
+ export * from "./widgets/zpl-barcode.js";
2
+ export * from "./widgets/zpl-graphic-box.js";
3
+ export * from "./widgets/zpl-graphic-circle.js";
4
+ export * from "./widgets/zpl-graphic-diagonal-line.js";
5
+ export * from "./widgets/zpl-image.js";
6
+ export * from "./widgets/zpl-text.js";
7
+ export * from "./extensions/ZplLayoutResizeExtensionProvider.js";
8
+ export * from "./services/ZplImageDrop.js";
9
+ export * from "./services/ZplLayoutCopyPasteService.js";
10
+ export * from "./services/ZplLayoutPlacementService.js";
11
+ export * from "./services/ZplParserService.js";
12
+ export * from "./jsBarcodeOptions.js";
13
+ export * from "./qr.js";
14
+ export * from "./setupZplServiceContainer.js";
15
+ export * from "./zplHelper.js";
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ export * from "./widgets/zpl-barcode.js";
2
+ export * from "./widgets/zpl-graphic-box.js";
3
+ export * from "./widgets/zpl-graphic-circle.js";
4
+ export * from "./widgets/zpl-graphic-diagonal-line.js";
5
+ export * from "./widgets/zpl-image.js";
6
+ export * from "./widgets/zpl-text.js";
7
+ export * from "./extensions/ZplLayoutResizeExtensionProvider.js";
8
+ export * from "./services/ZplImageDrop.js";
9
+ export * from "./services/ZplLayoutCopyPasteService.js";
10
+ export * from "./services/ZplLayoutPlacementService.js";
11
+ export * from "./services/ZplParserService.js";
12
+ export * from "./jsBarcodeOptions.js";
13
+ export * from "./qr.js";
14
+ export * from "./setupZplServiceContainer.js";
15
+ export * from "./zplHelper.js";
@@ -0,0 +1,27 @@
1
+ export type BarcodeOptions = {
2
+ format?: BarcodeFormat;
3
+ width?: number;
4
+ height?: number;
5
+ displayValue?: boolean;
6
+ text?: string;
7
+ fontOptions?: string;
8
+ font?: string;
9
+ textAlign?: string;
10
+ textPosition?: string;
11
+ textMargin?: number;
12
+ fontSize?: number;
13
+ background?: string;
14
+ lineColor?: string;
15
+ margin?: number;
16
+ marginTop?: number;
17
+ marginBottom?: number;
18
+ marginLeft?: number;
19
+ marginRight?: number;
20
+ flat?: boolean;
21
+ valid?: Function;
22
+ };
23
+ export declare enum BarcodeFormat {
24
+ CODE128 = "CODE128",
25
+ EAN13 = "EAN13",
26
+ QR = "QR"
27
+ }
@@ -0,0 +1,14 @@
1
+ export var BarcodeFormat;
2
+ (function (BarcodeFormat) {
3
+ BarcodeFormat["CODE128"] = "CODE128";
4
+ // CODE128A = "CODE128A",
5
+ // CODE128B = "CODE128B",
6
+ // CODE123C = "CODE128C",
7
+ // CODE39 = "CODE39",
8
+ // EAN2 = "EAN2",
9
+ // EAN5 = "EAN5",
10
+ // EAN8 = "EAN8",
11
+ BarcodeFormat["EAN13"] = "EAN13";
12
+ // UPC = "UPC",
13
+ BarcodeFormat["QR"] = "QR";
14
+ })(BarcodeFormat || (BarcodeFormat = {}));
package/dist/qr.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ declare var QRCode: {
2
+ generate: (data: any, options: any) => any[];
3
+ generateHTML: (data: any, options: any) => HTMLDivElement;
4
+ generateSVG: (data: any, options: {
5
+ background?: string;
6
+ modulesize?: number;
7
+ margin?: number;
8
+ }) => SVGSVGElement;
9
+ generatePNG: (data: any, options: any) => string;
10
+ };
11
+ export default QRCode;