@payloadcms/ui 3.79.0-internal.2874f3f → 3.80.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/elements/ReactSelect/MultiValue/index.d.ts.map +1 -1
- package/dist/elements/ReactSelect/MultiValue/index.js +14 -15
- package/dist/elements/ReactSelect/MultiValue/index.js.map +1 -1
- package/dist/elements/TimezonePicker/index.js +1 -1
- package/dist/elements/TimezonePicker/index.js.map +1 -1
- package/dist/exports/client/index.js +1 -1
- package/dist/exports/client/index.js.map +3 -3
- package/dist/fields/Join/index.js +1 -1
- package/dist/fields/Join/index.js.map +1 -1
- package/dist/utilities/buildTableState.js +2 -1
- package/dist/utilities/buildTableState.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/ReactSelect/MultiValue/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEnD,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGzC,OAAO,cAAc,CAAA;AAIrB,wBAAgB,6BAA6B,CAAC,UAAU,KAAA,EAAE,aAAa,KAAA,OAEtE;AACD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/ReactSelect/MultiValue/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEnD,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGzC,OAAO,cAAc,CAAA;AAIrB,wBAAgB,6BAA6B,CAAC,UAAU,KAAA,EAAE,aAAa,KAAA,OAEtE;AACD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,CAgExD,CAAA"}
|
|
@@ -11,7 +11,7 @@ export function generateMultiValueDraggableID(optionData, valueFunction) {
|
|
|
11
11
|
return typeof valueFunction === 'function' ? valueFunction(optionData) : optionData?.value;
|
|
12
12
|
}
|
|
13
13
|
export const MultiValue = props => {
|
|
14
|
-
const $ = _c(
|
|
14
|
+
const $ = _c(24);
|
|
15
15
|
const {
|
|
16
16
|
className,
|
|
17
17
|
data,
|
|
@@ -88,18 +88,10 @@ export const MultiValue = props => {
|
|
|
88
88
|
const classes = t9.join(" ");
|
|
89
89
|
let t10;
|
|
90
90
|
if ($[14] !== attributes || $[15] !== classes || $[16] !== disableMouseDown || $[17] !== innerProps || $[18] !== isSortable || $[19] !== listeners || $[20] !== props || $[21] !== setNodeRef || $[22] !== transform) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
e.stopPropagation();
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
$[24] = disableMouseDown;
|
|
99
|
-
$[25] = t11;
|
|
100
|
-
} else {
|
|
101
|
-
t11 = $[25];
|
|
102
|
-
}
|
|
91
|
+
const {
|
|
92
|
+
onMouseDown: listenersMouseDown,
|
|
93
|
+
...restListeners
|
|
94
|
+
} = listeners || {};
|
|
103
95
|
t10 = _jsx(React.Fragment, {
|
|
104
96
|
children: _jsx(SelectComponents.MultiValue, {
|
|
105
97
|
...props,
|
|
@@ -107,10 +99,17 @@ export const MultiValue = props => {
|
|
|
107
99
|
innerProps: {
|
|
108
100
|
...(isSortable ? {
|
|
109
101
|
...attributes,
|
|
110
|
-
...
|
|
102
|
+
...restListeners
|
|
111
103
|
} : {}),
|
|
112
104
|
...innerProps,
|
|
113
|
-
onMouseDown:
|
|
105
|
+
onMouseDown: e => {
|
|
106
|
+
if (isSortable && listenersMouseDown) {
|
|
107
|
+
listenersMouseDown(e);
|
|
108
|
+
}
|
|
109
|
+
if (!disableMouseDown) {
|
|
110
|
+
e.stopPropagation();
|
|
111
|
+
}
|
|
112
|
+
},
|
|
114
113
|
ref: setNodeRef,
|
|
115
114
|
style: isSortable ? {
|
|
116
115
|
transform,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","React","components","SelectComponents","useDraggableSortable","baseClass","generateMultiValueDraggableID","optionData","valueFunction","value","MultiValue","props","$","className","data","innerProps","isDisabled","selectProps","t0","t1","undefined","customProps","t2","getOptionValue","isSortable","t3","disableMouseDown","t4","id","t5","t6","disabled","attributes","isDragging","listeners","setNodeRef","transform","t7","t8","t9","filter","Boolean","classes","join","t10","
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","React","components","SelectComponents","useDraggableSortable","baseClass","generateMultiValueDraggableID","optionData","valueFunction","value","MultiValue","props","$","className","data","innerProps","isDisabled","selectProps","t0","t1","undefined","customProps","t2","getOptionValue","isSortable","t3","disableMouseDown","t4","id","t5","t6","disabled","attributes","isDragging","listeners","setNodeRef","transform","t7","t8","t9","filter","Boolean","classes","join","t10","onMouseDown","listenersMouseDown","restListeners","_jsx","Fragment","children","e","stopPropagation","ref","style"],"sources":["../../../../src/elements/ReactSelect/MultiValue/index.tsx"],"sourcesContent":["'use client'\nimport type { MultiValueProps } from 'react-select'\n\nimport React from 'react'\nimport { components as SelectComponents } from 'react-select'\n\nimport type { Option } from '../types.js'\n\nimport { useDraggableSortable } from '../../DraggableSortable/useDraggableSortable/index.js'\nimport './index.scss'\n\nconst baseClass = 'multi-value'\n\nexport function generateMultiValueDraggableID(optionData, valueFunction) {\n return typeof valueFunction === 'function' ? valueFunction(optionData) : optionData?.value\n}\nexport const MultiValue: React.FC<MultiValueProps<Option>> = (props) => {\n const {\n className,\n data,\n innerProps,\n isDisabled,\n // @ts-expect-error // TODO Fix this - moduleResolution 16 breaks our declare module\n selectProps: { customProps: { disableMouseDown } = {}, getOptionValue, isSortable } = {},\n } = props\n\n const id = generateMultiValueDraggableID(data, getOptionValue)\n\n const { attributes, isDragging, listeners, setNodeRef, transform } = useDraggableSortable({\n id,\n disabled: !isSortable,\n })\n\n const classes = [\n baseClass,\n className,\n !isDisabled && isSortable && 'draggable',\n isDragging && `${baseClass}--is-dragging`,\n ]\n .filter(Boolean)\n .join(' ')\n\n // Extract onMouseDown from listeners to preserve the MouseSensor handler\n const { onMouseDown: listenersMouseDown, ...restListeners } = listeners || {}\n\n return (\n <React.Fragment>\n <SelectComponents.MultiValue\n {...props}\n className={classes}\n innerProps={{\n ...(isSortable\n ? {\n ...attributes,\n ...restListeners,\n }\n : {}),\n ...innerProps,\n onMouseDown: (e) => {\n // Call the MouseSensor's handler first to enable mouse dragging\n if (isSortable && listenersMouseDown) {\n listenersMouseDown(e)\n }\n\n if (!disableMouseDown) {\n // we need to prevent the dropdown from opening when clicking on the drag handle, but not when a modal is open (i.e. the 'Relationship' field component)\n e.stopPropagation()\n }\n },\n ref: setNodeRef,\n style: isSortable\n ? {\n transform,\n ...attributes?.style,\n }\n : {},\n }}\n />\n </React.Fragment>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,OAAOC,KAAA,MAAW;AAClB,SAASC,UAAA,IAAcC,gBAAgB,QAAQ;AAI/C,SAASC,oBAAoB,QAAQ;AACrC,OAAO;AAEP,MAAMC,SAAA,GAAY;AAElB,OAAO,SAASC,8BAA8BC,UAAU,EAAEC,aAAa;EACrE,OAAO,OAAOA,aAAA,KAAkB,aAAaA,aAAA,CAAcD,UAAA,IAAcA,UAAA,EAAYE,KAAA;AACvF;AACA,OAAO,MAAMC,UAAA,GAAgDC,KAAA;EAAA,MAAAC,CAAA,GAAAZ,EAAA;EAC3D;IAAAa,SAAA;IAAAC,IAAA;IAAAC,UAAA;IAAAC,UAAA;IAAAC,WAAA,EAAAC;EAAA,IAOIP,KAAA;EAAA,IAAAQ,EAAA;EAAA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iB;YAAA;UAAA;UAAAC,GAAA,EAGhBlB,UAAA;UAAAmB,KAAA,EACE9B,UAAA;YAAAY,SAAA;YAAA,GAGEJ,UAAA,EAAAsB;UAAA;QAEJ;MAAA,C;;;;;;;;;;;;;;;SA7BXV,G;CAkCJ","ignoreList":[]}
|
|
@@ -23,7 +23,7 @@ export const TimezonePicker = props => {
|
|
|
23
23
|
const selectedTimezone = useMemo(() => {
|
|
24
24
|
return options.find(t_0 => {
|
|
25
25
|
const value = typeof t_0 === 'string' ? t_0 : t_0.value;
|
|
26
|
-
return value ===
|
|
26
|
+
return value === selectedTimezoneFromProps;
|
|
27
27
|
});
|
|
28
28
|
}, [options, selectedTimezoneFromProps]);
|
|
29
29
|
const readOnly = Boolean(readOnlyFromProps) || options.length === 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["useMemo","FieldLabel","useTranslation","ReactSelect","formatOptions","TimezonePicker","props","id","onChange","onChangeFromProps","options","optionsFromProps","readOnly","readOnlyFromProps","required","selectedTimezone","selectedTimezoneFromProps","t","find","value","Boolean","length","_jsxs","className","_jsx","htmlFor","label","unstyled","disabled","inputId","isClearable","isCreatable","val"],"sources":["../../../src/elements/TimezonePicker/index.tsx"],"sourcesContent":["'use client'\n\nimport type { OptionObject } from 'payload'\nimport type React from 'react'\n\nimport { useMemo } from 'react'\n\nimport type { Props } from './types.js'\n\nimport { FieldLabel } from '../../fields/FieldLabel/index.js'\nimport './index.scss'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { ReactSelect } from '../ReactSelect/index.js'\nimport { formatOptions } from '../WhereBuilder/Condition/Select/formatOptions.js'\n\nexport const TimezonePicker: React.FC<Props> = (props) => {\n const {\n id,\n onChange: onChangeFromProps,\n options: optionsFromProps,\n readOnly: readOnlyFromProps,\n required,\n selectedTimezone: selectedTimezoneFromProps,\n } = props\n\n const { t } = useTranslation()\n\n const options = formatOptions(optionsFromProps)\n\n const selectedTimezone = useMemo(() => {\n return options.find((t) => {\n const value = typeof t === 'string' ? t : t.value\n return value ===
|
|
1
|
+
{"version":3,"file":"index.js","names":["useMemo","FieldLabel","useTranslation","ReactSelect","formatOptions","TimezonePicker","props","id","onChange","onChangeFromProps","options","optionsFromProps","readOnly","readOnlyFromProps","required","selectedTimezone","selectedTimezoneFromProps","t","find","value","Boolean","length","_jsxs","className","_jsx","htmlFor","label","unstyled","disabled","inputId","isClearable","isCreatable","val"],"sources":["../../../src/elements/TimezonePicker/index.tsx"],"sourcesContent":["'use client'\n\nimport type { OptionObject } from 'payload'\nimport type React from 'react'\n\nimport { useMemo } from 'react'\n\nimport type { Props } from './types.js'\n\nimport { FieldLabel } from '../../fields/FieldLabel/index.js'\nimport './index.scss'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { ReactSelect } from '../ReactSelect/index.js'\nimport { formatOptions } from '../WhereBuilder/Condition/Select/formatOptions.js'\n\nexport const TimezonePicker: React.FC<Props> = (props) => {\n const {\n id,\n onChange: onChangeFromProps,\n options: optionsFromProps,\n readOnly: readOnlyFromProps,\n required,\n selectedTimezone: selectedTimezoneFromProps,\n } = props\n\n const { t } = useTranslation()\n\n const options = formatOptions(optionsFromProps)\n\n const selectedTimezone = useMemo(() => {\n return options.find((t) => {\n const value = typeof t === 'string' ? t : t.value\n return value === selectedTimezoneFromProps\n })\n }, [options, selectedTimezoneFromProps])\n\n const readOnly = Boolean(readOnlyFromProps) || options.length === 1\n\n return (\n <div className=\"timezone-picker-wrapper\">\n <FieldLabel\n htmlFor={id}\n label={`${t('general:timezone')} ${required ? '*' : ''}`}\n required={required}\n unstyled\n />\n <ReactSelect\n className=\"timezone-picker\"\n disabled={readOnly}\n inputId={id}\n isClearable={!required}\n isCreatable={false}\n onChange={(val: OptionObject) => {\n if (onChangeFromProps) {\n onChangeFromProps(val?.value || '')\n }\n }}\n options={options}\n value={selectedTimezone}\n />\n </div>\n )\n}\n"],"mappings":"AAAA;;;AAKA,SAASA,OAAO,QAAQ;AAIxB,SAAS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