quasar-ui-sellmate-ui-kit 3.11.1 → 3.11.2
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/.eslintrc.cjs +104 -104
- package/.prettierrc +25 -25
- package/README.md +156 -156
- package/dist/index.common.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.min.css +1 -1
- package/dist/index.rtl.css +1 -1
- package/dist/index.rtl.min.css +1 -1
- package/dist/index.umd.js +4417 -4405
- package/dist/index.umd.min.js +2 -2
- package/html/assets/index-iPSQW1bz.css +1 -1
- package/html/assets/index-pzCGhZhc.js +35 -35
- package/html/favicon.svg +5 -5
- package/html/index.html +26 -26
- package/package.json +95 -95
- package/src/assets/icons.js +63 -63
- package/src/components/SBadge.vue +75 -75
- package/src/components/SButton.vue +206 -206
- package/src/components/SButtonGroup.vue +41 -41
- package/src/components/SButtonToggle.vue +200 -200
- package/src/components/SCaution.vue +143 -143
- package/src/components/SCheckbox.vue +123 -123
- package/src/components/SChip.vue +99 -99
- package/src/components/SDate.vue +664 -664
- package/src/components/SDateAutoRangePicker.vue +311 -311
- package/src/components/SDatePicker.vue +465 -465
- package/src/components/SDateRange.vue +382 -382
- package/src/components/SDateRangePicker.vue +582 -582
- package/src/components/SDateTimePicker.vue +259 -259
- package/src/components/SDialog.vue +250 -250
- package/src/components/SDropdown.vue +273 -273
- package/src/components/SEditor.vue +590 -590
- package/src/components/SFilePicker.vue +207 -207
- package/src/components/SHelp.vue +126 -126
- package/src/components/SHelpMessage.vue +57 -57
- package/src/components/SInput.vue +379 -379
- package/src/components/SInputCounter.vue +46 -46
- package/src/components/SInputNumber.vue +194 -194
- package/src/components/SList.vue +29 -29
- package/src/components/SMarkupTable.vue +142 -142
- package/src/components/SPagination.vue +345 -345
- package/src/components/SRadio.vue +78 -78
- package/src/components/SRouteTab.vue +67 -67
- package/src/components/SSelect.vue +299 -299
- package/src/components/SSelectCheckbox.vue +238 -238
- package/src/components/SSelectCustom.vue +189 -189
- package/src/components/SSelectGroupCheckbox.vue +372 -372
- package/src/components/SSelectSearchAutoComplete.vue +172 -172
- package/src/components/SSelectSearchCheckbox.vue +360 -360
- package/src/components/SStringToInput.vue +66 -66
- package/src/components/STab.vue +147 -147
- package/src/components/STable.vue +21 -9
- package/src/components/STableTree.vue +502 -502
- package/src/components/STabs.vue +32 -32
- package/src/components/STag.vue +152 -152
- package/src/components/STimePicker.vue +186 -186
- package/src/components/SToggle.vue +68 -68
- package/src/components/STooltip.vue +209 -209
- package/src/components/SYearMonthPicker.vue +211 -211
- package/src/components/SelelctItem.vue +21 -21
- package/src/components/TableTreeNode.vue +177 -177
- package/src/components/TimePickerCard.vue +393 -393
- package/src/components/__tests__/SButton.test.js +18 -18
- package/src/components/__tests__/SInput.test.js +42 -42
- package/src/components/__tests__/SInputCounter.test.js +30 -30
- package/src/components/__tests__/SInputNumber.test.js +32 -32
- package/src/components/__tests__/STimePicker.spec.js +78 -78
- package/src/composables/date.js +11 -11
- package/src/composables/modelBinder.js +13 -13
- package/src/composables/resizable.js +55 -55
- package/src/composables/table/use-navigator.js +110 -110
- package/src/composables/table/use-resizable-tree.js +96 -96
- package/src/composables/table/use-resizable.js +187 -187
- package/src/constants/locale.js +102 -102
- package/src/css/app.scss +106 -106
- package/src/css/default.scss +393 -393
- package/src/css/extends.scss +177 -177
- package/src/css/quasar.variables.scss +187 -187
- package/src/directives/Directive.js +7 -7
- package/src/index.scss +3 -3
- package/src/vue-plugin.js +93 -93
- package/tsconfig.json +35 -35
- package/vitest.config.ts +31 -31
|
@@ -1,177 +1,177 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="table-tree-node" :class="nodeName" ref="childTableNode">
|
|
3
|
-
<table>
|
|
4
|
-
<tbody>
|
|
5
|
-
<tr class="level" :class="levelClass">
|
|
6
|
-
<template v-for="(column, i) in columns" :key="i">
|
|
7
|
-
<td
|
|
8
|
-
:class="{
|
|
9
|
-
'bg-white': i === 0 && !isLastDepth,
|
|
10
|
-
'bg-Grey_Lighten-5': isLastDepth,
|
|
11
|
-
[`td-${i + 1} text-${column.align}`]: i >= 0,
|
|
12
|
-
}"
|
|
13
|
-
:style="[i === 0 && `padding-left: ${row.leftPadding}px`, `width: ${column.width}px`]"
|
|
14
|
-
>
|
|
15
|
-
<slot :name="`body-cell-${column.name}`">
|
|
16
|
-
<div>
|
|
17
|
-
<s-button
|
|
18
|
-
v-if="!isLastDepth && i === 0"
|
|
19
|
-
:icon="row.isExpand ? minusIcon10 : addIcon10"
|
|
20
|
-
outline
|
|
21
|
-
round
|
|
22
|
-
:color="row.isExpand ? 'Blue_C_Lighten-3' : 'Grey_Default'"
|
|
23
|
-
class="expand-btn q-mr-sm"
|
|
24
|
-
:class="{ 'not-expand-btn': !row.isExpand }"
|
|
25
|
-
@click="handleExpand(row)"
|
|
26
|
-
/>
|
|
27
|
-
|
|
28
|
-
<span class="cell-content" :class="{ 'is-root': isRoot }">
|
|
29
|
-
<span v-if="column.prefix" class="q-mr-xs">{{ column.prefix }}</span>
|
|
30
|
-
{{ row[column.name] }}
|
|
31
|
-
<span v-if="column.suffix" class="q-ml-xs">{{ column.suffix }}</span>
|
|
32
|
-
</span>
|
|
33
|
-
</div>
|
|
34
|
-
</slot>
|
|
35
|
-
</td>
|
|
36
|
-
</template>
|
|
37
|
-
</tr>
|
|
38
|
-
</tbody>
|
|
39
|
-
</table>
|
|
40
|
-
|
|
41
|
-
<div v-if="row.isExpand">
|
|
42
|
-
<table-tree-node
|
|
43
|
-
v-for="(childRow, childRowIdx) in row.children"
|
|
44
|
-
:key="`child_node${childRowIdx}`"
|
|
45
|
-
:nodeName="`child_node${childRowIdx}`"
|
|
46
|
-
:row="childRow"
|
|
47
|
-
:columns="columns"
|
|
48
|
-
:colspan="colspan"
|
|
49
|
-
:resizedWidths="resizedWidths"
|
|
50
|
-
@handleExpand="handleExpand"
|
|
51
|
-
:is-root="false"
|
|
52
|
-
>
|
|
53
|
-
<template
|
|
54
|
-
v-for="column in columns"
|
|
55
|
-
:key="column.name"
|
|
56
|
-
#[`body-cell-${column.name}`]="childRow"
|
|
57
|
-
>
|
|
58
|
-
<slot :name="`body-cell-${column.name}`" v-bind="childRow"></slot>
|
|
59
|
-
</template>
|
|
60
|
-
</table-tree-node>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</template>
|
|
64
|
-
|
|
65
|
-
<script>
|
|
66
|
-
import { defineComponent, computed, ref } from 'vue';
|
|
67
|
-
import { addIcon10, minusIcon10 } from '../assets/icons';
|
|
68
|
-
|
|
69
|
-
export default defineComponent({
|
|
70
|
-
name: 'TableTreeNode',
|
|
71
|
-
props: {
|
|
72
|
-
row: Object,
|
|
73
|
-
nodeName: String,
|
|
74
|
-
columns: {
|
|
75
|
-
type: Array,
|
|
76
|
-
default: () => [],
|
|
77
|
-
},
|
|
78
|
-
isRoot: {
|
|
79
|
-
type: Boolean,
|
|
80
|
-
default: true,
|
|
81
|
-
},
|
|
82
|
-
colspan: Number,
|
|
83
|
-
resizedWidths: Object,
|
|
84
|
-
},
|
|
85
|
-
setup(props, { emit }) {
|
|
86
|
-
const levelClass = computed(() => `level-${props.row.level}` || '');
|
|
87
|
-
const isLastDepth = computed(() => props.row.meta.isLastDepth);
|
|
88
|
-
const childTableNode = ref(null);
|
|
89
|
-
|
|
90
|
-
function handleExpand(row) {
|
|
91
|
-
emit('handleExpand', row);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return {
|
|
95
|
-
levelClass,
|
|
96
|
-
isLastDepth,
|
|
97
|
-
handleExpand,
|
|
98
|
-
childTableNode,
|
|
99
|
-
addIcon10,
|
|
100
|
-
minusIcon10,
|
|
101
|
-
};
|
|
102
|
-
},
|
|
103
|
-
});
|
|
104
|
-
</script>
|
|
105
|
-
|
|
106
|
-
<style scoped lang="scss">
|
|
107
|
-
@import '../css/quasar.variables.scss';
|
|
108
|
-
@import '../css/extends.scss';
|
|
109
|
-
|
|
110
|
-
.table-tree-node {
|
|
111
|
-
border-top: 1px solid $Grey_Lighten-3 !important;
|
|
112
|
-
box-sizing: border-box;
|
|
113
|
-
|
|
114
|
-
&.root_node_0 {
|
|
115
|
-
border-top: 0 !important;
|
|
116
|
-
}
|
|
117
|
-
.tr {
|
|
118
|
-
vertical-align: middle;
|
|
119
|
-
td {
|
|
120
|
-
height: 48px;
|
|
121
|
-
padding: 0 16px;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
td,
|
|
125
|
-
th {
|
|
126
|
-
width: 100%;
|
|
127
|
-
&:not(:first-of-type) {
|
|
128
|
-
word-break: keep-all;
|
|
129
|
-
white-space: nowrap;
|
|
130
|
-
overflow: hidden;
|
|
131
|
-
text-overflow: ellipsis;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
table {
|
|
135
|
-
width: 100%;
|
|
136
|
-
table-layout: fixed;
|
|
137
|
-
border-collapse: collapse;
|
|
138
|
-
tbody {
|
|
139
|
-
tr {
|
|
140
|
-
td {
|
|
141
|
-
height: 44px;
|
|
142
|
-
padding: 0 16px;
|
|
143
|
-
font-weight: 400;
|
|
144
|
-
|
|
145
|
-
.expand-btn {
|
|
146
|
-
min-width: 20px;
|
|
147
|
-
min-height: 20px;
|
|
148
|
-
padding: 0 !important;
|
|
149
|
-
&.not-expand-btn {
|
|
150
|
-
&:before {
|
|
151
|
-
border-color: $Grey_Lighten-3;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
&.s-button-sm.q-btn {
|
|
155
|
-
height: 20px;
|
|
156
|
-
}
|
|
157
|
-
:deep(.q-btn__content) {
|
|
158
|
-
.q-icon {
|
|
159
|
-
font-size: 12px;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
.cell-content {
|
|
164
|
-
display: inline-block;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
.td-1 .is-root {
|
|
170
|
-
font-weight: 700;
|
|
171
|
-
}
|
|
172
|
-
.td-1 :not(.is-root) {
|
|
173
|
-
font-weight: 400;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="table-tree-node" :class="nodeName" ref="childTableNode">
|
|
3
|
+
<table>
|
|
4
|
+
<tbody>
|
|
5
|
+
<tr class="level" :class="levelClass">
|
|
6
|
+
<template v-for="(column, i) in columns" :key="i">
|
|
7
|
+
<td
|
|
8
|
+
:class="{
|
|
9
|
+
'bg-white': i === 0 && !isLastDepth,
|
|
10
|
+
'bg-Grey_Lighten-5': isLastDepth,
|
|
11
|
+
[`td-${i + 1} text-${column.align}`]: i >= 0,
|
|
12
|
+
}"
|
|
13
|
+
:style="[i === 0 && `padding-left: ${row.leftPadding}px`, `width: ${column.width}px`]"
|
|
14
|
+
>
|
|
15
|
+
<slot :name="`body-cell-${column.name}`">
|
|
16
|
+
<div>
|
|
17
|
+
<s-button
|
|
18
|
+
v-if="!isLastDepth && i === 0"
|
|
19
|
+
:icon="row.isExpand ? minusIcon10 : addIcon10"
|
|
20
|
+
outline
|
|
21
|
+
round
|
|
22
|
+
:color="row.isExpand ? 'Blue_C_Lighten-3' : 'Grey_Default'"
|
|
23
|
+
class="expand-btn q-mr-sm"
|
|
24
|
+
:class="{ 'not-expand-btn': !row.isExpand }"
|
|
25
|
+
@click="handleExpand(row)"
|
|
26
|
+
/>
|
|
27
|
+
|
|
28
|
+
<span class="cell-content" :class="{ 'is-root': isRoot }">
|
|
29
|
+
<span v-if="column.prefix" class="q-mr-xs">{{ column.prefix }}</span>
|
|
30
|
+
{{ row[column.name] }}
|
|
31
|
+
<span v-if="column.suffix" class="q-ml-xs">{{ column.suffix }}</span>
|
|
32
|
+
</span>
|
|
33
|
+
</div>
|
|
34
|
+
</slot>
|
|
35
|
+
</td>
|
|
36
|
+
</template>
|
|
37
|
+
</tr>
|
|
38
|
+
</tbody>
|
|
39
|
+
</table>
|
|
40
|
+
|
|
41
|
+
<div v-if="row.isExpand">
|
|
42
|
+
<table-tree-node
|
|
43
|
+
v-for="(childRow, childRowIdx) in row.children"
|
|
44
|
+
:key="`child_node${childRowIdx}`"
|
|
45
|
+
:nodeName="`child_node${childRowIdx}`"
|
|
46
|
+
:row="childRow"
|
|
47
|
+
:columns="columns"
|
|
48
|
+
:colspan="colspan"
|
|
49
|
+
:resizedWidths="resizedWidths"
|
|
50
|
+
@handleExpand="handleExpand"
|
|
51
|
+
:is-root="false"
|
|
52
|
+
>
|
|
53
|
+
<template
|
|
54
|
+
v-for="column in columns"
|
|
55
|
+
:key="column.name"
|
|
56
|
+
#[`body-cell-${column.name}`]="childRow"
|
|
57
|
+
>
|
|
58
|
+
<slot :name="`body-cell-${column.name}`" v-bind="childRow"></slot>
|
|
59
|
+
</template>
|
|
60
|
+
</table-tree-node>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script>
|
|
66
|
+
import { defineComponent, computed, ref } from 'vue';
|
|
67
|
+
import { addIcon10, minusIcon10 } from '../assets/icons';
|
|
68
|
+
|
|
69
|
+
export default defineComponent({
|
|
70
|
+
name: 'TableTreeNode',
|
|
71
|
+
props: {
|
|
72
|
+
row: Object,
|
|
73
|
+
nodeName: String,
|
|
74
|
+
columns: {
|
|
75
|
+
type: Array,
|
|
76
|
+
default: () => [],
|
|
77
|
+
},
|
|
78
|
+
isRoot: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: true,
|
|
81
|
+
},
|
|
82
|
+
colspan: Number,
|
|
83
|
+
resizedWidths: Object,
|
|
84
|
+
},
|
|
85
|
+
setup(props, { emit }) {
|
|
86
|
+
const levelClass = computed(() => `level-${props.row.level}` || '');
|
|
87
|
+
const isLastDepth = computed(() => props.row.meta.isLastDepth);
|
|
88
|
+
const childTableNode = ref(null);
|
|
89
|
+
|
|
90
|
+
function handleExpand(row) {
|
|
91
|
+
emit('handleExpand', row);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
levelClass,
|
|
96
|
+
isLastDepth,
|
|
97
|
+
handleExpand,
|
|
98
|
+
childTableNode,
|
|
99
|
+
addIcon10,
|
|
100
|
+
minusIcon10,
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<style scoped lang="scss">
|
|
107
|
+
@import '../css/quasar.variables.scss';
|
|
108
|
+
@import '../css/extends.scss';
|
|
109
|
+
|
|
110
|
+
.table-tree-node {
|
|
111
|
+
border-top: 1px solid $Grey_Lighten-3 !important;
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
|
|
114
|
+
&.root_node_0 {
|
|
115
|
+
border-top: 0 !important;
|
|
116
|
+
}
|
|
117
|
+
.tr {
|
|
118
|
+
vertical-align: middle;
|
|
119
|
+
td {
|
|
120
|
+
height: 48px;
|
|
121
|
+
padding: 0 16px;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
td,
|
|
125
|
+
th {
|
|
126
|
+
width: 100%;
|
|
127
|
+
&:not(:first-of-type) {
|
|
128
|
+
word-break: keep-all;
|
|
129
|
+
white-space: nowrap;
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
text-overflow: ellipsis;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
table {
|
|
135
|
+
width: 100%;
|
|
136
|
+
table-layout: fixed;
|
|
137
|
+
border-collapse: collapse;
|
|
138
|
+
tbody {
|
|
139
|
+
tr {
|
|
140
|
+
td {
|
|
141
|
+
height: 44px;
|
|
142
|
+
padding: 0 16px;
|
|
143
|
+
font-weight: 400;
|
|
144
|
+
|
|
145
|
+
.expand-btn {
|
|
146
|
+
min-width: 20px;
|
|
147
|
+
min-height: 20px;
|
|
148
|
+
padding: 0 !important;
|
|
149
|
+
&.not-expand-btn {
|
|
150
|
+
&:before {
|
|
151
|
+
border-color: $Grey_Lighten-3;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
&.s-button-sm.q-btn {
|
|
155
|
+
height: 20px;
|
|
156
|
+
}
|
|
157
|
+
:deep(.q-btn__content) {
|
|
158
|
+
.q-icon {
|
|
159
|
+
font-size: 12px;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
.cell-content {
|
|
164
|
+
display: inline-block;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
.td-1 .is-root {
|
|
170
|
+
font-weight: 700;
|
|
171
|
+
}
|
|
172
|
+
.td-1 :not(.is-root) {
|
|
173
|
+
font-weight: 400;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
</style>
|