Dataset Viewer
Auto-converted to Parquet
hash
stringlengths
40
40
date
stringdate
2016-01-13 02:22:49
2025-03-03 16:03:28
author
stringclasses
78 values
commit_message
stringlengths
16
242
is_merge
bool
1 class
masked_commit_message
stringlengths
5
208
type
stringclasses
6 values
git_diff
stringlengths
194
41.5M
914e3addf0f7d42f695272b663e679cf305fdf73
2021-04-23 10:42:03
Razvan Stoenescu
feat(docs): update quasar.conf
false
update quasar.conf
feat
diff --git a/app/lib/quasar-conf-file.js b/app/lib/quasar-conf-file.js index 743855c9c26..0aa66257b71 100644 --- a/app/lib/quasar-conf-file.js +++ b/app/lib/quasar-conf-file.js @@ -568,7 +568,9 @@ class QuasarConfFile { prodPort: 3000, // gets superseeded in production by an eventual process.env.PORT maxAge: 1000 * 60 * 60 * 24 * 30 }, cfg.ssr, { - directiveTransforms: { // not meant to be configurable directly by the user + // not meant to be configurable directly by the user, + // which is why we're overriding it here + directiveTransforms: { ...require('quasar/dist/ssr-directives/index.js'), ...this.devlandSsrDirectives } diff --git a/docs/quasar.conf.js b/docs/quasar.conf.js index 6c329a9c605..3f7c140f9ad 100644 --- a/docs/quasar.conf.js +++ b/docs/quasar.conf.js @@ -1,6 +1,8 @@ // Configuration for your app const path = require('path') const ESLintPlugin = require('eslint-webpack-plugin') +const { merge } = require('webpack-merge') +const transformAssetUrls = require('quasar/dist/transforms/loader-asset-urls.json') module.exports = function (ctx) { return { @@ -27,7 +29,7 @@ module.exports = function (ctx) { distDir: 'dist/quasar.dev', // analyze: true, - chainWebpack (chain) { + chainWebpack (chain, { isServer }) { chain.plugin('eslint-webpack-plugin') .use(ESLintPlugin, [{ extensions: [ 'js', 'vue' ], @@ -50,16 +52,26 @@ module.exports = function (ctx) { rule.use('v-loader') .loader('vue-loader') .options({ - productionMode: ctx.prod, + isServerBuild: isServer === true, compilerOptions: { - preserveWhitespace: false + preserveWhitespace: false, + ...( + isServer + ? { ssr: true, directiveTransforms: require('quasar/dist/ssr-directives/index.js') } + : {} + ) }, - transformAssetUrls: { - video: 'src', - source: 'src', - img: 'src', - image: 'xlink:href' - } + transformAssetUrls: merge({ + base: null, + includeAbsolute: false, + tags: { + video: [ 'src', 'poster' ], + source: ['src'], + img: ['src'], + image: [ 'xlink:href', 'href' ], + use: [ 'xlink:href', 'href' ] + } + }, transformAssetUrls) }) rule.use('md-loader') diff --git a/docs/src/pages/start/upgrade-guide.md b/docs/src/pages/start/upgrade-guide.md index 481a86d717d..fb62ede639d 100644 --- a/docs/src/pages/start/upgrade-guide.md +++ b/docs/src/pages/start/upgrade-guide.md @@ -914,6 +914,8 @@ electron: { If you are using Workbox in InjectManifest mode, then it's useful to know that the `/src-pwa/custom-service-worker.[js|ts]` is now being compiled too. This means that in your code you can now import with relative path too. +Due to the upgrade to Webpack 5, you will need to also upgrade `workbox-webpack-plugin` to v6+. + You can now enable ESLint for the custom service worker too. And it [supports TS](/quasar-cli/developing-pwa/pwa-with-typescript) out of the box (in which case, rename the extension to `.ts`). Enabling ESLint for the custom service worker is done by editing quasar.conf.js:
d7a41cf6f3f44182669555fb2c735796c11f4530
2023-04-06 18:09:08
Razvan Stoenescu
chore(docs): small tweak to toc css
false
small tweak to toc css
chore
diff --git a/docs/src/layouts/doc-layout/DocPage.vue b/docs/src/layouts/doc-layout/DocPage.vue index d5f6c038034..aaeff646583 100644 --- a/docs/src/layouts/doc-layout/DocPage.vue +++ b/docs/src/layouts/doc-layout/DocPage.vue @@ -224,8 +224,6 @@ body.body--light .doc-page &__toc-container .q-item color: $header-btn-color--light - &:hover - color: $header-btn-hover-color--light body.body--dark .doc-page &__related @@ -238,6 +236,4 @@ body.body--dark .doc-page &__toc-container .q-item color: $header-btn-color--dark - &:not(.disabled):hover - color: $header-btn-hover-color--dark </style>
34d4fbeb26aa1c7b941a01cf20d59aa10d477815
2021-01-30 16:55:48
Razvan Stoenescu
chore(app): Bump alpha version
false
Bump alpha version
chore
diff --git a/app/bin/quasar-build b/app/bin/quasar-build index b5422e249cb..e157fdc4b32 100755 --- a/app/bin/quasar-build +++ b/app/bin/quasar-build @@ -91,9 +91,10 @@ if (argv.help) { // TODO vue3 - remove when ready if (argv.mode === 'ssr') { console.log( + '\n' + '##############################################################\n' + '# SSR mode is not *yet* supported and is disabled currently. #\n' + - '##############################################################\n\n' + '##############################################################\n' ) process.exit(1) } diff --git a/app/bin/quasar-dev b/app/bin/quasar-dev index 6891c586c13..519efd54ab1 100755 --- a/app/bin/quasar-dev +++ b/app/bin/quasar-dev @@ -77,9 +77,10 @@ if (argv.help) { // TODO vue3 - remove when ready if (argv.mode === 'ssr') { console.log( + '\n' + '##############################################################\n' + '# SSR mode is not *yet* supported and is disabled currently. #\n' + - '##############################################################\n\n' + '##############################################################\n' ) process.exit(1) } diff --git a/app/bin/quasar-inspect b/app/bin/quasar-inspect index 5dae9023f8b..ccf13dbb5bc 100755 --- a/app/bin/quasar-inspect +++ b/app/bin/quasar-inspect @@ -47,9 +47,10 @@ if (argv.help) { // TODO vue3 - remove when ready if (argv.mode === 'ssr') { console.log( + '\n' + '##############################################################\n' + '# SSR mode is not *yet* supported and is disabled currently. #\n' + - '##############################################################\n\n' + '##############################################################\n' ) process.exit(1) } diff --git a/app/bin/quasar-mode b/app/bin/quasar-mode index 023d49db1e9..41adffded11 100755 --- a/app/bin/quasar-mode +++ b/app/bin/quasar-mode @@ -59,9 +59,10 @@ async function run () { // TODO vue3 - remove when ready if (mode === 'ssr') { console.log( + '\n' + '##############################################################\n' + '# SSR mode is not *yet* supported and is disabled currently. #\n' + - '##############################################################\n\n' + '##############################################################\n' ) process.exit(1) } diff --git a/app/package.json b/app/package.json index aa3256e6c2a..88ac79e8afb 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "@quasar/app", - "version": "3.0.0-alpha.8", + "version": "3.0.0-alpha.9", "description": "Quasar Framework local CLI", "bin": { "quasar": "./bin/quasar"
6559a047c83ac363e497a7660eb0f2d61ba0422c
2020-03-30 16:02:33
Razvan Stoenescu
feat(app): out of the box support for .mjs files #6689
false
out of the box support for .mjs files #6689
feat
diff --git a/app/lib/webpack/create-chain.js b/app/lib/webpack/create-chain.js index 1cf81c88e46..b729f44625e 100644 --- a/app/lib/webpack/create-chain.js +++ b/app/lib/webpack/create-chain.js @@ -48,7 +48,7 @@ module.exports = function (cfg, configName) { chain.resolve.symlinks(false) chain.resolve.extensions - .merge([ '.js', '.vue', '.json' ]) + .merge([ '.mjs', '.js', '.vue', '.json' ]) chain.resolve.modules .merge(resolveModules) @@ -214,6 +214,14 @@ module.exports = function (cfg, configName) { lessLoaderOptions: cfg.build.lessLoaderOptions }) + chain.module // fixes https://github.com/graphql/graphql-js/issues/1272 + .rule('mjs') + .test(/\.mjs$/) + .include + .add(/node_modules/) + .end() + .type('javascript/auto') + chain.plugin('vue-loader') .use(VueLoaderPlugin)
2e9883bab978e08a2e000f1a175f57ef759b5444
2020-08-21 16:27:17
Razvan Stoenescu
fix(lang/kur-ckb): format error
false
format error
fix
diff --git a/ui/lang/index.json b/ui/lang/index.json index 5c6c1546b76..f98099820a9 100644 --- a/ui/lang/index.json +++ b/ui/lang/index.json @@ -91,6 +91,10 @@ "isoName": "ko-kr", "nativeName": "한국어" }, + { + "isoName": "kur-ckb", + "nativeName": "کوردی سۆرانی" + }, { "isoName": "lu", "nativeName": "Kiluba" diff --git a/ui/lang/kur-ckb.js b/ui/lang/kur-ckb.js index d824a644bea..99101da944e 100644 --- a/ui/lang/kur-ckb.js +++ b/ui/lang/kur-ckb.js @@ -1,103 +1,103 @@ export default { - isoName: "kur-ckb", - nativeName: "کوردی سۆرانی", + isoName: 'kur-ckb', + nativeName: 'کوردی سۆرانی', rtl: true, label: { - clear: "پاککردنەوە", - ok: "باشە", - cancel: "هەڵوەشاندنەوە", - close: "داخستن", - set: "دانان", - select: "هەڵبژاردن", - reset: "رێکخستنەوه", - remove: "لابردن", - update: "نوێکردنەوە", - create: "دروستکردن", - search: "گەڕان", - filter: "پاڵاوتن", - refresh: "تازەکردنەوە" + clear: 'پاککردنەوە', + ok: 'باشە', + cancel: 'هەڵوەشاندنەوە', + close: 'داخستن', + set: 'دانان', + select: 'هەڵبژاردن', + reset: 'رێکخستنەوه', + remove: 'لابردن', + update: 'نوێکردنەوە', + create: 'دروستکردن', + search: 'گەڕان', + filter: 'پاڵاوتن', + refresh: 'تازەکردنەوە' }, date: { - days: "یەک شەممە_دووشەممە_سێ شەممە_چوار شەممە_پێنج شەممە_هەینی_شەممە".split( - "_" + days: 'یەک شەممە_دووشەممە_سێ شەممە_چوار شەممە_پێنج شەممە_هەینی_شەممە'.split( + '_' ), - daysShort: "١شم_٢شم_٣شم_٤شم_٥شم_هەینی_شەممە".split( - "_" + daysShort: '١شم_٢شم_٣شم_٤شم_٥شم_هەینی_شەممە'.split( + '_' ), - months: "مانگی یەک_مانگی دوو_مانگی سێ_مانگی چوار_مانگی پێنج_مانگی شەش_مانگی حەوت_مانگی هەشت_مانگی نۆ_مانگی دە_مانگی یانزە_مانگی دووانزە".split( - "_" + months: 'مانگی یەک_مانگی دوو_مانگی سێ_مانگی چوار_مانگی پێنج_مانگی شەش_مانگی حەوت_مانگی هەشت_مانگی نۆ_مانگی دە_مانگی یانزە_مانگی دووانزە'.split( + '_' ), - monthsShort: "مانگی یەک_مانگی دوو_مانگی سێ_مانگی چوار_مانگی پێنج_مانگی شەش_مانگی حەوت_مانگی هەشت_مانگی نۆ_مانگی دە_مانگی یانزە_مانگی دووانزە".split( - "_" + monthsShort: 'مانگی یەک_مانگی دوو_مانگی سێ_مانگی چوار_مانگی پێنج_مانگی شەش_مانگی حەوت_مانگی هەشت_مانگی نۆ_مانگی دە_مانگی یانزە_مانگی دووانزە'.split( + '_' ), firstDayOfWeek: 6, // 0-6, 0 - Sunday, 1 Monday, ... format24h: false, - singleDay: "ڕۆژ", - pluralDay: "ڕۆژەکان" + singleDay: 'ڕۆژ', + pluralDay: 'ڕۆژەکان' }, table: { - noData: "هیچ داتەیەک نییە", - noResults: "هیچ ئەنجامێک نییە", - loading: "چاوەڕوانبە...", + noData: 'هیچ داتەیەک نییە', + noResults: 'هیچ ئەنجامێک نییە', + loading: 'چاوەڕوانبە...', selectedRecords: function (rows) { return rows === 1 - ? "یەک ڕیکۆرد هەڵبژێردراوە" - : (rows === 0 ? "0" : rows) + "ڕیکۆرد هەڵبژێرداوە."; + ? 'یەک ڕیکۆرد هەڵبژێردراوە' + : (rows === 0 ? '0' : rows) + 'ڕیکۆرد هەڵبژێرداوە.'; }, - recordsPerPage: "ئەنجام بۆهەر پەڕەیەک:", - allRows: "هەمووی", + recordsPerPage: 'ئەنجام بۆهەر پەڕەیەک:', + allRows: 'هەمووی', pagination: function (start, end, total) { - return start + "-" + end + " لە " + total; + return start + '-' + end + ' لە ' + total; }, - columns: "ڕیز" + columns: 'ڕیز' }, editor: { - url: "لینک", - bold: "تۆخ", - italic: "لار", - strikethrough: "خەتپیاهاتوو", - underline: "خەتبەژێرهاتوو", - unorderedList: "لیستی ڕیزنەکراو", - orderedList: "لیستی ڕیزکراو", - subscript: "ژێرهێڵ", - superscript: "سەرهێڵ", - hyperlink: "لینک", - toggleFullscreen: "پربە شاشە یان نا", - quote: "دەق", - left: "لای چەپ", - center: "ناوەڕاست", - right: "لای ڕاست", - justify: "بە یەکسانی", - print: "پرینت", - outdent: "کەمکردنەوەی بۆشای", - indent: "زۆرکردنی بۆشای", - removeFormat: "لابردنی ستایل", - formatting: "ستایل", - fontSize: "قەبارەی فۆنت", - align: "ڕێککردن", - hr: "دانانی هیڵی ئاسۆی", - undo: "پاشگەزبونەوە", - redo: "کردنەوە", - heading1: "ناونیشان ١", - heading2: "ناونیشان ٢", - heading3: "ناونیشان ٣", - heading4: "ناونیشان ٤", - heading5: "ناونیشان ٥", - heading6: "ناونیشان ٦", - paragraph: "بڕگە", - code: "کۆد", - size1: "زۆر بچووک", - size2: "بچووک", - size3: "ئاسای", - size4: "ناوەند", - size5: "گەورە", - size6: "زۆر گەورە", - size7: "گەورەترین", - defaultFont: "فۆنتی بنەڕەت", - viewSource: "سەیرکردنی سەرچاوە" + url: 'لینک', + bold: 'تۆخ', + italic: 'لار', + strikethrough: 'خەتپیاهاتوو', + underline: 'خەتبەژێرهاتوو', + unorderedList: 'لیستی ڕیزنەکراو', + orderedList: 'لیستی ڕیزکراو', + subscript: 'ژێرهێڵ', + superscript: 'سەرهێڵ', + hyperlink: 'لینک', + toggleFullscreen: 'پربە شاشە یان نا', + quote: 'دەق', + left: 'لای چەپ', + center: 'ناوەڕاست', + right: 'لای ڕاست', + justify: 'بە یەکسانی', + print: 'پرینت', + outdent: 'کەمکردنەوەی بۆشای', + indent: 'زۆرکردنی بۆشای', + removeFormat: 'لابردنی ستایل', + formatting: 'ستایل', + fontSize: 'قەبارەی فۆنت', + align: 'ڕێککردن', + hr: 'دانانی هیڵی ئاسۆی', + undo: 'پاشگەزبونەوە', + redo: 'کردنەوە', + heading1: 'ناونیشان ١', + heading2: 'ناونیشان ٢', + heading3: 'ناونیشان ٣', + heading4: 'ناونیشان ٤', + heading5: 'ناونیشان ٥', + heading6: 'ناونیشان ٦', + paragraph: 'بڕگە', + code: 'کۆد', + size1: 'زۆر بچووک', + size2: 'بچووک', + size3: 'ئاسای', + size4: 'ناوەند', + size5: 'گەورە', + size6: 'زۆر گەورە', + size7: 'گەورەترین', + defaultFont: 'فۆنتی بنەڕەت', + viewSource: 'سەیرکردنی سەرچاوە' }, tree: { - noNodes: "هیچ نۆدێک نیە", - noResults: "هیچ نۆدێک نەدۆزرایەوە" + noNodes: 'هیچ نۆدێک نیە', + noResults: 'هیچ نۆدێک نەدۆزرایەوە' } }
6509a43ed0d8301d202a9bb5e295d9c485f669e7
2021-02-16 16:15:59
Razvan Stoenescu
feat(docs): temporarily revert the new search
false
temporarily revert the new search
feat
diff --git a/docs/build/search.js b/docs/build/search.js deleted file mode 100644 index 3b50045265d..00000000000 --- a/docs/build/search.js +++ /dev/null @@ -1,264 +0,0 @@ -const fs = require('fs') -const path = require('path') -const fg = require('fast-glob') -const jsYaml = require('js-yaml') -const SimpleMarkdown = require('simple-markdown') - -const mdParse = SimpleMarkdown.defaultBlockParse -// eslint-disable-next-line no-useless-escape -const yamlBlockPattern = /^(?:\-\-\-)(.*?)(?:\-\-\-|\.\.\.)/s - -const folders = '../src/pages/**/*.md' -const intro = '../src/pages/' -// const base = 'https://next.quasar.dev/' - -let objectID = 1 -const getObjectID = () => objectID++ - -const slugify = (str) => { - return encodeURIComponent(String(str).trim().replace(/\s+/g, '-')) -} - -const createFolder = (folder) => { - const dir = path.join(__dirname, '..', folder) - if (!fs.existsSync(dir)) { - fs.mkdirSync(dir) - } -} - -const createIndex = (data) => { - const requiredFields = [ 'hierarchy_lvl0', 'hierarchy_lvl1', 'url' ] - const missingFields = requiredFields.filter( - (requiredField) => !data[ requiredField ] - ) - if (missingFields.length) { - throw new Error( - `Missing fields for indexing page ${data.url}: ${missingFields.join( - ', ' - )}` - ) - } - return { - objectID: getObjectID(), - hierarchy_radio_lvl0: null, - hierarchy_radio_lvl1: null, - hierarchy_radio_lvl2: null, - hierarchy_radio_lvl3: null, - hierarchy_radio_lvl4: null, - hierarchy_radio_lvl5: null, - hierarchy_lvl0: null, - hierarchy_lvl1: null, - hierarchy_lvl2: null, - hierarchy_lvl3: null, - hierarchy_lvl4: null, - hierarchy_lvl5: null, - hierarchy_lvl6: null, - content: null, - anchor: null, - ...data - } -} - -// returns the contents of the assciated file -const getFileContents = (mdPath) => { - return fs.readFileSync(path.resolve(__dirname, mdPath), { - encoding: 'utf8' - }) -} - -// retrieves yaml from a markdown page -const getYaml = (md) => { - return yamlBlockPattern.exec(md)[ 1 ] -} - -// returns title and desc yaml field -const getYamlFields = (yaml) => { - return { - title: jsYaml.load(yaml).title, - desc: jsYaml.load(yaml).desc - } -} - -const buildParagraph = (content, text2 = '', skip = 0) => { - const text = [] - - const addText = (data) => { - text.push(data) - } - - content.forEach((node, index) => { - if (index >= skip) { - if (node.type === 'text' || node.type === 'inlineCode') { - addText(node.content) - } - else { - if (node.content && Array.isArray(node.content)) { - const data = buildParagraph(node.content) - addText(data.text) - } - else if (node.items && Array.isArray(node.items)) { - node.items.forEach(leaf => { - const data = buildParagraph(leaf) - addText(data.text) - }) - } - else { - if (node.type !== 'image' && node.type !== 'codeBlock') { - console.log(node) - } - } - } - } - }) - - return { text: text.join('') } -} - -const processNode = (node) => { - const text = [] - if (Array.isArray(node)) { - node.forEach(leaf => { - const data = processNode(leaf) - text.push(data.text) - }) - } - else if (node.type === 'list' && node.items && Array.isArray(node.items)) { - node.items.forEach(leaf => { - const data = buildParagraph(leaf) - text.push(data.text) - }) - } - else if (node.type === 'paragraph' && Array.isArray(node.content)) { - if (node.content[ 0 ].type === 'text' && node.content[ 0 ].content.startsWith('#')) { - let text = '' - let remaining = '' - let index = 0 - for (; index < node.content.length; ++index) { - const content = node.content[ index ].content - const parts = content.split('\n') - text += parts[ 0 ] - if (parts.length > 1) { - parts.shift() - remaining += parts.join('') - break - } - } - const level = text.indexOf(' ') - const subheading = text.slice(level + 1) - const slug = slugify(subheading) - const id = { - anchor: slug, - [ 'hierarchy_lvl' + (level - 1) ]: subheading - } - const data = buildParagraph(node.content, remaining, index + 1) - id.content = data.text - return id - } - - const data = buildParagraph(node.content) - text.push(data.text) - } - else if (node.type === 'heading') { - const data = buildParagraph(node.content) - const subheading = data.text - const level = node.level - const slug = slugify(subheading) - const id = { - anchor: slug, - [ 'hierarchy_lvl' + (level - 1) ]: subheading - } - return id - } - else if (node.type === 'blockQuote') { - const data = processNode(node.content) - text.push(data.text) - } - else { - if (node.type !== 'table' && node.type !== 'codeBlock') { - const data = buildParagraph(node.content) - text.push(data.text) - } - } - return { text: text.join(' ') } -} - -const processMarkdown = (syntaxTree, entries, entry) => { - const contents = [] - syntaxTree.forEach((node, index) => { - // skip first one which is the yaml - if (index > 1) { - const val = processNode(node) - if (val.anchor) { - const text = contents.join(' ') - .replace(/\n/g, ' ') - .replace(/<br>/g, '') - .replace(/\s\s+/g, ' ') - .trim() - - // handle text from previous - const data = createIndex({ ...entry, content: text }) - entries.push(data) - - // start a new subheading - entry = { ...entry, ...val, content: '' } - - // clean up contents array - contents.splice(0, contents.length) - } - // don't accept components embedded into the page - else if (val.text.charAt(0) !== '<' && val.text.charAt(val.text.length - 1) !== '>') { - contents.push(val.text) - } - } - }) -} - -const processFile = (page, entries) => { - const key = page.replace(intro, '').replace('.md', '') - const url = '/' + key - - console.log('Processing', page, url) - - const md = getFileContents(page) - const yaml = getYaml(md) - const { title, desc } = getYamlFields(yaml) - - const syntaxTree = mdParse(md) - - const entry = { - hierarchy_lvl0: title, - hierarchy_lvl1: desc, - content: '', - anchor: 'Introduction', - url - } - - processMarkdown(syntaxTree, entries, entry) -} - -// -- Begin processing - -const run = () => { - const start = new Date().getTime() - - createFolder('search') - - const entries = [] - - // retrieve all the markdown pages paths - const pages = fg.sync(folders, { - cwd: __dirname - }) - - pages.forEach(mdPage => { - processFile(mdPage, entries) - }) - - fs.writeFileSync(path.resolve(__dirname, '../search/indices.json'), JSON.stringify(entries, null, 2), () => {}) - - const end = new Date().getTime() - const time = end - start - console.log(`Finished ${pages.length} pages with ${entries.length} indices in ${time}ms`) -} - -run() diff --git a/docs/package.json b/docs/package.json index caf2ce8773d..9f7922313e4 100644 --- a/docs/package.json +++ b/docs/package.json @@ -9,14 +9,13 @@ "dev": "quasar dev", "dev:ssr": "quasar dev -m ssr", "build": "quasar build -m pwa", - "build:search": "node build/search.js", "lint": "eslint --ext .js,.vue src", "test": "echo \"No test specified\" && exit 0" }, "dependencies": { "@quasar/extras": "^1.0.0", "core-js": "^3.6.5", - "docs-searchbar.js": "^1.1.11", + "docsearch.js": "^2.6.2", "prismjs": "^1.15.0", "quasar": "^2.0.0-beta.1" }, @@ -31,15 +30,12 @@ "eslint-plugin-quasar": "^1.0.0", "eslint-plugin-vue": "^7.0.0", "eslint-webpack-plugin": "^2.4.0", - "fast-glob": "^3.2.5", "gray-matter": "^4.0.2", - "js-yaml": "^4.0.0", "markdown-it": "^10.0.0", "markdown-it-container": "^2.0.0", "pug": "^2.0.0", "pug-plain-loader": "^1.0.0", "raw-loader": "^4.0.0", - "simple-markdown": "^0.7.3", "toml": "^3.0.0", "workbox-webpack-plugin": "^5.1.3" }, diff --git a/docs/quasar.conf.js b/docs/quasar.conf.js index f0ded5af91b..ba95128f639 100644 --- a/docs/quasar.conf.js +++ b/docs/quasar.conf.js @@ -27,16 +27,6 @@ module.exports = function (ctx) { distDir: 'dist/quasar.dev', // analyze: true, - env: { - search: { - apiKey: 'e3b57f8578a57aaa539b19127bfdf0174926c47edd73cfaee5d66e44e84e403c', - hostUrl: ctx.prod ? 'https://next.quasar.dev:7700' : 'http://127.0.0.1:7700', - indexUid: 'docs', - inputSelector: '.doc-algolia input', - debug: true // Set debug to true if you want to inspect the dropdown - } - }, - chainWebpack (chain) { chain.plugin('eslint-webpack-plugin') .use(ESLintPlugin, [{ @@ -88,7 +78,8 @@ module.exports = function (ctx) { config: { loadingBar: { - color: 'teal' + color: 'orange', + size: '4px' } }, diff --git a/docs/src/css/docsearch.sass b/docs/src/css/docsearch.sass index fc1d5576fc3..177f7424bdd 100644 --- a/docs/src/css/docsearch.sass +++ b/docs/src/css/docsearch.sass @@ -1,33 +1,6 @@ // initial part taken from // https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css -// /* Main dropdown wrapper */ -// .meilisearch-autocomplete .dsb-dropdown-menu -// width: 500px - -// /* Main category */ -// .meilisearch-autocomplete .docs-searchbar-suggestion--category-header -// color: darkgray -// border: 1px solid gray - -// /* Category */ -// .meilisearch-autocomplete .docs-searchbar-suggestion--subcategory-column -// color: gray - -// /* Title */ -// .meilisearch-autocomplete .docs-searchbar-suggestion--title -// font-weight: bold -// color: black - -// /* Description */ -// .meilisearch-autocomplete .docs-searchbar-suggestion--text -// font-size: 0.8rem -// color: gray - -// /* Highlighted text */ -// .meilisearch-autocomplete .docs-searchbar-suggestion--highlight -// color: blue - .searchbox display: inline-block position: relative @@ -37,8 +10,7 @@ box-sizing: border-box visibility: visible !important -.searchbox .algolia-autocomplete, -.searchbox .meilisearch-autocomplete +.searchbox .algolia-autocomplete display: block width: 100% height: 100% @@ -187,26 +159,21 @@ transform: none opacity: 1 -.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu, -.meilisearch-autocomplete.meilisearch-autocomplete-right .dsb-dropdown-menu +.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu right: 0 !important left: inherit !important -.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu:before, -.meilisearch-autocomplete.meilisearch-autocomplete-right .dsb-dropdown-menu:before +.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu:before right: 48px -.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu, -.meilisearch-autocomplete.meilisearch-autocomplete-left .dsb-dropdown-menu +.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu left: 0!important right: inherit!important -.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu:before, -.meilisearch-autocomplete.meilisearch-autocomplete-left .dsb-dropdown-menu:before +.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu:before left: 48px -.algolia-autocomplete .ds-dropdown-menu, -.meilisearch-autocomplete .dsb-dropdown-menu +.algolia-autocomplete .ds-dropdown-menu top: -6px border-radius: 4px margin: 6px 0 0 @@ -221,8 +188,7 @@ min-width: 500px box-shadow: 0 1px 0 0 rgba(0,0,0,.2),0 2px 3px 0 rgba(0,0,0,.1) -.algolia-autocomplete .ds-dropdown-menu:before, -.meilisearch-autocomplete .dsb-dropdown-menu:before +.algolia-autocomplete .ds-dropdown-menu:before display: block position: absolute content: "" @@ -237,26 +203,21 @@ transform: rotate(-45deg) border-radius: 2px -.algolia-autocomplete .ds-dropdown-menu .ds-suggestions, -.meilisearch-autocomplete .dsb-dropdown-menu .dsb-suggestions +.algolia-autocomplete .ds-dropdown-menu .ds-suggestions position: relative z-index: 1000 margin-top: 8px -.algolia-autocomplete .ds-dropdown-menu .ds-suggestions a:hover, -.meilisearch-autocomplete .dsb-dropdown-menu .dsb-suggestions a:hover +.algolia-autocomplete .ds-dropdown-menu .ds-suggestions a:hover text-decoration: none -.algolia-autocomplete .ds-dropdown-menu .ds-suggestion, -.meilisearch-autocomplete .dsb-dropdown-menu .dsb-suggestion +.algolia-autocomplete .ds-dropdown-menu .ds-suggestion cursor: pointer -.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion.suggestion-layout-simple,.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion:not(.suggestion-layout-simple) .algolia-docsearch-suggestion--content, -.meilisearch-autocomplete .dsb-dropdown-menu .dsb-suggestion.dsb-cursor .docs-searchbar-suggestion.suggestion-layout-simple,.meilisearch-autocomplete .dsb-dropdown-menu .dsb-suggestion.ds-cursor .docs-searchbar-suggestion:not(.suggestion-layout-simple) .docs-searchbar-suggestion--content +.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion.suggestion-layout-simple,.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion:not(.suggestion-layout-simple) .algolia-docsearch-suggestion--content background-color: rgba(69,142,225,.05) -.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-], -.meilisearch-autocomplete .dsb-dropdown-menu [class^=ds-dataset-] +.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] position: relative border: 1px solid #d9d9d9 background: #fff @@ -264,12 +225,10 @@ overflow: auto padding: 0 8px 8px -.algolia-autocomplete .ds-dropdown-menu *, -.meilisearch-autocomplete .dsb-dropdown-menu * +.algolia-autocomplete .ds-dropdown-menu * box-sizing: border-box -.algolia-autocomplete .algolia-docsearch-suggestion, -.meilisearch-autocomplete .docs-searchbar-suggestion +.algolia-autocomplete .algolia-docsearch-suggestion display: block position: relative padding: 0 8px @@ -277,21 +236,18 @@ color: #02060c overflow: hidden -.algolia-autocomplete .algolia-docsearch-suggestion--highlight, -.meilisearch-autocomplete .docs-searchbar-suggestion--highlight +.algolia-autocomplete .algolia-docsearch-suggestion--highlight color: #174d8c background: rgba(143,187,237,.1) padding: .1em .05em -.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl0 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl1 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight, -.meilisearch-autocomplete .docs-searchbar-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl0 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl1 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight +.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl0 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl1 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight padding: 0 0 1px background: inherit box-shadow: inset 0 -2px 0 0 rgba(69,142,225,.8) color: inherit -.algolia-autocomplete .algolia-docsearch-suggestion--content, -.meilisearch-autocomplete .docs-searchbar-suggestion--content +.algolia-autocomplete .algolia-docsearch-suggestion--content display: block float: right width: 70% @@ -299,8 +255,7 @@ padding: 5.33333px 0 5.33333px 10.66667px cursor: pointer -.algolia-autocomplete .algolia-docsearch-suggestion--content:before, -.meilisearch-autocomplete .docs-searchbar-suggestion--content:before +.algolia-autocomplete .algolia-docsearch-suggestion--content:before content: "" position: absolute display: block @@ -310,8 +265,7 @@ background: #ddd left: -1px -.algolia-autocomplete .algolia-docsearch-suggestion--category-header, -.meilisearch-autocomplete .docs-searchbar-suggestion--category-header +.algolia-autocomplete .algolia-docsearch-suggestion--category-header position: relative border-bottom: 1px solid #ddd display: none @@ -320,14 +274,12 @@ font-size: 1em color: #33363d -.algolia-autocomplete .algolia-docsearch-suggestion--wrapper, -.meilisearch-autocomplete .docs-searchbar-suggestion--wrapper +.algolia-autocomplete .algolia-docsearch-suggestion--wrapper width: 100% float: left padding: 8px 0 0 -.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column, -.meilisearch-autocomplete .docs-searchbar-suggestion--subcategory-column +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column float: left width: 30% text-align: right @@ -337,8 +289,7 @@ font-size: .9em word-wrap: break-word -.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column:before, -.meilisearch-autocomplete .docs-searchbar-suggestion--subcategory-column:before +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column:before content: "" position: absolute display: block @@ -348,37 +299,31 @@ background: #ddd right: 0 -.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-inline, -.meilisearch-autocomplete .docs-searchbar-suggestion--subcategory-inline +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-inline display: none -.algolia-autocomplete .algolia-docsearch-suggestion--title, -.meilisearch-autocomplete .docs-searchbar-suggestion--title +.algolia-autocomplete .algolia-docsearch-suggestion--title margin-bottom: 4px color: #02060c font-size: .9em font-weight: 700 -.algolia-autocomplete .algolia-docsearch-suggestion--text, -.meilisearch-autocomplete .docs-searchbar-suggestion--text +.algolia-autocomplete .algolia-docsearch-suggestion--text display: block line-height: 1.2em font-size: .85em color: #63676d -.algolia-autocomplete .algolia-docsearch-suggestion--no-results, -.meilisearch-autocomplete .docs-searchbar-suggestion--no-results +.algolia-autocomplete .algolia-docsearch-suggestion--no-results width: 100% padding: 8px 0 text-align: center font-size: 1.2em -.algolia-autocomplete .algolia-docsearch-suggestion--no-results:before, -.meilisearch-autocomplete .docs-searchbar-suggestion--no-results:before +.algolia-autocomplete .algolia-docsearch-suggestion--no-results:before display: none -.algolia-autocomplete .algolia-docsearch-suggestion code, -.meilisearch-autocomplete .docs-searchbar-suggestion code +.algolia-autocomplete .algolia-docsearch-suggestion code padding: 1px 5px font-size: 90% border: none @@ -387,22 +332,18 @@ border-radius: 3px font-family: Menlo,Monaco,Consolas,Courier New,monospace -.algolia-autocomplete .algolia-docsearch-suggestion code .algolia-docsearch-suggestion--highlight, -.meilisearch-autocomplete .docs-searchbar-suggestion code .docs-searchbar-suggestion--highlight +.algolia-autocomplete .algolia-docsearch-suggestion code .algolia-docsearch-suggestion--highlight background: none -.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__main .algolia-docsearch-suggestion--category-header,.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__secondary, -.meilisearch-autocomplete .docs-searchbar-suggestion.docs-searchbar-suggestion__main .algolia-docsearch-suggestion--category-header,.algolia-autocomplete .docs-searchbar-suggestion.docs-searchbar-suggestion__secondary +.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__main .algolia-docsearch-suggestion--category-header,.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__secondary display: block @media (min-width:768px) - .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column, - .meilisearch-autocomplete .docs-searchbar-suggestion .docs-searchbar-suggestion--subcategory-column + .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column display: block @media (max-width:768px) - .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column, - .meilisearch-autocomplete .docs-searchbar-suggestion .docs-searchbar-suggestion--subcategory-column + .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column display: inline-block width: auto float: left @@ -413,89 +354,74 @@ text-align: left opacity: .5 - .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:before, - .meilisearch-autocomplete .docs-searchbar-suggestion .docs-searchbar-suggestion--subcategory-column:before + .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:before display: none - .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:after, - .meilisearch-autocomplete .docs-searchbar-suggestion .docs-searchbar-suggestion--subcategory-column:after + .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:after content: "|" - .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content, - .meilisearch-autocomplete .docs-searchbar-suggestion .docs-searchbar-suggestion--content + .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content display: inline-block width: auto text-align: left float: left padding: 0 - .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content:before, - .meilisearch-autocomplete .docs-searchbar-suggestion .docs-searchbar-suggestion--content:before + .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content:before display: none -.algolia-autocomplete .suggestion-layout-simple.algolia-docsearch-suggestion, -.meilisearch-autocomplete .suggestion-layout-simple.docs-searchbar-suggestion +.algolia-autocomplete .suggestion-layout-simple.algolia-docsearch-suggestion border-bottom: 1px solid #eee padding: 8px margin: 0 -.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content, -.meilisearch-autocomplete .suggestion-layout-simple .docs-searchbar-suggestion--content +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content width: 100% padding: 0 -.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content:before, -.meilisearch-autocomplete .suggestion-layout-simple .docs-searchbar-suggestion--content:before +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content:before display: none -.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header, -.meilisearch-autocomplete .suggestion-layout-simple .docs-searchbar-suggestion--category-header +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header margin: 0 padding: 0 display: block width: 100% border: none -.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl0,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1, -.meilisearch-autocomplete .suggestion-layout-simple .docs-searchbar-suggestion--category-header-lvl0,.meilisearch-autocomplete .suggestion-layout-simple .docs-searchbar-suggestion--category-header-lvl1 +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl0,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1 opacity: .6 font-size: .85em -.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1:before, -.meilisearch-autocomplete .suggestion-layout-simple .docs-searchbar-suggestion--category-header-lvl1:before +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1:before background-image: url('data:image/svg+xmlutf8,<svg width="10" height="10" viewBox="0 0 20 38" xmlns="http://www.w3.org/2000/svg"><path d="M1.49 4.31l14 16.126.002-2.624-14 16.074-1.314 1.51 3.017 2.626 1.313-1.508 14-16.075 1.142-1.313-1.14-1.313-14-16.125L3.2.18.18 2.8l1.31 1.51z" fill-rule="evenodd" fill="%231D3657" /></svg>') content: "" width: 10px height: 10px display: inline-block -.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--wrapper, -.meilisearch-autocomplete .suggestion-layout-simple .docs-searchbar-suggestion--wrapper +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--wrapper width: 100% float: left margin: 0 padding: 0 -.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--duplicate-content,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--subcategory-inline, -.meilisearch-autocomplete .suggestion-layout-simple .docs-searchbar-suggestion--duplicate-content,.meilisearch-autocomplete .suggestion-layout-simple .docs-searchbar-suggestion--subcategory-inline +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--duplicate-content,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--subcategory-inline display: none!important -.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title, -.meilisearch-autocomplete .suggestion-layout-simple .docs-searchbar-suggestion--title +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title margin: 0 color: #458ee1 font-size: .9em font-weight: 400 -.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title:before, -.meilisearch-autocomplete .suggestion-layout-simple .docs-searchbar-suggestion--title:before +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title:before content: "#" font-weight: 700 color: #458ee1 display: inline-block -.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text, -.meilisearch-autocomplete .suggestion-layout-simple .docs-searchbar-suggestion--text +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text margin: 4px 0 0 display: block line-height: 1.4em @@ -504,14 +430,12 @@ font-size: .85em opacity: .8 -.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight, -.meilisearch-autocomplete .suggestion-layout-simple .docs-searchbar-suggestion--text .docs-searchbar-suggestion--highlight +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight color: #3f4145 font-weight: 700 box-shadow: none -.algolia-autocomplete .algolia-docsearch-footer, -.meilisearch-autocomplete .docs-docsearch-footer +.algolia-autocomplete .algolia-docsearch-footer width: 134px height: 20px z-index: 2000 @@ -520,8 +444,7 @@ font-size: 0 line-height: 0 -.algolia-autocomplete .algolia-docsearch-footer--logo, -.meilisearch-autocomplete .docs-docsearch-footer--logo +.algolia-autocomplete .algolia-docsearch-footer--logo background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='168' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938zm41.937 17.866c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17z' fill='%235468FF'/%3E%3Cpath d='M6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z' fill='%235D6494'/%3E%3Cpath d='M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36' fill='%23FFF'/%3E%3C/g%3E%3C/svg%3E") background-repeat: no-repeat background-position: 50% @@ -548,8 +471,7 @@ .q-field__append cursor: text -.algolia-autocomplete, -.meilisearch-autocomplete +.algolia-autocomplete width: auto min-width: 0 max-width: 100% @@ -557,8 +479,7 @@ // fix for IE display: flex !important - .ds-dropdown-menu, - .dsb-dropdown-menu + .ds-dropdown-menu box-shadow: $shadow-2 max-width: 93vw width: 500px @@ -573,22 +494,19 @@ max-height: 80vh overflow: auto - .ds-suggestions, - .dsb-suggestions + .ds-suggestions margin-top: 0 border-bottom: 1px solid #ddd - .algolia-docsearch, .docs-docsearch + .algolia-docsearch &-suggestion text-decoration: none &-suggestion--no-results background: $primary !important - &, .algolia-docsearch-suggestion--text, - &, .docs-searchbar-suggestion--text + &, .algolia-docsearch-suggestion--text color: white - .algolia-docsearch-suggestion--text, - .docs-searchbar-suggestion--text + .algolia-docsearch-suggestion--text margin-top: 0 padding: 8px @@ -610,8 +528,7 @@ &-suggestion--text margin-top: 4px - .algolia-docsearch-suggestion--highlight, - .docs-searchbar-suggestion--highlight + .algolia-docsearch-suggestion--highlight color: $primary &-suggestion--highlight @@ -640,4 +557,3 @@ &-suggestion--no-results margin: -6px 0 width: 100% !important - diff --git a/docs/src/layouts/DocLayout.vue b/docs/src/layouts/DocLayout.vue index 5fc5bd5bc30..8c35d471b39 100644 --- a/docs/src/layouts/DocLayout.vue +++ b/docs/src/layouts/DocLayout.vue @@ -81,7 +81,7 @@ q-layout.doc-layout(view="lHh LpR lff", @scroll="onScroll") ) //- template(v-slot:append) - //- q-icon( + //- q-icon.cursor-pointer( //- :name="mdiMagnify" //- @click="onSearchIconClick" //- ) @@ -167,9 +167,9 @@ export default { useAlgolia(scope, $q, $route) // TODO vue3 - re-enable search when docs are released as SSR - scope.onSearchIconClick = () => { - scope.algoliaInputRef.value.focus() - } + // scope.onSearchIconClick = () => { + // scope.algoliaInputRef.value.focus() + // } return scope } diff --git a/docs/src/layouts/doc-layout/use-algolia.js b/docs/src/layouts/doc-layout/use-algolia.js index 8a4dcd6f44d..68540ddd600 100644 --- a/docs/src/layouts/doc-layout/use-algolia.js +++ b/docs/src/layouts/doc-layout/use-algolia.js @@ -1,142 +1,85 @@ -import { provideDocStore } from 'src/assets/doc-store' -import { ref, computed, onMounted, onBeforeUnmount } from 'vue' -import { useRouter } from 'vue-router' -// import { ref } from 'vue' +// import { ref, computed, onMounted, onBeforeUnmount } from 'vue' +// import { useRouter } from 'vue-router' +import { ref } from 'vue' -export default function useAlgolia (scope, $q, $route) { +export default function useAlgolia (scope/* , $q, $route */) { const search = ref('') const searchFocused = ref(false) const algoliaInputRef = ref(null) - function focusOnSearch (evt) { - if ( - evt.target.tagName !== 'INPUT' && - String.fromCharCode(evt.keyCode) === '/' - ) { - evt.preventDefault() - search.value = '' - - if (scope.leftDrawerState.value !== true) { - scope.leftDrawerState.value = true - } - - setTimeout(() => { - algoliaInputRef.value.focus() - }) - } - } - - onMounted(() => { - const $router = useRouter() - - // If we have a search string in the query (mostly from tab-to-search functionality), - // we need to open the drawer to fill in the search string in the input later - const searchQuery = $route.query.search - - if (searchQuery) { - scope.leftDrawerState.value = true - } - - // import( - // /* webpackChunkName: "algolia" */ - // 'docsearch.js' - // ).then(docsearch => { - // docsearch.default({ - // apiKey: '5c15f3938ef24ae49e3a0e69dc4a140f', - // indexName: 'quasar-framework', - // inputSelector: '.doc-algolia input', - // algoliaOptions: { - // hitsPerPage: 7 - // }, - // handleSelected: (a, b, suggestion, c, context) => { - // const url = suggestion.url.replace('https://quasar.dev', '') - - // search.value = '' - // $router.push(url).catch(() => {}) - // algoliaInputRef.value.blur() - // } - // }) - import( - /* webpackChunkName: "algolia" */ - 'docs-searchbar.js' - ).then(docsearch => { - // console.log({ - // apiKey: process.env.search.apiKey, - // hostUrl: process.env.search.hostUrl, - // indexName: process.env.search.indexUid, - // inputSelector: process.env.search.inputSelector, - // debug: process.env.search.debug, - // }) - docsearch.default({ - apiKey: process.env.search.apiKey, - hostUrl: process.env.search.hostUrl, - indexUid: process.env.search.indexUid, - inputSelector: process.env.search.inputSelector, - debug: process.env.search.debug, - meilisearchOptions: { - limit: 7 - }, - // autocompleteOptions: { - - // } - /** - * queryHook takes a callback function as value. This function will be - * called on every keystroke to transform the typed keywords before - * querying MeiliSearch. By default, it does not do anything, but it - * is the perfect place for you to add some preprocessing or custom - * functionality. - */ - // queryHook () { - // }, - /** - * transformData takes a callback function as value. This function - * will be called on every hit before displaying them. By default, - * it does not do anything, but it lets you add any post-processing - * around the data you received from MeiliSearch. - */ - // transformData () { - // }, - /** - * https://github.com/meilisearch/docs-searchbar.js#handleselected- - * @param {Element} input a reference to the search input element. It comes with the .open(), .close(), .getVal() and .setVal() methods. - * @param {Event} event the actual event triggering the selection. - * @param {Object} suggestion the object representing the current selection. It contains a .url key representing the destination. - * @param {Number} datasetNumber this should always be equal to 1 as docs-searchbar.js is searching into one dataset at a time. You can ignore this attribute. - * @param {Any} context additional information about the selection. Contains a .selectionMethod key that can be either click, enterKey, tabKey or blur, depending on how the suggestion was selected. - */ - handleSelected: (input, event, suggestion, datasetNumber, context) => { - const url = suggestion.url.replace('https://quasar.dev', '') - - search.value = '' - $router.push(url).catch(() => {}) - algoliaInputRef.value.blur() - } - }) - - if ($q.platform.is.desktop === true) { - window.addEventListener('keypress', focusOnSearch) - } - - if (searchQuery) { - // Here we put search string from query into the input and open the search popup. - // Unfortunately, this input is managed completely by Algolia and their code doesn't seem to - // have a method of opening the popup programmatically, so we need to simulate typing on that input element. - // We also need to dispatch the event only after the input text is populated and Vue will - // do that in next render, so we schedule it on the next event loop iteration with setTimeout. - search.value = searchQuery - algoliaInputRef.value.focus() - setTimeout(() => { - algoliaInputRef.value.$refs.input.dispatchEvent(new Event('input', {})) - }) - } - }) - }) - - onBeforeUnmount(() => { - if ($q.platform.is.desktop === true) { - window.removeEventListener('keypress', focusOnSearch) - } - }) + // function focusOnSearch (evt) { + // if ( + // evt.target.tagName !== 'INPUT' && + // String.fromCharCode(evt.keyCode) === '/' + // ) { + // evt.preventDefault() + // search.value = '' + + // if (scope.leftDrawerState.value !== true) { + // scope.leftDrawerState.value = true + // } + + // setTimeout(() => { + // algoliaInputRef.value.focus() + // }) + // } + // } + + // onMounted(() => { + // const $router = useRouter() + + // // If we have a search string in the query (mostly from tab-to-search functionality), + // // we need to open the drawer to fill in the search string in the input later + // const searchQuery = $route.query.search + + // if (searchQuery) { + // scope.leftDrawerState.value = true + // } + + // import( + // /* webpackChunkName: "algolia" */ + // 'docsearch.js' + // ).then(docsearch => { + // docsearch.default({ + // apiKey: '5c15f3938ef24ae49e3a0e69dc4a140f', + // indexName: 'quasar-framework', + // inputSelector: '.doc-algolia input', + // algoliaOptions: { + // hitsPerPage: 7 + // }, + // handleSelected: (a, b, suggestion, c, context) => { + // const url = suggestion.url.replace('https://quasar.dev', '') + + // search.value = '' + // $router.push(url).catch(() => {}) + // algoliaInputRef.value.blur() + // } + // }) + + // if ($q.platform.is.desktop === true) { + // window.addEventListener('keypress', focusOnSearch) + // } + + // if (searchQuery) { + // // Here we put search string from query into the input and open the search popup. + // // Unfortunately, this input is managed completely by Algolia and their code doesn't seem to + // // have a method of opening the popup programmatically, so we need to simulate typing on that input element. + // // We also need to dispatch the event only after the input text is populated and Vue will + // // do that in next render, so we schedule it on the next event loop iteration with setTimeout. + // search.value = searchQuery + // algoliaInputRef.value.focus() + // setTimeout(() => { + // algoliaInputRef.value.$refs.input.dispatchEvent(new Event('input', {})) + // }) + // } + // }) + // }) + + // onBeforeUnmount(() => { + // if ($q.platform.is.desktop === true) { + // window.removeEventListener('keypress', focusOnSearch) + // } + // }) Object.assign(scope, { search,
c036edf81eacb02eb8ee19fc9fb9226db2e10ec6
2018-02-20 06:46:43
Razvan Stoenescu
fix(QTable): top & bottom responsiveness
false
top & bottom responsiveness
fix
diff --git a/dev/components/components/data-table2.vue b/dev/components/components/data-table2.vue index 44d0bd2af42..00986d1a2da 100644 --- a/dev/components/components/data-table2.vue +++ b/dev/components/components/data-table2.vue @@ -94,6 +94,7 @@ <h4>Filter, Column selection</h4> <q-table :data="data" + title="Filter, Column selection" :columns="columns" :filter="filter" :visible-columns="visibleColumns" @@ -101,9 +102,9 @@ color="primary" > <template slot="top-right" slot-scope="props"> - <q-search hide-underline color="primary" v-model="filter" /> - <q-table-columns color="primary" class="on-right" v-model="visibleColumns" :columns="columns" /> - <q-btn color="primary" flat round dense icon="more_vert" class="on-right"> + <q-search hide-underline color="primary" class="q-mr-sm" v-model="filter" /> + <q-table-columns color="primary" class="q-mr-sm" v-model="visibleColumns" :columns="columns" /> + <q-btn color="primary" flat round dense icon="more_vert"> <q-popover ref="popover"> <q-list link> <q-item @click.native="$refs.popover.hide()"> diff --git a/src/components/table/table-bottom.js b/src/components/table/table-bottom.js index 7f876b84596..a4ad5c553af 100644 --- a/src/components/table/table-bottom.js +++ b/src/components/table/table-bottom.js @@ -22,9 +22,10 @@ export default { const bottom = this.$scopedSlots.bottom - return h('div', { staticClass: 'q-table-bottom row items-center gutter-x-sm justify-between' }, - bottom ? [ bottom(this.marginalsProps) ] : this.getPaginationRow(h) - ) + return h('div', { + staticClass: 'q-table-bottom row items-center', + 'class': bottom ? null : 'justify-end' + }, bottom ? [ bottom(this.marginalsProps) ] : this.getPaginationRow(h)) }, getPaginationRow (h) { const @@ -33,12 +34,15 @@ export default { paginationSlot = this.$scopedSlots.pagination return [ - h('div', { staticClass: 'col-auto' }, [ - this.hasSelectionMode && this.rowsSelectedNumber > 0 - ? (this.selectedRowsLabel || this.$q.i18n.table.selectedRows)(this.rowsSelectedNumber) - : '' + h('div', { staticClass: 'q-table-control' }, [ + h('div', [ + this.hasSelectionMode && this.rowsSelectedNumber > 0 + ? (this.selectedRowsLabel || this.$q.i18n.table.selectedRows)(this.rowsSelectedNumber) + : '' + ]) ]), - h('div', { staticClass: 'col-auto flex items-center no-wrap' }, [ + h('div', { staticClass: 'q-table-separator col' }), + h('div', { staticClass: 'q-table-control' }, [ h('span', { staticClass: 'q-table-bottom-item' }, [ this.rowsPerPageLabel || this.$q.i18n.table.rowsPerPage ]), @@ -59,7 +63,9 @@ export default { }) } } - }), + }) + ]), + h('div', { staticClass: 'q-table-control' }, [ paginationSlot ? paginationSlot(this.marginalsProps) : [ diff --git a/src/components/table/table-top.js b/src/components/table/table-top.js index 4fa034f23ca..81d14675eec 100644 --- a/src/components/table/table-top.js +++ b/src/components/table/table-top.js @@ -22,7 +22,7 @@ export default { topRight = this.$scopedSlots['top-right'], topSelection = this.$scopedSlots['top-selection'], hasSelection = this.hasSelectionMode && topSelection && this.rowsSelectedNumber > 0, - staticClass = 'q-table-top relative-position row no-wrap items-center', + staticClass = 'q-table-top relative-position row items-center', child = [] if (top) { @@ -34,16 +34,28 @@ export default { } else { if (topLeft) { - child.push(topLeft(this.marginalsProps)) + child.push( + h('div', { staticClass: 'q-table-control' }, [ + topLeft(this.marginalsProps) + ]) + ) } else if (this.title) { - child.push(h('div', { staticClass: 'q-table-title' }, this.title)) + child.push( + h('div', { staticClass: 'q-table-control' }, [ + h('div', { staticClass: 'q-table-title' }, this.title) + ]) + ) } } if (topRight) { child.push(h('div', { staticClass: 'q-table-separator col' })) - child.push(topRight(this.marginalsProps)) + child.push( + h('div', { staticClass: 'q-table-control' }, [ + topRight(this.marginalsProps) + ]) + ) } if (child.length === 0) { diff --git a/src/components/table/table.ios.styl b/src/components/table/table.ios.styl index fb9e65c82f3..058c141e1e4 100644 --- a/src/components/table/table.ios.styl +++ b/src/components/table/table.ios.styl @@ -7,7 +7,7 @@ .q-table-top min-height 64px - padding 4px 24px + padding 8px 24px &:before content '' position absolute @@ -18,17 +18,20 @@ left 0 opacity .2 transition $table-transition + .q-table-control + min-height 36px + padding 8px 0 + flex-wrap wrap +.q-table-title + font-size 20px + letter-spacing 0.005em + font-weight 400 .q-table-separator min-width 8px !important .q-table-nodata .q-icon font-size 200% padding-right 15px -.q-table-title - font-size 20px - letter-spacing .005em - font-weight 400 - .q-table-progress height 0 !important td @@ -44,8 +47,14 @@ .q-table-bottom min-height 48px - padding 0 14px 0 24px + padding 4px 14px 4px 24px font-size 12px + .q-table-control + min-height 24px + +.q-table-control + display flex + align-items center .q-table-sort-icon transition $table-transition @@ -148,7 +157,9 @@ table-dense() .q-table th, td padding 4px 8px - thead tr, tbody td + thead tr + height 40px + tbody td height 28px .q-table-bottom-item diff --git a/src/components/table/table.mat.styl b/src/components/table/table.mat.styl index fb9e65c82f3..058c141e1e4 100644 --- a/src/components/table/table.mat.styl +++ b/src/components/table/table.mat.styl @@ -7,7 +7,7 @@ .q-table-top min-height 64px - padding 4px 24px + padding 8px 24px &:before content '' position absolute @@ -18,17 +18,20 @@ left 0 opacity .2 transition $table-transition + .q-table-control + min-height 36px + padding 8px 0 + flex-wrap wrap +.q-table-title + font-size 20px + letter-spacing 0.005em + font-weight 400 .q-table-separator min-width 8px !important .q-table-nodata .q-icon font-size 200% padding-right 15px -.q-table-title - font-size 20px - letter-spacing .005em - font-weight 400 - .q-table-progress height 0 !important td @@ -44,8 +47,14 @@ .q-table-bottom min-height 48px - padding 0 14px 0 24px + padding 4px 14px 4px 24px font-size 12px + .q-table-control + min-height 24px + +.q-table-control + display flex + align-items center .q-table-sort-icon transition $table-transition @@ -148,7 +157,9 @@ table-dense() .q-table th, td padding 4px 8px - thead tr, tbody td + thead tr + height 40px + tbody td height 28px .q-table-bottom-item
2abb603d99420703e88e492f73637917b5408a87
2024-05-03 21:12:29
Razvan Stoenescu
fix(ui): JSON > model-value definition for QBtnDropdown/QDialog/QDrawer/QExpansionItem/QFab/QMenu/QTooltip/QFab
false
JSON > model-value definition for QBtnDropdown/QDialog/QDrawer/QExpansionItem/QFab/QMenu/QTooltip/QFab
fix
diff --git a/ui/src/components/fab/QFab.json b/ui/src/components/fab/QFab.json index 528d18cb0c4..a57471d93fe 100644 --- a/ui/src/components/fab/QFab.json +++ b/ui/src/components/fab/QFab.json @@ -3,10 +3,7 @@ "props": { "model-value": { - "extends": "model-value", - "desc": "Controls state of fab actions (showing/hidden); Works best with v-model directive, otherwise use along listening to 'update:modelValue' event", - "category": "model", - "required": false + "desc": "Controls state of fab actions (showing/hidden); Works best with v-model directive, otherwise use along listening to 'update:modelValue' event" }, "icon": { diff --git a/ui/src/composables/private.use-model-toggle/use-model-toggle.json b/ui/src/composables/private.use-model-toggle/use-model-toggle.json index 38c7014cd4e..e9c82275af1 100644 --- a/ui/src/composables/private.use-model-toggle/use-model-toggle.json +++ b/ui/src/composables/private.use-model-toggle/use-model-toggle.json @@ -1,9 +1,11 @@ { "props": { "model-value": { - "type": "Boolean", + "type": [ "Boolean", "null" ], "desc": "Model of the component defining shown/hidden state; Either use this property (along with a listener for 'update:model-value' event) OR use v-model directive", - "category": "model" + "default": "null", + "category": "model", + "examples": [ "# v-model=\"state\"" ] } },
18d6d0d70d12171f26f9afc2bc55cd3b60bdb19b
2021-03-30 16:35:47
Paolo Caleffi
feat(app/ts): add Vuex typings, fix #8511, #8500 (#8712)
false
add Vuex typings, fix #8511, #8500 (#8712)
feat
diff --git a/app/templates/entry/app.js b/app/templates/entry/app.js index cd6bffbc648..28fc670e039 100644 --- a/app/templates/entry/app.js +++ b/app/templates/entry/app.js @@ -61,6 +61,10 @@ export default async function (createAppFn<%= ctx.mode.ssr ? ', ssrContext' : '' const store = typeof createStore === 'function' ? await createStore({<%= ctx.mode.ssr ? 'ssrContext' : '' %>}) : createStore + + + // obtain Vuex injection key in case we use TypeScript + const { storeKey } = await import('app/src/store/index'); <% } %> const router = typeof createRouter === 'function' ? await createRouter({<%= ctx.mode.ssr ? 'ssrContext' + (store ? ',' : '') : '' %><%= store ? 'store' : '' %>}) @@ -89,7 +93,7 @@ export default async function (createAppFn<%= ctx.mode.ssr ? ', ssrContext' : '' // different depending on whether we are in a browser or on the server. return { app, - <%= store ? 'store,' : '' %> + <%= store ? 'store, storeKey,' : '' %> router } } diff --git a/app/templates/entry/client-entry.js b/app/templates/entry/client-entry.js index f0ae28c2146..1a670beadad 100644 --- a/app/templates/entry/client-entry.js +++ b/app/templates/entry/client-entry.js @@ -69,7 +69,7 @@ const doubleSlashRE = /\/\// const addPublicPath = url => (publicPath + url).replace(doubleSlashRE, '/') <% } %> -async function start ({ app, router<%= store ? ', store' : '' %> }<%= bootEntries.length > 0 ? ', bootFiles' : '' %>) { +async function start ({ app, router<%= store ? ', store, storeKey' : '' %> }<%= bootEntries.length > 0 ? ', bootFiles' : '' %>) { <% if (ctx.mode.ssr && store && ssr.manualHydration !== true) { %> // prime the store with server-initialized state. // the state is determined during SSR and inlined in the page markup. @@ -121,7 +121,7 @@ async function start ({ app, router<%= store ? ', store' : '' %> }<%= bootEntrie <% } %> app.use(router) - <% if (store) { %>app.use(store)<% } %> + <% if (store) { %>app.use(store, storeKey)<% } %> <% if (ctx.mode.ssr) { %> <% if (ctx.mode.pwa) { %> diff --git a/app/templates/entry/server-entry.js b/app/templates/entry/server-entry.js index b0a6d4f4ac1..28be7e1f2b4 100644 --- a/app/templates/entry/server-entry.js +++ b/app/templates/entry/server-entry.js @@ -73,7 +73,7 @@ function redirectBrowser (url, router, reject, httpStatusCode) { // return a Promise that resolves to the app instance. export default ssrContext => { return new Promise(async (resolve, reject) => { - const { app, router<%= store ? ', store' : '' %> } = await createQuasarApp(createApp, ssrContext) + const { app, router<%= store ? ', store, storeKey' : '' %> } = await createQuasarApp(createApp, ssrContext) <% if (bootNames.length > 0) { %> let hasRedirected = false @@ -106,7 +106,7 @@ export default ssrContext => { <% } %> app.use(router) - <% if (store) { %>app.use(store)<% } %> + <% if (store) { %>app.use(store, storeKey)<% } %> const url = ssrContext.url<% if (build.publicPath !== '/') { %>.replace(publicPath, '')<% } %> const { fullPath } = router.resolve(url) diff --git a/app/templates/store/ts/index.ts b/app/templates/store/ts/index.ts index 7333989eb96..2bae8e4ff73 100644 --- a/app/templates/store/ts/index.ts +++ b/app/templates/store/ts/index.ts @@ -1,5 +1,10 @@ import { store } from 'quasar/wrappers' -import { createStore } from 'vuex' +import { InjectionKey } from 'vue' +import { + createStore, + Store as VuexStore, + useStore as vuexUseStore, +} from 'vuex' // import example from './module-example' // import { ExampleStateInterface } from './module-example/state'; @@ -20,6 +25,16 @@ export interface StateInterface { example: unknown; } +// provide typings for `this.$store` +declare module '@vue/runtime-core' { + interface ComponentCustomProperties { + $store: VuexStore<StateInterface> + } +} + +// provide typings for `useStore` helper +export const storeKey: InjectionKey<VuexStore<StateInterface>> = Symbol('vuex-key') + export default store(function (/* { ssrContext } */) { const Store = createStore<StateInterface>({ modules: { @@ -33,3 +48,7 @@ export default store(function (/* { ssrContext } */) { return Store }) + +export function useStore() { + return vuexUseStore(storeKey) +} \ No newline at end of file diff --git a/docs/src/pages/quasar-cli/prefetch-feature.md b/docs/src/pages/quasar-cli/prefetch-feature.md index c96249d0898..f7a5f1654a6 100644 --- a/docs/src/pages/quasar-cli/prefetch-feature.md +++ b/docs/src/pages/quasar-cli/prefetch-feature.md @@ -260,7 +260,7 @@ interface StateInterface { } export default { - preFetch: preFetch<Store<StateInterface>>(({ store }) => { + preFetch: preFetch<StateInterface>(({ store }) => { // Do something with your newly-typed store parameter }), }
72d8a60ab6a2b844b76c4b2dee62c5cafb6421e5
2018-12-28 18:47:44
Razvan Stoenescu
feat(app): Sync modifier banner
false
Sync modifier banner
feat
diff --git a/app/bin/quasar-describe b/app/bin/quasar-describe index 8ebf8670aab..45eeed2fb16 100644 --- a/app/bin/quasar-describe +++ b/app/bin/quasar-describe @@ -86,6 +86,9 @@ function describeComponent (api) { const prop = api.props[propName] console.log(`\n ${prop.required ? chalk.red('*') : ' '} ${chalk.green(propName)} (${prop.type})${prop.required ? chalk.red(' [Required]') : ''}`) console.log(` ${prop.desc}`) + if (prop.sync) { + console.log(` ".sync" modifier required!`) + } if (prop.link) { console.log(` Link: ${prop.link}`) } diff --git a/quasar/src/components/chip/QChip.json b/quasar/src/components/chip/QChip.json index 1a2ca0fe606..96807370b08 100644 --- a/quasar/src/components/chip/QChip.json +++ b/quasar/src/components/chip/QChip.json @@ -98,7 +98,7 @@ }, "update:selected": { - "desc": "Emitted when 'selected' state changes; Works along the sync prop 'selected'", + "desc": "Used by Vue on 'selected.sync' prop for updating its value", "params": { "state": { "type": "Boolean",
06ef9484203ce8552d3bce7a4e5f770f362e705d
2017-11-23 17:14:43
Razvan Stoenescu
refactor: Model toggle updates
false
Model toggle updates
refactor
diff --git a/dev/components/global/dialog.vue b/dev/components/global/dialog.vue index 9a9dc924b98..ffb113a407a 100644 --- a/dev/components/global/dialog.vue +++ b/dev/components/global/dialog.vue @@ -43,16 +43,16 @@ export default { this.showDialog = !this.showDialog }, onOk (data) { - console.log('onOK', data) + console.log('>>> onOK', data) }, onCancel (data) { - console.log('onCancel', data) + console.log('>>> onCancel', data) }, onHide (data) { - console.log('onHide', data) + console.log('>>> onHide', data) }, onShow (data) { - console.log('onShow', data) + console.log('>>> onShow', data) }, adHoc () { this.$q.dialog({ @@ -66,9 +66,9 @@ export default { // preventClose: true, color: 'secondary' }).then(data => { - console.log('OK, received:', data) + console.log('>>>> OK, received:', data) }).catch(() => { - console.log('dismissed') + console.log('>>>> Cancel') }) }, adHoc2 () { @@ -89,9 +89,9 @@ export default { preventClose: true, color: 'secondary' }).then(data => { - console.log('OK, received:', data) + console.log('>>>> OK, received:', data) }).catch(() => { - console.log('dismissed') + console.log('>>>> Cancel') }) }, adHoc3 () { @@ -101,9 +101,9 @@ export default { cancel: true, preventClose: true }).then(() => { - console.log('OK') + console.log('>>> OK') }).catch(() => { - console.log('Cancel') + console.log('>>> Cancel') }) } } diff --git a/src/components/dialog/QDialog.js b/src/components/dialog/QDialog.js index 63599c5d719..1dad05c0a55 100644 --- a/src/components/dialog/QDialog.js +++ b/src/components/dialog/QDialog.js @@ -25,11 +25,6 @@ export default { default: 'primary' } }, - watch: { - value (val) { - this[val ? 'show' : 'hide']() - } - }, render (h) { const child = [], @@ -90,19 +85,38 @@ export default { return h(QModal, { ref: 'modal', props: { + value: this.value, minimized: true, noBackdropDismiss: this.preventClose, noEscDismiss: this.preventClose, position: this.position }, on: { + input: val => { + this.$emit('input', val) + }, show: () => { + console.log('DIALOG show emitting show') this.$emit('show') - this.$emit('input', true) + + if (!this.$q.platform.is.desktop) { + return + } + + let node = this.$refs.modal.$el.getElementsByTagName('INPUT') + if (node.length) { + node[0].focus() + return + } + + node = this.$refs.modal.$el.getElementsByTagName('INPUT') + if (node.length) { + node[node.length - 1].focus() + } }, hide: () => { + console.log('DIALOG hide emitting hide') this.$emit('hide') - this.$emit('input', false) }, dismiss: () => { console.log('DIALOG received dismiss, hiding then emitting cancel') @@ -135,24 +149,7 @@ export default { methods: { show () { console.log('DIALOG show') - return this.$refs.modal.show().then(() => { - console.log('DIALOG show emitting show') - - if (!this.$q.platform.is.desktop) { - return - } - - let node = this.$refs.modal.$el.getElementsByTagName('INPUT') - if (node.length) { - node[0].focus() - return - } - - node = this.$refs.modal.$el.getElementsByTagName('INPUT') - if (node.length) { - node[node.length - 1].focus() - } - }) + return this.$refs.modal.show() }, hide () { let data @@ -163,7 +160,7 @@ export default { console.log('DIALOG hide') return this.$refs.modal.hide().then(() => { - console.log('DIALOG hide', data) + console.log('DIALOG hide data:', data) return data }) }, diff --git a/src/components/modal/QModal.js b/src/components/modal/QModal.js index b44a46d3e6b..f986b4889f8 100644 --- a/src/components/modal/QModal.js +++ b/src/components/modal/QModal.js @@ -49,6 +49,10 @@ let openedModalNumber = 0 export default { name: 'q-modal', mixins: [ModelToggleMixin], + modelToggle: { + history: true, + showOnMount: true + }, props: { position: { type: String, @@ -133,7 +137,7 @@ export default { }) }, __show () { - console.log('MODAL show') + console.log('MODAL __show') const body = document.body body.appendChild(this.$el) @@ -147,21 +151,18 @@ export default { } }) - this.$once('show', () => { - console.log('trigger') - let content = this.$refs.content - content.scrollTop = 0 - ;['modal-scroll', 'layout-view'].forEach(c => { - [].slice.call(content.getElementsByClassName(c)).forEach(el => { - el.scrollTop = 0 - }) + openedModalNumber++ + + let content = this.$refs.content + content.scrollTop = 0 + ;['modal-scroll', 'layout-view'].forEach(c => { + [].slice.call(content.getElementsByClassName(c)).forEach(el => { + el.scrollTop = 0 }) }) - - openedModalNumber++ }, __hide () { - console.log('MODAL hide') + console.log('MODAL __hide') EscapeKey.pop() openedModalNumber-- @@ -173,11 +174,6 @@ export default { } } }, - mounted () { - if (this.value) { - this.show() - } - }, beforeDestroy () { if (this.$el.parentNode) { this.$el.parentNode.removeChild(this.$el) @@ -192,19 +188,19 @@ export default { }, on: { afterEnter: () => { - console.log('show resolve') + console.log('MODAL show resolve') this.showPromise && this.showPromiseResolve() }, enterCancelled: () => { - console.log('show cancel') + console.log('MODAL show cancel') this.showPromise && this.showPromiseReject() }, afterLeave: () => { - console.log('hide resolve') + console.log('MODAL hide resolve') this.hidePromise && this.hidePromiseResolve() }, leaveCancelled: () => { - console.log('hide reject') + console.log('MODAL hide reject') this.hidePromise && this.hidePromiseReject() } } diff --git a/src/mixins/model-toggle.js b/src/mixins/model-toggle.js index f1a91bd7582..c81e0c6df67 100644 --- a/src/mixins/model-toggle.js +++ b/src/mixins/model-toggle.js @@ -16,36 +16,16 @@ export default { }, watch: { value (val) { - console.log(this.$options.name, '__updateModel value watcher', val, this.showing) if (this.disable && val) { + console.log(this.$options.name, '__updateModel value watcher -- disabled, emitting false') this.$emit('input', false) return } + console.log(this.$options.name, '__updateModel value watcher', val, this.showing) if (val !== this.showing) { this[val ? 'show' : 'hide']() } - }, - showing (val) { - console.log(this.$options.name, '__updateModel showing watcher', val, this.value) - if (this.value !== val) { - this.$emit('input', val) - } - - if (this.$options.noShowingHistory) { - return - } - - if (val) { - this.__historyEntry = { - handler: this.hide - } - History.add(this.__historyEntry) - } - else if (this.__historyEntry) { - History.remove(this.__historyEntry) - this.__historyEntry = null - } } }, methods: { @@ -59,68 +39,112 @@ export default { return Promise.reject(new Error()) } - console.log('show') + console.log('MODEL-TOGGLE show') if (this.showing) { - return this.showPromise || Promise.resolve() + console.log('MODEL-TOGGLE show already in progress') + return this.showPromise || Promise.resolve(evt) + } + + if (this.hidePromise) { + console.log('MODEL-TOGGLE rejecting hide promise') + this.hidePromiseReject() } this.showing = true + if (this.value !== void 0) { + console.log('MODEL-TOGGLE emitting false') + this.$emit('input', true) + } + + if (this.$options.modelToggle.history) { + this.__historyEntry = { + handler: this.hide + } + History.add(this.__historyEntry) + } + + if (!this.__show) { + this.$emit('show') + return Promise.resolve(evt) + } + this.showPromise = new Promise((resolve, reject) => { this.showPromiseResolve = () => { + console.log('MODEL-TOGGLE showPromiseResolve') this.showPromise = null this.$emit('show') - resolve() + resolve(evt) } this.showPromiseReject = () => { + console.log('MODEL-TOGGLE showPromiseReject') this.showPromise = null reject(new Error()) } }) - this.$nextTick(() => { - if (this.__show) { - this.__show(evt) - } - else { - this.showPromiseResolve() - } - }) - - return this.showPromise + console.log('MODEL-TOGGLE calling __show') + this.__show(evt) + return this.showPromise || Promise.resolve(evt) }, hide (evt) { - console.log('hide') + if (this.disable) { + return Promise.reject(new Error()) + } + + console.log('MODEL-TOGGLE hide') if (!this.showing) { - console.log('hide aborting') + console.log('MODEL-TOGGLE already hiding') return this.hidePromise || Promise.resolve() } + if (this.showPromise) { + console.log('MODEL-TOGGLE rejecting show promise') + this.showPromiseReject() + } + this.showing = false + if (this.value !== void 0) { + console.log('MODEL-TOGGLE emitting false') + this.$emit('input', false) + } + + if (this.__historyEntry) { + History.remove(this.__historyEntry) + this.__historyEntry = null + } + + if (!this.__hide) { + this.$emit('hide') + return Promise.resolve() + } + this.hidePromise = new Promise((resolve, reject) => { this.hidePromiseResolve = () => { + console.log('MODEL-TOGGLE hidePromiseResolve') this.hidePromise = null this.$emit('hide') resolve() } this.hidePromiseReject = () => { + console.log('MODEL-TOGGLE hidePromiseReject') this.hidePromise = null reject(new Error()) } }) - this.$nextTick(() => { - if (this.__hide) { - this.__hide(evt) - } - else { - this.hidePromiseResolve() - } - }) - return this.hidePromise + + console.log('MODEL-TOGGLE calling __hide') + this.__hide(evt) + return this.hidePromise || Promise.resolve() + } + }, + mounted () { + if (this.$options.modelToggle.showOnMount && this.value) { + this.show() } }, beforeDestroy () { if (this.showing) { - console.log('beforeDestroy calling hide') + console.log('MODEL-TOGGLE beforeDestroy calling hide') this.showPromise && this.showPromiseReject() this.hidePromise && this.hidePromiseReject() this.$emit('input', false)
4002b65ae2f79ba3152b84203d22a671e7a03f8f
2024-12-20 19:05:51
Razvan Stoenescu
fix(app-vite/app-webpack): pin down esbuild to 0.24.0 due to compile error
false
pin down esbuild to 0.24.0 due to compile error
fix
diff --git a/app-vite/package.json b/app-vite/package.json index cfbcc67e6ea..454bc916014 100644 --- a/app-vite/package.json +++ b/app-vite/package.json @@ -1,6 +1,6 @@ { "name": "@quasar/app-vite", - "version": "2.0.3", + "version": "2.0.4", "description": "Quasar Framework App CLI with Vite", "bin": { "quasar": "./bin/quasar.js" @@ -99,7 +99,7 @@ "dotenv": "^16.4.5", "dotenv-expand": "^11.0.6", "elementtree": "0.1.7", - "esbuild": "^0.24.0", + "esbuild": "=0.24.0", "express": "^4.21.1", "fs-extra": "^11.2.0", "html-minifier-terser": "^7.2.0", diff --git a/app-webpack/package.json b/app-webpack/package.json index 860ac9a491c..36ac5b6aa00 100644 --- a/app-webpack/package.json +++ b/app-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@quasar/app-webpack", - "version": "4.0.3", + "version": "4.0.4", "description": "Quasar Framework App CLI with Webpack", "bin": { "quasar": "./bin/quasar" @@ -107,7 +107,7 @@ "dotenv-expand": "^11.0.6", "elementtree": "0.1.7", "error-stack-parser": "^2.1.4", - "esbuild": "^0.24.0", + "esbuild": "=0.24.0", "express": "^4.21.1", "file-loader": "^6.2.0", "fs-extra": "^11.2.0",
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
30