seat-editor 3.1.0 → 3.1.2

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.
@@ -0,0 +1 @@
1
+ export type EventHandleType = "dragover" | "dragleave" | "drop" | "dragend" | "mousemove" | "mouseleave" | "mouseenter" | "dragleave" | "dragenter" | "pointerover" | "mousedown" | "pointerup" | "pointerdown" | "pointermove" | "pointerup" | "touchstart" | "touchmove" | "touchend" | "selected";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,77 @@
1
+ import { SVGAttributes } from "react";
2
+ export type Shape = "square" | "circle" | "diamond" | "table-seat-circle" | "table-seat-square" | "background" | "image-table" | "text" | "ellipse" | "polygon" | "selection-box" | "table-seat-rect-circle" | "table-seat-half-square" | "table-seat-rect-square" | "bounding-box";
3
+ export type TagType = "icon" | "text";
4
+ export type Position = "right-top" | "right" | "right-bottom" | "left" | "left-top" | "left-bottom" | "top" | "bottom";
5
+ export type Direction = "flex" | "column";
6
+ export interface Label extends SVGAttributes<SVGElement> {
7
+ label?: string;
8
+ x?: number;
9
+ y?: number;
10
+ fontColor?: string;
11
+ rotation?: number;
12
+ }
13
+ export interface Symbol extends SVGAttributes<SVGElement> {
14
+ value?: string;
15
+ gap?: number;
16
+ fontSize?: number;
17
+ position: Position;
18
+ }
19
+ export interface Item extends SVGAttributes<SVGElement> {
20
+ value?: string;
21
+ type?: TagType;
22
+ x?: number;
23
+ y?: number;
24
+ fontColor?: string;
25
+ symbol?: Symbol;
26
+ }
27
+ export interface Tag {
28
+ key?: string;
29
+ items?: Array<Item>;
30
+ direction?: string;
31
+ offsetX?: number;
32
+ offsetY?: number;
33
+ gap?: number;
34
+ }
35
+ export interface TableProps {
36
+ id?: string;
37
+ labels?: Label[];
38
+ fontColor?: string;
39
+ src?: string;
40
+ shape?: Shape;
41
+ seatFill?: string;
42
+ text?: string;
43
+ tags?: Tag[];
44
+ gapTags?: number;
45
+ x?: number;
46
+ y?: number;
47
+ width?: number;
48
+ height?: number;
49
+ seatCount?: number;
50
+ openSpace?: number;
51
+ fontSize?: number;
52
+ label?: string;
53
+ radius?: number;
54
+ rotation?: number;
55
+ points?: Point[];
56
+ fill?: string;
57
+ seatPositions?: {
58
+ top: number;
59
+ right: number;
60
+ bottom: number;
61
+ left: number;
62
+ };
63
+ }
64
+ export interface SVGElementProps extends SVGAttributes<SVGElement> {
65
+ }
66
+ export interface PropertiesProps extends Omit<SVGAttributes<SVGElement>, keyof TableProps>, TableProps {
67
+ }
68
+ export type BaseElement = {
69
+ x: number;
70
+ y: number;
71
+ width: number;
72
+ height: number;
73
+ };
74
+ export type Point = {
75
+ x: number;
76
+ y: number;
77
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { UploadFile } from "antd";
2
- import { PropertiesProps } from "@/dto/table";
2
+ import { PropertiesProps } from "../../dto/table";
3
3
  interface ControlPanelsProps {
4
4
  action?: (file: UploadFile<File>, type: string, defaultValue: PropertiesProps) => Promise<PropertiesProps>;
5
5
  responseMapping?: {
@@ -1,4 +1,4 @@
1
- import { SeatShape } from "@/utils/constant";
1
+ import { SeatShape } from "../../utils/constant";
2
2
  export declare const isSeatShape: (shape: string) => shape is SeatShape;
3
3
  export declare const getSeatCount: (shape: string, props: any) => any;
4
4
  export declare const getSeatPosition: (shape: string, props: any) => any;
@@ -1,4 +1,4 @@
1
- import { SEAT_SHAPES } from "@/utils/constant";
1
+ import { SEAT_SHAPES } from "../../utils/constant";
2
2
  export const isSeatShape = (shape) => SEAT_SHAPES.includes(shape);
3
3
  export const getSeatCount = (shape, props) => {
4
4
  // if (shape === "table-seat-circle") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",