From 9ebcae9c55779c8e71280d17ef0416891d43a071 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Tue, 2 Apr 2024 15:10:37 +0300 Subject: [PATCH] Stackblitz updates --- components/doc/DocSectionCode.vue | 2 +- components/doc/codeeditor/templates.js | 137 ++++++------------------- 2 files changed, 35 insertions(+), 104 deletions(-) diff --git a/components/doc/DocSectionCode.vue b/components/doc/DocSectionCode.vue index 333fa333f..b560a5221 100644 --- a/components/doc/DocSectionCode.vue +++ b/components/doc/DocSectionCode.vue @@ -85,7 +85,7 @@ export default { }, hideStackBlitz: { type: Boolean, - default: true + default: false }, dependencies: { type: null, diff --git a/components/doc/codeeditor/templates.js b/components/doc/codeeditor/templates.js index b5dcd4f46..22b86ce97 100644 --- a/components/doc/codeeditor/templates.js +++ b/components/doc/codeeditor/templates.js @@ -2,7 +2,7 @@ import pkg from '../../../package.json'; import { services } from './services'; const PrimeVue = { - version: '^3.50.0', + version: '^4.0.0-beta.1', description: 'PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, which has 400+ ready to use UI blocks to build spectacular applications in no time.' }; @@ -21,7 +21,7 @@ const core_dependencies = { // create-vue -> https://github.com/vuejs/create-vue const getVueApp = (props = {}, sourceType) => { const path = 'src/'; - const { code: sources, title = 'primevue_demo', description = '', service, extPages, dependencies: deps, component, extFiles, embedded } = props; + const { code: sources, title = 'primevue_demo', description = '', service, extPages, dependencies: deps, component, extFiles } = props; const dependencies = { ...core_dependencies, ...deps }; const fileExtension = '.vue'; @@ -29,9 +29,6 @@ const getVueApp = (props = {}, sourceType) => { const sourceFileName = `${path}${mainFileName}${fileExtension}`; let element = '', imports = '', - unstyled = '', - pvTheme = '', - themeSwitchCode = '', routeFiles = {}; sources.routeFiles && @@ -41,16 +38,6 @@ const getVueApp = (props = {}, sourceType) => { }; }); - let extFilesSource = extFiles - ? embedded - ? extFiles['composition'] - : extFiles[sourceType.language] - ? { ...extFiles[sourceType.language] } - : Object.keys(extFiles) - .filter((k) => !sourceTypes.includes(k)) - .reduce((result, current) => (result[current] = extFiles[current]) && result, {}) - : {}; - if (deps !== null && component !== null) { imports += `import ${component} from 'primevue/${component.toLowerCase()}'; `; @@ -58,33 +45,6 @@ const getVueApp = (props = {}, sourceType) => { `; } - if (embedded) { - // main.js - unstyled += `, unstyled: true, pt: Tailwind`; - imports += `import Tailwind from 'primevue/passthrough/tailwind'; -import ThemeSwitcher from './components/ThemeSwitcher.vue';`; - element += `app.component('ThemeSwitcher', ThemeSwitcher);`; - - // package.json - dependencies['tailwindcss'] = '^3.3.2'; - dependencies['postcss'] = '^8.4.27'; - dependencies['autoprefixer'] = '^10.4.14'; - - // App.vue - themeSwitchCode = ''.concat( - `