@questpie/admin 3.0.4 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +99 -1
- package/dist/client/builder/types/field-types.d.mts +11 -0
- package/dist/client/components/blocks/block-editor-layout.mjs +2 -2
- package/dist/client/components/blocks/block-library-sidebar.mjs +89 -61
- package/dist/client/components/brand-logo.d.mts +25 -0
- package/dist/client/components/brand-logo.mjs +174 -0
- package/dist/client/components/media/media-grid.mjs +95 -78
- package/dist/client/components/primitives/select-multi.mjs +388 -368
- package/dist/client/components/primitives/select-single.mjs +344 -331
- package/dist/client/components/widgets/chart-widget.mjs +78 -62
- package/dist/client/components/widgets/progress-widget.mjs +39 -37
- package/dist/client/components/widgets/quick-actions-widget.mjs +111 -90
- package/dist/client/components/widgets/recent-items-widget.mjs +40 -38
- package/dist/client/components/widgets/table-widget.mjs +4 -3
- package/dist/client/components/widgets/timeline-widget.mjs +92 -74
- package/dist/client/components/widgets/value-widget.mjs +164 -144
- package/dist/client/create-admin-client.d.mts +7 -0
- package/dist/client/create-admin-client.mjs +25 -0
- package/dist/client/hooks/use-brand.d.mts +22 -0
- package/dist/client/hooks/use-brand.mjs +52 -0
- package/dist/client/hooks/use-server-actions.mjs +21 -16
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/preview-banner.d.mts +2 -2
- package/dist/client/preview/preview-banner.mjs +75 -46
- package/dist/client/runtime/index.mjs +1 -1
- package/dist/client/runtime/provider.d.mts +4 -0
- package/dist/client/runtime/provider.mjs +38 -8
- package/dist/client/styles/base.css +4 -0
- package/dist/client/types/admin-config.d.mts +24 -0
- package/dist/client/views/auth/auth-layout.d.mts +6 -1
- package/dist/client/views/auth/auth-layout.mjs +116 -102
- package/dist/client/views/collection/auto-form-fields.mjs +2 -0
- package/dist/client/views/collection/field-renderer.mjs +3 -2
- package/dist/client/views/collection/table-view.mjs +26 -26
- package/dist/client/views/globals/global-form-view.mjs +908 -863
- package/dist/client/views/layout/admin-layout.mjs +151 -131
- package/dist/client/views/layout/admin-router.mjs +297 -180
- package/dist/client/views/layout/admin-sidebar.mjs +178 -156
- package/dist/client/views/pages/accept-invite-page.mjs +122 -144
- package/dist/client/views/pages/forgot-password-page.mjs +22 -30
- package/dist/client/views/pages/invite-page.mjs +24 -33
- package/dist/client/views/pages/login-page.mjs +24 -32
- package/dist/client/views/pages/reset-password-page.mjs +77 -92
- package/dist/client/views/pages/setup-page.mjs +73 -65
- package/dist/client.d.mts +6 -2
- package/dist/client.mjs +5 -2
- package/dist/index.d.mts +6 -2
- package/dist/index.mjs +5 -2
- package/dist/server/augmentation/dashboard.d.mts +23 -5
- package/dist/server/augmentation/form-layout.d.mts +10 -0
- package/dist/server/augmentation/index.d.mts +1 -1
- package/dist/server/augmentation.d.mts +1 -1
- package/dist/server/i18n/index.mjs +13 -7
- package/dist/server/i18n/messages/cs.mjs +391 -1
- package/dist/server/i18n/messages/de.mjs +389 -1
- package/dist/server/i18n/messages/en.mjs +102 -0
- package/dist/server/i18n/messages/es.mjs +389 -1
- package/dist/server/i18n/messages/fr.mjs +389 -1
- package/dist/server/i18n/messages/pl.mjs +393 -1
- package/dist/server/i18n/messages/pt.mjs +386 -1
- package/dist/server/i18n/messages/sk.mjs +133 -1
- package/dist/server/modules/admin/collections/account.d.mts +50 -50
- package/dist/server/modules/admin/collections/admin-locks.d.mts +53 -53
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
- package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
- package/dist/server/modules/admin/collections/assets.d.mts +20 -20
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +32 -32
- package/dist/server/modules/admin/collections/verification.d.mts +36 -36
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +19 -1
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/execute-action.mjs +34 -28
- package/dist/server/modules/admin/routes/i18n-helpers.mjs +34 -0
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/preview.mjs +25 -17
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/route-helpers.mjs +1 -1
- package/dist/server/modules/admin/routes/setup.mjs +10 -7
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +23 -23
- package/dist/server.d.mts +4 -4
- package/dist/shared/preview-utils.d.mts +34 -1
- package/dist/shared/preview-utils.mjs +79 -1
- package/dist/shared.d.mts +2 -2
- package/dist/shared.mjs +2 -2
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useResolveText } from "../../i18n/hooks.mjs";
|
|
1
|
+
import { useResolveText, useTranslation } from "../../i18n/hooks.mjs";
|
|
2
2
|
import { formatLabel } from "../../lib/utils.mjs";
|
|
3
3
|
import { useCollectionList } from "../../hooks/use-collection.mjs";
|
|
4
4
|
import { WidgetCard } from "../../views/dashboard/widget-card.mjs";
|
|
@@ -75,9 +75,10 @@ function _temp(entry) {
|
|
|
75
75
|
}, String(entry.name));
|
|
76
76
|
}
|
|
77
77
|
function ChartWidget(t0) {
|
|
78
|
-
const $ = c(
|
|
78
|
+
const $ = c(56);
|
|
79
79
|
const { config } = t0;
|
|
80
80
|
const resolveText = useResolveText();
|
|
81
|
+
const { t } = useTranslation();
|
|
81
82
|
const { collection, field, chartType: t1, timeRange: t2, label, color: t3, showGrid: t4, realtime, hasLoader, refreshInterval } = config;
|
|
82
83
|
const chartType = t1 === void 0 ? "area" : t1;
|
|
83
84
|
const timeRange = t2 === void 0 ? "30d" : t2;
|
|
@@ -188,19 +189,33 @@ function ChartWidget(t0) {
|
|
|
188
189
|
}
|
|
189
190
|
const chartData = t13;
|
|
190
191
|
let t14;
|
|
191
|
-
if ($[24]
|
|
192
|
-
t14 =
|
|
192
|
+
if ($[24] !== t) {
|
|
193
|
+
t14 = t("widget.chart.emptyTitle");
|
|
194
|
+
$[24] = t;
|
|
195
|
+
$[25] = t14;
|
|
196
|
+
} else t14 = $[25];
|
|
197
|
+
let t15;
|
|
198
|
+
if ($[26] !== t) {
|
|
199
|
+
t15 = t("widget.chart.emptyDescription");
|
|
200
|
+
$[26] = t;
|
|
201
|
+
$[27] = t15;
|
|
202
|
+
} else t15 = $[27];
|
|
203
|
+
let t16;
|
|
204
|
+
if ($[28] !== t14 || $[29] !== t15) {
|
|
205
|
+
t16 = /* @__PURE__ */ jsx(WidgetEmptyState, {
|
|
193
206
|
iconName: "ph:chart-line",
|
|
194
|
-
title:
|
|
195
|
-
description:
|
|
207
|
+
title: t14,
|
|
208
|
+
description: t15,
|
|
196
209
|
className: "min-h-48"
|
|
197
210
|
});
|
|
198
|
-
$[
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
211
|
+
$[28] = t14;
|
|
212
|
+
$[29] = t15;
|
|
213
|
+
$[30] = t16;
|
|
214
|
+
} else t16 = $[30];
|
|
215
|
+
const emptyContent = t16;
|
|
216
|
+
let t17;
|
|
217
|
+
if ($[31] !== chartData || $[32] !== chartType || $[33] !== color || $[34] !== emptyContent || $[35] !== showGrid) {
|
|
218
|
+
t17 = chartData.length === 0 ? emptyContent : /* @__PURE__ */ jsx("div", {
|
|
204
219
|
className: "h-48 w-full",
|
|
205
220
|
children: /* @__PURE__ */ jsx(ResponsiveContainer, {
|
|
206
221
|
width: "100%",
|
|
@@ -213,66 +228,67 @@ function ChartWidget(t0) {
|
|
|
213
228
|
})
|
|
214
229
|
})
|
|
215
230
|
});
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
if ($[30] !== config.description || $[31] !== resolveText) {
|
|
225
|
-
t16 = config.description ? resolveText(config.description) : void 0;
|
|
226
|
-
$[30] = config.description;
|
|
227
|
-
$[31] = resolveText;
|
|
228
|
-
$[32] = t16;
|
|
229
|
-
} else t16 = $[32];
|
|
230
|
-
const t17 = isFetching && !isLoading;
|
|
231
|
+
$[31] = chartData;
|
|
232
|
+
$[32] = chartType;
|
|
233
|
+
$[33] = color;
|
|
234
|
+
$[34] = emptyContent;
|
|
235
|
+
$[35] = showGrid;
|
|
236
|
+
$[36] = t17;
|
|
237
|
+
} else t17 = $[36];
|
|
238
|
+
const chartContent = t17;
|
|
231
239
|
let t18;
|
|
232
|
-
if ($[
|
|
233
|
-
t18 =
|
|
234
|
-
$[
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
$[34] = error;
|
|
240
|
-
$[35] = t19;
|
|
241
|
-
} else t19 = $[35];
|
|
240
|
+
if ($[37] !== config.description || $[38] !== resolveText) {
|
|
241
|
+
t18 = config.description ? resolveText(config.description) : void 0;
|
|
242
|
+
$[37] = config.description;
|
|
243
|
+
$[38] = resolveText;
|
|
244
|
+
$[39] = t18;
|
|
245
|
+
} else t18 = $[39];
|
|
246
|
+
const t19 = isFetching && !isLoading;
|
|
242
247
|
let t20;
|
|
243
|
-
if ($[
|
|
244
|
-
t20 =
|
|
245
|
-
$[
|
|
246
|
-
|
|
247
|
-
} else t20 = $[37];
|
|
248
|
+
if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
|
|
249
|
+
t20 = /* @__PURE__ */ jsx(ChartWidgetSkeleton, {});
|
|
250
|
+
$[40] = t20;
|
|
251
|
+
} else t20 = $[40];
|
|
248
252
|
let t21;
|
|
249
|
-
if ($[
|
|
250
|
-
t21 =
|
|
253
|
+
if ($[41] !== error) {
|
|
254
|
+
t21 = error instanceof Error ? error : error ? new Error(String(error)) : null;
|
|
255
|
+
$[41] = error;
|
|
256
|
+
$[42] = t21;
|
|
257
|
+
} else t21 = $[42];
|
|
258
|
+
let t22;
|
|
259
|
+
if ($[43] !== refetch) {
|
|
260
|
+
t22 = () => refetch();
|
|
261
|
+
$[43] = refetch;
|
|
262
|
+
$[44] = t22;
|
|
263
|
+
} else t22 = $[44];
|
|
264
|
+
let t23;
|
|
265
|
+
if ($[45] !== chartContent || $[46] !== config.actions || $[47] !== config.cardVariant || $[48] !== config.className || $[49] !== displayLabel || $[50] !== isLoading || $[51] !== t18 || $[52] !== t19 || $[53] !== t21 || $[54] !== t22) {
|
|
266
|
+
t23 = /* @__PURE__ */ jsx(WidgetCard, {
|
|
251
267
|
title: displayLabel,
|
|
252
|
-
description:
|
|
268
|
+
description: t18,
|
|
253
269
|
variant: config.cardVariant,
|
|
254
270
|
isLoading,
|
|
255
|
-
isRefreshing:
|
|
256
|
-
loadingSkeleton:
|
|
257
|
-
error:
|
|
258
|
-
onRefresh:
|
|
271
|
+
isRefreshing: t19,
|
|
272
|
+
loadingSkeleton: t20,
|
|
273
|
+
error: t21,
|
|
274
|
+
onRefresh: t22,
|
|
259
275
|
actions: config.actions,
|
|
260
276
|
className: config.className,
|
|
261
277
|
children: chartContent
|
|
262
278
|
});
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
269
|
-
$[
|
|
270
|
-
$[
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
} else
|
|
275
|
-
return
|
|
279
|
+
$[45] = chartContent;
|
|
280
|
+
$[46] = config.actions;
|
|
281
|
+
$[47] = config.cardVariant;
|
|
282
|
+
$[48] = config.className;
|
|
283
|
+
$[49] = displayLabel;
|
|
284
|
+
$[50] = isLoading;
|
|
285
|
+
$[51] = t18;
|
|
286
|
+
$[52] = t19;
|
|
287
|
+
$[53] = t21;
|
|
288
|
+
$[54] = t22;
|
|
289
|
+
$[55] = t23;
|
|
290
|
+
} else t23 = $[55];
|
|
291
|
+
return t23;
|
|
276
292
|
}
|
|
277
293
|
/**
|
|
278
294
|
* Renders the appropriate chart type as a proper component
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useResolveText } from "../../i18n/hooks.mjs";
|
|
1
|
+
import { useResolveText, useTranslation } from "../../i18n/hooks.mjs";
|
|
2
2
|
import { cn } from "../../lib/utils.mjs";
|
|
3
3
|
import { selectClient, useAdminStore } from "../../runtime/provider.mjs";
|
|
4
4
|
import { WidgetCard } from "../../views/dashboard/widget-card.mjs";
|
|
@@ -39,10 +39,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
41
|
function ProgressWidget(t0) {
|
|
42
|
-
const $ = c(
|
|
42
|
+
const $ = c(48);
|
|
43
43
|
const { config } = t0;
|
|
44
44
|
const client = useAdminStore(selectClient);
|
|
45
45
|
const resolveText = useResolveText();
|
|
46
|
+
const { t } = useTranslation();
|
|
46
47
|
const { color, showPercentage: t1 } = config;
|
|
47
48
|
const showPercentage = t1 === void 0 ? true : t1;
|
|
48
49
|
const useServerData = !!config.hasLoader;
|
|
@@ -122,7 +123,7 @@ function ProgressWidget(t0) {
|
|
|
122
123
|
} else t9 = $[20];
|
|
123
124
|
const getProgressColor = t9;
|
|
124
125
|
let t10;
|
|
125
|
-
if ($[21] !== data || $[22] !== getProgressColor || $[23] !== percentage || $[24] !== percentageFormatted || $[25] !== showPercentage) {
|
|
126
|
+
if ($[21] !== data || $[22] !== getProgressColor || $[23] !== percentage || $[24] !== percentageFormatted || $[25] !== showPercentage || $[26] !== t) {
|
|
126
127
|
t10 = data ? /* @__PURE__ */ jsxs("div", {
|
|
127
128
|
className: "space-y-3",
|
|
128
129
|
children: [
|
|
@@ -153,44 +154,45 @@ function ProgressWidget(t0) {
|
|
|
153
154
|
]
|
|
154
155
|
}) : /* @__PURE__ */ jsx(WidgetEmptyState, {
|
|
155
156
|
iconName: "ph:target",
|
|
156
|
-
title: "
|
|
157
|
-
description: "
|
|
157
|
+
title: t("widget.progress.emptyTitle"),
|
|
158
|
+
description: t("widget.progress.emptyDescription")
|
|
158
159
|
});
|
|
159
160
|
$[21] = data;
|
|
160
161
|
$[22] = getProgressColor;
|
|
161
162
|
$[23] = percentage;
|
|
162
163
|
$[24] = percentageFormatted;
|
|
163
164
|
$[25] = showPercentage;
|
|
164
|
-
$[26] =
|
|
165
|
-
|
|
165
|
+
$[26] = t;
|
|
166
|
+
$[27] = t10;
|
|
167
|
+
} else t10 = $[27];
|
|
166
168
|
const progressContent = t10;
|
|
167
169
|
let t11;
|
|
168
|
-
if ($[
|
|
170
|
+
if ($[28] !== config.description || $[29] !== resolveText) {
|
|
169
171
|
t11 = config.description ? resolveText(config.description) : void 0;
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
} else t11 = $[
|
|
172
|
+
$[28] = config.description;
|
|
173
|
+
$[29] = resolveText;
|
|
174
|
+
$[30] = t11;
|
|
175
|
+
} else t11 = $[30];
|
|
174
176
|
const t12 = isFetching && !isLoading;
|
|
175
177
|
let t13;
|
|
176
|
-
if ($[
|
|
178
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
177
179
|
t13 = /* @__PURE__ */ jsx(ProgressWidgetSkeleton, {});
|
|
178
|
-
$[
|
|
179
|
-
} else t13 = $[
|
|
180
|
+
$[31] = t13;
|
|
181
|
+
} else t13 = $[31];
|
|
180
182
|
let t14;
|
|
181
|
-
if ($[
|
|
183
|
+
if ($[32] !== error) {
|
|
182
184
|
t14 = error instanceof Error ? error : error ? new Error(String(error)) : null;
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
185
|
-
} else t14 = $[
|
|
185
|
+
$[32] = error;
|
|
186
|
+
$[33] = t14;
|
|
187
|
+
} else t14 = $[33];
|
|
186
188
|
let t15;
|
|
187
|
-
if ($[
|
|
189
|
+
if ($[34] !== refetch) {
|
|
188
190
|
t15 = () => refetch();
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
191
|
-
} else t15 = $[
|
|
191
|
+
$[34] = refetch;
|
|
192
|
+
$[35] = t15;
|
|
193
|
+
} else t15 = $[35];
|
|
192
194
|
let t16;
|
|
193
|
-
if ($[
|
|
195
|
+
if ($[36] !== config.actions || $[37] !== config.cardVariant || $[38] !== config.className || $[39] !== config.icon || $[40] !== isLoading || $[41] !== progressContent || $[42] !== t11 || $[43] !== t12 || $[44] !== t14 || $[45] !== t15 || $[46] !== title) {
|
|
194
196
|
t16 = /* @__PURE__ */ jsx(WidgetCard, {
|
|
195
197
|
title,
|
|
196
198
|
description: t11,
|
|
@@ -205,19 +207,19 @@ function ProgressWidget(t0) {
|
|
|
205
207
|
className: config.className,
|
|
206
208
|
children: progressContent
|
|
207
209
|
});
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
} else t16 = $[
|
|
210
|
+
$[36] = config.actions;
|
|
211
|
+
$[37] = config.cardVariant;
|
|
212
|
+
$[38] = config.className;
|
|
213
|
+
$[39] = config.icon;
|
|
214
|
+
$[40] = isLoading;
|
|
215
|
+
$[41] = progressContent;
|
|
216
|
+
$[42] = t11;
|
|
217
|
+
$[43] = t12;
|
|
218
|
+
$[44] = t14;
|
|
219
|
+
$[45] = t15;
|
|
220
|
+
$[46] = title;
|
|
221
|
+
$[47] = t16;
|
|
222
|
+
} else t16 = $[47];
|
|
221
223
|
return t16;
|
|
222
224
|
}
|
|
223
225
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useResolveText } from "../../i18n/hooks.mjs";
|
|
1
|
+
import { useResolveText, useTranslation } from "../../i18n/hooks.mjs";
|
|
2
2
|
import { cn, formatLabel } from "../../lib/utils.mjs";
|
|
3
3
|
import { resolveIconElement } from "../component-renderer.mjs";
|
|
4
4
|
import { WidgetCard } from "../../views/dashboard/widget-card.mjs";
|
|
@@ -21,10 +21,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
21
21
|
* of other dashboard widgets like recent-items.
|
|
22
22
|
*/
|
|
23
23
|
function QuickActionsWidget(t0) {
|
|
24
|
-
const $ = c(
|
|
24
|
+
const $ = c(66);
|
|
25
25
|
const { config, basePath: t1, navigate } = t0;
|
|
26
26
|
const basePath = t1 === void 0 ? "/admin" : t1;
|
|
27
27
|
const resolveText = useResolveText();
|
|
28
|
+
const { t } = useTranslation();
|
|
28
29
|
const { layout: t2 } = config;
|
|
29
30
|
const layout = t2 === void 0 ? "list" : t2;
|
|
30
31
|
let T0;
|
|
@@ -35,39 +36,40 @@ function QuickActionsWidget(t0) {
|
|
|
35
36
|
let t7;
|
|
36
37
|
let t8;
|
|
37
38
|
let t9;
|
|
38
|
-
if ($[0] !== basePath || $[1] !== config.actions || $[2] !== config.cardVariant || $[3] !== config.className || $[4] !== config.description || $[5] !== config.label || $[6] !== config.quickActions || $[7] !== config.title || $[8] !== layout || $[9] !== navigate || $[10] !== resolveText) {
|
|
39
|
+
if ($[0] !== basePath || $[1] !== config.actions || $[2] !== config.cardVariant || $[3] !== config.className || $[4] !== config.description || $[5] !== config.label || $[6] !== config.quickActions || $[7] !== config.title || $[8] !== layout || $[9] !== navigate || $[10] !== resolveText || $[11] !== t) {
|
|
39
40
|
t9 = Symbol.for("react.early_return_sentinel");
|
|
40
41
|
bb0: {
|
|
41
42
|
const quickActions = config.quickActions ?? config.actions ?? [];
|
|
42
43
|
let t10$1;
|
|
43
|
-
if ($[
|
|
44
|
-
t10$1 = config.title ? resolveText(config.title) : config.label ? resolveText(config.label) : "
|
|
45
|
-
$[
|
|
46
|
-
$[
|
|
47
|
-
$[
|
|
48
|
-
$[
|
|
49
|
-
|
|
44
|
+
if ($[20] !== config.label || $[21] !== config.title || $[22] !== resolveText || $[23] !== t) {
|
|
45
|
+
t10$1 = config.title ? resolveText(config.title) : config.label ? resolveText(config.label) : t("dashboard.quickActions");
|
|
46
|
+
$[20] = config.label;
|
|
47
|
+
$[21] = config.title;
|
|
48
|
+
$[22] = resolveText;
|
|
49
|
+
$[23] = t;
|
|
50
|
+
$[24] = t10$1;
|
|
51
|
+
} else t10$1 = $[24];
|
|
50
52
|
const title = t10$1;
|
|
51
53
|
let t11$1;
|
|
52
|
-
if ($[
|
|
54
|
+
if ($[25] !== basePath) {
|
|
53
55
|
t11$1 = (action, fallback) => {
|
|
54
56
|
if (!action) return fallback;
|
|
55
57
|
if (action.type === "create") return `${basePath}/collections/${action.collection}/create`;
|
|
56
58
|
if (action.type === "page") return `${basePath}/${action.pageId}`;
|
|
57
59
|
return action.href;
|
|
58
60
|
};
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
} else t11$1 = $[
|
|
61
|
+
$[25] = basePath;
|
|
62
|
+
$[26] = t11$1;
|
|
63
|
+
} else t11$1 = $[26];
|
|
62
64
|
const resolveActionHref = t11$1;
|
|
63
65
|
let t12;
|
|
64
|
-
if ($[
|
|
66
|
+
if ($[27] !== basePath || $[28] !== resolveActionHref || $[29] !== resolveText || $[30] !== t) {
|
|
65
67
|
t12 = (action_0, index) => {
|
|
66
68
|
if (typeof action_0 === "string") {
|
|
67
69
|
const [collection, actionType] = action_0.split(".");
|
|
68
70
|
return {
|
|
69
71
|
id: `${action_0}-${index}`,
|
|
70
|
-
label:
|
|
72
|
+
label: actionType === "create" ? t("collection.new", { name: formatLabel(collection) }) : `${actionType} ${formatLabel(collection)}`,
|
|
71
73
|
href: `${basePath}/collections/${collection}/${actionType === "create" ? "create" : ""}`,
|
|
72
74
|
icon: void 0,
|
|
73
75
|
variant: "default"
|
|
@@ -84,22 +86,23 @@ function QuickActionsWidget(t0) {
|
|
|
84
86
|
variant: action_0.variant || "default"
|
|
85
87
|
};
|
|
86
88
|
};
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
|
|
89
|
+
$[27] = basePath;
|
|
90
|
+
$[28] = resolveActionHref;
|
|
91
|
+
$[29] = resolveText;
|
|
92
|
+
$[30] = t;
|
|
93
|
+
$[31] = t12;
|
|
94
|
+
} else t12 = $[31];
|
|
92
95
|
const parsedActions = quickActions.map(t12);
|
|
93
96
|
let t13;
|
|
94
|
-
if ($[
|
|
97
|
+
if ($[32] !== navigate) {
|
|
95
98
|
t13 = (action_1) => {
|
|
96
99
|
if (action_1.onClick) action_1.onClick();
|
|
97
100
|
else if (action_1.href && action_1.external) window.open(action_1.href, "_blank", "noopener,noreferrer");
|
|
98
101
|
else if (action_1.href && navigate) navigate(action_1.href);
|
|
99
102
|
};
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
} else t13 = $[
|
|
103
|
+
$[32] = navigate;
|
|
104
|
+
$[33] = t13;
|
|
105
|
+
} else t13 = $[33];
|
|
103
106
|
const handleClick = t13;
|
|
104
107
|
const variantStyles = {
|
|
105
108
|
default: "border-border-subtle bg-surface-low/60 hover:border-border hover:bg-surface-high cursor-pointer",
|
|
@@ -115,47 +118,64 @@ function QuickActionsWidget(t0) {
|
|
|
115
118
|
};
|
|
116
119
|
if (parsedActions.length === 0) {
|
|
117
120
|
let t14;
|
|
118
|
-
if ($[
|
|
121
|
+
if ($[34] !== config.description || $[35] !== resolveText) {
|
|
119
122
|
t14 = config.description ? resolveText(config.description) : void 0;
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
} else t14 = $[
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
$[34] = config.description;
|
|
124
|
+
$[35] = resolveText;
|
|
125
|
+
$[36] = t14;
|
|
126
|
+
} else t14 = $[36];
|
|
127
|
+
const t15 = config.cardVariant;
|
|
128
|
+
const t16 = config.className;
|
|
129
|
+
let t17;
|
|
130
|
+
if ($[37] !== t) {
|
|
131
|
+
t17 = t("widget.quickActions.emptyTitle");
|
|
132
|
+
$[37] = t;
|
|
133
|
+
$[38] = t17;
|
|
134
|
+
} else t17 = $[38];
|
|
135
|
+
let t18;
|
|
136
|
+
if ($[39] !== t) {
|
|
137
|
+
t18 = t("widget.quickActions.emptyDescription");
|
|
138
|
+
$[39] = t;
|
|
139
|
+
$[40] = t18;
|
|
140
|
+
} else t18 = $[40];
|
|
141
|
+
let t19;
|
|
142
|
+
if ($[41] !== t17 || $[42] !== t18) {
|
|
143
|
+
t19 = /* @__PURE__ */ jsx(WidgetEmptyState, {
|
|
127
144
|
iconName: "ph:lightning",
|
|
128
|
-
title:
|
|
129
|
-
description:
|
|
145
|
+
title: t17,
|
|
146
|
+
description: t18
|
|
130
147
|
});
|
|
131
|
-
$[
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
148
|
+
$[41] = t17;
|
|
149
|
+
$[42] = t18;
|
|
150
|
+
$[43] = t19;
|
|
151
|
+
} else t19 = $[43];
|
|
152
|
+
let t20;
|
|
153
|
+
if ($[44] !== config.cardVariant || $[45] !== config.className || $[46] !== t14 || $[47] !== t19 || $[48] !== title) {
|
|
154
|
+
t20 = /* @__PURE__ */ jsx(WidgetCard, {
|
|
136
155
|
title,
|
|
137
156
|
description: t14,
|
|
138
|
-
variant:
|
|
139
|
-
className:
|
|
140
|
-
children:
|
|
157
|
+
variant: t15,
|
|
158
|
+
className: t16,
|
|
159
|
+
children: t19
|
|
141
160
|
});
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
|
|
148
|
-
|
|
161
|
+
$[44] = config.cardVariant;
|
|
162
|
+
$[45] = config.className;
|
|
163
|
+
$[46] = t14;
|
|
164
|
+
$[47] = t19;
|
|
165
|
+
$[48] = title;
|
|
166
|
+
$[49] = t20;
|
|
167
|
+
} else t20 = $[49];
|
|
168
|
+
t9 = t20;
|
|
149
169
|
break bb0;
|
|
150
170
|
}
|
|
151
171
|
if (layout === "grid") {
|
|
152
172
|
let t14;
|
|
153
|
-
if ($[
|
|
173
|
+
if ($[50] !== config.description || $[51] !== resolveText) {
|
|
154
174
|
t14 = config.description ? resolveText(config.description) : void 0;
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
-
} else t14 = $[
|
|
175
|
+
$[50] = config.description;
|
|
176
|
+
$[51] = resolveText;
|
|
177
|
+
$[52] = t14;
|
|
178
|
+
} else t14 = $[52];
|
|
159
179
|
t9 = /* @__PURE__ */ jsx(WidgetCard, {
|
|
160
180
|
title,
|
|
161
181
|
description: t14,
|
|
@@ -184,12 +204,12 @@ function QuickActionsWidget(t0) {
|
|
|
184
204
|
}
|
|
185
205
|
T0 = WidgetCard;
|
|
186
206
|
t5 = title;
|
|
187
|
-
if ($[
|
|
207
|
+
if ($[53] !== config.description || $[54] !== resolveText) {
|
|
188
208
|
t6 = config.description ? resolveText(config.description) : void 0;
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
} else t6 = $[
|
|
209
|
+
$[53] = config.description;
|
|
210
|
+
$[54] = resolveText;
|
|
211
|
+
$[55] = t6;
|
|
212
|
+
} else t6 = $[55];
|
|
193
213
|
t7 = config.cardVariant;
|
|
194
214
|
t8 = config.className;
|
|
195
215
|
t3 = "-mx-1 space-y-1";
|
|
@@ -227,37 +247,38 @@ function QuickActionsWidget(t0) {
|
|
|
227
247
|
$[8] = layout;
|
|
228
248
|
$[9] = navigate;
|
|
229
249
|
$[10] = resolveText;
|
|
230
|
-
$[11] =
|
|
231
|
-
$[12] =
|
|
232
|
-
$[13] =
|
|
233
|
-
$[14] =
|
|
234
|
-
$[15] =
|
|
235
|
-
$[16] =
|
|
236
|
-
$[17] =
|
|
237
|
-
$[18] =
|
|
250
|
+
$[11] = t;
|
|
251
|
+
$[12] = T0;
|
|
252
|
+
$[13] = t3;
|
|
253
|
+
$[14] = t4;
|
|
254
|
+
$[15] = t5;
|
|
255
|
+
$[16] = t6;
|
|
256
|
+
$[17] = t7;
|
|
257
|
+
$[18] = t8;
|
|
258
|
+
$[19] = t9;
|
|
238
259
|
} else {
|
|
239
|
-
T0 = $[
|
|
240
|
-
t3 = $[
|
|
241
|
-
t4 = $[
|
|
242
|
-
t5 = $[
|
|
243
|
-
t6 = $[
|
|
244
|
-
t7 = $[
|
|
245
|
-
t8 = $[
|
|
246
|
-
t9 = $[
|
|
260
|
+
T0 = $[12];
|
|
261
|
+
t3 = $[13];
|
|
262
|
+
t4 = $[14];
|
|
263
|
+
t5 = $[15];
|
|
264
|
+
t6 = $[16];
|
|
265
|
+
t7 = $[17];
|
|
266
|
+
t8 = $[18];
|
|
267
|
+
t9 = $[19];
|
|
247
268
|
}
|
|
248
269
|
if (t9 !== Symbol.for("react.early_return_sentinel")) return t9;
|
|
249
270
|
let t10;
|
|
250
|
-
if ($[
|
|
271
|
+
if ($[56] !== t3 || $[57] !== t4) {
|
|
251
272
|
t10 = /* @__PURE__ */ jsx("div", {
|
|
252
273
|
className: t3,
|
|
253
274
|
children: t4
|
|
254
275
|
});
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
} else t10 = $[
|
|
276
|
+
$[56] = t3;
|
|
277
|
+
$[57] = t4;
|
|
278
|
+
$[58] = t10;
|
|
279
|
+
} else t10 = $[58];
|
|
259
280
|
let t11;
|
|
260
|
-
if ($[
|
|
281
|
+
if ($[59] !== T0 || $[60] !== t10 || $[61] !== t5 || $[62] !== t6 || $[63] !== t7 || $[64] !== t8) {
|
|
261
282
|
t11 = /* @__PURE__ */ jsx(T0, {
|
|
262
283
|
title: t5,
|
|
263
284
|
description: t6,
|
|
@@ -265,14 +286,14 @@ function QuickActionsWidget(t0) {
|
|
|
265
286
|
className: t8,
|
|
266
287
|
children: t10
|
|
267
288
|
});
|
|
268
|
-
$[
|
|
269
|
-
$[
|
|
270
|
-
$[
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
} else t11 = $[
|
|
289
|
+
$[59] = T0;
|
|
290
|
+
$[60] = t10;
|
|
291
|
+
$[61] = t5;
|
|
292
|
+
$[62] = t6;
|
|
293
|
+
$[63] = t7;
|
|
294
|
+
$[64] = t8;
|
|
295
|
+
$[65] = t11;
|
|
296
|
+
} else t11 = $[65];
|
|
276
297
|
return t11;
|
|
277
298
|
}
|
|
278
299
|
|