quasar-factory-lib 0.0.38 → 0.0.40

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/package.json CHANGED
@@ -97,6 +97,6 @@
97
97
  "release": "standard-version"
98
98
  },
99
99
  "type": "module",
100
- "version": "0.0.38",
100
+ "version": "0.0.40",
101
101
  "author": ""
102
102
  }
@@ -70,6 +70,7 @@
70
70
  </template>
71
71
  <template #item="props">
72
72
  <TableSlotGrid
73
+ v-if="!showSkeleton"
73
74
  :table-props="props"
74
75
  :selection-type="selectionType"
75
76
  :popup-edit-number-options="popupEditNumberOptions"
@@ -175,6 +176,10 @@ export default defineComponent({
175
176
  },
176
177
  showSkeleton: {
177
178
  type: Boolean
179
+ },
180
+ filteredRows: {
181
+ type: Array as () => object [] | [],
182
+ required: true
178
183
  }
179
184
  },
180
185
  emits: [
@@ -223,6 +228,9 @@ export default defineComponent({
223
228
  watch: {
224
229
  rows (val) {
225
230
  this.rowsData = val
231
+ },
232
+ visibleColumns (val: string [] | []) {
233
+ this.visibleColumnsData = val
226
234
  }
227
235
  },
228
236
  mounted () {
@@ -282,17 +290,15 @@ export default defineComponent({
282
290
  this.loading = !this.loading
283
291
  },
284
292
  sortMethod (rows: object[], sortBy: string, descending: boolean): object[] | [] {
285
- const allrowsSorted = TableSort.sortMethod(rows, sortBy, descending, this.sortDataValues)
293
+ console.log(rows.length)
294
+ const allrowsSorted = TableSort.sortMethod(this.filteredRows, sortBy, descending, this.sortDataValues)
286
295
  const rowsSliced = allrowsSorted.slice(0, rows.length)
287
- if (this.store.valueInputFilterTable === '') {
296
+ if (this.store.filterValue === '') {
288
297
  return rowsSliced
289
298
  } else {
290
299
  return TableSort.sortMethod(rows, sortBy, descending, this.sortDataValues)
291
300
  }
292
- }
301
+ },
293
302
  }
294
303
  })
295
304
  </script>
296
- <style>
297
- /* @import url('./style.css'); */
298
- </style>
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <tr
3
- :class="tableProps.row.rowBgColor || 'bg-main-color'"
3
+ :class="tablePropsData.row.rowBgColor || 'bg-main-color'"
4
4
  >
5
5
  <q-td
6
6
  v-if="selectionType != 'none'"
7
- :id="tableProps.row.id"
7
+ :id="tablePropsData.row.id"
8
8
  auto-width
9
9
  >
10
10
  <q-checkbox
@@ -13,15 +13,15 @@
13
13
  />
14
14
  </q-td>
15
15
  <q-td
16
- v-for="col in tableProps.cols"
16
+ v-for="col in tablePropsData.cols"
17
17
  :key="col.name"
18
- :class="tableProps.row.rowBgColor || 'bg-main-color'"
19
- :props="tableProps"
18
+ :class="tablePropsData.row.rowBgColor || 'bg-main-color'"
19
+ :props="tablePropsData"
20
20
  >
21
21
  <span
22
22
  :style="tablePropsData.row.tdStyle"
23
23
  v-if="getColumnValue(col)"
24
- v-html="tableProps.row[col.name]"
24
+ v-html="tablePropsData.row[col.name]"
25
25
  />
26
26
  <!-- fa-solid fa-pen-to-square -->
27
27
  <q-icon
@@ -35,7 +35,7 @@
35
35
  v-if="col.editable"
36
36
  :model="tablePropsData.row[col.name] || ''"
37
37
  :label="col.label"
38
- :data-cy="col.popupEditDataCy + '-' + tableProps.row.id"
38
+ :data-cy="col.popupEditDataCy + '-' + tablePropsData.row.id"
39
39
  :input-max-length="col.inputMaxLength || 20"
40
40
  :mask="col.popupEditMask || ''"
41
41
  :input-type="col.popupEditInputtype || 'text'"
@@ -50,7 +50,7 @@
50
50
  <BasicCheckBox
51
51
  v-if="col.showBasicCheckbox"
52
52
  :table-props="tablePropsData"
53
- :data-cy="col.checkBoxDataCy + '-' + tableProps.row.id || ''"
53
+ :data-cy="col.checkBoxDataCy + '-' + tablePropsData.row.id || ''"
54
54
  :model="tablePropsData.row[col.name]"
55
55
  @check-box-emit="(val: object) => {
56
56
  tablePropsData.row[col.name] = val
@@ -60,7 +60,7 @@
60
60
  <CustomizedCheckBox
61
61
  v-if="col.showCustomizedCheckBox"
62
62
  :table-props="tablePropsData"
63
- :data-cy="col.checkBoxDataCy + '-' + tableProps.row.id || ''"
63
+ :data-cy="col.checkBoxDataCy + '-' + tablePropsData.row.id || ''"
64
64
  :model="tablePropsData.row[col.name]"
65
65
  :check-box-color="tablePropsData.row[col.name] ? col.checkBoxColorCaseTrue : col.checkBoxColorCaseFalse"
66
66
  :check-box-icon-size="'md'"
@@ -81,11 +81,11 @@
81
81
 
82
82
  <CustomizedButton
83
83
  v-if="col.showCustomizedButton"
84
- :data-cy="col.colButtonDataCy + '-' + tableProps.row.id"
84
+ :data-cy="col.colButtonDataCy + '-' + tablePropsData.row.id"
85
85
  :btn-color="col.btnColor || 'primary'"
86
86
  :btn-icon="col.btnIcon|| ''"
87
87
  @on-click-button="() => {
88
- $emit('onClickButton', col.btnEmit, tableProps.row)
88
+ $emit('onClickButton', col.btnEmit, tablePropsData.row)
89
89
  }"
90
90
  />
91
91
  </q-td>
@@ -116,6 +116,11 @@ export default {
116
116
  default: 'none'
117
117
  }
118
118
  },
119
+ watch: {
120
+ tableProps (val) {
121
+ this.tablePropsData = val
122
+ }
123
+ },
119
124
  emits: ['onSaveValuePopupEdit', 'onUpdateBasicCheckboxValue', 'onClickButton', 'onUpdateCustomizedCheckboxValue'],
120
125
  data () {
121
126
  return {
@@ -12,7 +12,7 @@
12
12
  ? $q.dark.isActive
13
13
  ? 'bg-grey-9'
14
14
  : 'bg-grey-2'
15
- : tableProps.row.rowBgColor || 'bg-main-color'
15
+ : tablePropsData.row.rowBgColor || 'bg-main-color'
16
16
  "
17
17
  >
18
18
  <q-card-section>
@@ -43,16 +43,16 @@
43
43
  >
44
44
  <q-icon
45
45
  v-if="col.editable"
46
- name="fa-solid fa-pen-to-square"
46
+ name="edit"
47
47
  color="primary"
48
48
  size="sm"
49
49
  class="cursor-pointer"
50
50
  />
51
- <span v-html="tableProps.row[col.name]" />
51
+ <span v-html="tablePropsData.row[col.name]" />
52
52
  <TablePopupEdit
53
53
  :model="tablePropsData.row[col.name] || ''"
54
54
  :label="col.label"
55
- :data-cy="col.popupEditDataCy + '-' + tableProps.row.id"
55
+ :data-cy="col.popupEditDataCy + '-' + tablePropsData.row.id"
56
56
  :input-max-length="col.inputMaxLength || 20"
57
57
  :mask="col.popupEditMask || ''"
58
58
  :input-type="col.popupEditInputtype || 'text'"
@@ -69,7 +69,7 @@
69
69
  <BasicCheckBox
70
70
  v-if="col.showBasicCheckbox"
71
71
  :table-props="tablePropsData"
72
- :data-cy="col.checkBoxDataCy + '-' + tableProps.row.id || ''"
72
+ :data-cy="col.checkBoxDataCy + '-' + tablePropsData.row.id || ''"
73
73
  :model="tablePropsData.row[col.name]"
74
74
  @check-box-emit="(val: object) => {
75
75
  tablePropsData.row[col.name] = val
@@ -79,7 +79,7 @@
79
79
  <CustomizedCheckBox
80
80
  v-if="col.showCustomizedCheckBox"
81
81
  :table-props="tablePropsData"
82
- :data-cy="col.checkBoxDataCy + '-' + tableProps.row.id || ''"
82
+ :data-cy="col.checkBoxDataCy + '-' + tablePropsData.row.id || ''"
83
83
  :model="tablePropsData.row[col.name]"
84
84
  :check-box-color="tablePropsData.row[col.name] ? col.checkBoxColorCaseTrue : col.checkBoxColorCaseFalse"
85
85
  :check-box-icon-size="'lg'"
@@ -106,11 +106,11 @@
106
106
  <q-item-section>
107
107
  <CustomizedButton
108
108
  v-if="col.showCustomizedButton"
109
- :data-cy="col.colButtonDataCy + '-' + tableProps.row.id"
109
+ :data-cy="col.colButtonDataCy + '-' + tablePropsData.row.id"
110
110
  :btn-color="col.btnColor || 'primary'"
111
111
  :btn-icon="col.btnIcon|| ''"
112
112
  @on-click-button="() => {
113
- $emit('onClickButton', col.btnEmit, tableProps.row)
113
+ $emit('onClickButton', col.btnEmit, tablePropsData.row)
114
114
  }"
115
115
  />
116
116
  </q-item-section>
@@ -162,8 +162,8 @@ export default {
162
162
  }
163
163
  },
164
164
  watch: {
165
- gridRowsSelected (val: boolean) {
166
- this.selected = val
165
+ tableProps (val) {
166
+ this.tablePropsData = val
167
167
  }
168
168
  },
169
169
  mounted () {},
@@ -13,10 +13,10 @@
13
13
  />
14
14
  </q-th>
15
15
  <q-th
16
- v-for="col in tableProps.cols"
16
+ v-for="col in tablePropsData.cols"
17
17
  v-if="!smallDevice"
18
18
  :key="col.name"
19
- :props="tableProps"
19
+ :props="tablePropsData"
20
20
  >
21
21
  {{ col.label }}
22
22
  </q-th>
@@ -46,6 +46,11 @@ export default {
46
46
  showSearch: false
47
47
  }
48
48
  },
49
+ watch: {
50
+ tableProps (val) {
51
+ this.tablePropsData = val
52
+ }
53
+ },
49
54
  methods: {
50
55
  }
51
56
  }
@@ -2,7 +2,8 @@
2
2
 
3
3
  import infiniteScroll from './infiniteScroll'
4
4
  const filterMethod = {
5
- filter (self: {filterTerms: string }, rows: string | [], terms: { search: string }): object[] | [] {
5
+ filter (self: {filterTerms: string, filteredRows: object[] | [] }, rows: string | [], terms: { search: string }): object[] | [] {
6
+ console.log(rows.length, 'rows')
6
7
  self.filterTerms = terms.search
7
8
  if (terms.search) {
8
9
  const filteredRows = []
@@ -12,8 +13,11 @@ const filterMethod = {
12
13
  filteredRows.push(rows[i])
13
14
  }
14
15
  }
16
+ // self.filteredRows = filteredRows
17
+ // console.log(filteredRows.length, 'filteredRows terms')
15
18
  return infiniteScroll.paginationNewTable(self, filteredRows)
16
19
  } else {
20
+ self.filteredRows = rows
17
21
  return infiniteScroll.paginationNewTable(self, rows)
18
22
  }
19
23
  },
package/src/css/app.css CHANGED
@@ -28,6 +28,9 @@
28
28
  .bg-main-color {
29
29
  background-color: var(--main-color);
30
30
  }
31
+ .bg-light-peach {
32
+ background-color: var(--light-peach);
33
+ }
31
34
  .text-color-light-gray {
32
35
  color: var(--light-gray);
33
36
  }
@@ -24,6 +24,12 @@
24
24
  router.push('navBarPage')
25
25
  }"
26
26
  />
27
+ <q-btn
28
+ label="pda"
29
+ @click="() => {
30
+ router.push('pdaLayout')
31
+ }"
32
+ />
27
33
  </div>
28
34
  </template>
29
35
  <script setup lang="ts">