quasar-factory-lib 0.0.39 → 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.39",
100
+ "version": "0.0.40",
101
101
  "author": ""
102
102
  }
@@ -176,6 +176,10 @@ export default defineComponent({
176
176
  },
177
177
  showSkeleton: {
178
178
  type: Boolean
179
+ },
180
+ filteredRows: {
181
+ type: Array as () => object [] | [],
182
+ required: true
179
183
  }
180
184
  },
181
185
  emits: [
@@ -286,17 +290,15 @@ export default defineComponent({
286
290
  this.loading = !this.loading
287
291
  },
288
292
  sortMethod (rows: object[], sortBy: string, descending: boolean): object[] | [] {
289
- 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)
290
295
  const rowsSliced = allrowsSorted.slice(0, rows.length)
291
- if (this.store.valueInputFilterTable === '') {
296
+ if (this.store.filterValue === '') {
292
297
  return rowsSliced
293
298
  } else {
294
299
  return TableSort.sortMethod(rows, sortBy, descending, this.sortDataValues)
295
300
  }
296
- }
301
+ },
297
302
  }
298
303
  })
299
304
  </script>
300
- <style>
301
- /* @import url('./style.css'); */
302
- </style>
@@ -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
  },
@@ -31,6 +31,8 @@
31
31
  :selection-type="'multiple'"
32
32
  :filter-method="filterMethod"
33
33
  :filter-computed="filter"
34
+ :sortDataValues="['date']"
35
+ :filteredRows="filteredRows"
34
36
  @on-select-visible-columns="saveSelectedColumns"
35
37
  @on-update-basic-checkbox-value="onUpdateBasicCheckboxValue"
36
38
  @on-update-customized-checkbox-value="onUpdateCustomizedCheckboxValue"
@@ -61,7 +63,7 @@ export default {
61
63
  forceRender: false,
62
64
  store: tableStore(),
63
65
  totalPage: 0,
64
- pageSize: 20,
66
+ pageSize:15,
65
67
  tableStyle: '',
66
68
  columns: [{
67
69
  name: 'name',
@@ -70,6 +72,13 @@ export default {
70
72
  align: 'left',
71
73
  sortable: true
72
74
  },
75
+ {
76
+ name: 'date',
77
+ required: true,
78
+ label: 'Fecha',
79
+ align: 'left',
80
+ sortable: true
81
+ },
73
82
  {
74
83
  name: 'available',
75
84
  required: true,
@@ -164,6 +173,7 @@ export default {
164
173
  {
165
174
  id: 1,
166
175
  name: 'Frozen Yogurt',
176
+ date: '21/12/2024',
167
177
  booleanIcon: true,
168
178
  available: true,
169
179
  calories: 159,
@@ -178,6 +188,7 @@ export default {
178
188
  {
179
189
  id: 2,
180
190
  name: 'Ice cream sandwich',
191
+ date: '12/12/2024',
181
192
  booleanIcon: true,
182
193
  available: false,
183
194
  calories: 237,
@@ -192,6 +203,7 @@ export default {
192
203
  {
193
204
  id: 3,
194
205
  name: 'Eclair',
206
+ date: '21/12/2025',
195
207
  booleanIcon: true,
196
208
  available: true,
197
209
  calories: 262,
@@ -206,6 +218,7 @@ export default {
206
218
  {
207
219
  id: 4,
208
220
  name: 'Cupcake',
221
+ date: '05/07/2024',
209
222
  booleanIcon: false,
210
223
  available: false,
211
224
  calories: 305,
@@ -220,6 +233,7 @@ export default {
220
233
  {
221
234
  id: 5,
222
235
  name: 'Gingerbread',
236
+ date: '07/05/2024',
223
237
  booleanIcon: true,
224
238
  available: true,
225
239
  calories: 356,
@@ -234,6 +248,7 @@ export default {
234
248
  {
235
249
  id: 5,
236
250
  name: 'Jelly bean',
251
+ date: '11/12/2025',
237
252
  booleanIcon: false,
238
253
  available: false,
239
254
  calories: 375,
@@ -249,6 +264,7 @@ export default {
249
264
  id: 6,
250
265
  name: 'Lollipop',
251
266
  booleanIcon: true,
267
+ date: '21/12/2024',
252
268
  available: true,
253
269
  calories: 392,
254
270
  fat: 0.2,
@@ -263,6 +279,7 @@ export default {
263
279
  id: 7,
264
280
  name: 'Honeycomb',
265
281
  booleanIcon: true,
282
+ date: '22/12/2023',
266
283
  available: false,
267
284
  calories: 408,
268
285
  fat: 3.2,
@@ -277,6 +294,7 @@ export default {
277
294
  id: 8,
278
295
  name: 'Donut',
279
296
  booleanIcon: true,
297
+ date: '25/12/2024',
280
298
  available: true,
281
299
  calories: 452,
282
300
  fat: 25.0,
@@ -290,6 +308,172 @@ export default {
290
308
  {
291
309
  id: 9,
292
310
  name: 'KitKat',
311
+ date: '20/12/2024',
312
+ booleanIcon: false,
313
+ available: false,
314
+ calories: 518,
315
+ fat: 26.0,
316
+ carbs: 65,
317
+ checked: true,
318
+ protein: 7,
319
+ sodium: 54,
320
+ calcium: '12%',
321
+ iron: '6%'
322
+ },
323
+ {
324
+ id: 10,
325
+ name: 'Frozen Yogurt',
326
+ date: '21/12/2024',
327
+ booleanIcon: true,
328
+ available: true,
329
+ calories: 159,
330
+ fat: 6.0,
331
+ carbs: 24,
332
+ checked: false,
333
+ protein: 4.0,
334
+ sodium: 87,
335
+ calcium: '14%',
336
+ iron: '1%'
337
+ },
338
+ {
339
+ id: 11,
340
+ name: 'Frozen Yogurt',
341
+ date: '21/12/2024',
342
+ booleanIcon: true,
343
+ available: true,
344
+ calories: 159,
345
+ fat: 6.0,
346
+ carbs: 24,
347
+ checked: false,
348
+ protein: 4.0,
349
+ sodium: 87,
350
+ calcium: '14%',
351
+ iron: '1%'
352
+ },
353
+ {
354
+ id: 12,
355
+ name: 'Ice cream sandwich',
356
+ date: '12/12/2024',
357
+ booleanIcon: true,
358
+ available: false,
359
+ calories: 237,
360
+ fat: 9.0,
361
+ carbs: 37,
362
+ checked: false,
363
+ protein: 4.3,
364
+ sodium: 129,
365
+ calcium: '8%',
366
+ iron: '1%'
367
+ },
368
+ {
369
+ id: 13,
370
+ name: 'Eclair',
371
+ date: '21/12/2025',
372
+ booleanIcon: true,
373
+ available: true,
374
+ calories: 262,
375
+ fat: 16.0,
376
+ carbs: 23,
377
+ checked: false,
378
+ protein: 6.0,
379
+ sodium: 337,
380
+ calcium: '6%',
381
+ iron: '7%'
382
+ },
383
+ {
384
+ id: 14,
385
+ name: 'Cupcake',
386
+ date: '05/07/2024',
387
+ booleanIcon: false,
388
+ available: false,
389
+ calories: 305,
390
+ fat: 3.7,
391
+ carbs: 67,
392
+ checked: false,
393
+ protein: 4.3,
394
+ sodium: 413,
395
+ calcium: '3%',
396
+ iron: '8%'
397
+ },
398
+ {
399
+ id: 15,
400
+ name: 'Gingerbread',
401
+ date: '07/05/2024',
402
+ booleanIcon: true,
403
+ available: true,
404
+ calories: 356,
405
+ fat: 16.0,
406
+ carbs: 49,
407
+ checked: false,
408
+ protein: 3.9,
409
+ sodium: 327,
410
+ calcium: '7%',
411
+ iron: '16%'
412
+ },
413
+ {
414
+ id: 16,
415
+ name: 'Jelly bean',
416
+ date: '11/12/2025',
417
+ booleanIcon: false,
418
+ available: false,
419
+ calories: 375,
420
+ fat: 0.0,
421
+ carbs: 94,
422
+ checked: true,
423
+ protein: 0.0,
424
+ sodium: 50,
425
+ calcium: '0%',
426
+ iron: '0%'
427
+ },
428
+ {
429
+ id: 17,
430
+ name: 'Lollipop',
431
+ booleanIcon: true,
432
+ date: '21/12/2024',
433
+ available: true,
434
+ calories: 392,
435
+ fat: 0.2,
436
+ carbs: 98,
437
+ checked: false,
438
+ protein: 0,
439
+ sodium: 38,
440
+ calcium: '0%',
441
+ iron: '2%'
442
+ },
443
+ {
444
+ id: 18,
445
+ name: 'Honeycomb',
446
+ booleanIcon: true,
447
+ date: '22/12/2023',
448
+ available: false,
449
+ calories: 408,
450
+ fat: 3.2,
451
+ carbs: 87,
452
+ checked: true,
453
+ protein: 6.5,
454
+ sodium: 562,
455
+ calcium: '0%',
456
+ iron: '45%'
457
+ },
458
+ {
459
+ id: 19,
460
+ name: 'Donut',
461
+ booleanIcon: true,
462
+ date: '25/12/2024',
463
+ available: true,
464
+ calories: 452,
465
+ fat: 25.0,
466
+ carbs: 51,
467
+ checked: false,
468
+ protein: 4.9,
469
+ sodium: 326,
470
+ calcium: '2%',
471
+ iron: '22%'
472
+ },
473
+ {
474
+ id: 20,
475
+ name: 'Last line',
476
+ date: '31/12/2026',
293
477
  booleanIcon: false,
294
478
  available: false,
295
479
  calories: 518,
@@ -302,7 +486,8 @@ export default {
302
486
  iron: '6%'
303
487
  }
304
488
  ],
305
- visibleColumns: []
489
+ visibleColumns: [],
490
+ filteredRows: []
306
491
  }
307
492
  },
308
493
  computed: {