@form-eng/mantine 1.1.1
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/dist/index.d.mts +88 -0
- package/dist/index.d.ts +88 -0
- package/dist/index.js +570 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +519 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +66 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
// src/fields/Textbox.tsx
|
|
2
|
+
import { TextInput } from "@mantine/core";
|
|
3
|
+
|
|
4
|
+
// src/components/ReadOnlyText.tsx
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var ReadOnlyText = (props) => {
|
|
7
|
+
const { value, fieldName, ellipsifyTextCharacters } = props;
|
|
8
|
+
const cutoff = (ellipsifyTextCharacters || 0) - 3;
|
|
9
|
+
const displayValue = value ? ellipsifyTextCharacters && value.length > ellipsifyTextCharacters ? `${value.substring(0, cutoff)}...` : value : "-";
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
"span",
|
|
12
|
+
{
|
|
13
|
+
id: `${fieldName}-read-only`,
|
|
14
|
+
className: "fe-read-only-text",
|
|
15
|
+
title: value,
|
|
16
|
+
children: displayValue
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// src/helpers.ts
|
|
22
|
+
import {
|
|
23
|
+
FieldClassName,
|
|
24
|
+
GetFieldDataTestId,
|
|
25
|
+
formatDateTime,
|
|
26
|
+
DocumentLinksStrings
|
|
27
|
+
} from "@form-eng/core";
|
|
28
|
+
|
|
29
|
+
// src/fields/Textbox.tsx
|
|
30
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
31
|
+
var Textbox = (props) => {
|
|
32
|
+
const { fieldName, programName, entityType, entityId, value, readOnly, config, error, required, placeholder, setFieldValue } = props;
|
|
33
|
+
const onChange = (event) => {
|
|
34
|
+
setFieldValue(fieldName, event.target.value, false, 3e3);
|
|
35
|
+
};
|
|
36
|
+
if (readOnly) {
|
|
37
|
+
return /* @__PURE__ */ jsx2(
|
|
38
|
+
ReadOnlyText,
|
|
39
|
+
{
|
|
40
|
+
fieldName,
|
|
41
|
+
value,
|
|
42
|
+
ellipsifyTextCharacters: config?.ellipsifyTextCharacters
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
return /* @__PURE__ */ jsx2(
|
|
47
|
+
TextInput,
|
|
48
|
+
{
|
|
49
|
+
className: FieldClassName("fe-textbox", error),
|
|
50
|
+
autoComplete: "off",
|
|
51
|
+
value: value ?? "",
|
|
52
|
+
onChange,
|
|
53
|
+
placeholder: placeholder ?? config?.placeHolder,
|
|
54
|
+
required,
|
|
55
|
+
"aria-invalid": !!error,
|
|
56
|
+
"aria-required": required,
|
|
57
|
+
"data-testid": GetFieldDataTestId(fieldName, programName, entityType, entityId)
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
var Textbox_default = Textbox;
|
|
62
|
+
|
|
63
|
+
// src/fields/Number.tsx
|
|
64
|
+
import { isNull } from "@form-eng/core";
|
|
65
|
+
import { NumberInput } from "@mantine/core";
|
|
66
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
67
|
+
var NumberField = (props) => {
|
|
68
|
+
const { fieldName, programName, entityType, entityId, value, readOnly, error, required, setFieldValue } = props;
|
|
69
|
+
const onChange = (val) => {
|
|
70
|
+
if (typeof val === "number") {
|
|
71
|
+
setFieldValue(fieldName, val, false, 1500);
|
|
72
|
+
} else if (val === "") {
|
|
73
|
+
setFieldValue(fieldName, null, false, 1500);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
if (readOnly) {
|
|
77
|
+
return /* @__PURE__ */ jsx3(ReadOnlyText, { fieldName, value: !isNull(value) ? String(value) : "" });
|
|
78
|
+
}
|
|
79
|
+
return /* @__PURE__ */ jsx3(
|
|
80
|
+
NumberInput,
|
|
81
|
+
{
|
|
82
|
+
className: FieldClassName("fe-number", error),
|
|
83
|
+
autoComplete: "off",
|
|
84
|
+
value: !isNull(value) ? value : "",
|
|
85
|
+
onChange,
|
|
86
|
+
required,
|
|
87
|
+
"aria-invalid": !!error,
|
|
88
|
+
"aria-required": required,
|
|
89
|
+
"data-testid": GetFieldDataTestId(fieldName, programName, entityType, entityId)
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
var Number_default = NumberField;
|
|
94
|
+
|
|
95
|
+
// src/fields/Toggle.tsx
|
|
96
|
+
import { convertBooleanToYesOrNoText } from "@form-eng/core";
|
|
97
|
+
import { Switch } from "@mantine/core";
|
|
98
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
99
|
+
var Toggle = (props) => {
|
|
100
|
+
const { fieldName, programName, entityType, entityId, value, readOnly, error, required, setFieldValue } = props;
|
|
101
|
+
const onChange = (event) => {
|
|
102
|
+
setFieldValue(fieldName, event.currentTarget.checked);
|
|
103
|
+
};
|
|
104
|
+
if (readOnly) {
|
|
105
|
+
return /* @__PURE__ */ jsx4(ReadOnlyText, { fieldName, value: convertBooleanToYesOrNoText(value) });
|
|
106
|
+
}
|
|
107
|
+
return /* @__PURE__ */ jsx4(
|
|
108
|
+
Switch,
|
|
109
|
+
{
|
|
110
|
+
className: "fe-toggle",
|
|
111
|
+
checked: !!value,
|
|
112
|
+
onChange,
|
|
113
|
+
required,
|
|
114
|
+
"aria-invalid": !!error,
|
|
115
|
+
"aria-required": required,
|
|
116
|
+
"data-testid": GetFieldDataTestId(fieldName, programName, entityType, entityId)
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
};
|
|
120
|
+
var Toggle_default = Toggle;
|
|
121
|
+
|
|
122
|
+
// src/fields/Dropdown.tsx
|
|
123
|
+
import { Select } from "@mantine/core";
|
|
124
|
+
import React from "react";
|
|
125
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
126
|
+
var Dropdown = (props) => {
|
|
127
|
+
const { fieldName, programName, entityType, entityId, value, readOnly, config, error, required, options, placeholder, setFieldValue } = props;
|
|
128
|
+
const onChange = (val) => {
|
|
129
|
+
setFieldValue(fieldName, val ?? "");
|
|
130
|
+
};
|
|
131
|
+
React.useEffect(() => {
|
|
132
|
+
if (!value && !readOnly && config?.setDefaultKeyIfOnlyOneOption && options?.length === 1) {
|
|
133
|
+
setFieldValue(fieldName, String(options[0].value));
|
|
134
|
+
}
|
|
135
|
+
}, [options]);
|
|
136
|
+
if (readOnly) {
|
|
137
|
+
return /* @__PURE__ */ jsx5(ReadOnlyText, { fieldName, value });
|
|
138
|
+
}
|
|
139
|
+
const data = options?.map((option) => ({
|
|
140
|
+
value: String(option.value),
|
|
141
|
+
label: option.label,
|
|
142
|
+
disabled: option.disabled
|
|
143
|
+
})) ?? [];
|
|
144
|
+
return /* @__PURE__ */ jsx5(
|
|
145
|
+
Select,
|
|
146
|
+
{
|
|
147
|
+
className: FieldClassName("fe-dropdown", error),
|
|
148
|
+
value: value ? String(value) : null,
|
|
149
|
+
onChange,
|
|
150
|
+
data,
|
|
151
|
+
placeholder: placeholder ?? config?.placeHolder,
|
|
152
|
+
clearable: true,
|
|
153
|
+
required,
|
|
154
|
+
"aria-invalid": !!error,
|
|
155
|
+
"aria-required": required,
|
|
156
|
+
"data-testid": GetFieldDataTestId(fieldName, programName, entityType, entityId)
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
};
|
|
160
|
+
var Dropdown_default = Dropdown;
|
|
161
|
+
|
|
162
|
+
// src/fields/SimpleDropdown.tsx
|
|
163
|
+
import { NativeSelect } from "@mantine/core";
|
|
164
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
165
|
+
var SimpleDropdown = (props) => {
|
|
166
|
+
const { fieldName, programName, entityType, entityId, value, readOnly, config, error, required, placeholder, setFieldValue } = props;
|
|
167
|
+
const simpleOptions = config?.dropdownOptions ?? [];
|
|
168
|
+
const onChange = (event) => {
|
|
169
|
+
setFieldValue(fieldName, event.currentTarget.value);
|
|
170
|
+
};
|
|
171
|
+
if (readOnly) {
|
|
172
|
+
return /* @__PURE__ */ jsx6(ReadOnlyText, { fieldName, value });
|
|
173
|
+
}
|
|
174
|
+
const data = [
|
|
175
|
+
{ value: "", label: placeholder ?? config?.placeHolder ?? "" },
|
|
176
|
+
...simpleOptions.map((option) => ({ value: option, label: option }))
|
|
177
|
+
];
|
|
178
|
+
return /* @__PURE__ */ jsx6(
|
|
179
|
+
NativeSelect,
|
|
180
|
+
{
|
|
181
|
+
className: FieldClassName("fe-simple-dropdown", error),
|
|
182
|
+
value: value ?? "",
|
|
183
|
+
onChange,
|
|
184
|
+
data,
|
|
185
|
+
required,
|
|
186
|
+
"aria-invalid": !!error,
|
|
187
|
+
"aria-required": required,
|
|
188
|
+
"data-testid": GetFieldDataTestId(fieldName, programName, entityType, entityId)
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
};
|
|
192
|
+
var SimpleDropdown_default = SimpleDropdown;
|
|
193
|
+
|
|
194
|
+
// src/fields/MultiSelect.tsx
|
|
195
|
+
import { MultiSelect as MantineMultiSelect } from "@mantine/core";
|
|
196
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
197
|
+
var MultiSelect = (props) => {
|
|
198
|
+
const { fieldName, programName, entityType, entityId, value, readOnly, error, required, options, setFieldValue } = props;
|
|
199
|
+
const selectedValues = value ?? [];
|
|
200
|
+
const onChange = (val) => {
|
|
201
|
+
setFieldValue(fieldName, val, false, 1500);
|
|
202
|
+
};
|
|
203
|
+
if (readOnly) {
|
|
204
|
+
return selectedValues.length > 0 ? /* @__PURE__ */ jsx7("ul", { className: "fe-multiselect-readonly", children: selectedValues.map((v, i) => /* @__PURE__ */ jsx7("li", { children: v }, i)) }) : /* @__PURE__ */ jsx7("span", { className: "fe-read-only-text", children: "-" });
|
|
205
|
+
}
|
|
206
|
+
const data = options?.map((option) => ({
|
|
207
|
+
value: String(option.value),
|
|
208
|
+
label: option.label,
|
|
209
|
+
disabled: option.disabled
|
|
210
|
+
})) ?? [];
|
|
211
|
+
return /* @__PURE__ */ jsx7(
|
|
212
|
+
MantineMultiSelect,
|
|
213
|
+
{
|
|
214
|
+
className: FieldClassName("fe-multi-select", error),
|
|
215
|
+
value: selectedValues,
|
|
216
|
+
onChange,
|
|
217
|
+
data,
|
|
218
|
+
clearable: true,
|
|
219
|
+
required,
|
|
220
|
+
"aria-invalid": !!error,
|
|
221
|
+
"aria-required": required,
|
|
222
|
+
"data-testid": GetFieldDataTestId(fieldName, programName, entityType, entityId)
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
};
|
|
226
|
+
var MultiSelect_default = MultiSelect;
|
|
227
|
+
|
|
228
|
+
// src/fields/DateControl.tsx
|
|
229
|
+
import { FormStrings } from "@form-eng/core";
|
|
230
|
+
import { jsx as jsx8, jsxs } from "react/jsx-runtime";
|
|
231
|
+
var DateControl = (props) => {
|
|
232
|
+
const { fieldName, programName, entityType, entityId, value, readOnly, error, required, setFieldValue } = props;
|
|
233
|
+
const onChange = (event) => {
|
|
234
|
+
const date = new Date(event.target.value);
|
|
235
|
+
if (!isNaN(date.getTime())) {
|
|
236
|
+
setFieldValue(fieldName, date.toISOString());
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
const onClear = () => {
|
|
240
|
+
setFieldValue(fieldName, null);
|
|
241
|
+
};
|
|
242
|
+
const dateInputValue = value ? new Date(value).toISOString().split("T")[0] : "";
|
|
243
|
+
if (readOnly) {
|
|
244
|
+
return value ? /* @__PURE__ */ jsx8(
|
|
245
|
+
"time",
|
|
246
|
+
{
|
|
247
|
+
className: "fe-read-only-date",
|
|
248
|
+
dateTime: value,
|
|
249
|
+
children: formatDateTime(value, { hideTimestamp: true })
|
|
250
|
+
}
|
|
251
|
+
) : /* @__PURE__ */ jsx8("span", { className: "fe-read-only-text", children: "-" });
|
|
252
|
+
}
|
|
253
|
+
return /* @__PURE__ */ jsxs("div", { className: "fe-date-control", children: [
|
|
254
|
+
/* @__PURE__ */ jsx8(
|
|
255
|
+
"input",
|
|
256
|
+
{
|
|
257
|
+
type: "date",
|
|
258
|
+
className: "fe-date-control__input",
|
|
259
|
+
value: dateInputValue,
|
|
260
|
+
onChange,
|
|
261
|
+
"aria-invalid": !!error,
|
|
262
|
+
"aria-required": required,
|
|
263
|
+
"data-testid": GetFieldDataTestId(fieldName, programName, entityType, entityId)
|
|
264
|
+
}
|
|
265
|
+
),
|
|
266
|
+
/* @__PURE__ */ jsx8(
|
|
267
|
+
"button",
|
|
268
|
+
{
|
|
269
|
+
type: "button",
|
|
270
|
+
className: "fe-date-control__clear",
|
|
271
|
+
onClick: onClear,
|
|
272
|
+
title: FormStrings.clickToClear,
|
|
273
|
+
"aria-label": `${fieldName} ${FormStrings.clear}`,
|
|
274
|
+
children: "\xD7"
|
|
275
|
+
}
|
|
276
|
+
)
|
|
277
|
+
] });
|
|
278
|
+
};
|
|
279
|
+
var DateControl_default = DateControl;
|
|
280
|
+
|
|
281
|
+
// src/fields/Slider.tsx
|
|
282
|
+
import { Slider as MantineSlider } from "@mantine/core";
|
|
283
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
284
|
+
var Slider = (props) => {
|
|
285
|
+
const { fieldName, programName, entityType, entityId, value, readOnly, config, error, required, setFieldValue } = props;
|
|
286
|
+
const onChange = (val) => {
|
|
287
|
+
setFieldValue(fieldName, val);
|
|
288
|
+
};
|
|
289
|
+
if (readOnly) {
|
|
290
|
+
return /* @__PURE__ */ jsx9(ReadOnlyText, { fieldName, value: String(value) });
|
|
291
|
+
}
|
|
292
|
+
return /* @__PURE__ */ jsx9(
|
|
293
|
+
"div",
|
|
294
|
+
{
|
|
295
|
+
className: FieldClassName("fe-slider", error),
|
|
296
|
+
"aria-invalid": !!error,
|
|
297
|
+
"aria-required": required,
|
|
298
|
+
"data-testid": GetFieldDataTestId(fieldName, programName, entityType, entityId),
|
|
299
|
+
children: /* @__PURE__ */ jsx9(
|
|
300
|
+
MantineSlider,
|
|
301
|
+
{
|
|
302
|
+
value: value ?? 0,
|
|
303
|
+
onChange,
|
|
304
|
+
max: config?.max,
|
|
305
|
+
min: config?.min,
|
|
306
|
+
step: config?.step,
|
|
307
|
+
label: (val) => String(val)
|
|
308
|
+
}
|
|
309
|
+
)
|
|
310
|
+
}
|
|
311
|
+
);
|
|
312
|
+
};
|
|
313
|
+
var Slider_default = Slider;
|
|
314
|
+
|
|
315
|
+
// src/fields/RadioGroup.tsx
|
|
316
|
+
import { Radio, Group } from "@mantine/core";
|
|
317
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
318
|
+
var RadioGroup = (props) => {
|
|
319
|
+
const { fieldName, programName, entityType, entityId, value, readOnly, error, required, options, setFieldValue } = props;
|
|
320
|
+
const onChange = (val) => {
|
|
321
|
+
setFieldValue(fieldName, val);
|
|
322
|
+
};
|
|
323
|
+
if (readOnly) {
|
|
324
|
+
const label = options?.find((o) => String(o.value) === String(value))?.label ?? value;
|
|
325
|
+
return /* @__PURE__ */ jsx10(ReadOnlyText, { fieldName, value: label });
|
|
326
|
+
}
|
|
327
|
+
return /* @__PURE__ */ jsx10(
|
|
328
|
+
Radio.Group,
|
|
329
|
+
{
|
|
330
|
+
className: "fe-radio-group",
|
|
331
|
+
value: value ? String(value) : "",
|
|
332
|
+
onChange,
|
|
333
|
+
required,
|
|
334
|
+
"aria-invalid": !!error,
|
|
335
|
+
"aria-required": required,
|
|
336
|
+
"data-testid": GetFieldDataTestId(fieldName, programName, entityType, entityId),
|
|
337
|
+
children: /* @__PURE__ */ jsx10(Group, { mt: "xs", children: options?.map((option) => /* @__PURE__ */ jsx10(
|
|
338
|
+
Radio,
|
|
339
|
+
{
|
|
340
|
+
value: String(option.value),
|
|
341
|
+
label: option.label,
|
|
342
|
+
disabled: option.disabled
|
|
343
|
+
},
|
|
344
|
+
String(option.value)
|
|
345
|
+
)) })
|
|
346
|
+
}
|
|
347
|
+
);
|
|
348
|
+
};
|
|
349
|
+
var RadioGroup_default = RadioGroup;
|
|
350
|
+
|
|
351
|
+
// src/fields/CheckboxGroup.tsx
|
|
352
|
+
import { Checkbox, Group as Group2 } from "@mantine/core";
|
|
353
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
354
|
+
var CheckboxGroup = (props) => {
|
|
355
|
+
const { fieldName, programName, entityType, entityId, value, readOnly, error, required, options, setFieldValue } = props;
|
|
356
|
+
const selected = Array.isArray(value) ? value : [];
|
|
357
|
+
const onChange = (val) => {
|
|
358
|
+
setFieldValue(fieldName, val);
|
|
359
|
+
};
|
|
360
|
+
if (readOnly) {
|
|
361
|
+
const labels = options?.filter((o) => selected.includes(String(o.value))).map((o) => o.label).join(", ");
|
|
362
|
+
return /* @__PURE__ */ jsx11(ReadOnlyText, { fieldName, value: labels ?? "" });
|
|
363
|
+
}
|
|
364
|
+
return /* @__PURE__ */ jsx11(
|
|
365
|
+
Checkbox.Group,
|
|
366
|
+
{
|
|
367
|
+
className: "fe-checkbox-group",
|
|
368
|
+
value: selected,
|
|
369
|
+
onChange,
|
|
370
|
+
"aria-invalid": !!error,
|
|
371
|
+
"aria-required": required,
|
|
372
|
+
"data-testid": GetFieldDataTestId(fieldName, programName, entityType, entityId),
|
|
373
|
+
children: /* @__PURE__ */ jsx11(Group2, { mt: "xs", children: options?.map((option) => /* @__PURE__ */ jsx11(
|
|
374
|
+
Checkbox,
|
|
375
|
+
{
|
|
376
|
+
value: String(option.value),
|
|
377
|
+
label: option.label,
|
|
378
|
+
disabled: option.disabled
|
|
379
|
+
},
|
|
380
|
+
String(option.value)
|
|
381
|
+
)) })
|
|
382
|
+
}
|
|
383
|
+
);
|
|
384
|
+
};
|
|
385
|
+
var CheckboxGroup_default = CheckboxGroup;
|
|
386
|
+
|
|
387
|
+
// src/fields/Textarea.tsx
|
|
388
|
+
import { Textarea as MantineTextarea } from "@mantine/core";
|
|
389
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
390
|
+
var Textarea = (props) => {
|
|
391
|
+
const { fieldName, programName, entityType, entityId, value, readOnly, config, error, required, setFieldValue } = props;
|
|
392
|
+
const onChange = (event) => {
|
|
393
|
+
setFieldValue(fieldName, event.target.value, false, 3e3);
|
|
394
|
+
};
|
|
395
|
+
if (readOnly) {
|
|
396
|
+
return /* @__PURE__ */ jsx12(
|
|
397
|
+
ReadOnlyText,
|
|
398
|
+
{
|
|
399
|
+
fieldName,
|
|
400
|
+
value: value ? `${value}` : "",
|
|
401
|
+
ellipsifyTextCharacters: config?.ellipsifyTextCharacters
|
|
402
|
+
}
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
return /* @__PURE__ */ jsx12(
|
|
406
|
+
MantineTextarea,
|
|
407
|
+
{
|
|
408
|
+
className: FieldClassName("fe-textarea", error),
|
|
409
|
+
autoComplete: "off",
|
|
410
|
+
value: value ? `${value}` : "",
|
|
411
|
+
onChange,
|
|
412
|
+
rows: config?.numberOfRows ?? 4,
|
|
413
|
+
autosize: config?.autoAdjustHeight,
|
|
414
|
+
maxLength: config?.maxLimit,
|
|
415
|
+
required,
|
|
416
|
+
"aria-invalid": !!error,
|
|
417
|
+
"aria-required": required,
|
|
418
|
+
"data-testid": GetFieldDataTestId(fieldName, programName, entityType, entityId)
|
|
419
|
+
}
|
|
420
|
+
);
|
|
421
|
+
};
|
|
422
|
+
var Textarea_default = Textarea;
|
|
423
|
+
|
|
424
|
+
// src/fields/DynamicFragment.tsx
|
|
425
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
426
|
+
var DynamicFragment = (props) => {
|
|
427
|
+
const { value } = props;
|
|
428
|
+
return /* @__PURE__ */ jsx13("input", { type: "hidden", value });
|
|
429
|
+
};
|
|
430
|
+
var DynamicFragment_default = DynamicFragment;
|
|
431
|
+
|
|
432
|
+
// src/fields/readonly/ReadOnly.tsx
|
|
433
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
434
|
+
var ReadOnly = (props) => {
|
|
435
|
+
const { fieldName, value, config } = props;
|
|
436
|
+
return /* @__PURE__ */ jsx14(ReadOnlyText, { fieldName, value, ...config });
|
|
437
|
+
};
|
|
438
|
+
var ReadOnly_default = ReadOnly;
|
|
439
|
+
|
|
440
|
+
// src/components/StatusMessage.tsx
|
|
441
|
+
import { FormStrings as FormStrings2 } from "@form-eng/core";
|
|
442
|
+
import { jsx as jsx15, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
443
|
+
var StatusMessage = (props) => {
|
|
444
|
+
const { id, error, errorCount, savePending, saving } = props;
|
|
445
|
+
return /* @__PURE__ */ jsx15("div", { className: "fe-status-message", children: error ? /* @__PURE__ */ jsx15("span", { id, role: "alert", style: { color: "var(--mantine-color-red-6, #fa5252)" }, children: error.message || "Error" }) : savePending ? /* @__PURE__ */ jsxs2("span", { id, role: "alert", style: { color: "var(--mantine-color-orange-6, #fd7e14)" }, children: [
|
|
446
|
+
FormStrings2.autoSavePending,
|
|
447
|
+
" (",
|
|
448
|
+
errorCount,
|
|
449
|
+
" ",
|
|
450
|
+
FormStrings2.remaining,
|
|
451
|
+
")"
|
|
452
|
+
] }) : saving ? /* @__PURE__ */ jsx15("span", { id, role: "status", style: { color: "var(--mantine-color-gray-6, #868e96)" }, children: FormStrings2.saving }) : null });
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
// src/components/FormLoading.tsx
|
|
456
|
+
import { FormConstants } from "@form-eng/core";
|
|
457
|
+
import { jsx as jsx16, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
458
|
+
var FormLoading = (props) => {
|
|
459
|
+
const { loadingShimmerCount, loadingFieldShimmerHeight, inPanel, hideTitleShimmer } = props;
|
|
460
|
+
const count = loadingShimmerCount || FormConstants.loadingShimmerCount;
|
|
461
|
+
const height = loadingFieldShimmerHeight || FormConstants.loadingFieldShimmerHeight;
|
|
462
|
+
return /* @__PURE__ */ jsx16(
|
|
463
|
+
"div",
|
|
464
|
+
{
|
|
465
|
+
className: `fe-form-loading ${inPanel ? "fe-form-loading--panel" : ""}`,
|
|
466
|
+
role: "status",
|
|
467
|
+
"aria-label": "Loading form",
|
|
468
|
+
children: [...Array(count)].map((_, i) => /* @__PURE__ */ jsxs3("div", { style: { marginBottom: 16 }, children: [
|
|
469
|
+
!hideTitleShimmer && /* @__PURE__ */ jsx16("div", { className: "fe-skeleton", style: { width: "33%", height: 16, marginBottom: 8, background: "var(--mantine-color-gray-2, #e9ecef)", borderRadius: 4 } }),
|
|
470
|
+
/* @__PURE__ */ jsx16("div", { className: "fe-skeleton", style: { width: "100%", height, background: "var(--mantine-color-gray-2, #e9ecef)", borderRadius: 4 } })
|
|
471
|
+
] }, `fe-loading-${i}`))
|
|
472
|
+
}
|
|
473
|
+
);
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
// src/registry.ts
|
|
477
|
+
import { ComponentTypes } from "@form-eng/core";
|
|
478
|
+
import React2 from "react";
|
|
479
|
+
function createMantineFieldRegistry() {
|
|
480
|
+
return {
|
|
481
|
+
[ComponentTypes.Textbox]: React2.createElement(Textbox_default),
|
|
482
|
+
[ComponentTypes.Number]: React2.createElement(Number_default),
|
|
483
|
+
[ComponentTypes.Toggle]: React2.createElement(Toggle_default),
|
|
484
|
+
[ComponentTypes.Dropdown]: React2.createElement(Dropdown_default),
|
|
485
|
+
[ComponentTypes.SimpleDropdown]: React2.createElement(SimpleDropdown_default),
|
|
486
|
+
[ComponentTypes.MultiSelect]: React2.createElement(MultiSelect_default),
|
|
487
|
+
[ComponentTypes.DateControl]: React2.createElement(DateControl_default),
|
|
488
|
+
[ComponentTypes.Slider]: React2.createElement(Slider_default),
|
|
489
|
+
[ComponentTypes.RadioGroup]: React2.createElement(RadioGroup_default),
|
|
490
|
+
[ComponentTypes.CheckboxGroup]: React2.createElement(CheckboxGroup_default),
|
|
491
|
+
[ComponentTypes.Textarea]: React2.createElement(Textarea_default),
|
|
492
|
+
[ComponentTypes.Fragment]: React2.createElement(DynamicFragment_default),
|
|
493
|
+
[ComponentTypes.ReadOnly]: React2.createElement(ReadOnly_default)
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
export {
|
|
497
|
+
CheckboxGroup_default as CheckboxGroup,
|
|
498
|
+
DateControl_default as DateControl,
|
|
499
|
+
DocumentLinksStrings,
|
|
500
|
+
Dropdown_default as Dropdown,
|
|
501
|
+
DynamicFragment_default as DynamicFragment,
|
|
502
|
+
FieldClassName,
|
|
503
|
+
FormLoading,
|
|
504
|
+
GetFieldDataTestId,
|
|
505
|
+
MultiSelect_default as MultiSelect,
|
|
506
|
+
Number_default as Number,
|
|
507
|
+
RadioGroup_default as RadioGroup,
|
|
508
|
+
ReadOnly_default as ReadOnly,
|
|
509
|
+
ReadOnlyText,
|
|
510
|
+
SimpleDropdown_default as SimpleDropdown,
|
|
511
|
+
Slider_default as Slider,
|
|
512
|
+
StatusMessage,
|
|
513
|
+
Textarea_default as Textarea,
|
|
514
|
+
Textbox_default as Textbox,
|
|
515
|
+
Toggle_default as Toggle,
|
|
516
|
+
createMantineFieldRegistry,
|
|
517
|
+
formatDateTime
|
|
518
|
+
};
|
|
519
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/fields/Textbox.tsx","../src/components/ReadOnlyText.tsx","../src/helpers.ts","../src/fields/Number.tsx","../src/fields/Toggle.tsx","../src/fields/Dropdown.tsx","../src/fields/SimpleDropdown.tsx","../src/fields/MultiSelect.tsx","../src/fields/DateControl.tsx","../src/fields/Slider.tsx","../src/fields/RadioGroup.tsx","../src/fields/CheckboxGroup.tsx","../src/fields/Textarea.tsx","../src/fields/DynamicFragment.tsx","../src/fields/readonly/ReadOnly.tsx","../src/components/StatusMessage.tsx","../src/components/FormLoading.tsx","../src/registry.ts"],"sourcesContent":["import { IFieldProps } from \"@form-eng/core\";\nimport { TextInput } from \"@mantine/core\";\nimport React from \"react\";\nimport { ReadOnlyText } from \"../components/ReadOnlyText\";\nimport { FieldClassName, GetFieldDataTestId } from \"../helpers\";\n\ninterface ITextboxProps {\n ellipsifyTextCharacters?: number;\n placeHolder?: string;\n multiline?: boolean;\n}\n\nconst Textbox = (props: IFieldProps<ITextboxProps>) => {\n const { fieldName, programName, entityType, entityId, value, readOnly, config, error, required, placeholder, setFieldValue } = props;\n\n const onChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n setFieldValue(fieldName, event.target.value, false, 3000);\n };\n\n if (readOnly) {\n return (\n <ReadOnlyText\n fieldName={fieldName}\n value={value as string}\n ellipsifyTextCharacters={config?.ellipsifyTextCharacters}\n />\n );\n }\n\n return (\n <TextInput\n className={FieldClassName(\"fe-textbox\", error)}\n autoComplete=\"off\"\n value={(value as string) ?? \"\"}\n onChange={onChange}\n placeholder={placeholder ?? config?.placeHolder}\n required={required}\n aria-invalid={!!error}\n aria-required={required}\n data-testid={GetFieldDataTestId(fieldName, programName, entityType, entityId)}\n />\n );\n};\n\nexport default Textbox;\n","import React from \"react\";\n\nexport interface IReadOnlyFieldProps {\n readonly value?: string;\n readonly fieldName?: string;\n readonly labelClassName?: string;\n readonly valueClassName?: string;\n readonly showControlOnSide?: boolean;\n readonly containerClassName?: string;\n readonly ellipsifyTextCharacters?: number;\n}\n\nexport const ReadOnlyText: React.FunctionComponent<IReadOnlyFieldProps> = (props) => {\n const { value, fieldName, ellipsifyTextCharacters } = props;\n const cutoff = (ellipsifyTextCharacters || 0) - 3;\n\n const displayValue = value\n ? ellipsifyTextCharacters && value.length > ellipsifyTextCharacters\n ? `${value.substring(0, cutoff)}...`\n : value\n : \"-\";\n\n return (\n <span\n id={`${fieldName}-read-only`}\n className=\"fe-read-only-text\"\n title={value}\n >\n {displayValue}\n </span>\n );\n};\n\nexport default ReadOnlyText;\n","// Re-export shared field utilities from core\nexport {\n FieldClassName,\n GetFieldDataTestId,\n formatDateTime,\n DocumentLinksStrings,\n} from \"@form-eng/core\";\n","import { IFieldProps, isNull } from \"@form-eng/core\";\nimport { NumberInput } from \"@mantine/core\";\nimport React from \"react\";\nimport { ReadOnlyText } from \"../components/ReadOnlyText\";\nimport { FieldClassName, GetFieldDataTestId } from \"../helpers\";\n\nconst NumberField = (props: IFieldProps<{}>) => {\n const { fieldName, programName, entityType, entityId, value, readOnly, error, required, setFieldValue } = props;\n\n const onChange = (val: number | string) => {\n // Mantine NumberInput passes number or empty string\n if (typeof val === \"number\") {\n setFieldValue(fieldName, val, false, 1500);\n } else if (val === \"\") {\n setFieldValue(fieldName, null, false, 1500);\n }\n };\n\n if (readOnly) {\n return <ReadOnlyText fieldName={fieldName} value={!isNull(value) ? String(value) : \"\"} />;\n }\n\n return (\n <NumberInput\n className={FieldClassName(\"fe-number\", error)}\n autoComplete=\"off\"\n value={!isNull(value) ? (value as number) : \"\"}\n onChange={onChange}\n required={required}\n aria-invalid={!!error}\n aria-required={required}\n data-testid={GetFieldDataTestId(fieldName, programName, entityType, entityId)}\n />\n );\n};\n\nexport default NumberField;\n","import { IFieldProps, convertBooleanToYesOrNoText } from \"@form-eng/core\";\nimport { Switch } from \"@mantine/core\";\nimport React from \"react\";\nimport { ReadOnlyText } from \"../components/ReadOnlyText\";\nimport { GetFieldDataTestId } from \"../helpers\";\n\nconst Toggle = (props: IFieldProps<{}>) => {\n const { fieldName, programName, entityType, entityId, value, readOnly, error, required, setFieldValue } = props;\n\n const onChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n setFieldValue(fieldName, event.currentTarget.checked);\n };\n\n if (readOnly) {\n return <ReadOnlyText fieldName={fieldName} value={convertBooleanToYesOrNoText(value as boolean)} />;\n }\n\n return (\n <Switch\n className=\"fe-toggle\"\n checked={!!value}\n onChange={onChange}\n required={required}\n aria-invalid={!!error}\n aria-required={required}\n data-testid={GetFieldDataTestId(fieldName, programName, entityType, entityId)}\n />\n );\n};\n\nexport default Toggle;\n","import { IFieldProps } from \"@form-eng/core\";\nimport { Select } from \"@mantine/core\";\nimport React from \"react\";\nimport { ReadOnlyText } from \"../components/ReadOnlyText\";\nimport { FieldClassName, GetFieldDataTestId } from \"../helpers\";\n\ninterface IDropdownProps {\n placeHolder?: string;\n setDefaultKeyIfOnlyOneOption?: boolean;\n}\n\nconst Dropdown = (props: IFieldProps<IDropdownProps>) => {\n const { fieldName, programName, entityType, entityId, value, readOnly, config, error, required, options, placeholder, setFieldValue } = props;\n\n const onChange = (val: string | null) => {\n setFieldValue(fieldName, val ?? \"\");\n };\n\n React.useEffect(() => {\n if (!value && !readOnly && config?.setDefaultKeyIfOnlyOneOption && options?.length === 1) {\n setFieldValue(fieldName, String(options[0].value));\n }\n }, [options]);\n\n if (readOnly) {\n return <ReadOnlyText fieldName={fieldName} value={value as string} />;\n }\n\n const data = options?.map(option => ({\n value: String(option.value),\n label: option.label,\n disabled: option.disabled,\n })) ?? [];\n\n return (\n <Select\n className={FieldClassName(\"fe-dropdown\", error)}\n value={value ? String(value) : null}\n onChange={onChange}\n data={data}\n placeholder={placeholder ?? config?.placeHolder}\n clearable\n required={required}\n aria-invalid={!!error}\n aria-required={required}\n data-testid={GetFieldDataTestId(fieldName, programName, entityType, entityId)}\n />\n );\n};\n\nexport default Dropdown;\n","import { IFieldProps } from \"@form-eng/core\";\nimport { NativeSelect } from \"@mantine/core\";\nimport React from \"react\";\nimport { ReadOnlyText } from \"../components/ReadOnlyText\";\nimport { FieldClassName, GetFieldDataTestId } from \"../helpers\";\n\ninterface ISimpleDropdownProps {\n dropdownOptions?: string[];\n placeHolder?: string;\n}\n\nconst SimpleDropdown = (props: IFieldProps<ISimpleDropdownProps>) => {\n const { fieldName, programName, entityType, entityId, value, readOnly, config, error, required, placeholder, setFieldValue } = props;\n\n const simpleOptions = config?.dropdownOptions ?? [];\n\n const onChange = (event: React.ChangeEvent<HTMLSelectElement>) => {\n setFieldValue(fieldName, event.currentTarget.value);\n };\n\n if (readOnly) {\n return <ReadOnlyText fieldName={fieldName} value={value as string} />;\n }\n\n const data = [\n { value: \"\", label: placeholder ?? config?.placeHolder ?? \"\" },\n ...simpleOptions.map(option => ({ value: option, label: option })),\n ];\n\n return (\n <NativeSelect\n className={FieldClassName(\"fe-simple-dropdown\", error)}\n value={(value as string) ?? \"\"}\n onChange={onChange}\n data={data}\n required={required}\n aria-invalid={!!error}\n aria-required={required}\n data-testid={GetFieldDataTestId(fieldName, programName, entityType, entityId)}\n />\n );\n};\n\nexport default SimpleDropdown;\n","import { IFieldProps } from \"@form-eng/core\";\nimport { MultiSelect as MantineMultiSelect } from \"@mantine/core\";\nimport React from \"react\";\nimport { FieldClassName, GetFieldDataTestId } from \"../helpers\";\n\nconst MultiSelect = (props: IFieldProps<{}>) => {\n const { fieldName, programName, entityType, entityId, value, readOnly, error, required, options, setFieldValue } = props;\n\n const selectedValues = (value as string[]) ?? [];\n\n const onChange = (val: string[]) => {\n setFieldValue(fieldName, val, false, 1500);\n };\n\n if (readOnly) {\n return selectedValues.length > 0 ? (\n <ul className=\"fe-multiselect-readonly\">\n {selectedValues.map((v, i) => (\n <li key={i}>{v}</li>\n ))}\n </ul>\n ) : (\n <span className=\"fe-read-only-text\">-</span>\n );\n }\n\n const data = options?.map(option => ({\n value: String(option.value),\n label: option.label,\n disabled: option.disabled,\n })) ?? [];\n\n return (\n <MantineMultiSelect\n className={FieldClassName(\"fe-multi-select\", error)}\n value={selectedValues}\n onChange={onChange}\n data={data}\n clearable\n required={required}\n aria-invalid={!!error}\n aria-required={required}\n data-testid={GetFieldDataTestId(fieldName, programName, entityType, entityId)}\n />\n );\n};\n\nexport default MultiSelect;\n","import { IFieldProps, FormStrings } from \"@form-eng/core\";\nimport React from \"react\";\nimport { GetFieldDataTestId, formatDateTime } from \"../helpers\";\n\nconst DateControl = (props: IFieldProps<{}>) => {\n const { fieldName, programName, entityType, entityId, value, readOnly, error, required, setFieldValue } = props;\n\n const onChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const date = new Date(event.target.value);\n if (!isNaN(date.getTime())) {\n setFieldValue(fieldName, date.toISOString());\n }\n };\n\n const onClear = () => {\n setFieldValue(fieldName, null);\n };\n\n const dateInputValue = value ? new Date(value as string).toISOString().split(\"T\")[0] : \"\";\n\n if (readOnly) {\n return value ? (\n <time\n className=\"fe-read-only-date\"\n dateTime={value as string}\n >\n {formatDateTime(value as string, { hideTimestamp: true })}\n </time>\n ) : (\n <span className=\"fe-read-only-text\">-</span>\n );\n }\n\n return (\n <div className=\"fe-date-control\">\n <input\n type=\"date\"\n className=\"fe-date-control__input\"\n value={dateInputValue}\n onChange={onChange}\n aria-invalid={!!error}\n aria-required={required}\n data-testid={GetFieldDataTestId(fieldName, programName, entityType, entityId)}\n />\n <button\n type=\"button\"\n className=\"fe-date-control__clear\"\n onClick={onClear}\n title={FormStrings.clickToClear}\n aria-label={`${fieldName} ${FormStrings.clear}`}\n >\n ×\n </button>\n </div>\n );\n};\n\nexport default DateControl;\n","import { IFieldProps } from \"@form-eng/core\";\nimport { Slider as MantineSlider } from \"@mantine/core\";\nimport React from \"react\";\nimport { ReadOnlyText } from \"../components/ReadOnlyText\";\nimport { FieldClassName, GetFieldDataTestId } from \"../helpers\";\n\ninterface ISliderProps {\n max?: number;\n min?: number;\n step?: number;\n}\n\nconst Slider = (props: IFieldProps<ISliderProps>) => {\n const { fieldName, programName, entityType, entityId, value, readOnly, config, error, required, setFieldValue } = props;\n\n const onChange = (val: number) => {\n setFieldValue(fieldName, val);\n };\n\n if (readOnly) {\n return <ReadOnlyText fieldName={fieldName} value={String(value)} />;\n }\n\n return (\n <div\n className={FieldClassName(\"fe-slider\", error)}\n aria-invalid={!!error}\n aria-required={required}\n data-testid={GetFieldDataTestId(fieldName, programName, entityType, entityId)}\n >\n <MantineSlider\n value={(value as number) ?? 0}\n onChange={onChange}\n max={config?.max}\n min={config?.min}\n step={config?.step}\n label={(val) => String(val)}\n />\n </div>\n );\n};\n\nexport default Slider;\n","import { IFieldProps } from \"@form-eng/core\";\nimport { Radio, Group } from \"@mantine/core\";\nimport React from \"react\";\nimport { ReadOnlyText } from \"../components/ReadOnlyText\";\nimport { GetFieldDataTestId } from \"../helpers\";\n\nconst RadioGroup = (props: IFieldProps<{}>) => {\n const { fieldName, programName, entityType, entityId, value, readOnly, error, required, options, setFieldValue } = props;\n\n const onChange = (val: string) => {\n setFieldValue(fieldName, val);\n };\n\n if (readOnly) {\n const label = options?.find(o => String(o.value) === String(value))?.label ?? (value as string);\n return <ReadOnlyText fieldName={fieldName} value={label} />;\n }\n\n return (\n <Radio.Group\n className=\"fe-radio-group\"\n value={value ? String(value) : \"\"}\n onChange={onChange}\n required={required}\n aria-invalid={!!error}\n aria-required={required}\n data-testid={GetFieldDataTestId(fieldName, programName, entityType, entityId)}\n >\n <Group mt=\"xs\">\n {options?.map(option => (\n <Radio\n key={String(option.value)}\n value={String(option.value)}\n label={option.label}\n disabled={option.disabled}\n />\n ))}\n </Group>\n </Radio.Group>\n );\n};\n\nexport default RadioGroup;\n","import { IFieldProps } from \"@form-eng/core\";\nimport { Checkbox, Group } from \"@mantine/core\";\nimport React from \"react\";\nimport { ReadOnlyText } from \"../components/ReadOnlyText\";\nimport { GetFieldDataTestId } from \"../helpers\";\n\nconst CheckboxGroup = (props: IFieldProps<{}>) => {\n const { fieldName, programName, entityType, entityId, value, readOnly, error, required, options, setFieldValue } = props;\n\n const selected = Array.isArray(value) ? (value as string[]) : [];\n\n const onChange = (val: string[]) => {\n setFieldValue(fieldName, val);\n };\n\n if (readOnly) {\n const labels = options\n ?.filter(o => selected.includes(String(o.value)))\n .map(o => o.label)\n .join(\", \");\n return <ReadOnlyText fieldName={fieldName} value={labels ?? \"\"} />;\n }\n\n return (\n <Checkbox.Group\n className=\"fe-checkbox-group\"\n value={selected}\n onChange={onChange}\n aria-invalid={!!error}\n aria-required={required}\n data-testid={GetFieldDataTestId(fieldName, programName, entityType, entityId)}\n >\n <Group mt=\"xs\">\n {options?.map(option => (\n <Checkbox\n key={String(option.value)}\n value={String(option.value)}\n label={option.label}\n disabled={option.disabled}\n />\n ))}\n </Group>\n </Checkbox.Group>\n );\n};\n\nexport default CheckboxGroup;\n","import { IFieldProps } from \"@form-eng/core\";\nimport { Textarea as MantineTextarea } from \"@mantine/core\";\nimport React from \"react\";\nimport { ReadOnlyText } from \"../components/ReadOnlyText\";\nimport { FieldClassName, GetFieldDataTestId } from \"../helpers\";\n\ninterface ITextareaProps {\n autoAdjustHeight?: boolean;\n numberOfRows?: number;\n ellipsifyTextCharacters?: number;\n maxLimit?: number;\n}\n\nconst Textarea = (props: IFieldProps<ITextareaProps>) => {\n const { fieldName, programName, entityType, entityId, value, readOnly, config, error, required, setFieldValue } = props;\n\n const onChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n setFieldValue(fieldName, event.target.value, false, 3000);\n };\n\n if (readOnly) {\n return (\n <ReadOnlyText\n fieldName={fieldName}\n value={value ? `${value}` : \"\"}\n ellipsifyTextCharacters={config?.ellipsifyTextCharacters}\n />\n );\n }\n\n return (\n <MantineTextarea\n className={FieldClassName(\"fe-textarea\", error)}\n autoComplete=\"off\"\n value={value ? `${value}` : \"\"}\n onChange={onChange}\n rows={config?.numberOfRows ?? 4}\n autosize={config?.autoAdjustHeight}\n maxLength={config?.maxLimit}\n required={required}\n aria-invalid={!!error}\n aria-required={required}\n data-testid={GetFieldDataTestId(fieldName, programName, entityType, entityId)}\n />\n );\n};\n\nexport default Textarea;\n","import { IFieldProps } from \"@form-eng/core\";\nimport React from \"react\";\n\nconst DynamicFragment = (props: IFieldProps<{}>) => {\n const { value } = props;\n return <input type=\"hidden\" value={value as string} />;\n};\n\nexport default DynamicFragment;\n","import { IFieldProps } from \"@form-eng/core\";\nimport React from \"react\";\nimport { ReadOnlyText, IReadOnlyFieldProps } from \"../../components/ReadOnlyText\";\n\nconst ReadOnly = (props: IFieldProps<IReadOnlyFieldProps>) => {\n const { fieldName, value, config } = props;\n return <ReadOnlyText fieldName={fieldName} value={value as string} {...config} />;\n};\n\nexport default ReadOnly;\n","import { FormStrings } from \"@form-eng/core\";\nimport React from \"react\";\nimport { FieldError } from \"react-hook-form\";\n\ninterface IStatusMessageProps {\n id?: string;\n readonly error?: FieldError;\n readonly errorCount?: number;\n readonly savePending?: boolean;\n readonly saving?: boolean;\n}\n\nexport const StatusMessage: React.FunctionComponent<IStatusMessageProps> = (props) => {\n const { id, error, errorCount, savePending, saving } = props;\n return (\n <div className=\"fe-status-message\">\n {error ? (\n <span id={id} role=\"alert\" style={{ color: \"var(--mantine-color-red-6, #fa5252)\" }}>\n {error.message || \"Error\"}\n </span>\n ) : savePending ? (\n <span id={id} role=\"alert\" style={{ color: \"var(--mantine-color-orange-6, #fd7e14)\" }}>\n {FormStrings.autoSavePending} ({errorCount} {FormStrings.remaining})\n </span>\n ) : saving ? (\n <span id={id} role=\"status\" style={{ color: \"var(--mantine-color-gray-6, #868e96)\" }}>\n {FormStrings.saving}\n </span>\n ) : null}\n </div>\n );\n};\n","import { FormConstants } from \"@form-eng/core\";\nimport React from \"react\";\n\ninterface IFormLoadingProps {\n loadingShimmerCount?: number;\n loadingFieldShimmerHeight?: number;\n inPanel?: boolean;\n hideTitleShimmer?: boolean;\n}\n\nexport const FormLoading = (props: IFormLoadingProps) => {\n const { loadingShimmerCount, loadingFieldShimmerHeight, inPanel, hideTitleShimmer } = props;\n const count = loadingShimmerCount || FormConstants.loadingShimmerCount;\n const height = loadingFieldShimmerHeight || FormConstants.loadingFieldShimmerHeight;\n\n return (\n <div\n className={`fe-form-loading ${inPanel ? \"fe-form-loading--panel\" : \"\"}`}\n role=\"status\"\n aria-label=\"Loading form\"\n >\n {[...Array(count)].map((_, i) => (\n <div key={`fe-loading-${i}`} style={{ marginBottom: 16 }}>\n {!hideTitleShimmer && (\n <div className=\"fe-skeleton\" style={{ width: \"33%\", height: 16, marginBottom: 8, background: \"var(--mantine-color-gray-2, #e9ecef)\", borderRadius: 4 }} />\n )}\n <div className=\"fe-skeleton\" style={{ width: \"100%\", height, background: \"var(--mantine-color-gray-2, #e9ecef)\", borderRadius: 4 }} />\n </div>\n ))}\n </div>\n );\n};\n\nexport default FormLoading;\n","import { ComponentTypes, Dictionary } from \"@form-eng/core\";\nimport Textbox from \"./fields/Textbox\";\nimport NumberField from \"./fields/Number\";\nimport Toggle from \"./fields/Toggle\";\nimport Dropdown from \"./fields/Dropdown\";\nimport SimpleDropdown from \"./fields/SimpleDropdown\";\nimport MultiSelect from \"./fields/MultiSelect\";\nimport DateControl from \"./fields/DateControl\";\nimport Slider from \"./fields/Slider\";\nimport RadioGroup from \"./fields/RadioGroup\";\nimport CheckboxGroup from \"./fields/CheckboxGroup\";\nimport Textarea from \"./fields/Textarea\";\nimport DynamicFragment from \"./fields/DynamicFragment\";\nimport ReadOnly from \"./fields/readonly/ReadOnly\";\nimport React from \"react\";\n\n/** Creates the default Mantine v7 field registry for use with InjectedFieldProvider */\nexport function createMantineFieldRegistry(): Dictionary<React.JSX.Element> {\n return {\n [ComponentTypes.Textbox]: React.createElement(Textbox),\n [ComponentTypes.Number]: React.createElement(NumberField),\n [ComponentTypes.Toggle]: React.createElement(Toggle),\n [ComponentTypes.Dropdown]: React.createElement(Dropdown),\n [ComponentTypes.SimpleDropdown]: React.createElement(SimpleDropdown),\n [ComponentTypes.MultiSelect]: React.createElement(MultiSelect),\n [ComponentTypes.DateControl]: React.createElement(DateControl),\n [ComponentTypes.Slider]: React.createElement(Slider),\n [ComponentTypes.RadioGroup]: React.createElement(RadioGroup),\n [ComponentTypes.CheckboxGroup]: React.createElement(CheckboxGroup),\n [ComponentTypes.Textarea]: React.createElement(Textarea),\n [ComponentTypes.Fragment]: React.createElement(DynamicFragment),\n [ComponentTypes.ReadOnly]: React.createElement(ReadOnly),\n };\n}\n"],"mappings":";AACA,SAAS,iBAAiB;;;ACsBtB;AAXG,IAAM,eAA6D,CAAC,UAAU;AACnF,QAAM,EAAE,OAAO,WAAW,wBAAwB,IAAI;AACtD,QAAM,UAAU,2BAA2B,KAAK;AAEhD,QAAM,eAAe,QACjB,2BAA2B,MAAM,SAAS,0BACxC,GAAG,MAAM,UAAU,GAAG,MAAM,CAAC,QAC7B,QACF;AAEJ,SACE;AAA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QAAQ,GAAGA,OAAM,cAAc,gBAAQ;AAAA,EACzD;AACF;","names":["jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","Group","jsx","Group","jsx","jsx","jsx","FormStrings","jsx","jsxs","jsx","jsxs","React"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@form-eng/mantine",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "Mantine v7 field components for @form-eng/core",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/bghcore/form-engine.git",
|
|
8
|
+
"directory": "packages/mantine"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/bghcore/form-engine#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/bghcore/form-engine/issues"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"react",
|
|
16
|
+
"forms",
|
|
17
|
+
"mantine",
|
|
18
|
+
"dynamic-forms",
|
|
19
|
+
"react-hook-form",
|
|
20
|
+
"form-builder",
|
|
21
|
+
"field-components",
|
|
22
|
+
"business-forms"
|
|
23
|
+
],
|
|
24
|
+
"main": "dist/index.js",
|
|
25
|
+
"module": "dist/index.mjs",
|
|
26
|
+
"types": "dist/index.d.ts",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"import": "./dist/index.mjs",
|
|
31
|
+
"require": "./dist/index.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"README.md"
|
|
37
|
+
],
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"author": "bghcore (https://github.com/bghcore)",
|
|
40
|
+
"sideEffects": false,
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "tsup",
|
|
43
|
+
"clean": "rimraf dist"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
47
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
48
|
+
"react-hook-form": "^7.0.0",
|
|
49
|
+
"@form-eng/core": "^1.0.0",
|
|
50
|
+
"@mantine/core": "^7.0.0",
|
|
51
|
+
"@mantine/dates": "^7.0.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"react": "^19.2.4",
|
|
55
|
+
"react-dom": "^19.2.4",
|
|
56
|
+
"react-hook-form": "^7.71.2",
|
|
57
|
+
"@form-eng/core": "*",
|
|
58
|
+
"@mantine/core": "^7.17.2",
|
|
59
|
+
"@mantine/dates": "^7.17.2",
|
|
60
|
+
"dayjs": "^1.11.13",
|
|
61
|
+
"tsup": "^8.5.1",
|
|
62
|
+
"typescript": "^5.9.3",
|
|
63
|
+
"@types/react": "^19.2.14",
|
|
64
|
+
"@types/react-dom": "^19.2.3"
|
|
65
|
+
}
|
|
66
|
+
}
|