shared-ritm 1.2.63 → 1.2.65

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 (48) hide show
  1. package/README.md +103 -103
  2. package/dist/index.css +1 -1
  3. package/dist/shared-ritm.es.js +4462 -4455
  4. package/dist/shared-ritm.umd.js +7 -7
  5. package/dist/types/common/app-table/controllers/useTableModel.d.ts +1 -1
  6. package/package.json +63 -63
  7. package/src/api/services/ControlsService.ts +64 -64
  8. package/src/api/services/GanttService.ts +17 -17
  9. package/src/api/services/InstrumentsService.ts +22 -22
  10. package/src/api/services/MetricsService.ts +109 -109
  11. package/src/api/services/ProjectsService.ts +67 -67
  12. package/src/api/services/RepairsService.ts +100 -100
  13. package/src/api/services/VideoService.ts +14 -14
  14. package/src/api/types/Api_Files.ts +1 -1
  15. package/src/api/types/Api_Instruments.ts +133 -133
  16. package/src/api/types/Api_Projects.ts +55 -55
  17. package/src/api/types/Api_Repairs.ts +93 -93
  18. package/src/api/types/Api_Tasks.ts +155 -155
  19. package/src/common/app-checkbox/AppCheckbox.vue +26 -26
  20. package/src/common/app-dialogs/AppConfirmDialog.vue +99 -99
  21. package/src/common/app-dropdown/AppDropdown.vue +31 -31
  22. package/src/common/app-select/AppSelect.vue +157 -157
  23. package/src/common/app-sheet/AppSheet.vue +120 -120
  24. package/src/common/app-sidebar/components/SidebarMenuItem.vue +148 -148
  25. package/src/common/app-table/AppTable.vue +250 -241
  26. package/src/common/app-table/AppTableLayout.vue +111 -102
  27. package/src/common/app-table/components/ModalSelect.vue +264 -264
  28. package/src/common/app-table/components/TableModal.vue +329 -329
  29. package/src/common/app-table/components/TablePagination.vue +152 -150
  30. package/src/common/app-table/components/TableSearch.vue +76 -76
  31. package/src/common/app-table/controllers/useBaseTable.ts +42 -42
  32. package/src/common/app-table/controllers/useColumnSelector.ts +38 -38
  33. package/src/common/app-table/controllers/useTableModel.ts +93 -93
  34. package/src/common/app-toggle/AppToggle.vue +23 -23
  35. package/src/common/app-wrapper/AppWrapper.vue +28 -28
  36. package/src/icons/components/table-filter-icon.vue +30 -30
  37. package/src/icons/dialogs/RemoveIcon.vue +12 -12
  38. package/src/icons/dialogs/SafetyIcon.vue +12 -12
  39. package/src/icons/task/attention-icon.vue +13 -13
  40. package/src/icons/task/clock-icon.vue +10 -10
  41. package/src/icons/task/delete-icon.vue +10 -10
  42. package/src/icons/task/fire-icon.vue +16 -16
  43. package/src/index.ts +89 -89
  44. package/src/shared/styles/general.css +125 -125
  45. package/src/styles/variables.sass +12 -12
  46. package/src/utils/confirm.ts +12 -12
  47. package/src/utils/helpers.ts +39 -39
  48. package/src/utils/notification.ts +9 -9
@@ -1,102 +1,111 @@
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
- <script setup lang="ts">
35
- import AppTable from './AppTable.vue'
36
- import AppTablePagination from '../app-table/components/TablePagination.vue'
37
- import AppTableSearch from '../app-table/components/TableSearch.vue'
38
- import { defineProps, defineEmits } from 'vue'
39
-
40
- const props = defineProps<{
41
- search: string
42
- loading: boolean
43
- currentPage: number
44
- totalPages: number
45
- tableProps: any
46
- tableEvents: any
47
- onSearch: (val: string) => void
48
- onPageChange: (page: number) => void
49
- actionsSlot?: boolean
50
- modalSlot?: boolean
51
- selectedRows: any[]
52
- }>()
53
- const emit = defineEmits<{
54
- 'update:selectedRows': [rows: any[]]
55
- }>()
56
- </script>
57
- <style scoped lang="scss">
58
- .table-layout {
59
- height: calc(100vh - 100px);
60
- display: flex;
61
- flex-direction: column;
62
- box-sizing: border-box;
63
- }
64
- .table-controls {
65
- display: flex;
66
- align-items: center;
67
- justify-content: space-between;
68
- gap: 18px;
69
- margin-bottom: 20px;
70
-
71
- .search-input {
72
- flex: 1;
73
- }
74
-
75
- ::v-deep(.q-btn) {
76
- flex-shrink: 0;
77
- border-radius: 2px;
78
- background: #fff;
79
- box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
80
- color: #3f8cff;
81
- height: 50px;
82
- width: 50px;
83
- }
84
- }
85
- .table-wrapper {
86
- position: relative;
87
- flex: 1;
88
- overflow-y: auto;
89
- }
90
- .loader-overlay {
91
- position: absolute;
92
- inset: 0;
93
- z-index: 10;
94
- background: rgba(255, 255, 255, 0.8);
95
- display: flex;
96
- align-items: center;
97
- justify-content: center;
98
- }
99
- .loader-spinner {
100
- z-index: 11;
101
- }
102
- </style>
1
+ <template>
2
+ <div class="table-layout" :class="{ 'hide-search': !actionsSlot && hideSearch }">
3
+ <div v-if="actionsSlot || !hideSearch" class="table-controls">
4
+ <app-table-search
5
+ v-if="!hideSearch"
6
+ :model-value="props.search"
7
+ class="search-input"
8
+ placeholder="Введите наименование"
9
+ @search="props.onSearch"
10
+ />
11
+ <slot v-if="actionsSlot" name="actions" />
12
+ </div>
13
+
14
+ <div class="table-wrapper">
15
+ <app-table
16
+ v-bind="props.tableProps"
17
+ :selected-rows="props.selectedRows"
18
+ :no-hover="noHover"
19
+ v-on="props.tableEvents"
20
+ @update:selectedRows="rows => emit('update:selectedRows', rows)"
21
+ />
22
+ <div v-if="props.loading" class="loader-overlay">
23
+ <q-spinner-audio class="loader-spinner" size="md" :thickness="3" color="primary" />
24
+ </div>
25
+ </div>
26
+
27
+ <app-table-pagination
28
+ :model-value="props.currentPage"
29
+ :total-pages="props.totalPages"
30
+ @page-change="props.onPageChange"
31
+ />
32
+
33
+ <slot v-if="modalSlot" name="modal" />
34
+ </div>
35
+ </template>
36
+ <script setup lang="ts">
37
+ import AppTable from './AppTable.vue'
38
+ import AppTablePagination from '../app-table/components/TablePagination.vue'
39
+ import AppTableSearch from '../app-table/components/TableSearch.vue'
40
+ import { defineProps, defineEmits } from 'vue'
41
+
42
+ const props = defineProps<{
43
+ search: string
44
+ loading: boolean
45
+ currentPage: number
46
+ totalPages: number
47
+ tableProps: any
48
+ tableEvents: any
49
+ onSearch: (val: string) => void
50
+ onPageChange: (page: number) => void
51
+ actionsSlot?: boolean
52
+ modalSlot?: boolean
53
+ hideSearch?: boolean
54
+ noHover?: boolean
55
+ selectedRows: any[]
56
+ }>()
57
+ const emit = defineEmits<{
58
+ 'update:selectedRows': [rows: any[]]
59
+ }>()
60
+ </script>
61
+ <style scoped lang="scss">
62
+ .table-layout {
63
+ height: 100%;
64
+ display: grid;
65
+ grid-template-rows: auto 1fr auto;
66
+ gap: 1.25rem;
67
+ box-sizing: border-box;
68
+ overflow: auto;
69
+
70
+ &.hide-search {
71
+ grid-template-rows: 1fr auto;
72
+ }
73
+ }
74
+ .table-controls {
75
+ display: flex;
76
+ align-items: center;
77
+ justify-content: space-between;
78
+ gap: 1.25rem;
79
+
80
+ .search-input {
81
+ flex: 1;
82
+ }
83
+
84
+ ::v-deep(.q-btn) {
85
+ flex-shrink: 0;
86
+ border-radius: 2px;
87
+ background: #fff;
88
+ box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
89
+ color: #3f8cff;
90
+ height: 50px;
91
+ width: 50px;
92
+ }
93
+ }
94
+ .table-wrapper {
95
+ position: relative;
96
+ flex: 1;
97
+ overflow-y: auto;
98
+ }
99
+ .loader-overlay {
100
+ position: absolute;
101
+ inset: 0;
102
+ z-index: 10;
103
+ background: rgba(255, 255, 255, 0.8);
104
+ display: flex;
105
+ align-items: center;
106
+ justify-content: center;
107
+ }
108
+ .loader-spinner {
109
+ z-index: 11;
110
+ }
111
+ </style>