@niyamulahsan/create-deskapp 1.2.4 → 1.2.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/package.json +16 -16
- package/template/.env.example +20 -13
- package/template/AGENTS.md +699 -0
- package/template/package.json +3 -0
- package/template/src/config/app.ts +26 -24
- package/template/src/config/winsetup.ts +93 -91
- package/template/src/core/api/binding-error.ts +57 -0
- package/template/src/core/api/bindings.generated.ts +2 -0
- package/template/src/core/api/generate.manifest.ts +84 -80
- package/template/src/core/api/registry.ts +58 -48
- package/template/src/core/config.ts +101 -99
- package/template/src/core/database/aggregate.ts +89 -85
- package/template/src/core/database/config.ts +50 -48
- package/template/src/core/database/connection.ts +116 -114
- package/template/src/core/database/migrate-hooks.ts +86 -84
- package/template/src/core/database/paginate.ts +226 -224
- package/template/src/core/database/reset.ts +21 -19
- package/template/src/core/database/seed.ts +169 -167
- package/template/src/core/database/status.ts +37 -35
- package/template/src/core/env.ts +108 -106
- package/template/src/core/facade.ts +63 -61
- package/template/src/core/maker/db/fresh.ts +10 -8
- package/template/src/core/maker/db/generate.ts +13 -11
- package/template/src/core/maker/db/helpers.ts +92 -96
- package/template/src/core/maker/db/migrate.ts +37 -35
- package/template/src/core/maker/db/mod.ts +93 -91
- package/template/src/core/maker/db/module-migrate.ts +56 -54
- package/template/src/core/maker/db/push.ts +23 -21
- package/template/src/core/maker/db/reset.ts +8 -6
- package/template/src/core/maker/db/seed.ts +9 -7
- package/template/src/core/maker/db/status.ts +8 -6
- package/template/src/core/maker/help.ts +59 -57
- package/template/src/core/maker/make/controller.ts +25 -22
- package/template/src/core/maker/make/helpers.ts +97 -91
- package/template/src/core/maker/make/mod.ts +69 -67
- package/template/src/core/maker/make/model.ts +16 -14
- package/template/src/core/maker/make/module.ts +53 -39
- package/template/src/core/maker/make/seeder.ts +23 -21
- package/template/src/core/maker/make/test.ts +33 -30
- package/template/src/core/maker/mod.ts +85 -83
- package/template/src/core/maker/run/mod.ts +134 -132
- package/template/src/core/maker/stub.ts +26 -24
- package/template/src/core/maker/stubs/controller/controller.controller.stub +57 -55
- package/template/src/core/maker/stubs/controller/controller.schema.stub +18 -13
- package/template/src/core/maker/stubs/facade/facade.stub +21 -0
- package/template/src/core/maker/stubs/model/model.stub +10 -8
- package/template/src/core/maker/stubs/seeder/seeder.stub +18 -16
- package/template/src/core/maker/stubs/test/test.stub +9 -7
- package/template/src/core/maker/sync-config.ts +93 -94
- package/template/src/core/utils/password.ts +29 -27
- package/template/src/core/utils/playwright.ts +123 -121
- package/template/src/core/utils/queue.ts +68 -66
- package/template/src/core/utils/scheduler.ts +62 -60
- package/template/src/core/utils/storage.ts +3 -1
- package/template/src/core/utils/validation.ts +37 -35
- package/template/src/database/schema.ts +2 -0
- package/template/src/main.ts +120 -118
- package/template/src/modules/app/__tests__/demo.controller.test.ts +75 -0
- package/template/src/modules/app/__tests__/net.controller.test.ts +65 -0
- package/template/src/modules/app/__tests__/playwright.controller.test.ts +50 -0
- package/template/src/modules/app/__tests__/storage.controller.test.ts +114 -0
- package/template/src/modules/app/__tests__/window.controller.test.ts +98 -0
- package/template/src/modules/app/controllers/demo.controller.ts +120 -118
- package/template/src/modules/app/controllers/net.controller.ts +50 -48
- package/template/src/modules/app/controllers/playwright.controller.ts +142 -140
- package/template/src/modules/app/controllers/storage.controller.ts +231 -229
- package/template/src/modules/app/controllers/window.controller.ts +2 -0
- package/template/src/modules/app/facade.ts +21 -0
- package/template/src/preload.ts +25 -2
- package/template/src/ui/src/App.vue +4 -2
- package/template/src/ui/src/app.ts +38 -23
- package/template/src/ui/src/bindings.d.ts +18 -16
- package/template/src/ui/src/components/Button.vue +34 -32
- package/template/src/ui/src/components/Checkbox.vue +26 -29
- package/template/src/ui/src/components/Input.vue +221 -227
- package/template/src/ui/src/components/InputGroup.vue +141 -0
- package/template/src/ui/src/components/InputPasswordToggle.vue +204 -0
- package/template/src/ui/src/components/Modal.vue +65 -55
- package/template/src/ui/src/components/Spinner.vue +44 -42
- package/template/src/ui/src/components/Switch.vue +62 -65
- package/template/src/ui/src/components/TextArea.vue +108 -121
- package/template/src/ui/src/components/Toast.vue +55 -56
- package/template/src/ui/src/components/datatable/DataTableSkeleton.vue +100 -98
- package/template/src/ui/src/components/datatable/Pagination.vue +153 -125
- package/template/src/ui/src/components/datatable/SelectOpption.vue +36 -35
- package/template/src/ui/src/components/datatable/index.vue +336 -258
- package/template/src/ui/src/env.d.ts +16 -13
- package/template/src/ui/src/global.d.ts +21 -2
- package/template/src/ui/src/helpers/nformatter.ts +12 -10
- package/template/src/ui/src/pages/dashboard/index.vue +690 -687
- package/template/src/ui/src/plugins/browserDetect.ts +57 -0
- package/template/src/ui/src/plugins/gum.ts +576 -549
- package/template/src/ui/src/plugins/pulse.ts +181 -147
- package/template/src/ui/src/plugins/routeProgress.ts +89 -0
- package/template/src/ui/src/router/index.ts +44 -25
- package/template/src/ui/src/stores/example.ts +2 -0
- package/template/src/ui/vite.config.ts +40 -38
- package/template/src/window/app-menu.ts +89 -87
- package/template/src/window/config.ts +14 -12
- package/template/src/window/context-menu.ts +23 -21
- package/template/src/window/dialogs.ts +92 -90
- package/template/src/window/manager.ts +2 -0
- package/template/src/window/native.ts +47 -45
- package/template/src/window/tray.ts +132 -130
|
@@ -1,98 +1,100 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
1
|
+
<!-- ./src/ui/src/components/datatable/DataTableSkeleton.vue -->
|
|
2
|
+
|
|
3
|
+
<template>
|
|
4
|
+
<div class="skeleton card border">
|
|
5
|
+
<div class="card-header border-bottom-0 pb-0 px-2 px-sm-3">
|
|
6
|
+
<div class="row align-items-center">
|
|
7
|
+
<div class="col-12 col-sm-6 col-lg-3 col-xl-3 mb-2 mb-lg-0 d-flex">
|
|
8
|
+
<div class="py-2 rounded-1 border bg-custom ps-3 me-2"></div>
|
|
9
|
+
<div class="form-control py-2 bg-custom"></div>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="col-12 col-sm-6 col-lg-4 col-xl-5 mb-2 mb-lg-0">
|
|
12
|
+
<slot name="extra-option"></slot>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="col-12 col-lg-5 col-xl-4">
|
|
15
|
+
<div class="row gx-1">
|
|
16
|
+
<div class="col-2 col-sm-4 col-md-6 col-lg-2 text-start text-lg-end">
|
|
17
|
+
<span class="form-control py-2 bg-custom"></span>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="mb-2 mb-sm-0 text-start col-6 col-sm-6 col-md-4 col-lg-7">
|
|
20
|
+
<span class="form-control py-2 bg-custom"></span>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="col-4 col-sm-2 col-md-2 col-lg-3 text-end">
|
|
23
|
+
<span class="bg-custom form-control py-2"></span>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="card-body py-3 px-2 px-sm-3">
|
|
30
|
+
<div class="table-responsive rounded-1">
|
|
31
|
+
<table class="table table-bordered table-striped table-sm align-middle m-0">
|
|
32
|
+
<thead>
|
|
33
|
+
<tr>
|
|
34
|
+
<th v-for="dt in colCount" :key="`h-${dt}`" class="bg-custom py-2"></th>
|
|
35
|
+
</tr>
|
|
36
|
+
</thead>
|
|
37
|
+
<tbody>
|
|
38
|
+
<tr v-for="r in rowCount" :key="`r-${r}`">
|
|
39
|
+
<td v-for="c in colCount" :key="`c-${r}-${c}`" class="bg-custom py-2"></td>
|
|
40
|
+
</tr>
|
|
41
|
+
</tbody>
|
|
42
|
+
</table>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="card-footer border-top-0 pt-0 px-2 px-sm-3">
|
|
46
|
+
<div class="row align-items-center">
|
|
47
|
+
<div class="col-12 col-md-5 mb-2 mb-md-0"></div>
|
|
48
|
+
<div class="col-12 col-md-7 text-center text-md-end">
|
|
49
|
+
<span class="form-control bg-custom py-2"></span>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<script setup lang="ts">
|
|
57
|
+
import { computed, useAttrs } from "vue";
|
|
58
|
+
|
|
59
|
+
defineOptions({ inheritAttrs: false });
|
|
60
|
+
|
|
61
|
+
const $attrs = useAttrs();
|
|
62
|
+
const colCount = computed(() => Number($attrs.col ?? 1));
|
|
63
|
+
const rowCount = computed(() => Number($attrs.row ?? 1));
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<style lang="scss" scoped>
|
|
67
|
+
table,
|
|
68
|
+
tr,
|
|
69
|
+
th,
|
|
70
|
+
td {
|
|
71
|
+
border-color: #cccccc;
|
|
72
|
+
animation: anim 3s infinite;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.bg-custom {
|
|
76
|
+
animation: anim 3s infinite;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@keyframes anim {
|
|
80
|
+
0% {
|
|
81
|
+
background-color: #efefef;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
25% {
|
|
85
|
+
background-color: #f8f8f8;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
50% {
|
|
89
|
+
background-color: #efefef;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
75% {
|
|
93
|
+
background-color: #f8f8f8;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
100% {
|
|
97
|
+
background-color: #efefef;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
@@ -1,125 +1,153 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</li>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
1
|
+
<!-- ./src/ui/src/components/datatable/Pagination.vue -->
|
|
2
|
+
|
|
3
|
+
<template>
|
|
4
|
+
<div class="row">
|
|
5
|
+
<div class="col-12 col-md-6 mb-3 mb-md-0">
|
|
6
|
+
<div class="py-2 text-center text-md-start">
|
|
7
|
+
Showing {{ nFormatter(page.from) }} to {{ nFormatter(page.to) }} of {{ nFormatter(page.total) }} entries
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="col-12 col-md-6">
|
|
11
|
+
<nav :class="['datatable-pagination', `pagination-${variant}`]" aria-label="Page navigation">
|
|
12
|
+
<ul class="pagination justify-content-center justify-content-md-end">
|
|
13
|
+
<!-- First -->
|
|
14
|
+
<li :class="['page-item', { disabled: noPreviousPage }]">
|
|
15
|
+
<button
|
|
16
|
+
type="button"
|
|
17
|
+
class="page-link"
|
|
18
|
+
:aria-disabled="noPreviousPage ? 'true' : 'false'"
|
|
19
|
+
:tabindex="noPreviousPage ? -1 : 0"
|
|
20
|
+
@click.prevent="!noPreviousPage && change(1)"
|
|
21
|
+
>
|
|
22
|
+
<i class="bi bi-chevron-double-left"></i>
|
|
23
|
+
</button>
|
|
24
|
+
</li>
|
|
25
|
+
|
|
26
|
+
<!-- Prev -->
|
|
27
|
+
<li :class="['page-item', { disabled: noPreviousPage }]">
|
|
28
|
+
<button
|
|
29
|
+
type="button"
|
|
30
|
+
class="page-link"
|
|
31
|
+
:aria-disabled="noPreviousPage ? 'true' : 'false'"
|
|
32
|
+
:tabindex="noPreviousPage ? -1 : 0"
|
|
33
|
+
@click.prevent="!noPreviousPage && change(page.current_page - 1)"
|
|
34
|
+
>
|
|
35
|
+
<i class="bi bi-chevron-left"></i>
|
|
36
|
+
</button>
|
|
37
|
+
</li>
|
|
38
|
+
|
|
39
|
+
<li class="page-item">
|
|
40
|
+
<div class="input-group input-group-sm">
|
|
41
|
+
<Input
|
|
42
|
+
v-model="page.page"
|
|
43
|
+
type="text"
|
|
44
|
+
category="number"
|
|
45
|
+
topclass="m-0"
|
|
46
|
+
class="text-center"
|
|
47
|
+
style="width: 100px"
|
|
48
|
+
@keyup.enter="change(page.page)"
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
</li>
|
|
52
|
+
|
|
53
|
+
<li class="page-item">
|
|
54
|
+
<span class="page-link text-nowrap"> of {{ nFormatter(page.last_page) }} </span>
|
|
55
|
+
</li>
|
|
56
|
+
|
|
57
|
+
<!-- Next -->
|
|
58
|
+
<li :class="['page-item', { disabled: noNextPage }]">
|
|
59
|
+
<button
|
|
60
|
+
type="button"
|
|
61
|
+
class="page-link"
|
|
62
|
+
:aria-disabled="noNextPage ? 'true' : 'false'"
|
|
63
|
+
:tabindex="noNextPage ? -1 : 0"
|
|
64
|
+
@click.prevent="!noNextPage && change(page.current_page + 1)"
|
|
65
|
+
>
|
|
66
|
+
<i class="bi bi-chevron-right"></i>
|
|
67
|
+
</button>
|
|
68
|
+
</li>
|
|
69
|
+
|
|
70
|
+
<!-- Last -->
|
|
71
|
+
<li :class="['page-item', { disabled: noNextPage }]">
|
|
72
|
+
<button
|
|
73
|
+
type="button"
|
|
74
|
+
class="page-link"
|
|
75
|
+
:aria-disabled="noNextPage ? 'true' : 'false'"
|
|
76
|
+
:tabindex="noNextPage ? -1 : 0"
|
|
77
|
+
@click.prevent="!noNextPage && change(page.last_page)"
|
|
78
|
+
>
|
|
79
|
+
<i class="bi bi-chevron-double-right"></i>
|
|
80
|
+
</button>
|
|
81
|
+
</li>
|
|
82
|
+
</ul>
|
|
83
|
+
</nav>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
87
|
+
|
|
88
|
+
<script setup lang="ts">
|
|
89
|
+
import { computed, reactive, watchEffect } from "vue";
|
|
90
|
+
import Input from "@/ui/components/Input.vue";
|
|
91
|
+
import { formatCompactNumber } from "@/ui/helpers/nformatter";
|
|
92
|
+
|
|
93
|
+
interface PaginationData {
|
|
94
|
+
current_page: number;
|
|
95
|
+
last_page: number;
|
|
96
|
+
per_page: number;
|
|
97
|
+
total: number;
|
|
98
|
+
from: number | null;
|
|
99
|
+
to: number | null;
|
|
100
|
+
path: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
interface PaginationProps {
|
|
104
|
+
data: PaginationData;
|
|
105
|
+
variant?: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const props = withDefaults(defineProps<PaginationProps>(), {
|
|
109
|
+
variant: "dark"
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const emit = defineEmits<(event: "change", value: string | number) => void>();
|
|
113
|
+
|
|
114
|
+
const page = reactive({ page: 1, from: 0, to: 0, total: 0, last_page: 1, current_page: 1 });
|
|
115
|
+
|
|
116
|
+
const noPreviousPage = computed(() => page.current_page - 1 <= 0);
|
|
117
|
+
const noNextPage = computed(() => page.current_page + 1 > page.last_page);
|
|
118
|
+
|
|
119
|
+
const change = (pageNo: string | number) => emit("change", pageNo);
|
|
120
|
+
|
|
121
|
+
const nFormatter = formatCompactNumber;
|
|
122
|
+
|
|
123
|
+
watchEffect(() => {
|
|
124
|
+
page.page = props.data.current_page;
|
|
125
|
+
page.from = props.data.from ?? (props.data.current_page - 1) * props.data.per_page + 1;
|
|
126
|
+
page.to = props.data.to ?? Math.min(props.data.current_page * props.data.per_page, props.data.total);
|
|
127
|
+
page.total = props.data.total;
|
|
128
|
+
page.last_page = props.data.last_page;
|
|
129
|
+
page.current_page = props.data.current_page;
|
|
130
|
+
});
|
|
131
|
+
</script>
|
|
132
|
+
|
|
133
|
+
<style lang="scss" scoped>
|
|
134
|
+
ul.pagination {
|
|
135
|
+
margin: 0;
|
|
136
|
+
|
|
137
|
+
:deep(.page-item.disabled .page-link),
|
|
138
|
+
:deep(.page-link:disabled),
|
|
139
|
+
:deep(.page-link[aria-disabled="true"]) {
|
|
140
|
+
pointer-events: none;
|
|
141
|
+
cursor: not-allowed;
|
|
142
|
+
opacity: 0.5;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.page-link {
|
|
146
|
+
border-radius: 5px !important;
|
|
147
|
+
margin-left: 0;
|
|
148
|
+
border-color: var(--bs-pagination-border-color, #cdcdcd) !important;
|
|
149
|
+
color: inherit;
|
|
150
|
+
box-shadow: none;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
</style>
|
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
</
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
<!-- ./src/ui/src/components/datatable/SelectOpption.vue -->
|
|
2
|
+
|
|
3
|
+
<template>
|
|
4
|
+
<div
|
|
5
|
+
class="d-flex align-items-center justify-content-center justify-content-md-start mb-2 mb-md-0"
|
|
6
|
+
:class="{ 'd-none': !props.isOptions }"
|
|
7
|
+
>
|
|
8
|
+
Show
|
|
9
|
+
<select :value="selectedoption" class="form-select shadow-none w-auto mx-2" @change="onChange">
|
|
10
|
+
<option v-for="(val, i) in props.option" :key="i" :value="val">{{ val }}</option>
|
|
11
|
+
</select>
|
|
12
|
+
entries
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
interface SelectOptionProps {
|
|
18
|
+
isOptions?: boolean;
|
|
19
|
+
option?: Array<string | number>;
|
|
20
|
+
selectedoption?: string | number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const props = withDefaults(defineProps<SelectOptionProps>(), {
|
|
24
|
+
isOptions: true,
|
|
25
|
+
option: () => []
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const emit = defineEmits<(event: "change", value: string | number) => void>();
|
|
29
|
+
|
|
30
|
+
const onChange = (e: Event) => {
|
|
31
|
+
const target = e.target as HTMLSelectElement;
|
|
32
|
+
emit("change", target.value);
|
|
33
|
+
};
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<style lang="scss" scoped></style>
|