quasar-factory-lib 0.0.7 → 0.0.9
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/components/K-Table/K-Table.vue.d.ts +11 -8
- package/dist/components/K-Table/components/TableFilter.vue.d.ts +0 -1
- package/dist/components/K-Table/components/TableSlotBody.vue.d.ts +3 -2
- package/dist/components/K-Table/components/TableSlotGrid.vue.d.ts +3 -2
- package/dist/i18n/en/index.d.ts +14 -2
- package/dist/i18n/es/index.d.ts +14 -2
- package/dist/i18n/index.d.ts +30 -1
- package/dist/pages/TablePage.vue.d.ts +1125 -0
- package/dist/quasar-factory-lib.js +9558 -5527
- package/dist/quasar-factory-lib.umd.cjs +15 -9
- package/dist/store/table.d.ts +9 -0
- package/dist/style.css +1 -1
- package/package.json +4 -8
- package/src/components/K-Table/K-Table.vue +12 -6
- package/src/components/K-Table/components/CustomizedIcon.vue +2 -2
- package/src/components/K-Table/components/TableColumnsSelector.vue +2 -12
- package/src/components/K-Table/components/TableFilter.vue +10 -21
- package/src/components/K-Table/components/TableSlotBody.vue +7 -6
- package/src/components/K-Table/components/TableSlotGrid.vue +8 -7
- package/src/components/K-Table/components/TableSlotHeader.vue +2 -14
- package/src/components/K-Table/css/columnsSelector.css +10 -0
- package/src/components/K-Table/css/table.css +27 -25
- package/src/components/K-Table/css/tableFilter.css +9 -0
- package/src/components/K-Table/css/tableSlotHeader.css +10 -0
- package/src/components/K-Table/utils/infiniteScroll.ts +1 -1
- package/src/css/app.css +25 -1
- package/src/i18n/en/index.ts +14 -2
- package/src/i18n/es/index.ts +15 -3
- package/src/index.ts +3 -1
- package/src/layouts/MenuLayout.vue +2 -2
- package/src/main.ts +3 -1
- package/src/pages/TablePage.vue +316 -0
- package/src/router/routes.ts +6 -2
- package/src/store/index.js +9 -0
- package/src/store/table.js +22 -0
package/package.json
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
3
|
"@quasar/extras": "^1.16.11",
|
|
4
|
-
"file-saver": "^2.0.5",
|
|
5
4
|
"global": "^4.4.0",
|
|
5
|
+
"pinia": "^3.0.1",
|
|
6
6
|
"quasar": "^2.17.0",
|
|
7
|
-
"sortablejs": "^1.15.3",
|
|
8
7
|
"vue": "^3.5.11",
|
|
9
|
-
"vue-i18n": "^10.0.4"
|
|
10
|
-
"vue-pdf-embed": "^2.1.1"
|
|
8
|
+
"vue-i18n": "^10.0.4"
|
|
11
9
|
},
|
|
12
10
|
"description": "Quasar Library",
|
|
13
11
|
"devDependencies": {
|
|
@@ -41,8 +39,6 @@
|
|
|
41
39
|
"sass-embedded": "^1.79.4",
|
|
42
40
|
"semver": "^7.6.3",
|
|
43
41
|
"standard-version": "^9.5.0",
|
|
44
|
-
"storybook": "^8.1.11",
|
|
45
|
-
"storybook-addon-vue-slots": "^0.9.29",
|
|
46
42
|
"typescript": "^5.6.0",
|
|
47
43
|
"typescript-eslint": "^8.14.0",
|
|
48
44
|
"vite": "^5.4.8",
|
|
@@ -93,7 +89,6 @@
|
|
|
93
89
|
"preview": "vite preview",
|
|
94
90
|
"publishPackage": "yarn dev & yarn build && yarn cy:run && yarn release && git push --follow-tags origin main && npm publish --access public && exit",
|
|
95
91
|
"publishPackage:skipTests": "yarn build && yarn release && git push --follow-tags origin main && npm publish --access public",
|
|
96
|
-
"storybook": "storybook dev -p 6006",
|
|
97
92
|
"test": "",
|
|
98
93
|
"types": "vue-tsc ",
|
|
99
94
|
"docs:dev": "vitepress dev docs",
|
|
@@ -102,5 +97,6 @@
|
|
|
102
97
|
"release": "standard-version"
|
|
103
98
|
},
|
|
104
99
|
"type": "module",
|
|
105
|
-
"version": "0.0.
|
|
100
|
+
"version": "0.0.9",
|
|
101
|
+
"author": ""
|
|
106
102
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
v-if="!showSkeleton"
|
|
8
8
|
ref="myTable"
|
|
9
9
|
v-model:selected="selected"
|
|
10
|
-
class="
|
|
10
|
+
class="my-table"
|
|
11
11
|
:grid="smallDevice"
|
|
12
12
|
:style="tableStyle"
|
|
13
13
|
flat
|
|
@@ -61,7 +61,8 @@
|
|
|
61
61
|
v-if="!showSkeleton"
|
|
62
62
|
:table-props="props"
|
|
63
63
|
:selection-type="selectionType"
|
|
64
|
-
@on-update-checkbox-value="
|
|
64
|
+
@on-update-basic-checkbox-value="onUpdateBasicCheckboxValue"
|
|
65
|
+
@on-update-customized-checkbox-value="onUpdateCustomizedCheckboxValue"
|
|
65
66
|
@on-save-value-popup-edit="onSaveValuePopupEdit"
|
|
66
67
|
@on-click-button="onClickButton"
|
|
67
68
|
@click="onRowClick(props.row)"
|
|
@@ -72,7 +73,8 @@
|
|
|
72
73
|
:table-props="props"
|
|
73
74
|
:selection-type="selectionType"
|
|
74
75
|
:popup-edit-number-options="popupEditNumberOptions"
|
|
75
|
-
@on-update-checkbox-value="
|
|
76
|
+
@on-update-customized-checkbox-value="onUpdateCustomizedCheckboxValue"
|
|
77
|
+
@on-update-basic-checkbox-value="onUpdateBasicCheckboxValue"
|
|
76
78
|
@on-save-value-popup-edit="onSaveValuePopupEdit"
|
|
77
79
|
@on-click-button="onClickButton"
|
|
78
80
|
@click="onRowClick(props.row)"
|
|
@@ -178,7 +180,8 @@ export default defineComponent({
|
|
|
178
180
|
},
|
|
179
181
|
emits: [
|
|
180
182
|
'onSelectVisibleColumns',
|
|
181
|
-
'
|
|
183
|
+
'onUpdateBasicCheckboxValue',
|
|
184
|
+
'onUpdateCustomizedCheckboxValue',
|
|
182
185
|
'onSaveValuePopupEdit',
|
|
183
186
|
'onClickButton',
|
|
184
187
|
'storeUpdated',
|
|
@@ -240,8 +243,8 @@ export default defineComponent({
|
|
|
240
243
|
onSaveValuePopupEdit (row: object) {
|
|
241
244
|
this.$emit('onSaveValuePopupEdit', row)
|
|
242
245
|
},
|
|
243
|
-
|
|
244
|
-
this.$emit('
|
|
246
|
+
onUpdateBasicCheckboxValue (row: object) {
|
|
247
|
+
this.$emit('onUpdateBasicCheckboxValue', row)
|
|
245
248
|
},
|
|
246
249
|
onClickButton (emit: 'onClickButton', row: object) {
|
|
247
250
|
this.$emit(emit, row)
|
|
@@ -252,6 +255,9 @@ export default defineComponent({
|
|
|
252
255
|
deleteItem (row: object) {
|
|
253
256
|
this.$emit('deleteItem', row)
|
|
254
257
|
},
|
|
258
|
+
onUpdateCustomizedCheckboxValue (row: object) {
|
|
259
|
+
this.$emit('onUpdateCustomizedCheckboxValue', row)
|
|
260
|
+
},
|
|
255
261
|
clearTableSelection () {
|
|
256
262
|
const table = this.$refs.myTable as QTable
|
|
257
263
|
table.clearSelection()
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<q-icon
|
|
3
3
|
:name="
|
|
4
4
|
customizedIconName? customizedIconName : model
|
|
5
|
-
? '
|
|
6
|
-
: '
|
|
5
|
+
? 'check_circle'
|
|
6
|
+
: 'cancel'"
|
|
7
7
|
:color="
|
|
8
8
|
customizedIconColor? customizedIconColor : model? 'green': 'red'"
|
|
9
9
|
:size="customizedIconSize"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:options="columns"
|
|
12
12
|
option-value="name"
|
|
13
13
|
options-cover
|
|
14
|
-
class="
|
|
14
|
+
class="columns-selector"
|
|
15
15
|
options-selected-class="addicional-visible-columns"
|
|
16
16
|
@update:model-value="onSelectVisibleColumns"
|
|
17
17
|
>
|
|
@@ -57,15 +57,5 @@ export default {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
</script>
|
|
60
|
-
<style
|
|
61
|
-
.q-select {
|
|
62
|
-
width: 250px;
|
|
63
|
-
min-width: 150px;
|
|
64
|
-
flex: 1;
|
|
65
|
-
}
|
|
66
|
-
@media only screen and (max-width: 1100px) {
|
|
67
|
-
.q-select {
|
|
68
|
-
padding-top: 5px;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
60
|
+
<style>
|
|
71
61
|
</style>
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<q-input
|
|
3
3
|
ref="filterRef"
|
|
4
|
-
v-model="localStore.
|
|
4
|
+
v-model="localStore.filterValue"
|
|
5
5
|
borderless
|
|
6
6
|
dense
|
|
7
7
|
debounce="300"
|
|
8
|
-
class="auto-width"
|
|
8
|
+
class="table-filter auto-width"
|
|
9
9
|
placeholder="Search"
|
|
10
10
|
outlined
|
|
11
|
+
@update:model-value="((value: string)=> {
|
|
12
|
+
localStore.setFilterValue(value)
|
|
13
|
+
})"
|
|
11
14
|
>
|
|
12
15
|
<template #append>
|
|
13
16
|
<q-icon
|
|
14
|
-
v-if="localStore.
|
|
17
|
+
v-if="localStore.filterValue === ''"
|
|
15
18
|
name="search"
|
|
16
19
|
color="black"
|
|
17
20
|
/>
|
|
@@ -19,7 +22,9 @@
|
|
|
19
22
|
v-else
|
|
20
23
|
name="clear"
|
|
21
24
|
class="cursor-pointer"
|
|
22
|
-
@click="
|
|
25
|
+
@click="(()=> {
|
|
26
|
+
localStore.cleanTableFilter()
|
|
27
|
+
})"
|
|
23
28
|
/>
|
|
24
29
|
</template>
|
|
25
30
|
</q-input>
|
|
@@ -40,9 +45,7 @@ export default {
|
|
|
40
45
|
}
|
|
41
46
|
},
|
|
42
47
|
beforeMount () {
|
|
43
|
-
this.localStore.
|
|
44
|
-
this.localStore.valueInputFilterTable = ''
|
|
45
|
-
this.localStore.lastFilterValue = ''
|
|
48
|
+
this.localStore.cleanTableFilter()
|
|
46
49
|
},
|
|
47
50
|
mounted () {
|
|
48
51
|
},
|
|
@@ -52,23 +55,9 @@ export default {
|
|
|
52
55
|
const input = this.$refs.filterRef as QInput
|
|
53
56
|
input.focus()
|
|
54
57
|
}, 10)
|
|
55
|
-
},
|
|
56
|
-
cleanSearchValue () {
|
|
57
|
-
this.localStore.valueInputFilterTable = ''
|
|
58
|
-
this.localStore.lastFilterValue = ''
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
</script>
|
|
63
62
|
<style scoped>
|
|
64
|
-
.q-input {
|
|
65
|
-
width: 250px;
|
|
66
|
-
flex: 1;
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
@media only screen and (max-width: 1100px) {
|
|
70
|
-
.q-input {
|
|
71
|
-
padding-top: 5px;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
63
|
</style>
|
|
@@ -21,12 +21,14 @@
|
|
|
21
21
|
>
|
|
22
22
|
<span
|
|
23
23
|
v-if="getColumnValue(col)"
|
|
24
|
-
v-
|
|
24
|
+
v-html="tableProps.row[col.name]"
|
|
25
25
|
/>
|
|
26
|
+
<!-- fa-solid fa-pen-to-square -->
|
|
26
27
|
<q-icon
|
|
27
28
|
v-if="col.editable"
|
|
28
|
-
name="
|
|
29
|
+
name="edit"
|
|
29
30
|
color="primary"
|
|
31
|
+
size="sm"
|
|
30
32
|
/>
|
|
31
33
|
<TablePopupEdit
|
|
32
34
|
v-if="col.editable"
|
|
@@ -51,7 +53,7 @@
|
|
|
51
53
|
:model="tablePropsData.row[col.name]"
|
|
52
54
|
@check-box-emit="(val: object) => {
|
|
53
55
|
tablePropsData.row[col.name] = val
|
|
54
|
-
$emit(col.checkBoxEmit || '
|
|
56
|
+
$emit(col.checkBoxEmit || 'onUpdateBasicCheckboxValue', tablePropsData.row)
|
|
55
57
|
}"
|
|
56
58
|
/>
|
|
57
59
|
<CustomizedCheckBox
|
|
@@ -65,10 +67,9 @@
|
|
|
65
67
|
:unchecked-icon="col.uncheckedIcon"
|
|
66
68
|
@check-box-emit="(val: object) => {
|
|
67
69
|
tablePropsData.row[col.name] = val
|
|
68
|
-
$emit(col.checkBoxEmit || '
|
|
70
|
+
$emit(col.checkBoxEmit || 'onUpdateCustomizedCheckboxValue', tablePropsData.row)
|
|
69
71
|
}"
|
|
70
72
|
/>
|
|
71
|
-
|
|
72
73
|
<CustomizedIcon
|
|
73
74
|
v-if="col.showCustomizedIcon"
|
|
74
75
|
:model="tablePropsData.row[col.name]"
|
|
@@ -114,7 +115,7 @@ export default {
|
|
|
114
115
|
default: 'none'
|
|
115
116
|
}
|
|
116
117
|
},
|
|
117
|
-
emits: ['onSaveValuePopupEdit', '
|
|
118
|
+
emits: ['onSaveValuePopupEdit', 'onUpdateBasicCheckboxValue', 'onClickButton', 'onUpdateCustomizedCheckboxValue'],
|
|
118
119
|
data () {
|
|
119
120
|
return {
|
|
120
121
|
tablePropsData: this.tableProps
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
color="primary"
|
|
47
47
|
size="sm"
|
|
48
48
|
/>
|
|
49
|
-
<span v-
|
|
49
|
+
<span v-html="tableProps.row[col.name]" />
|
|
50
50
|
<TablePopupEdit
|
|
51
51
|
:model="tablePropsData.row[col.name] || ''"
|
|
52
52
|
:label="col.label"
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
:model="tablePropsData.row[col.name]"
|
|
72
72
|
@check-box-emit="(val: object) => {
|
|
73
73
|
tablePropsData.row[col.name] = val
|
|
74
|
-
$emit(col.checkBoxEmit || '
|
|
74
|
+
$emit(col.checkBoxEmit || 'onUpdateBasicCheckboxValue', tablePropsData.row)
|
|
75
75
|
}"
|
|
76
76
|
/>
|
|
77
77
|
<CustomizedCheckBox
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
:unchecked-icon="col.uncheckedIcon"
|
|
86
86
|
@check-box-emit="(val: object) => {
|
|
87
87
|
tablePropsData.row[col.name] = val
|
|
88
|
-
$emit(col.checkBoxEmit || '
|
|
88
|
+
$emit(col.checkBoxEmit || 'onUpdateCustomizedCheckboxValue', tablePropsData.row)
|
|
89
89
|
}"
|
|
90
90
|
/>
|
|
91
91
|
</q-item-section>
|
|
@@ -149,8 +149,9 @@ export default {
|
|
|
149
149
|
},
|
|
150
150
|
emits: [
|
|
151
151
|
'onSaveValuePopupEdit',
|
|
152
|
-
'
|
|
153
|
-
'onClickButton'
|
|
152
|
+
'onUpdateBasicCheckboxValue',
|
|
153
|
+
'onClickButton',
|
|
154
|
+
'onUpdateCustomizedCheckboxValue'
|
|
154
155
|
],
|
|
155
156
|
data () {
|
|
156
157
|
return {
|
|
@@ -172,7 +173,7 @@ export default {
|
|
|
172
173
|
}
|
|
173
174
|
</script>
|
|
174
175
|
<style>
|
|
175
|
-
.q-btn {
|
|
176
|
+
/* .q-btn {
|
|
176
177
|
padding: unset;
|
|
177
|
-
}
|
|
178
|
+
} */
|
|
178
179
|
</style>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!-- eslint-disable vue/no-v-model-argument -->
|
|
3
3
|
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
|
|
4
4
|
<template>
|
|
5
|
-
<q-tr>
|
|
5
|
+
<q-tr class="table-header">
|
|
6
6
|
<q-th v-if="selectionType !== 'none'">
|
|
7
7
|
<!-- Do not remove! Using with sticky colums -->
|
|
8
8
|
<q-checkbox
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</template>
|
|
24
24
|
<script lang="ts">
|
|
25
25
|
export default {
|
|
26
|
-
name: '
|
|
26
|
+
name: 'TableSlotHeader',
|
|
27
27
|
props: {
|
|
28
28
|
tableProps: {
|
|
29
29
|
type: Object,
|
|
@@ -50,16 +50,4 @@ export default {
|
|
|
50
50
|
}
|
|
51
51
|
</script>
|
|
52
52
|
<style scoped>
|
|
53
|
-
|
|
54
|
-
@media only screen and (max-width: 1100px) {
|
|
55
|
-
.k-table tr:first-child th:first-child {
|
|
56
|
-
padding-left: 5px !important;
|
|
57
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.k-table .q-checkbox{
|
|
61
|
-
float: left;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
53
|
</style>
|
|
@@ -1,81 +1,83 @@
|
|
|
1
|
+
@import url('./columnsSelector.css');
|
|
2
|
+
@import url('./tableFilter.css');
|
|
3
|
+
@import url('./tableSlotHeader.css');
|
|
1
4
|
/* bg color is important; just specify one */
|
|
2
|
-
.
|
|
3
|
-
.
|
|
4
|
-
.
|
|
5
|
-
.
|
|
6
|
-
.
|
|
5
|
+
.my-table tr th,
|
|
6
|
+
.my-table td:first-child,
|
|
7
|
+
.my-table .q-table__top,
|
|
8
|
+
.my-table .q-table__bottom,
|
|
9
|
+
.my-table .q-table__middle
|
|
7
10
|
{
|
|
8
|
-
background-color: var(--
|
|
11
|
+
background-color: var(--main-color);
|
|
9
12
|
}
|
|
10
|
-
|
|
11
|
-
.k-table tr th {
|
|
13
|
+
.my-table tr th {
|
|
12
14
|
position: sticky;
|
|
13
15
|
/* higher than z-index for td below */
|
|
14
16
|
z-index: 2;
|
|
15
17
|
}
|
|
16
|
-
.
|
|
18
|
+
.my-table thead tr:last-child th {
|
|
17
19
|
/* height of all previous header rows */
|
|
18
20
|
top: 48px;
|
|
19
21
|
/* highest z-index */
|
|
20
22
|
z-index: 3;
|
|
21
23
|
}
|
|
22
|
-
.
|
|
24
|
+
.my-table thead tr:first-child th {
|
|
23
25
|
top: 0;
|
|
24
26
|
z-index: 1;
|
|
25
27
|
}
|
|
26
28
|
|
|
27
|
-
.
|
|
29
|
+
.my-table tr:first-child th:first-child {
|
|
28
30
|
/* highest z-index */
|
|
29
31
|
z-index: 3;
|
|
30
32
|
}
|
|
31
|
-
.
|
|
33
|
+
.my-table td:first-child {
|
|
32
34
|
z-index: 1;
|
|
33
35
|
}
|
|
34
|
-
.
|
|
35
|
-
.
|
|
36
|
+
.my-table td:first-child,
|
|
37
|
+
.my-table th:first-child {
|
|
36
38
|
position: sticky;
|
|
37
39
|
left: 0;
|
|
38
40
|
}
|
|
39
|
-
.
|
|
41
|
+
.my-table tbody {
|
|
40
42
|
/* height of all previous header rows */
|
|
41
43
|
scroll-margin-top: 48px;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
|
-
.
|
|
46
|
+
.my-table .q-table__control {
|
|
45
47
|
width: unset;
|
|
46
48
|
}
|
|
47
|
-
.
|
|
49
|
+
.my-table .q-table th {
|
|
48
50
|
font-weight: bold;
|
|
49
|
-
color: var(--
|
|
51
|
+
color: var(--black);
|
|
50
52
|
}
|
|
51
53
|
@media only screen and (max-width: 1100px) {
|
|
52
|
-
.
|
|
54
|
+
.my-table .q-table__grid-content {
|
|
53
55
|
overflow: auto;
|
|
54
56
|
height: 400px;
|
|
55
57
|
}
|
|
56
|
-
.
|
|
58
|
+
.my-table .q-table__top {
|
|
57
59
|
padding: 4px 16px;
|
|
58
60
|
display: flex;
|
|
59
61
|
width: 100%;
|
|
60
62
|
}
|
|
61
|
-
.
|
|
63
|
+
.my-table .q-table__top:only-child .q-field {
|
|
62
64
|
flex: 1 0 100%;
|
|
63
65
|
}
|
|
64
66
|
|
|
65
|
-
.
|
|
67
|
+
.my-table .q-table__control {
|
|
66
68
|
width: 100%;
|
|
67
69
|
padding: 0;
|
|
68
70
|
}
|
|
69
71
|
.q-table--grid .q-table__middle {
|
|
70
72
|
margin-bottom: 0;
|
|
71
73
|
}
|
|
72
|
-
.
|
|
74
|
+
.my-table .q-table__bottom{
|
|
73
75
|
border-top: 1px solid rgba(0, 0, 0, 0.12);
|
|
74
76
|
}
|
|
75
|
-
.
|
|
77
|
+
.my-table .q-list--dense > .q-item {
|
|
76
78
|
padding: 2px 8px;
|
|
77
79
|
}
|
|
78
|
-
.
|
|
80
|
+
.my-table .q-table__top {
|
|
79
81
|
padding: 0 4px;
|
|
80
82
|
}
|
|
81
83
|
}
|
|
@@ -12,7 +12,7 @@ const infinitScroll = {
|
|
|
12
12
|
const fnAddScroll = (event: Event) => {
|
|
13
13
|
const { scrollHeight, scrollTop, clientHeight } = event.target as HTMLElement
|
|
14
14
|
if (Math.abs(scrollHeight - clientHeight - scrollTop) < 1) {
|
|
15
|
-
console.log(`[${tableType}] You are at the bottom
|
|
15
|
+
console.log(`[${tableType}] You are at the bottom!`, self.totalPage)
|
|
16
16
|
self.totalPage++
|
|
17
17
|
}
|
|
18
18
|
}
|
package/src/css/app.css
CHANGED
|
@@ -1 +1,25 @@
|
|
|
1
|
-
@import url('../components/K-Table/css/table.css');
|
|
1
|
+
@import url('../components/K-Table/css/table.css');
|
|
2
|
+
:root {
|
|
3
|
+
--main-color: #FFF8F2;
|
|
4
|
+
--light-beige: #E3DDD6;
|
|
5
|
+
--light-gray: #727170;
|
|
6
|
+
--dark-gray: #797675;
|
|
7
|
+
--almost-black: #212427;
|
|
8
|
+
--black: #000000;
|
|
9
|
+
--light-peach: #E7C8BE;
|
|
10
|
+
--light-blue: #C7DBF4;
|
|
11
|
+
--light-cream: #FAEBDA;
|
|
12
|
+
--sage-green: #719E8B;
|
|
13
|
+
--light-green:#C3DBBC;
|
|
14
|
+
--positive: #597765;
|
|
15
|
+
--negative: #6F1A07;
|
|
16
|
+
--dusty-rose: #AE928C;
|
|
17
|
+
--main-font-family: 'Beatrice-Regular';
|
|
18
|
+
--secondary-font-family: 'SangBleuKingdom-Light, sans-serif';
|
|
19
|
+
}
|
|
20
|
+
.required-table-columns {
|
|
21
|
+
background-color: var(--light-green);
|
|
22
|
+
}
|
|
23
|
+
.addicional-visible-columns {
|
|
24
|
+
background-color: var(--light-blue);
|
|
25
|
+
}
|
package/src/i18n/en/index.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
import translateKeys from '../translateKeys'
|
|
1
|
+
// import translateKeys from '../translateKeys'
|
|
2
2
|
|
|
3
|
-
const en: translateKeys = {
|
|
3
|
+
// const en: translateKeys = {
|
|
4
|
+
const en = {
|
|
4
5
|
test: 'Test',
|
|
6
|
+
table: {
|
|
7
|
+
search: 'Search',
|
|
8
|
+
cancel: 'Cancel',
|
|
9
|
+
confirm: 'Save'
|
|
10
|
+
},
|
|
11
|
+
form: {
|
|
12
|
+
rules: {
|
|
13
|
+
emptyField: 'The field cannot be empty',
|
|
14
|
+
exceedCharactersTypeList: 'Field must not exceed {0} characters'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
5
17
|
}
|
|
6
18
|
export default en
|
package/src/i18n/es/index.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
import translateKeys from "../translateKeys"
|
|
1
|
+
// import translateKeys from "../translateKeys"
|
|
2
2
|
|
|
3
|
-
const es: translateKeys = {
|
|
4
|
-
|
|
3
|
+
// const es: translateKeys = {
|
|
4
|
+
const es = {
|
|
5
|
+
test: 'Test',
|
|
6
|
+
table: {
|
|
7
|
+
search: 'Buscar',
|
|
8
|
+
cancel: 'Cancelar',
|
|
9
|
+
confirm: 'Guardar'
|
|
10
|
+
},
|
|
11
|
+
form: {
|
|
12
|
+
rules: {
|
|
13
|
+
emptyField: 'El campo no puede estar vacío',
|
|
14
|
+
exceedCharactersTypeList: 'El campo no debe exceder más de {0} caracteres'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
5
17
|
}
|
|
6
18
|
export default es
|
package/src/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { App, Plugin } from 'vue'
|
|
|
4
4
|
import { KMyButton, MyTable } from './components/plugins.ts'
|
|
5
5
|
import { registerPlugin, setVueInstance } from './utils/plugins.ts'
|
|
6
6
|
import TranslateKeys from './i18n/translateKeys.ts'
|
|
7
|
-
|
|
7
|
+
import { createPinia } from 'pinia'
|
|
8
8
|
export { KMyButton, MyTable } from './components/index.ts'
|
|
9
9
|
|
|
10
10
|
export type { TranslateKeys }
|
|
@@ -13,6 +13,7 @@ export * from './i18n/messages.js'
|
|
|
13
13
|
// Import Quasar css
|
|
14
14
|
import './css/app.css'
|
|
15
15
|
import i18n from './i18n'
|
|
16
|
+
const pinia = createPinia()
|
|
16
17
|
|
|
17
18
|
const plugin: Plugin = {
|
|
18
19
|
install(app: App) {
|
|
@@ -21,6 +22,7 @@ const plugin: Plugin = {
|
|
|
21
22
|
registerPlugin(app, KMyButton)
|
|
22
23
|
registerPlugin(app, MyTable)
|
|
23
24
|
app.use(i18n)
|
|
25
|
+
app.use(pinia)
|
|
24
26
|
i18n.global.locale = 'en'
|
|
25
27
|
app.use(Quasar, {
|
|
26
28
|
plugins: {} // import Quasar plugins and add here
|
package/src/main.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { Quasar } from 'quasar'
|
|
4
4
|
import { createApp } from 'vue'
|
|
5
|
+
import { createPinia } from 'pinia'
|
|
5
6
|
import { createRouter, createWebHashHistory } from 'vue-router'
|
|
6
7
|
// Import icon libraries
|
|
7
8
|
import '@quasar/extras/material-icons/material-icons.css'
|
|
@@ -18,11 +19,12 @@ import './css/app.css'
|
|
|
18
19
|
import i18n from './i18n'
|
|
19
20
|
|
|
20
21
|
const myApp = createApp(App)
|
|
21
|
-
|
|
22
|
+
const pinia = createPinia()
|
|
22
23
|
myApp.use(Quasar, {
|
|
23
24
|
plugins: {} // import Quasar plugins and add here
|
|
24
25
|
})
|
|
25
26
|
myApp.use(i18n)
|
|
27
|
+
myApp.use(pinia)
|
|
26
28
|
i18n.global.locale = 'en'
|
|
27
29
|
function updateLanguage (lang: 'es' | 'en') {
|
|
28
30
|
i18n.global.locale = lang
|