quasar-factory-lib 0.0.42 → 0.0.44

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.
@@ -0,0 +1,4 @@
1
+ export { default as filterMethod } from '../components/Table/utils/filterMethod';
2
+ export { default as infiniteScroll } from '../components/Table/utils/infiniteScroll';
3
+ export { default as setTableHeight } from '../components/Table/utils/setTableHeight';
4
+ export { default as qTableSort } from '../components/Table/utils/sort';
package/package.json CHANGED
@@ -97,6 +97,6 @@
97
97
  "release": "standard-version"
98
98
  },
99
99
  "type": "module",
100
- "version": "0.0.42",
100
+ "version": "0.0.44",
101
101
  "author": ""
102
102
  }
@@ -2,8 +2,8 @@
2
2
 
3
3
  import infiniteScroll from './infiniteScroll'
4
4
  const filterMethod = {
5
- filter (self: {filterTerms: string, filteredRows: object [] | [] }, rows: string | [], terms: { search: string }): object[] | [] {
6
- if (self.store.filterValue !== '') {
5
+ filter (self: { filteredRows: object [] | [] }, rows: string | [], terms: { search: string }): object[] | [] {
6
+ if (terms.search !== '') {
7
7
  const filteredRows = []
8
8
  const lowerSearch = terms.search ? terms.search.toLowerCase() : ''
9
9
  for (let i = 0; i < self.rows.length; i++) {
@@ -1,7 +1,4 @@
1
1
  export * from './Table'
2
2
  export * from './Alert'
3
3
  export * from './Confirm'
4
- export * from './TaskNavBar'
5
- export { default as filterMethod } from './Table/utils/filterMethod'
6
- export { default as infiniteScroll } from './Table/utils/infiniteScroll';
7
- export { default as tableHeight } from './Table/utils/setTableHeight';
4
+ export * from './TaskNavBar'
package/src/index.ts CHANGED
@@ -10,7 +10,7 @@ export { MyTable, AlertDialog, ConfirmDialog, TaskNavBar } from './components/in
10
10
  export type { TranslateKeys }
11
11
  // import plugins from "./components/plugins";
12
12
  export * from './i18n/messages.js'
13
- // export * from './utils'
13
+ export * from './utils'
14
14
  export * from './store'
15
15
  // Import Quasar css
16
16
  import './css/app.css'
@@ -1,3 +1,4 @@
1
- // export { default as filterMethod } from './filterMethod';
2
- // export { default as infiniteScroll } from './infiniteScroll';
3
- // export { default as tableHeight } from './setTableHeight';
1
+ export { default as filterMethod } from '../components/Table/utils/filterMethod'
2
+ export { default as infiniteScroll } from '../components/Table/utils/infiniteScroll';
3
+ export { default as setTableHeight } from '../components/Table/utils/setTableHeight';
4
+ export { default as qTableSort } from '../components/Table/utils/sort'
package/src/utils/sort.js DELETED
@@ -1,30 +0,0 @@
1
- const qTableSort = {
2
- sortMethod (rows, sortBy, descending, values = []) {
3
- const rowsFlat = [...rows]
4
- if (sortBy) {
5
- if (values.includes(sortBy)) {
6
- this.sortDates(sortBy, descending, rowsFlat)
7
- } else {
8
- rowsFlat.sort((a, b) => {
9
- const x = descending ? b : a
10
- const y = descending ? a : b
11
- return x[sortBy] > y[sortBy] ? 1 : x[sortBy] < y[sortBy] ? -1 : 0
12
- })
13
- }
14
- }
15
- return rowsFlat
16
- },
17
- sortDates (sortBy, descending, rowsFlat) {
18
- rowsFlat.sort(function (columnA, columnB) {
19
- const a = columnA[sortBy]
20
- const b = columnB[sortBy]
21
- let x = descending ? b : a
22
- let y = descending ? a : b
23
- x = x.split('/').reverse().join('-')
24
- y = y.split('/').reverse().join('-')
25
-
26
- return x.localeCompare(y)
27
- })
28
- }
29
- }
30
- export default qTableSort