@d-mok/quasar-app-extension-quasar-axe 1.0.73 → 1.0.76

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d-mok/quasar-app-extension-quasar-axe",
3
- "version": "1.0.73",
3
+ "version": "1.0.76",
4
4
  "description": "A Quasar App Extension",
5
5
  "author": "d-mok <49301824+d-mok@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -287,10 +287,16 @@ class QDialog {
287
287
  ): Promise<T[]> {
288
288
  if (sample.length === 0)
289
289
  throw 'Dialog askCSV must provide at least one sample object.'
290
- let lineLengths = unparseCSV(sample)
290
+
291
+ let words = unparseCSV(sample)
292
+ .split('\n')
293
+ .flatMap(l => l.split('\t'))
294
+ let maxWordLength = Math.max(...words.map($ => $.length))
295
+
296
+ let lines = unparseCSV(sample)
291
297
  .split('\n')
292
- .map($ => $.length)
293
- let maxLength = Math.max(...lineLengths)
298
+ .map($ => $.replace('\t', ' '.repeat(maxWordLength + 2)))
299
+ let maxLineLength = Math.max(...lines.map($ => $.length))
294
300
 
295
301
  let csv = await this.baseDialog({
296
302
  title,
@@ -303,8 +309,15 @@ class QDialog {
303
309
  parseCSV(csv, sample[0]).every(
304
310
  $ => schemaEqual($, sample[0]) && isValid($)
305
311
  ),
312
+ //@ts-ignore // This is a bug from quasar
313
+ style:
314
+ "font-family: 'Courier New', monospace;" +
315
+ 'tab-size: ' +
316
+ (maxWordLength + 2),
317
+ rows: Math.min(25, sample.length + 1),
318
+ cols: maxLineLength + 5,
306
319
  },
307
- fullWidth: maxLength > 30,
320
+ // fullWidth: maxLineLength > 35,
308
321
  })
309
322
  return parseCSV(csv, sample[0])
310
323
  }