@mouseless/baked 1.2.3 → 1.2.5
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.json
CHANGED
|
@@ -23,13 +23,29 @@
|
|
|
23
23
|
{{ lc("No records found") }}
|
|
24
24
|
</template>
|
|
25
25
|
<div
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
class="
|
|
27
|
+
flex flex-row items-center justify-end
|
|
28
|
+
gap-4 mb-2 py-4 px-2 rounded-sm
|
|
29
|
+
"
|
|
28
30
|
>
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
<div
|
|
32
|
+
v-if="sort"
|
|
33
|
+
class="flex items-end justify-end"
|
|
34
|
+
>
|
|
35
|
+
<Bake
|
|
36
|
+
name="sort"
|
|
37
|
+
:descriptor="sort"
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
40
|
+
<div
|
|
41
|
+
v-if="!paginator && serverPaginatorOptions"
|
|
42
|
+
class="flex justify-end"
|
|
43
|
+
>
|
|
44
|
+
<ServerPaginator
|
|
45
|
+
:schema="serverPaginatorOptions"
|
|
46
|
+
:data="data"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
33
49
|
</div>
|
|
34
50
|
<Column
|
|
35
51
|
v-for="column in columns.filter(c => !c.hidden)"
|
|
@@ -168,7 +184,7 @@ const { schema, data } = defineProps({
|
|
|
168
184
|
schema: { type: null, required: true },
|
|
169
185
|
data: { type: null, required: true }
|
|
170
186
|
});
|
|
171
|
-
const { actions, columns, dataKey, footerTemplate, itemsProp, paginator, rows, rowsWhenLoading, scrollHeight, serverPaginatorOptions } = schema;
|
|
187
|
+
const { actions, columns, dataKey, footerTemplate, itemsProp, paginator, rows, rowsWhenLoading, scrollHeight, serverPaginatorOptions, sort } = schema;
|
|
172
188
|
const exportOptions = schema.exportOptions && {
|
|
173
189
|
buttonIcon: "pi pi-download",
|
|
174
190
|
...schema.exportOptions
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
<Skeleton class="min-h-10" />
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
8
|
-
<
|
|
8
|
+
<component
|
|
9
|
+
:is="labelComponent"
|
|
10
|
+
v-bind="labelProps"
|
|
11
|
+
>
|
|
9
12
|
<Select
|
|
10
13
|
v-bind="$attrs"
|
|
11
14
|
v-model="selected"
|
|
@@ -25,13 +28,18 @@
|
|
|
25
28
|
<span>{{ getOptionLabel(slotProps) }}</span>
|
|
26
29
|
</template>
|
|
27
30
|
</Select>
|
|
28
|
-
<label
|
|
29
|
-
|
|
31
|
+
<label
|
|
32
|
+
v-if="!noFloatLabel"
|
|
33
|
+
:for="path"
|
|
34
|
+
>
|
|
35
|
+
{{ l(label) }}
|
|
36
|
+
</label>
|
|
37
|
+
</component>
|
|
30
38
|
</AwaitLoading>
|
|
31
39
|
</template>
|
|
32
40
|
|
|
33
41
|
<script setup>
|
|
34
|
-
import { ref, watch } from "vue";
|
|
42
|
+
import { computed, ref, watch } from "vue";
|
|
35
43
|
import { FloatLabel, Select, Skeleton } from "primevue";
|
|
36
44
|
import { useContext, useUiStates, useLocalization } from "#imports";
|
|
37
45
|
import { AwaitLoading } from "#components";
|
|
@@ -43,9 +51,11 @@ const { schema, data } = defineProps({
|
|
|
43
51
|
data: { type: null, required: true }
|
|
44
52
|
});
|
|
45
53
|
const model = defineModel({ type: null, required: true });
|
|
46
|
-
const { filter, label, localizeLabel, optionLabel, optionValue, showClear, stateful, targetProp } = schema;
|
|
54
|
+
const { filter, label, localizeLabel, noFloatLabel, optionLabel, optionValue, showClear, stateful, targetProp } = schema;
|
|
47
55
|
const path = context.injectPath();
|
|
48
56
|
const selected = ref();
|
|
57
|
+
const labelComponent = computed(() => noFloatLabel ? "div" : FloatLabel);
|
|
58
|
+
const labelProps = computed(() => noFloatLabel ? {} : { variant: "on" });
|
|
49
59
|
watch(
|
|
50
60
|
[() => data, getModel],
|
|
51
61
|
([_data, _model]) => {
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex items-center gap-1
|
|
3
|
-
<
|
|
2
|
+
<div class="flex items-center justify-center gap-1">
|
|
3
|
+
<Bake
|
|
4
|
+
v-if="takeComponent && isXs"
|
|
5
|
+
v-model="take"
|
|
6
|
+
name="take"
|
|
7
|
+
class="
|
|
8
|
+
mr-2 shadow-none rounded-md
|
|
9
|
+
bg-slate-100 border-slate-100
|
|
10
|
+
dark:bg-zinc-950 dark:border-zinc-950
|
|
11
|
+
"
|
|
12
|
+
:descriptor="takeComponent"
|
|
13
|
+
/>
|
|
14
|
+
<span class="whitespace-nowrap text-xs max-xs:hidden">{{ lc("Page {page}", { page }) }}</span>
|
|
4
15
|
<Button
|
|
5
16
|
rounded
|
|
6
17
|
variant="text"
|
|
@@ -19,12 +30,6 @@
|
|
|
19
30
|
:disabled="!allowNext"
|
|
20
31
|
@click="page++"
|
|
21
32
|
/>
|
|
22
|
-
<Bake
|
|
23
|
-
v-if="takeComponent && isXs"
|
|
24
|
-
v-model="take"
|
|
25
|
-
name="take"
|
|
26
|
-
:descriptor="takeComponent"
|
|
27
|
-
/>
|
|
28
33
|
</div>
|
|
29
34
|
</template>
|
|
30
35
|
|