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