shared-ritm 1.2.95 → 1.2.97

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,45 +1,45 @@
1
- import { ref, watch, onMounted, Ref } from 'vue'
2
-
3
- export function useBaseTable(model: {
4
- initialize: (params: { search: string; page: number }) => Promise<void>
5
- loading: Ref<boolean>
6
- columnFilters: Ref<Record<string, any>>
7
- }) {
8
- const search = ref('')
9
- const currentPage = ref(1)
10
-
11
- const loadTable = async (searchVal = '', pageVal = 1) => {
12
- await model.initialize({ search: searchVal, page: pageVal })
13
- }
14
-
15
- const handleSearch = async (val: string) => {
16
- search.value = val
17
- currentPage.value = 1
18
- await loadTable(val, currentPage.value)
19
- }
20
-
21
- const handlePageChange = async (page: number) => {
22
- currentPage.value = page
23
- await loadTable(search.value, page)
24
- }
25
-
26
- watch(
27
- () => model.columnFilters.value,
28
- async () => {
29
- currentPage.value = 1
30
- await loadTable(search.value, currentPage.value)
31
- },
32
- { deep: true },
33
- )
34
-
35
- onMounted(() => loadTable(search.value, currentPage.value))
36
-
37
- return {
38
- search,
39
- currentPage,
40
- loading: model.loading,
41
- handleSearch,
42
- handlePageChange,
43
- loadTable,
44
- }
45
- }
1
+ import { ref, watch, onMounted, Ref } from 'vue'
2
+
3
+ export function useBaseTable(model: {
4
+ initialize: (params: { search: string; page: number }) => Promise<void>
5
+ loading: Ref<boolean>
6
+ columnFilters: Ref<Record<string, any>>
7
+ }) {
8
+ const search = ref('')
9
+ const currentPage = ref(1)
10
+
11
+ const loadTable = async (searchVal = '', pageVal = 1) => {
12
+ await model.initialize({ search: searchVal, page: pageVal })
13
+ }
14
+
15
+ const handleSearch = async (val: string) => {
16
+ search.value = val
17
+ currentPage.value = 1
18
+ await loadTable(val, currentPage.value)
19
+ }
20
+
21
+ const handlePageChange = async (page: number) => {
22
+ currentPage.value = page
23
+ await loadTable(search.value, page)
24
+ }
25
+
26
+ watch(
27
+ () => model.columnFilters.value,
28
+ async () => {
29
+ currentPage.value = 1
30
+ await loadTable(search.value, currentPage.value)
31
+ },
32
+ { deep: true },
33
+ )
34
+
35
+ onMounted(() => loadTable(search.value, currentPage.value))
36
+
37
+ return {
38
+ search,
39
+ currentPage,
40
+ loading: model.loading,
41
+ handleSearch,
42
+ handlePageChange,
43
+ loadTable,
44
+ }
45
+ }
package/src/index.ts CHANGED
@@ -1,113 +1,113 @@
1
- import './shared/styles/general.css'
2
- import AppButton from './common/app-button/AppButton.vue'
3
- import AppCheckbox from './common/app-checkbox/AppCheckbox.vue'
4
- import AppDatePicker from './common/app-date-picker/AppDatePicker.vue'
5
- import AppDatepicker from './common/app-datepicker/AppDatepicker.vue'
6
- import AppInput from './common/app-input/AppInput.vue'
7
- import AppInputNew from './common/app-input-new/AppInputNew.vue'
8
- import AppInputSearch from './common/app-input-search/AppInputSearch.vue'
9
- import AppLayout from './common/app-layout/AppLayout.vue'
10
- import AppLayoutHeader from './common/app-layout/components/AppLayoutHeader.vue'
11
- import AppLayoutPage from './common/app-layout/components/AppLayoutPage.vue'
12
- import AppLoader from './common/app-loader/index.vue'
13
- import AppSelect from './common/app-select/AppSelect.vue'
14
- import AppSheet from './common/app-sheet/AppSheet.vue'
15
- import AppSheetNew from '@/common/app-sheet-new/AppSheetNew.vue'
16
- import AppSidebar from './common/app-sidebar/AppSidebar.vue'
17
- import AppToggle from './common/app-toggle/AppToggle.vue'
18
- import AppWrapper from './common/app-wrapper/AppWrapper.vue'
19
- import AppConfirmDialog from './common/app-dialogs/AppConfirmDialog.vue'
20
- import AppDropdown from './common/app-dropdown/AppDropdown.vue'
21
- import AppTablePagination from './common/app-table/components/TablePagination.vue'
22
- import AppTableSearch from './common/app-table/components/TableSearch.vue'
23
- import AppTableModal from './common/app-table/components/TableModal.vue'
24
- import AppTable from './common/app-table/AppTable.vue'
25
- import AppTableLayout from './common/app-table/AppTableLayout.vue'
26
- import AppModalSelect from './common/app-table/components/ModalSelect.vue'
27
-
28
- import ApiService from './api/settings/ApiService'
29
- import useGanttService from './api/services/GanttService'
30
- import useMetricsService from './api/services/MetricsService'
31
- import useProjectsService from './api/services/ProjectsService'
32
- import useRepairsService from './api/services/RepairsService'
33
- import useTasksService from './api/services/TasksService'
34
- import useAuthService from './api/services/AuthService'
35
- import useFileService from './api/services/FileService'
36
- import useVideoService from './api/services/VideoService'
37
- import useUserService from './api/services/UserService'
38
- import useInstrumentsService from './api/services/InstrumentsService'
39
- import useControlsService from './api/services/ControlsService'
40
- import useSearchService from './api/services/SearchService'
41
- import useCommentsService from './api/services/CommentsService'
42
-
43
- import useFaceApiHelper from './utils/faceApiHelper'
44
-
45
- export {
46
- AppButton,
47
- AppCheckbox,
48
- AppDatepicker,
49
- AppDatePicker,
50
- AppInput,
51
- AppInputNew,
52
- AppInputSearch,
53
- AppLayout,
54
- AppLayoutHeader,
55
- AppLayoutPage,
56
- AppLoader,
57
- AppSelect,
58
- AppSheet,
59
- AppSheetNew,
60
- AppSidebar,
61
- AppToggle,
62
- AppWrapper,
63
- AppConfirmDialog,
64
- AppDropdown,
65
- AppTablePagination,
66
- AppTableSearch,
67
- AppTableModal,
68
- AppTable,
69
- AppTableLayout,
70
- AppModalSelect,
71
- }
72
-
73
- export {
74
- ApiService,
75
- useAuthService,
76
- useGanttService,
77
- useMetricsService,
78
- useProjectsService,
79
- useRepairsService,
80
- useTasksService,
81
- useFileService,
82
- useControlsService,
83
- useVideoService,
84
- useUserService,
85
- useInstrumentsService,
86
- useSearchService,
87
- useCommentsService,
88
- useFaceApiHelper,
89
- }
90
-
91
- export { useBaseTable } from './common/app-table/controllers/useBaseTable'
92
- export { useTableModel } from './common/app-table/controllers/useTableModel'
93
- export { useColumnSelector } from './common/app-table/controllers/useColumnSelector'
94
-
95
- export type { FilterOption, TableModel, TableColumn } from './common/app-table/controllers/useTableModel'
96
-
97
- export type { NotificationType } from './utils/notification'
98
- export { notificationSettings } from './utils/notification'
99
-
100
- export * from './utils/helpers'
101
-
102
- export * from './api/types/Api_Service'
103
- export * from './api/types/Api_Tasks'
104
- export * from './api/types/Api_Repairs'
105
- export * from './api/types/Api_Projects'
106
- export * from './api/types/Api_Controls'
107
- export * from './api/types/Api_Instruments'
108
- export * from './api/types/Api_Search'
109
- export * from './api/types/Api_User'
110
- export * from './api/types/Api_Comment'
111
- export * from './api/types/Api_Files'
112
- export * from './api/types/Api_Video'
113
- // export * from '../types/Api_Metrics'
1
+ import './shared/styles/general.css'
2
+ import AppButton from './common/app-button/AppButton.vue'
3
+ import AppCheckbox from './common/app-checkbox/AppCheckbox.vue'
4
+ import AppDatePicker from './common/app-date-picker/AppDatePicker.vue'
5
+ import AppDatepicker from './common/app-datepicker/AppDatepicker.vue'
6
+ import AppInput from './common/app-input/AppInput.vue'
7
+ import AppInputNew from './common/app-input-new/AppInputNew.vue'
8
+ import AppInputSearch from './common/app-input-search/AppInputSearch.vue'
9
+ import AppLayout from './common/app-layout/AppLayout.vue'
10
+ import AppLayoutHeader from './common/app-layout/components/AppLayoutHeader.vue'
11
+ import AppLayoutPage from './common/app-layout/components/AppLayoutPage.vue'
12
+ import AppLoader from './common/app-loader/index.vue'
13
+ import AppSelect from './common/app-select/AppSelect.vue'
14
+ import AppSheet from './common/app-sheet/AppSheet.vue'
15
+ import AppSheetNew from '@/common/app-sheet-new/AppSheetNew.vue'
16
+ import AppSidebar from './common/app-sidebar/AppSidebar.vue'
17
+ import AppToggle from './common/app-toggle/AppToggle.vue'
18
+ import AppWrapper from './common/app-wrapper/AppWrapper.vue'
19
+ import AppConfirmDialog from './common/app-dialogs/AppConfirmDialog.vue'
20
+ import AppDropdown from './common/app-dropdown/AppDropdown.vue'
21
+ import AppTablePagination from './common/app-table/components/TablePagination.vue'
22
+ import AppTableSearch from './common/app-table/components/TableSearch.vue'
23
+ import AppTableModal from './common/app-table/components/TableModal.vue'
24
+ import AppTable from './common/app-table/AppTable.vue'
25
+ import AppTableLayout from './common/app-table/AppTableLayout.vue'
26
+ import AppModalSelect from './common/app-table/components/ModalSelect.vue'
27
+
28
+ import ApiService from './api/settings/ApiService'
29
+ import useGanttService from './api/services/GanttService'
30
+ import useMetricsService from './api/services/MetricsService'
31
+ import useProjectsService from './api/services/ProjectsService'
32
+ import useRepairsService from './api/services/RepairsService'
33
+ import useTasksService from './api/services/TasksService'
34
+ import useAuthService from './api/services/AuthService'
35
+ import useFileService from './api/services/FileService'
36
+ import useVideoService from './api/services/VideoService'
37
+ import useUserService from './api/services/UserService'
38
+ import useInstrumentsService from './api/services/InstrumentsService'
39
+ import useControlsService from './api/services/ControlsService'
40
+ import useSearchService from './api/services/SearchService'
41
+ import useCommentsService from './api/services/CommentsService'
42
+
43
+ import useFaceApiHelper from './utils/faceApiHelper'
44
+
45
+ export {
46
+ AppButton,
47
+ AppCheckbox,
48
+ AppDatepicker,
49
+ AppDatePicker,
50
+ AppInput,
51
+ AppInputNew,
52
+ AppInputSearch,
53
+ AppLayout,
54
+ AppLayoutHeader,
55
+ AppLayoutPage,
56
+ AppLoader,
57
+ AppSelect,
58
+ AppSheet,
59
+ AppSheetNew,
60
+ AppSidebar,
61
+ AppToggle,
62
+ AppWrapper,
63
+ AppConfirmDialog,
64
+ AppDropdown,
65
+ AppTablePagination,
66
+ AppTableSearch,
67
+ AppTableModal,
68
+ AppTable,
69
+ AppTableLayout,
70
+ AppModalSelect,
71
+ }
72
+
73
+ export {
74
+ ApiService,
75
+ useAuthService,
76
+ useGanttService,
77
+ useMetricsService,
78
+ useProjectsService,
79
+ useRepairsService,
80
+ useTasksService,
81
+ useFileService,
82
+ useControlsService,
83
+ useVideoService,
84
+ useUserService,
85
+ useInstrumentsService,
86
+ useSearchService,
87
+ useCommentsService,
88
+ useFaceApiHelper,
89
+ }
90
+
91
+ export { useBaseTable } from './common/app-table/controllers/useBaseTable'
92
+ export { useTableModel } from './common/app-table/controllers/useTableModel'
93
+ export { useColumnSelector } from './common/app-table/controllers/useColumnSelector'
94
+
95
+ export type { FilterOption, TableModel, TableColumn } from './common/app-table/controllers/useTableModel'
96
+
97
+ export type { NotificationType } from './utils/notification'
98
+ export { notificationSettings } from './utils/notification'
99
+
100
+ export * from './utils/helpers'
101
+
102
+ export * from './api/types/Api_Service'
103
+ export * from './api/types/Api_Tasks'
104
+ export * from './api/types/Api_Repairs'
105
+ export * from './api/types/Api_Projects'
106
+ export * from './api/types/Api_Controls'
107
+ export * from './api/types/Api_Instruments'
108
+ export * from './api/types/Api_Search'
109
+ export * from './api/types/Api_User'
110
+ export * from './api/types/Api_Comment'
111
+ export * from './api/types/Api_Files'
112
+ export * from './api/types/Api_Video'
113
+ // export * from '../types/Api_Metrics'
@@ -1,12 +1,12 @@
1
- $primary : #1976D2
2
- $secondary : #C4C4C4
3
- $accent : #665BA6
4
- $positive : #3B9F69
5
- $negative : #C10015
6
- $info : #31CCEC
7
- $warning : #F2C037
8
-
9
- $dark : #1D1D1D
10
- $dark-page : #121212
11
-
12
- $secondary: #1D1D1D
1
+ $primary : #1976D2
2
+ $secondary : #C4C4C4
3
+ $accent : #665BA6
4
+ $positive : #3B9F69
5
+ $negative : #C10015
6
+ $info : #31CCEC
7
+ $warning : #F2C037
8
+
9
+ $dark : #1D1D1D
10
+ $dark-page : #121212
11
+
12
+ $secondary: #1D1D1D