@sfxcode/nuxt-ui-mongocamp 1.5.7 → 1.5.8
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/module.d.mts +17 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +4 -0
- package/dist/runtime/components/MongocampAccount.vue +12 -14
- package/dist/runtime/components/MongocampAggregationBuilder.vue +27 -43
- package/dist/runtime/components/MongocampAggregationChart.vue +7 -5
- package/dist/runtime/components/MongocampAggregationStagePreview.vue +1 -1
- package/dist/runtime/components/MongocampBucketFiles.vue +25 -34
- package/dist/runtime/components/MongocampBulkDelete.vue +8 -9
- package/dist/runtime/components/MongocampBulkEdit.vue +5 -4
- package/dist/runtime/components/MongocampChart.vue +1 -1
- package/dist/runtime/components/MongocampCollectionCharts.vue +6 -5
- package/dist/runtime/components/MongocampCollectionCopy.vue +6 -6
- package/dist/runtime/components/MongocampCollectionData.vue +37 -62
- package/dist/runtime/components/MongocampCollectionInfos.vue +18 -23
- package/dist/runtime/components/MongocampCollectionRename.vue +5 -4
- package/dist/runtime/components/MongocampCollections.vue +24 -33
- package/dist/runtime/components/MongocampCommandPalette.vue +3 -1
- package/dist/runtime/components/MongocampConfirmByName.vue +5 -4
- package/dist/runtime/components/MongocampDashboard.vue +5 -3
- package/dist/runtime/components/MongocampDatabases.vue +14 -8
- package/dist/runtime/components/MongocampDocumentCompare.vue +6 -4
- package/dist/runtime/components/MongocampDocumentView.vue +6 -8
- package/dist/runtime/components/MongocampEmptyState.vue +4 -1
- package/dist/runtime/components/MongocampErrorAlert.vue +8 -7
- package/dist/runtime/components/MongocampExportAll.vue +7 -7
- package/dist/runtime/components/MongocampFilePreview.vue +7 -6
- package/dist/runtime/components/MongocampFilterBuilder.vue +12 -16
- package/dist/runtime/components/MongocampGrantList.vue +6 -2
- package/dist/runtime/components/MongocampImport.vue +29 -28
- package/dist/runtime/components/MongocampIndexes.vue +15 -17
- package/dist/runtime/components/MongocampJobs.vue +20 -20
- package/dist/runtime/components/MongocampLogin.vue +2 -1
- package/dist/runtime/components/MongocampPermissionMatrix.vue +14 -11
- package/dist/runtime/components/MongocampQueryBar.vue +18 -32
- package/dist/runtime/components/MongocampRoleGrants.vue +21 -17
- package/dist/runtime/components/MongocampRoles.vue +28 -32
- package/dist/runtime/components/MongocampServerInfo.vue +17 -12
- package/dist/runtime/components/MongocampServerOverview.vue +16 -12
- package/dist/runtime/components/MongocampServerStatus.vue +2 -1
- package/dist/runtime/components/MongocampSettings.vue +15 -11
- package/dist/runtime/components/MongocampUserAccess.vue +11 -6
- package/dist/runtime/components/MongocampUsers.vue +32 -35
- package/dist/runtime/components/MongocampVersion.vue +6 -4
- package/dist/runtime/composables/useMongocampUi.d.ts +8 -0
- package/dist/runtime/composables/useMongocampUi.js +7 -0
- package/dist/runtime/plugin.js +8 -0
- package/dist/runtime/utils/compactSession.d.ts +13 -0
- package/dist/runtime/utils/compactSession.js +12 -0
- package/dist/runtime/utils/uiTheme.d.ts +65 -0
- package/dist/runtime/utils/uiTheme.js +47 -0
- package/package.json +13 -13
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed, ref, watch } from "vue";
|
|
3
3
|
import { useI18n } from "#imports";
|
|
4
|
+
import { useMongocampUi } from "../composables/useMongocampUi";
|
|
4
5
|
const PREVIEW_LIMIT = 5;
|
|
5
6
|
const props = defineProps({
|
|
6
7
|
selected: { type: Array, required: true },
|
|
@@ -16,6 +17,7 @@ const props = defineProps({
|
|
|
16
17
|
});
|
|
17
18
|
const emit = defineEmits(["confirm", "clear", "open", "selectAll"]);
|
|
18
19
|
const { t } = useI18n();
|
|
20
|
+
const ui = useMongocampUi();
|
|
19
21
|
const isOpen = ref(false);
|
|
20
22
|
const typed = ref("");
|
|
21
23
|
const confirmed = computed(() => !props.confirmName || typed.value.trim() === props.confirmName);
|
|
@@ -38,7 +40,7 @@ watch(() => props.deleting, (now, before) => {
|
|
|
38
40
|
<template>
|
|
39
41
|
<div
|
|
40
42
|
v-if="count > 0 || counting || note"
|
|
41
|
-
class="flex flex-col gap-1"
|
|
43
|
+
class="mongocamp-bulk-delete flex flex-col gap-1"
|
|
42
44
|
>
|
|
43
45
|
<div
|
|
44
46
|
v-if="count > 0"
|
|
@@ -57,9 +59,7 @@ watch(() => props.deleting, (now, before) => {
|
|
|
57
59
|
/>
|
|
58
60
|
<slot name="actions" />
|
|
59
61
|
<UButton
|
|
60
|
-
|
|
61
|
-
variant="ghost"
|
|
62
|
-
size="sm"
|
|
62
|
+
v-bind="ui.iconButton"
|
|
63
63
|
:label="t('nuxtUiMongocamp.bulk.clearSelection')"
|
|
64
64
|
@click="emit('clear')"
|
|
65
65
|
/>
|
|
@@ -104,7 +104,7 @@ watch(() => props.deleting, (now, before) => {
|
|
|
104
104
|
<UModal
|
|
105
105
|
v-model:open="isOpen"
|
|
106
106
|
:title="t('nuxtUiMongocamp.bulk.deleteTitle', { count }, count)"
|
|
107
|
-
:ui="{
|
|
107
|
+
:ui="{ content: 'mongocamp-bulk-delete', footer: ui.modal.footer }"
|
|
108
108
|
>
|
|
109
109
|
<template #body>
|
|
110
110
|
<p>{{ t("nuxtUiMongocamp.bulk.deleteDescription") }}</p>
|
|
@@ -141,7 +141,7 @@ watch(() => props.deleting, (now, before) => {
|
|
|
141
141
|
v-if="error"
|
|
142
142
|
class="mt-3"
|
|
143
143
|
color="error"
|
|
144
|
-
variant="
|
|
144
|
+
:variant="ui.alert.variant"
|
|
145
145
|
icon="i-lucide-circle-alert"
|
|
146
146
|
:description="error"
|
|
147
147
|
/>
|
|
@@ -149,14 +149,13 @@ watch(() => props.deleting, (now, before) => {
|
|
|
149
149
|
<template #footer>
|
|
150
150
|
<UButton
|
|
151
151
|
:label="t('nuxtUiMongocamp.common.cancel')"
|
|
152
|
-
|
|
153
|
-
variant="ghost"
|
|
152
|
+
v-bind="ui.dialogCancel"
|
|
154
153
|
:disabled="deleting"
|
|
155
154
|
@click="isOpen = false"
|
|
156
155
|
/>
|
|
157
156
|
<UButton
|
|
158
157
|
:label="t('nuxtUiMongocamp.bulk.confirmDelete', { count })"
|
|
159
|
-
|
|
158
|
+
v-bind="ui.dangerAction"
|
|
160
159
|
:loading="deleting"
|
|
161
160
|
:disabled="!confirmed"
|
|
162
161
|
@click="emit('confirm')"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { computed, ref, watch } from "vue";
|
|
3
3
|
import { useI18n } from "#imports";
|
|
4
4
|
import { coerceRow } from "../utils/importRows";
|
|
5
|
+
import { useMongocampUi } from "../composables/useMongocampUi";
|
|
5
6
|
const props = defineProps({
|
|
6
7
|
selected: { type: Number, required: true },
|
|
7
8
|
fields: { type: Array, required: true },
|
|
@@ -11,6 +12,7 @@ const props = defineProps({
|
|
|
11
12
|
const emit = defineEmits(["apply"]);
|
|
12
13
|
const isOpen = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
13
14
|
const { t } = useI18n();
|
|
15
|
+
const ui = useMongocampUi();
|
|
14
16
|
const field = ref("");
|
|
15
17
|
const type = ref("string");
|
|
16
18
|
const text = ref("");
|
|
@@ -92,7 +94,7 @@ watch(() => props.saving, (now, before) => {
|
|
|
92
94
|
<UModal
|
|
93
95
|
v-model:open="isOpen"
|
|
94
96
|
:title="t('nuxtUiMongocamp.bulk.editTitle', { count: selected }, selected)"
|
|
95
|
-
:ui="{
|
|
97
|
+
:ui="{ content: 'mongocamp-bulk-edit', footer: ui.modal.footer }"
|
|
96
98
|
>
|
|
97
99
|
<template #body>
|
|
98
100
|
<div class="flex flex-col gap-3">
|
|
@@ -151,7 +153,7 @@ watch(() => props.saving, (now, before) => {
|
|
|
151
153
|
<UAlert
|
|
152
154
|
v-if="error"
|
|
153
155
|
color="error"
|
|
154
|
-
variant="
|
|
156
|
+
:variant="ui.alert.variant"
|
|
155
157
|
icon="i-lucide-circle-alert"
|
|
156
158
|
:description="error"
|
|
157
159
|
/>
|
|
@@ -160,8 +162,7 @@ watch(() => props.saving, (now, before) => {
|
|
|
160
162
|
<template #footer>
|
|
161
163
|
<UButton
|
|
162
164
|
:label="t('nuxtUiMongocamp.common.cancel')"
|
|
163
|
-
|
|
164
|
-
variant="ghost"
|
|
165
|
+
v-bind="ui.dialogCancel"
|
|
165
166
|
:disabled="saving"
|
|
166
167
|
@click="isOpen = false"
|
|
167
168
|
/>
|
|
@@ -4,6 +4,7 @@ import { useI18n } from "#imports";
|
|
|
4
4
|
import { useMongocampAggregation } from "../composables/useMongocampAggregation";
|
|
5
5
|
import { dominantKindOfField } from "../utils/fieldDetails";
|
|
6
6
|
import { chartKindFor, chartRequest, chartTypeFor, DEFAULT_BUCKETS, DEFAULT_TOP, highestPoint, MAX_PERIODS, rowsToPoints } from "../utils/collectionChart";
|
|
7
|
+
import { useMongocampUi } from "../composables/useMongocampUi";
|
|
7
8
|
const props = defineProps({
|
|
8
9
|
collectionName: { type: String, required: true },
|
|
9
10
|
field: { type: String, required: true },
|
|
@@ -13,6 +14,7 @@ const props = defineProps({
|
|
|
13
14
|
filter: { type: String, required: false, default: void 0 }
|
|
14
15
|
});
|
|
15
16
|
const { t } = useI18n();
|
|
17
|
+
const ui = useMongocampUi();
|
|
16
18
|
const { runAggregation, listFieldDetails, describeAggregationError } = useMongocampAggregation();
|
|
17
19
|
const status = ref("loading");
|
|
18
20
|
const current = ref(void 0);
|
|
@@ -97,7 +99,7 @@ const unsupportedType = computed(() => t(`nuxtUiMongocamp.charts.type${(detected
|
|
|
97
99
|
|
|
98
100
|
<template>
|
|
99
101
|
<div
|
|
100
|
-
class="flex flex-col gap-3"
|
|
102
|
+
class="mongocamp-collection-charts flex flex-col gap-3"
|
|
101
103
|
data-test="collection-chart"
|
|
102
104
|
>
|
|
103
105
|
<div class="flex flex-wrap items-center justify-between gap-2">
|
|
@@ -112,7 +114,7 @@ const unsupportedType = computed(() => t(`nuxtUiMongocamp.charts.type${(detected
|
|
|
112
114
|
<USelect
|
|
113
115
|
v-model="unit"
|
|
114
116
|
:items="unitItems"
|
|
115
|
-
size="
|
|
117
|
+
:size="ui.controlSize"
|
|
116
118
|
class="w-28"
|
|
117
119
|
:aria-label="t('nuxtUiMongocamp.charts.unitLabel')"
|
|
118
120
|
/>
|
|
@@ -131,7 +133,7 @@ const unsupportedType = computed(() => t(`nuxtUiMongocamp.charts.type${(detected
|
|
|
131
133
|
<UAlert
|
|
132
134
|
v-else-if="status === 'error' && error"
|
|
133
135
|
color="error"
|
|
134
|
-
variant="
|
|
136
|
+
:variant="ui.alert.variant"
|
|
135
137
|
icon="i-lucide-circle-alert"
|
|
136
138
|
:title="t('nuxtUiMongocamp.charts.failedTitle')"
|
|
137
139
|
:description="error.message"
|
|
@@ -140,8 +142,7 @@ const unsupportedType = computed(() => t(`nuxtUiMongocamp.charts.type${(detected
|
|
|
140
142
|
<template #actions>
|
|
141
143
|
<UButton
|
|
142
144
|
:label="t('nuxtUiMongocamp.charts.retry')"
|
|
143
|
-
|
|
144
|
-
variant="subtle"
|
|
145
|
+
v-bind="{ ...ui.alertAction, color: 'error' }"
|
|
145
146
|
icon="i-lucide-refresh-cw"
|
|
146
147
|
@click="load"
|
|
147
148
|
/>
|
|
@@ -3,6 +3,7 @@ import { computed, ref, watch } from "vue";
|
|
|
3
3
|
import { useI18n, useMongocampError } from "#imports";
|
|
4
4
|
import { useMongocampCollectionCopy } from "../composables/useMongocampCollectionCopy";
|
|
5
5
|
import { backupName, canCopyCollection, MAX_COLLECTION_NAME_LENGTH, validateTargetName } from "../utils/collectionCopy";
|
|
6
|
+
import { useMongocampUi } from "../composables/useMongocampUi";
|
|
6
7
|
const props = defineProps({
|
|
7
8
|
source: { type: String, required: true },
|
|
8
9
|
filter: { type: String, required: false }
|
|
@@ -10,6 +11,7 @@ const props = defineProps({
|
|
|
10
11
|
const emit = defineEmits(["done"]);
|
|
11
12
|
const isOpen = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
12
13
|
const { t } = useI18n();
|
|
14
|
+
const ui = useMongocampUi();
|
|
13
15
|
const { describeServerError } = useMongocampError();
|
|
14
16
|
const { copyCollection, backupCollection, listCollectionNames, countDocuments } = useMongocampCollectionCopy();
|
|
15
17
|
const step = ref("form");
|
|
@@ -78,7 +80,7 @@ async function start(quick = false) {
|
|
|
78
80
|
v-model:open="isOpen"
|
|
79
81
|
:title="filter ? t('nuxtUiMongocamp.collectionCopy.titleFiltered', { source }) : t('nuxtUiMongocamp.collectionCopy.title', { source })"
|
|
80
82
|
:dismissible="step !== 'running'"
|
|
81
|
-
:ui="{
|
|
83
|
+
:ui="{ content: 'mongocamp-collection-copy', footer: ui.modal.footer }"
|
|
82
84
|
>
|
|
83
85
|
<template #body>
|
|
84
86
|
<div
|
|
@@ -153,7 +155,7 @@ async function start(quick = false) {
|
|
|
153
155
|
>
|
|
154
156
|
<UAlert
|
|
155
157
|
color="success"
|
|
156
|
-
variant="
|
|
158
|
+
:variant="ui.alert.variant"
|
|
157
159
|
icon="i-lucide-circle-check"
|
|
158
160
|
:title="t('nuxtUiMongocamp.collectionCopy.doneTitle', { count: result?.count ?? 0, target: result?.target ?? targetName }, result?.count ?? 0)"
|
|
159
161
|
/>
|
|
@@ -172,16 +174,14 @@ async function start(quick = false) {
|
|
|
172
174
|
<template v-else-if="step === 'done'">
|
|
173
175
|
<UButton
|
|
174
176
|
:label="t('nuxtUiMongocamp.collectionCopy.close')"
|
|
175
|
-
|
|
176
|
-
variant="ghost"
|
|
177
|
+
v-bind="ui.dialogCancel"
|
|
177
178
|
@click="isOpen = false"
|
|
178
179
|
/>
|
|
179
180
|
</template>
|
|
180
181
|
<template v-else>
|
|
181
182
|
<UButton
|
|
182
183
|
:label="t('nuxtUiMongocamp.common.cancel')"
|
|
183
|
-
|
|
184
|
-
variant="ghost"
|
|
184
|
+
v-bind="ui.dialogCancel"
|
|
185
185
|
@click="isOpen = false"
|
|
186
186
|
/>
|
|
187
187
|
<UButton
|
|
@@ -28,6 +28,7 @@ import MongocampQueryBar from "./MongocampQueryBar.vue";
|
|
|
28
28
|
import MongocampExportAll from "./MongocampExportAll.vue";
|
|
29
29
|
import MongocampCollectionCharts from "./MongocampCollectionCharts.vue";
|
|
30
30
|
import { isFilterTooLong } from "../utils/requestLimits";
|
|
31
|
+
import { useMongocampUi } from "../composables/useMongocampUi";
|
|
31
32
|
const props = defineProps({
|
|
32
33
|
collectionName: { type: String, required: true },
|
|
33
34
|
infoPath: { type: String, required: false },
|
|
@@ -42,6 +43,7 @@ const props = defineProps({
|
|
|
42
43
|
});
|
|
43
44
|
const emit = defineEmits(["changed"]);
|
|
44
45
|
const { t } = useI18n();
|
|
46
|
+
const ui = useMongocampUi();
|
|
45
47
|
const paths = useMongocampPaths();
|
|
46
48
|
const { documentApi } = useMongocampClientApi();
|
|
47
49
|
const { pagination, total } = useMongocampCollection();
|
|
@@ -230,9 +232,7 @@ function makeActionsColumn() {
|
|
|
230
232
|
if (fileId) {
|
|
231
233
|
buttons.push(withTooltip(t("nuxtUiMongocamp.collectionData.downloadFileTooltip"), h(UButton, {
|
|
232
234
|
"icon": "i-lucide-download",
|
|
233
|
-
|
|
234
|
-
"variant": "ghost",
|
|
235
|
-
"size": "sm",
|
|
235
|
+
...ui.value.iconButton,
|
|
236
236
|
"aria-label": t("nuxtUiMongocamp.collectionData.downloadFileTooltip"),
|
|
237
237
|
"loading": downloadingFileIds.value.has(fileId),
|
|
238
238
|
"onClick": () => downloadFile(props.collectionName, fileId)
|
|
@@ -241,40 +241,34 @@ function makeActionsColumn() {
|
|
|
241
241
|
}
|
|
242
242
|
buttons.push(withTooltip(t("nuxtUiMongocamp.collectionData.viewDocumentTooltip"), h(UButton, {
|
|
243
243
|
"icon": "i-lucide-eye",
|
|
244
|
-
|
|
245
|
-
"variant": "ghost",
|
|
246
|
-
"size": "sm",
|
|
244
|
+
...ui.value.iconButton,
|
|
247
245
|
"aria-label": t("nuxtUiMongocamp.collectionData.viewDocumentTooltip"),
|
|
248
246
|
"onClick": () => openView(row.original)
|
|
249
247
|
})));
|
|
250
|
-
if (!writable.value) return h("div", { class: "flex gap-1 justify-end" }, buttons);
|
|
248
|
+
if (!writable.value) return h("div", { "class": "flex gap-1 justify-end", "data-mongocamp-part": "row-actions" }, buttons);
|
|
251
249
|
buttons.push(
|
|
252
250
|
withTooltip(t("nuxtUiMongocamp.collectionData.editDocumentTooltip"), h(UButton, {
|
|
253
251
|
"icon": "i-lucide-pencil",
|
|
254
|
-
|
|
255
|
-
"variant": "ghost",
|
|
256
|
-
"size": "sm",
|
|
252
|
+
...ui.value.iconButton,
|
|
257
253
|
"aria-label": t("nuxtUiMongocamp.collectionData.editDocumentTooltip"),
|
|
258
254
|
"onClick": () => openEdit(row.original)
|
|
259
255
|
})),
|
|
260
256
|
withTooltip(t("nuxtUiMongocamp.collectionData.deleteDocumentTooltip"), h(UButton, {
|
|
261
257
|
"icon": "i-lucide-trash-2",
|
|
258
|
+
...ui.value.iconButton,
|
|
262
259
|
"color": "error",
|
|
263
|
-
"variant": "ghost",
|
|
264
|
-
"size": "sm",
|
|
265
260
|
"aria-label": t("nuxtUiMongocamp.collectionData.deleteDocumentTooltip"),
|
|
266
261
|
"onClick": () => confirmDelete(row.original)
|
|
267
262
|
}))
|
|
268
263
|
);
|
|
269
|
-
return h("div", { class: "flex gap-1 justify-end" }, buttons);
|
|
264
|
+
return h("div", { "class": "flex gap-1 justify-end", "data-mongocamp-part": "row-actions" }, buttons);
|
|
270
265
|
}
|
|
271
266
|
};
|
|
272
267
|
}
|
|
273
268
|
function sortHeader(column, label) {
|
|
274
269
|
const isSorted = column.getIsSorted();
|
|
275
270
|
return h(UButton, {
|
|
276
|
-
|
|
277
|
-
variant: "ghost",
|
|
271
|
+
...ui.value.sortHeader,
|
|
278
272
|
label,
|
|
279
273
|
icon: isSorted === "asc" ? "i-lucide-arrow-up-narrow-wide" : isSorted === "desc" ? "i-lucide-arrow-down-wide-narrow" : "i-lucide-arrow-up-down",
|
|
280
274
|
class: "-mx-2.5",
|
|
@@ -321,9 +315,7 @@ function columnHeader(column, key) {
|
|
|
321
315
|
}, {
|
|
322
316
|
default: () => h(UButton, {
|
|
323
317
|
"icon": "i-lucide-list-tree",
|
|
324
|
-
|
|
325
|
-
"variant": "ghost",
|
|
326
|
-
"size": "xs",
|
|
318
|
+
...ui.value.compactButton,
|
|
327
319
|
"aria-label": label,
|
|
328
320
|
"loading": indexing.value.has(key)
|
|
329
321
|
})
|
|
@@ -494,9 +486,7 @@ function makeCell(key, type) {
|
|
|
494
486
|
const viewLabel = Array.isArray(raw) ? t("nuxtUiMongocamp.collectionData.viewArray") : t("nuxtUiMongocamp.collectionData.viewObject");
|
|
495
487
|
return withTooltip(viewLabel, h(UButton, {
|
|
496
488
|
"icon": Array.isArray(raw) ? "i-lucide-list" : "i-lucide-braces",
|
|
497
|
-
|
|
498
|
-
"variant": "ghost",
|
|
499
|
-
"size": "xs",
|
|
489
|
+
...ui.value.compactButton,
|
|
500
490
|
"aria-label": viewLabel,
|
|
501
491
|
"onClick": () => openDetail(raw)
|
|
502
492
|
}));
|
|
@@ -835,18 +825,21 @@ defineExpose({ refresh: init });
|
|
|
835
825
|
</script>
|
|
836
826
|
|
|
837
827
|
<template>
|
|
838
|
-
<div class="flex flex-col gap-4">
|
|
828
|
+
<div class="mongocamp-collection-data flex flex-col gap-4">
|
|
839
829
|
<div class="flex flex-wrap items-center justify-between gap-4">
|
|
840
830
|
<UInput
|
|
841
831
|
v-model="filterText"
|
|
842
832
|
icon="i-lucide-search"
|
|
843
833
|
:placeholder="t('nuxtUiMongocamp.collectionData.filterPlaceholder')"
|
|
844
|
-
size="
|
|
834
|
+
:size="ui.controlSize"
|
|
845
835
|
class="flex-1 max-w-xs"
|
|
846
836
|
:disabled="filterableColumns.length === 0"
|
|
847
837
|
@input="onFilterInput"
|
|
848
838
|
/>
|
|
849
|
-
<div
|
|
839
|
+
<div
|
|
840
|
+
data-mongocamp-part="toolbar"
|
|
841
|
+
class="flex flex-wrap items-center gap-2"
|
|
842
|
+
>
|
|
850
843
|
<span class="text-sm text-muted shrink-0">
|
|
851
844
|
{{ t("nuxtUiMongocamp.collectionData.documentsCount", { count: total }) }}
|
|
852
845
|
</span>
|
|
@@ -856,9 +849,7 @@ defineExpose({ refresh: init });
|
|
|
856
849
|
>
|
|
857
850
|
<UButton
|
|
858
851
|
icon="i-lucide-upload"
|
|
859
|
-
|
|
860
|
-
variant="ghost"
|
|
861
|
-
size="sm"
|
|
852
|
+
v-bind="{ ...ui.iconButton, color: 'primary' }"
|
|
862
853
|
:loading="uploading"
|
|
863
854
|
:aria-label="t('nuxtUiMongocamp.collectionData.uploadFileTooltip')"
|
|
864
855
|
@click="openFilePicker"
|
|
@@ -870,9 +861,7 @@ defineExpose({ refresh: init });
|
|
|
870
861
|
>
|
|
871
862
|
<UButton
|
|
872
863
|
icon="i-lucide-plus"
|
|
873
|
-
|
|
874
|
-
variant="ghost"
|
|
875
|
-
size="sm"
|
|
864
|
+
v-bind="{ ...ui.iconButton, color: 'primary' }"
|
|
876
865
|
:aria-label="t('nuxtUiMongocamp.collectionData.insertDocumentTooltip')"
|
|
877
866
|
@click="openInsert"
|
|
878
867
|
/>
|
|
@@ -894,8 +883,7 @@ defineExpose({ refresh: init });
|
|
|
894
883
|
>
|
|
895
884
|
<UButton
|
|
896
885
|
icon="i-lucide-refresh-cw"
|
|
897
|
-
|
|
898
|
-
variant="ghost"
|
|
886
|
+
v-bind="ui.toolbarButton"
|
|
899
887
|
:loading="loading"
|
|
900
888
|
:aria-label="t('nuxtUiMongocamp.collectionData.reloadTooltip')"
|
|
901
889
|
@click="init"
|
|
@@ -922,9 +910,7 @@ defineExpose({ refresh: init });
|
|
|
922
910
|
<UDropdownMenu :items="columnMenuItems">
|
|
923
911
|
<UButton
|
|
924
912
|
icon="i-lucide-columns-3"
|
|
925
|
-
|
|
926
|
-
variant="ghost"
|
|
927
|
-
size="sm"
|
|
913
|
+
v-bind="ui.iconButton"
|
|
928
914
|
:disabled="dataColumnKeys.length === 0"
|
|
929
915
|
:aria-label="t('nuxtUiMongocamp.collectionData.columnsTooltip')"
|
|
930
916
|
/>
|
|
@@ -932,9 +918,7 @@ defineExpose({ refresh: init });
|
|
|
932
918
|
<UButton
|
|
933
919
|
v-if="aggregatePath && !isBucketCollection(collectionName)"
|
|
934
920
|
icon="i-lucide-sigma"
|
|
935
|
-
|
|
936
|
-
variant="ghost"
|
|
937
|
-
size="sm"
|
|
921
|
+
v-bind="ui.iconButton"
|
|
938
922
|
:disabled="chartFilterTooLong"
|
|
939
923
|
:to="{ path: `${aggregatePath}/${collectionName}/aggregate`, query: chartFilter ? { filter: chartFilter } : {} }"
|
|
940
924
|
:aria-label="t('nuxtUiMongocamp.collectionData.aggregateTooltip')"
|
|
@@ -943,9 +927,7 @@ defineExpose({ refresh: init });
|
|
|
943
927
|
<UButton
|
|
944
928
|
v-if="!isBucketCollection(collectionName)"
|
|
945
929
|
icon="i-lucide-chart-column"
|
|
946
|
-
|
|
947
|
-
variant="ghost"
|
|
948
|
-
size="sm"
|
|
930
|
+
v-bind="ui.iconButton"
|
|
949
931
|
:disabled="chartFields.length === 0 || documents.length === 0"
|
|
950
932
|
:aria-label="t('nuxtUiMongocamp.collectionData.chartTooltip')"
|
|
951
933
|
@click="openChart"
|
|
@@ -953,9 +935,7 @@ defineExpose({ refresh: init });
|
|
|
953
935
|
<UDropdownMenu :items="exportMenuItems">
|
|
954
936
|
<UButton
|
|
955
937
|
icon="i-lucide-download"
|
|
956
|
-
|
|
957
|
-
variant="ghost"
|
|
958
|
-
size="sm"
|
|
938
|
+
v-bind="ui.iconButton"
|
|
959
939
|
:disabled="documents.length === 0"
|
|
960
940
|
:aria-label="t('nuxtUiMongocamp.collectionData.exportTooltip')"
|
|
961
941
|
/>
|
|
@@ -963,7 +943,7 @@ defineExpose({ refresh: init });
|
|
|
963
943
|
<USelect
|
|
964
944
|
v-model="pagination.pageSize"
|
|
965
945
|
:items="pageSizeOptions"
|
|
966
|
-
size="
|
|
946
|
+
:size="ui.controlSize"
|
|
967
947
|
class="w-20"
|
|
968
948
|
:aria-label="t('nuxtUiMongocamp.collectionData.pageSizeLabel')"
|
|
969
949
|
@update:model-value="onPageSizeChange"
|
|
@@ -1013,9 +993,7 @@ defineExpose({ refresh: init });
|
|
|
1013
993
|
<UButton
|
|
1014
994
|
v-if="compareRows.length === 2"
|
|
1015
995
|
icon="i-lucide-git-compare"
|
|
1016
|
-
|
|
1017
|
-
variant="subtle"
|
|
1018
|
-
size="sm"
|
|
996
|
+
v-bind="{ ...ui.secondaryAction, size: ui.controlSize }"
|
|
1019
997
|
:label="t('nuxtUiMongocamp.bulk.compareSelected')"
|
|
1020
998
|
data-testid="compare-selected"
|
|
1021
999
|
@click="openCompare"
|
|
@@ -1023,9 +1001,7 @@ defineExpose({ refresh: init });
|
|
|
1023
1001
|
<UButton
|
|
1024
1002
|
v-if="editableFields.length > 0"
|
|
1025
1003
|
icon="i-lucide-pencil"
|
|
1026
|
-
|
|
1027
|
-
variant="subtle"
|
|
1028
|
-
size="sm"
|
|
1004
|
+
v-bind="{ ...ui.secondaryAction, size: ui.controlSize }"
|
|
1029
1005
|
:label="t('nuxtUiMongocamp.bulk.editSelected')"
|
|
1030
1006
|
@click="openBulkEdit"
|
|
1031
1007
|
/>
|
|
@@ -1050,6 +1026,7 @@ defineExpose({ refresh: init });
|
|
|
1050
1026
|
v-else
|
|
1051
1027
|
v-model:sorting="sorting"
|
|
1052
1028
|
v-model:row-selection="rowSelection"
|
|
1029
|
+
data-mongocamp-part="table"
|
|
1053
1030
|
:column-visibility="effectiveVisibility"
|
|
1054
1031
|
:get-row-id="rowId"
|
|
1055
1032
|
:sorting-options="{ manualSorting: true }"
|
|
@@ -1074,7 +1051,7 @@ defineExpose({ refresh: init });
|
|
|
1074
1051
|
<UModal
|
|
1075
1052
|
v-model:open="chartOpen"
|
|
1076
1053
|
:title="t('nuxtUiMongocamp.collectionData.chartTitle')"
|
|
1077
|
-
:ui="{ content:
|
|
1054
|
+
:ui="{ content: ui.modal.lg }"
|
|
1078
1055
|
>
|
|
1079
1056
|
<template #body>
|
|
1080
1057
|
<div
|
|
@@ -1095,7 +1072,7 @@ defineExpose({ refresh: init });
|
|
|
1095
1072
|
<UAlert
|
|
1096
1073
|
v-if="chartFilterTooLong"
|
|
1097
1074
|
color="warning"
|
|
1098
|
-
variant="
|
|
1075
|
+
:variant="ui.alert.variant"
|
|
1099
1076
|
icon="i-lucide-triangle-alert"
|
|
1100
1077
|
:description="t('nuxtUiMongocamp.collectionData.chartTooLong')"
|
|
1101
1078
|
data-test="chart-too-long"
|
|
@@ -1113,7 +1090,7 @@ defineExpose({ refresh: init });
|
|
|
1113
1090
|
<UModal
|
|
1114
1091
|
v-model:open="compareOpen"
|
|
1115
1092
|
:title="t('nuxtUiMongocamp.documentCompare.title')"
|
|
1116
|
-
:ui="{ content:
|
|
1093
|
+
:ui="{ content: ui.modal.xl }"
|
|
1117
1094
|
>
|
|
1118
1095
|
<template #body>
|
|
1119
1096
|
<p
|
|
@@ -1145,7 +1122,7 @@ defineExpose({ refresh: init });
|
|
|
1145
1122
|
<USlideover
|
|
1146
1123
|
v-model:open="viewOpen"
|
|
1147
1124
|
:title="t('nuxtUiMongocamp.collectionData.viewDocumentTitle')"
|
|
1148
|
-
:ui="{ content:
|
|
1125
|
+
:ui="{ content: ui.modal.md }"
|
|
1149
1126
|
>
|
|
1150
1127
|
<template #body>
|
|
1151
1128
|
<MongocampDocumentView :document="viewDoc" />
|
|
@@ -1164,7 +1141,7 @@ defineExpose({ refresh: init });
|
|
|
1164
1141
|
<UModal
|
|
1165
1142
|
v-model:open="isEditModalOpen"
|
|
1166
1143
|
:title="editMode === 'insert' ? t('nuxtUiMongocamp.collectionData.insertDocumentTitle') : t('nuxtUiMongocamp.collectionData.editDocumentTitle')"
|
|
1167
|
-
:ui="{ footer:
|
|
1144
|
+
:ui="{ footer: ui.modal.footer }"
|
|
1168
1145
|
>
|
|
1169
1146
|
<template #body>
|
|
1170
1147
|
<FUAutoForm
|
|
@@ -1194,8 +1171,7 @@ defineExpose({ refresh: init });
|
|
|
1194
1171
|
>
|
|
1195
1172
|
<UButton
|
|
1196
1173
|
:label="t('nuxtUiMongocamp.common.cancel')"
|
|
1197
|
-
|
|
1198
|
-
variant="ghost"
|
|
1174
|
+
v-bind="ui.dialogCancel"
|
|
1199
1175
|
@click="isEditModalOpen = false"
|
|
1200
1176
|
/>
|
|
1201
1177
|
<UButton
|
|
@@ -1209,7 +1185,7 @@ defineExpose({ refresh: init });
|
|
|
1209
1185
|
<UModal
|
|
1210
1186
|
v-model:open="isDeleteModalOpen"
|
|
1211
1187
|
:title="t('nuxtUiMongocamp.collectionData.deleteDocumentTitle')"
|
|
1212
|
-
:ui="{ footer:
|
|
1188
|
+
:ui="{ footer: ui.modal.footer }"
|
|
1213
1189
|
>
|
|
1214
1190
|
<template #body>
|
|
1215
1191
|
<p>{{ t("nuxtUiMongocamp.collectionData.confirmDeleteDocument") }}</p>
|
|
@@ -1223,13 +1199,12 @@ defineExpose({ refresh: init });
|
|
|
1223
1199
|
<template #footer>
|
|
1224
1200
|
<UButton
|
|
1225
1201
|
:label="t('nuxtUiMongocamp.common.cancel')"
|
|
1226
|
-
|
|
1227
|
-
variant="ghost"
|
|
1202
|
+
v-bind="ui.dialogCancel"
|
|
1228
1203
|
@click="isDeleteModalOpen = false"
|
|
1229
1204
|
/>
|
|
1230
1205
|
<UButton
|
|
1231
1206
|
:label="t('nuxtUiMongocamp.common.delete')"
|
|
1232
|
-
|
|
1207
|
+
v-bind="ui.dangerAction"
|
|
1233
1208
|
icon="i-lucide-trash-2"
|
|
1234
1209
|
@click="handleDelete"
|
|
1235
1210
|
/>
|