shared-ritm 1.2.41 → 1.2.43
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/dist/index.css +1 -1
- package/dist/shared-ritm.es.js +1036 -1047
- package/dist/shared-ritm.umd.js +3 -3
- package/dist/types/common/app-table/controllers/useTableModel.d.ts +0 -1
- package/package.json +1 -1
- package/src/common/app-dialogs/AppConfirmDialog.vue +9 -10
- package/src/common/app-table/controllers/useTableModel.ts +1 -20
- package/src/icons/dialogs/RemoveIcon.vue +1 -1
- package/src/icons/dialogs/SafetyIcon.vue +1 -1
|
@@ -23,7 +23,6 @@ export declare const useTableModel: <T = any>(model: TableModel<T>) => {
|
|
|
23
23
|
columns: import("vue").ComputedRef<TableColumn[]>;
|
|
24
24
|
columnFilters: Ref<Record<string, string | string[] | undefined>, Record<string, string | string[] | undefined>>;
|
|
25
25
|
filterMenus: Ref<Record<string, boolean>, Record<string, boolean>>;
|
|
26
|
-
filteredRows: import("vue").ComputedRef<T[]>;
|
|
27
26
|
toggleFilterValue: (colName: string, value: string) => void;
|
|
28
27
|
clearFilter: (colName: string) => void;
|
|
29
28
|
openFilterMenu: (colName: string, isOpen: boolean) => void;
|
package/package.json
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
<div :class="$style['modal__content__header']">
|
|
6
6
|
<safety-icon v-if="type === 'edit'" />
|
|
7
7
|
<remove-icon v-if="type === 'delete'" />
|
|
8
|
-
<h4>Подтвердить ?</h4>
|
|
9
8
|
</div>
|
|
10
9
|
<p>{{ content }}</p>
|
|
11
10
|
</q-card-section>
|
|
@@ -39,9 +38,8 @@ const props = defineProps<Props>()
|
|
|
39
38
|
display: flex;
|
|
40
39
|
flex-direction: column;
|
|
41
40
|
width: 400px;
|
|
42
|
-
border-radius:
|
|
41
|
+
border-radius: 8px !important;
|
|
43
42
|
justify-content: space-between;
|
|
44
|
-
padding: 40px;
|
|
45
43
|
&__content {
|
|
46
44
|
margin: 0 auto;
|
|
47
45
|
padding: 0;
|
|
@@ -53,6 +51,7 @@ const props = defineProps<Props>()
|
|
|
53
51
|
justify-content: center;
|
|
54
52
|
flex-direction: column;
|
|
55
53
|
gap: 16px;
|
|
54
|
+
padding-top: 18px;
|
|
56
55
|
h4 {
|
|
57
56
|
font-size: 24px;
|
|
58
57
|
font-weight: 600;
|
|
@@ -60,29 +59,29 @@ const props = defineProps<Props>()
|
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
p {
|
|
63
|
-
margin
|
|
64
|
-
margin-bottom: 30px;
|
|
62
|
+
margin: 0;
|
|
65
63
|
font-size: 16px;
|
|
66
64
|
text-align: center;
|
|
65
|
+
padding: 18px;
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
.footer {
|
|
71
70
|
display: flex;
|
|
72
|
-
flex-direction: column;
|
|
73
71
|
gap: 12px;
|
|
74
72
|
align-items: center;
|
|
75
73
|
justify-content: center;
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
border-radius: 0px 0px 2px 2px;
|
|
75
|
+
background: #F4F9FD;
|
|
76
|
+
padding: 18px 12px;
|
|
78
77
|
&__btn--ok,
|
|
79
78
|
&__btn--cancel {
|
|
80
79
|
background-color: #3f8cff;
|
|
81
|
-
border-radius:
|
|
80
|
+
border-radius: 4px;
|
|
82
81
|
color: white;
|
|
83
82
|
font-size: 16px;
|
|
84
83
|
font-weight: bold;
|
|
85
|
-
width:
|
|
84
|
+
width: 165px;
|
|
86
85
|
height: 48px;
|
|
87
86
|
cursor: pointer;
|
|
88
87
|
span {
|
|
@@ -33,25 +33,7 @@ export const useTableModel = <T = any>(model: TableModel<T>) => {
|
|
|
33
33
|
}
|
|
34
34
|
})
|
|
35
35
|
|
|
36
|
-
const
|
|
37
|
-
typeof col.field === 'function' ? col.field(row) : row[col.field]
|
|
38
|
-
|
|
39
|
-
const resolvedRows = computed(() => (Array.isArray(model.rows) ? model.rows : (model.rows as Ref<T[]>).value))
|
|
40
|
-
|
|
41
|
-
const filteredRows = computed(() =>
|
|
42
|
-
resolvedRows.value.filter(row =>
|
|
43
|
-
model.columns.every(col => {
|
|
44
|
-
const filter = columnFilters.value[col.name]
|
|
45
|
-
if (!col.filterType || filter == null || (Array.isArray(filter) && filter.length === 0)) return true
|
|
46
|
-
const value = getFieldValue(row, col)
|
|
47
|
-
return col.filterType === 'single'
|
|
48
|
-
? value === filter
|
|
49
|
-
: Array.isArray(value)
|
|
50
|
-
? value.some(v => (filter as string[]).includes(v))
|
|
51
|
-
: (filter as string[]).includes(value)
|
|
52
|
-
}),
|
|
53
|
-
),
|
|
54
|
-
)
|
|
36
|
+
const resolvedRows = computed(() => (Array.isArray(model.rows) ? model.rows : model.rows.value))
|
|
55
37
|
|
|
56
38
|
const toggleFilterValue = (colName: string, value: string) => {
|
|
57
39
|
const col = model.columns.find(c => c.name === colName)
|
|
@@ -95,7 +77,6 @@ export const useTableModel = <T = any>(model: TableModel<T>) => {
|
|
|
95
77
|
columns: computed(() => model.columns),
|
|
96
78
|
columnFilters,
|
|
97
79
|
filterMenus,
|
|
98
|
-
filteredRows,
|
|
99
80
|
toggleFilterValue,
|
|
100
81
|
clearFilter,
|
|
101
82
|
openFilterMenu,
|