@payloadcms/ui 3.55.0-canary.4 → 3.55.0-internal.b47bfce
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/BulkUpload/EditForm/index.js +18 -4
- package/dist/elements/BulkUpload/EditForm/index.js.map +1 -1
- package/dist/elements/ClipboardAction/index.js +74 -173
- package/dist/elements/ClipboardAction/index.js.map +1 -1
- package/dist/elements/CodeEditor/CodeEditor.js +67 -155
- package/dist/elements/CodeEditor/CodeEditor.js.map +1 -1
- package/dist/elements/Collapsible/index.js +7 -15
- package/dist/elements/Collapsible/index.js.map +1 -1
- package/dist/elements/ConfirmationModal/index.js +8 -44
- package/dist/elements/ConfirmationModal/index.js.map +1 -1
- package/dist/elements/CopyLocaleData/index.js +89 -97
- package/dist/elements/CopyLocaleData/index.js.map +1 -1
- package/dist/elements/CopyToClipboard/index.js +2 -22
- package/dist/elements/CopyToClipboard/index.js.map +1 -1
- package/dist/elements/DeleteMany/index.js +47 -83
- package/dist/elements/DeleteMany/index.js.map +1 -1
- package/dist/elements/DocumentControls/index.js +27 -55
- package/dist/elements/DocumentControls/index.js.map +1 -1
- package/dist/elements/DocumentDrawer/DrawerHeader/index.js +2 -10
- package/dist/elements/DocumentDrawer/DrawerHeader/index.js.map +1 -1
- package/dist/elements/DocumentDrawer/index.js +47 -99
- package/dist/elements/DocumentDrawer/index.js.map +1 -1
- package/dist/elements/DocumentFields/index.scss +1 -1
- package/dist/elements/Drawer/index.js +23 -57
- package/dist/elements/Drawer/index.js.map +1 -1
- package/dist/elements/DrawerActionHeader/index.js +3 -21
- package/dist/elements/DrawerActionHeader/index.js.map +1 -1
- package/dist/elements/FolderView/Drawers/MoveToFolder/index.js +149 -225
- package/dist/elements/FolderView/Drawers/MoveToFolder/index.js.map +1 -1
- package/dist/elements/FolderView/FolderFileCard/index.js +19 -27
- package/dist/elements/FolderView/FolderFileCard/index.js.map +1 -1
- package/dist/elements/FolderView/MoveDocToFolder/index.js +12 -23
- package/dist/elements/FolderView/MoveDocToFolder/index.js.map +1 -1
- package/dist/elements/FullscreenModal/index.js +10 -20
- package/dist/elements/FullscreenModal/index.js.map +1 -1
- package/dist/elements/ListDrawer/index.js +18 -24
- package/dist/elements/ListDrawer/index.js.map +1 -1
- package/dist/elements/ListHeader/TitleActions/ListCreateNewDocInFolderButton.js +19 -32
- package/dist/elements/ListHeader/TitleActions/ListCreateNewDocInFolderButton.js.map +1 -1
- package/dist/elements/ListHeaderTabs/DefaultListPill.js +15 -8
- package/dist/elements/ListHeaderTabs/DefaultListPill.js.map +1 -1
- package/dist/elements/ListSelection/index.js +11 -27
- package/dist/elements/ListSelection/index.js.map +1 -1
- package/dist/elements/LivePreview/Window/index.js +68 -139
- package/dist/elements/LivePreview/Window/index.js.map +1 -1
- package/dist/elements/Loading/index.js +2 -11
- package/dist/elements/Loading/index.js.map +1 -1
- package/dist/elements/LoadingOverlay/index.js +46 -102
- package/dist/elements/LoadingOverlay/index.js.map +1 -1
- package/dist/elements/Localizer/LocalizerLabel/index.js +23 -36
- package/dist/elements/Localizer/LocalizerLabel/index.js.map +1 -1
- package/dist/elements/PublishButton/index.d.ts.map +1 -1
- package/dist/elements/PublishButton/index.js +22 -11
- package/dist/elements/PublishButton/index.js.map +1 -1
- package/dist/elements/QueryPresets/QueryPresetToggler/index.js +41 -139
- package/dist/elements/QueryPresets/QueryPresetToggler/index.js.map +1 -1
- package/dist/elements/RenderIfInViewport/index.d.ts +2 -2
- package/dist/elements/RenderIfInViewport/index.d.ts.map +1 -1
- package/dist/elements/RenderIfInViewport/index.js.map +1 -1
- package/dist/elements/SelectRow/index.js +39 -40
- package/dist/elements/SelectRow/index.js.map +1 -1
- package/dist/elements/ShimmerEffect/index.js +20 -12
- package/dist/elements/ShimmerEffect/index.js.map +1 -1
- package/dist/elements/SortColumn/index.js +21 -30
- package/dist/elements/SortColumn/index.js.map +1 -1
- package/dist/elements/Table/DefaultCell/fields/Date/index.js +9 -37
- package/dist/elements/Table/DefaultCell/fields/Date/index.js.map +1 -1
- package/dist/elements/Table/DefaultCell/fields/Relationship/index.js +35 -37
- package/dist/elements/Table/DefaultCell/fields/Relationship/index.js.map +1 -1
- package/dist/elements/Table/DefaultCell/fields/Select/index.js +12 -27
- package/dist/elements/Table/DefaultCell/fields/Select/index.js.map +1 -1
- package/dist/elements/Thumbnail/index.js +35 -75
- package/dist/elements/Thumbnail/index.js.map +1 -1
- package/dist/elements/ThumbnailCard/index.js +17 -26
- package/dist/elements/ThumbnailCard/index.js.map +1 -1
- package/dist/elements/Tooltip/index.js +51 -127
- package/dist/elements/Tooltip/index.js.map +1 -1
- package/dist/elements/Upload/index.js +2 -10
- package/dist/elements/Upload/index.js.map +1 -1
- package/dist/elements/WhereBuilder/Condition/Select/index.js +31 -44
- package/dist/elements/WhereBuilder/Condition/Select/index.js.map +1 -1
- package/dist/exports/client/{CodeEditor-MIIBUJZ4.js → CodeEditor-O6BWJHD2.js} +2 -2
- package/dist/exports/client/{DatePicker-NMDEHPWL.js → DatePicker-F432AIH3.js} +2 -2
- package/dist/exports/client/{chunk-7RGKTZG2.js → chunk-AZDI6MW4.js} +1 -1
- package/dist/exports/client/{chunk-7RGKTZG2.js.map → chunk-AZDI6MW4.js.map} +1 -1
- package/dist/exports/client/{chunk-Z6O2JA43.js → chunk-FXAFULZQ.js} +6 -6
- package/dist/exports/client/{chunk-Z6O2JA43.js.map → chunk-FXAFULZQ.js.map} +3 -3
- package/dist/exports/client/index.d.ts +4 -2
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +12 -12
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/rsc/index.d.ts +1 -0
- package/dist/exports/rsc/index.d.ts.map +1 -1
- package/dist/exports/rsc/index.js +1 -0
- package/dist/exports/rsc/index.js.map +1 -1
- package/dist/fields/Array/ArrayRow.d.ts +2 -3
- package/dist/fields/Array/ArrayRow.d.ts.map +1 -1
- package/dist/fields/Array/ArrayRow.js +13 -23
- package/dist/fields/Array/ArrayRow.js.map +1 -1
- package/dist/fields/Array/index.js +273 -477
- package/dist/fields/Array/index.js.map +1 -1
- package/dist/fields/Checkbox/Input.js +2 -19
- package/dist/fields/Checkbox/Input.js.map +1 -1
- package/dist/fields/FieldError/index.js +30 -29
- package/dist/fields/FieldError/index.js.map +1 -1
- package/dist/fields/FieldLabel/index.js +12 -64
- package/dist/fields/FieldLabel/index.js.map +1 -1
- package/dist/fields/Relationship/select-components/MultiValueLabel/index.js +45 -103
- package/dist/fields/Relationship/select-components/MultiValueLabel/index.js.map +1 -1
- package/dist/fields/Relationship/select-components/SingleValue/index.js +29 -44
- package/dist/fields/Relationship/select-components/SingleValue/index.js.map +1 -1
- package/dist/fields/Row/index.d.ts +1 -3
- package/dist/fields/Row/index.d.ts.map +1 -1
- package/dist/fields/Select/Input.js +18 -31
- package/dist/fields/Select/Input.js.map +1 -1
- package/dist/fields/Tabs/Tab/index.js +2 -11
- package/dist/fields/Tabs/Tab/index.js.map +1 -1
- package/dist/fields/Tabs/index.d.ts +2 -1
- package/dist/fields/Tabs/index.d.ts.map +1 -1
- package/dist/fields/Tabs/index.js +185 -225
- package/dist/fields/Tabs/index.js.map +1 -1
- package/dist/fields/Upload/RelationshipContent/index.js +79 -127
- package/dist/fields/Upload/RelationshipContent/index.js.map +1 -1
- package/dist/forms/RenderFields/RenderField.js +245 -237
- package/dist/forms/RenderFields/RenderField.js.map +1 -1
- package/dist/forms/RenderFields/types.d.ts +2 -10
- package/dist/forms/RenderFields/types.d.ts.map +1 -1
- package/dist/forms/RenderFields/types.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.d.ts +30 -0
- package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.d.ts.map +1 -0
- package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js +82 -0
- package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js.map +1 -0
- package/dist/forms/useField/index.d.ts +5 -0
- package/dist/forms/useField/index.d.ts.map +1 -1
- package/dist/forms/useField/index.js +74 -45
- package/dist/forms/useField/index.js.map +1 -1
- package/dist/hooks/useIntersect.js +35 -53
- package/dist/hooks/useIntersect.js.map +1 -1
- package/dist/hooks/usePayloadAPI.js +36 -44
- package/dist/hooks/usePayloadAPI.js.map +1 -1
- package/dist/providers/ServerFunctions/index.d.ts +4 -1
- package/dist/providers/ServerFunctions/index.d.ts.map +1 -1
- package/dist/providers/ServerFunctions/index.js +13 -0
- package/dist/providers/ServerFunctions/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utilities/traverseForLocalizedFields.d.ts +3 -0
- package/dist/utilities/traverseForLocalizedFields.d.ts.map +1 -0
- package/dist/utilities/traverseForLocalizedFields.js +40 -0
- package/dist/utilities/traverseForLocalizedFields.js.map +1 -0
- package/dist/views/BrowseByFolder/index.js +37 -55
- package/dist/views/BrowseByFolder/index.js.map +1 -1
- package/dist/views/CollectionFolder/index.js +13 -40
- package/dist/views/CollectionFolder/index.js.map +1 -1
- package/dist/views/Edit/Auth/index.js +93 -105
- package/dist/views/Edit/Auth/index.js.map +1 -1
- package/package.json +8 -8
- /package/dist/exports/client/{CodeEditor-MIIBUJZ4.js.map → CodeEditor-O6BWJHD2.js.map} +0 -0
- /package/dist/exports/client/{DatePicker-NMDEHPWL.js.map → DatePicker-F432AIH3.js.map} +0 -0
|
@@ -11,7 +11,7 @@ import { Pill } from '../../Pill/index.js';
|
|
|
11
11
|
import './index.scss';
|
|
12
12
|
const baseClass = 'active-query-preset';
|
|
13
13
|
export function QueryPresetToggler(t0) {
|
|
14
|
-
const $ = _c(
|
|
14
|
+
const $ = _c(11);
|
|
15
15
|
const {
|
|
16
16
|
activePreset,
|
|
17
17
|
openPresetListDrawer,
|
|
@@ -25,130 +25,46 @@ export function QueryPresetToggler(t0) {
|
|
|
25
25
|
getEntityConfig
|
|
26
26
|
} = useConfig();
|
|
27
27
|
let t1;
|
|
28
|
-
|
|
29
|
-
let t11;
|
|
30
|
-
let t12;
|
|
31
|
-
let t13;
|
|
32
|
-
let t14;
|
|
33
|
-
let t15;
|
|
34
|
-
let t16;
|
|
35
|
-
let t17;
|
|
36
|
-
let t18;
|
|
37
|
-
let t2;
|
|
38
|
-
let t3;
|
|
39
|
-
let t4;
|
|
40
|
-
let t5;
|
|
41
|
-
let t6;
|
|
42
|
-
let t7;
|
|
43
|
-
let t8;
|
|
44
|
-
let t9;
|
|
45
|
-
if ($[0] !== activePreset || $[1] !== getEntityConfig || $[2] !== i18n || $[3] !== openPresetListDrawer || $[4] !== t) {
|
|
28
|
+
if ($[0] !== activePreset || $[1] !== getEntityConfig || $[2] !== i18n || $[3] !== openPresetListDrawer || $[4] !== resetPreset || $[5] !== t) {
|
|
46
29
|
const presetsConfig = getEntityConfig({
|
|
47
30
|
collectionSlug: "payload-query-presets"
|
|
48
31
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
$[23] = t19;
|
|
56
|
-
$[24] = t20;
|
|
32
|
+
const t2 = activePreset && `${baseClass}--active`;
|
|
33
|
+
let t3;
|
|
34
|
+
if ($[7] !== t2) {
|
|
35
|
+
t3 = [baseClass, t2].filter(Boolean);
|
|
36
|
+
$[7] = t2;
|
|
37
|
+
$[8] = t3;
|
|
57
38
|
} else {
|
|
58
|
-
|
|
39
|
+
t3 = $[8];
|
|
59
40
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
t14 = () => {
|
|
41
|
+
let t4;
|
|
42
|
+
if ($[9] !== openPresetListDrawer) {
|
|
43
|
+
t4 = () => {
|
|
64
44
|
openPresetListDrawer();
|
|
65
45
|
};
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
46
|
+
$[9] = openPresetListDrawer;
|
|
47
|
+
$[10] = t4;
|
|
68
48
|
} else {
|
|
69
|
-
|
|
49
|
+
t4 = $[10];
|
|
70
50
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
className: `${baseClass}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
t3 = _jsx;
|
|
89
|
-
t4 = "div";
|
|
90
|
-
t1 = `${baseClass}__label-text`;
|
|
91
|
-
t2 = activePreset?.title || t("general:selectLabel", {
|
|
92
|
-
label: getTranslation(presetsConfig.labels.singular, i18n)
|
|
93
|
-
});
|
|
94
|
-
$[0] = activePreset;
|
|
95
|
-
$[1] = getEntityConfig;
|
|
96
|
-
$[2] = i18n;
|
|
97
|
-
$[3] = openPresetListDrawer;
|
|
98
|
-
$[4] = t;
|
|
99
|
-
$[5] = t1;
|
|
100
|
-
$[6] = t10;
|
|
101
|
-
$[7] = t11;
|
|
102
|
-
$[8] = t12;
|
|
103
|
-
$[9] = t13;
|
|
104
|
-
$[10] = t14;
|
|
105
|
-
$[11] = t15;
|
|
106
|
-
$[12] = t16;
|
|
107
|
-
$[13] = t17;
|
|
108
|
-
$[14] = t18;
|
|
109
|
-
$[15] = t2;
|
|
110
|
-
$[16] = t3;
|
|
111
|
-
$[17] = t4;
|
|
112
|
-
$[18] = t5;
|
|
113
|
-
$[19] = t6;
|
|
114
|
-
$[20] = t7;
|
|
115
|
-
$[21] = t8;
|
|
116
|
-
$[22] = t9;
|
|
117
|
-
} else {
|
|
118
|
-
t1 = $[5];
|
|
119
|
-
t10 = $[6];
|
|
120
|
-
t11 = $[7];
|
|
121
|
-
t12 = $[8];
|
|
122
|
-
t13 = $[9];
|
|
123
|
-
t14 = $[10];
|
|
124
|
-
t15 = $[11];
|
|
125
|
-
t16 = $[12];
|
|
126
|
-
t17 = $[13];
|
|
127
|
-
t18 = $[14];
|
|
128
|
-
t2 = $[15];
|
|
129
|
-
t3 = $[16];
|
|
130
|
-
t4 = $[17];
|
|
131
|
-
t5 = $[18];
|
|
132
|
-
t6 = $[19];
|
|
133
|
-
t7 = $[20];
|
|
134
|
-
t8 = $[21];
|
|
135
|
-
t9 = $[22];
|
|
136
|
-
}
|
|
137
|
-
let t19;
|
|
138
|
-
if ($[29] !== activePreset || $[30] !== resetPreset || $[31] !== t1 || $[32] !== t10 || $[33] !== t11 || $[34] !== t12 || $[35] !== t13 || $[36] !== t14 || $[37] !== t15 || $[38] !== t16 || $[39] !== t17 || $[40] !== t18 || $[41] !== t2 || $[42] !== t3 || $[43] !== t4 || $[44] !== t5 || $[45] !== t6 || $[46] !== t7 || $[47] !== t8 || $[48] !== t9) {
|
|
139
|
-
t19 = t17(t18, {
|
|
140
|
-
className: t12,
|
|
141
|
-
id: t13,
|
|
142
|
-
onClick: t14,
|
|
143
|
-
pillStyle: t15,
|
|
144
|
-
size: t16,
|
|
145
|
-
children: t10(t11, {
|
|
146
|
-
className: t9,
|
|
147
|
-
children: [t8, t6(t7, {
|
|
148
|
-
className: t5,
|
|
149
|
-
children: t3(t4, {
|
|
150
|
-
className: t1,
|
|
151
|
-
children: t2
|
|
51
|
+
t1 = _jsx(Pill, {
|
|
52
|
+
className: t3.join(" "),
|
|
53
|
+
id: "select-preset",
|
|
54
|
+
onClick: t4,
|
|
55
|
+
pillStyle: "light",
|
|
56
|
+
size: "small",
|
|
57
|
+
children: _jsxs("div", {
|
|
58
|
+
className: `${baseClass}__label`,
|
|
59
|
+
children: [activePreset?.isShared && _jsx(PeopleIcon, {
|
|
60
|
+
className: `${baseClass}__shared`
|
|
61
|
+
}), _jsx("div", {
|
|
62
|
+
className: `${baseClass}__label-text-max-width`,
|
|
63
|
+
children: _jsx("div", {
|
|
64
|
+
className: `${baseClass}__label-text`,
|
|
65
|
+
children: activePreset?.title || t("general:selectLabel", {
|
|
66
|
+
label: getTranslation(presetsConfig.labels.singular, i18n)
|
|
67
|
+
})
|
|
152
68
|
})
|
|
153
69
|
}), activePreset ? _jsx("div", {
|
|
154
70
|
className: `${baseClass}__clear`,
|
|
@@ -169,30 +85,16 @@ export function QueryPresetToggler(t0) {
|
|
|
169
85
|
}) : null]
|
|
170
86
|
})
|
|
171
87
|
});
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[36] = t14;
|
|
180
|
-
$[37] = t15;
|
|
181
|
-
$[38] = t16;
|
|
182
|
-
$[39] = t17;
|
|
183
|
-
$[40] = t18;
|
|
184
|
-
$[41] = t2;
|
|
185
|
-
$[42] = t3;
|
|
186
|
-
$[43] = t4;
|
|
187
|
-
$[44] = t5;
|
|
188
|
-
$[45] = t6;
|
|
189
|
-
$[46] = t7;
|
|
190
|
-
$[47] = t8;
|
|
191
|
-
$[48] = t9;
|
|
192
|
-
$[49] = t19;
|
|
88
|
+
$[0] = activePreset;
|
|
89
|
+
$[1] = getEntityConfig;
|
|
90
|
+
$[2] = i18n;
|
|
91
|
+
$[3] = openPresetListDrawer;
|
|
92
|
+
$[4] = resetPreset;
|
|
93
|
+
$[5] = t;
|
|
94
|
+
$[6] = t1;
|
|
193
95
|
} else {
|
|
194
|
-
|
|
96
|
+
t1 = $[6];
|
|
195
97
|
}
|
|
196
|
-
return
|
|
98
|
+
return t1;
|
|
197
99
|
}
|
|
198
100
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","getTranslation","PeopleIcon","XIcon","useConfig","useTranslation","Pill","baseClass","QueryPresetToggler","t0","$","activePreset","openPresetListDrawer","resetPreset","i18n","t","getEntityConfig","t1","
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","getTranslation","PeopleIcon","XIcon","useConfig","useTranslation","Pill","baseClass","QueryPresetToggler","t0","$","activePreset","openPresetListDrawer","resetPreset","i18n","t","getEntityConfig","t1","presetsConfig","collectionSlug","t2","t3","filter","Boolean","t4","_jsx","className","join","id","onClick","pillStyle","size","children","_jsxs","isShared","title","label","labels","singular","e","stopPropagation","onKeyDown","e_0","key","role","tabIndex"],"sources":["../../../../src/elements/QueryPresets/QueryPresetToggler/index.tsx"],"sourcesContent":["'use client'\nimport type { QueryPreset } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport { PeopleIcon } from '../../../icons/People/index.js'\nimport { XIcon } from '../../../icons/X/index.js'\nimport { useConfig } from '../../../providers/Config/index.js'\nimport { useTranslation } from '../../../providers/Translation/index.js'\nimport { Pill } from '../../Pill/index.js'\nimport './index.scss'\n\nconst baseClass = 'active-query-preset'\n\nexport function QueryPresetToggler({\n activePreset,\n openPresetListDrawer,\n resetPreset,\n}: {\n activePreset: QueryPreset\n openPresetListDrawer: () => void\n resetPreset: () => Promise<void>\n}) {\n const { i18n, t } = useTranslation()\n const { getEntityConfig } = useConfig()\n\n const presetsConfig = getEntityConfig({\n collectionSlug: 'payload-query-presets',\n })\n\n return (\n <Pill\n className={[baseClass, activePreset && `${baseClass}--active`].filter(Boolean).join(' ')}\n id=\"select-preset\"\n onClick={() => {\n openPresetListDrawer()\n }}\n pillStyle=\"light\"\n size=\"small\"\n >\n <div className={`${baseClass}__label`}>\n {activePreset?.isShared && <PeopleIcon className={`${baseClass}__shared`} />}\n <div className={`${baseClass}__label-text-max-width`}>\n <div className={`${baseClass}__label-text`}>\n {activePreset?.title ||\n t('general:selectLabel', {\n label: getTranslation(presetsConfig.labels.singular, i18n),\n })}\n </div>\n </div>\n {activePreset ? (\n <div\n className={`${baseClass}__clear`}\n id=\"clear-preset\"\n onClick={async (e) => {\n e.stopPropagation()\n await resetPreset()\n }}\n onKeyDown={async (e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.stopPropagation()\n await resetPreset()\n }\n }}\n role=\"button\"\n tabIndex={0}\n >\n <XIcon />\n </div>\n ) : null}\n </div>\n </Pill>\n )\n}\n"],"mappings":"AAAA;;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,IAAA,CAAc;MAAAC,EAAA,EACjF;MAAAC,OAAA,EACML,EAET;MAAAM,SAAA,EACU;MAAAC,IAAA,EACL;MAAAC,QAAA,EAELC,KAAA,CAAC;QAAAP,SAAA,EAAe,GAAAnB,SAAA,SAAqB;QAAAyB,QAAA,GAClCrB,YAAA,EAAAuB,QAAA,IAA0BT,IAAA,CAAAvB,UAAA;UAAAwB,SAAA,EAAuB,GAAAnB,SAAA;QAAsB,C,GACxEkB,IAAA,CAAC;UAAAC,SAAA,EAAe,GAAAnB,SAAA,wBAAoC;UAAAyB,QAAA,EAClDP,IAAA,CAAC;YAAAC,SAAA,EAAe,GAAAnB,SAAA,cAA0B;YAAAyB,QAAA,EACvCrB,YAAA,EAAAwB,KAAA,IACCpB,CAAA,CAAE;cAAAqB,KAAA,EACOnC,cAAA,CAAeiB,aAAA,CAAAmB,MAAA,CAAAC,QAAA,EAA+BxB,IAAA;YAAA,CACvD;UAAA,C;YAGLH,YAAA,GACCc,IAAA,CAAC;UAAAC,SAAA,EACY,GAAAnB,SAAA,SAAqB;UAAAqB,EAAA,EAC7B;UAAAC,OAAA,QAAAU,CAAA;YAEDA,CAAA,CAAAC,eAAA,CAAiB;YAAA,MACX3B,WAAA;UAAA;UAAA4B,SAAA,QAAAC,GAAA;YAAA,IAGFH,GAAA,CAAAI,GAAA,KAAU,WAAWJ,GAAA,CAAAI,GAAA,KAAU;cACjCJ,GAAA,CAAAC,eAAA,CAAiB;cAAA,MACX3B,WAAA;YAAA;UAAA;UAAA+B,IAAA,EAGL;UAAAC,QAAA;UAAAb,QAAA,EAGLP,IAAA,CAAAtB,KAAA,IAAC;QAAA,C,QAED;MAAA,C;;;;;;;;;;;;SAtCRc,E","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { ClientComponentProps } from 'payload';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
export declare const RenderIfInViewport: React.FC<{
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
className?: string;
|
|
5
|
-
|
|
6
|
-
}>;
|
|
6
|
+
} & Pick<ClientComponentProps, 'forceRender'>>;
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/RenderIfInViewport/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/RenderIfInViewport/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAEnD,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CACvC;IACE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC,CAyB9C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","React","useIntersect","RenderIfInViewport","t0","$","children","className","forceRender","hasRendered","setHasRendered","useState","Boolean","t1","Symbol","for","rootMargin","intersectionRef","entry","isIntersecting","isAboveViewport","boundingClientRect","top","shouldRender","t2","t3","useEffect","t4","t5","_jsx","ref"],"sources":["../../../src/elements/RenderIfInViewport/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useIntersect } from '../../hooks/useIntersect.js'\n\nexport const RenderIfInViewport: React.FC
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","React","useIntersect","RenderIfInViewport","t0","$","children","className","forceRender","hasRendered","setHasRendered","useState","Boolean","t1","Symbol","for","rootMargin","intersectionRef","entry","isIntersecting","isAboveViewport","boundingClientRect","top","shouldRender","t2","t3","useEffect","t4","t5","_jsx","ref"],"sources":["../../../src/elements/RenderIfInViewport/index.tsx"],"sourcesContent":["'use client'\nimport type { ClientComponentProps } from 'payload'\n\nimport React from 'react'\n\nimport { useIntersect } from '../../hooks/useIntersect.js'\n\nexport const RenderIfInViewport: React.FC<\n {\n children: React.ReactNode\n className?: string\n } & Pick<ClientComponentProps, 'forceRender'>\n> = ({ children, className, forceRender }) => {\n const [hasRendered, setHasRendered] = React.useState(Boolean(forceRender))\n const [intersectionRef, entry] = useIntersect(\n {\n rootMargin: '1000px',\n },\n Boolean(forceRender),\n )\n\n const isIntersecting = Boolean(entry?.isIntersecting)\n const isAboveViewport = entry?.boundingClientRect?.top < 0\n const shouldRender = forceRender || isIntersecting || isAboveViewport\n\n React.useEffect(() => {\n if (shouldRender && !hasRendered) {\n setHasRendered(true)\n }\n }, [shouldRender, hasRendered])\n\n return (\n <div className={className} ref={intersectionRef}>\n {hasRendered ? children : null}\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,OAAOC,KAAA,MAAW;AAElB,SAASC,YAAY,QAAQ;AAE7B,OAAO,MAAMC,kBAAA,GAKTC,EAAA;EAAA,MAAAC,CAAA,GAAAL,EAAA;EAAC;IAAAM,QAAA;IAAAC,SAAA;IAAAC;EAAA,IAAAJ,EAAoC;EACvC,OAAAK,WAAA,EAAAC,cAAA,IAAsCT,KAAA,CAAAU,QAAA,CAAeC,OAAA,CAAQJ,WAAA;EAAA,IAAAK,EAAA;EAAA,IAAAR,CAAA,QAAAS,MAAA,CAAAC,GAAA;IAE3DF,EAAA;MAAAG,UAAA,EACc;IAAA;IACdX,CAAA,MAAAQ,EAAA;EAAA;IAAAA,EAAA,GAAAR,CAAA;EAAA;EAHF,OAAAY,eAAA,EAAAC,KAAA,IAAiChB,YAAA,CAC/BW,EAEA,EACAD,OAAA,CAAQJ,WAAA;EAGV,MAAAW,cAAA,GAAuBP,OAAA,CAAQM,KAAA,EAAAC,cAAO;EACtC,MAAAC,eAAA,GAAwBF,KAAA,EAAAG,kBAAA,EAAAC,GAAA,IAAiC;EACzD,MAAAC,YAAA,GAAqBf,WAAA,IAAeW,cAAA,IAAkBC,eAAA;EAAA,IAAAI,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAApB,CAAA,QAAAI,WAAA,IAAAJ,CAAA,QAAAkB,YAAA;IAEtCC,EAAA,GAAAA,CAAA;MAAA,IACVD,YAAA,KAAiBd,WAAA;QACnBC,cAAA,KAAe;MAAA;IAAA;IAEhBe,EAAA,IAACF,YAAA,EAAcd,WAAA;IAAYJ,CAAA,MAAAI,WAAA;IAAAJ,CAAA,MAAAkB,YAAA;IAAAlB,CAAA,MAAAmB,EAAA;IAAAnB,CAAA,MAAAoB,EAAA;EAAA;IAAAD,EAAA,GAAAnB,CAAA;IAAAoB,EAAA,GAAApB,CAAA;EAAA;EAJ9BJ,KAAA,CAAAyB,SAAA,CAAgBF,EAIhB,EAAGC,EAA2B;EAIzB,MAAAE,EAAA,GAAAlB,WAAA,GAAcH,QAAA,OAAW;EAAA,IAAAsB,EAAA;EAAA,IAAAvB,CAAA,QAAAE,SAAA,IAAAF,CAAA,QAAAY,eAAA,IAAAZ,CAAA,QAAAsB,EAAA;IAD5BC,EAAA,GAAAC,IAAA,CAAC;MAAAtB,SAAA;MAAAuB,GAAA,EAA+Bb,eAAA;MAAAX,QAAA,EAC7BqB;IAAyB,C;;;;;;;;SAD5BC,E;CAIJ","ignoreList":[]}
|
|
@@ -10,7 +10,7 @@ import { Locked } from '../Locked/index.js';
|
|
|
10
10
|
import './index.scss';
|
|
11
11
|
const baseClass = 'select-row';
|
|
12
12
|
export const SelectRow = t0 => {
|
|
13
|
-
const $ = _c(
|
|
13
|
+
const $ = _c(13);
|
|
14
14
|
const {
|
|
15
15
|
rowData
|
|
16
16
|
} = t0;
|
|
@@ -22,69 +22,68 @@ export const SelectRow = t0 => {
|
|
|
22
22
|
setSelection
|
|
23
23
|
} = useSelection();
|
|
24
24
|
let t1;
|
|
25
|
-
if ($[0] !== rowData) {
|
|
26
|
-
t1 =
|
|
25
|
+
if ($[0] !== rowData || $[1] !== user?.id) {
|
|
26
|
+
t1 = Symbol.for("react.early_return_sentinel");
|
|
27
|
+
bb0: {
|
|
28
|
+
const {
|
|
29
|
+
_isLocked,
|
|
30
|
+
_userEditing
|
|
31
|
+
} = rowData || {};
|
|
32
|
+
const documentIsLocked = _isLocked && _userEditing;
|
|
33
|
+
if (documentIsLocked && _userEditing.id !== user?.id) {
|
|
34
|
+
t1 = _jsx(Locked, {
|
|
35
|
+
user: _userEditing
|
|
36
|
+
});
|
|
37
|
+
break bb0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
27
40
|
$[0] = rowData;
|
|
28
|
-
$[1] =
|
|
41
|
+
$[1] = user?.id;
|
|
42
|
+
$[2] = t1;
|
|
29
43
|
} else {
|
|
30
|
-
t1 = $[
|
|
44
|
+
t1 = $[2];
|
|
31
45
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
_userEditing
|
|
35
|
-
} = t1;
|
|
36
|
-
const documentIsLocked = _isLocked && _userEditing;
|
|
37
|
-
if (documentIsLocked && _userEditing.id !== user?.id) {
|
|
38
|
-
let t2;
|
|
39
|
-
if ($[2] !== _userEditing) {
|
|
40
|
-
t2 = _jsx(Locked, {
|
|
41
|
-
user: _userEditing
|
|
42
|
-
});
|
|
43
|
-
$[2] = _userEditing;
|
|
44
|
-
$[3] = t2;
|
|
45
|
-
} else {
|
|
46
|
-
t2 = $[3];
|
|
47
|
-
}
|
|
48
|
-
return t2;
|
|
46
|
+
if (t1 !== Symbol.for("react.early_return_sentinel")) {
|
|
47
|
+
return t1;
|
|
49
48
|
}
|
|
50
49
|
let t2;
|
|
51
|
-
if ($[
|
|
50
|
+
if ($[3] !== rowData.id || $[4] !== selected) {
|
|
52
51
|
t2 = selected.get(rowData.id);
|
|
53
|
-
$[
|
|
54
|
-
$[
|
|
55
|
-
$[
|
|
52
|
+
$[3] = rowData.id;
|
|
53
|
+
$[4] = selected;
|
|
54
|
+
$[5] = t2;
|
|
56
55
|
} else {
|
|
57
|
-
t2 = $[
|
|
56
|
+
t2 = $[5];
|
|
58
57
|
}
|
|
59
58
|
const t3 = Boolean(t2);
|
|
60
59
|
let t4;
|
|
61
|
-
if ($[
|
|
60
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
62
61
|
t4 = [baseClass, `${baseClass}__checkbox`];
|
|
63
|
-
$[
|
|
62
|
+
$[6] = t4;
|
|
64
63
|
} else {
|
|
65
|
-
t4 = $[
|
|
64
|
+
t4 = $[6];
|
|
66
65
|
}
|
|
67
66
|
let t5;
|
|
68
|
-
if ($[
|
|
67
|
+
if ($[7] !== rowData.id || $[8] !== setSelection) {
|
|
69
68
|
t5 = () => setSelection(rowData.id);
|
|
70
|
-
$[
|
|
71
|
-
$[
|
|
72
|
-
$[
|
|
69
|
+
$[7] = rowData.id;
|
|
70
|
+
$[8] = setSelection;
|
|
71
|
+
$[9] = t5;
|
|
73
72
|
} else {
|
|
74
|
-
t5 = $[
|
|
73
|
+
t5 = $[9];
|
|
75
74
|
}
|
|
76
75
|
let t6;
|
|
77
|
-
if ($[
|
|
76
|
+
if ($[10] !== t3 || $[11] !== t5) {
|
|
78
77
|
t6 = _jsx(CheckboxInput, {
|
|
79
78
|
checked: t3,
|
|
80
79
|
className: t4.join(" "),
|
|
81
80
|
onToggle: t5
|
|
82
81
|
});
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
85
|
-
$[
|
|
82
|
+
$[10] = t3;
|
|
83
|
+
$[11] = t5;
|
|
84
|
+
$[12] = t6;
|
|
86
85
|
} else {
|
|
87
|
-
t6 = $[
|
|
86
|
+
t6 = $[12];
|
|
88
87
|
}
|
|
89
88
|
return t6;
|
|
90
89
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","React","CheckboxInput","useAuth","useSelection","Locked","baseClass","SelectRow","t0","$","rowData","user","selected","setSelection","t1","
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","React","CheckboxInput","useAuth","useSelection","Locked","baseClass","SelectRow","t0","$","rowData","user","selected","setSelection","t1","id","Symbol","for","_isLocked","_userEditing","documentIsLocked","_jsx","t2","get","t3","Boolean","t4","t5","t6","checked","className","join","onToggle"],"sources":["../../../src/elements/SelectRow/index.tsx"],"sourcesContent":["'use client'\nimport type { ClientUser } from 'payload'\n\nimport React from 'react'\n\nimport { CheckboxInput } from '../../fields/Checkbox/Input.js'\nimport { useAuth } from '../../providers/Auth/index.js'\nimport { useSelection } from '../../providers/Selection/index.js'\nimport { Locked } from '../Locked/index.js'\nimport './index.scss'\n\nconst baseClass = 'select-row'\n\nexport const SelectRow: React.FC<{\n rowData: {\n _isLocked: boolean\n _userEditing: ClientUser\n id: string\n }\n}> = ({ rowData }) => {\n const { user } = useAuth()\n const { selected, setSelection } = useSelection()\n const { _isLocked, _userEditing } = rowData || {}\n\n const documentIsLocked = _isLocked && _userEditing\n\n if (documentIsLocked && _userEditing.id !== user?.id) {\n return <Locked user={_userEditing} />\n }\n\n return (\n <CheckboxInput\n checked={Boolean(selected.get(rowData.id))}\n className={[baseClass, `${baseClass}__checkbox`].join(' ')}\n onToggle={() => setSelection(rowData.id)}\n />\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,OAAOC,KAAA,MAAW;AAElB,SAASC,aAAa,QAAQ;AAC9B,SAASC,OAAO,QAAQ;AACxB,SAASC,YAAY,QAAQ;AAC7B,SAASC,MAAM,QAAQ;AACvB,OAAO;AAEP,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,SAAA,GAMRC,EAAA;EAAA,MAAAC,CAAA,GAAAT,EAAA;EAAC;IAAAU;EAAA,IAAAF,EAAW;EACf;IAAAG;EAAA,IAAiBR,OAAA;EACjB;IAAAS,QAAA;IAAAC;EAAA,IAAmCT,YAAA;EAAA,IAAAU,EAAA;EAA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AAA2B,OAAA,EACWL,EAA+B;MAAAM,SAAA,EAC7BJ,EAAqC,CAAAK,IAAA,CAAM;MAAAC,QAAA,EAC5CL;IAA6B,C;;;;;;;SAHzCC,E;CAMJ","ignoreList":[]}
|
|
@@ -27,7 +27,7 @@ export const ShimmerEffect = ({
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
export const StaggeredShimmers = t0 => {
|
|
30
|
-
const $ = _c(
|
|
30
|
+
const $ = _c(9);
|
|
31
31
|
const {
|
|
32
32
|
className,
|
|
33
33
|
count,
|
|
@@ -45,10 +45,18 @@ export const StaggeredShimmers = t0 => {
|
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
47
47
|
let t3;
|
|
48
|
-
if ($[0] !==
|
|
49
|
-
t3 =
|
|
48
|
+
if ($[0] !== count) {
|
|
49
|
+
t3 = [...Array(count)];
|
|
50
|
+
$[0] = count;
|
|
51
|
+
$[1] = t3;
|
|
52
|
+
} else {
|
|
53
|
+
t3 = $[1];
|
|
54
|
+
}
|
|
55
|
+
let t4;
|
|
56
|
+
if ($[2] !== className || $[3] !== height || $[4] !== shimmerDelayToPass || $[5] !== shimmerItemClassName || $[6] !== t3 || $[7] !== width) {
|
|
57
|
+
t4 = _jsx("div", {
|
|
50
58
|
className,
|
|
51
|
-
children:
|
|
59
|
+
children: t3.map((_, i) => _jsx("div", {
|
|
52
60
|
className: shimmerItemClassName,
|
|
53
61
|
children: _jsx(ShimmerEffect, {
|
|
54
62
|
animationDelay: `calc(${i} * ${shimmerDelayToPass})`,
|
|
@@ -57,16 +65,16 @@ export const StaggeredShimmers = t0 => {
|
|
|
57
65
|
})
|
|
58
66
|
}, i))
|
|
59
67
|
});
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
62
|
-
$[
|
|
63
|
-
$[
|
|
64
|
-
$[4] = shimmerItemClassName;
|
|
65
|
-
$[5] = width;
|
|
68
|
+
$[2] = className;
|
|
69
|
+
$[3] = height;
|
|
70
|
+
$[4] = shimmerDelayToPass;
|
|
71
|
+
$[5] = shimmerItemClassName;
|
|
66
72
|
$[6] = t3;
|
|
73
|
+
$[7] = width;
|
|
74
|
+
$[8] = t4;
|
|
67
75
|
} else {
|
|
68
|
-
|
|
76
|
+
t4 = $[8];
|
|
69
77
|
}
|
|
70
|
-
return
|
|
78
|
+
return t4;
|
|
71
79
|
};
|
|
72
80
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","React","useDelay","ShimmerEffect","animationDelay","className","disableInlineStyles","height","width","_jsx","filter","Boolean","join","style","StaggeredShimmers","t0","$","count","renderDelay","t1","shimmerDelay","t2","shimmerItemClassName","undefined","shimmerDelayToPass","hasDelayed","t3","
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","React","useDelay","ShimmerEffect","animationDelay","className","disableInlineStyles","height","width","_jsx","filter","Boolean","join","style","StaggeredShimmers","t0","$","count","renderDelay","t1","shimmerDelay","t2","shimmerItemClassName","undefined","shimmerDelayToPass","hasDelayed","t3","Array","t4","children","map","_","i"],"sources":["../../../src/elements/ShimmerEffect/index.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport { useDelay } from '../../hooks/useDelay.js'\nimport './index.scss'\n\nexport type ShimmerEffectProps = {\n readonly animationDelay?: string\n readonly className?: string\n readonly disableInlineStyles?: boolean\n readonly height?: number | string\n readonly width?: number | string\n}\n\nexport const ShimmerEffect: React.FC<ShimmerEffectProps> = ({\n animationDelay = '0ms',\n className,\n disableInlineStyles = false,\n height = '60px',\n width = '100%',\n}) => {\n return (\n <div\n className={['shimmer-effect', className].filter(Boolean).join(' ')}\n style={{\n height: !disableInlineStyles && (typeof height === 'number' ? `${height}px` : height),\n width: !disableInlineStyles && (typeof width === 'number' ? `${width}px` : width),\n }}\n >\n <div\n className=\"shimmer-effect__shine\"\n style={{\n animationDelay,\n }}\n />\n </div>\n )\n}\n\nexport type StaggeredShimmersProps = {\n className?: string\n count: number\n height?: number | string\n renderDelay?: number\n shimmerDelay?: number | string\n shimmerItemClassName?: string\n width?: number | string\n}\n\nexport const StaggeredShimmers: React.FC<StaggeredShimmersProps> = ({\n className,\n count,\n height,\n renderDelay = 500,\n shimmerDelay = 25,\n shimmerItemClassName,\n width,\n}) => {\n const shimmerDelayToPass = typeof shimmerDelay === 'number' ? `${shimmerDelay}ms` : shimmerDelay\n const [hasDelayed] = useDelay(renderDelay, true)\n\n if (!hasDelayed) {\n return null\n }\n\n return (\n <div className={className}>\n {[...Array(count)].map((_, i) => (\n <div className={shimmerItemClassName} key={i}>\n <ShimmerEffect\n animationDelay={`calc(${i} * ${shimmerDelayToPass})`}\n height={height}\n width={width}\n />\n </div>\n ))}\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AACA,YAAYC,KAAA,MAAW;AAEvB,SAASC,QAAQ,QAAQ;AACzB,OAAO;AAUP,OAAO,MAAMC,aAAA,GAA8CA,CAAC;EAC1DC,cAAA,GAAiB,KAAK;EACtBC,SAAS;EACTC,mBAAA,GAAsB,KAAK;EAC3BC,MAAA,GAAS,MAAM;EACfC,KAAA,GAAQ;AAAM,CACf;EACC,oBACEC,IAAA,CAAC;IACCJ,SAAA,EAAW,CAAC,kBAAkBA,SAAA,CAAU,CAACK,MAAM,CAACC,OAAA,EAASC,IAAI,CAAC;IAC9DC,KAAA,EAAO;MACLN,MAAA,EAAQ,CAACD,mBAAA,KAAwB,OAAOC,MAAA,KAAW,WAAW,GAAGA,MAAA,IAAU,GAAGA,MAAK;MACnFC,KAAA,EAAO,CAACF,mBAAA,KAAwB,OAAOE,KAAA,KAAU,WAAW,GAAGA,KAAA,IAAS,GAAGA,KAAI;IACjF;cAEA,aAAAC,IAAA,CAAC;MACCJ,SAAA,EAAU;MACVQ,KAAA,EAAO;QACLT;MACF;;;AAIR;AAYA,OAAO,MAAMU,iBAAA,GAAsDC,EAAA;EAAA,MAAAC,CAAA,GAAAhB,E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
|
|
|
10
10
|
import './index.scss';
|
|
11
11
|
const baseClass = 'sort-column';
|
|
12
12
|
export const SortColumn = props => {
|
|
13
|
-
const $ = _c(
|
|
13
|
+
const $ = _c(19);
|
|
14
14
|
const {
|
|
15
15
|
name,
|
|
16
16
|
appearance,
|
|
@@ -66,25 +66,16 @@ export const SortColumn = props => {
|
|
|
66
66
|
}
|
|
67
67
|
const t3 = t2.join(" ");
|
|
68
68
|
let t4;
|
|
69
|
-
if ($[8] !== Label || $[9] !== label) {
|
|
70
|
-
t4 =
|
|
71
|
-
hideLocale: true,
|
|
72
|
-
label,
|
|
73
|
-
unstyled: true
|
|
74
|
-
});
|
|
75
|
-
$[8] = Label;
|
|
76
|
-
$[9] = label;
|
|
77
|
-
$[10] = t4;
|
|
78
|
-
} else {
|
|
79
|
-
t4 = $[10];
|
|
80
|
-
}
|
|
81
|
-
let t5;
|
|
82
|
-
if ($[11] !== asc || $[12] !== ascClasses || $[13] !== desc || $[14] !== descClasses || $[15] !== disable || $[16] !== handleSortChange || $[17] !== label || $[18] !== t || $[19] !== t3 || $[20] !== t4) {
|
|
83
|
-
t5 = _jsxs("div", {
|
|
69
|
+
if ($[8] !== Label || $[9] !== asc || $[10] !== ascClasses || $[11] !== desc || $[12] !== descClasses || $[13] !== disable || $[14] !== handleSortChange || $[15] !== label || $[16] !== t || $[17] !== t3) {
|
|
70
|
+
t4 = _jsxs("div", {
|
|
84
71
|
className: t3,
|
|
85
72
|
children: [_jsx("span", {
|
|
86
73
|
className: `${baseClass}__label`,
|
|
87
|
-
children:
|
|
74
|
+
children: Label ?? _jsx(FieldLabel, {
|
|
75
|
+
hideLocale: true,
|
|
76
|
+
label,
|
|
77
|
+
unstyled: true
|
|
78
|
+
})
|
|
88
79
|
}), !disable && _jsxs("div", {
|
|
89
80
|
className: `${baseClass}__buttons`,
|
|
90
81
|
children: [_jsx("button", {
|
|
@@ -110,20 +101,20 @@ export const SortColumn = props => {
|
|
|
110
101
|
})]
|
|
111
102
|
})]
|
|
112
103
|
});
|
|
113
|
-
$[
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
104
|
+
$[8] = Label;
|
|
105
|
+
$[9] = asc;
|
|
106
|
+
$[10] = ascClasses;
|
|
107
|
+
$[11] = desc;
|
|
108
|
+
$[12] = descClasses;
|
|
109
|
+
$[13] = disable;
|
|
110
|
+
$[14] = handleSortChange;
|
|
111
|
+
$[15] = label;
|
|
112
|
+
$[16] = t;
|
|
113
|
+
$[17] = t3;
|
|
114
|
+
$[18] = t4;
|
|
124
115
|
} else {
|
|
125
|
-
|
|
116
|
+
t4 = $[18];
|
|
126
117
|
}
|
|
127
|
-
return
|
|
118
|
+
return t4;
|
|
128
119
|
};
|
|
129
120
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","React","FieldLabel","ChevronIcon","useListQuery","useTranslation","baseClass","SortColumn","props","$","name","appearance","disable","t0","Label","label","undefined","handleSortChange","query","t","sort","desc","asc","ascClasses","push","descClasses","t1","t2","filter","Boolean","t3","join","t4","
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","React","FieldLabel","ChevronIcon","useListQuery","useTranslation","baseClass","SortColumn","props","$","name","appearance","disable","t0","Label","label","undefined","handleSortChange","query","t","sort","desc","asc","ascClasses","push","descClasses","t1","t2","filter","Boolean","t3","join","t4","_jsxs","className","children","_jsx","hideLocale","unstyled","direction","onClick","type"],"sources":["../../../src/elements/SortColumn/index.tsx"],"sourcesContent":["'use client'\nimport type { StaticLabel } from 'payload'\n\nimport React from 'react'\n\nimport { FieldLabel } from '../../fields/FieldLabel/index.js'\nimport { ChevronIcon } from '../../icons/Chevron/index.js'\nimport { useListQuery } from '../../providers/ListQuery/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport './index.scss'\n\nexport type SortColumnProps = {\n readonly appearance?: 'condensed' | 'default'\n readonly disable?: boolean\n readonly Label: React.ReactNode\n readonly label?: StaticLabel\n readonly name: string\n}\n\nconst baseClass = 'sort-column'\n\nexport const SortColumn: React.FC<SortColumnProps> = (props) => {\n const { name, appearance, disable = false, Label, label } = props\n const { handleSortChange, query } = useListQuery()\n const { t } = useTranslation()\n\n const { sort } = query\n\n const desc = `-${name}`\n const asc = name\n\n const ascClasses = [`${baseClass}__asc`]\n if (sort === asc) {\n ascClasses.push(`${baseClass}--active`)\n }\n\n const descClasses = [`${baseClass}__desc`]\n if (sort === desc) {\n descClasses.push(`${baseClass}--active`)\n }\n\n return (\n <div\n className={[baseClass, appearance && `${baseClass}--appearance-${appearance}`]\n .filter(Boolean)\n .join(' ')}\n >\n <span className={`${baseClass}__label`}>\n {Label ?? <FieldLabel hideLocale label={label} unstyled />}\n </span>\n {!disable && (\n <div className={`${baseClass}__buttons`}>\n <button\n aria-label={t('general:sortByLabelDirection', {\n direction: t('general:ascending'),\n label,\n })}\n className={[...ascClasses, `${baseClass}__button`].filter(Boolean).join(' ')}\n onClick={() => void handleSortChange(asc)}\n type=\"button\"\n >\n <ChevronIcon direction=\"up\" />\n </button>\n <button\n aria-label={t('general:sortByLabelDirection', {\n direction: t('general:descending'),\n label,\n })}\n className={[...descClasses, `${baseClass}__button`].filter(Boolean).join(' ')}\n onClick={() => void handleSortChange(desc)}\n type=\"button\"\n >\n <ChevronIcon />\n </button>\n </div>\n )}\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,OAAOC,KAAA,MAAW;AAElB,SAASC,UAAU,QAAQ;AAC3B,SAASC,WAAW,QAAQ;AAC5B,SAASC,YAAY,QAAQ;AAC7B,SAASC,cAAc,QAAQ;AAC/B,OAAO;AAUP,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,UAAA,GAAwCC,KAAA;EA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