@payloadcms/ui 3.0.0-beta.134 → 3.0.0-beta.135
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/assets/payload-favicon-dark.png +0 -0
- package/dist/assets/payload-favicon-light.png +0 -0
- package/dist/assets/payload-favicon.svg +4 -4
- package/dist/assets/payload-logo-dark.svg +1 -23
- package/dist/assets/payload-logo-light.svg +1 -23
- package/dist/assets/static-og-image.png +0 -0
- package/dist/elements/RenderServerComponent/index.d.ts +0 -6
- package/dist/elements/RenderServerComponent/index.d.ts.map +1 -1
- package/dist/elements/RenderServerComponent/index.js +1 -24
- package/dist/elements/RenderServerComponent/index.js.map +1 -1
- package/dist/elements/WhereBuilder/Condition/DefaultFilter/index.js +1 -1
- package/dist/elements/WhereBuilder/Condition/DefaultFilter/index.js.map +1 -1
- package/dist/exports/client/index.js +22 -22
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/shared/index.d.ts +1 -0
- package/dist/exports/shared/index.d.ts.map +1 -1
- package/dist/exports/shared/index.js +2 -2
- package/dist/exports/shared/index.js.map +4 -4
- package/dist/fields/Checkbox/index.d.ts.map +1 -1
- package/dist/fields/Checkbox/index.js +71 -183
- package/dist/fields/Checkbox/index.js.map +1 -1
- package/dist/fields/Code/index.d.ts.map +1 -1
- package/dist/fields/Code/index.js +68 -170
- package/dist/fields/Code/index.js.map +1 -1
- package/dist/fields/Collapsible/index.d.ts.map +1 -1
- package/dist/fields/Collapsible/index.js +100 -207
- package/dist/fields/Collapsible/index.js.map +1 -1
- package/dist/fields/DateTime/index.d.ts.map +1 -1
- package/dist/fields/DateTime/index.js +72 -162
- package/dist/fields/DateTime/index.js.map +1 -1
- package/dist/fields/Email/index.d.ts.map +1 -1
- package/dist/fields/Email/index.js +72 -161
- package/dist/fields/Email/index.js.map +1 -1
- package/dist/fields/Group/index.d.ts.map +1 -1
- package/dist/fields/Group/index.js +64 -152
- package/dist/fields/Group/index.js.map +1 -1
- package/dist/fields/JSON/index.d.ts.map +1 -1
- package/dist/fields/JSON/index.js +7 -10
- package/dist/fields/JSON/index.js.map +1 -1
- package/dist/fields/Join/index.d.ts.map +1 -1
- package/dist/fields/Join/index.js +0 -1
- package/dist/fields/Join/index.js.map +1 -1
- package/dist/fields/Number/index.d.ts.map +1 -1
- package/dist/fields/Number/index.js +143 -275
- package/dist/fields/Number/index.js.map +1 -1
- package/dist/fields/Password/index.d.ts.map +1 -1
- package/dist/fields/Password/index.js +79 -166
- package/dist/fields/Password/index.js.map +1 -1
- package/dist/fields/Point/index.d.ts.map +1 -1
- package/dist/fields/Point/index.js +110 -235
- package/dist/fields/Point/index.js.map +1 -1
- package/dist/fields/RadioGroup/index.d.ts.map +1 -1
- package/dist/fields/RadioGroup/index.js +93 -209
- package/dist/fields/RadioGroup/index.js.map +1 -1
- package/dist/fields/Relationship/index.d.ts.map +1 -1
- package/dist/fields/Relationship/index.js +7 -10
- package/dist/fields/Relationship/index.js.map +1 -1
- package/dist/fields/Select/Input.d.ts +0 -1
- package/dist/fields/Select/Input.d.ts.map +1 -1
- package/dist/fields/Select/Input.js +45 -50
- package/dist/fields/Select/Input.js.map +1 -1
- package/dist/fields/Select/index.d.ts.map +1 -1
- package/dist/fields/Select/index.js +7 -7
- package/dist/fields/Select/index.js.map +1 -1
- package/dist/fields/Text/Input.d.ts.map +1 -1
- package/dist/fields/Text/Input.js +31 -36
- package/dist/fields/Text/Input.js.map +1 -1
- package/dist/fields/Text/index.d.ts +1 -1
- package/dist/fields/Text/index.d.ts.map +1 -1
- package/dist/fields/Text/index.js +93 -171
- package/dist/fields/Text/index.js.map +1 -1
- package/dist/fields/Text/types.d.ts +0 -1
- package/dist/fields/Text/types.d.ts.map +1 -1
- package/dist/fields/Text/types.js.map +1 -1
- package/dist/fields/Textarea/Input.d.ts.map +1 -1
- package/dist/fields/Textarea/Input.js +26 -31
- package/dist/fields/Textarea/Input.js.map +1 -1
- package/dist/fields/Textarea/index.d.ts.map +1 -1
- package/dist/fields/Textarea/index.js +62 -112
- package/dist/fields/Textarea/index.js.map +1 -1
- package/dist/fields/Textarea/types.d.ts +0 -1
- package/dist/fields/Textarea/types.d.ts.map +1 -1
- package/dist/fields/Textarea/types.js.map +1 -1
- package/dist/fields/Upload/Input.d.ts +0 -1
- package/dist/fields/Upload/Input.d.ts.map +1 -1
- package/dist/fields/Upload/Input.js +41 -46
- package/dist/fields/Upload/Input.js.map +1 -1
- package/dist/fields/Upload/index.d.ts.map +1 -1
- package/dist/fields/Upload/index.js +63 -135
- package/dist/fields/Upload/index.js.map +1 -1
- package/dist/fields/mergeFieldStyles.d.ts +3 -0
- package/dist/fields/mergeFieldStyles.d.ts.map +1 -0
- package/dist/fields/mergeFieldStyles.js +13 -0
- package/dist/fields/mergeFieldStyles.js.map +1 -0
- package/dist/forms/fieldSchemasToFormState/renderField.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/renderField.js +10 -8
- package/dist/forms/fieldSchemasToFormState/renderField.js.map +1 -1
- package/dist/graphics/Icon/index.d.ts.map +1 -1
- package/dist/graphics/Icon/index.js +2 -2
- package/dist/graphics/Icon/index.js.map +1 -1
- package/dist/graphics/Logo/index.d.ts.map +1 -1
- package/dist/graphics/Logo/index.js +30 -21
- package/dist/graphics/Logo/index.js.map +1 -1
- package/dist/utilities/buildFormState.d.ts +0 -4
- package/dist/utilities/buildFormState.d.ts.map +1 -1
- package/dist/utilities/buildFormState.js +1 -15
- package/dist/utilities/buildFormState.js.map +1 -1
- package/dist/utilities/buildTableState.d.ts +2 -1
- package/dist/utilities/buildTableState.d.ts.map +1 -1
- package/dist/utilities/buildTableState.js +6 -3
- package/dist/utilities/buildTableState.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { c as _c } from "react/compiler-runtime";
|
|
4
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { getTranslation } from '@payloadcms/translations';
|
|
6
|
-
import React, { useCallback } from 'react';
|
|
5
|
+
import React, { useCallback, useMemo } from 'react';
|
|
7
6
|
import { RenderCustomComponent } from '../../elements/RenderCustomComponent/index.js';
|
|
8
7
|
import { FieldDescription } from '../../fields/FieldDescription/index.js';
|
|
9
8
|
import { FieldError } from '../../fields/FieldError/index.js';
|
|
@@ -11,258 +10,134 @@ import { FieldLabel } from '../../fields/FieldLabel/index.js';
|
|
|
11
10
|
import { useField } from '../../forms/useField/index.js';
|
|
12
11
|
import { withCondition } from '../../forms/withCondition/index.js';
|
|
13
12
|
import { useTranslation } from '../../providers/Translation/index.js';
|
|
14
|
-
import {
|
|
13
|
+
import { mergeFieldStyles } from '../mergeFieldStyles.js';
|
|
15
14
|
import './index.scss';
|
|
15
|
+
import { fieldBaseClass } from '../shared/index.js';
|
|
16
16
|
const baseClass = 'point';
|
|
17
17
|
export const PointFieldComponent = props => {
|
|
18
|
-
const $ = _c(48);
|
|
19
18
|
const {
|
|
20
|
-
field
|
|
19
|
+
field,
|
|
20
|
+
field: {
|
|
21
|
+
admin: {
|
|
22
|
+
className,
|
|
23
|
+
description,
|
|
24
|
+
placeholder,
|
|
25
|
+
step
|
|
26
|
+
} = {},
|
|
27
|
+
label,
|
|
28
|
+
localized,
|
|
29
|
+
required
|
|
30
|
+
},
|
|
21
31
|
path,
|
|
22
32
|
readOnly,
|
|
23
33
|
validate
|
|
24
34
|
} = props;
|
|
25
|
-
const {
|
|
26
|
-
admin: t1,
|
|
27
|
-
label,
|
|
28
|
-
localized,
|
|
29
|
-
required
|
|
30
|
-
} = t0;
|
|
31
|
-
let t2;
|
|
32
|
-
if ($[0] !== t1) {
|
|
33
|
-
t2 = t1 === undefined ? {} : t1;
|
|
34
|
-
$[0] = t1;
|
|
35
|
-
$[1] = t2;
|
|
36
|
-
} else {
|
|
37
|
-
t2 = $[1];
|
|
38
|
-
}
|
|
39
|
-
const {
|
|
40
|
-
className,
|
|
41
|
-
description,
|
|
42
|
-
placeholder,
|
|
43
|
-
step,
|
|
44
|
-
style,
|
|
45
|
-
width
|
|
46
|
-
} = t2;
|
|
47
35
|
const {
|
|
48
36
|
i18n,
|
|
49
37
|
t
|
|
50
38
|
} = useTranslation();
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
$[2] = validate;
|
|
62
|
-
$[3] = required;
|
|
63
|
-
$[4] = t3;
|
|
64
|
-
} else {
|
|
65
|
-
t3 = $[4];
|
|
66
|
-
}
|
|
67
|
-
const memoizedValidate = t3;
|
|
68
|
-
let t4;
|
|
69
|
-
if ($[5] !== path || $[6] !== memoizedValidate) {
|
|
70
|
-
t4 = {
|
|
71
|
-
path,
|
|
72
|
-
validate: memoizedValidate
|
|
73
|
-
};
|
|
74
|
-
$[5] = path;
|
|
75
|
-
$[6] = memoizedValidate;
|
|
76
|
-
$[7] = t4;
|
|
77
|
-
} else {
|
|
78
|
-
t4 = $[7];
|
|
79
|
-
}
|
|
39
|
+
const memoizedValidate = useCallback((value, options) => {
|
|
40
|
+
if (typeof validate === 'function') {
|
|
41
|
+
return validate(value, {
|
|
42
|
+
...options,
|
|
43
|
+
required
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}, [validate, required]);
|
|
80
47
|
const {
|
|
81
|
-
customComponents:
|
|
48
|
+
customComponents: {
|
|
49
|
+
AfterInput,
|
|
50
|
+
BeforeInput,
|
|
51
|
+
Description,
|
|
52
|
+
Error,
|
|
53
|
+
Label
|
|
54
|
+
} = {},
|
|
82
55
|
setValue,
|
|
83
56
|
showError,
|
|
84
|
-
value:
|
|
85
|
-
} = useField(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
const {
|
|
95
|
-
AfterInput,
|
|
96
|
-
BeforeInput,
|
|
97
|
-
Description,
|
|
98
|
-
Error,
|
|
99
|
-
Label
|
|
100
|
-
} = t7;
|
|
101
|
-
let t8;
|
|
102
|
-
if ($[10] !== t6) {
|
|
103
|
-
t8 = t6 === undefined ? [null, null] : t6;
|
|
104
|
-
$[10] = t6;
|
|
105
|
-
$[11] = t8;
|
|
106
|
-
} else {
|
|
107
|
-
t8 = $[11];
|
|
108
|
-
}
|
|
109
|
-
const value_0 = t8;
|
|
110
|
-
let t9;
|
|
111
|
-
if ($[12] !== value_0 || $[13] !== setValue) {
|
|
112
|
-
t9 = (e, index) => {
|
|
113
|
-
let val = parseFloat(e.target.value);
|
|
114
|
-
if (Number.isNaN(val)) {
|
|
115
|
-
val = e.target.value;
|
|
116
|
-
}
|
|
117
|
-
const coordinates = [...value_0];
|
|
118
|
-
coordinates[index] = val;
|
|
119
|
-
setValue(coordinates);
|
|
120
|
-
};
|
|
121
|
-
$[12] = value_0;
|
|
122
|
-
$[13] = setValue;
|
|
123
|
-
$[14] = t9;
|
|
124
|
-
} else {
|
|
125
|
-
t9 = $[14];
|
|
126
|
-
}
|
|
127
|
-
const handleChange = t9;
|
|
128
|
-
let t10;
|
|
129
|
-
if ($[15] !== t || $[16] !== label || $[17] !== i18n) {
|
|
130
|
-
t10 = type => {
|
|
131
|
-
const suffix = type === "longitude" ? t("fields:longitude") : t("fields:latitude");
|
|
132
|
-
const fieldLabel = label ? getTranslation(label, i18n) : "";
|
|
133
|
-
return `${fieldLabel}${fieldLabel ? " - " : ""}${suffix}`;
|
|
134
|
-
};
|
|
135
|
-
$[15] = t;
|
|
136
|
-
$[16] = label;
|
|
137
|
-
$[17] = i18n;
|
|
138
|
-
$[18] = t10;
|
|
139
|
-
} else {
|
|
140
|
-
t10 = $[18];
|
|
141
|
-
}
|
|
142
|
-
const getCoordinateFieldLabel = t10;
|
|
143
|
-
const t11 = showError && "error";
|
|
144
|
-
const t12 = readOnly && "read-only";
|
|
145
|
-
let t13;
|
|
146
|
-
if ($[19] !== className || $[20] !== t11 || $[21] !== t12) {
|
|
147
|
-
t13 = [fieldBaseClass, baseClass, className, t11, t12].filter(Boolean);
|
|
148
|
-
$[19] = className;
|
|
149
|
-
$[20] = t11;
|
|
150
|
-
$[21] = t12;
|
|
151
|
-
$[22] = t13;
|
|
152
|
-
} else {
|
|
153
|
-
t13 = $[22];
|
|
154
|
-
}
|
|
155
|
-
const t14 = t13.join(" ");
|
|
156
|
-
let t15;
|
|
157
|
-
if ($[23] !== style || $[24] !== width || $[25] !== getCoordinateFieldLabel || $[26] !== localized || $[27] !== path || $[28] !== required || $[29] !== Label || $[30] !== handleChange || $[31] !== placeholder || $[32] !== i18n || $[33] !== value_0 || $[34] !== readOnly || $[35] !== step || $[36] !== BeforeInput || $[37] !== AfterInput || $[38] !== showError || $[39] !== Error || $[40] !== description || $[41] !== Description || $[42] !== t14) {
|
|
158
|
-
let t16;
|
|
159
|
-
if ($[44] !== handleChange) {
|
|
160
|
-
t16 = e_0 => handleChange(e_0, 0);
|
|
161
|
-
$[44] = handleChange;
|
|
162
|
-
$[45] = t16;
|
|
163
|
-
} else {
|
|
164
|
-
t16 = $[45];
|
|
165
|
-
}
|
|
166
|
-
let t17;
|
|
167
|
-
if ($[46] !== handleChange) {
|
|
168
|
-
t17 = e_1 => handleChange(e_1, 1);
|
|
169
|
-
$[46] = handleChange;
|
|
170
|
-
$[47] = t17;
|
|
171
|
-
} else {
|
|
172
|
-
t17 = $[47];
|
|
57
|
+
value: value_0 = [null, null]
|
|
58
|
+
} = useField({
|
|
59
|
+
path,
|
|
60
|
+
validate: memoizedValidate
|
|
61
|
+
});
|
|
62
|
+
const handleChange = useCallback((e, index) => {
|
|
63
|
+
let val = parseFloat(e.target.value);
|
|
64
|
+
if (Number.isNaN(val)) {
|
|
65
|
+
val = e.target.value;
|
|
173
66
|
}
|
|
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
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
67
|
+
const coordinates = [...value_0];
|
|
68
|
+
coordinates[index] = val;
|
|
69
|
+
setValue(coordinates);
|
|
70
|
+
}, [setValue, value_0]);
|
|
71
|
+
const getCoordinateFieldLabel = type => {
|
|
72
|
+
const suffix = type === 'longitude' ? t('fields:longitude') : t('fields:latitude');
|
|
73
|
+
const fieldLabel = label ? getTranslation(label, i18n) : '';
|
|
74
|
+
return `${fieldLabel}${fieldLabel ? ' - ' : ''}${suffix}`;
|
|
75
|
+
};
|
|
76
|
+
const styles = useMemo(() => mergeFieldStyles(field), [field]);
|
|
77
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
78
|
+
className: [fieldBaseClass, baseClass, className, showError && 'error', readOnly && 'read-only'].filter(Boolean).join(' '),
|
|
79
|
+
style: styles,
|
|
80
|
+
children: [/*#__PURE__*/_jsxs("ul", {
|
|
81
|
+
className: `${baseClass}__wrap`,
|
|
82
|
+
children: [/*#__PURE__*/_jsxs("li", {
|
|
83
|
+
children: [/*#__PURE__*/_jsx(RenderCustomComponent, {
|
|
84
|
+
CustomComponent: Label,
|
|
85
|
+
Fallback: /*#__PURE__*/_jsx(FieldLabel, {
|
|
86
|
+
label: getCoordinateFieldLabel('longitude'),
|
|
87
|
+
localized: localized,
|
|
88
|
+
path: path,
|
|
89
|
+
required: required
|
|
90
|
+
})
|
|
91
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
92
|
+
className: "input-wrapper",
|
|
93
|
+
children: [BeforeInput, /*#__PURE__*/_jsx("input", {
|
|
94
|
+
disabled: readOnly,
|
|
95
|
+
id: `field-longitude-${path?.replace(/\./g, '__')}`,
|
|
96
|
+
name: `${path}.longitude`,
|
|
97
|
+
onChange: e_0 => handleChange(e_0, 0),
|
|
98
|
+
placeholder: getTranslation(placeholder, i18n),
|
|
99
|
+
step: step,
|
|
100
|
+
type: "number",
|
|
101
|
+
value: value_0 && typeof value_0[0] === 'number' ? value_0[0] : ''
|
|
102
|
+
}), AfterInput]
|
|
103
|
+
})]
|
|
104
|
+
}), /*#__PURE__*/_jsxs("li", {
|
|
105
|
+
children: [/*#__PURE__*/_jsx(RenderCustomComponent, {
|
|
106
|
+
CustomComponent: Label,
|
|
107
|
+
Fallback: /*#__PURE__*/_jsx(FieldLabel, {
|
|
108
|
+
label: getCoordinateFieldLabel('latitude'),
|
|
109
|
+
localized: localized,
|
|
110
|
+
path: path,
|
|
111
|
+
required: required
|
|
112
|
+
})
|
|
113
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
114
|
+
className: "input-wrapper",
|
|
115
|
+
children: [/*#__PURE__*/_jsx(RenderCustomComponent, {
|
|
116
|
+
CustomComponent: Error,
|
|
117
|
+
Fallback: /*#__PURE__*/_jsx(FieldError, {
|
|
118
|
+
path: path,
|
|
119
|
+
showError: showError
|
|
212
120
|
})
|
|
213
|
-
}),
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
id: `field-latitude-${path?.replace(/\./g, "__")}`,
|
|
224
|
-
name: `${path}.latitude`,
|
|
225
|
-
onChange: t17,
|
|
226
|
-
placeholder: getTranslation(placeholder, i18n),
|
|
227
|
-
step,
|
|
228
|
-
type: "number",
|
|
229
|
-
value: value_0 && typeof value_0[1] === "number" ? value_0[1] : ""
|
|
230
|
-
}), AfterInput]
|
|
231
|
-
})]
|
|
121
|
+
}), BeforeInput, /*#__PURE__*/_jsx("input", {
|
|
122
|
+
disabled: readOnly,
|
|
123
|
+
id: `field-latitude-${path?.replace(/\./g, '__')}`,
|
|
124
|
+
name: `${path}.latitude`,
|
|
125
|
+
onChange: e_1 => handleChange(e_1, 1),
|
|
126
|
+
placeholder: getTranslation(placeholder, i18n),
|
|
127
|
+
step: step,
|
|
128
|
+
type: "number",
|
|
129
|
+
value: value_0 && typeof value_0[1] === 'number' ? value_0[1] : ''
|
|
130
|
+
}), AfterInput]
|
|
232
131
|
})]
|
|
233
|
-
}), _jsx(RenderCustomComponent, {
|
|
234
|
-
CustomComponent: Description,
|
|
235
|
-
Fallback: _jsx(FieldDescription, {
|
|
236
|
-
description,
|
|
237
|
-
path
|
|
238
|
-
})
|
|
239
132
|
})]
|
|
240
|
-
})
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
$[30] = handleChange;
|
|
249
|
-
$[31] = placeholder;
|
|
250
|
-
$[32] = i18n;
|
|
251
|
-
$[33] = value_0;
|
|
252
|
-
$[34] = readOnly;
|
|
253
|
-
$[35] = step;
|
|
254
|
-
$[36] = BeforeInput;
|
|
255
|
-
$[37] = AfterInput;
|
|
256
|
-
$[38] = showError;
|
|
257
|
-
$[39] = Error;
|
|
258
|
-
$[40] = description;
|
|
259
|
-
$[41] = Description;
|
|
260
|
-
$[42] = t14;
|
|
261
|
-
$[43] = t15;
|
|
262
|
-
} else {
|
|
263
|
-
t15 = $[43];
|
|
264
|
-
}
|
|
265
|
-
return t15;
|
|
133
|
+
}), /*#__PURE__*/_jsx(RenderCustomComponent, {
|
|
134
|
+
CustomComponent: Description,
|
|
135
|
+
Fallback: /*#__PURE__*/_jsx(FieldDescription, {
|
|
136
|
+
description: description,
|
|
137
|
+
path: path
|
|
138
|
+
})
|
|
139
|
+
})]
|
|
140
|
+
});
|
|
266
141
|
};
|
|
267
142
|
export const PointField = withCondition(PointFieldComponent);
|
|
268
143
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","getTranslation","React","useCallback","RenderCustomComponent","FieldDescription","FieldError","FieldLabel","useField","withCondition","useTranslation","fieldBaseClass","baseClass","PointFieldComponent","props","$","field","t0","path","readOnly","validate","admin","t1","label","localized","required","t2","undefined","className","description","placeholder","step","style","width","i18n","t","t3","value","options","memoizedValidate","t4","customComponents","t5","setValue","showError","t6","t7","AfterInput","BeforeInput","Description","Error","Label","t8","value_0","t9","e","index","val","parseFloat","target","Number","isNaN","coordinates","handleChange","t10","type","suffix","fieldLabel","getCoordinateFieldLabel","t11","t12","t13","filter","Boolean","t14","join","t15","t16","e_0","t17","e_1","_jsxs","children","_jsx","CustomComponent","Fallback","disabled","id","replace","name","onChange","PointField"],"sources":["../../../src/fields/Point/index.tsx"],"sourcesContent":["'use client'\nimport type { PointFieldClientComponent, PointFieldValidation } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React, { useCallback } from 'react'\n\nimport { RenderCustomComponent } from '../../elements/RenderCustomComponent/index.js'\nimport { FieldDescription } from '../../fields/FieldDescription/index.js'\nimport { FieldError } from '../../fields/FieldError/index.js'\nimport { FieldLabel } from '../../fields/FieldLabel/index.js'\nimport { useField } from '../../forms/useField/index.js'\nimport { withCondition } from '../../forms/withCondition/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { fieldBaseClass } from '../shared/index.js'\nimport './index.scss'\n\nconst baseClass = 'point'\n\nexport const PointFieldComponent: PointFieldClientComponent = (props) => {\n const {\n field: {\n name,\n admin: { className, description, placeholder, step, style, width } = {},\n label,\n localized,\n required,\n },\n path,\n readOnly,\n validate,\n } = props\n\n const { i18n, t } = useTranslation()\n\n const memoizedValidate: PointFieldValidation = useCallback(\n (value, options) => {\n if (typeof validate === 'function') {\n return validate(value, { ...options, required })\n }\n },\n [validate, required],\n )\n\n const {\n customComponents: { AfterInput, BeforeInput, Description, Error, Label } = {},\n setValue,\n showError,\n value = [null, null],\n } = useField<[number, number]>({\n path,\n validate: memoizedValidate,\n })\n\n const handleChange = useCallback(\n (e, index: 0 | 1) => {\n let val = parseFloat(e.target.value)\n if (Number.isNaN(val)) {\n val = e.target.value\n }\n const coordinates = [...value]\n coordinates[index] = val\n setValue(coordinates)\n },\n [setValue, value],\n )\n\n const getCoordinateFieldLabel = (type: 'latitude' | 'longitude') => {\n const suffix = type === 'longitude' ? t('fields:longitude') : t('fields:latitude')\n const fieldLabel = label ? getTranslation(label, i18n) : ''\n\n return `${fieldLabel}${fieldLabel ? ' - ' : ''}${suffix}`\n }\n\n return (\n <div\n className={[\n fieldBaseClass,\n baseClass,\n className,\n showError && 'error',\n readOnly && 'read-only',\n ]\n .filter(Boolean)\n .join(' ')}\n style={{\n ...style,\n width,\n }}\n >\n <ul className={`${baseClass}__wrap`}>\n <li>\n <RenderCustomComponent\n CustomComponent={Label}\n Fallback={\n <FieldLabel\n label={getCoordinateFieldLabel('longitude')}\n localized={localized}\n path={path}\n required={required}\n />\n }\n />\n <div className=\"input-wrapper\">\n {BeforeInput}\n {/* disable eslint rule because the label is dynamic */}\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <input\n disabled={readOnly}\n id={`field-longitude-${path?.replace(/\\./g, '__')}`}\n name={`${path}.longitude`}\n onChange={(e) => handleChange(e, 0)}\n placeholder={getTranslation(placeholder, i18n)}\n step={step}\n type=\"number\"\n value={value && typeof value[0] === 'number' ? value[0] : ''}\n />\n {AfterInput}\n </div>\n </li>\n <li>\n <RenderCustomComponent\n CustomComponent={Label}\n Fallback={\n <FieldLabel\n label={getCoordinateFieldLabel('latitude')}\n localized={localized}\n path={path}\n required={required}\n />\n }\n />\n <div className=\"input-wrapper\">\n <RenderCustomComponent\n CustomComponent={Error}\n Fallback={<FieldError path={path} showError={showError} />}\n />\n {BeforeInput}\n {/* disable eslint rule because the label is dynamic */}\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <input\n disabled={readOnly}\n id={`field-latitude-${path?.replace(/\\./g, '__')}`}\n name={`${path}.latitude`}\n onChange={(e) => handleChange(e, 1)}\n placeholder={getTranslation(placeholder, i18n)}\n step={step}\n type=\"number\"\n value={value && typeof value[1] === 'number' ? value[1] : ''}\n />\n {AfterInput}\n </div>\n </li>\n </ul>\n <RenderCustomComponent\n CustomComponent={Description}\n Fallback={<FieldDescription description={description} path={path} />}\n />\n </div>\n )\n}\n\nexport const PointField = withCondition(PointFieldComponent)\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,IAASC,WAAW,QAAQ;AAEnC,SAASC,qBAAqB,QAAQ;AACtC,SAASC,gBAAgB,QAAQ;AACjC,SAASC,UAAU,QAAQ;AAC3B,SAASC,UAAU,QAAQ;AAC3B,SAASC,QAAQ,QAAQ;AACzB,SAASC,aAAa,QAAQ;AAC9B,SAASC,cAAc,QAAQ;AAC/B,SAASC,cAAc,QAAQ;AAC/B,OAAO;AAEP,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,mBAAA,GAAiDC,KAAA;EAAA,MAAAC,CAAA,GAAAf,EAAA;EAC5D;IAAAgB,KAAA,EAAAC,EAAA;IAAAC,IAAA;IAAAC,QAAA;IAAAC;EAAA,IAWIN,KAAA;EAVK;IAAAO,KAAA,EAAAC,EAAA;IAAAC,KAAA;IAAAC,SAAA;IAAAC;EAAA,IAAAR,EAMN;EAAA,IAAAS,EAAA;EAAA,IAAAX,CAAA,QAAAO,EAAA;IAJQI,EAAA,GAAAJ,EAAgE,KAAAK,SAAA,QAAhEL,EAAgE;IAAAP,CAAA,MAAAO,EAAA;IAAAP,CAAA,MAAAW,EAAA;EAAA;IAAAA,EAAA,GAAAX,CAAA;EAAA;EAAhE;IAAAa,SAAA;IAAAC,WAAA;IA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AK,MAAM;YAAA,C,GAE3DU,UAAA;UAAA,C;YAGLkC,KAAA,CAAC;UAAAC,QAAA,GACCC,IAAA,CAAA/E,qBAAA;YAAAgF,eAAA,EACmBjC,KAAA;YAAAkC,QAAA,EAEfF,IAAA,CAAA5E,UAAA;cAAAgB,KAAA,EACS6C,uBAAA,CAAwB;cAAA5C,SAAA;cAAAN,IAAA;cAAAO;YAAA,C;cAOrCwD,KAAA,CAAC;YAAArD,SAAA,EAAc;YAAAsD,QAAA,GACbC,IAAA,CAAA/E,qBAAA;cAAAgF,eAAA,EACmBlC,KAAA;cAAAmC,QAAA,EACPF,IAAA,CAAA7E,UAAA;gBAAAY,IAAA;gBAAA0B;cAAA,C;gBAEXI,WAAA,EAGDmC,IAAA,CAAC;cAAAG,QAAA,EACWnE,QAAA;cAAAoE,EAAA,EACN,kBAAkBrE,IAAA,EAAAsE,OAAA,QAAqB,OAAO;cAAAC,IAAA,EAC5C,GAAGvE,IAAA,WAAe;cAAAwE,QAAA,EACdX,GAAuB;cAAAjD,WAAA,EACpB7B,cAAA,CAAe6B,WAAA,EAAaI,IAAA;cAAAH,IAAA;cAAAkC,IAAA,EAEpC;cAAA5B,KAAA,EACEA,OAAA,IAAS,OAAOA,OAAK,QAAQ,WAAWA,OAAK,MAAM;YAAA,C,GAE3DU,UAAA;UAAA,C;;UAIPoC,IAAA,CAAA/E,qBAAA;QAAAgF,eAAA,EACmBnC,WAAA;QAAAoC,QAAA,EACPF,IAAA,CAAA9E,gBAAA;UAAAwB,WAAA;UAAAX;QAAA,C;;;;;;;;;;;;;;;;;;;;;;;;;;;SAjFd0D,G;CAqFJ;AAEA,OAAO,MAAMe,UAAA,GAAalF,aAAA,CAAcI,mBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["getTranslation","React","useCallback","useMemo","RenderCustomComponent","FieldDescription","FieldError","FieldLabel","useField","withCondition","useTranslation","mergeFieldStyles","fieldBaseClass","baseClass","PointFieldComponent","props","field","admin","className","description","placeholder","step","label","localized","required","path","readOnly","validate","i18n","t","memoizedValidate","value","options","customComponents","AfterInput","BeforeInput","Description","Error","Label","setValue","showError","handleChange","e","index","val","parseFloat","target","Number","isNaN","coordinates","getCoordinateFieldLabel","type","suffix","fieldLabel","styles","_jsxs","filter","Boolean","join","style","_jsx","CustomComponent","Fallback","disabled","id","replace","name","onChange","PointField"],"sources":["../../../src/fields/Point/index.tsx"],"sourcesContent":["'use client'\nimport type { PointFieldClientComponent, PointFieldValidation } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React, { useCallback, useMemo } from 'react'\n\nimport { RenderCustomComponent } from '../../elements/RenderCustomComponent/index.js'\nimport { FieldDescription } from '../../fields/FieldDescription/index.js'\nimport { FieldError } from '../../fields/FieldError/index.js'\nimport { FieldLabel } from '../../fields/FieldLabel/index.js'\nimport { useField } from '../../forms/useField/index.js'\nimport { withCondition } from '../../forms/withCondition/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { mergeFieldStyles } from '../mergeFieldStyles.js'\nimport './index.scss'\nimport { fieldBaseClass } from '../shared/index.js'\n\nconst baseClass = 'point'\n\nexport const PointFieldComponent: PointFieldClientComponent = (props) => {\n const {\n field,\n field: {\n admin: { className, description, placeholder, step } = {},\n label,\n localized,\n required,\n },\n path,\n readOnly,\n validate,\n } = props\n\n const { i18n, t } = useTranslation()\n\n const memoizedValidate: PointFieldValidation = useCallback(\n (value, options) => {\n if (typeof validate === 'function') {\n return validate(value, { ...options, required })\n }\n },\n [validate, required],\n )\n\n const {\n customComponents: { AfterInput, BeforeInput, Description, Error, Label } = {},\n setValue,\n showError,\n value = [null, null],\n } = useField<[number, number]>({\n path,\n validate: memoizedValidate,\n })\n\n const handleChange = useCallback(\n (e, index: 0 | 1) => {\n let val = parseFloat(e.target.value)\n if (Number.isNaN(val)) {\n val = e.target.value\n }\n const coordinates = [...value]\n coordinates[index] = val\n setValue(coordinates)\n },\n [setValue, value],\n )\n\n const getCoordinateFieldLabel = (type: 'latitude' | 'longitude') => {\n const suffix = type === 'longitude' ? t('fields:longitude') : t('fields:latitude')\n const fieldLabel = label ? getTranslation(label, i18n) : ''\n\n return `${fieldLabel}${fieldLabel ? ' - ' : ''}${suffix}`\n }\n\n const styles = useMemo(() => mergeFieldStyles(field), [field])\n\n return (\n <div\n className={[\n fieldBaseClass,\n baseClass,\n className,\n showError && 'error',\n readOnly && 'read-only',\n ]\n .filter(Boolean)\n .join(' ')}\n style={styles}\n >\n <ul className={`${baseClass}__wrap`}>\n <li>\n <RenderCustomComponent\n CustomComponent={Label}\n Fallback={\n <FieldLabel\n label={getCoordinateFieldLabel('longitude')}\n localized={localized}\n path={path}\n required={required}\n />\n }\n />\n <div className=\"input-wrapper\">\n {BeforeInput}\n {/* disable eslint rule because the label is dynamic */}\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <input\n disabled={readOnly}\n id={`field-longitude-${path?.replace(/\\./g, '__')}`}\n name={`${path}.longitude`}\n onChange={(e) => handleChange(e, 0)}\n placeholder={getTranslation(placeholder, i18n)}\n step={step}\n type=\"number\"\n value={value && typeof value[0] === 'number' ? value[0] : ''}\n />\n {AfterInput}\n </div>\n </li>\n <li>\n <RenderCustomComponent\n CustomComponent={Label}\n Fallback={\n <FieldLabel\n label={getCoordinateFieldLabel('latitude')}\n localized={localized}\n path={path}\n required={required}\n />\n }\n />\n <div className=\"input-wrapper\">\n <RenderCustomComponent\n CustomComponent={Error}\n Fallback={<FieldError path={path} showError={showError} />}\n />\n {BeforeInput}\n {/* disable eslint rule because the label is dynamic */}\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <input\n disabled={readOnly}\n id={`field-latitude-${path?.replace(/\\./g, '__')}`}\n name={`${path}.latitude`}\n onChange={(e) => handleChange(e, 1)}\n placeholder={getTranslation(placeholder, i18n)}\n step={step}\n type=\"number\"\n value={value && typeof value[1] === 'number' ? value[1] : ''}\n />\n {AfterInput}\n </div>\n </li>\n </ul>\n <RenderCustomComponent\n CustomComponent={Description}\n Fallback={<FieldDescription description={description} path={path} />}\n />\n </div>\n )\n}\n\nexport const PointField = withCondition(PointFieldComponent)\n"],"mappings":"AAAA;;;AAGA,SAASA,cAAc,QAAQ;AAC/B,OAAOC,KAAA,IAASC,WAAW,EAAEC,OAAO,QAAQ;AAE5C,SAASC,qBAAqB,QAAQ;AACtC,SAASC,gBAAgB,QAAQ;AACjC,SAASC,UAAU,QAAQ;AAC3B,SAASC,UAAU,QAAQ;AAC3B,SAASC,QAAQ,QAAQ;AACzB,SAASC,aAAa,QAAQ;AAC9B,SAASC,cAAc,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ;AACjC,OAAO;AACP,SAASC,cAAc,QAAQ;AAE/B,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,mBAAA,GAAkDC,KAAA;EAC7D,MAAM;IACJC,KAAK;IACLA,KAAA,EAAO;MACLC,KAAA,EAAO;QAAEC,SAAS;QAAEC,WAAW;QAAEC,WAAW;QAAEC;MAAI,CAAE,GAAG,CAAC,CAAC;MACzDC,KAAK;MACLC,SAAS;MACTC;IAAQ,CACT;IACDC,IAAI;IACJC,QAAQ;IACRC;EAAQ,CACT,GAAGZ,KAAA;EAEJ,MAAM;IAAEa,IAAI;IAAEC;EAAC,CAAE,GAAGnB,cAAA;EAEpB,MAAMoB,gBAAA,GAAyC5B,WAAA,CAC7C,CAAC6B,KAAA,EAAOC,OAAA;IACN,IAAI,OAAOL,QAAA,KAAa,YAAY;MAClC,OAAOA,QAAA,CAASI,KAAA,EAAO;QAAE,GAAGC,OAAO;QAAER;MAAS;IAChD;EACF,GACA,CAACG,QAAA,EAAUH,QAAA,CAAS;EAGtB,MAAM;IACJS,gBAAA,EAAkB;MAAEC,UAAU;MAAEC,WAAW;MAAEC,WAAW;MAAEC,KAAK;MAAEC;IAAK,CAAE,GAAG,CAAC,CAAC;IAC7EC,QAAQ;IACRC,SAAS;IACTT,KAAA,EAAAA,OAAA,GAAQ,CAAC,MAA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AAaC,GAAA,EAAG;YACjCtB,WAAA,EAAapB,cAAA,CAAeoB,WAAA,EAAaQ,IAAA;YACzCP,IAAA,EAAMA,IAAA;YACN8B,IAAA,EAAK;YACLpB,KAAA,EAAOA,OAAA,IAAS,OAAOA,OAAK,CAAC,EAAE,KAAK,WAAWA,OAAK,CAAC,EAAE,GAAG;cAE3DG,UAAA;;;qBAIP0B,IAAA,CAACxD,qBAAA;MACCyD,eAAA,EAAiBzB,WAAA;MACjB0B,QAAA,eAAUF,IAAA,CAACvD,gBAAA;QAAiBc,WAAA,EAAaA,WAAA;QAAaM,IAAA,EAAMA;;;;AAIpE;AAEA,OAAO,MAAM2C,UAAA,GAAa3D,aAAA,CAAcK,mBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/RadioGroup/index.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/RadioGroup/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAA;AAUnD,OAAO,cAAc,CAAA;AA4HrB,eAAO,MAAM,eAAe;;;;;;;;+EAA0C,CAAA"}
|