quasar-ui-sellmate-ui-kit 2.3.1 → 3.0.0

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 (68) hide show
  1. package/.eslintrc.cjs +73 -0
  2. package/.prettierrc +25 -0
  3. package/README.md +156 -142
  4. package/dist/index.common.js +2 -2
  5. package/dist/index.css +3 -8
  6. package/dist/index.esm.js +2 -2
  7. package/dist/index.min.css +2 -2
  8. package/dist/index.rtl.css +3 -8
  9. package/dist/index.rtl.min.css +2 -2
  10. package/dist/index.umd.js +3821 -3823
  11. package/dist/index.umd.min.js +2 -2
  12. package/package.json +83 -75
  13. package/src/assets/icons.js +28 -28
  14. package/src/components/SBreadcrumbs.vue +55 -55
  15. package/src/components/SButton.vue +206 -206
  16. package/src/components/SButtonGroup.vue +41 -41
  17. package/src/components/SButtonToggle.vue +200 -200
  18. package/src/components/SCaution.vue +102 -102
  19. package/src/components/SCheckbox.vue +123 -123
  20. package/src/components/SChip.vue +99 -99
  21. package/src/components/SDate.vue +717 -717
  22. package/src/components/SDateAutoRangePicker.vue +341 -341
  23. package/src/components/SDatePicker.vue +472 -472
  24. package/src/components/SDateRange.vue +470 -470
  25. package/src/components/SDateRangePicker.vue +660 -660
  26. package/src/components/SDateTimePicker.vue +349 -349
  27. package/src/components/SDialog.vue +250 -250
  28. package/src/components/SDropdown.vue +216 -216
  29. package/src/components/SEditor.vue +490 -490
  30. package/src/components/SFilePicker.vue +207 -207
  31. package/src/components/SHelp.vue +146 -146
  32. package/src/components/SInput.vue +343 -343
  33. package/src/components/SInputCounter.vue +46 -46
  34. package/src/components/SInputNumber.vue +179 -179
  35. package/src/components/SList.vue +29 -29
  36. package/src/components/SMarkupTable.vue +141 -141
  37. package/src/components/SPagination.vue +266 -266
  38. package/src/components/SRadio.vue +78 -78
  39. package/src/components/SRouteTab.vue +67 -67
  40. package/src/components/SSelect.vue +294 -294
  41. package/src/components/SSelectCheckbox.vue +222 -222
  42. package/src/components/SSelectCustom.vue +189 -189
  43. package/src/components/SSelectGroupCheckbox.vue +235 -235
  44. package/src/components/SSelectSearch.vue +261 -261
  45. package/src/components/SSelectSearchAutoComplete.vue +172 -172
  46. package/src/components/SSelectSearchCheckbox.vue +356 -356
  47. package/src/components/SStringToInput.vue +66 -66
  48. package/src/components/STab.vue +77 -80
  49. package/src/components/STable.vue +425 -425
  50. package/src/components/STableTree.vue +210 -208
  51. package/src/components/STabs.vue +32 -32
  52. package/src/components/STimePicker.vue +159 -159
  53. package/src/components/SToggle.vue +68 -68
  54. package/src/components/STooltip.vue +209 -209
  55. package/src/components/SelelctItem.vue +21 -21
  56. package/src/components/TimePickerCard.vue +352 -352
  57. package/src/composables/date.js +11 -11
  58. package/src/composables/modelBinder.js +13 -13
  59. package/src/composables/table/use-navigator.js +110 -110
  60. package/src/composables/table/use-resizable.js +80 -80
  61. package/src/css/app.scss +90 -90
  62. package/src/css/default.scss +875 -875
  63. package/src/css/extends.scss +154 -154
  64. package/src/css/quasar.variables.scss +189 -189
  65. package/src/directives/Directive.js +7 -8
  66. package/src/index.scss +3 -9
  67. package/src/vue-plugin.js +91 -92
  68. package/tsconfig.json +35 -0
@@ -1,208 +1,210 @@
1
- <template>
2
- <q-table
3
- flat
4
- :separator="separator"
5
- :rows="rows"
6
- :columns="columns"
7
- row-key="id"
8
- :rows-per-page-options="[0]"
9
- hide-bottom
10
- :selected-rows-label="getSelectedString"
11
- selection="multiple"
12
- v-model:selected="selectedItem"
13
- >
14
- <template v-slot:header="props">
15
- <tr>
16
- <th
17
- v-for="col in props.cols"
18
- :key="col.name"
19
- :class="col.align"
20
- >
21
- <span>{{ col.label }}</span>
22
- <q-icon v-if="col.name === 'product_name'" name="info" size="sm" class="cursor-pointer">
23
- <q-popup-proxy>
24
- <q-banner>
25
- 여기는 인포
26
- </q-banner>
27
- </q-popup-proxy>
28
- </q-icon>
29
- </th>
30
- </tr>
31
- </template>
32
-
33
- <template v-slot:body="props">
34
- <tr class="center">
35
- <td class="left">
36
- <q-btn
37
- round
38
- flat
39
- dense
40
- :icon="visibleProduct[props.row.id]? 'arrow_drop_down' : 'arrow_right'"
41
- @click="handleVisibleProduct(props.row.id)"
42
- />
43
- <q-icon class="q-ml-xs q-mr-sm" size="xs" name="folder_open" />
44
- <span class="text-Grey_Lighten-1">{{ props.row.label }}</span>
45
- </td>
46
- <td class="left">{{ props.row.market }}</td>
47
- <td class="text-positive">{{ props.row.product_code }}</td>
48
- <td class="left">
49
- <span style="width: 65px; display: inline-block" class="q-mr-sm">
50
- <q-badge
51
- outline
52
- rounded
53
- :color="stateColor[props.row.state]"
54
- :label="props.row.state"
55
- />
56
- </span>
57
- {{ props.row.product_name }}
58
- </td>
59
- <td>{{ props.row.sale_period }}</td>
60
- <td>{{ props.row.stock }}</td>
61
- </tr>
62
-
63
- <tr
64
- v-show="visibleProduct[props.row.id]"
65
- v-for="(row, i) in props.row.children"
66
- :key="i"
67
- class="background-grey"
68
- >
69
- <td>
70
- <q-btn
71
- class="q-ml-lg"
72
- round
73
- flat
74
- dense
75
- :icon="visibleOption[row.subId] ? 'arrow_drop_down' : 'arrow_right'"
76
- @click="handleVisibleOption(row.subId)"
77
- />
78
- <q-icon class="q-ml-xs q-mr-sm" size="xs" name="folder" />
79
- <span class="text-Grey_Lighten-1">{{ row.label }}</span>
80
- </td>
81
- <td class="left">{{ row.market }}</td>
82
- <td>{{ row.product_code }}</td>
83
- <td class="left">{{ row.state }}{{ row.product_name }}</td>
84
- <td>{{ row.sale_period }}</td>
85
- <td>{{ row.stock }}</td>
86
- </tr>
87
-
88
- <tr
89
- v-show="visibleOption[props.row.id]"
90
- v-for="(row, i) in props.row.children[0].children"
91
- :key="i"
92
- class="background-grey"
93
- >
94
- <td class="left"><q-icon class="q-ml-xl q-pl-xl" size="xs" name="insert_drive_file" /></td>
95
- <td class="left">{{ row.market }}</td>
96
- <td>{{ row.product_code }}</td>
97
- <td class="left">
98
- <span style="width: 65px; display: inline-block" class="q-mr-sm">
99
- <q-badge
100
- outline
101
- rounded
102
- :color="stateColor[row.state]"
103
- :label="row.state"
104
- />
105
- </span>
106
- <span>{{ row.product_name }}</span>
107
- </td>
108
- <td>{{ row.sale_period }}</td>
109
- <td class="center">{{ row.stock }}</td>
110
- </tr>
111
- </template>
112
- </q-table>
113
- </template>
114
-
115
- <script>
116
- import { ref, onBeforeMount, watch } from 'vue';
117
-
118
- const stateColor = {
119
- 판매중: 'green',
120
- 판매중지: 'grey',
121
- 품절: 'red',
122
- };
123
-
124
- export default {
125
- name: 'STableTree',
126
- props: {
127
- rows: Array,
128
- columns: Array,
129
- },
130
- setup(props) {
131
- const selectedItem = ref([]);
132
- const visibleProduct = ref([]);
133
- const visibleOption = ref([]);
134
-
135
- const row = ref(props.rows);
136
-
137
- const getSelectedString = ref('');
138
-
139
- onBeforeMount(() => {
140
- row.value.forEach((r) => {
141
- visibleProduct.value[r.id] = true;
142
- visibleOption.value[r.id] = true;
143
- });
144
- });
145
-
146
- watch(visibleProduct.value,
147
- () => {
148
- const idx = visibleProduct.value.findIndex(i => i === false);
149
- visibleOption.value[idx] = false;
150
- });
151
-
152
- function handleVisibleProduct(id) {
153
- visibleProduct.value[id] = !visibleProduct.value[id];
154
- }
155
-
156
- function handleVisibleOption(id) {
157
- visibleOption.value[id] = !visibleOption.value[id];
158
- console.log(visibleOption.value);
159
- }
160
- return {
161
- stateColor,
162
- separator: ref('horizontal'),
163
- selectedItem,
164
- visibleProduct,
165
- visibleOption,
166
-
167
- handleVisibleProduct,
168
- handleVisibleOption,
169
-
170
- getSelectedString,
171
-
172
- };
173
- },
174
- };
175
- </script>
176
-
177
- <style scoped lang="sass">
178
- .q-table
179
- thead
180
- tr
181
- height: 32px
182
- th
183
- padding: 0
184
- background: $Grey_Lighten-5
185
- border-bottom: 1px solid #777777
186
- font-weight: 700
187
- font-size: 12px
188
- span
189
- line-height: 32px
190
- tbody
191
- tr
192
- height: 32px !important
193
- td
194
- padding: 0
195
- border-bottom: 1px solid #777777
196
- height: 32px
197
- .background-grey
198
- background: #E5E5E5
199
-
200
- .center
201
- text-align: center !important
202
-
203
- .left
204
- text-align: left !important
205
-
206
- .right
207
- text-align: right !important
208
- </style>
1
+ <template>
2
+ <q-table
3
+ flat
4
+ :separator="separator"
5
+ :rows="rows"
6
+ :columns="columns"
7
+ row-key="id"
8
+ :rows-per-page-options="[0]"
9
+ hide-bottom
10
+ :selected-rows-label="getSelectedString"
11
+ selection="multiple"
12
+ v-model:selected="selectedItem"
13
+ >
14
+ <template v-slot:header="props">
15
+ <tr>
16
+ <th
17
+ v-for="col in props.cols"
18
+ :key="col.name"
19
+ :class="col.align"
20
+ >
21
+ <span>{{ col.label }}</span>
22
+ <q-icon v-if="col.name === 'product_name'" name="info" size="sm" class="cursor-pointer">
23
+ <q-popup-proxy>
24
+ <q-banner>
25
+ 여기는 인포
26
+ </q-banner>
27
+ </q-popup-proxy>
28
+ </q-icon>
29
+ </th>
30
+ </tr>
31
+ </template>
32
+
33
+ <template v-slot:body="props">
34
+ <tr class="center">
35
+ <td class="left">
36
+ <q-btn
37
+ round
38
+ flat
39
+ dense
40
+ :icon="visibleProduct[props.row.id]? 'arrow_drop_down' : 'arrow_right'"
41
+ @click="handleVisibleProduct(props.row.id)"
42
+ />
43
+ <q-icon class="q-ml-xs q-mr-sm" size="xs" name="folder_open" />
44
+ <span class="text-Grey_Lighten-1">{{ props.row.label }}</span>
45
+ </td>
46
+ <td class="left">{{ props.row.market }}</td>
47
+ <td class="text-positive">{{ props.row.product_code }}</td>
48
+ <td class="left">
49
+ <span style="width: 65px; display: inline-block" class="q-mr-sm">
50
+ <q-badge
51
+ outline
52
+ rounded
53
+ :color="stateColor[props.row.state]"
54
+ :label="props.row.state"
55
+ />
56
+ </span>
57
+ {{ props.row.product_name }}
58
+ </td>
59
+ <td>{{ props.row.sale_period }}</td>
60
+ <td>{{ props.row.stock }}</td>
61
+ </tr>
62
+
63
+ <tr
64
+ v-show="visibleProduct[props.row.id]"
65
+ v-for="(row, i) in props.row.children"
66
+ :key="i"
67
+ class="background-grey"
68
+ >
69
+ <td>
70
+ <q-btn
71
+ class="q-ml-lg"
72
+ round
73
+ flat
74
+ dense
75
+ :icon="visibleOption[row.subId] ? 'arrow_drop_down' : 'arrow_right'"
76
+ @click="handleVisibleOption(row.subId)"
77
+ />
78
+ <q-icon class="q-ml-xs q-mr-sm" size="xs" name="folder" />
79
+ <span class="text-Grey_Lighten-1">{{ row.label }}</span>
80
+ </td>
81
+ <td class="left">{{ row.market }}</td>
82
+ <td>{{ row.product_code }}</td>
83
+ <td class="left">{{ row.state }}{{ row.product_name }}</td>
84
+ <td>{{ row.sale_period }}</td>
85
+ <td>{{ row.stock }}</td>
86
+ </tr>
87
+
88
+ <tr
89
+ v-show="visibleOption[props.row.id]"
90
+ v-for="(row, i) in props.row.children[0].children"
91
+ :key="i"
92
+ class="background-grey"
93
+ >
94
+ <td class="left"><q-icon class="q-ml-xl q-pl-xl" size="xs" name="insert_drive_file" /></td>
95
+ <td class="left">{{ row.market }}</td>
96
+ <td>{{ row.product_code }}</td>
97
+ <td class="left">
98
+ <span style="width: 65px; display: inline-block" class="q-mr-sm">
99
+ <q-badge
100
+ outline
101
+ rounded
102
+ :color="stateColor[row.state]"
103
+ :label="row.state"
104
+ />
105
+ </span>
106
+ <span>{{ row.product_name }}</span>
107
+ </td>
108
+ <td>{{ row.sale_period }}</td>
109
+ <td class="center">{{ row.stock }}</td>
110
+ </tr>
111
+ </template>
112
+ </q-table>
113
+ </template>
114
+
115
+ <script>
116
+ import { ref, onBeforeMount, watch } from 'vue';
117
+
118
+ const stateColor = {
119
+ 판매중: 'green',
120
+ 판매중지: 'grey',
121
+ 품절: 'red',
122
+ };
123
+
124
+ export default {
125
+ name: 'STableTree',
126
+ props: {
127
+ rows: Array,
128
+ columns: Array,
129
+ },
130
+ setup(props) {
131
+ const selectedItem = ref([]);
132
+ const visibleProduct = ref([]);
133
+ const visibleOption = ref([]);
134
+
135
+ const row = ref(props.rows);
136
+
137
+ const getSelectedString = ref('');
138
+
139
+ onBeforeMount(() => {
140
+ row.value.forEach((r) => {
141
+ visibleProduct.value[r.id] = true;
142
+ visibleOption.value[r.id] = true;
143
+ });
144
+ });
145
+
146
+ watch(
147
+ visibleProduct.value,
148
+ () => {
149
+ const idx = visibleProduct.value.findIndex(i => i === false);
150
+ visibleOption.value[idx] = false;
151
+ },
152
+ );
153
+
154
+ function handleVisibleProduct(id) {
155
+ visibleProduct.value[id] = !visibleProduct.value[id];
156
+ }
157
+
158
+ function handleVisibleOption(id) {
159
+ visibleOption.value[id] = !visibleOption.value[id];
160
+ console.log(visibleOption.value);
161
+ }
162
+ return {
163
+ stateColor,
164
+ separator: ref('horizontal'),
165
+ selectedItem,
166
+ visibleProduct,
167
+ visibleOption,
168
+
169
+ handleVisibleProduct,
170
+ handleVisibleOption,
171
+
172
+ getSelectedString,
173
+
174
+ };
175
+ },
176
+ };
177
+ </script>
178
+
179
+ <style scoped lang="sass">
180
+ .q-table
181
+ thead
182
+ tr
183
+ height: 32px
184
+ th
185
+ padding: 0
186
+ background: $Grey_Lighten-5
187
+ border-bottom: 1px solid #777777
188
+ font-weight: 700
189
+ font-size: 12px
190
+ span
191
+ line-height: 32px
192
+ tbody
193
+ tr
194
+ height: 32px !important
195
+ td
196
+ padding: 0
197
+ border-bottom: 1px solid #777777
198
+ height: 32px
199
+ .background-grey
200
+ background: #E5E5E5
201
+
202
+ .center
203
+ text-align: center !important
204
+
205
+ .left
206
+ text-align: left !important
207
+
208
+ .right
209
+ text-align: right !important
210
+ </style>
@@ -1,32 +1,32 @@
1
- <template>
2
- <q-tabs
3
- align="left"
4
- active-color="positive"
5
- indicator-color="transparent"
6
- no-caps
7
- dense
8
- class="s-tabs text-grey"
9
- :model-value="tab"
10
- >
11
- <slot></slot>
12
- </q-tabs>
13
- </template>
14
-
15
- <script>
16
- import { defineComponent, ref } from 'vue';
17
- import { QTabs } from 'quasar';
18
-
19
- export default defineComponent({
20
- name: 'STabs',
21
- components: {
22
- QTabs,
23
- },
24
- setup(props) {
25
- const tab = ref(props.modelValue);
26
-
27
- return {
28
- tab,
29
- };
30
- },
31
- });
32
- </script>
1
+ <template>
2
+ <q-tabs
3
+ align="left"
4
+ active-color="positive"
5
+ indicator-color="transparent"
6
+ no-caps
7
+ dense
8
+ class="s-tabs text-grey"
9
+ :model-value="tab"
10
+ >
11
+ <slot></slot>
12
+ </q-tabs>
13
+ </template>
14
+
15
+ <script>
16
+ import { defineComponent, ref } from 'vue';
17
+ import { QTabs } from 'quasar';
18
+
19
+ export default defineComponent({
20
+ name: 'STabs',
21
+ components: {
22
+ QTabs,
23
+ },
24
+ setup(props) {
25
+ const tab = ref(props.modelValue);
26
+
27
+ return {
28
+ tab,
29
+ };
30
+ },
31
+ });
32
+ </script>