@cortezaproject/corteza-vue 2021.9.6-dev.1.1 → 2021.9.6-dev.2
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/dist/components/field/index.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.es.js +954 -332
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +954 -332
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -16,6 +16,7 @@ import hps from 'html-parse-stringify';
|
|
|
16
16
|
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
17
17
|
import { faLock } from '@fortawesome/free-solid-svg-icons';
|
|
18
18
|
import { mapGetters, mapActions } from 'vuex';
|
|
19
|
+
import draggable from 'vuedraggable';
|
|
19
20
|
import pino from 'pino';
|
|
20
21
|
|
|
21
22
|
/* eslint-disable @typescript-eslint/ban-ts-ignore */
|
|
@@ -13948,11 +13949,11 @@ __vue_render__$1._withStripped = true;
|
|
|
13948
13949
|
/* style */
|
|
13949
13950
|
const __vue_inject_styles__$2 = function (inject) {
|
|
13950
13951
|
if (!inject) return
|
|
13951
|
-
inject("data-v-
|
|
13952
|
+
inject("data-v-2f92f970_0", { source: "div[data-v-2f92f970] {\n object-fit: contain;\n}\ndiv img.loaded[data-v-2f92f970] {\n width: auto;\n height: auto;\n display: block;\n}\ndiv.inline img[data-v-2f92f970] {\n cursor: zoom-in;\n}\n\n/*# sourceMappingURL=InlineIMG.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/filePreview/common/types/IMG/InlineIMG.vue","InlineIMG.vue"],"names":[],"mappings":"AAiFA;EACA,mBAAA;AChFA;ADkFA;EACA,WAAA;EACA,YAAA;EACA,cAAA;AChFA;ADoFA;EACA,eAAA;AClFA;;AAEA,wCAAwC","file":"InlineIMG.vue","sourcesContent":["<template>\n <div class=\"inline\">\n <img\n ref=\"image\"\n :key=\"src\"\n :src=\"src\"\n :title=\"title\"\n :alt=\"alt\"\n :class=\"getClass\"\n :style=\"previewStyle\"\n :width=\"getWidth\"\n :height=\"getHeight\"\n @click=\"$emit('openPreview', {})\"\n @error.once=\"reloadBrokenImage\"\n @load=\"loaded=true\"\n >\n </div>\n</template>\n\n<script lang=\"js\">\nimport base from '../base.vue'\n\nexport default {\n extends: base,\n\n props: {\n alt: {\n required: false,\n type: String,\n default: null,\n },\n title: {\n required: false,\n type: String,\n default: null,\n },\n },\n\n data () {\n return {\n loaded: false,\n }\n },\n\n computed: {\n getClass () {\n const rtr = [...this.previewClass]\n if (this.$listeners.click) {\n rtr.push('clickable')\n }\n if (this.loaded) {\n rtr.push('loaded')\n }\n return rtr\n },\n\n getWidth () {\n return this.meta.preview.image.width\n },\n getHeight () {\n return this.meta.preview.image.height\n },\n },\n\n methods: {\n reloadBrokenImage (ev) {\n if (ev.target && ev.target.src) {\n window.setTimeout(() => {\n if (!ev.target && !ev.target.src) return\n\n // This forces Vue to re-try image download\n // eslint-disable-next-line\n ev.target.src = ev.target.src\n }, 500)\n }\n },\n },\n}\n</script>\n\n<style scoped lang=\"scss\">\ndiv {\n object-fit: contain;\n img {\n &.loaded {\n width: auto;\n height: auto;\n display: block;\n }\n }\n &.inline {\n img {\n cursor: zoom-in;\n }\n }\n}\n</style>\n","div {\n object-fit: contain;\n}\ndiv img.loaded {\n width: auto;\n height: auto;\n display: block;\n}\ndiv.inline img {\n cursor: zoom-in;\n}\n\n/*# sourceMappingURL=InlineIMG.vue.map */"]}, media: undefined });
|
|
13952
13953
|
|
|
13953
13954
|
};
|
|
13954
13955
|
/* scoped */
|
|
13955
|
-
const __vue_scope_id__$2 = "data-v-
|
|
13956
|
+
const __vue_scope_id__$2 = "data-v-2f92f970";
|
|
13956
13957
|
/* module identifier */
|
|
13957
13958
|
const __vue_module_identifier__$2 = undefined;
|
|
13958
13959
|
/* functional template */
|
|
@@ -14058,7 +14059,7 @@ __vue_render__$2._withStripped = true;
|
|
|
14058
14059
|
/* style */
|
|
14059
14060
|
const __vue_inject_styles__$3 = function (inject) {
|
|
14060
14061
|
if (!inject) return
|
|
14061
|
-
inject("data-v-
|
|
14062
|
+
inject("data-v-7c2a9272_0", { source: ".popup-img-preview .pswp {\n pointer-events: none;\n}\n.popup-img-preview .pswp .pswp__img {\n pointer-events: all;\n}\n.popup-img-preview .pswp__top-bar {\n display: none !important;\n}\n\n/*# sourceMappingURL=LightboxIMG.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/filePreview/common/types/IMG/LightboxIMG.vue","LightboxIMG.vue"],"names":[],"mappings":"AAoEA;EACA,oBAAA;ACnEA;ADoEA;EACA,mBAAA;AClEA;ADqEA;EACA,wBAAA;ACnEA;;AAEA,0CAA0C","file":"LightboxIMG.vue","sourcesContent":["<template>\n <div class=\"popup-img-preview\">\n <photo-swipe\n :is-open=\"true\"\n :items=\"items\"\n :options=\"options\"\n @close=\"() => $emit('close')\"\n />\n </div>\n</template>\n\n<script lang=\"js\">\nimport { PhotoSwipe } from 'v-photoswipe'\nimport base from '../base.vue'\n\nexport default {\n components: {\n PhotoSwipe,\n },\n\n extends: base,\n\n data () {\n return {\n options: {\n index: 0,\n bgOpacity: 0,\n closeOnScroll: false,\n escKey: false,\n history: false,\n arrowKeys: false,\n modal: false,\n\n closeEl: false,\n captionEl: false,\n fullscreenEl: false,\n zoomEl: false,\n shareEl: false,\n counterEl: false,\n arrowEl: false,\n preloaderEl: false,\n\n clickToCloseNonZoomable: false,\n },\n }\n },\n\n computed: {\n items () {\n const { original, preview } = this.meta\n const image = (original || preview || {}).image\n if (!image) {\n this.$emit('close')\n return []\n }\n\n return [{\n src: this.src,\n w: image.width,\n h: image.height,\n }]\n },\n },\n}\n</script>\n\n<style lang=\"scss\">\n.popup-img-preview {\n .pswp {\n pointer-events: none;\n .pswp__img {\n pointer-events: all;\n }\n }\n .pswp__top-bar {\n display: none!important;\n }\n}\n</style>\n",".popup-img-preview .pswp {\n pointer-events: none;\n}\n.popup-img-preview .pswp .pswp__img {\n pointer-events: all;\n}\n.popup-img-preview .pswp__top-bar {\n display: none !important;\n}\n\n/*# sourceMappingURL=LightboxIMG.vue.map */"]}, media: undefined });
|
|
14062
14063
|
|
|
14063
14064
|
};
|
|
14064
14065
|
/* scoped */
|
|
@@ -70269,12 +70270,12 @@ __vue_render__$3._withStripped = true;
|
|
|
70269
70270
|
/* style */
|
|
70270
70271
|
const __vue_inject_styles__$4 = function (inject) {
|
|
70271
70272
|
if (!inject) return
|
|
70272
|
-
inject("data-v-
|
|
70273
|
-
,inject("data-v-66127e42_1", { source: ".pdf-preview {\n text-align: center;\n}\n.pdf-preview:not(.inline) {\n padding-top: 20px;\n padding-bottom: 20px;\n}\n.pdf-preview:not(.inline) canvas {\n box-shadow: 0 0 3px #1E1E1E41;\n}\n.pdf-preview.inline {\n height: 200px;\n overflow-y: scroll;\n display: inline-block;\n cursor: zoom-in;\n width: 100%;\n max-width: 500px;\n}\n.pdf-preview canvas {\n margin-bottom: 10px;\n}\n.pdf-preview canvas.inline {\n width: 100%;\n}\n.pdf-preview canvas:not(.inline) {\n margin: 0 auto 10px auto;\n display: block;\n}\n.pdf-preview canvas:last-of-type {\n margin-bottom: unset;\n}\n.pdf-preview .loader {\n margin-bottom: 10px;\n}\n\n/*# sourceMappingURL=PDF.vue.map */", map: {"version":3,"sources":["/Users/darh/dev/corteza/vue/src/components/filePreview/common/types/PDF/PDF.vue","PDF.vue"],"names":[],"mappings":"AA+TA;EACA,kBAAA;AC9TA;AD+TA;EACA,iBAAA;EACA,oBAAA;AC7TA;AD8TA;EACA,6BAAA;AC5TA;AD+TA;EACA,aAAA;EACA,kBAAA;EACA,qBAAA;EACA,eAAA;EACA,WAAA;EACA,gBAAA;AC7TA;ADgUA;EACA,mBAAA;AC9TA;AD+TA;EACA,WAAA;AC7TA;ADgUA;EACA,wBAAA;EACA,cAAA;AC9TA;ADiUA;EACA,oBAAA;AC/TA;ADmUA;EACA,mBAAA;ACjUA;;AAEA,kCAAkC","file":"PDF.vue","sourcesContent":["<template>\n <div\n :style=\"previewStyle\"\n :class=\"[...previewClass, 'pdf-preview', inline ? 'inline' : '', $listeners.click ? 'clickable' : '']\"\n @click=\"onPreviewClick\"\n >\n <!-- Container for pdf's pages -->\n <div\n v-show=\"show\"\n ref=\"pages\"\n class=\"pages\"\n />\n\n <div\n v-if=\"loadError\"\n class=\"doc-msg doc-err\"\n >\n <div>\n <h4 class=\"err-message\">\n {{ loadError.message }}\n </h4>\n <p v-if=\"labels.clickToRetry\">\n {{ labels.clickToRetry }}\n </p>\n </div>\n </div>\n <div\n v-else-if=\"!show && labels.loading\"\n class=\"doc-msg doc-err\"\n >\n <p>{{ labels.loading }}</p>\n </div>\n <div\n v-else-if=\"!pageCount && labels.noPages\"\n class=\"doc-msg doc-err\"\n >\n <p>{{ labels.noPages }}</p>\n </div>\n <template v-else>\n <div v-if=\"!inline && labels.downloadForAll && show && hasMore\">\n <p>{{ labels.downloadForAll }}</p>\n </div>\n <div v-else-if=\"inline && labels.firstPagePreview && show\">\n <p>{{ labels.firstPagePreview }}</p>\n </div>\n </template>\n </div>\n</template>\n\n<script lang=\"js\">\nimport pdfjs from 'pdfjs-dist'\nimport pdfjsWorker from 'pdfjs-dist/build/pdf.worker.entry'\nimport base from '../base.vue'\nimport { makePlaceholder, makeFailedPage, Page, Document } from './helpers'\n\npdfjs.GlobalWorkerOptions.workerSrc = pdfjsWorker\n\nfunction sleep (t) {\n return new Promise(resolve => setTimeout(resolve, t))\n}\n\nexport default {\n extends: base,\n\n props: {\n retryBackoff: {\n type: Number,\n required: false,\n default: 300,\n },\n maxRetries: {\n type: Number,\n required: false,\n default: 10,\n },\n\n maxPages: {\n required: false,\n type: Number,\n default: 5,\n },\n\n initialScale: {\n required: false,\n type: Number,\n default: 1,\n },\n },\n\n data () {\n return {\n document: null,\n pages: [],\n show: false,\n loadError: undefined,\n }\n },\n\n computed: {\n /**\n * Helper to provide the number of pages for the given PDF\n * @returns {Number}\n */\n pageCount () {\n if (!this.document || !this.document.pdf) {\n return 0\n }\n return this.document.pdf.numPages\n },\n\n /**\n * Helper to determine if the given PDF has more pages then we are willing to show\n * @returns {Boolean}\n */\n hasMore () {\n return this.maxPages < this.pageCount\n },\n },\n\n created () {\n if (!this.src) {\n this.stdErr(new Error('src.missing'))\n return\n }\n\n this.$nextTick(() => this.init())\n },\n\n methods: {\n /**\n * Helper to handle on preview click. It either requests a retry or\n * emits an open event\n */\n onPreviewClick () {\n if (this.loadError) {\n this.init()\n } else {\n this.$emit('openPreview', { document: this.document })\n }\n },\n\n /**\n * Initializes the state, loads the document & renderes it's pages\n */\n async init () {\n this.document = null\n this.pages = []\n this.show = false\n this.loadError = undefined\n\n return this.loadDocument(this.src)\n .then(this.renderDocument)\n .catch(this.stdErr)\n },\n\n /**\n * Helper method to load the given document. Needed for test stubbing\n * @param {String} src Document's src\n * @returns {Promise<PDFDocumentProxy>}\n */\n async pdfjsLoad (src) {\n return pdfjs.getDocument(src).promise\n },\n\n /**\n * Loads the given PDF. It can load it from API or re-use existing document\n * @param {Document|String} src PDF's source or a Document object\n * @returns {Document}\n */\n async loadDocument (src) {\n if (src instanceof Document) {\n this.document = new Document({ ...src, scale: this.initialScale })\n } else if (typeof src === 'string') {\n let retries = 0\n let err\n const pdfl = async () => {\n return sleep(retries * this.retryBackoff)\n .then(() => this.pdfjsLoad(src))\n .then(pdf => {\n this.document = new Document({ pdf, src, scale: this.initialScale })\n })\n }\n\n // Retry with backoff it it fails to load\n while (!this.document && retries < this.maxRetries) {\n await pdfl().catch(e => {\n retries++\n err = e\n })\n }\n\n if (!this.document) {\n throw err\n }\n } else {\n throw new Error('src.notValid')\n }\n return this.document\n },\n\n /**\n * Renders the given PDF\n * @param {Document} doc The Document to render\n * @return {Promise<undefined>}\n */\n async renderDocument (doc) {\n const rf = this.$refs.pages\n\n const pgCount = Math.min(this.pageCount, this.maxPages)\n this.pages = [...new Array(pgCount)].map((_, i) => new Page({ index: i }))\n\n if (pgCount <= 0) {\n this.show = true\n return\n }\n\n // Loadup pages\n for (let i = 0; i < pgCount; i++) {\n const node = makePlaceholder(this.labels)\n rf.appendChild(node)\n this.pages.splice(i, 1, new Page({ ...this.pages[i], node, loading: true }))\n\n this.renderPage(this.pages[i], doc, rf)\n .then(page => {\n this.pages.splice(page.index, 1, page)\n\n if (page.index === 0) {\n this.show = true\n }\n })\n .catch(this.stdErr)\n }\n },\n\n /**\n * Renders the given page\n * @param {Page} page The page in question\n * @param {Document} doc Page source\n * @param {Node} rf PDF container\n * @returns {Promise<undefined>}\n */\n async renderPage (page, doc, rf) {\n // pdfjs starts with 1!\n return doc.pdf.getPage(page.index + 1).then(p => {\n const np = new Page(page)\n np.loading = false\n np.loaded = true\n np.page = p\n\n // Render page\n const canvas = document.createElement('canvas')\n const scale = doc.scale\n const viewport = np.page.getViewport(scale)\n const canvasContext = canvas.getContext('2d')\n const renderContext = { canvasContext, viewport }\n canvas.height = viewport.height\n canvas.width = viewport.width\n\n return np.page.render(renderContext).then(() => {\n np.node = canvas\n np.rendered = true\n if (this.inline) {\n canvas.classList.add('inline')\n }\n return np\n })\n\n .catch(() => {\n const node = makeFailedPage(this.labels)\n np.node = node\n np.rendered = false\n np.failed = true\n return np\n })\n\n .then(np => {\n rf.replaceChild(np.node, page.node)\n return np\n })\n })\n },\n\n /**\n * Standard error handler\n * @param {Error} err The error\n */\n stdErr (err) {\n this.loadError = err\n this.$emit('error', err)\n },\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n$white: white !default;\n$danger: red !default;\n\n.doc-msg {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n background-color: $white;\n}\n.doc-err {\n cursor: pointer;\n\n .err-message {\n color: $danger;\n }\n}\n\n</style>\n\n<style lang=\"scss\">\n// Style not scoped, since pages are manually rendered\n\n.pdf-preview {\n text-align: center;\n &:not(.inline) {\n padding-top: 20px;\n padding-bottom: 20px;\n canvas {\n box-shadow: 0 0 3px #1E1E1E41;\n }\n }\n &.inline {\n height: 200px;\n overflow-y: scroll;\n display: inline-block;\n cursor: zoom-in;\n width: 100%;\n max-width: 500px;\n }\n\n canvas {\n margin-bottom: 10px;\n &.inline {\n width: 100%;\n }\n\n &:not(.inline) {\n margin: 0 auto 10px auto;\n display: block;\n }\n\n &:last-of-type {\n margin-bottom: unset;\n }\n }\n\n .loader {\n margin-bottom: 10px;\n }\n}\n\n</style>\n",".pdf-preview {\n text-align: center;\n}\n.pdf-preview:not(.inline) {\n padding-top: 20px;\n padding-bottom: 20px;\n}\n.pdf-preview:not(.inline) canvas {\n box-shadow: 0 0 3px #1E1E1E41;\n}\n.pdf-preview.inline {\n height: 200px;\n overflow-y: scroll;\n display: inline-block;\n cursor: zoom-in;\n width: 100%;\n max-width: 500px;\n}\n.pdf-preview canvas {\n margin-bottom: 10px;\n}\n.pdf-preview canvas.inline {\n width: 100%;\n}\n.pdf-preview canvas:not(.inline) {\n margin: 0 auto 10px auto;\n display: block;\n}\n.pdf-preview canvas:last-of-type {\n margin-bottom: unset;\n}\n.pdf-preview .loader {\n margin-bottom: 10px;\n}\n\n/*# sourceMappingURL=PDF.vue.map */"]}, media: undefined });
|
|
70273
|
+
inject("data-v-0e0b6952_0", { source: ".doc-msg[data-v-0e0b6952] {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n background-color: white;\n}\n.doc-err[data-v-0e0b6952] {\n cursor: pointer;\n}\n.doc-err .err-message[data-v-0e0b6952] {\n color: red;\n}\n\n/*# sourceMappingURL=PDF.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/filePreview/common/types/PDF/PDF.vue","PDF.vue"],"names":[],"mappings":"AA0SA;EACA,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,YAAA;EACA,WAAA;EACA,uBATA;AChSA;AD2SA;EACA,eAAA;ACxSA;AD0SA;EACA,UAdA;AC1RA;;AAEA,kCAAkC","file":"PDF.vue","sourcesContent":["<template>\n <div\n :style=\"previewStyle\"\n :class=\"[...previewClass, 'pdf-preview', inline ? 'inline' : '', $listeners.click ? 'clickable' : '']\"\n @click=\"onPreviewClick\"\n >\n <!-- Container for pdf's pages -->\n <div\n v-show=\"show\"\n ref=\"pages\"\n class=\"pages\"\n />\n\n <div\n v-if=\"loadError\"\n class=\"doc-msg doc-err\"\n >\n <div>\n <h4 class=\"err-message\">\n {{ loadError.message }}\n </h4>\n <p v-if=\"labels.clickToRetry\">\n {{ labels.clickToRetry }}\n </p>\n </div>\n </div>\n <div\n v-else-if=\"!show && labels.loading\"\n class=\"doc-msg doc-err\"\n >\n <p>{{ labels.loading }}</p>\n </div>\n <div\n v-else-if=\"!pageCount && labels.noPages\"\n class=\"doc-msg doc-err\"\n >\n <p>{{ labels.noPages }}</p>\n </div>\n <template v-else>\n <div v-if=\"!inline && labels.downloadForAll && show && hasMore\">\n <p>{{ labels.downloadForAll }}</p>\n </div>\n <div v-else-if=\"inline && labels.firstPagePreview && show\">\n <p>{{ labels.firstPagePreview }}</p>\n </div>\n </template>\n </div>\n</template>\n\n<script lang=\"js\">\nimport pdfjs from 'pdfjs-dist'\nimport pdfjsWorker from 'pdfjs-dist/build/pdf.worker.entry'\nimport base from '../base.vue'\nimport { makePlaceholder, makeFailedPage, Page, Document } from './helpers'\n\npdfjs.GlobalWorkerOptions.workerSrc = pdfjsWorker\n\nfunction sleep (t) {\n return new Promise(resolve => setTimeout(resolve, t))\n}\n\nexport default {\n extends: base,\n\n props: {\n retryBackoff: {\n type: Number,\n required: false,\n default: 300,\n },\n maxRetries: {\n type: Number,\n required: false,\n default: 10,\n },\n\n maxPages: {\n required: false,\n type: Number,\n default: 5,\n },\n\n initialScale: {\n required: false,\n type: Number,\n default: 1,\n },\n },\n\n data () {\n return {\n document: null,\n pages: [],\n show: false,\n loadError: undefined,\n }\n },\n\n computed: {\n /**\n * Helper to provide the number of pages for the given PDF\n * @returns {Number}\n */\n pageCount () {\n if (!this.document || !this.document.pdf) {\n return 0\n }\n return this.document.pdf.numPages\n },\n\n /**\n * Helper to determine if the given PDF has more pages then we are willing to show\n * @returns {Boolean}\n */\n hasMore () {\n return this.maxPages < this.pageCount\n },\n },\n\n created () {\n if (!this.src) {\n this.stdErr(new Error('src.missing'))\n return\n }\n\n this.$nextTick(() => this.init())\n },\n\n methods: {\n /**\n * Helper to handle on preview click. It either requests a retry or\n * emits an open event\n */\n onPreviewClick () {\n if (this.loadError) {\n this.init()\n } else {\n this.$emit('openPreview', { document: this.document })\n }\n },\n\n /**\n * Initializes the state, loads the document & renderes it's pages\n */\n async init () {\n this.document = null\n this.pages = []\n this.show = false\n this.loadError = undefined\n\n return this.loadDocument(this.src)\n .then(this.renderDocument)\n .catch(this.stdErr)\n },\n\n /**\n * Helper method to load the given document. Needed for test stubbing\n * @param {String} src Document's src\n * @returns {Promise<PDFDocumentProxy>}\n */\n async pdfjsLoad (src) {\n return pdfjs.getDocument(src).promise\n },\n\n /**\n * Loads the given PDF. It can load it from API or re-use existing document\n * @param {Document|String} src PDF's source or a Document object\n * @returns {Document}\n */\n async loadDocument (src) {\n if (src instanceof Document) {\n this.document = new Document({ ...src, scale: this.initialScale })\n } else if (typeof src === 'string') {\n let retries = 0\n let err\n const pdfl = async () => {\n return sleep(retries * this.retryBackoff)\n .then(() => this.pdfjsLoad(src))\n .then(pdf => {\n this.document = new Document({ pdf, src, scale: this.initialScale })\n })\n }\n\n // Retry with backoff it it fails to load\n while (!this.document && retries < this.maxRetries) {\n await pdfl().catch(e => {\n retries++\n err = e\n })\n }\n\n if (!this.document) {\n throw err\n }\n } else {\n throw new Error('src.notValid')\n }\n return this.document\n },\n\n /**\n * Renders the given PDF\n * @param {Document} doc The Document to render\n * @return {Promise<undefined>}\n */\n async renderDocument (doc) {\n const rf = this.$refs.pages\n\n const pgCount = Math.min(this.pageCount, this.maxPages)\n this.pages = [...new Array(pgCount)].map((_, i) => new Page({ index: i }))\n\n if (pgCount <= 0) {\n this.show = true\n return\n }\n\n // Loadup pages\n for (let i = 0; i < pgCount; i++) {\n const node = makePlaceholder(this.labels)\n rf.appendChild(node)\n this.pages.splice(i, 1, new Page({ ...this.pages[i], node, loading: true }))\n\n this.renderPage(this.pages[i], doc, rf)\n .then(page => {\n this.pages.splice(page.index, 1, page)\n\n if (page.index === 0) {\n this.show = true\n }\n })\n .catch(this.stdErr)\n }\n },\n\n /**\n * Renders the given page\n * @param {Page} page The page in question\n * @param {Document} doc Page source\n * @param {Node} rf PDF container\n * @returns {Promise<undefined>}\n */\n async renderPage (page, doc, rf) {\n // pdfjs starts with 1!\n return doc.pdf.getPage(page.index + 1).then(p => {\n const np = new Page(page)\n np.loading = false\n np.loaded = true\n np.page = p\n\n // Render page\n const canvas = document.createElement('canvas')\n const scale = doc.scale\n const viewport = np.page.getViewport(scale)\n const canvasContext = canvas.getContext('2d')\n const renderContext = { canvasContext, viewport }\n canvas.height = viewport.height\n canvas.width = viewport.width\n\n return np.page.render(renderContext).then(() => {\n np.node = canvas\n np.rendered = true\n if (this.inline) {\n canvas.classList.add('inline')\n }\n return np\n })\n\n .catch(() => {\n const node = makeFailedPage(this.labels)\n np.node = node\n np.rendered = false\n np.failed = true\n return np\n })\n\n .then(np => {\n rf.replaceChild(np.node, page.node)\n return np\n })\n })\n },\n\n /**\n * Standard error handler\n * @param {Error} err The error\n */\n stdErr (err) {\n this.loadError = err\n this.$emit('error', err)\n },\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n$white: white !default;\n$danger: red !default;\n\n.doc-msg {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n background-color: $white;\n}\n.doc-err {\n cursor: pointer;\n\n .err-message {\n color: $danger;\n }\n}\n\n</style>\n\n<style lang=\"scss\">\n// Style not scoped, since pages are manually rendered\n\n.pdf-preview {\n text-align: center;\n &:not(.inline) {\n padding-top: 20px;\n padding-bottom: 20px;\n canvas {\n box-shadow: 0 0 3px #1E1E1E41;\n }\n }\n &.inline {\n height: 200px;\n overflow-y: scroll;\n display: inline-block;\n cursor: zoom-in;\n width: 100%;\n max-width: 500px;\n }\n\n canvas {\n margin-bottom: 10px;\n &.inline {\n width: 100%;\n }\n\n &:not(.inline) {\n margin: 0 auto 10px auto;\n display: block;\n }\n\n &:last-of-type {\n margin-bottom: unset;\n }\n }\n\n .loader {\n margin-bottom: 10px;\n }\n}\n\n</style>\n",".doc-msg {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n background-color: white;\n}\n\n.doc-err {\n cursor: pointer;\n}\n.doc-err .err-message {\n color: red;\n}\n\n/*# sourceMappingURL=PDF.vue.map */"]}, media: undefined })
|
|
70274
|
+
,inject("data-v-0e0b6952_1", { source: ".pdf-preview {\n text-align: center;\n}\n.pdf-preview:not(.inline) {\n padding-top: 20px;\n padding-bottom: 20px;\n}\n.pdf-preview:not(.inline) canvas {\n box-shadow: 0 0 3px #1E1E1E41;\n}\n.pdf-preview.inline {\n height: 200px;\n overflow-y: scroll;\n display: inline-block;\n cursor: zoom-in;\n width: 100%;\n max-width: 500px;\n}\n.pdf-preview canvas {\n margin-bottom: 10px;\n}\n.pdf-preview canvas.inline {\n width: 100%;\n}\n.pdf-preview canvas:not(.inline) {\n margin: 0 auto 10px auto;\n display: block;\n}\n.pdf-preview canvas:last-of-type {\n margin-bottom: unset;\n}\n.pdf-preview .loader {\n margin-bottom: 10px;\n}\n\n/*# sourceMappingURL=PDF.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/filePreview/common/types/PDF/PDF.vue","PDF.vue"],"names":[],"mappings":"AA+TA;EACA,kBAAA;AC9TA;AD+TA;EACA,iBAAA;EACA,oBAAA;AC7TA;AD8TA;EACA,6BAAA;AC5TA;AD+TA;EACA,aAAA;EACA,kBAAA;EACA,qBAAA;EACA,eAAA;EACA,WAAA;EACA,gBAAA;AC7TA;ADgUA;EACA,mBAAA;AC9TA;AD+TA;EACA,WAAA;AC7TA;ADgUA;EACA,wBAAA;EACA,cAAA;AC9TA;ADiUA;EACA,oBAAA;AC/TA;ADmUA;EACA,mBAAA;ACjUA;;AAEA,kCAAkC","file":"PDF.vue","sourcesContent":["<template>\n <div\n :style=\"previewStyle\"\n :class=\"[...previewClass, 'pdf-preview', inline ? 'inline' : '', $listeners.click ? 'clickable' : '']\"\n @click=\"onPreviewClick\"\n >\n <!-- Container for pdf's pages -->\n <div\n v-show=\"show\"\n ref=\"pages\"\n class=\"pages\"\n />\n\n <div\n v-if=\"loadError\"\n class=\"doc-msg doc-err\"\n >\n <div>\n <h4 class=\"err-message\">\n {{ loadError.message }}\n </h4>\n <p v-if=\"labels.clickToRetry\">\n {{ labels.clickToRetry }}\n </p>\n </div>\n </div>\n <div\n v-else-if=\"!show && labels.loading\"\n class=\"doc-msg doc-err\"\n >\n <p>{{ labels.loading }}</p>\n </div>\n <div\n v-else-if=\"!pageCount && labels.noPages\"\n class=\"doc-msg doc-err\"\n >\n <p>{{ labels.noPages }}</p>\n </div>\n <template v-else>\n <div v-if=\"!inline && labels.downloadForAll && show && hasMore\">\n <p>{{ labels.downloadForAll }}</p>\n </div>\n <div v-else-if=\"inline && labels.firstPagePreview && show\">\n <p>{{ labels.firstPagePreview }}</p>\n </div>\n </template>\n </div>\n</template>\n\n<script lang=\"js\">\nimport pdfjs from 'pdfjs-dist'\nimport pdfjsWorker from 'pdfjs-dist/build/pdf.worker.entry'\nimport base from '../base.vue'\nimport { makePlaceholder, makeFailedPage, Page, Document } from './helpers'\n\npdfjs.GlobalWorkerOptions.workerSrc = pdfjsWorker\n\nfunction sleep (t) {\n return new Promise(resolve => setTimeout(resolve, t))\n}\n\nexport default {\n extends: base,\n\n props: {\n retryBackoff: {\n type: Number,\n required: false,\n default: 300,\n },\n maxRetries: {\n type: Number,\n required: false,\n default: 10,\n },\n\n maxPages: {\n required: false,\n type: Number,\n default: 5,\n },\n\n initialScale: {\n required: false,\n type: Number,\n default: 1,\n },\n },\n\n data () {\n return {\n document: null,\n pages: [],\n show: false,\n loadError: undefined,\n }\n },\n\n computed: {\n /**\n * Helper to provide the number of pages for the given PDF\n * @returns {Number}\n */\n pageCount () {\n if (!this.document || !this.document.pdf) {\n return 0\n }\n return this.document.pdf.numPages\n },\n\n /**\n * Helper to determine if the given PDF has more pages then we are willing to show\n * @returns {Boolean}\n */\n hasMore () {\n return this.maxPages < this.pageCount\n },\n },\n\n created () {\n if (!this.src) {\n this.stdErr(new Error('src.missing'))\n return\n }\n\n this.$nextTick(() => this.init())\n },\n\n methods: {\n /**\n * Helper to handle on preview click. It either requests a retry or\n * emits an open event\n */\n onPreviewClick () {\n if (this.loadError) {\n this.init()\n } else {\n this.$emit('openPreview', { document: this.document })\n }\n },\n\n /**\n * Initializes the state, loads the document & renderes it's pages\n */\n async init () {\n this.document = null\n this.pages = []\n this.show = false\n this.loadError = undefined\n\n return this.loadDocument(this.src)\n .then(this.renderDocument)\n .catch(this.stdErr)\n },\n\n /**\n * Helper method to load the given document. Needed for test stubbing\n * @param {String} src Document's src\n * @returns {Promise<PDFDocumentProxy>}\n */\n async pdfjsLoad (src) {\n return pdfjs.getDocument(src).promise\n },\n\n /**\n * Loads the given PDF. It can load it from API or re-use existing document\n * @param {Document|String} src PDF's source or a Document object\n * @returns {Document}\n */\n async loadDocument (src) {\n if (src instanceof Document) {\n this.document = new Document({ ...src, scale: this.initialScale })\n } else if (typeof src === 'string') {\n let retries = 0\n let err\n const pdfl = async () => {\n return sleep(retries * this.retryBackoff)\n .then(() => this.pdfjsLoad(src))\n .then(pdf => {\n this.document = new Document({ pdf, src, scale: this.initialScale })\n })\n }\n\n // Retry with backoff it it fails to load\n while (!this.document && retries < this.maxRetries) {\n await pdfl().catch(e => {\n retries++\n err = e\n })\n }\n\n if (!this.document) {\n throw err\n }\n } else {\n throw new Error('src.notValid')\n }\n return this.document\n },\n\n /**\n * Renders the given PDF\n * @param {Document} doc The Document to render\n * @return {Promise<undefined>}\n */\n async renderDocument (doc) {\n const rf = this.$refs.pages\n\n const pgCount = Math.min(this.pageCount, this.maxPages)\n this.pages = [...new Array(pgCount)].map((_, i) => new Page({ index: i }))\n\n if (pgCount <= 0) {\n this.show = true\n return\n }\n\n // Loadup pages\n for (let i = 0; i < pgCount; i++) {\n const node = makePlaceholder(this.labels)\n rf.appendChild(node)\n this.pages.splice(i, 1, new Page({ ...this.pages[i], node, loading: true }))\n\n this.renderPage(this.pages[i], doc, rf)\n .then(page => {\n this.pages.splice(page.index, 1, page)\n\n if (page.index === 0) {\n this.show = true\n }\n })\n .catch(this.stdErr)\n }\n },\n\n /**\n * Renders the given page\n * @param {Page} page The page in question\n * @param {Document} doc Page source\n * @param {Node} rf PDF container\n * @returns {Promise<undefined>}\n */\n async renderPage (page, doc, rf) {\n // pdfjs starts with 1!\n return doc.pdf.getPage(page.index + 1).then(p => {\n const np = new Page(page)\n np.loading = false\n np.loaded = true\n np.page = p\n\n // Render page\n const canvas = document.createElement('canvas')\n const scale = doc.scale\n const viewport = np.page.getViewport(scale)\n const canvasContext = canvas.getContext('2d')\n const renderContext = { canvasContext, viewport }\n canvas.height = viewport.height\n canvas.width = viewport.width\n\n return np.page.render(renderContext).then(() => {\n np.node = canvas\n np.rendered = true\n if (this.inline) {\n canvas.classList.add('inline')\n }\n return np\n })\n\n .catch(() => {\n const node = makeFailedPage(this.labels)\n np.node = node\n np.rendered = false\n np.failed = true\n return np\n })\n\n .then(np => {\n rf.replaceChild(np.node, page.node)\n return np\n })\n })\n },\n\n /**\n * Standard error handler\n * @param {Error} err The error\n */\n stdErr (err) {\n this.loadError = err\n this.$emit('error', err)\n },\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n$white: white !default;\n$danger: red !default;\n\n.doc-msg {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n background-color: $white;\n}\n.doc-err {\n cursor: pointer;\n\n .err-message {\n color: $danger;\n }\n}\n\n</style>\n\n<style lang=\"scss\">\n// Style not scoped, since pages are manually rendered\n\n.pdf-preview {\n text-align: center;\n &:not(.inline) {\n padding-top: 20px;\n padding-bottom: 20px;\n canvas {\n box-shadow: 0 0 3px #1E1E1E41;\n }\n }\n &.inline {\n height: 200px;\n overflow-y: scroll;\n display: inline-block;\n cursor: zoom-in;\n width: 100%;\n max-width: 500px;\n }\n\n canvas {\n margin-bottom: 10px;\n &.inline {\n width: 100%;\n }\n\n &:not(.inline) {\n margin: 0 auto 10px auto;\n display: block;\n }\n\n &:last-of-type {\n margin-bottom: unset;\n }\n }\n\n .loader {\n margin-bottom: 10px;\n }\n}\n\n</style>\n",".pdf-preview {\n text-align: center;\n}\n.pdf-preview:not(.inline) {\n padding-top: 20px;\n padding-bottom: 20px;\n}\n.pdf-preview:not(.inline) canvas {\n box-shadow: 0 0 3px #1E1E1E41;\n}\n.pdf-preview.inline {\n height: 200px;\n overflow-y: scroll;\n display: inline-block;\n cursor: zoom-in;\n width: 100%;\n max-width: 500px;\n}\n.pdf-preview canvas {\n margin-bottom: 10px;\n}\n.pdf-preview canvas.inline {\n width: 100%;\n}\n.pdf-preview canvas:not(.inline) {\n margin: 0 auto 10px auto;\n display: block;\n}\n.pdf-preview canvas:last-of-type {\n margin-bottom: unset;\n}\n.pdf-preview .loader {\n margin-bottom: 10px;\n}\n\n/*# sourceMappingURL=PDF.vue.map */"]}, media: undefined });
|
|
70274
70275
|
|
|
70275
70276
|
};
|
|
70276
70277
|
/* scoped */
|
|
70277
|
-
const __vue_scope_id__$4 = "data-v-
|
|
70278
|
+
const __vue_scope_id__$4 = "data-v-0e0b6952";
|
|
70278
70279
|
/* module identifier */
|
|
70279
70280
|
const __vue_module_identifier__$4 = undefined;
|
|
70280
70281
|
/* functional template */
|
|
@@ -70341,11 +70342,11 @@ __vue_render__$4._withStripped = true;
|
|
|
70341
70342
|
/* style */
|
|
70342
70343
|
const __vue_inject_styles__$5 = function (inject) {
|
|
70343
70344
|
if (!inject) return
|
|
70344
|
-
inject("data-v-
|
|
70345
|
+
inject("data-v-5950f2a0_0", { source: "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* Temporary style; update when messaging is updated with bootstrap */\n.lightbox[data-v-5950f2a0] {\n position: fixed;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n\n background-color: #EEF1F3;\n z-index: 2000;\n}\n.lightbox header[data-v-5950f2a0] {\n display: flex;\n justify-content: space-between;\n background-color: #FFFFFF;\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n box-shadow: 0 0 3px #1E1E1E41;\n z-index: 1000;\n height: 50px;\n}\n.lightbox header .left[data-v-5950f2a0] {\n margin-left: 10px;\n}\n.lightbox header .right[data-v-5950f2a0] {\n margin-right: 10px;\n}\n.lightbox header > div[data-v-5950f2a0] {\n display: flex;\n align-items: center;\n}\n.lightbox main[data-v-5950f2a0] {\n position: absolute;\n top: 50px;\n left: 0;\n right: 0;\n bottom: 0;\n overflow-y: scroll;\n z-index: 1;\n}\n.lightbox header button[data-v-5950f2a0] {\n background-color: transparent;\n border: none;\n outline: none;\n font-size: 25px;\n font-weight: bold;\n margin: 10px;\n cursor: pointer;\n box-sizing: border-box;\n}\n.lightbox header button[data-v-5950f2a0]:last-of-type {\n margin-right: 0;\n}\n\n", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/lightbox/CLightbox.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,qEAAA;AAEA;EACA,eAAA;EACA,OAAA;EACA,MAAA;EACA,QAAA;EACA,SAAA;;EAEA,yBAAA;EACA,aAAA;AACA;AAEA;EACA,aAAA;EACA,8BAAA;EACA,yBAAA;EACA,kBAAA;EACA,OAAA;EACA,MAAA;EACA,QAAA;EACA,6BAAA;EACA,aAAA;EACA,YAAA;AACA;AAEA;EACA,iBAAA;AACA;AACA;EACA,kBAAA;AACA;AAEA;EACA,aAAA;EACA,mBAAA;AACA;AAEA;EACA,kBAAA;EACA,SAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;EACA,kBAAA;EACA,UAAA;AACA;AAEA;EACA,6BAAA;EACA,YAAA;EACA,aAAA;EACA,eAAA;EACA,iBAAA;EACA,YAAA;EACA,eAAA;EACA,sBAAA;AACA;AAEA;EACA,eAAA;AACA","file":"CLightbox.vue","sourcesContent":["<template>\n <div class=\"lightbox\">\n <header>\n <div class=\"left\">\n <slot name=\"header.left\" />\n </div>\n <div class=\"right\">\n <slot name=\"header.right\" />\n <button\n class=\"closer\"\n @click=\"$emit('close')\"\n >\n ×\n </button>\n </div>\n </header>\n <main>\n <slot name=\"main\" />\n </main>\n </div>\n</template>\n\n<style scoped>\n/* Temporary style; update when messaging is updated with bootstrap */\n\n.lightbox {\n position: fixed;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n\n background-color: #EEF1F3;\n z-index: 2000;\n}\n\n.lightbox header {\n display: flex;\n justify-content: space-between;\n background-color: #FFFFFF;\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n box-shadow: 0 0 3px #1E1E1E41;\n z-index: 1000;\n height: 50px;\n}\n\n.lightbox header .left {\n margin-left: 10px;\n}\n.lightbox header .right {\n margin-right: 10px;\n}\n\n.lightbox header > div {\n display: flex;\n align-items: center;\n}\n\n.lightbox main {\n position: absolute;\n top: 50px;\n left: 0;\n right: 0;\n bottom: 0;\n overflow-y: scroll;\n z-index: 1;\n}\n\n.lightbox header button {\n background-color: transparent;\n border: none;\n outline: none;\n font-size: 25px;\n font-weight: bold;\n margin: 10px;\n cursor: pointer;\n box-sizing: border-box;\n}\n\n.lightbox header button:last-of-type {\n margin-right: 0;\n}\n\n</style>\n"]}, media: undefined });
|
|
70345
70346
|
|
|
70346
70347
|
};
|
|
70347
70348
|
/* scoped */
|
|
70348
|
-
const __vue_scope_id__$5 = "data-v-
|
|
70349
|
+
const __vue_scope_id__$5 = "data-v-5950f2a0";
|
|
70349
70350
|
/* module identifier */
|
|
70350
70351
|
const __vue_module_identifier__$5 = undefined;
|
|
70351
70352
|
/* functional template */
|
|
@@ -71343,6 +71344,10 @@ var script$d = {
|
|
|
71343
71344
|
type: Function,
|
|
71344
71345
|
required: false,
|
|
71345
71346
|
default: () => {}
|
|
71347
|
+
},
|
|
71348
|
+
currentValue: {
|
|
71349
|
+
type: String,
|
|
71350
|
+
required: false
|
|
71346
71351
|
}
|
|
71347
71352
|
},
|
|
71348
71353
|
methods: {
|
|
@@ -71489,12 +71494,12 @@ __vue_render__$b._withStripped = true;
|
|
|
71489
71494
|
/* style */
|
|
71490
71495
|
const __vue_inject_styles__$f = function (inject) {
|
|
71491
71496
|
if (!inject) return
|
|
71492
|
-
inject("data-v-
|
|
71493
|
-
,inject("data-v-
|
|
71497
|
+
inject("data-v-bfd7c2ee_0", { source: ".icon[data-v-bfd7c2ee] {\n padding: 0 2px;\n}\n.icon.color-icon[data-v-bfd7c2ee] {\n border-bottom: 1px solid black;\n}\n.icon.background-icon[data-v-bfd7c2ee] {\n background-color: rgba(0, 0, 0, 0.07);\n padding: 2px 3px;\n}\n\n/*# sourceMappingURL=Color.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/input/CRichTextInput/RToolbar/TMark/Color.vue","Color.vue"],"names":[],"mappings":"AA8DA;EACA,cAAA;AC7DA;AD+DA;EACA,8BAAA;AC7DA;ADgEA;EACA,qCAAA;EACA,gBAAA;AC9DA;;AAEA,oCAAoC","file":"Color.vue","sourcesContent":["<template>\n <div>\n <b-button\n variant=\"link\"\n class=\"text-dark font-weight-bold text-decoration-none\"\n :id=\"`color-popover-${format.type}`\">\n\n <span\n class=\"icon\"\n :class=\"typeStyle\">A</span>\n\n </b-button>\n\n <b-popover\n :delay=\"0\"\n no-fade\n custom-class=\"tcl-popover\"\n triggers=\"focus\"\n :target=\"`color-popover-${format.type}`\"\n placement=\"bottom\"\n :container=\"null\"\n ref=\"popover\">\n\n <swatches\n swatch-size=\"14\"\n colors=\"text-advanced\"\n @input=\"onClick(format.type, { color: $event })\"\n inline />\n\n </b-popover>\n </div>\n</template>\n\n<script>\nimport base from './base.vue'\nimport Swatches from 'vue-swatches'\nimport 'vue-swatches/dist/vue-swatches.min.css'\n\n/**\n * Component is used to display link formatters. It provides an interface to\n * input the URL that should be applied.\n */\nexport default {\n name: 't-mark-color',\n\n components: {\n Swatches,\n },\n extends: base,\n\n computed: {\n typeStyle () {\n return `${this.format.type}-icon`\n },\n },\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n// Since we don't have icons for color related formatters,\n// this extra styling makes up for that\n.icon {\n padding: 0 2px;\n\n &.color-icon {\n border-bottom: 1px solid black;\n }\n\n &.background-icon {\n background-color: rgba(black, 0.07);\n padding: 2px 3px;\n }\n}\n</style>\n\n<style lang=\"scss\">\n// Bootstrap popover doesn't provide a way to style it's body component\n// Can't be scoped, since it's not rendered in here\n.tcl-popover .popover-body {\n padding: 0 !important;\n}\n</style>\n",".icon {\n padding: 0 2px;\n}\n.icon.color-icon {\n border-bottom: 1px solid black;\n}\n.icon.background-icon {\n background-color: rgba(0, 0, 0, 0.07);\n padding: 2px 3px;\n}\n\n/*# sourceMappingURL=Color.vue.map */"]}, media: undefined })
|
|
71498
|
+
,inject("data-v-bfd7c2ee_1", { source: ".tcl-popover .popover-body {\n padding: 0 !important;\n}\n\n/*# sourceMappingURL=Color.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/input/CRichTextInput/RToolbar/TMark/Color.vue","Color.vue"],"names":[],"mappings":"AA+EA;EACA,qBAAA;AC9EA;;AAEA,oCAAoC","file":"Color.vue","sourcesContent":["<template>\n <div>\n <b-button\n variant=\"link\"\n class=\"text-dark font-weight-bold text-decoration-none\"\n :id=\"`color-popover-${format.type}`\">\n\n <span\n class=\"icon\"\n :class=\"typeStyle\">A</span>\n\n </b-button>\n\n <b-popover\n :delay=\"0\"\n no-fade\n custom-class=\"tcl-popover\"\n triggers=\"focus\"\n :target=\"`color-popover-${format.type}`\"\n placement=\"bottom\"\n :container=\"null\"\n ref=\"popover\">\n\n <swatches\n swatch-size=\"14\"\n colors=\"text-advanced\"\n @input=\"onClick(format.type, { color: $event })\"\n inline />\n\n </b-popover>\n </div>\n</template>\n\n<script>\nimport base from './base.vue'\nimport Swatches from 'vue-swatches'\nimport 'vue-swatches/dist/vue-swatches.min.css'\n\n/**\n * Component is used to display link formatters. It provides an interface to\n * input the URL that should be applied.\n */\nexport default {\n name: 't-mark-color',\n\n components: {\n Swatches,\n },\n extends: base,\n\n computed: {\n typeStyle () {\n return `${this.format.type}-icon`\n },\n },\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n// Since we don't have icons for color related formatters,\n// this extra styling makes up for that\n.icon {\n padding: 0 2px;\n\n &.color-icon {\n border-bottom: 1px solid black;\n }\n\n &.background-icon {\n background-color: rgba(black, 0.07);\n padding: 2px 3px;\n }\n}\n</style>\n\n<style lang=\"scss\">\n// Bootstrap popover doesn't provide a way to style it's body component\n// Can't be scoped, since it's not rendered in here\n.tcl-popover .popover-body {\n padding: 0 !important;\n}\n</style>\n",".tcl-popover .popover-body {\n padding: 0 !important;\n}\n\n/*# sourceMappingURL=Color.vue.map */"]}, media: undefined });
|
|
71494
71499
|
|
|
71495
71500
|
};
|
|
71496
71501
|
/* scoped */
|
|
71497
|
-
const __vue_scope_id__$f = "data-v-
|
|
71502
|
+
const __vue_scope_id__$f = "data-v-bfd7c2ee";
|
|
71498
71503
|
/* module identifier */
|
|
71499
71504
|
const __vue_module_identifier__$f = undefined;
|
|
71500
71505
|
/* functional template */
|
|
@@ -71640,9 +71645,11 @@ var script$g = {
|
|
|
71640
71645
|
* Helper to show the popup & determine if a link already exists
|
|
71641
71646
|
*/
|
|
71642
71647
|
showPopover() {
|
|
71643
|
-
this.
|
|
71644
|
-
|
|
71645
|
-
|
|
71648
|
+
if (this.currentValue) {
|
|
71649
|
+
this.visible = true;
|
|
71650
|
+
this.attrs = { ...this.getMarkAttrs(this.format.type)
|
|
71651
|
+
};
|
|
71652
|
+
}
|
|
71646
71653
|
},
|
|
71647
71654
|
|
|
71648
71655
|
/**
|
|
@@ -71693,89 +71700,101 @@ var __vue_render__$d = function() {
|
|
|
71693
71700
|
]
|
|
71694
71701
|
),
|
|
71695
71702
|
_vm._v(" "),
|
|
71696
|
-
|
|
71697
|
-
|
|
71698
|
-
|
|
71699
|
-
|
|
71700
|
-
|
|
71701
|
-
|
|
71702
|
-
|
|
71703
|
-
|
|
71704
|
-
|
|
71705
|
-
|
|
71706
|
-
|
|
71707
|
-
|
|
71708
|
-
|
|
71709
|
-
|
|
71710
|
-
|
|
71711
|
-
}
|
|
71712
|
-
},
|
|
71713
|
-
[
|
|
71714
|
-
_c(
|
|
71715
|
-
"b-input-group",
|
|
71716
|
-
[
|
|
71717
|
-
_c("b-form-input", {
|
|
71718
|
-
attrs: {
|
|
71719
|
-
type: "url",
|
|
71720
|
-
autofocus: "",
|
|
71721
|
-
state: _vm.urlValid ? null : false,
|
|
71722
|
-
placeholder: _vm.labels.urlPlaceholder
|
|
71723
|
-
},
|
|
71724
|
-
on: {
|
|
71725
|
-
keydown: [
|
|
71726
|
-
function($event) {
|
|
71727
|
-
if (
|
|
71728
|
-
!$event.type.indexOf("key") &&
|
|
71729
|
-
_vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
|
|
71730
|
-
) {
|
|
71731
|
-
return null
|
|
71732
|
-
}
|
|
71733
|
-
$event.preventDefault();
|
|
71734
|
-
$event.stopPropagation();
|
|
71735
|
-
return _vm.link.apply(null, arguments)
|
|
71736
|
-
},
|
|
71737
|
-
function($event) {
|
|
71738
|
-
if (
|
|
71739
|
-
!$event.type.indexOf("key") &&
|
|
71740
|
-
_vm._k($event.keyCode, "esc", 27, $event.key, [
|
|
71741
|
-
"Esc",
|
|
71742
|
-
"Escape"
|
|
71743
|
-
])
|
|
71744
|
-
) {
|
|
71745
|
-
return null
|
|
71746
|
-
}
|
|
71747
|
-
$event.preventDefault();
|
|
71748
|
-
$event.stopPropagation();
|
|
71749
|
-
return _vm.close.apply(null, arguments)
|
|
71750
|
-
}
|
|
71751
|
-
]
|
|
71752
|
-
},
|
|
71753
|
-
model: {
|
|
71754
|
-
value: _vm.attrs.href,
|
|
71755
|
-
callback: function($$v) {
|
|
71756
|
-
_vm.$set(_vm.attrs, "href", $$v);
|
|
71757
|
-
},
|
|
71758
|
-
expression: "attrs.href"
|
|
71703
|
+
_vm.currentValue
|
|
71704
|
+
? _c(
|
|
71705
|
+
"b-popover",
|
|
71706
|
+
{
|
|
71707
|
+
ref: "popover",
|
|
71708
|
+
attrs: {
|
|
71709
|
+
triggers: "focus",
|
|
71710
|
+
target: "link-popover",
|
|
71711
|
+
placement: "auto",
|
|
71712
|
+
show: _vm.visible,
|
|
71713
|
+
container: "link-popover-container"
|
|
71714
|
+
},
|
|
71715
|
+
on: {
|
|
71716
|
+
"update:show": function($event) {
|
|
71717
|
+
_vm.visible = $event;
|
|
71759
71718
|
}
|
|
71760
|
-
}
|
|
71761
|
-
|
|
71719
|
+
}
|
|
71720
|
+
},
|
|
71721
|
+
[
|
|
71762
71722
|
_c(
|
|
71763
|
-
"b-input-group
|
|
71723
|
+
"b-input-group",
|
|
71764
71724
|
[
|
|
71765
|
-
_c(
|
|
71766
|
-
|
|
71767
|
-
|
|
71768
|
-
|
|
71769
|
-
|
|
71770
|
-
|
|
71771
|
-
},
|
|
71772
|
-
on: { click: _vm.link }
|
|
71725
|
+
_c("b-form-input", {
|
|
71726
|
+
attrs: {
|
|
71727
|
+
type: "url",
|
|
71728
|
+
autofocus: "",
|
|
71729
|
+
state: _vm.urlValid ? null : false,
|
|
71730
|
+
placeholder: _vm.labels.urlPlaceholder
|
|
71773
71731
|
},
|
|
71732
|
+
on: {
|
|
71733
|
+
keydown: [
|
|
71734
|
+
function($event) {
|
|
71735
|
+
if (
|
|
71736
|
+
!$event.type.indexOf("key") &&
|
|
71737
|
+
_vm._k(
|
|
71738
|
+
$event.keyCode,
|
|
71739
|
+
"enter",
|
|
71740
|
+
13,
|
|
71741
|
+
$event.key,
|
|
71742
|
+
"Enter"
|
|
71743
|
+
)
|
|
71744
|
+
) {
|
|
71745
|
+
return null
|
|
71746
|
+
}
|
|
71747
|
+
$event.preventDefault();
|
|
71748
|
+
$event.stopPropagation();
|
|
71749
|
+
return _vm.link.apply(null, arguments)
|
|
71750
|
+
},
|
|
71751
|
+
function($event) {
|
|
71752
|
+
if (
|
|
71753
|
+
!$event.type.indexOf("key") &&
|
|
71754
|
+
_vm._k($event.keyCode, "esc", 27, $event.key, [
|
|
71755
|
+
"Esc",
|
|
71756
|
+
"Escape"
|
|
71757
|
+
])
|
|
71758
|
+
) {
|
|
71759
|
+
return null
|
|
71760
|
+
}
|
|
71761
|
+
$event.preventDefault();
|
|
71762
|
+
$event.stopPropagation();
|
|
71763
|
+
return _vm.close.apply(null, arguments)
|
|
71764
|
+
}
|
|
71765
|
+
]
|
|
71766
|
+
},
|
|
71767
|
+
model: {
|
|
71768
|
+
value: _vm.attrs.href,
|
|
71769
|
+
callback: function($$v) {
|
|
71770
|
+
_vm.$set(_vm.attrs, "href", $$v);
|
|
71771
|
+
},
|
|
71772
|
+
expression: "attrs.href"
|
|
71773
|
+
}
|
|
71774
|
+
}),
|
|
71775
|
+
_vm._v(" "),
|
|
71776
|
+
_c(
|
|
71777
|
+
"b-input-group-append",
|
|
71774
71778
|
[
|
|
71775
|
-
|
|
71776
|
-
"
|
|
71779
|
+
_c(
|
|
71780
|
+
"b-button",
|
|
71781
|
+
{
|
|
71782
|
+
attrs: {
|
|
71783
|
+
disabled: !_vm.urlValid,
|
|
71784
|
+
variant: "outline-success"
|
|
71785
|
+
},
|
|
71786
|
+
on: { click: _vm.link }
|
|
71787
|
+
},
|
|
71788
|
+
[
|
|
71789
|
+
_vm._v(
|
|
71790
|
+
"\n " +
|
|
71791
|
+
_vm._s(_vm.labels.ok) +
|
|
71792
|
+
"\n "
|
|
71793
|
+
)
|
|
71794
|
+
]
|
|
71777
71795
|
)
|
|
71778
|
-
]
|
|
71796
|
+
],
|
|
71797
|
+
1
|
|
71779
71798
|
)
|
|
71780
71799
|
],
|
|
71781
71800
|
1
|
|
@@ -71783,9 +71802,7 @@ var __vue_render__$d = function() {
|
|
|
71783
71802
|
],
|
|
71784
71803
|
1
|
|
71785
71804
|
)
|
|
71786
|
-
|
|
71787
|
-
1
|
|
71788
|
-
)
|
|
71805
|
+
: _vm._e()
|
|
71789
71806
|
],
|
|
71790
71807
|
1
|
|
71791
71808
|
)
|
|
@@ -79077,6 +79094,10 @@ var script$k = {
|
|
|
79077
79094
|
labels: {
|
|
79078
79095
|
type: Object,
|
|
79079
79096
|
default: () => ({})
|
|
79097
|
+
},
|
|
79098
|
+
currentValue: {
|
|
79099
|
+
type: String,
|
|
79100
|
+
required: false
|
|
79080
79101
|
}
|
|
79081
79102
|
},
|
|
79082
79103
|
methods: {
|
|
@@ -79147,7 +79168,11 @@ var __vue_render__$g = function() {
|
|
|
79147
79168
|
{
|
|
79148
79169
|
key: "" + f.name + i + "}",
|
|
79149
79170
|
tag: "component",
|
|
79150
|
-
attrs: {
|
|
79171
|
+
attrs: {
|
|
79172
|
+
format: f,
|
|
79173
|
+
labels: _vm.labels,
|
|
79174
|
+
"current-value": _vm.currentValue
|
|
79175
|
+
},
|
|
79151
79176
|
on: {
|
|
79152
79177
|
click: function($event) {
|
|
79153
79178
|
_vm.commands[$event.type]($event.attrs);
|
|
@@ -79234,7 +79259,8 @@ var script$l = {
|
|
|
79234
79259
|
toolbar: getToolbar(),
|
|
79235
79260
|
// Helper to determine if current content differes from prop's content
|
|
79236
79261
|
emittedContent: false,
|
|
79237
|
-
editor: undefined
|
|
79262
|
+
editor: undefined,
|
|
79263
|
+
currentValue: ''
|
|
79238
79264
|
};
|
|
79239
79265
|
},
|
|
79240
79266
|
|
|
@@ -79286,11 +79312,11 @@ var script$l = {
|
|
|
79286
79312
|
* Because of this, we are using `view.dom.innerHTML`. This should be improved at a later point
|
|
79287
79313
|
*/
|
|
79288
79314
|
onUpdate() {
|
|
79289
|
-
|
|
79315
|
+
this.currentValue = this.editor.view.dom.innerHTML; // Makes sure to default to '' as the value if no text is present, for validation purposes
|
|
79290
79316
|
|
|
79291
|
-
|
|
79317
|
+
this.currentValue = this.currentValue !== '<p><br></p>' ? this.currentValue : '';
|
|
79292
79318
|
this.emittedContent = true;
|
|
79293
|
-
this.$emit('input',
|
|
79319
|
+
this.$emit('input', this.currentValue);
|
|
79294
79320
|
}
|
|
79295
79321
|
|
|
79296
79322
|
}
|
|
@@ -79334,7 +79360,8 @@ var __vue_render__$h = function() {
|
|
|
79334
79360
|
"is-active": isActive,
|
|
79335
79361
|
"get-mark-attrs": getMarkAttrs,
|
|
79336
79362
|
"get-node-attrs": getNodeAttrs,
|
|
79337
|
-
labels: _vm.labels
|
|
79363
|
+
labels: _vm.labels,
|
|
79364
|
+
"current-value": _vm.currentValue
|
|
79338
79365
|
}
|
|
79339
79366
|
})
|
|
79340
79367
|
]
|
|
@@ -79343,7 +79370,7 @@ var __vue_render__$h = function() {
|
|
|
79343
79370
|
],
|
|
79344
79371
|
null,
|
|
79345
79372
|
false,
|
|
79346
|
-
|
|
79373
|
+
2342935495
|
|
79347
79374
|
)
|
|
79348
79375
|
})
|
|
79349
79376
|
],
|
|
@@ -79511,11 +79538,11 @@ __vue_render__$i._withStripped = true;
|
|
|
79511
79538
|
/* style */
|
|
79512
79539
|
const __vue_inject_styles__$n = function (inject) {
|
|
79513
79540
|
if (!inject) return
|
|
79514
|
-
inject("data-v-
|
|
79541
|
+
inject("data-v-7413f73a_0", { source: ".pointer[data-v-7413f73a] {\n cursor: pointer;\n}\n\n/*# sourceMappingURL=CPermissionsButton.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/permissions/CPermissionsButton.vue","CPermissionsButton.vue"],"names":[],"mappings":"AA0FA;EACA,eAAA;ACzFA;;AAEA,iDAAiD","file":"CPermissionsButton.vue","sourcesContent":["<template>\n <a\n v-if=\"link\"\n class=\"pointer\"\n @click=\"onClick\"\n >\n <font-awesome-icon :icon=\"['fas', 'lock']\" />\n </a>\n <b-button\n v-else\n :variant=\"buttonVariant\"\n @click=\"onClick\"\n >\n <slot>\n <font-awesome-icon v-if=\"showButtonIcon\" :icon=\"['fas', 'lock']\" />\n <span v-if=\"buttonLabel\">\n {{ buttonLabel }}\n </span>\n </slot>\n </b-button>\n</template>\n<script lang=\"js\">\nimport { modalOpenEventName } from './def.ts'\nimport { library } from '@fortawesome/fontawesome-svg-core'\nimport { faLock } from '@fortawesome/free-solid-svg-icons'\n\nlibrary.add(faLock)\n\nexport default {\n props: {\n link: {\n type: Boolean,\n },\n\n buttonVariant: {\n type: String,\n default: undefined,\n },\n\n resource: {\n type: String,\n required: true,\n },\n\n title: {\n type: String,\n default: undefined,\n },\n\n buttonLabel: {\n type: String,\n default: undefined,\n },\n\n modalOpenEvent: {\n type: String,\n default: modalOpenEventName,\n },\n\n target: {\n type: String,\n required: false,\n default: undefined,\n },\n\n showButtonIcon: {\n type: Boolean,\n default: true,\n },\n\n // Use this prop if you want the translations to look for all-specific key instead of all/specific\n allSpecific: {\n type: Boolean,\n default: false\n },\n },\n\n methods: {\n onClick () {\n this.$root.$emit(this.modalOpenEvent, {\n target: this.target,\n resource: this.resource,\n title: this.title,\n allSpecific: this.allSpecific\n })\n },\n },\n}\n</script>\n<style lang=\"scss\" scoped>\n.pointer {\n cursor: pointer;\n}\n</style>\n",".pointer {\n cursor: pointer;\n}\n\n/*# sourceMappingURL=CPermissionsButton.vue.map */"]}, media: undefined });
|
|
79515
79542
|
|
|
79516
79543
|
};
|
|
79517
79544
|
/* scoped */
|
|
79518
|
-
const __vue_scope_id__$n = "data-v-
|
|
79545
|
+
const __vue_scope_id__$n = "data-v-7413f73a";
|
|
79519
79546
|
/* module identifier */
|
|
79520
79547
|
const __vue_module_identifier__$n = undefined;
|
|
79521
79548
|
/* functional template */
|
|
@@ -80282,11 +80309,11 @@ __vue_render__$m._withStripped = true;
|
|
|
80282
80309
|
/* style */
|
|
80283
80310
|
const __vue_inject_styles__$r = function (inject) {
|
|
80284
80311
|
if (!inject) return
|
|
80285
|
-
inject("data-v-
|
|
80312
|
+
inject("data-v-5004c9ac_0", { source: ".pointer[data-v-5004c9ac] {\n cursor: pointer;\n}\n\n/*# sourceMappingURL=CPermissionsForm.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/permissions/CPermissionsForm.vue","CPermissionsForm.vue"],"names":[],"mappings":"AAsQA;EACA,eAAA;ACrQA;;AAEA,+CAA+C","file":"CPermissionsForm.vue","sourcesContent":["<template>\n <b-form @submit.prevent=\"onSubmit\">\n <b-row>\n <b-col\n class=\"role-list\"\n cols=\"12\"\n lg=\"3\"\n >\n <b-list-group class=\"d-none d-lg-block\">\n <b-list-group-item\n v-for=\"r in roles\"\n :key=\"r.roleID\"\n :active=\"r.roleID === currentRole.roleID\"\n active-class=\"primary\"\n variant=\"outline-primary\"\n class=\"text-break pointer\"\n @click=\"onRoleChange(r)\"\n >\n {{ r.name || r.handle || r.roleID }}\n </b-list-group-item>\n </b-list-group>\n <vue-select\n v-model=\"currentRole\"\n key=\"roleID\"\n label=\"name\"\n class=\"mb-4 d-block d-lg-none\"\n :clearable=\"false\"\n :options=\"roles\"\n @input=\"onRoleChange\"\n />\n </b-col>\n <b-col\n class=\"rule-list\"\n cols=\"12\"\n lg=\"9\"\n >\n <rules :rules.sync=\"rules\" />\n </b-col>\n </b-row>\n\n <b-row class=\"footer mt-3\"\n >\n <b-col\n class=\"rule-list text-right\"\n cols=\"9\"\n offset=\"3\"\n >\n <b-button\n type=\"submit\"\n variant=\"primary\"\n :disabled=\"disabled\"\n >\n {{ $t('permissions:ui.save-changes') }}\n </b-button>\n </b-col>\n </b-row>\n </b-form>\n</template>\n<script lang=\"js\">\nimport Rules from './form/Rules.vue'\nimport { VueSelect } from 'vue-select'\nimport { split } from './def.ts'\n\n// Data, Methods, Computed, Props\nexport default {\n i18nOptions: {\n /**\n * Using both, implicit (here) and explicit (at $t()) namespace setting.\n * If we only use implicit the behaviour is flaky.\n */\n namespaces: 'permissions',\n },\n\n components: {\n Rules,\n VueSelect,\n },\n\n props: {\n resource: {\n type: String,\n required: true,\n },\n\n target: {\n type: String,\n required: false,\n default: undefined,\n },\n\n allSpecific: {\n type: Boolean,\n default: false\n },\n\n backendComponentName: {\n type: String,\n default () {\n // Assuming backend service will\n // be equal to (first part of) resource\n if (!this.resource.startsWith('corteza::')) {\n throw Error('unrecognized resource type schema')\n }\n\n // <schema>::<backend-component-name>:...\n return this.resource.split(':')[2]\n },\n },\n },\n\n data () {\n return {\n processing: false,\n\n // List of available permissions (for a specific resource)\n permissions: [],\n\n // List of rules for the current role\n rules: [],\n\n // List of all available roles\n roles: [],\n\n // Current role object\n currentRole: undefined,\n }\n },\n\n computed: {\n dirty () {\n return this.collectChangedRules().length > 0\n },\n\n disabled () {\n return !this.dirty\n },\n\n api () {\n const s = this.backendComponentName\n return this['$' + s.charAt(0).toUpperCase() + s.slice(1) + 'API']\n },\n },\n\n created () {\n this.fetchPermissions()\n this.fetchRoles()\n },\n\n methods: {\n onRoleChange (role) {\n this.currentRole = role\n this.fetchRules(role.roleID)\n },\n\n onSubmit () {\n this.processing = true\n const rules = this.collectChangedRules()\n const { roleID } = this.currentRole\n\n this.api.permissionsUpdate({ roleID, rules }).then(() => {\n this.fetchRules(roleID)\n this.processing = false\n })\n },\n\n async fetchPermissions () {\n // clean loaded rules\n this.rules = []\n this.permissions = []\n this.processing = true\n\n return this.api.permissionsList().then((pp) => {\n this.permissions = this.filterPermissions(pp)\n this.processing = false\n })\n },\n\n async fetchRules (roleID) {\n this.processing = true\n return this.api.permissionsRead({ roleID }).then((rules) => {\n this.rules = this.normalizeRules(rules)\n this.processing = false\n })\n },\n\n async fetchRoles () {\n this.processing = true\n // Roles are always fetched from $SystemAPI.\n return this.$SystemAPI.roleList().then(({ set }) => {\n this.roles = set\n .filter(({ isBypass }) => !isBypass )\n .sort((a, b) => a.roleID.localeCompare(b.roleID))\n\n if (this.roles.length > 0) {\n this.onRoleChange(this.roles[0])\n }\n this.processing = false\n })\n },\n\n normalizeRules (rr) {\n const inherit = 'inherit'\n\n // merges roleRules (subset) with list of all permissions\n const findCurrent = ({ resource, operation }) => {\n if (!rr) {\n return inherit\n }\n\n return (rr.find(r => r.resource === resource && r.operation === operation) || {}).access || inherit\n }\n\n return this.permissions.map((p) => {\n const current = findCurrent(p)\n return { ...p, access: current, current }\n })\n },\n\n // Removes unneeded permissions (ones that do not match resource prop)\n // and translates the rest\n filterPermissions (pp) {\n const [ resourceType ] = this.resource.split('/', 2)\n return pp\n .filter(({ type }) => resourceType === type)\n .map(({ type, op: operation }) => {\n return {\n ...this.describePermission({ resource: type, operation }),\n operation,\n // override resource-type with the actual resource-ID\n resource: this.resource\n }\n })\n },\n\n collectChangedRules () {\n return this.rules.filter(r => r.access !== r.current).map(({ resource, operation, access }) => {\n return { resource, operation, access }\n })\n },\n\n describePermission ({ resource, operation }) {\n const i18nPrefix = split(resource).i18nPrefix + `.operations.${operation}`\n\n let title = ''\n if (this.allSpecific) {\n title = this.$t(`permissions:${i18nPrefix}.all-specific`, { target: this.target, interpolation: { escapeValue: false } })\n } else if (this.target) {\n title = this.$t(`permissions:${i18nPrefix}.specific`, { target: this.target, interpolation: { escapeValue: false } })\n } else {\n title = this.$t(`permissions:${i18nPrefix}.title`)\n }\n\n return {\n title,\n description: this.$t(`permissions:${i18nPrefix}.description`),\n }\n },\n },\n}\n\n</script>\n<style scoped lang=\"scss\">\n.pointer {\n cursor: pointer;\n}\n</style>\n",".pointer {\n cursor: pointer;\n}\n\n/*# sourceMappingURL=CPermissionsForm.vue.map */"]}, media: undefined });
|
|
80286
80313
|
|
|
80287
80314
|
};
|
|
80288
80315
|
/* scoped */
|
|
80289
|
-
const __vue_scope_id__$r = "data-v-
|
|
80316
|
+
const __vue_scope_id__$r = "data-v-5004c9ac";
|
|
80290
80317
|
/* module identifier */
|
|
80291
80318
|
const __vue_module_identifier__$r = undefined;
|
|
80292
80319
|
/* functional template */
|
|
@@ -81502,11 +81529,11 @@ __vue_render__$t._withStripped = true;
|
|
|
81502
81529
|
/* style */
|
|
81503
81530
|
const __vue_inject_styles__$z = function (inject) {
|
|
81504
81531
|
if (!inject) return
|
|
81505
|
-
inject("data-v-
|
|
81532
|
+
inject("data-v-7e37674b_0", { source: ".slide-enter-active[data-v-7e37674b] {\n transition: all 0.3s ease;\n}\n.slide-leave-active[data-v-7e37674b] {\n transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);\n}\n.slide-enter[data-v-7e37674b], .slide-leave-to[data-v-7e37674b] {\n transform: translateX(10px);\n opacity: 0;\n}\n\n/*# sourceMappingURL=CPromptToast.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/prompts/CPromptToast.vue","CPromptToast.vue"],"names":[],"mappings":"AAqJA;EACA,yBAAA;ACpJA;ADsJA;EACA,iDAAA;ACnJA;ADqJA;EAEA,2BAAA;EACA,UAAA;ACnJA;;AAEA,2CAA2C","file":"CPromptToast.vue","sourcesContent":["<template>\n <div>\n <b-toast\n v-for=\"({ prompt, component, passive }) in toasts\"\n :id=\"'wfPromptToast-'+prompt.stateID\"\n :key=\"'wfPromptToast-'+prompt.stateID\"\n :variant=\"pVal(prompt, 'variant', 'primary')\"\n :visible=\"!isActive\"\n solid\n :no-auto-hide=\"!passive\"\n :auto-hide-delay=\"pVal(prompt, 'timeout', defaultTimeout) * 1000\"\n :no-close-button=\"!passive\"\n >\n <template #toast-title>\n <div class=\"d-flex flex-grow-1 align-items-baseline\">\n <strong class=\"mr-auto\">{{ pVal(prompt, 'title', 'Workflow prompt') }}</strong>\n <b-button\n variant=\"link\"\n size=\"sm\"\n v-if=\"!passive && active.length > 1\"\n @click=\"activate(true)\"\n >\n {{ active.length }} waiting\n </b-button>\n </div>\n </template>\n <component\n v-if=\"component\"\n :is=\"component\"\n :payload=\"prompt.payload\"\n :loading=\"isLoading\"\n @submit=\"resumeToast({ input: $event, prompt })\"\n />\n </b-toast>\n </div>\n</template>\n<script>\nimport { mapGetters, mapActions } from 'vuex'\nimport definitions from './kinds/index.ts'\nimport { pVal } from './utils.ts'\n\nexport default {\n name: 'c-prompt-toast',\n\n data () {\n return {\n passive: new Set(),\n }\n },\n\n computed: {\n ...mapGetters({\n prompts: 'wfPrompts/all',\n isActive: 'wfPrompts/isActive',\n isLoading: 'wfPrompts/isLoading',\n }),\n\n withHandlers () {\n return this.prompts\n .filter(({ ref }) => !!definitions[ref] && !!definitions[ref].handler)\n .map(prompt => ({ ...definitions[prompt.ref], prompt }))\n },\n\n withComponents () {\n return this.prompts\n .filter(({ ref }) => !!definitions[ref] && !!definitions[ref].component)\n .map(prompt => ({ ...definitions[prompt.ref], prompt }))\n },\n\n /**\n * All non-passive prompts with components\n */\n active() {\n return this.withComponents.filter(({ passive }) => !passive)\n },\n\n /**\n * Returns list of prompts that we can interpret as toasts: display component is defined\n *\n * Toasts (prompts with components) are displayed in order received but\n * passive (no feedback or input from user required) first and the rest later\n */\n toasts () {\n return [\n ...this.passive.values(),\n ...this.active\n ]\n },\n\n defaultTimeout () {\n return 7\n }\n },\n\n watch: {\n // watch prompts with handlers and when a new one arrives\n // shift it from the stack, resume the prompt and handle it\n withHandlers (hh) {\n if (hh.length > 0) {\n const { handler, prompt } = hh.shift()\n this.resume({ input: {}, prompt }).then(() => {\n handler.call(this, prompt.payload)\n })\n }\n },\n\n /**\n * Make a copy of prompt if it is defined as passive\n *\n * We do this because we do not want it to be removed right away\n * but through a toast component's timeout\n */\n prompts: {\n immediate: true,\n handler () {\n this.withComponents.forEach(p => {\n if (p.passive) {\n this.passive.add(p)\n }\n })\n },\n },\n },\n\n methods: {\n ...mapActions({\n resume: 'wfPrompts/resume',\n activate: 'wfPrompts/activate',\n }),\n\n resumeToast (values) {\n // Only reset input if prompt is kept open\n if (values.input && values.input.keep) {\n values.input = {}\n } else {\n // Otherwise remove prompt from toasts\n this.toasts = this.toasts.filter(({ prompt }) => prompt.stateID !== values.prompt.stateID)\n }\n\n this.resume(values)\n },\n\n pVal (prompt, k, def = undefined) {\n return pVal(prompt.payload, k, def)\n },\n },\n}\n</script>\n<style scoped lang=\"scss\">\n.slide-enter-active {\n transition: all .3s ease;\n}\n.slide-leave-active {\n transition: all .8s cubic-bezier(1.0, 0.5, 0.8, 1.0);\n}\n.slide-enter, .slide-leave-to\n/* .slide-leave-active below version 2.1.8 */ {\n transform: translateX(10px);\n opacity: 0;\n}\n</style>\n",".slide-enter-active {\n transition: all 0.3s ease;\n}\n\n.slide-leave-active {\n transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);\n}\n\n.slide-enter, .slide-leave-to {\n transform: translateX(10px);\n opacity: 0;\n}\n\n/*# sourceMappingURL=CPromptToast.vue.map */"]}, media: undefined });
|
|
81506
81533
|
|
|
81507
81534
|
};
|
|
81508
81535
|
/* scoped */
|
|
81509
|
-
const __vue_scope_id__$z = "data-v-
|
|
81536
|
+
const __vue_scope_id__$z = "data-v-7e37674b";
|
|
81510
81537
|
/* module identifier */
|
|
81511
81538
|
const __vue_module_identifier__$z = undefined;
|
|
81512
81539
|
/* functional template */
|
|
@@ -81970,11 +81997,11 @@ __vue_render__$w._withStripped = true;
|
|
|
81970
81997
|
/* style */
|
|
81971
81998
|
const __vue_inject_styles__$C = function (inject) {
|
|
81972
81999
|
if (!inject) return
|
|
81973
|
-
inject("data-v-
|
|
82000
|
+
inject("data-v-4482739a_0", { source: ".logo img[data-v-4482739a] {\n animation: pulse-data-v-4482739a 4.2s infinite;\n}\n@keyframes pulse-data-v-4482739a {\n0% {\n opacity: 0;\n}\n65% {\n opacity: 1;\n}\n100% {\n opacity: 0;\n}\n}\n\n/*# sourceMappingURL=CLoaderLogo.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/loader/CLoaderLogo.vue","CLoaderLogo.vue"],"names":[],"mappings":"AA0BA;EACA,8CAAA;ACzBA;AD4BA;AACA;IACA,UAAA;AC1BE;AD4BF;IACA,UAAA;AC1BE;AD4BF;IACA,UAAA;AC1BE;AACF;;AAEA,0CAA0C","file":"CLoaderLogo.vue","sourcesContent":["<template>\n <b-container\n fluid\n class=\"d-flex justify-content-center vh-100 logo\"\n >\n <img\n v-if=\"logo\"\n :src=\"logo\"\n class=\"w-25 my-auto\"\n >\n </b-container>\n</template>\n\n<script>\nexport default {\n props: {\n logo: {\n type: String,\n default: () => ''\n },\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.logo {\n img {\n animation: pulse 4.2s infinite;\n }\n\n @keyframes pulse {\n 0% {\n opacity: 0;\n }\n 65% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n}\n</style>\n",".logo img {\n animation: pulse 4.2s infinite;\n}\n@keyframes pulse {\n 0% {\n opacity: 0;\n }\n 65% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n\n/*# sourceMappingURL=CLoaderLogo.vue.map */"]}, media: undefined });
|
|
81974
82001
|
|
|
81975
82002
|
};
|
|
81976
82003
|
/* scoped */
|
|
81977
|
-
const __vue_scope_id__$C = "data-v-
|
|
82004
|
+
const __vue_scope_id__$C = "data-v-4482739a";
|
|
81978
82005
|
/* module identifier */
|
|
81979
82006
|
const __vue_module_identifier__$C = undefined;
|
|
81980
82007
|
/* functional template */
|
|
@@ -82484,11 +82511,11 @@ __vue_render__$x._withStripped = true;
|
|
|
82484
82511
|
/* style */
|
|
82485
82512
|
const __vue_inject_styles__$D = function (inject) {
|
|
82486
82513
|
if (!inject) return
|
|
82487
|
-
inject("data-v-
|
|
82514
|
+
inject("data-v-ff5125a8_0", { source: ".icon-logo[data-v-ff5125a8] {\n height: calc(64px / 2);\n background-repeat: no-repeat;\n background-position: center;\n}\n.nav-icon[data-v-ff5125a8] {\n width: 40px;\n height: 40px;\n}\n.nav-user-icon[data-v-ff5125a8] {\n width: 50px;\n height: 50px;\n}\n.header-navigation[data-v-ff5125a8] {\n width: 100vw;\n height: 64px;\n background-color: #F3F3F5 !important;\n}\n.header-navigation h2[data-v-ff5125a8] {\n padding-left: calc(0.5rem + 2px);\n}\n.spacer[data-v-ff5125a8] {\n min-width: 0px;\n -webkit-transition: min-width 0.15s ease-in-out;\n -moz-transition: min-width 0.15s ease-in-out;\n -o-transition: min-width 0.15s ease-in-out;\n transition: min-width 0.15s ease-in-out;\n}\n.spacer.expanded[data-v-ff5125a8] {\n min-width: calc(320px - 42px);\n -webkit-transition: min-width 0.2s ease-in-out;\n -moz-transition: min-width 0.2s ease-in-out;\n -o-transition: min-width 0.2s ease-in-out;\n transition: min-width 0.2s ease-in-out;\n}\n\n/*# sourceMappingURL=CTopbar.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/navigation/CTopbar.vue","CTopbar.vue"],"names":[],"mappings":"AA2MA;EACA,sBAAA;EACA,4BAAA;EACA,2BAAA;AC1MA;AD6MA;EACA,WAVA;EAWA,YAXA;AC/LA;AD6MA;EACA,WAdA;EAeA,YAfA;AC3LA;AD6MA;EACA,YAAA;EACA,YAvBA;EAwBA,oCAAA;AC1MA;AD4MA;EACA,gCAAA;AC1MA;AD8MA;EACA,cAAA;EACA,+CAAA;EACA,4CAAA;EACA,0CAAA;EACA,uCAAA;AC3MA;AD6MA;EACA,6BAAA;EACA,8CAAA;EACA,2CAAA;EACA,yCAAA;EACA,sCAAA;AC3MA;;AAEA,sCAAsC","file":"CTopbar.vue","sourcesContent":["<template>\n <div class=\"header-navigation d-flex align-items-center justify-content-between sticky-top pr-3 pl-5 \">\n <div\n class=\"d-flex text-nowrap flex-grow-1 align-items-center header h-100 w-100\"\n >\n <template>\n <div\n class=\"spacer\"\n :class=\"{\n 'expanded': sidebarPinned,\n }\"\n />\n </template>\n\n <div\n class=\"d-flex align-items-center ml-2 text-truncate mr-auto h-100\"\n >\n <h2\n class=\"d-none d-sm-block mb-0\"\n >\n <slot name=\"title\" />\n </h2>\n\n </div>\n\n <div class=\"ml-3\">\n <slot name=\"tools\" />\n </div>\n\n <b-button\n v-if=\"!hideAppSelector\"\n variant=\"outline-light\"\n :href=\"appSelectorURL\"\n size=\"lg\"\n class=\"d-flex align-items-center justify-content-center text-dark border-0 nav-icon rounded-circle ml-2\"\n >\n <font-awesome-icon\n class=\"m-0 h5\"\n :icon=\"['fas', 'grip-horizontal']\"\n />\n </b-button>\n\n <b-dropdown\n size=\"lg\"\n variant=\"outline-light\"\n class=\"nav-icon mx-1\"\n toggle-class=\"text-decoration-none text-dark rounded-circle border-0 w-100\"\n menu-class=\"border-0 shadow-sm text-dark font-weight-bold mt-2\"\n right\n no-caret\n >\n <template #button-content>\n <div\n class=\"d-flex align-items-center justify-content-center\"\n >\n <font-awesome-icon\n class=\"m-0 h5\"\n :icon=\"['far', 'question-circle']\"\n />\n <span class=\"sr-only\">\n Help\n </span>\n </div>\n </template>\n <div>\n <slot name=\"help-dropdown\" />\n </div>\n <b-dropdown-item\n href=\"https://forum.cortezaproject.org/\"\n target=\"_blank\"\n >\n {{ labels.helpForum }}\n </b-dropdown-item>\n <b-dropdown-item\n :href=\"documentationURL\"\n target=\"_blank\"\n >\n {{ labels.helpDocumentation }}\n </b-dropdown-item>\n <b-dropdown-item\n href=\"mailto:info@crust.tech\"\n target=\"_blank\"\n >\n {{ labels.helpFeedback }}\n </b-dropdown-item>\n <b-dropdown-divider />\n <b-dropdown-item\n disabled\n class=\"small\"\n >\n {{ labels.helpVersion }}\n <br>\n {{ frontendVersion }}\n </b-dropdown-item>\n </b-dropdown>\n <b-dropdown\n data-v-onboarding=\"profile\"\n size=\"lg\"\n variant=\"outline-light\"\n class=\"nav-user-icon\"\n toggle-class=\"nav-icon text-decoration-none text-dark rounded-circle border\"\n menu-class=\"border-0 shadow-sm text-dark font-weight-bold mt-2\"\n right\n no-caret\n >\n <template #button-content>\n <div\n class=\"d-flex align-items-center justify-content-center\"\n >\n <font-awesome-icon\n class=\"m-0 h5\"\n :icon=\"['far', 'user']\"\n />\n <span class=\"sr-only\">\n {{ labels.helpForum }}\n </span>\n </div>\n </template>\n <b-dropdown-text class=\"text-muted mb-2\">\n {{ labels.userSettingsLoggedInAs }}\n </b-dropdown-text>\n <div>\n <slot name=\"avatar-dropdown\" />\n </div>\n <b-dropdown-item\n :href=\"userProfileURL\"\n target=\"_blank\"\n >\n {{ labels.userSettingsProfile }}\n </b-dropdown-item>\n <b-dropdown-item\n :href=\"changePasswordURL\"\n target=\"_blank\"\n >\n {{ labels.userSettingsChangePassword }}\n </b-dropdown-item>\n <b-dropdown-divider />\n <b-dropdown-item\n href=\"\"\n @click=\"$auth.logout()\"\n class=\"mt-2\"\n >\n {{ labels.userSettingsLogout }}\n </b-dropdown-item>\n </b-dropdown>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n props: {\n sidebarPinned: {\n type: Boolean,\n required: true,\n default: false,\n },\n\n hideAppSelector: {\n type: Boolean,\n required: false,\n default: false,\n },\n\n appSelectorURL: {\n type: String,\n default: '../'\n },\n\n labels: {\n type: Object,\n required: true,\n },\n },\n\n computed: {\n userProfileURL () {\n return this.$auth.cortezaAuthURL\n },\n\n changePasswordURL () {\n return `${this.$auth.cortezaAuthURL}/change-password`\n },\n\n documentationURL () {\n const [year, month] = VERSION.split('.')\n return `https://docs.cortezaproject.org/corteza-docs/${year}.${month}/index.html`\n },\n\n frontendVersion () {\n /* eslint-disable no-undef */\n return VERSION\n },\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n$header-height: 64px;\n$nav-width: 320px;\n$nav-icon-size: 40px;\n$nav-user-icon-size: 50px;\n\n.icon-logo {\n height: calc(#{$header-height} / 2);\n background-repeat: no-repeat;\n background-position: center;\n}\n\n.nav-icon {\n width: $nav-icon-size;\n height: $nav-icon-size;\n}\n\n.nav-user-icon {\n width: $nav-user-icon-size;\n height: $nav-user-icon-size;\n}\n\n.header-navigation {\n width: 100vw;\n height: $header-height;\n background-color: #F3F3F5 !important;\n\n h2 {\n padding-left: calc(0.5rem + 2px);\n }\n}\n\n.spacer {\n min-width: 0px;\n -webkit-transition: min-width 0.15s ease-in-out;\n -moz-transition: min-width 0.15s ease-in-out;\n -o-transition: min-width 0.15s ease-in-out;\n transition: min-width 0.15s ease-in-out;\n\n &.expanded {\n min-width: calc(#{$nav-width} - 42px);\n -webkit-transition: min-width 0.2s ease-in-out;\n -moz-transition: min-width 0.2s ease-in-out;\n -o-transition: min-width 0.2s ease-in-out;\n transition: min-width 0.2s ease-in-out;\n }\n}\n</style>\n",".icon-logo {\n height: calc(64px / 2);\n background-repeat: no-repeat;\n background-position: center;\n}\n\n.nav-icon {\n width: 40px;\n height: 40px;\n}\n\n.nav-user-icon {\n width: 50px;\n height: 50px;\n}\n\n.header-navigation {\n width: 100vw;\n height: 64px;\n background-color: #F3F3F5 !important;\n}\n.header-navigation h2 {\n padding-left: calc(0.5rem + 2px);\n}\n\n.spacer {\n min-width: 0px;\n -webkit-transition: min-width 0.15s ease-in-out;\n -moz-transition: min-width 0.15s ease-in-out;\n -o-transition: min-width 0.15s ease-in-out;\n transition: min-width 0.15s ease-in-out;\n}\n.spacer.expanded {\n min-width: calc(320px - 42px);\n -webkit-transition: min-width 0.2s ease-in-out;\n -moz-transition: min-width 0.2s ease-in-out;\n -o-transition: min-width 0.2s ease-in-out;\n transition: min-width 0.2s ease-in-out;\n}\n\n/*# sourceMappingURL=CTopbar.vue.map */"]}, media: undefined });
|
|
82488
82515
|
|
|
82489
82516
|
};
|
|
82490
82517
|
/* scoped */
|
|
82491
|
-
const __vue_scope_id__$D = "data-v-
|
|
82518
|
+
const __vue_scope_id__$D = "data-v-ff5125a8";
|
|
82492
82519
|
/* module identifier */
|
|
82493
82520
|
const __vue_module_identifier__$D = undefined;
|
|
82494
82521
|
/* functional template */
|
|
@@ -83048,12 +83075,12 @@ __vue_render__$y._withStripped = true;
|
|
|
83048
83075
|
/* style */
|
|
83049
83076
|
const __vue_inject_styles__$E = function (inject) {
|
|
83050
83077
|
if (!inject) return
|
|
83051
|
-
inject("data-v-
|
|
83052
|
-
,inject("data-v-
|
|
83078
|
+
inject("data-v-6a351e13_0", { source: ".tab[data-v-6a351e13] {\n z-index: 1021;\n top: 0;\n height: 64px;\n width: 66px;\n}\n.icon[data-v-6a351e13] {\n max-height: 40px;\n max-width: 40px;\n}\n.logo[data-v-6a351e13] {\n max-height: 40px;\n}\n.sidebar-header[data-v-6a351e13] {\n height: 64px;\n}\n\n/*# sourceMappingURL=CSidebar.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/navigation/CSidebar.vue","CSidebar.vue"],"names":[],"mappings":"AAiSA;EACA,aAAA;EACA,MAAA;EACA,YALA;EAMA,WAAA;AChSA;ADmSA;EACA,gBAAA;EACA,eAAA;AChSA;ADmSA;EACA,gBAAA;AChSA;ADmSA;EACA,YAnBA;AC7QA;;AAEA,uCAAuC","file":"CSidebar.vue","sourcesContent":["<template>\n <div>\n <div\n @mouseleave=\"onHover(false)\"\n >\n <b-sidebar\n v-model=\"isExpanded\"\n :sidebar-class=\"`sidebar ${isExpanded ? 'expanded' : ''}`\"\n :header-class=\"`d-block sidebar-header ${isExpanded ? 'expanded border-bottom p-2' : ''}`\"\n :body-class=\"`bg-white ${isExpanded ? 'py-2 px-3' : ''}`\"\n :footer-class=\"`bg-white rounded-right ${isExpanded ? 'p-2' : ''}`\"\n :no-header=\"!isExpanded\"\n :backdrop=\"isMobile\"\n :shadow=\"isExpanded\"\n no-slide\n no-close-on-route-change\n no-close-on-esc\n >\n <template #header>\n <div\n class=\"d-flex align-items-center justify-content-between px-2\"\n style=\"height: 50px;\"\n >\n <img\n class=\"logo w-auto border-0\"\n :src=\"logo\"\n >\n\n <b-button\n v-if=\"isMobile\"\n variant=\"outline-light border-0\"\n class=\"d-flex align-items-center justify-content-center p-2\"\n @click=\"closeSidebar()\"\n >\n <font-awesome-icon\n :icon=\"['fas', 'times']\"\n class=\"h6 mb-0 text-dark\"\n />\n </b-button>\n\n <b-button\n v-else\n variant=\"outline-light border-0\"\n class=\"d-flex align-items-center justify-content-center p-2\"\n @click=\"togglePin()\"\n >\n <font-awesome-icon\n :icon=\"['fas', 'thumbtack']\"\n :class=\"`h6 mb-0 ${isPinned ? 'text-primary' : 'text-secondary'}`\"\n />\n </b-button>\n </div>\n\n <div\n v-if=\"!isExpanded\"\n class=\"d-flex align-items-center justify-content-center my-3\"\n >\n <b-button\n variant=\"link\"\n @click=\"togglePin()\"\n >\n <font-awesome-icon\n :icon=\"['fas', 'chevron-right']\"\n class=\"h6 mb-0\"\n />\n </b-button>\n </div>\n\n <div\n v-if=\"isExpanded\"\n class=\"px-2\"\n >\n <slot\n name=\"header-expanded\"\n />\n </div>\n\n\n <hr\n v-if=\"!isExpanded\"\n class=\"my-2\"\n >\n </template>\n\n <slot\n v-if=\"isExpanded\"\n name=\"body-expanded\"\n />\n\n <template #footer>\n <slot\n v-if=\"isExpanded\"\n name=\"footer-expanded\"\n />\n </template>\n </b-sidebar>\n </div>\n\n <div\n class=\"d-flex align-items-center justify-content-center tab position-absolute p-2\"\n >\n <b-button\n v-if=\"expandOnHover && !disabledRoutes.includes($route.name)\"\n variant=\"outline-light\"\n size=\"lg\"\n class=\"d-flex align-items-center border-0\"\n @mouseover=\"onHover(true)\"\n >\n <font-awesome-icon\n :icon=\"['fas', 'bars']\"\n class=\"h4 mb-0 text-primary\"\n />\n </b-button>\n\n <b-button\n v-else-if=\"!disabledRoutes.includes($route.name)\"\n variant=\"outline-light\"\n size=\"lg\"\n class=\"d-flex align-items-center p-2 border-0\"\n :to=\"{ name: 'root' }\"\n >\n <font-awesome-icon\n :icon=\"['fas', 'home']\"\n class=\"h4 mb-0 text-primary\"\n />\n </b-button>\n\n <div\n v-else\n class=\"d-flex align-items-center border-0 p-2\"\n >\n <img\n class=\"icon w-auto border-0\"\n :src=\"icon\"\n >\n </div>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n props: {\n expanded: {\n type: Boolean,\n default: false,\n },\n\n pinned: {\n type: Boolean,\n default: false,\n },\n\n expandOnHover: {\n type: Boolean,\n default: false,\n },\n\n disabledRoutes: {\n type: Array,\n default: () => [],\n },\n\n icon: {\n type: String,\n default: () => ''\n },\n\n logo: {\n type: String,\n default: () => ''\n },\n },\n\n data () {\n return {\n sidebar_settings : {}\n }\n },\n\n computed: {\n isExpanded: {\n get () {\n return this.expanded\n },\n\n set (expanded) {\n this.$emit('update:expanded', expanded)\n },\n },\n\n isPinned: {\n get () {\n return this.pinned\n },\n\n set (pinned) {\n this.$emit('update:pinned', pinned)\n },\n },\n\n isMobile () {\n return window.innerWidth < 576\n },\n },\n\n created () {\n this.$root.$on('close-sidebar', () => {\n this.isExpanded = false\n this.isPinned = false\n })\n },\n\n beforeDestroy () {\n this.$root.$off('close-sidebar')\n },\n\n watch: {\n '$route.name': {\n immediate: true,\n handler (name) {\n // If sidebar should be disabled on route, close and unpin when navigating to route\n if (this.disabledRoutes.includes(name)) {\n this.isPinned = false\n this.isExpanded = false\n } else if(this.expandOnHover){\n this.defaultSidebarAppearance()\n }\n },\n },\n },\n\n methods: {\n onHover (expand) {\n if (!this.pinned && this.expandOnHover) {\n setTimeout(() => {\n this.isExpanded = expand\n }, expand ? 0 : 100)\n }\n },\n\n togglePin () {\n this.saveSettings(!this.isPinned)\n this.isPinned = !this.isPinned\n },\n\n defaultSidebarAppearance () {\n const localstorage_settings = JSON.parse(window.localStorage.getItem('sidebar_settings'))\n if (localstorage_settings) {\n this.sidebar_settings = localstorage_settings\n }\n const app_sidebar = (localstorage_settings || {})[this.$root.$options.name]\n if (!this.isMobile) {\n if (app_sidebar) {\n this.isExpanded = app_sidebar.pinned\n this.isPinned = app_sidebar.pinned\n } else {\n this.openSidebar()\n }\n } else {\n this.closeSidebar()\n }\n },\n\n saveSettings (pinned) {\n if (this.sidebar_settings[this.$root.$options.name]) {\n this.sidebar_settings[this.$root.$options.name].pinned = pinned\n } else {\n this.sidebar_settings[this.$root.$options.name] = { pinned: pinned }\n }\n window.localStorage.setItem('sidebar_settings', JSON.stringify(this.sidebar_settings))\n },\n\n openSidebar () {\n this.isPinned = true\n this.isExpanded = true\n },\n\n closeSidebar () {\n this.isPinned = false\n this.isExpanded = false\n },\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n$header-height: 64px;\n\n.tab {\n z-index: 1021;\n top: 0;\n height: $header-height;\n width: 66px;\n}\n\n.icon {\n max-height: 40px;\n max-width: 40px;\n}\n\n.logo {\n max-height: 40px;\n}\n\n.sidebar-header {\n height: $header-height;\n}\n</style>\n\n<style lang=\"scss\">\n$nav-width: 320px;\n$sidebar-bg: #F4F7FA;\n\n.sidebar {\n display: flex !important;\n left: calc(-#{$nav-width}) !important;\n -webkit-transition: left 0.15s ease-in-out;\n -moz-transition: left 0.15s ease-in-out;\n -o-transition: left 0.15s ease-in-out;\n transition: left 0.15s ease-in-out;\n\n header {\n background-color: white;\n\n &.expanded {\n background-color: $sidebar-bg !important;\n }\n }\n\n &.expanded {\n left: 0 !important;\n -webkit-transition: left 0.2s ease-in-out;\n -moz-transition: left 0.2s ease-in-out;\n -o-transition: left 0.2s ease-in-out;\n transition: left 0.2s ease-in-out;\n }\n}\n</style>\n",".tab {\n z-index: 1021;\n top: 0;\n height: 64px;\n width: 66px;\n}\n\n.icon {\n max-height: 40px;\n max-width: 40px;\n}\n\n.logo {\n max-height: 40px;\n}\n\n.sidebar-header {\n height: 64px;\n}\n\n/*# sourceMappingURL=CSidebar.vue.map */"]}, media: undefined })
|
|
83079
|
+
,inject("data-v-6a351e13_1", { source: ".sidebar {\n display: flex !important;\n left: calc(-320px) !important;\n -webkit-transition: left 0.15s ease-in-out;\n -moz-transition: left 0.15s ease-in-out;\n -o-transition: left 0.15s ease-in-out;\n transition: left 0.15s ease-in-out;\n}\n.sidebar header {\n background-color: white;\n}\n.sidebar header.expanded {\n background-color: #F4F7FA !important;\n}\n.sidebar.expanded {\n left: 0 !important;\n -webkit-transition: left 0.2s ease-in-out;\n -moz-transition: left 0.2s ease-in-out;\n -o-transition: left 0.2s ease-in-out;\n transition: left 0.2s ease-in-out;\n}\n\n/*# sourceMappingURL=CSidebar.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/navigation/CSidebar.vue","CSidebar.vue"],"names":[],"mappings":"AA0TA;EACA,wBAAA;EACA,6BAAA;EACA,0CAAA;EACA,uCAAA;EACA,qCAAA;EACA,kCAAA;ACzTA;AD2TA;EACA,uBAAA;ACzTA;AD2TA;EACA,oCAAA;ACzTA;AD6TA;EACA,kBAAA;EACA,yCAAA;EACA,sCAAA;EACA,oCAAA;EACA,iCAAA;AC3TA;;AAEA,uCAAuC","file":"CSidebar.vue","sourcesContent":["<template>\n <div>\n <div\n @mouseleave=\"onHover(false)\"\n >\n <b-sidebar\n v-model=\"isExpanded\"\n :sidebar-class=\"`sidebar ${isExpanded ? 'expanded' : ''}`\"\n :header-class=\"`d-block sidebar-header ${isExpanded ? 'expanded border-bottom p-2' : ''}`\"\n :body-class=\"`bg-white ${isExpanded ? 'py-2 px-3' : ''}`\"\n :footer-class=\"`bg-white rounded-right ${isExpanded ? 'p-2' : ''}`\"\n :no-header=\"!isExpanded\"\n :backdrop=\"isMobile\"\n :shadow=\"isExpanded\"\n no-slide\n no-close-on-route-change\n no-close-on-esc\n >\n <template #header>\n <div\n class=\"d-flex align-items-center justify-content-between px-2\"\n style=\"height: 50px;\"\n >\n <img\n class=\"logo w-auto border-0\"\n :src=\"logo\"\n >\n\n <b-button\n v-if=\"isMobile\"\n variant=\"outline-light border-0\"\n class=\"d-flex align-items-center justify-content-center p-2\"\n @click=\"closeSidebar()\"\n >\n <font-awesome-icon\n :icon=\"['fas', 'times']\"\n class=\"h6 mb-0 text-dark\"\n />\n </b-button>\n\n <b-button\n v-else\n variant=\"outline-light border-0\"\n class=\"d-flex align-items-center justify-content-center p-2\"\n @click=\"togglePin()\"\n >\n <font-awesome-icon\n :icon=\"['fas', 'thumbtack']\"\n :class=\"`h6 mb-0 ${isPinned ? 'text-primary' : 'text-secondary'}`\"\n />\n </b-button>\n </div>\n\n <div\n v-if=\"!isExpanded\"\n class=\"d-flex align-items-center justify-content-center my-3\"\n >\n <b-button\n variant=\"link\"\n @click=\"togglePin()\"\n >\n <font-awesome-icon\n :icon=\"['fas', 'chevron-right']\"\n class=\"h6 mb-0\"\n />\n </b-button>\n </div>\n\n <div\n v-if=\"isExpanded\"\n class=\"px-2\"\n >\n <slot\n name=\"header-expanded\"\n />\n </div>\n\n\n <hr\n v-if=\"!isExpanded\"\n class=\"my-2\"\n >\n </template>\n\n <slot\n v-if=\"isExpanded\"\n name=\"body-expanded\"\n />\n\n <template #footer>\n <slot\n v-if=\"isExpanded\"\n name=\"footer-expanded\"\n />\n </template>\n </b-sidebar>\n </div>\n\n <div\n class=\"d-flex align-items-center justify-content-center tab position-absolute p-2\"\n >\n <b-button\n v-if=\"expandOnHover && !disabledRoutes.includes($route.name)\"\n variant=\"outline-light\"\n size=\"lg\"\n class=\"d-flex align-items-center border-0\"\n @mouseover=\"onHover(true)\"\n >\n <font-awesome-icon\n :icon=\"['fas', 'bars']\"\n class=\"h4 mb-0 text-primary\"\n />\n </b-button>\n\n <b-button\n v-else-if=\"!disabledRoutes.includes($route.name)\"\n variant=\"outline-light\"\n size=\"lg\"\n class=\"d-flex align-items-center p-2 border-0\"\n :to=\"{ name: 'root' }\"\n >\n <font-awesome-icon\n :icon=\"['fas', 'home']\"\n class=\"h4 mb-0 text-primary\"\n />\n </b-button>\n\n <div\n v-else\n class=\"d-flex align-items-center border-0 p-2\"\n >\n <img\n class=\"icon w-auto border-0\"\n :src=\"icon\"\n >\n </div>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n props: {\n expanded: {\n type: Boolean,\n default: false,\n },\n\n pinned: {\n type: Boolean,\n default: false,\n },\n\n expandOnHover: {\n type: Boolean,\n default: false,\n },\n\n disabledRoutes: {\n type: Array,\n default: () => [],\n },\n\n icon: {\n type: String,\n default: () => ''\n },\n\n logo: {\n type: String,\n default: () => ''\n },\n },\n\n data () {\n return {\n sidebar_settings : {}\n }\n },\n\n computed: {\n isExpanded: {\n get () {\n return this.expanded\n },\n\n set (expanded) {\n this.$emit('update:expanded', expanded)\n },\n },\n\n isPinned: {\n get () {\n return this.pinned\n },\n\n set (pinned) {\n this.$emit('update:pinned', pinned)\n },\n },\n\n isMobile () {\n return window.innerWidth < 576\n },\n },\n\n created () {\n this.$root.$on('close-sidebar', () => {\n this.isExpanded = false\n this.isPinned = false\n })\n },\n\n beforeDestroy () {\n this.$root.$off('close-sidebar')\n },\n\n watch: {\n '$route.name': {\n immediate: true,\n handler (name) {\n // If sidebar should be disabled on route, close and unpin when navigating to route\n if (this.disabledRoutes.includes(name)) {\n this.isPinned = false\n this.isExpanded = false\n } else if(this.expandOnHover){\n this.defaultSidebarAppearance()\n }\n },\n },\n },\n\n methods: {\n onHover (expand) {\n if (!this.pinned && this.expandOnHover) {\n setTimeout(() => {\n this.isExpanded = expand\n }, expand ? 0 : 100)\n }\n },\n\n togglePin () {\n this.saveSettings(!this.isPinned)\n this.isPinned = !this.isPinned\n },\n\n defaultSidebarAppearance () {\n const localstorage_settings = JSON.parse(window.localStorage.getItem('sidebar_settings'))\n if (localstorage_settings) {\n this.sidebar_settings = localstorage_settings\n }\n const app_sidebar = (localstorage_settings || {})[this.$root.$options.name]\n if (!this.isMobile) {\n if (app_sidebar) {\n this.isExpanded = app_sidebar.pinned\n this.isPinned = app_sidebar.pinned\n } else {\n this.openSidebar()\n }\n } else {\n this.closeSidebar()\n }\n },\n\n saveSettings (pinned) {\n if (this.sidebar_settings[this.$root.$options.name]) {\n this.sidebar_settings[this.$root.$options.name].pinned = pinned\n } else {\n this.sidebar_settings[this.$root.$options.name] = { pinned: pinned }\n }\n window.localStorage.setItem('sidebar_settings', JSON.stringify(this.sidebar_settings))\n },\n\n openSidebar () {\n this.isPinned = true\n this.isExpanded = true\n },\n\n closeSidebar () {\n this.isPinned = false\n this.isExpanded = false\n },\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n$header-height: 64px;\n\n.tab {\n z-index: 1021;\n top: 0;\n height: $header-height;\n width: 66px;\n}\n\n.icon {\n max-height: 40px;\n max-width: 40px;\n}\n\n.logo {\n max-height: 40px;\n}\n\n.sidebar-header {\n height: $header-height;\n}\n</style>\n\n<style lang=\"scss\">\n$nav-width: 320px;\n$sidebar-bg: #F4F7FA;\n\n.sidebar {\n display: flex !important;\n left: calc(-#{$nav-width}) !important;\n -webkit-transition: left 0.15s ease-in-out;\n -moz-transition: left 0.15s ease-in-out;\n -o-transition: left 0.15s ease-in-out;\n transition: left 0.15s ease-in-out;\n\n header {\n background-color: white;\n\n &.expanded {\n background-color: $sidebar-bg !important;\n }\n }\n\n &.expanded {\n left: 0 !important;\n -webkit-transition: left 0.2s ease-in-out;\n -moz-transition: left 0.2s ease-in-out;\n -o-transition: left 0.2s ease-in-out;\n transition: left 0.2s ease-in-out;\n }\n}\n</style>\n",".sidebar {\n display: flex !important;\n left: calc(-320px) !important;\n -webkit-transition: left 0.15s ease-in-out;\n -moz-transition: left 0.15s ease-in-out;\n -o-transition: left 0.15s ease-in-out;\n transition: left 0.15s ease-in-out;\n}\n.sidebar header {\n background-color: white;\n}\n.sidebar header.expanded {\n background-color: #F4F7FA !important;\n}\n.sidebar.expanded {\n left: 0 !important;\n -webkit-transition: left 0.2s ease-in-out;\n -moz-transition: left 0.2s ease-in-out;\n -o-transition: left 0.2s ease-in-out;\n transition: left 0.2s ease-in-out;\n}\n\n/*# sourceMappingURL=CSidebar.vue.map */"]}, media: undefined });
|
|
83053
83080
|
|
|
83054
83081
|
};
|
|
83055
83082
|
/* scoped */
|
|
83056
|
-
const __vue_scope_id__$E = "data-v-
|
|
83083
|
+
const __vue_scope_id__$E = "data-v-6a351e13";
|
|
83057
83084
|
/* module identifier */
|
|
83058
83085
|
const __vue_module_identifier__$E = undefined;
|
|
83059
83086
|
/* functional template */
|
|
@@ -83358,11 +83385,11 @@ __vue_render__$z._withStripped = true;
|
|
|
83358
83385
|
/* style */
|
|
83359
83386
|
const __vue_inject_styles__$F = function (inject) {
|
|
83360
83387
|
if (!inject) return
|
|
83361
|
-
inject("data-v-
|
|
83388
|
+
inject("data-v-48e0e128_0", { source: ".pointer-none[data-v-48e0e128] {\n pointer-events: none;\n}\n.svg-inline--fa[data-v-48e0e128] {\n width: 30px;\n}\n.nav-item > span > .title[data-v-48e0e128] {\n font-family: \"Poppins-Regular\";\n}\n.nav-active > span > .icon[data-v-48e0e128] {\n color: #4D7281;\n}\n.nav-active > span > .title[data-v-48e0e128] {\n font-family: \"Poppins-SemiBold\";\n}\n\n/*# sourceMappingURL=CSidebarNavItems.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/navigation/CSidebarNavItems.vue","CSidebarNavItems.vue"],"names":[],"mappings":"AA+IA;EACA,oBAAA;AC9IA;ADiJA;EACA,WAAA;AC9IA;ADkJA;EACA,8BAAA;AC/IA;ADoJA;EACA,cAAA;ACjJA;ADoJA;EACA,+BAAA;AClJA;;AAEA,+CAA+C","file":"CSidebarNavItems.vue","sourcesContent":["<template>\n <div class=\"nav-sidebar\">\n <b-button\n v-for=\"({page = {}, params = {}, children = []}, index) of items\"\n :key=\"index\"\n variant=\"link\"\n class=\"w-100 text-left text-dark text-decoration-none p-0 pt-2 nav-item\"\n active-class=\"nav-active\"\n exact-active-class=\"nav-active\"\n :to=\"{ name: page.name || defaultRouteName, params }\"\n >\n <span\n class=\"d-inline-block w-75 text-nowrap text-truncate\"\n @click=\"closeSidebar()\"\n >\n <font-awesome-icon\n v-if=\"page.icon\"\n class=\"icon\"\n :icon=\"page.icon\"\n />\n <span\n class=\"title\"\n >\n {{ page.title }}\n </span>\n </span>\n\n <template\n v-if=\"children.length\"\n >\n <b-button\n variant=\"link\"\n class=\"p-0 float-right\"\n :disabled=\"showChildren(page, children)\"\n @click.self.stop.prevent=\"toggle(page)\"\n >\n <font-awesome-icon\n v-if=\"!collapses[pageIndex(page)]\"\n class=\"pointer-none\"\n :icon=\"['fas', 'chevron-down']\"\n />\n <font-awesome-icon\n v-else\n class=\"pointer-none\"\n :icon=\"['fas', 'chevron-up']\"\n />\n </b-button>\n\n <b-collapse\n :visible=\"collapses[pageIndex(page)] || showChildren(page, children)\"\n @click.stop.prevent\n >\n <c-sidebar-nav-items\n class=\"ml-2\"\n :items=\"children\"\n :start-expanded=\"startExpanded\"\n :default-route-name=\"defaultRouteName\"\n v-on=\"$listeners\"\n />\n </b-collapse>\n </template>\n </b-button>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'CSidebarNavItems',\n\n props: {\n /*\n * {\n page: { name, title }\n params: {...}\n }\n */\n items: {\n type: Array,\n required: true,\n default: () => [],\n },\n defaultRouteName: {\n type: String,\n required: true,\n },\n startExpanded: {\n type: Boolean,\n required: false,\n },\n },\n\n data () {\n return {\n collapses: {},\n }\n },\n\n watch: {\n items: {\n handler: function (items) {\n for (const i of items) {\n this.setState(i.page, this.startExpanded)\n }\n },\n immediate: true,\n },\n },\n\n methods: {\n closeSidebar () {\n if (window.innerWidth < 576) {\n this.$root.$emit('close-sidebar')\n }\n },\n\n pageIndex (p) {\n return p.pageID || p.name || p.title\n },\n\n toggle (p) {\n const px = this.pageIndex(p)\n this.$set(this.collapses, px, !this.collapses[px])\n },\n\n setState (p, state = false) {\n const px = this.pageIndex(p)\n this.$set(this.collapses, px, state)\n },\n\n // Recursively check for child pages that are open, so that parents can open aswell\n showChildren (page = {}, children = []) {\n if (page.pageID === this.$route.params.pageID) {\n return page.pageID === this.$route.params.pageID\n }\n\n return children.map(({ page, children }) => this.showChildren(page, children)).some(isOpen => isOpen)\n },\n },\n}\n</script>\n\n<style scoped lang=\"scss\">\n// This has to be there, so chevrons are clickable inside the button\n.pointer-none {\n pointer-events: none;\n}\n\n.svg-inline--fa {\n width: 30px;\n}\n\n.nav-item > span > {\n .title {\n font-family: 'Poppins-Regular'\n }\n}\n\n.nav-active > span > {\n .icon {\n color: #4D7281;\n }\n\n .title {\n font-family: 'Poppins-SemiBold'\n }\n}\n</style>\n",".pointer-none {\n pointer-events: none;\n}\n\n.svg-inline--fa {\n width: 30px;\n}\n\n.nav-item > span > .title {\n font-family: \"Poppins-Regular\";\n}\n\n.nav-active > span > .icon {\n color: #4D7281;\n}\n.nav-active > span > .title {\n font-family: \"Poppins-SemiBold\";\n}\n\n/*# sourceMappingURL=CSidebarNavItems.vue.map */"]}, media: undefined });
|
|
83362
83389
|
|
|
83363
83390
|
};
|
|
83364
83391
|
/* scoped */
|
|
83365
|
-
const __vue_scope_id__$F = "data-v-
|
|
83392
|
+
const __vue_scope_id__$F = "data-v-48e0e128";
|
|
83366
83393
|
/* module identifier */
|
|
83367
83394
|
const __vue_module_identifier__$F = undefined;
|
|
83368
83395
|
/* functional template */
|
|
@@ -83761,7 +83788,7 @@ __vue_render__$A._withStripped = true;
|
|
|
83761
83788
|
/* style */
|
|
83762
83789
|
const __vue_inject_styles__$G = function (inject) {
|
|
83763
83790
|
if (!inject) return
|
|
83764
|
-
inject("data-v-
|
|
83791
|
+
inject("data-v-0353b5b3_0", { source: ".v-step {\n background: #5C5C5C;\n max-width: 320px;\n z-index: 10000;\n border-radius: 1.1rem;\n}\n.v-step--sticky {\n position: fixed;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.v-step--sticky .v-step__arrow {\n display: none;\n}\n.v-step__arrow,\n.v-step__arrow:before {\n position: absolute;\n width: 10px;\n height: 10px;\n background: inherit;\n}\n.v-step__arrow {\n visibility: hidden;\n}\n.v-step__arrow--dark:before {\n background: #5C5C5C;\n}\n.v-step__arrow:before {\n visibility: visible;\n content: \"\";\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n margin-left: -5px;\n}\n.v-step[data-popper-placement^=top] > .v-step__arrow {\n bottom: -5px;\n}\n.v-step[data-popper-placement^=bottom] > .v-step__arrow {\n top: -5px;\n}\n.v-step[data-popper-placement^=right] > .v-step__arrow {\n left: -5px;\n}\n.v-step[data-popper-placement^=left] > .v-step__arrow {\n right: -5px;\n}\n\n/*# sourceMappingURL=Tour.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/Tour/Tour.vue","Tour.vue"],"names":[],"mappings":"AA8IA;EACA,mBAAA;EACA,gBAAA;EACA,cAAA;EACA,qBAAA;AC7IA;AD+IA;EACA,eAAA;EACA,QAAA;EACA,SAAA;EACA,wCAAA;EACA,gCAAA;AC5IA;AD8IA;EACA,aAAA;AC3IA;AD6IA;;EAEA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,mBAAA;AC1IA;AD4IA;EACA,kBAAA;ACzIA;AD2IA;EACA,mBAAA;ACxIA;AD0IA;EACA,mBAAA;EACA,WAAA;EACA,gCAAA;EACA,wBAAA;EACA,iBAAA;ACvIA;ADyIA;EACA,YAAA;ACtIA;ADwIA;EACA,SAAA;ACrIA;ADuIA;EACA,UAAA;ACpIA;ADsIA;EACA,WAAA;ACnIA;;AAEA,mCAAmC","file":"Tour.vue","sourcesContent":["<template>\n <v-tour\n v-if=\"tour !== null\"\n :name=\"tour.name\"\n :steps=\"tour.steps\"\n :options=\"tour\"\n :callbacks=\"this.callbacks\"\n @onStop=\"onStop\"\n >\n <template slot-scope=\"tour\">\n <transition name=\"fade\">\n <template v-for=\"(step, index) of tour.steps\">\n <v-step\n v-if=\"tour.currentStep === index\"\n :key=\"index\"\n class=\"shadow p-3 text-light text-center\"\n :step=\"step\"\n :previous-step=\"tour.previousStep\"\n :next-step=\"tour.nextStep\"\n :stop=\"tour.stop\"\n :is-first=\"tour.isFirst\"\n :is-last=\"tour.isLast\"\n :labels=\"tour.labels\"\n @onStop=\"onStop\"\n >\n <div slot=\"header\">\n <h5\n v-if=\"(step.header || {}).title\"\n v-html=\"$t(step.header.title)\"\n />\n </div>\n\n <div slot=\"content\">\n <div class=\"p-1 mb-2\">\n <div v-html=\"$t(step.content)\" />\n </div>\n </div>\n\n <div\n slot=\"actions\"\n >\n <b-button\n variant=\"primary\"\n @click=\"onStop\"\n >\n <template v-if=\"tour.isLast && !(callbacks || {}).onNextRedirect\">\n {{ $t('buttons.end') }}\n </template>\n <template v-else>\n {{ $t('buttons.skip') }}\n </template>\n </b-button>\n <b-button\n v-if=\"tour.isFirst && (callbacks || {}).onPrevRedirect\"\n variant=\"primary\"\n :href=\"callbacks.onPrevRedirect\"\n >\n {{ $t('buttons.previous') }}\n </b-button>\n <b-button\n v-else-if=\"!tour.isFirst\"\n variant=\"primary\"\n @click=\"tour.previousStep\"\n >\n {{ $t('buttons.previous') }}\n </b-button>\n <b-button\n v-if=\"tour.isLast && (callbacks || {}).onNextRedirect\"\n variant=\"primary\"\n :href=\"callbacks.onNextRedirect\"\n >\n {{ $t('buttons.next') }}\n </b-button>\n <b-button\n v-else-if=\"!tour.isLast\"\n variant=\"primary\"\n @click=\"tour.nextStep\"\n >\n {{ $t('buttons.next') }}\n </b-button>\n </div>\n </v-step>\n </template>\n </transition>\n </template>\n </v-tour>\n</template>\n<script>\nexport default {\n name: 'TourComponent',\n i18nOptions: {\n namespaces: 'onboarding-tour',\n },\n props: {\n name: String,\n callbacks: {\n type: Object,\n },\n steps: {\n default: () => [],\n type: Array,\n },\n },\n computed: {\n labels () {\n return this.tour.labels\n },\n tour () {\n return {\n name: this.name,\n steps: this.steps.map(step => {\n return {\n name: step,\n target: `[data-v-onboarding=\"${step}\"]`,\n header: {\n title: this.$t(`steps.${step}.title`),\n },\n content: this.$t(`steps.${step}.content`),\n }\n }),\n }\n },\n },\n methods: {\n onStart () {\n if (JSON.parse(localStorage.getItem('corteza.tour')) && this.tour.steps.length) {\n this.$tours[this.tour.name].start()\n }\n },\n onStop () {\n localStorage.setItem('corteza.tour', JSON.stringify(false))\n this.$tours[this.tour.name].stop()\n },\n onStartClick () {\n localStorage.setItem('corteza.tour', JSON.stringify(true))\n this.onStart()\n },\n },\n}\n</script>\n\n<style lang=\"scss\">\n.v-step {\n background: #5C5C5C;\n max-width: 320px;\n z-index: 10000;\n border-radius: 1.1rem;\n}\n.v-step--sticky {\n position: fixed;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.v-step--sticky .v-step__arrow {\n display: none;\n}\n.v-step__arrow,\n.v-step__arrow:before {\n position: absolute;\n width: 10px;\n height: 10px;\n background: inherit;\n}\n.v-step__arrow {\n visibility: hidden;\n}\n.v-step__arrow--dark:before {\n background: #5C5C5C;\n}\n.v-step__arrow:before {\n visibility: visible;\n content: \"\";\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n margin-left: -5px;\n}\n.v-step[data-popper-placement^=\"top\"] > .v-step__arrow {\n bottom: -5px;\n}\n.v-step[data-popper-placement^=\"bottom\"] > .v-step__arrow {\n top: -5px;\n}\n.v-step[data-popper-placement^=\"right\"] > .v-step__arrow {\n left: -5px;\n}\n.v-step[data-popper-placement^=\"left\"] > .v-step__arrow {\n right: -5px;\n}\n</style>",".v-step {\n background: #5C5C5C;\n max-width: 320px;\n z-index: 10000;\n border-radius: 1.1rem;\n}\n\n.v-step--sticky {\n position: fixed;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.v-step--sticky .v-step__arrow {\n display: none;\n}\n\n.v-step__arrow,\n.v-step__arrow:before {\n position: absolute;\n width: 10px;\n height: 10px;\n background: inherit;\n}\n\n.v-step__arrow {\n visibility: hidden;\n}\n\n.v-step__arrow--dark:before {\n background: #5C5C5C;\n}\n\n.v-step__arrow:before {\n visibility: visible;\n content: \"\";\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n margin-left: -5px;\n}\n\n.v-step[data-popper-placement^=top] > .v-step__arrow {\n bottom: -5px;\n}\n\n.v-step[data-popper-placement^=bottom] > .v-step__arrow {\n top: -5px;\n}\n\n.v-step[data-popper-placement^=right] > .v-step__arrow {\n left: -5px;\n}\n\n.v-step[data-popper-placement^=left] > .v-step__arrow {\n right: -5px;\n}\n\n/*# sourceMappingURL=Tour.vue.map */"]}, media: undefined });
|
|
83765
83792
|
|
|
83766
83793
|
};
|
|
83767
83794
|
/* scoped */
|
|
@@ -84437,7 +84464,7 @@ __vue_render__$G._withStripped = true;
|
|
|
84437
84464
|
/* style */
|
|
84438
84465
|
const __vue_inject_styles__$N = function (inject) {
|
|
84439
84466
|
if (!inject) return
|
|
84440
|
-
inject("data-v-
|
|
84467
|
+
inject("data-v-48660d74_0", { source: ".toast.overflow-unset {\n overflow: unset !important;\n}\n\n/*# sourceMappingURL=CToaster.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/toaster/CToaster.vue","CToaster.vue"],"names":[],"mappings":"AA6EA;EACA,0BAAA;AC5EA;;AAEA,uCAAuC","file":"CToaster.vue","sourcesContent":["<template>\n <div>\n <b-toast\n v-for=\"t in toasts\"\n :key=\"t.id\"\n visible\n v-bind=\"t.options || {}\"\n :title=\"t.payload.title\"\n :no-close-button=\"!t.actions.hide\"\n toast-class=\"overflow-unset\"\n @hide=\"t.actions.hide ? t.actions.hide.cb(t) : evtSink\"\n >\n <b-card\n header-bg-variant=\"transparent\"\n bg-variant=\"transparent\"\n body-class=\"p-0\"\n class=\"border-0\"\n >\n <b-card-text>\n {{ t.payload.notes }}\n </b-card-text>\n\n <b-card-text v-if=\"t.payload.link\">\n <c-toaster-link :toast=\"t\" />\n </b-card-text>\n\n <component\n :is=\"actComponent(act)\"\n v-for=\"([name, act]) in extraActions(t)\"\n :key=\"name\"\n class=\"mr-1\"\n v-bind=\"act\"\n @action=\"act.cb ? act.cb(t, $event) : evtSink\"\n />\n </b-card>\n </b-toast>\n </div>\n</template>\n\n<script lang=\"js\">\nimport * as actions from './actions'\nimport CToasterLink from './CToasterLink.vue'\n\nexport default {\n components: {\n CToasterLink,\n },\n\n props: {\n toasts: {\n type: Array,\n required: false,\n default: () => [],\n },\n },\n\n methods: {\n extraActions ({ actions = {} }) {\n const { hide, ...act } = actions\n return Object.entries(act)\n },\n\n actComponent ({ kind }) {\n const act = actions[kind]\n if (!act) {\n throw new Error('toast.actionKind.unknown')\n }\n return act\n },\n\n evtSink () {},\n },\n}\n</script>\n\n<style lang=\"scss\">\n// BS only provides overflow-[auto, hidden]\n.toast.overflow-unset {\n overflow: unset!important;\n}\n</style>\n",".toast.overflow-unset {\n overflow: unset !important;\n}\n\n/*# sourceMappingURL=CToaster.vue.map */"]}, media: undefined });
|
|
84441
84468
|
|
|
84442
84469
|
};
|
|
84443
84470
|
/* scoped */
|
|
@@ -84571,7 +84598,7 @@ __vue_render__$H._withStripped = true;
|
|
|
84571
84598
|
/* style */
|
|
84572
84599
|
const __vue_inject_styles__$O = function (inject) {
|
|
84573
84600
|
if (!inject) return
|
|
84574
|
-
inject("data-v-
|
|
84601
|
+
inject("data-v-2125ea60_0", { source: ".reminder-sidebar-header {\n height: 64px;\n background-color: #F4F7FA;\n}\n\n/*# sourceMappingURL=CReminderSidebar.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/reminders/CReminderSidebar.vue","CReminderSidebar.vue"],"names":[],"mappings":"AAsEA;EACA,YAAA;EACA,yBAAA;ACrEA;;AAEA,+CAA+C","file":"CReminderSidebar.vue","sourcesContent":["<template>\n <b-sidebar\n v-model=\"isVisible\"\n header-class=\"d-flex align-items-center justify-content-between reminder-sidebar-header px-2 py-3 border-bottom\"\n body-class=\"bg-white px-2\"\n :title=\"title\"\n :backdrop=\"isMobile\"\n no-footer\n right\n shadow\n no-close-on-route-change\n no-close-on-esc\n >\n <template #header>\n <h4\n class=\"text-primary mb-0\"\n >\n <b>{{ title }}</b>\n </h4>\n\n <b-button\n variant=\"outline-light border-0\"\n class=\"d-flex align-items-center justify-content-center p-2\"\n @click=\"isVisible = false\"\n >\n <font-awesome-icon\n :icon=\"['fas', 'times']\"\n class=\"h6 mb-0 text-dark\"\n />\n </b-button>\n </template>\n\n <slot />\n </b-sidebar>\n</template>\n\n<script lang=\"js\">\nexport default {\n props: {\n title: {\n type: String,\n default: '',\n },\n\n visible: {\n type: Boolean,\n required: false,\n default: false,\n },\n },\n\n computed: {\n isVisible: {\n get () {\n return this.visible\n },\n\n set (visible) {\n this.$emit('update:visible', visible)\n },\n },\n\n isMobile () {\n return window.innerWidth < 576\n },\n },\n}\n</script>\n\n<style lang=\"scss\">\n.reminder-sidebar-header {\n height: 64px;\n background-color: #F4F7FA;\n}\n</style>\n",".reminder-sidebar-header {\n height: 64px;\n background-color: #F4F7FA;\n}\n\n/*# sourceMappingURL=CReminderSidebar.vue.map */"]}, media: undefined });
|
|
84575
84602
|
|
|
84576
84603
|
};
|
|
84577
84604
|
/* scoped */
|
|
@@ -84599,77 +84626,63 @@ __vue_render__$H._withStripped = true;
|
|
|
84599
84626
|
undefined
|
|
84600
84627
|
);
|
|
84601
84628
|
|
|
84602
|
-
|
|
84603
|
-
|
|
84604
|
-
|
|
84605
|
-
|
|
84606
|
-
|
|
84607
|
-
|
|
84608
|
-
|
|
84609
|
-
|
|
84610
|
-
|
|
84611
|
-
|
|
84612
|
-
|
|
84613
|
-
|
|
84614
|
-
|
|
84615
|
-
|
|
84616
|
-
|
|
84617
|
-
|
|
84618
|
-
|
|
84619
|
-
|
|
84620
|
-
|
|
84621
|
-
|
|
84622
|
-
|
|
84623
|
-
|
|
84624
|
-
|
|
84625
|
-
|
|
84626
|
-
|
|
84627
|
-
|
|
84628
|
-
/**
|
|
84629
|
-
* Returns all components that match the given path
|
|
84630
|
-
*
|
|
84631
|
-
* @param cat Catalogue
|
|
84632
|
-
* @param path Array of groups that represent the path
|
|
84633
|
-
|
|
84634
|
-
*/
|
|
84635
|
-
function ExtractComponents(cat, ...path) {
|
|
84636
|
-
const jpath = path.join(del$1);
|
|
84637
|
-
return Object.values(cat)
|
|
84638
|
-
.filter(({ group }) => (group || []).join(del$1) === jpath);
|
|
84639
|
-
}
|
|
84640
|
-
|
|
84629
|
+
//
|
|
84630
|
+
//
|
|
84631
|
+
//
|
|
84632
|
+
//
|
|
84633
|
+
//
|
|
84634
|
+
//
|
|
84635
|
+
//
|
|
84636
|
+
//
|
|
84637
|
+
//
|
|
84638
|
+
//
|
|
84639
|
+
//
|
|
84640
|
+
//
|
|
84641
|
+
//
|
|
84642
|
+
//
|
|
84643
|
+
//
|
|
84644
|
+
//
|
|
84645
|
+
//
|
|
84646
|
+
//
|
|
84647
|
+
//
|
|
84648
|
+
//
|
|
84649
|
+
//
|
|
84650
|
+
//
|
|
84651
|
+
//
|
|
84652
|
+
//
|
|
84653
|
+
//
|
|
84654
|
+
//
|
|
84641
84655
|
//
|
|
84642
84656
|
var script$O = {
|
|
84643
|
-
name:
|
|
84657
|
+
name: "FieldItem",
|
|
84644
84658
|
props: {
|
|
84645
|
-
|
|
84646
|
-
|
|
84647
|
-
|
|
84659
|
+
field: {
|
|
84660
|
+
type: Object,
|
|
84661
|
+
required: true
|
|
84648
84662
|
},
|
|
84649
|
-
|
|
84663
|
+
isSelected: {
|
|
84664
|
+
type: Boolean,
|
|
84665
|
+
required: true
|
|
84666
|
+
},
|
|
84667
|
+
selectedFields: {
|
|
84650
84668
|
type: Array,
|
|
84651
|
-
|
|
84669
|
+
required: true
|
|
84670
|
+
},
|
|
84671
|
+
systemFieldLabel: {
|
|
84672
|
+
type: String,
|
|
84673
|
+
required: true
|
|
84652
84674
|
}
|
|
84653
84675
|
},
|
|
84654
84676
|
computed: {
|
|
84655
|
-
|
|
84656
|
-
|
|
84657
|
-
return this.path.length === 0;
|
|
84658
|
-
},
|
|
84659
|
-
|
|
84660
|
-
// name of the current group
|
|
84661
|
-
group() {
|
|
84662
|
-
return this.root ? undefined : this.path[this.path.length - 1];
|
|
84663
|
-
},
|
|
84677
|
+
fieldLabel() {
|
|
84678
|
+
let fieldLabel = this.field.name || "";
|
|
84664
84679
|
|
|
84665
|
-
|
|
84666
|
-
|
|
84667
|
-
|
|
84668
|
-
},
|
|
84680
|
+
if (this.field.label) {
|
|
84681
|
+
fieldLabel = `${this.field.label} (${this.field.name})`;
|
|
84682
|
+
}
|
|
84669
84683
|
|
|
84670
|
-
|
|
84671
|
-
|
|
84672
|
-
return ExtractComponents(this.catalogue, ...this.path);
|
|
84684
|
+
fieldLabel += this.field.isRequired ? " *" : "";
|
|
84685
|
+
return fieldLabel;
|
|
84673
84686
|
}
|
|
84674
84687
|
|
|
84675
84688
|
}
|
|
@@ -84683,70 +84696,47 @@ var __vue_render__$I = function() {
|
|
|
84683
84696
|
var _vm = this;
|
|
84684
84697
|
var _h = _vm.$createElement;
|
|
84685
84698
|
var _c = _vm._self._c || _h;
|
|
84686
|
-
return _c(
|
|
84687
|
-
|
|
84688
|
-
|
|
84689
|
-
|
|
84690
|
-
|
|
84691
|
-
|
|
84692
|
-
|
|
84693
|
-
|
|
84694
|
-
|
|
84695
|
-
|
|
84696
|
-
|
|
84697
|
-
|
|
84698
|
-
|
|
84699
|
-
|
|
84700
|
-
|
|
84701
|
-
|
|
84702
|
-
|
|
84703
|
-
|
|
84704
|
-
|
|
84705
|
-
|
|
84706
|
-
|
|
84707
|
-
|
|
84708
|
-
|
|
84709
|
-
|
|
84710
|
-
|
|
84711
|
-
|
|
84712
|
-
|
|
84713
|
-
|
|
84714
|
-
|
|
84715
|
-
|
|
84716
|
-
|
|
84717
|
-
|
|
84718
|
-
|
|
84719
|
-
|
|
84720
|
-
|
|
84721
|
-
|
|
84722
|
-
|
|
84723
|
-
|
|
84724
|
-
|
|
84725
|
-
|
|
84726
|
-
|
|
84727
|
-
)
|
|
84728
|
-
}),
|
|
84729
|
-
_vm._v(" "),
|
|
84730
|
-
_vm._l(_vm.subgroups, function(group) {
|
|
84731
|
-
return _c("component-list", {
|
|
84732
|
-
key: group,
|
|
84733
|
-
staticClass: "my-3",
|
|
84734
|
-
attrs: {
|
|
84735
|
-
catalogue: _vm.catalogue,
|
|
84736
|
-
path: _vm.path.concat([group])
|
|
84737
|
-
},
|
|
84738
|
-
on: {
|
|
84739
|
-
select: function($event) {
|
|
84740
|
-
return _vm.$emit("select", $event)
|
|
84741
|
-
}
|
|
84742
|
-
}
|
|
84743
|
-
})
|
|
84744
|
-
})
|
|
84745
|
-
],
|
|
84746
|
-
2
|
|
84747
|
-
)
|
|
84748
|
-
: _vm._e()
|
|
84749
|
-
])
|
|
84699
|
+
return _c(
|
|
84700
|
+
"div",
|
|
84701
|
+
{ staticClass: "d-flex align-items-center" },
|
|
84702
|
+
[
|
|
84703
|
+
_c("font-awesome-icon", {
|
|
84704
|
+
staticClass: "handle align-baseline mr-3 text-primary",
|
|
84705
|
+
attrs: { icon: ["fas", "grip-vertical"] }
|
|
84706
|
+
}),
|
|
84707
|
+
_vm._v(" "),
|
|
84708
|
+
_c("b", { staticClass: "cursor-default text-dark text-truncate" }, [
|
|
84709
|
+
_vm._v("\n " + _vm._s(_vm.fieldLabel) + "\n ")
|
|
84710
|
+
]),
|
|
84711
|
+
_vm._v(" "),
|
|
84712
|
+
_vm.field.isSystem
|
|
84713
|
+
? _c("small", { staticClass: "cursor-default ml-1 text-truncate" }, [
|
|
84714
|
+
_vm._v("\n " + _vm._s(_vm.systemFieldLabel) + "\n ")
|
|
84715
|
+
])
|
|
84716
|
+
: _vm._e(),
|
|
84717
|
+
_vm._v(" "),
|
|
84718
|
+
_vm.isSelected
|
|
84719
|
+
? _c("font-awesome-icon", {
|
|
84720
|
+
staticClass: "align-baseline ml-auto text-muted pointer",
|
|
84721
|
+
attrs: { icon: ["far", "eye"] },
|
|
84722
|
+
on: {
|
|
84723
|
+
click: function($event) {
|
|
84724
|
+
return _vm.$emit("unselect-field", _vm.field)
|
|
84725
|
+
}
|
|
84726
|
+
}
|
|
84727
|
+
})
|
|
84728
|
+
: _c("font-awesome-icon", {
|
|
84729
|
+
staticClass: "align-baseline ml-auto text-muted pointer",
|
|
84730
|
+
attrs: { icon: ["fas", "eye-slash"] },
|
|
84731
|
+
on: {
|
|
84732
|
+
click: function($event) {
|
|
84733
|
+
return _vm.$emit("select-field", _vm.field)
|
|
84734
|
+
}
|
|
84735
|
+
}
|
|
84736
|
+
})
|
|
84737
|
+
],
|
|
84738
|
+
1
|
|
84739
|
+
)
|
|
84750
84740
|
};
|
|
84751
84741
|
var __vue_staticRenderFns__$I = [];
|
|
84752
84742
|
__vue_render__$I._withStripped = true;
|
|
@@ -84754,11 +84744,11 @@ __vue_render__$I._withStripped = true;
|
|
|
84754
84744
|
/* style */
|
|
84755
84745
|
const __vue_inject_styles__$P = function (inject) {
|
|
84756
84746
|
if (!inject) return
|
|
84757
|
-
inject("data-v-
|
|
84747
|
+
inject("data-v-751c31b8_0", { source: "\n.handle[data-v-751c31b8] {\n cursor: grab;\n}\n.cursor-default[data-v-751c31b8] {\n cursor: default;\n}\n", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/field/FieldItem.vue"],"names":[],"mappings":";AAoEA;EACA,YAAA;AACA;AAEA;EACA,eAAA;AACA","file":"FieldItem.vue","sourcesContent":["<template>\n <div class=\"d-flex align-items-center\">\n <font-awesome-icon\n :icon=\"['fas', 'grip-vertical']\"\n class=\"handle align-baseline mr-3 text-primary\"\n />\n <b class=\"cursor-default text-dark text-truncate\">\n {{ fieldLabel }}\n </b>\n <small v-if=\"field.isSystem\" class=\"cursor-default ml-1 text-truncate\">\n {{ systemFieldLabel }}\n </small>\n <font-awesome-icon\n v-if=\"isSelected\"\n :icon=\"['far', 'eye']\"\n class=\"align-baseline ml-auto text-muted pointer\"\n @click=\"$emit('unselect-field', field)\"\n />\n <font-awesome-icon\n v-else\n :icon=\"['fas', 'eye-slash']\"\n class=\"align-baseline ml-auto text-muted pointer\"\n @click=\"$emit('select-field', field)\"\n />\n </div>\n</template>\n\n<script>\nexport default {\n name: \"FieldItem\",\n\n props: {\n field: {\n type: Object,\n required: true,\n },\n\n isSelected: {\n type: Boolean,\n required: true,\n },\n\n selectedFields: {\n type: Array,\n required: true,\n },\n\n systemFieldLabel: {\n type: String,\n required: true,\n }\n },\n\n computed: {\n fieldLabel() {\n let fieldLabel = this.field.name || \"\";\n\n if (this.field.label) {\n fieldLabel = `${this.field.label} (${this.field.name})`;\n }\n\n fieldLabel += this.field.isRequired ? \" *\" : \"\";\n return fieldLabel;\n },\n },\n};\n</script>\n<style scoped>\n.handle {\n cursor: grab;\n}\n\n.cursor-default {\n cursor: default;\n}\n</style>\n"]}, media: undefined });
|
|
84758
84748
|
|
|
84759
84749
|
};
|
|
84760
84750
|
/* scoped */
|
|
84761
|
-
const __vue_scope_id__$P = "data-v-
|
|
84751
|
+
const __vue_scope_id__$P = "data-v-751c31b8";
|
|
84762
84752
|
/* module identifier */
|
|
84763
84753
|
const __vue_module_identifier__$P = undefined;
|
|
84764
84754
|
/* functional template */
|
|
@@ -84784,9 +84774,639 @@ __vue_render__$I._withStripped = true;
|
|
|
84784
84774
|
|
|
84785
84775
|
//
|
|
84786
84776
|
var script$P = {
|
|
84777
|
+
components: {
|
|
84778
|
+
draggable,
|
|
84779
|
+
FieldItem: __vue_component__$P
|
|
84780
|
+
},
|
|
84781
|
+
props: {
|
|
84782
|
+
module: {
|
|
84783
|
+
type: Object,
|
|
84784
|
+
required: true
|
|
84785
|
+
},
|
|
84786
|
+
fields: {
|
|
84787
|
+
type: Array,
|
|
84788
|
+
required: true
|
|
84789
|
+
},
|
|
84790
|
+
disabled: {
|
|
84791
|
+
type: Boolean,
|
|
84792
|
+
default: false
|
|
84793
|
+
},
|
|
84794
|
+
disabledTypes: {
|
|
84795
|
+
type: Array,
|
|
84796
|
+
default: () => []
|
|
84797
|
+
},
|
|
84798
|
+
disableSystemFields: {
|
|
84799
|
+
type: Boolean,
|
|
84800
|
+
default: false
|
|
84801
|
+
},
|
|
84802
|
+
systemFields: {
|
|
84803
|
+
type: Array,
|
|
84804
|
+
default: null
|
|
84805
|
+
},
|
|
84806
|
+
fieldSubset: {
|
|
84807
|
+
type: Array,
|
|
84808
|
+
default: null
|
|
84809
|
+
},
|
|
84810
|
+
group: {
|
|
84811
|
+
type: String,
|
|
84812
|
+
default: 'fields'
|
|
84813
|
+
},
|
|
84814
|
+
maxHeight: {
|
|
84815
|
+
type: String,
|
|
84816
|
+
default: 'max-height: 65vh;'
|
|
84817
|
+
},
|
|
84818
|
+
labels: {
|
|
84819
|
+
type: Object,
|
|
84820
|
+
required: true
|
|
84821
|
+
}
|
|
84822
|
+
},
|
|
84823
|
+
|
|
84824
|
+
data() {
|
|
84825
|
+
return {
|
|
84826
|
+
modules: [],
|
|
84827
|
+
query: ''
|
|
84828
|
+
};
|
|
84829
|
+
},
|
|
84830
|
+
|
|
84831
|
+
computed: {
|
|
84832
|
+
selectedFields: {
|
|
84833
|
+
get() {
|
|
84834
|
+
// Needs to be done this way so it retains order of fields
|
|
84835
|
+
return this.fields.reduce((fields, field) => {
|
|
84836
|
+
field = this.allFields.find(({
|
|
84837
|
+
name
|
|
84838
|
+
}) => name === field.name);
|
|
84839
|
+
|
|
84840
|
+
if (field) {
|
|
84841
|
+
fields.push(field);
|
|
84842
|
+
}
|
|
84843
|
+
|
|
84844
|
+
return fields;
|
|
84845
|
+
}, []);
|
|
84846
|
+
},
|
|
84847
|
+
|
|
84848
|
+
set(f) {
|
|
84849
|
+
this.$emit('update:fields', f);
|
|
84850
|
+
}
|
|
84851
|
+
|
|
84852
|
+
},
|
|
84853
|
+
|
|
84854
|
+
allFields() {
|
|
84855
|
+
let mFields = [];
|
|
84856
|
+
|
|
84857
|
+
if (this.fieldSubset) {
|
|
84858
|
+
mFields = this.module.filterFields(this.fieldSubset);
|
|
84859
|
+
} else {
|
|
84860
|
+
mFields = this.module.fields;
|
|
84861
|
+
}
|
|
84862
|
+
|
|
84863
|
+
if (this.disabledTypes.length > 0) {
|
|
84864
|
+
mFields = mFields.filter(({
|
|
84865
|
+
kind
|
|
84866
|
+
}) => !this.disabledTypes.find(t => t === kind));
|
|
84867
|
+
}
|
|
84868
|
+
|
|
84869
|
+
let sysFields = [];
|
|
84870
|
+
|
|
84871
|
+
if (!this.disableSystemFields) {
|
|
84872
|
+
sysFields = this.module.systemFields();
|
|
84873
|
+
|
|
84874
|
+
if (this.systemFields) {
|
|
84875
|
+
sysFields = sysFields.filter(({
|
|
84876
|
+
name
|
|
84877
|
+
}) => this.systemFields.find(sf => sf === name));
|
|
84878
|
+
}
|
|
84879
|
+
} else {
|
|
84880
|
+
mFields = mFields.filter(({
|
|
84881
|
+
isSystem
|
|
84882
|
+
}) => !isSystem);
|
|
84883
|
+
}
|
|
84884
|
+
|
|
84885
|
+
return [...[...mFields].sort((a, b) => a.label.localeCompare(b.label)), ...sysFields];
|
|
84886
|
+
},
|
|
84887
|
+
|
|
84888
|
+
allSelected() {
|
|
84889
|
+
return this.availableFields.length > 0;
|
|
84890
|
+
},
|
|
84891
|
+
|
|
84892
|
+
allUnselected() {
|
|
84893
|
+
return this.selectedFields.length > 0;
|
|
84894
|
+
},
|
|
84895
|
+
|
|
84896
|
+
availableFields() {
|
|
84897
|
+
// Remove selected fields
|
|
84898
|
+
return this.allFields.filter(a => !this.fields.some(f => a.name === f.name));
|
|
84899
|
+
},
|
|
84900
|
+
|
|
84901
|
+
filteredAvailableFields() {
|
|
84902
|
+
return this.filterFields(this.availableFields);
|
|
84903
|
+
},
|
|
84904
|
+
|
|
84905
|
+
filteredSelectedFields() {
|
|
84906
|
+
return this.filterFields(this.selectedFields);
|
|
84907
|
+
}
|
|
84908
|
+
|
|
84909
|
+
},
|
|
84910
|
+
watch: {
|
|
84911
|
+
'moduleID'(o, n) {
|
|
84912
|
+
if (o !== n) {
|
|
84913
|
+
this.selectedFields = [];
|
|
84914
|
+
}
|
|
84915
|
+
}
|
|
84916
|
+
|
|
84917
|
+
},
|
|
84918
|
+
methods: {
|
|
84919
|
+
filterFields(fields) {
|
|
84920
|
+
return fields.filter(f => f.name.toLowerCase().indexOf(this.query.toLowerCase()) > -1 || f.label.toLowerCase().indexOf(this.query.toLowerCase()) > -1);
|
|
84921
|
+
},
|
|
84922
|
+
|
|
84923
|
+
selectField(field) {
|
|
84924
|
+
if (this.selectedFields.some(selectedField => selectedField.label === field.label)) return;
|
|
84925
|
+
this.selectedFields = [...this.selectedFields, field];
|
|
84926
|
+
},
|
|
84927
|
+
|
|
84928
|
+
unselectField(field) {
|
|
84929
|
+
this.selectedFields = this.selectedFields.filter(({
|
|
84930
|
+
name
|
|
84931
|
+
}) => field.name !== name);
|
|
84932
|
+
}
|
|
84933
|
+
|
|
84934
|
+
}
|
|
84935
|
+
};
|
|
84936
|
+
|
|
84937
|
+
/* script */
|
|
84938
|
+
const __vue_script__$P = script$P;
|
|
84939
|
+
|
|
84940
|
+
/* template */
|
|
84941
|
+
var __vue_render__$J = function() {
|
|
84942
|
+
var _vm = this;
|
|
84943
|
+
var _h = _vm.$createElement;
|
|
84944
|
+
var _c = _vm._self._c || _h;
|
|
84945
|
+
return _c(
|
|
84946
|
+
"div",
|
|
84947
|
+
{ staticClass: "overflow-hidden" },
|
|
84948
|
+
[
|
|
84949
|
+
_c(
|
|
84950
|
+
"b-input-group",
|
|
84951
|
+
[
|
|
84952
|
+
_c("b-input", {
|
|
84953
|
+
staticClass: "text-truncate",
|
|
84954
|
+
attrs: {
|
|
84955
|
+
type: "search",
|
|
84956
|
+
placeholder: _vm.labels.searchPlaceholder
|
|
84957
|
+
},
|
|
84958
|
+
model: {
|
|
84959
|
+
value: _vm.query,
|
|
84960
|
+
callback: function($$v) {
|
|
84961
|
+
_vm.query = typeof $$v === "string" ? $$v.trim() : $$v;
|
|
84962
|
+
},
|
|
84963
|
+
expression: "query"
|
|
84964
|
+
}
|
|
84965
|
+
}),
|
|
84966
|
+
_vm._v(" "),
|
|
84967
|
+
_c(
|
|
84968
|
+
"b-input-group-append",
|
|
84969
|
+
[
|
|
84970
|
+
_c(
|
|
84971
|
+
"b-input-group-text",
|
|
84972
|
+
{ staticClass: "text-primary bg-white border-left-0" },
|
|
84973
|
+
[
|
|
84974
|
+
_c("font-awesome-icon", {
|
|
84975
|
+
attrs: { icon: ["fas", "search"] }
|
|
84976
|
+
})
|
|
84977
|
+
],
|
|
84978
|
+
1
|
|
84979
|
+
)
|
|
84980
|
+
],
|
|
84981
|
+
1
|
|
84982
|
+
)
|
|
84983
|
+
],
|
|
84984
|
+
1
|
|
84985
|
+
),
|
|
84986
|
+
_vm._v(" "),
|
|
84987
|
+
_c(
|
|
84988
|
+
"b-row",
|
|
84989
|
+
{ staticClass: "mt-2 h-100" },
|
|
84990
|
+
[
|
|
84991
|
+
_c(
|
|
84992
|
+
"b-col",
|
|
84993
|
+
{ attrs: { cols: "12", sm: "6" } },
|
|
84994
|
+
[
|
|
84995
|
+
_c(
|
|
84996
|
+
"div",
|
|
84997
|
+
{ staticClass: "d-flex align-items-center" },
|
|
84998
|
+
[
|
|
84999
|
+
_c("label", { staticClass: "text-primary mb-0" }, [
|
|
85000
|
+
_vm._v(
|
|
85001
|
+
"\n " +
|
|
85002
|
+
_vm._s(_vm.labels.availableFieldsLabel) +
|
|
85003
|
+
"\n "
|
|
85004
|
+
)
|
|
85005
|
+
]),
|
|
85006
|
+
_vm._v(" "),
|
|
85007
|
+
_c(
|
|
85008
|
+
"b-button",
|
|
85009
|
+
{
|
|
85010
|
+
staticClass: "ml-auto px-0 text-muted",
|
|
85011
|
+
class: [_vm.allSelected ? "visible" : "invisible"],
|
|
85012
|
+
attrs: { variant: "link" },
|
|
85013
|
+
on: {
|
|
85014
|
+
click: function($event) {
|
|
85015
|
+
$event.preventDefault();
|
|
85016
|
+
_vm.selectedFields = [].concat(_vm.allFields);
|
|
85017
|
+
}
|
|
85018
|
+
}
|
|
85019
|
+
},
|
|
85020
|
+
[
|
|
85021
|
+
_vm._v(
|
|
85022
|
+
"\n " +
|
|
85023
|
+
_vm._s(_vm.labels.selectAllFieldsLabel) +
|
|
85024
|
+
"\n "
|
|
85025
|
+
)
|
|
85026
|
+
]
|
|
85027
|
+
)
|
|
85028
|
+
],
|
|
85029
|
+
1
|
|
85030
|
+
),
|
|
85031
|
+
_vm._v(" "),
|
|
85032
|
+
_c(
|
|
85033
|
+
"b-list-group",
|
|
85034
|
+
{ attrs: { vertical: "" } },
|
|
85035
|
+
[
|
|
85036
|
+
_c(
|
|
85037
|
+
"draggable",
|
|
85038
|
+
{
|
|
85039
|
+
key: _vm.filteredAvailableFields.length,
|
|
85040
|
+
staticClass: "overflow-auto",
|
|
85041
|
+
style: "" + _vm.maxHeight,
|
|
85042
|
+
attrs: {
|
|
85043
|
+
handle: ".handle",
|
|
85044
|
+
disabled: _vm.disabled,
|
|
85045
|
+
group: _vm.group,
|
|
85046
|
+
value: _vm.filteredAvailableFields
|
|
85047
|
+
}
|
|
85048
|
+
},
|
|
85049
|
+
_vm._l(_vm.filteredAvailableFields, function(field) {
|
|
85050
|
+
return _c(
|
|
85051
|
+
"b-list-group-item",
|
|
85052
|
+
{
|
|
85053
|
+
key: field.name,
|
|
85054
|
+
staticClass: "mb-3 border rounded",
|
|
85055
|
+
on: {
|
|
85056
|
+
dblclick: function($event) {
|
|
85057
|
+
return _vm.selectField(field)
|
|
85058
|
+
}
|
|
85059
|
+
}
|
|
85060
|
+
},
|
|
85061
|
+
[
|
|
85062
|
+
_c("field-item", {
|
|
85063
|
+
attrs: {
|
|
85064
|
+
field: field,
|
|
85065
|
+
"selected-fields": _vm.selectedFields,
|
|
85066
|
+
"is-selected": false,
|
|
85067
|
+
"system-field-label": _vm.labels.systemFieldLabel
|
|
85068
|
+
},
|
|
85069
|
+
on: { "select-field": _vm.selectField }
|
|
85070
|
+
})
|
|
85071
|
+
],
|
|
85072
|
+
1
|
|
85073
|
+
)
|
|
85074
|
+
}),
|
|
85075
|
+
1
|
|
85076
|
+
)
|
|
85077
|
+
],
|
|
85078
|
+
1
|
|
85079
|
+
)
|
|
85080
|
+
],
|
|
85081
|
+
1
|
|
85082
|
+
),
|
|
85083
|
+
_vm._v(" "),
|
|
85084
|
+
_c(
|
|
85085
|
+
"b-col",
|
|
85086
|
+
{ staticClass: "pl-sm-0", attrs: { cols: "12", sm: "6" } },
|
|
85087
|
+
[
|
|
85088
|
+
_c(
|
|
85089
|
+
"div",
|
|
85090
|
+
{ staticClass: "d-flex align-items-center" },
|
|
85091
|
+
[
|
|
85092
|
+
_c("label", { staticClass: "mb-0 text-primary" }, [
|
|
85093
|
+
_vm._v(
|
|
85094
|
+
"\n " +
|
|
85095
|
+
_vm._s(_vm.labels.selectedFieldsLabel) +
|
|
85096
|
+
"\n "
|
|
85097
|
+
)
|
|
85098
|
+
]),
|
|
85099
|
+
_vm._v(" "),
|
|
85100
|
+
_c(
|
|
85101
|
+
"b-button",
|
|
85102
|
+
{
|
|
85103
|
+
staticClass: "ml-auto px-0 text-muted",
|
|
85104
|
+
class: [_vm.allUnselected ? "visible" : "invisible"],
|
|
85105
|
+
attrs: { variant: "link" },
|
|
85106
|
+
on: {
|
|
85107
|
+
click: function($event) {
|
|
85108
|
+
$event.preventDefault();
|
|
85109
|
+
_vm.selectedFields = [];
|
|
85110
|
+
}
|
|
85111
|
+
}
|
|
85112
|
+
},
|
|
85113
|
+
[
|
|
85114
|
+
_vm._v(
|
|
85115
|
+
"\n " +
|
|
85116
|
+
_vm._s(_vm.labels.unselectAllFieldsLabel) +
|
|
85117
|
+
"\n "
|
|
85118
|
+
)
|
|
85119
|
+
]
|
|
85120
|
+
)
|
|
85121
|
+
],
|
|
85122
|
+
1
|
|
85123
|
+
),
|
|
85124
|
+
_vm._v(" "),
|
|
85125
|
+
_c(
|
|
85126
|
+
"b-list-group",
|
|
85127
|
+
{ attrs: { vertical: "" } },
|
|
85128
|
+
[
|
|
85129
|
+
_c(
|
|
85130
|
+
"draggable",
|
|
85131
|
+
{
|
|
85132
|
+
staticClass: "overflow-auto",
|
|
85133
|
+
style: "" + _vm.maxHeight,
|
|
85134
|
+
attrs: {
|
|
85135
|
+
handle: ".handle",
|
|
85136
|
+
disabled: _vm.disabled,
|
|
85137
|
+
group: _vm.group
|
|
85138
|
+
},
|
|
85139
|
+
model: {
|
|
85140
|
+
value: _vm.selectedFields,
|
|
85141
|
+
callback: function($$v) {
|
|
85142
|
+
_vm.selectedFields = $$v;
|
|
85143
|
+
},
|
|
85144
|
+
expression: "selectedFields"
|
|
85145
|
+
}
|
|
85146
|
+
},
|
|
85147
|
+
_vm._l(_vm.filteredSelectedFields, function(field) {
|
|
85148
|
+
return _c(
|
|
85149
|
+
"b-list-group-item",
|
|
85150
|
+
{
|
|
85151
|
+
key: field.name,
|
|
85152
|
+
staticClass: "mb-3 border rounded",
|
|
85153
|
+
on: {
|
|
85154
|
+
dblclick: function($event) {
|
|
85155
|
+
return _vm.unselectField(field)
|
|
85156
|
+
}
|
|
85157
|
+
}
|
|
85158
|
+
},
|
|
85159
|
+
[
|
|
85160
|
+
_c("field-item", {
|
|
85161
|
+
attrs: {
|
|
85162
|
+
field: field,
|
|
85163
|
+
"selected-fields": _vm.selectedFields,
|
|
85164
|
+
"is-selected": true,
|
|
85165
|
+
"system-field-label": _vm.labels.systemFieldLabel
|
|
85166
|
+
},
|
|
85167
|
+
on: { "unselect-field": _vm.unselectField }
|
|
85168
|
+
})
|
|
85169
|
+
],
|
|
85170
|
+
1
|
|
85171
|
+
)
|
|
85172
|
+
}),
|
|
85173
|
+
1
|
|
85174
|
+
)
|
|
85175
|
+
],
|
|
85176
|
+
1
|
|
85177
|
+
)
|
|
85178
|
+
],
|
|
85179
|
+
1
|
|
85180
|
+
)
|
|
85181
|
+
],
|
|
85182
|
+
1
|
|
85183
|
+
)
|
|
85184
|
+
],
|
|
85185
|
+
1
|
|
85186
|
+
)
|
|
85187
|
+
};
|
|
85188
|
+
var __vue_staticRenderFns__$J = [];
|
|
85189
|
+
__vue_render__$J._withStripped = true;
|
|
85190
|
+
|
|
85191
|
+
/* style */
|
|
85192
|
+
const __vue_inject_styles__$Q = function (inject) {
|
|
85193
|
+
if (!inject) return
|
|
85194
|
+
inject("data-v-d614af34_0", { source: ".handle[data-v-d614af34] {\n cursor: grab;\n}\n\n/*# sourceMappingURL=FieldPicker.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/field/FieldPicker.vue","FieldPicker.vue"],"names":[],"mappings":"AA2RA;EACA,YAAA;AC1RA;;AAEA,0CAA0C","file":"FieldPicker.vue","sourcesContent":["<template>\n <div\n class=\"overflow-hidden\"\n >\n <b-input-group>\n <b-input\n v-model.trim=\"query\"\n type=\"search\"\n :placeholder=\"labels.searchPlaceholder\"\n class=\"text-truncate\"\n />\n <b-input-group-append>\n <b-input-group-text class=\"text-primary bg-white border-left-0\">\n <font-awesome-icon\n :icon=\"['fas', 'search']\"\n />\n </b-input-group-text>\n </b-input-group-append>\n </b-input-group>\n\n <b-row\n class=\"mt-2 h-100\"\n >\n <b-col\n cols=\"12\"\n sm=\"6\"\n >\n <div class=\"d-flex align-items-center\">\n <label\n class=\"text-primary mb-0\"\n >\n {{ labels.availableFieldsLabel }}\n </label>\n <b-button\n variant=\"link\"\n :class=\"[allSelected ? 'visible' : 'invisible']\"\n class=\"ml-auto px-0 text-muted\"\n @click.prevent=\"selectedFields = [...allFields]\"\n >\n {{ labels.selectAllFieldsLabel }}\n </b-button>\n </div>\n <b-list-group\n vertical\n >\n <draggable\n :key=\"filteredAvailableFields.length\"\n handle=\".handle\"\n :disabled=\"disabled\"\n :group=\"group\"\n :value=\"filteredAvailableFields\"\n class=\"overflow-auto\"\n :style=\"`${maxHeight}`\"\n >\n <b-list-group-item\n v-for=\"field in filteredAvailableFields\"\n :key=\"field.name\"\n class=\"mb-3 border rounded\"\n @dblclick=\"selectField(field)\"\n >\n <field-item\n :field=\"field\"\n :selected-fields=\"selectedFields\"\n :is-selected=\"false\"\n :system-field-label=\"labels.systemFieldLabel\"\n @select-field=\"selectField\"\n />\n </b-list-group-item>\n </draggable>\n </b-list-group>\n </b-col>\n <b-col\n cols=\"12\"\n sm=\"6\"\n class=\"pl-sm-0\"\n >\n <div class=\"d-flex align-items-center\">\n <label\n class=\"mb-0 text-primary\"\n >\n {{ labels.selectedFieldsLabel }}\n </label>\n <b-button\n variant=\"link\"\n :class=\"[allUnselected ? 'visible' : 'invisible']\"\n class=\"ml-auto px-0 text-muted\"\n @click.prevent=\"selectedFields = []\"\n >\n {{ labels.unselectAllFieldsLabel }}\n </b-button>\n </div>\n <b-list-group\n vertical\n >\n <draggable\n v-model=\"selectedFields\"\n handle=\".handle\"\n :disabled=\"disabled\"\n :group=\"group\"\n class=\"overflow-auto\"\n :style=\"`${maxHeight}`\"\n >\n <b-list-group-item\n v-for=\"field in filteredSelectedFields\"\n :key=\"field.name\"\n class=\"mb-3 border rounded\"\n @dblclick=\"unselectField(field)\"\n >\n <field-item\n :field=\"field\"\n :selected-fields=\"selectedFields\"\n :is-selected=\"true\"\n :system-field-label=\"labels.systemFieldLabel\"\n @unselect-field=\"unselectField\"\n />\n </b-list-group-item>\n </draggable>\n </b-list-group>\n </b-col>\n </b-row>\n </div>\n</template>\n<script>\nimport draggable from 'vuedraggable'\nimport FieldItem from './FieldItem.vue'\n\nexport default {\n components: {\n draggable,\n FieldItem,\n },\n\n props: {\n module: {\n type: Object,\n required: true,\n },\n\n fields: {\n type: Array,\n required: true,\n },\n\n disabled: {\n type: Boolean,\n default: false,\n },\n\n disabledTypes: {\n type: Array,\n default: () => [],\n },\n\n disableSystemFields: {\n type: Boolean,\n default: false,\n },\n\n systemFields: {\n type: Array,\n default: null,\n },\n\n fieldSubset: {\n type: Array,\n default: null,\n },\n\n group: {\n type: String,\n default: 'fields',\n },\n\n maxHeight: {\n type: String,\n default: 'max-height: 65vh;',\n },\n\n labels: {\n type: Object,\n required: true,\n },\n },\n\n data () {\n return {\n modules: [],\n query: '',\n }\n },\n\n computed: {\n selectedFields: {\n get () {\n // Needs to be done this way so it retains order of fields\n return this.fields.reduce((fields, field) => {\n field = this.allFields.find(({ name }) => name === field.name)\n if (field) {\n fields.push(field)\n }\n return fields\n }, [])\n },\n\n set (f) {\n this.$emit('update:fields', f)\n },\n },\n\n allFields () {\n let mFields = []\n if (this.fieldSubset) {\n mFields = this.module.filterFields(this.fieldSubset)\n } else {\n mFields = this.module.fields\n }\n\n if (this.disabledTypes.length > 0) {\n mFields = mFields.filter(({ kind }) => !this.disabledTypes.find(t => t === kind))\n }\n\n let sysFields = []\n if (!this.disableSystemFields) {\n sysFields = this.module.systemFields()\n if (this.systemFields) {\n sysFields = sysFields.filter(({ name }) => this.systemFields.find(sf => sf === name))\n }\n } else {\n mFields = mFields.filter(({ isSystem }) => !isSystem)\n }\n\n return [\n ...[...mFields].sort((a, b) => a.label.localeCompare(b.label)),\n ...sysFields,\n ]\n },\n\n allSelected () {\n return this.availableFields.length > 0\n },\n\n allUnselected () {\n return this.selectedFields.length > 0\n },\n\n availableFields () {\n // Remove selected fields\n return this.allFields.filter(a => !this.fields.some(f => a.name === f.name))\n },\n\n filteredAvailableFields () {\n return this.filterFields(this.availableFields)\n },\n\n filteredSelectedFields () {\n return this.filterFields(this.selectedFields)\n },\n },\n\n watch: {\n 'moduleID' (o, n) {\n if (o !== n) {\n this.selectedFields = []\n }\n },\n },\n\n methods: {\n filterFields (fields) {\n return fields\n .filter(f => f.name.toLowerCase().indexOf(this.query.toLowerCase()) > -1 || f.label.toLowerCase().indexOf(this.query.toLowerCase()) > -1)\n },\n selectField (field) {\n if (this.selectedFields.some(selectedField => selectedField.label === field.label)) return\n this.selectedFields = [...this.selectedFields, field]\n },\n unselectField (field) {\n this.selectedFields = this.selectedFields.filter(({ name }) => field.name !== name)\n },\n },\n}\n</script>\n<style lang=\"scss\" scoped>\n.handle {\n cursor: grab;\n}\n</style>\n",".handle {\n cursor: grab;\n}\n\n/*# sourceMappingURL=FieldPicker.vue.map */"]}, media: undefined });
|
|
85195
|
+
|
|
85196
|
+
};
|
|
85197
|
+
/* scoped */
|
|
85198
|
+
const __vue_scope_id__$Q = "data-v-d614af34";
|
|
85199
|
+
/* module identifier */
|
|
85200
|
+
const __vue_module_identifier__$Q = undefined;
|
|
85201
|
+
/* functional template */
|
|
85202
|
+
const __vue_is_functional_template__$Q = false;
|
|
85203
|
+
/* style inject SSR */
|
|
85204
|
+
|
|
85205
|
+
/* style inject shadow dom */
|
|
85206
|
+
|
|
85207
|
+
|
|
85208
|
+
|
|
85209
|
+
const __vue_component__$Q = /*#__PURE__*/normalizeComponent(
|
|
85210
|
+
{ render: __vue_render__$J, staticRenderFns: __vue_staticRenderFns__$J },
|
|
85211
|
+
__vue_inject_styles__$Q,
|
|
85212
|
+
__vue_script__$P,
|
|
85213
|
+
__vue_scope_id__$Q,
|
|
85214
|
+
__vue_is_functional_template__$Q,
|
|
85215
|
+
__vue_module_identifier__$Q,
|
|
85216
|
+
false,
|
|
85217
|
+
createInjector,
|
|
85218
|
+
undefined,
|
|
85219
|
+
undefined
|
|
85220
|
+
);
|
|
85221
|
+
|
|
85222
|
+
const del$1 = '|||';
|
|
85223
|
+
/**
|
|
85224
|
+
* Extract subgroups from the given groups
|
|
85225
|
+
* @param groups
|
|
85226
|
+
* @param path Array of groups that represent the path
|
|
85227
|
+
*/
|
|
85228
|
+
function extractGroups(groups, ...path) {
|
|
85229
|
+
const jpath = path.join(del$1);
|
|
85230
|
+
return [...(new Set(groups
|
|
85231
|
+
.filter(g => g.slice(0, path.length).join(del$1) === jpath)
|
|
85232
|
+
.map(g => g.slice(path.length, path.length + 1)[0])
|
|
85233
|
+
.filter(g => !!g))).values()];
|
|
85234
|
+
}
|
|
85235
|
+
/**
|
|
85236
|
+
* Extract subgroups from the catalogue that match the given path
|
|
85237
|
+
*
|
|
85238
|
+
* @param cat Catalogue
|
|
85239
|
+
* @param path Array of groups that represent the path
|
|
85240
|
+
* @constructor
|
|
85241
|
+
*/
|
|
85242
|
+
function ExtractSubgroups(cat, ...path) {
|
|
85243
|
+
const groups = Object.values(cat)
|
|
85244
|
+
.map(({ group }) => group)
|
|
85245
|
+
.filter(g => g !== undefined);
|
|
85246
|
+
return extractGroups(groups, ...path);
|
|
85247
|
+
}
|
|
85248
|
+
/**
|
|
85249
|
+
* Returns all components that match the given path
|
|
85250
|
+
*
|
|
85251
|
+
* @param cat Catalogue
|
|
85252
|
+
* @param path Array of groups that represent the path
|
|
85253
|
+
|
|
85254
|
+
*/
|
|
85255
|
+
function ExtractComponents(cat, ...path) {
|
|
85256
|
+
const jpath = path.join(del$1);
|
|
85257
|
+
return Object.values(cat)
|
|
85258
|
+
.filter(({ group }) => (group || []).join(del$1) === jpath);
|
|
85259
|
+
}
|
|
85260
|
+
|
|
85261
|
+
//
|
|
85262
|
+
var script$Q = {
|
|
85263
|
+
name: 'ComponentList',
|
|
85264
|
+
props: {
|
|
85265
|
+
catalogue: {
|
|
85266
|
+
required: true,
|
|
85267
|
+
type: Object
|
|
85268
|
+
},
|
|
85269
|
+
path: {
|
|
85270
|
+
type: Array,
|
|
85271
|
+
default: () => []
|
|
85272
|
+
}
|
|
85273
|
+
},
|
|
85274
|
+
computed: {
|
|
85275
|
+
// name of the current group
|
|
85276
|
+
root() {
|
|
85277
|
+
return this.path.length === 0;
|
|
85278
|
+
},
|
|
85279
|
+
|
|
85280
|
+
// name of the current group
|
|
85281
|
+
group() {
|
|
85282
|
+
return this.root ? undefined : this.path[this.path.length - 1];
|
|
85283
|
+
},
|
|
85284
|
+
|
|
85285
|
+
// returns all groups at this level
|
|
85286
|
+
subgroups() {
|
|
85287
|
+
return ExtractSubgroups(this.catalogue, ...this.path);
|
|
85288
|
+
},
|
|
85289
|
+
|
|
85290
|
+
components() {
|
|
85291
|
+
// return ExtractComponents(this.catalogue, ...this.path)
|
|
85292
|
+
return ExtractComponents(this.catalogue, ...this.path);
|
|
85293
|
+
}
|
|
85294
|
+
|
|
85295
|
+
}
|
|
85296
|
+
};
|
|
85297
|
+
|
|
85298
|
+
/* script */
|
|
85299
|
+
const __vue_script__$Q = script$Q;
|
|
85300
|
+
|
|
85301
|
+
/* template */
|
|
85302
|
+
var __vue_render__$K = function() {
|
|
85303
|
+
var _vm = this;
|
|
85304
|
+
var _h = _vm.$createElement;
|
|
85305
|
+
var _c = _vm._self._c || _h;
|
|
85306
|
+
return _c("div", [
|
|
85307
|
+
!_vm.root
|
|
85308
|
+
? _c("h5", { staticClass: "mb-0" }, [
|
|
85309
|
+
_vm._v("\n " + _vm._s(_vm.group) + "\n ")
|
|
85310
|
+
])
|
|
85311
|
+
: _vm._e(),
|
|
85312
|
+
_vm._v(" "),
|
|
85313
|
+
_vm.subgroups.length > 0 || _vm.components.length > 0
|
|
85314
|
+
? _c(
|
|
85315
|
+
"div",
|
|
85316
|
+
[
|
|
85317
|
+
_vm._l(_vm.components, function(cmp, i) {
|
|
85318
|
+
return _c(
|
|
85319
|
+
"div",
|
|
85320
|
+
{
|
|
85321
|
+
key: i,
|
|
85322
|
+
staticClass: "component ml-2",
|
|
85323
|
+
on: {
|
|
85324
|
+
click: function($event) {
|
|
85325
|
+
return _vm.$emit("select", cmp)
|
|
85326
|
+
}
|
|
85327
|
+
}
|
|
85328
|
+
},
|
|
85329
|
+
[
|
|
85330
|
+
_vm._v(
|
|
85331
|
+
"\n " +
|
|
85332
|
+
_vm._s(cmp.name || cmp.component.name || "Untitled") +
|
|
85333
|
+
"\n "
|
|
85334
|
+
),
|
|
85335
|
+
cmp.wip
|
|
85336
|
+
? _c(
|
|
85337
|
+
"b-badge",
|
|
85338
|
+
{
|
|
85339
|
+
staticClass: "float-right",
|
|
85340
|
+
attrs: { variant: "warning" }
|
|
85341
|
+
},
|
|
85342
|
+
[_vm._v("\n wip\n ")]
|
|
85343
|
+
)
|
|
85344
|
+
: _vm._e()
|
|
85345
|
+
],
|
|
85346
|
+
1
|
|
85347
|
+
)
|
|
85348
|
+
}),
|
|
85349
|
+
_vm._v(" "),
|
|
85350
|
+
_vm._l(_vm.subgroups, function(group) {
|
|
85351
|
+
return _c("component-list", {
|
|
85352
|
+
key: group,
|
|
85353
|
+
staticClass: "my-3",
|
|
85354
|
+
attrs: {
|
|
85355
|
+
catalogue: _vm.catalogue,
|
|
85356
|
+
path: _vm.path.concat([group])
|
|
85357
|
+
},
|
|
85358
|
+
on: {
|
|
85359
|
+
select: function($event) {
|
|
85360
|
+
return _vm.$emit("select", $event)
|
|
85361
|
+
}
|
|
85362
|
+
}
|
|
85363
|
+
})
|
|
85364
|
+
})
|
|
85365
|
+
],
|
|
85366
|
+
2
|
|
85367
|
+
)
|
|
85368
|
+
: _vm._e()
|
|
85369
|
+
])
|
|
85370
|
+
};
|
|
85371
|
+
var __vue_staticRenderFns__$K = [];
|
|
85372
|
+
__vue_render__$K._withStripped = true;
|
|
85373
|
+
|
|
85374
|
+
/* style */
|
|
85375
|
+
const __vue_inject_styles__$R = function (inject) {
|
|
85376
|
+
if (!inject) return
|
|
85377
|
+
inject("data-v-f45e268a_0", { source: ".component[data-v-f45e268a] {\n cursor: pointer;\n}\n\n/*# sourceMappingURL=ComponentList.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/c3/ComponentList.vue","ComponentList.vue"],"names":[],"mappings":"AA+EA;EACA,eAAA;AC9EA;;AAEA,4CAA4C","file":"ComponentList.vue","sourcesContent":["<template>\n <div>\n <h5\n v-if=\"!root\"\n class=\"mb-0\"\n >\n {{ group }}\n </h5>\n\n <div\n v-if=\"subgroups.length > 0 || components.length > 0\"\n >\n <div\n v-for=\"(cmp, i) in components\"\n :key=\"i\"\n @click=\"$emit('select', cmp)\"\n class=\"component ml-2\"\n >\n {{ cmp.name || cmp.component.name || 'Untitled' }}\n <b-badge\n v-if=\"cmp.wip\"\n variant=\"warning\"\n class=\"float-right\"\n >\n wip\n </b-badge>\n </div>\n <component-list\n v-for=\"(group) in subgroups\"\n :key=\"group\"\n :catalogue=\"catalogue\"\n :path=\"[...path, group]\"\n @select=\"$emit('select', $event)\"\n class=\"my-3\"\n />\n </div>\n </div>\n</template>\n<script>\nimport {ExtractComponents, ExtractSubgroups} from './helpers.ts'\n\nexport default {\n name: 'ComponentList',\n props: {\n catalogue: {\n required: true,\n type: Object,\n },\n\n path: {\n type: Array,\n default: () => []\n },\n },\n\n computed: {\n // name of the current group\n root () {\n return this.path.length === 0\n },\n\n // name of the current group\n group () {\n return this.root ? undefined : this.path[this.path.length - 1]\n },\n\n // returns all groups at this level\n subgroups () {\n return ExtractSubgroups(this.catalogue, ...this.path)\n },\n\n components () {\n // return ExtractComponents(this.catalogue, ...this.path)\n return ExtractComponents(this.catalogue, ...this.path)\n }\n }\n}\n</script>\n<style lang=\"scss\" scoped>\n.component {\n cursor: pointer;\n}\n</style>\n",".component {\n cursor: pointer;\n}\n\n/*# sourceMappingURL=ComponentList.vue.map */"]}, media: undefined });
|
|
85378
|
+
|
|
85379
|
+
};
|
|
85380
|
+
/* scoped */
|
|
85381
|
+
const __vue_scope_id__$R = "data-v-f45e268a";
|
|
85382
|
+
/* module identifier */
|
|
85383
|
+
const __vue_module_identifier__$R = undefined;
|
|
85384
|
+
/* functional template */
|
|
85385
|
+
const __vue_is_functional_template__$R = false;
|
|
85386
|
+
/* style inject SSR */
|
|
85387
|
+
|
|
85388
|
+
/* style inject shadow dom */
|
|
85389
|
+
|
|
85390
|
+
|
|
85391
|
+
|
|
85392
|
+
const __vue_component__$R = /*#__PURE__*/normalizeComponent(
|
|
85393
|
+
{ render: __vue_render__$K, staticRenderFns: __vue_staticRenderFns__$K },
|
|
85394
|
+
__vue_inject_styles__$R,
|
|
85395
|
+
__vue_script__$Q,
|
|
85396
|
+
__vue_scope_id__$R,
|
|
85397
|
+
__vue_is_functional_template__$R,
|
|
85398
|
+
__vue_module_identifier__$R,
|
|
85399
|
+
false,
|
|
85400
|
+
createInjector,
|
|
85401
|
+
undefined,
|
|
85402
|
+
undefined
|
|
85403
|
+
);
|
|
85404
|
+
|
|
85405
|
+
//
|
|
85406
|
+
var script$R = {
|
|
84787
85407
|
name: 'C3',
|
|
84788
85408
|
components: {
|
|
84789
|
-
ComponentList: __vue_component__$
|
|
85409
|
+
ComponentList: __vue_component__$R
|
|
84790
85410
|
},
|
|
84791
85411
|
props: {
|
|
84792
85412
|
catalogue: {
|
|
@@ -84847,10 +85467,10 @@ var script$P = {
|
|
|
84847
85467
|
};
|
|
84848
85468
|
|
|
84849
85469
|
/* script */
|
|
84850
|
-
const __vue_script__$
|
|
85470
|
+
const __vue_script__$R = script$R;
|
|
84851
85471
|
|
|
84852
85472
|
/* template */
|
|
84853
|
-
var __vue_render__$
|
|
85473
|
+
var __vue_render__$L = function() {
|
|
84854
85474
|
var _vm = this;
|
|
84855
85475
|
var _h = _vm.$createElement;
|
|
84856
85476
|
var _c = _vm._self._c || _h;
|
|
@@ -84974,34 +85594,34 @@ var __vue_render__$J = function() {
|
|
|
84974
85594
|
: _vm._e()
|
|
84975
85595
|
])
|
|
84976
85596
|
};
|
|
84977
|
-
var __vue_staticRenderFns__$
|
|
84978
|
-
__vue_render__$
|
|
85597
|
+
var __vue_staticRenderFns__$L = [];
|
|
85598
|
+
__vue_render__$L._withStripped = true;
|
|
84979
85599
|
|
|
84980
85600
|
/* style */
|
|
84981
|
-
const __vue_inject_styles__$
|
|
85601
|
+
const __vue_inject_styles__$S = function (inject) {
|
|
84982
85602
|
if (!inject) return
|
|
84983
|
-
inject("data-v-
|
|
85603
|
+
inject("data-v-99d21784_0", { source: ".layout {\n height: 100vh;\n width: 100vw;\n display: grid;\n grid-template-rows: auto 400px;\n grid-template-columns: 300px auto;\n align-content: stretch;\n grid-template-areas: \"side main\" \"side controls\";\n}\n.layout aside {\n grid-area: side;\n overflow: auto;\n}\n.layout main {\n grid-area: main;\n background-image: linear-gradient(135deg, #f3f3f5 21.43%, #ffffff 21.43%, #ffffff 50%, #f3f3f5 50%, #f3f3f5 71.43%, #ffffff 71.43%, #ffffff 100%);\n background-size: 35px 35px;\n overflow: auto;\n}\n.layout .controls {\n grid-area: controls;\n overflow: auto;\n}\n.layout .controls .control-group {\n float: left;\n}\n.layout .scenario {\n cursor: pointer;\n}\n\n/*# sourceMappingURL=C3.vue.map */", map: {"version":3,"sources":["/home/fajfa/Kendu/Corteza/packages/corteza-vue/src/components/c3/C3.vue","C3.vue"],"names":[],"mappings":"AAwIA;EACA,aAAA;EACA,YAAA;EAEA,aAAA;EACA,8BAAA;EACA,iCAAA;EACA,sBAAA;EACA,gDACA;ACzIA;AD6IA;EACA,eAAA;EACA,cAAA;AC3IA;AD8IA;EACA,eAAA;EACA,iJAAA;EAUA,0BAAA;EACA,cAAA;ACrJA;ADwJA;EACA,mBAAA;EACA,cAAA;ACtJA;ADwJA;EACA,WAAA;ACtJA;AD0JA;EACA,eAAA;ACxJA;;AAEA,iCAAiC","file":"C3.vue","sourcesContent":["<template>\n <div class=\"layout\">\n <aside class=\"sidebar p-2\">\n <h5\n class=\"border-bottom\">\n C3: Component Catalogue\n </h5>\n <component-list\n :catalogue=\"catalogue\"\n @select=\"setCurrent($event)\"\n />\n </aside>\n\n <main\n class=\"p-5\"\n >\n <component\n :is=\"current.component\"\n v-if=\"current\"\n v-bind=\"current.props\"\n />\n <p\n v-else\n class=\"text-center\"\n >\n Select a component from the C3 Catalogue and start hacking :)\n </p>\n </main>\n\n <div\n class=\"controls px-5 py-2 mt-2\"\n v-if=\"current\"\n >\n <div\n class=\"control-group mr-2\"\n v-for=\"(cg, g) in controlGroups\"\n :key=\"`control-group-${g}`\"\n >\n <h3>\n Controls\n </h3>\n <component\n :is=\"c.component\"\n v-for=\"(c, i) in cg\"\n :key=\"i\"\n :value=\"c.value(current.props)\"\n v-bind=\"c.props\"\n @update=\"c.update(current.props, $event)\"\n />\n </div>\n\n <div\n v-if=\"current.scenarios\"\n class=\"control-group float-right\"\n >\n <h3>\n Pre-set controls\n </h3>\n <ul\n class=\"pl-0\"\n >\n <li\n v-for=\"(s, i) in current.scenarios\"\n :key=\"i\"\n class=\"list-unstyled scenario\"\n @click=\"setScenario(s)\"\n >\n {{ s.label }}\n </li>\n </ul>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport ComponentList from './ComponentList.vue'\n\nexport default {\n name: 'C3',\n\n components: {\n ComponentList,\n },\n\n props: {\n catalogue: {\n required: true,\n type: Object,\n },\n },\n\n computed: {\n controlGroups () {\n if (this.current.controls.length === 0) {\n return []\n }\n\n if (Array.isArray(this.current.controls[0])) {\n // already grouped\n return this.current.controls\n }\n\n // make one virtual group holding all controls\n return [this.current.controls]\n },\n },\n\n data () {\n return {\n current: undefined,\n }\n },\n\n methods: {\n setCurrent (component) {\n this.current = { props: {}, ...component }\n this.setScenario(this.current)\n },\n\n setScenario ({ props = {}, controls = [] }) {\n // create missing props from controls\n const apply = (c, props) => c.update(props, c.value(props) || null)\n controls.forEach(c => {\n if (Array.isArray(c)) {\n c.forEach(c => apply(c, props))\n } else {\n apply(c, props)\n }\n })\n\n this.current.props = props\n },\n },\n}\n</script>\n<style lang=\"scss\">\n.layout {\n height: 100vh;\n width: 100vw;\n\n display: grid;\n grid-template-rows: auto 400px;\n grid-template-columns: 300px auto;\n align-content: stretch;\n grid-template-areas:\n \"side main\"\n \"side controls\"\n ;\n\n aside {\n grid-area: side;\n overflow: auto;\n }\n\n main {\n grid-area: main;\n background-image: linear-gradient(\n 135deg,\n #f3f3f5 21.43%,\n #ffffff 21.43%,\n #ffffff 50%,\n #f3f3f5 50%,\n #f3f3f5 71.43%,\n #ffffff 71.43%,\n #ffffff 100%\n );\n background-size: 35.00px 35.00px;\n overflow: auto;\n }\n\n .controls {\n grid-area: controls;\n overflow: auto;\n\n .control-group {\n float: left;\n }\n }\n\n .scenario {\n cursor: pointer;\n }\n}\n</style>\n",".layout {\n height: 100vh;\n width: 100vw;\n display: grid;\n grid-template-rows: auto 400px;\n grid-template-columns: 300px auto;\n align-content: stretch;\n grid-template-areas: \"side main\" \"side controls\";\n}\n.layout aside {\n grid-area: side;\n overflow: auto;\n}\n.layout main {\n grid-area: main;\n background-image: linear-gradient(135deg, #f3f3f5 21.43%, #ffffff 21.43%, #ffffff 50%, #f3f3f5 50%, #f3f3f5 71.43%, #ffffff 71.43%, #ffffff 100%);\n background-size: 35px 35px;\n overflow: auto;\n}\n.layout .controls {\n grid-area: controls;\n overflow: auto;\n}\n.layout .controls .control-group {\n float: left;\n}\n.layout .scenario {\n cursor: pointer;\n}\n\n/*# sourceMappingURL=C3.vue.map */"]}, media: undefined });
|
|
84984
85604
|
|
|
84985
85605
|
};
|
|
84986
85606
|
/* scoped */
|
|
84987
|
-
const __vue_scope_id__$
|
|
85607
|
+
const __vue_scope_id__$S = undefined;
|
|
84988
85608
|
/* module identifier */
|
|
84989
|
-
const __vue_module_identifier__$
|
|
85609
|
+
const __vue_module_identifier__$S = undefined;
|
|
84990
85610
|
/* functional template */
|
|
84991
|
-
const __vue_is_functional_template__$
|
|
85611
|
+
const __vue_is_functional_template__$S = false;
|
|
84992
85612
|
/* style inject SSR */
|
|
84993
85613
|
|
|
84994
85614
|
/* style inject shadow dom */
|
|
84995
85615
|
|
|
84996
85616
|
|
|
84997
85617
|
|
|
84998
|
-
const __vue_component__$
|
|
84999
|
-
{ render: __vue_render__$
|
|
85000
|
-
__vue_inject_styles__$
|
|
85001
|
-
__vue_script__$
|
|
85002
|
-
__vue_scope_id__$
|
|
85003
|
-
__vue_is_functional_template__$
|
|
85004
|
-
__vue_module_identifier__$
|
|
85618
|
+
const __vue_component__$S = /*#__PURE__*/normalizeComponent(
|
|
85619
|
+
{ render: __vue_render__$L, staticRenderFns: __vue_staticRenderFns__$L },
|
|
85620
|
+
__vue_inject_styles__$S,
|
|
85621
|
+
__vue_script__$R,
|
|
85622
|
+
__vue_scope_id__$S,
|
|
85623
|
+
__vue_is_functional_template__$S,
|
|
85624
|
+
__vue_module_identifier__$S,
|
|
85005
85625
|
false,
|
|
85006
85626
|
createInjector,
|
|
85007
85627
|
undefined,
|
|
@@ -85019,7 +85639,7 @@ __vue_render__$J._withStripped = true;
|
|
|
85019
85639
|
//
|
|
85020
85640
|
//
|
|
85021
85641
|
//
|
|
85022
|
-
var script$
|
|
85642
|
+
var script$S = {
|
|
85023
85643
|
props: {
|
|
85024
85644
|
label: {
|
|
85025
85645
|
required: true,
|
|
@@ -85033,10 +85653,10 @@ var script$Q = {
|
|
|
85033
85653
|
};
|
|
85034
85654
|
|
|
85035
85655
|
/* script */
|
|
85036
|
-
const __vue_script__$
|
|
85656
|
+
const __vue_script__$S = script$S;
|
|
85037
85657
|
|
|
85038
85658
|
/* template */
|
|
85039
|
-
var __vue_render__$
|
|
85659
|
+
var __vue_render__$M = function() {
|
|
85040
85660
|
var _vm = this;
|
|
85041
85661
|
var _h = _vm.$createElement;
|
|
85042
85662
|
var _c = _vm._self._c || _h;
|
|
@@ -85056,17 +85676,17 @@ var __vue_render__$K = function() {
|
|
|
85056
85676
|
1
|
|
85057
85677
|
)
|
|
85058
85678
|
};
|
|
85059
|
-
var __vue_staticRenderFns__$
|
|
85060
|
-
__vue_render__$
|
|
85679
|
+
var __vue_staticRenderFns__$M = [];
|
|
85680
|
+
__vue_render__$M._withStripped = true;
|
|
85061
85681
|
|
|
85062
85682
|
/* style */
|
|
85063
|
-
const __vue_inject_styles__$
|
|
85683
|
+
const __vue_inject_styles__$T = undefined;
|
|
85064
85684
|
/* scoped */
|
|
85065
|
-
const __vue_scope_id__$
|
|
85685
|
+
const __vue_scope_id__$T = undefined;
|
|
85066
85686
|
/* module identifier */
|
|
85067
|
-
const __vue_module_identifier__$
|
|
85687
|
+
const __vue_module_identifier__$T = undefined;
|
|
85068
85688
|
/* functional template */
|
|
85069
|
-
const __vue_is_functional_template__$
|
|
85689
|
+
const __vue_is_functional_template__$T = false;
|
|
85070
85690
|
/* style inject */
|
|
85071
85691
|
|
|
85072
85692
|
/* style inject SSR */
|
|
@@ -85075,13 +85695,13 @@ __vue_render__$K._withStripped = true;
|
|
|
85075
85695
|
|
|
85076
85696
|
|
|
85077
85697
|
|
|
85078
|
-
const __vue_component__$
|
|
85079
|
-
{ render: __vue_render__$
|
|
85080
|
-
__vue_inject_styles__$
|
|
85081
|
-
__vue_script__$
|
|
85082
|
-
__vue_scope_id__$
|
|
85083
|
-
__vue_is_functional_template__$
|
|
85084
|
-
__vue_module_identifier__$
|
|
85698
|
+
const __vue_component__$T = /*#__PURE__*/normalizeComponent(
|
|
85699
|
+
{ render: __vue_render__$M, staticRenderFns: __vue_staticRenderFns__$M },
|
|
85700
|
+
__vue_inject_styles__$T,
|
|
85701
|
+
__vue_script__$S,
|
|
85702
|
+
__vue_scope_id__$T,
|
|
85703
|
+
__vue_is_functional_template__$T,
|
|
85704
|
+
__vue_module_identifier__$T,
|
|
85085
85705
|
false,
|
|
85086
85706
|
undefined,
|
|
85087
85707
|
undefined,
|
|
@@ -85099,7 +85719,7 @@ __vue_render__$K._withStripped = true;
|
|
|
85099
85719
|
//
|
|
85100
85720
|
//
|
|
85101
85721
|
//
|
|
85102
|
-
var script$
|
|
85722
|
+
var script$T = {
|
|
85103
85723
|
props: {
|
|
85104
85724
|
label: {
|
|
85105
85725
|
required: true,
|
|
@@ -85113,10 +85733,10 @@ var script$R = {
|
|
|
85113
85733
|
};
|
|
85114
85734
|
|
|
85115
85735
|
/* script */
|
|
85116
|
-
const __vue_script__$
|
|
85736
|
+
const __vue_script__$T = script$T;
|
|
85117
85737
|
|
|
85118
85738
|
/* template */
|
|
85119
|
-
var __vue_render__$
|
|
85739
|
+
var __vue_render__$N = function() {
|
|
85120
85740
|
var _vm = this;
|
|
85121
85741
|
var _h = _vm.$createElement;
|
|
85122
85742
|
var _c = _vm._self._c || _h;
|
|
@@ -85136,17 +85756,17 @@ var __vue_render__$L = function() {
|
|
|
85136
85756
|
1
|
|
85137
85757
|
)
|
|
85138
85758
|
};
|
|
85139
|
-
var __vue_staticRenderFns__$
|
|
85140
|
-
__vue_render__$
|
|
85759
|
+
var __vue_staticRenderFns__$N = [];
|
|
85760
|
+
__vue_render__$N._withStripped = true;
|
|
85141
85761
|
|
|
85142
85762
|
/* style */
|
|
85143
|
-
const __vue_inject_styles__$
|
|
85763
|
+
const __vue_inject_styles__$U = undefined;
|
|
85144
85764
|
/* scoped */
|
|
85145
|
-
const __vue_scope_id__$
|
|
85765
|
+
const __vue_scope_id__$U = undefined;
|
|
85146
85766
|
/* module identifier */
|
|
85147
|
-
const __vue_module_identifier__$
|
|
85767
|
+
const __vue_module_identifier__$U = undefined;
|
|
85148
85768
|
/* functional template */
|
|
85149
|
-
const __vue_is_functional_template__$
|
|
85769
|
+
const __vue_is_functional_template__$U = false;
|
|
85150
85770
|
/* style inject */
|
|
85151
85771
|
|
|
85152
85772
|
/* style inject SSR */
|
|
@@ -85155,13 +85775,13 @@ __vue_render__$L._withStripped = true;
|
|
|
85155
85775
|
|
|
85156
85776
|
|
|
85157
85777
|
|
|
85158
|
-
const __vue_component__$
|
|
85159
|
-
{ render: __vue_render__$
|
|
85160
|
-
__vue_inject_styles__$
|
|
85161
|
-
__vue_script__$
|
|
85162
|
-
__vue_scope_id__$
|
|
85163
|
-
__vue_is_functional_template__$
|
|
85164
|
-
__vue_module_identifier__$
|
|
85778
|
+
const __vue_component__$U = /*#__PURE__*/normalizeComponent(
|
|
85779
|
+
{ render: __vue_render__$N, staticRenderFns: __vue_staticRenderFns__$N },
|
|
85780
|
+
__vue_inject_styles__$U,
|
|
85781
|
+
__vue_script__$T,
|
|
85782
|
+
__vue_scope_id__$U,
|
|
85783
|
+
__vue_is_functional_template__$U,
|
|
85784
|
+
__vue_module_identifier__$U,
|
|
85165
85785
|
false,
|
|
85166
85786
|
undefined,
|
|
85167
85787
|
undefined,
|
|
@@ -85178,7 +85798,7 @@ __vue_render__$L._withStripped = true;
|
|
|
85178
85798
|
//
|
|
85179
85799
|
//
|
|
85180
85800
|
//
|
|
85181
|
-
var script$
|
|
85801
|
+
var script$U = {
|
|
85182
85802
|
props: {
|
|
85183
85803
|
label: {
|
|
85184
85804
|
required: true,
|
|
@@ -85192,10 +85812,10 @@ var script$S = {
|
|
|
85192
85812
|
};
|
|
85193
85813
|
|
|
85194
85814
|
/* script */
|
|
85195
|
-
const __vue_script__$
|
|
85815
|
+
const __vue_script__$U = script$U;
|
|
85196
85816
|
|
|
85197
85817
|
/* template */
|
|
85198
|
-
var __vue_render__$
|
|
85818
|
+
var __vue_render__$O = function() {
|
|
85199
85819
|
var _vm = this;
|
|
85200
85820
|
var _h = _vm.$createElement;
|
|
85201
85821
|
var _c = _vm._self._c || _h;
|
|
@@ -85218,17 +85838,17 @@ var __vue_render__$M = function() {
|
|
|
85218
85838
|
1
|
|
85219
85839
|
)
|
|
85220
85840
|
};
|
|
85221
|
-
var __vue_staticRenderFns__$
|
|
85222
|
-
__vue_render__$
|
|
85841
|
+
var __vue_staticRenderFns__$O = [];
|
|
85842
|
+
__vue_render__$O._withStripped = true;
|
|
85223
85843
|
|
|
85224
85844
|
/* style */
|
|
85225
|
-
const __vue_inject_styles__$
|
|
85845
|
+
const __vue_inject_styles__$V = undefined;
|
|
85226
85846
|
/* scoped */
|
|
85227
|
-
const __vue_scope_id__$
|
|
85847
|
+
const __vue_scope_id__$V = undefined;
|
|
85228
85848
|
/* module identifier */
|
|
85229
|
-
const __vue_module_identifier__$
|
|
85849
|
+
const __vue_module_identifier__$V = undefined;
|
|
85230
85850
|
/* functional template */
|
|
85231
|
-
const __vue_is_functional_template__$
|
|
85851
|
+
const __vue_is_functional_template__$V = false;
|
|
85232
85852
|
/* style inject */
|
|
85233
85853
|
|
|
85234
85854
|
/* style inject SSR */
|
|
@@ -85237,13 +85857,13 @@ __vue_render__$M._withStripped = true;
|
|
|
85237
85857
|
|
|
85238
85858
|
|
|
85239
85859
|
|
|
85240
|
-
const __vue_component__$
|
|
85241
|
-
{ render: __vue_render__$
|
|
85242
|
-
__vue_inject_styles__$
|
|
85243
|
-
__vue_script__$
|
|
85244
|
-
__vue_scope_id__$
|
|
85245
|
-
__vue_is_functional_template__$
|
|
85246
|
-
__vue_module_identifier__$
|
|
85860
|
+
const __vue_component__$V = /*#__PURE__*/normalizeComponent(
|
|
85861
|
+
{ render: __vue_render__$O, staticRenderFns: __vue_staticRenderFns__$O },
|
|
85862
|
+
__vue_inject_styles__$V,
|
|
85863
|
+
__vue_script__$U,
|
|
85864
|
+
__vue_scope_id__$V,
|
|
85865
|
+
__vue_is_functional_template__$V,
|
|
85866
|
+
__vue_module_identifier__$V,
|
|
85247
85867
|
false,
|
|
85248
85868
|
undefined,
|
|
85249
85869
|
undefined,
|
|
@@ -85262,7 +85882,7 @@ __vue_render__$M._withStripped = true;
|
|
|
85262
85882
|
//
|
|
85263
85883
|
//
|
|
85264
85884
|
//
|
|
85265
|
-
var script$
|
|
85885
|
+
var script$V = {
|
|
85266
85886
|
props: {
|
|
85267
85887
|
label: {
|
|
85268
85888
|
required: true,
|
|
@@ -85280,10 +85900,10 @@ var script$T = {
|
|
|
85280
85900
|
};
|
|
85281
85901
|
|
|
85282
85902
|
/* script */
|
|
85283
|
-
const __vue_script__$
|
|
85903
|
+
const __vue_script__$V = script$V;
|
|
85284
85904
|
|
|
85285
85905
|
/* template */
|
|
85286
|
-
var __vue_render__$
|
|
85906
|
+
var __vue_render__$P = function() {
|
|
85287
85907
|
var _vm = this;
|
|
85288
85908
|
var _h = _vm.$createElement;
|
|
85289
85909
|
var _c = _vm._self._c || _h;
|
|
@@ -85303,17 +85923,17 @@ var __vue_render__$N = function() {
|
|
|
85303
85923
|
1
|
|
85304
85924
|
)
|
|
85305
85925
|
};
|
|
85306
|
-
var __vue_staticRenderFns__$
|
|
85307
|
-
__vue_render__$
|
|
85926
|
+
var __vue_staticRenderFns__$P = [];
|
|
85927
|
+
__vue_render__$P._withStripped = true;
|
|
85308
85928
|
|
|
85309
85929
|
/* style */
|
|
85310
|
-
const __vue_inject_styles__$
|
|
85930
|
+
const __vue_inject_styles__$W = undefined;
|
|
85311
85931
|
/* scoped */
|
|
85312
|
-
const __vue_scope_id__$
|
|
85932
|
+
const __vue_scope_id__$W = undefined;
|
|
85313
85933
|
/* module identifier */
|
|
85314
|
-
const __vue_module_identifier__$
|
|
85934
|
+
const __vue_module_identifier__$W = undefined;
|
|
85315
85935
|
/* functional template */
|
|
85316
|
-
const __vue_is_functional_template__$
|
|
85936
|
+
const __vue_is_functional_template__$W = false;
|
|
85317
85937
|
/* style inject */
|
|
85318
85938
|
|
|
85319
85939
|
/* style inject SSR */
|
|
@@ -85322,13 +85942,13 @@ __vue_render__$N._withStripped = true;
|
|
|
85322
85942
|
|
|
85323
85943
|
|
|
85324
85944
|
|
|
85325
|
-
const __vue_component__$
|
|
85326
|
-
{ render: __vue_render__$
|
|
85327
|
-
__vue_inject_styles__$
|
|
85328
|
-
__vue_script__$
|
|
85329
|
-
__vue_scope_id__$
|
|
85330
|
-
__vue_is_functional_template__$
|
|
85331
|
-
__vue_module_identifier__$
|
|
85945
|
+
const __vue_component__$W = /*#__PURE__*/normalizeComponent(
|
|
85946
|
+
{ render: __vue_render__$P, staticRenderFns: __vue_staticRenderFns__$P },
|
|
85947
|
+
__vue_inject_styles__$W,
|
|
85948
|
+
__vue_script__$V,
|
|
85949
|
+
__vue_scope_id__$W,
|
|
85950
|
+
__vue_is_functional_template__$W,
|
|
85951
|
+
__vue_module_identifier__$W,
|
|
85332
85952
|
false,
|
|
85333
85953
|
undefined,
|
|
85334
85954
|
undefined,
|
|
@@ -102540,16 +103160,16 @@ function generic(component, { handler, props }) {
|
|
|
102540
103160
|
props }, handler);
|
|
102541
103161
|
}
|
|
102542
103162
|
function input(label, handler) {
|
|
102543
|
-
return generic(__vue_component__$
|
|
103163
|
+
return generic(__vue_component__$T, { handler, props: { label } });
|
|
102544
103164
|
}
|
|
102545
103165
|
function textarea(label, handler) {
|
|
102546
|
-
return generic(__vue_component__$
|
|
103166
|
+
return generic(__vue_component__$U, { handler, props: { label } });
|
|
102547
103167
|
}
|
|
102548
103168
|
function checkbox(label, handler) {
|
|
102549
|
-
return generic(__vue_component__$
|
|
103169
|
+
return generic(__vue_component__$V, { handler, props: { label } });
|
|
102550
103170
|
}
|
|
102551
103171
|
function select(label, handler, options) {
|
|
102552
|
-
return generic(__vue_component__$
|
|
103172
|
+
return generic(__vue_component__$W, {
|
|
102553
103173
|
handler,
|
|
102554
103174
|
props: {
|
|
102555
103175
|
label,
|
|
@@ -102568,7 +103188,7 @@ var controls = /*#__PURE__*/Object.freeze({
|
|
|
102568
103188
|
});
|
|
102569
103189
|
|
|
102570
103190
|
var index$2 = {
|
|
102571
|
-
View: __vue_component__$
|
|
103191
|
+
View: __vue_component__$S,
|
|
102572
103192
|
controls,
|
|
102573
103193
|
};
|
|
102574
103194
|
|
|
@@ -102598,6 +103218,8 @@ var index$3 = /*#__PURE__*/Object.freeze({
|
|
|
102598
103218
|
CToaster: __vue_component__$N,
|
|
102599
103219
|
CToasterLink: __vue_component__$M,
|
|
102600
103220
|
CReminderSidebar: __vue_component__$O,
|
|
103221
|
+
FieldItem: __vue_component__$P,
|
|
103222
|
+
FieldPicker: __vue_component__$Q,
|
|
102601
103223
|
C3: index$2,
|
|
102602
103224
|
CPrompts: __vue_component__$B,
|
|
102603
103225
|
CPromptModal: __vue_component__$A,
|