@lateralus-ai/shipping-ui 1.4.13 → 1.4.15
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/README.md +108 -108
- package/dist/index.cjs +38 -38
- package/dist/index.esm.js +4512 -4491
- package/dist/tailwind-theme.d.ts +21 -0
- package/package.json +99 -99
- package/src/components/DocumentEditor/DocumentEditor.tsx +871 -871
- package/src/components/HelloWorld.tsx +3 -3
- package/src/components/InputPrompt.tsx +96 -96
- package/src/components/ModalPanel.tsx +49 -49
- package/src/components/PdfViewer/ImageViewer.tsx +211 -211
- package/src/components/PdfViewer/PdfViewer.tsx +232 -232
- package/src/components/PdfViewer/index.ts +2 -2
- package/src/components/PdfViewer/usePageManagement.ts +32 -32
- package/src/components/PdfViewer/usePanning.ts +42 -42
- package/src/components/PdfViewer/useRefDimensions.ts +16 -16
- package/src/components/PdfViewer/useRotation.ts +13 -13
- package/src/components/PdfViewer/useZoom.ts +26 -26
- package/src/components/SearchModal.tsx +320 -320
- package/src/components/Sidebar/Button.tsx +20 -20
- package/src/components/Sidebar/Container.tsx +31 -31
- package/src/components/Sidebar/Item.tsx +39 -39
- package/src/components/Sidebar/Layout.tsx +32 -32
- package/src/components/Sidebar/Provider.tsx +47 -47
- package/src/components/Sidebar/SecondaryItem.tsx +39 -39
- package/src/components/Sidebar/SideContainer.tsx +31 -31
- package/src/components/Sidebar/ToggleCollapseButton.tsx +24 -24
- package/src/components/Sidebar/index.ts +8 -8
- package/src/components/Tabs.tsx +43 -43
- package/src/components/icons/CloseSidebarIcon.tsx +19 -19
- package/src/components/icons/CloseSidebarMidIcon.tsx +19 -19
- package/src/components/icons/ExpandIcon.tsx +21 -21
- package/src/components/icons/SendArrowIcon.tsx +23 -23
- package/src/components/icons/SendArrowIconGreen.tsx +17 -17
- package/src/components/icons/SettingsIcon.tsx +33 -33
- package/src/components/icons/XIcon.tsx +21 -21
- package/src/components/index.ts +6 -6
- package/src/index.ts +4 -4
- package/src/material-theme.ts +477 -477
- package/src/stories/Buttons.stories.tsx +15 -15
- package/src/stories/Buttons.tsx +52 -52
- package/src/stories/Checkbox.stories.tsx +15 -15
- package/src/stories/Checkbox.tsx +56 -56
- package/src/stories/ColorPalette.stories.tsx +15 -15
- package/src/stories/ColorPalette.tsx +85 -72
- package/src/stories/DocumentEditor.stories.tsx +287 -287
- package/src/stories/Dropdowns.stories.tsx +15 -15
- package/src/stories/Dropdowns.tsx +52 -52
- package/src/stories/InputPrompt.stories.tsx +15 -15
- package/src/stories/InputPrompt.tsx +63 -63
- package/src/stories/ModalHeader.stories.tsx +35 -35
- package/src/stories/PDFViewer.stories.tsx +39 -39
- package/src/stories/SearchModal.stories.tsx +132 -132
- package/src/stories/SearchModal.tsx +82 -82
- package/src/stories/Sidebar.stories.tsx +15 -15
- package/src/stories/Sidebar.tsx +108 -108
- package/src/stories/Tabs.stories.tsx +51 -51
- package/src/stories/Typography.stories.tsx +15 -15
- package/src/stories/Typography.tsx +110 -110
- package/src/style.css +2 -2
- package/src/styles/tabs.css +55 -55
- package/src/tailwind-theme.ts +258 -231
- package/src/types/documentEditor.ts +55 -55
- package/src/utils/checkboxModule.ts +241 -241
- package/src/utils/cn.ts +11 -11
package/src/tailwind-theme.ts
CHANGED
|
@@ -1,231 +1,258 @@
|
|
|
1
|
-
export const theme = {
|
|
2
|
-
fontFamily: {
|
|
3
|
-
sans: ["Work Sans", "sans-serif"],
|
|
4
|
-
mono: ["Roboto Mono", "monospace"],
|
|
5
|
-
signature: ["Alex Brush", "Lucida Handwriting", "cursive"],
|
|
6
|
-
},
|
|
7
|
-
fontSize: {
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
{
|
|
11
|
-
lineHeight: "
|
|
12
|
-
letterSpacing: "-0.
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
{
|
|
18
|
-
lineHeight: "
|
|
19
|
-
letterSpacing: "-0.
|
|
20
|
-
fontWeight: "500",
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
{
|
|
26
|
-
lineHeight: "28px",
|
|
27
|
-
letterSpacing: "-0.01em",
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
{
|
|
33
|
-
lineHeight: "28px",
|
|
34
|
-
letterSpacing: "-0.01em",
|
|
35
|
-
fontWeight: "500",
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
|
|
39
|
-
"16px",
|
|
40
|
-
{
|
|
41
|
-
lineHeight: "
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
primary:
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
1
|
+
export const theme = {
|
|
2
|
+
fontFamily: {
|
|
3
|
+
sans: ["Work Sans", "sans-serif"],
|
|
4
|
+
mono: ["Roboto Mono", "monospace"],
|
|
5
|
+
signature: ["Alex Brush", "Lucida Handwriting", "cursive"],
|
|
6
|
+
},
|
|
7
|
+
fontSize: {
|
|
8
|
+
title: [
|
|
9
|
+
"28px",
|
|
10
|
+
{
|
|
11
|
+
lineHeight: "34px",
|
|
12
|
+
letterSpacing: "-0.02em",
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
"title-em": [
|
|
16
|
+
"28px",
|
|
17
|
+
{
|
|
18
|
+
lineHeight: "34px",
|
|
19
|
+
letterSpacing: "-0.02em",
|
|
20
|
+
fontWeight: "500",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
subheader: [
|
|
24
|
+
"18px",
|
|
25
|
+
{
|
|
26
|
+
lineHeight: "28px",
|
|
27
|
+
letterSpacing: "-0.01em",
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
"subheader-em": [
|
|
31
|
+
"18px",
|
|
32
|
+
{
|
|
33
|
+
lineHeight: "28px",
|
|
34
|
+
letterSpacing: "-0.01em",
|
|
35
|
+
fontWeight: "500",
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
body: [
|
|
39
|
+
"16px",
|
|
40
|
+
{
|
|
41
|
+
lineHeight: "24px",
|
|
42
|
+
letterSpacing: "-0.01em",
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
"body-em": [
|
|
46
|
+
"16px",
|
|
47
|
+
{
|
|
48
|
+
lineHeight: "24px",
|
|
49
|
+
letterSpacing: "-0.01em",
|
|
50
|
+
fontWeight: "500",
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
"caption-1": [
|
|
54
|
+
"16px",
|
|
55
|
+
{
|
|
56
|
+
lineHeight: "22px",
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
"caption-1-em": [
|
|
60
|
+
"16px",
|
|
61
|
+
{
|
|
62
|
+
lineHeight: "22px",
|
|
63
|
+
fontWeight: "500",
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
"caption-2": [
|
|
67
|
+
"14px",
|
|
68
|
+
{
|
|
69
|
+
lineHeight: "20px",
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
"caption-2-em": [
|
|
73
|
+
"14px",
|
|
74
|
+
{
|
|
75
|
+
lineHeight: "20px",
|
|
76
|
+
fontWeight: "500",
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
footnote: [
|
|
80
|
+
"13px",
|
|
81
|
+
{
|
|
82
|
+
lineHeight: "17px",
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
"footnote-em": [
|
|
86
|
+
"13px",
|
|
87
|
+
{
|
|
88
|
+
lineHeight: "17px",
|
|
89
|
+
fontWeight: "500",
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
width: {
|
|
94
|
+
authPageWidth: "370px",
|
|
95
|
+
},
|
|
96
|
+
keyframes: {
|
|
97
|
+
"accordion-down": {
|
|
98
|
+
from: { height: 0 },
|
|
99
|
+
to: { height: "var(--radix-accordion-content-height)" },
|
|
100
|
+
},
|
|
101
|
+
"accordion-up": {
|
|
102
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
103
|
+
to: { height: 0 },
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
animation: {
|
|
107
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
108
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
109
|
+
},
|
|
110
|
+
colors: {
|
|
111
|
+
brand: {
|
|
112
|
+
50: "#e0fff2",
|
|
113
|
+
100: "#adf0d3",
|
|
114
|
+
200: "#8aeac1",
|
|
115
|
+
300: "#67e4ae",
|
|
116
|
+
400: "#45de9c",
|
|
117
|
+
500: "#26d489",
|
|
118
|
+
600: "#1da56a",
|
|
119
|
+
700: "#15754c",
|
|
120
|
+
800: "#0c452d",
|
|
121
|
+
900: "#04160e",
|
|
122
|
+
},
|
|
123
|
+
gray: {
|
|
124
|
+
50: "#fafafa",
|
|
125
|
+
100: "#f0f0f0",
|
|
126
|
+
200: "#d6d6d6",
|
|
127
|
+
300: "#bdbdbd",
|
|
128
|
+
400: "#a3a3a3",
|
|
129
|
+
500: "#8a8a8a",
|
|
130
|
+
600: "#6e6e6e",
|
|
131
|
+
700: "#525252",
|
|
132
|
+
800: "#363636",
|
|
133
|
+
900: "#1a1a1a",
|
|
134
|
+
},
|
|
135
|
+
green: {
|
|
136
|
+
50: "#f0f5f3",
|
|
137
|
+
100: "#e4f0ea",
|
|
138
|
+
200: "#bbead4",
|
|
139
|
+
300: "#7be4b3",
|
|
140
|
+
400: "#50de9c",
|
|
141
|
+
500: "#2fd487",
|
|
142
|
+
600: "#1ea566",
|
|
143
|
+
700: "#15754c",
|
|
144
|
+
800: "#0c452d",
|
|
145
|
+
900: "#04160e",
|
|
146
|
+
},
|
|
147
|
+
blue: {
|
|
148
|
+
50: "#f5f8fa",
|
|
149
|
+
100: "#e6f0f5",
|
|
150
|
+
200: "#d0eaf7",
|
|
151
|
+
300: "#b5e0f5",
|
|
152
|
+
400: "#7fc7eb",
|
|
153
|
+
500: "#4eb2e4",
|
|
154
|
+
600: "#3f98cc",
|
|
155
|
+
700: "#2b75ab",
|
|
156
|
+
800: "#1b5587",
|
|
157
|
+
900: "#0f3966",
|
|
158
|
+
},
|
|
159
|
+
red: {
|
|
160
|
+
50: "#f9dcdc",
|
|
161
|
+
100: "#f6cbcb",
|
|
162
|
+
200: "#f0a8a8",
|
|
163
|
+
300: "#ea8686",
|
|
164
|
+
400: "#e36363",
|
|
165
|
+
500: "#dd4040",
|
|
166
|
+
600: "#c32222",
|
|
167
|
+
700: "#931a1a",
|
|
168
|
+
800: "#641212",
|
|
169
|
+
900: "#340909",
|
|
170
|
+
},
|
|
171
|
+
orange: {
|
|
172
|
+
50: "#fef7ec",
|
|
173
|
+
100: "#fdecd4",
|
|
174
|
+
200: "#fad7a3",
|
|
175
|
+
300: "#f8c373",
|
|
176
|
+
400: "#f5ae42",
|
|
177
|
+
500: "#f39912",
|
|
178
|
+
600: "#c77c0a",
|
|
179
|
+
700: "#975e08",
|
|
180
|
+
800: "#663f05",
|
|
181
|
+
900: "#362103",
|
|
182
|
+
},
|
|
183
|
+
purple: {
|
|
184
|
+
50: "#f9f5fb",
|
|
185
|
+
100: "#f1e6f5",
|
|
186
|
+
200: "#e1c9ea",
|
|
187
|
+
300: "#d1acde",
|
|
188
|
+
400: "#bb84ce",
|
|
189
|
+
500: "#a55cbe",
|
|
190
|
+
600: "#8840a1",
|
|
191
|
+
700: "#663079",
|
|
192
|
+
800: "#442051",
|
|
193
|
+
900: "#231029",
|
|
194
|
+
},
|
|
195
|
+
"brand-purple": "#ab68ff",
|
|
196
|
+
presentation: "var(--presentation)",
|
|
197
|
+
"text-primary": "var(--text-primary)",
|
|
198
|
+
"text-secondary": "var(--text-secondary)",
|
|
199
|
+
"text-secondary-alt": "var(--text-secondary-alt)",
|
|
200
|
+
"text-tertiary": "var(--text-tertiary)",
|
|
201
|
+
"ring-primary": "var(--ring-primary)",
|
|
202
|
+
"header-primary": "var(--header-primary)",
|
|
203
|
+
"header-hover": "var(--header-hover)",
|
|
204
|
+
"header-button-hover": "var(--header-button-hover)",
|
|
205
|
+
"surface-active": "var(--surface-active)",
|
|
206
|
+
"surface-active-alt": "var(--surface-active-alt)",
|
|
207
|
+
"surface-hover": "var(--surface-hover)",
|
|
208
|
+
"surface-primary": "var(--surface-primary)",
|
|
209
|
+
"surface-primary-alt": "var(--surface-primary-alt)",
|
|
210
|
+
"surface-primary-contrast": "var(--surface-primary-contrast)",
|
|
211
|
+
"surface-secondary": "var(--surface-secondary)",
|
|
212
|
+
"surface-secondary-alt": "var(--surface-secondary-alt)",
|
|
213
|
+
"surface-tertiary": "var(--surface-tertiary)",
|
|
214
|
+
"surface-tertiary-alt": "var(--surface-tertiary-alt)",
|
|
215
|
+
"surface-dialog": "var(--surface-dialog)",
|
|
216
|
+
"surface-submit": "var(--surface-submit)",
|
|
217
|
+
"border-light": "var(--border-light)",
|
|
218
|
+
"border-medium": "var(--border-medium)",
|
|
219
|
+
"border-medium-alt": "var(--border-medium-alt)",
|
|
220
|
+
"border-heavy": "var(--border-heavy)",
|
|
221
|
+
"border-xheavy": "var(--border-xheavy)",
|
|
222
|
+
border: "hsl(var(--border))",
|
|
223
|
+
input: "hsl(var(--input))",
|
|
224
|
+
["switch-unchecked"]: "hsl(var(--switch-unchecked))",
|
|
225
|
+
ring: "hsl(var(--ring))",
|
|
226
|
+
background: "hsl(var(--background))",
|
|
227
|
+
foreground: "hsl(var(--foreground))",
|
|
228
|
+
primary: {
|
|
229
|
+
DEFAULT: "hsl(var(--primary))",
|
|
230
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
231
|
+
},
|
|
232
|
+
secondary: {
|
|
233
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
234
|
+
foreground: "hsl(var(--secondary-foreground))",
|
|
235
|
+
},
|
|
236
|
+
destructive: {
|
|
237
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
238
|
+
foreground: "hsl(var(--destructive-foreground))",
|
|
239
|
+
},
|
|
240
|
+
muted: {
|
|
241
|
+
DEFAULT: "hsl(var(--muted))",
|
|
242
|
+
foreground: "hsl(var(--muted-foreground))",
|
|
243
|
+
},
|
|
244
|
+
accent: {
|
|
245
|
+
DEFAULT: "hsl(var(--accent))",
|
|
246
|
+
foreground: "hsl(var(--accent-foreground))",
|
|
247
|
+
},
|
|
248
|
+
card: {
|
|
249
|
+
DEFAULT: "hsl(var(--card))",
|
|
250
|
+
foreground: "hsl(var(--card-foreground))",
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
borderRadius: {
|
|
254
|
+
lg: "8px",
|
|
255
|
+
md: "calc(8px - 2px)",
|
|
256
|
+
sm: "calc(8px - 4px)",
|
|
257
|
+
},
|
|
258
|
+
};
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
// Type definitions for Document Editor components
|
|
2
|
-
|
|
3
|
-
export interface SchemaProperty {
|
|
4
|
-
type: "string" | "boolean" | "number" | "integer";
|
|
5
|
-
enum?: string[];
|
|
6
|
-
format?: "date" | "date-time" | string;
|
|
7
|
-
description?: string;
|
|
8
|
-
title?: string;
|
|
9
|
-
"ui:widget"?: string;
|
|
10
|
-
"ui:rows"?: number;
|
|
11
|
-
docx_mapping?: DocxMapping;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface DocxMapping {
|
|
15
|
-
type: "checkbox" | "radio" | "text";
|
|
16
|
-
name?: string;
|
|
17
|
-
true_name?: string;
|
|
18
|
-
false_name?: string;
|
|
19
|
-
mapping?: RadioMapping[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface RadioMapping {
|
|
23
|
-
name: string;
|
|
24
|
-
value: string | boolean;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface Schema {
|
|
28
|
-
type: string;
|
|
29
|
-
properties: Record<string, SchemaProperty>;
|
|
30
|
-
required?: string[];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface CheckboxModuleOptions {
|
|
34
|
-
checkboxData?: Record<string, boolean>;
|
|
35
|
-
schema?: Schema;
|
|
36
|
-
finalGeneration?: boolean;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface DocumentEditorProps {
|
|
40
|
-
docxUrl: string;
|
|
41
|
-
schema: Schema;
|
|
42
|
-
onDataChange?: (data: Record<string, any>) => void;
|
|
43
|
-
initialData?: Record<string, any>;
|
|
44
|
-
onSaveRef?: React.MutableRefObject<(() => void) | null>;
|
|
45
|
-
readonly?: boolean;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface DocxtemplaterPart {
|
|
49
|
-
value?: string;
|
|
50
|
-
[key: string]: any;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface DocxtemplaterOptions {
|
|
54
|
-
contentType?: string;
|
|
55
|
-
[key: string]: any;
|
|
1
|
+
// Type definitions for Document Editor components
|
|
2
|
+
|
|
3
|
+
export interface SchemaProperty {
|
|
4
|
+
type: "string" | "boolean" | "number" | "integer";
|
|
5
|
+
enum?: string[];
|
|
6
|
+
format?: "date" | "date-time" | string;
|
|
7
|
+
description?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
"ui:widget"?: string;
|
|
10
|
+
"ui:rows"?: number;
|
|
11
|
+
docx_mapping?: DocxMapping;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface DocxMapping {
|
|
15
|
+
type: "checkbox" | "radio" | "text";
|
|
16
|
+
name?: string;
|
|
17
|
+
true_name?: string;
|
|
18
|
+
false_name?: string;
|
|
19
|
+
mapping?: RadioMapping[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface RadioMapping {
|
|
23
|
+
name: string;
|
|
24
|
+
value: string | boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Schema {
|
|
28
|
+
type: string;
|
|
29
|
+
properties: Record<string, SchemaProperty>;
|
|
30
|
+
required?: string[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface CheckboxModuleOptions {
|
|
34
|
+
checkboxData?: Record<string, boolean>;
|
|
35
|
+
schema?: Schema;
|
|
36
|
+
finalGeneration?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface DocumentEditorProps {
|
|
40
|
+
docxUrl: string;
|
|
41
|
+
schema: Schema;
|
|
42
|
+
onDataChange?: (data: Record<string, any>) => void;
|
|
43
|
+
initialData?: Record<string, any>;
|
|
44
|
+
onSaveRef?: React.MutableRefObject<(() => void) | null>;
|
|
45
|
+
readonly?: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface DocxtemplaterPart {
|
|
49
|
+
value?: string;
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface DocxtemplaterOptions {
|
|
54
|
+
contentType?: string;
|
|
55
|
+
[key: string]: any;
|
|
56
56
|
}
|