shared-ritm 1.2.54 → 1.2.56

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.
@@ -1,104 +1,104 @@
1
- <template>
2
- <div class="table-layout">
3
- <div class="table-controls">
4
- <app-table-search
5
- :model-value="props.search"
6
- class="search-input"
7
- placeholder="Введите наименование"
8
- @search="props.onSearch"
9
- />
10
- <slot v-if="actionsSlot" name="actions" />
11
- </div>
12
-
13
- <div class="table-wrapper">
14
- <app-table
15
- v-bind="props.tableProps"
16
- :selected-rows="props.selectedRows"
17
- v-on="props.tableEvents"
18
- @update:selectedRows="rows => emit('update:selectedRows', rows)"
19
- />
20
- <div v-if="props.loading" class="loader-overlay">
21
- <q-spinner-audio class="loader-spinner" size="md" :thickness="3" color="primary" />
22
- </div>
23
- </div>
24
-
25
- <app-table-pagination
26
- :model-value="props.currentPage"
27
- :total-pages="props.totalPages"
28
- @page-change="props.onPageChange"
29
- />
30
-
31
- <slot v-if="modalSlot" name="modal" />
32
- </div>
33
- </template>
34
-
35
- <script setup lang="ts">
36
- import AppTable from './AppTable.vue'
37
- import AppTablePagination from '../app-table/components/TablePagination.vue'
38
- import AppTableSearch from '../app-table/components/TableSearch.vue'
39
- import { defineProps, defineEmits } from 'vue'
40
-
41
- const emit = defineEmits<{
42
- 'update:selectedRows': [rows: any[]]
43
- }>()
44
- const props = defineProps<{
45
- search: string
46
- loading: boolean
47
- currentPage: number
48
- totalPages: number
49
- tableProps: any
50
- tableEvents: any
51
- onSearch: (val: string) => void
52
- onPageChange: (page: number) => void
53
- actionsSlot?: boolean
54
- modalSlot?: boolean
55
- selectedRows: any[]
56
- }>()
57
- </script>
58
-
59
- <style scoped lang="scss">
60
- .table-layout {
61
- height: calc(100vh - 100px);
62
- display: flex;
63
- flex-direction: column;
64
- box-sizing: border-box;
65
- }
66
- .table-controls {
67
- display: flex;
68
- align-items: center;
69
- justify-content: space-between;
70
- gap: 18px;
71
- margin-bottom: 20px;
72
-
73
- .search-input {
74
- flex: 1;
75
- }
76
-
77
- ::v-deep(.q-btn) {
78
- flex-shrink: 0;
79
- border-radius: 2px;
80
- background: #fff;
81
- box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
82
- color: #3f8cff;
83
- height: 50px;
84
- width: 50px;
85
- }
86
- }
87
- .table-wrapper {
88
- position: relative;
89
- flex: 1;
90
- overflow-y: auto;
91
- }
92
- .loader-overlay {
93
- position: absolute;
94
- inset: 0;
95
- z-index: 10;
96
- background: rgba(255, 255, 255, 0.8);
97
- display: flex;
98
- align-items: center;
99
- justify-content: center;
100
- }
101
- .loader-spinner {
102
- z-index: 11;
103
- }
104
- </style>
1
+ <script setup lang="ts">
2
+ import AppTable from './AppTable.vue'
3
+ import AppTablePagination from '../app-table/components/TablePagination.vue'
4
+ import AppTableSearch from '../app-table/components/TableSearch.vue'
5
+ import { defineProps, defineEmits } from 'vue'
6
+
7
+ const emit = defineEmits<{
8
+ 'update:selectedRows': [rows: any[]]
9
+ }>()
10
+ const props = defineProps<{
11
+ search: string
12
+ loading: boolean
13
+ currentPage: number
14
+ totalPages: number
15
+ tableProps: any
16
+ tableEvents: any
17
+ onSearch: (val: string) => void
18
+ onPageChange: (page: number) => void
19
+ actionsSlot?: boolean
20
+ modalSlot?: boolean
21
+ selectedRows: any[]
22
+ }>()
23
+ </script>
24
+
25
+ <template>
26
+ <div class="table-layout">
27
+ <div class="table-controls">
28
+ <app-table-search
29
+ :model-value="props.search"
30
+ class="search-input"
31
+ placeholder="Введите наименование"
32
+ @search="props.onSearch"
33
+ />
34
+ <slot v-if="actionsSlot" name="actions" />
35
+ </div>
36
+
37
+ <div class="table-wrapper">
38
+ <app-table
39
+ v-bind="props.tableProps"
40
+ :selected-rows="props.selectedRows"
41
+ v-on="props.tableEvents"
42
+ @update:selectedRows="rows => emit('update:selectedRows', rows)"
43
+ />
44
+ <div v-if="props.loading" class="loader-overlay">
45
+ <q-spinner-audio class="loader-spinner" size="md" :thickness="3" color="primary" />
46
+ </div>
47
+ </div>
48
+
49
+ <app-table-pagination
50
+ :model-value="props.currentPage"
51
+ :total-pages="props.totalPages"
52
+ @page-change="props.onPageChange"
53
+ />
54
+
55
+ <slot v-if="modalSlot" name="modal" />
56
+ </div>
57
+ </template>
58
+
59
+ <style scoped lang="scss">
60
+ .table-layout {
61
+ height: calc(100vh - 100px);
62
+ display: flex;
63
+ flex-direction: column;
64
+ box-sizing: border-box;
65
+ }
66
+ .table-controls {
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: space-between;
70
+ gap: 18px;
71
+ margin-bottom: 20px;
72
+
73
+ .search-input {
74
+ flex: 1;
75
+ }
76
+
77
+ ::v-deep(.q-btn) {
78
+ flex-shrink: 0;
79
+ border-radius: 2px;
80
+ background: #fff;
81
+ box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
82
+ color: #3f8cff;
83
+ height: 50px;
84
+ width: 50px;
85
+ }
86
+ }
87
+ .table-wrapper {
88
+ position: relative;
89
+ flex: 1;
90
+ overflow-y: auto;
91
+ }
92
+ .loader-overlay {
93
+ position: absolute;
94
+ inset: 0;
95
+ z-index: 10;
96
+ background: rgba(255, 255, 255, 0.8);
97
+ display: flex;
98
+ align-items: center;
99
+ justify-content: center;
100
+ }
101
+ .loader-spinner {
102
+ z-index: 11;
103
+ }
104
+ </style>