Update Kirby and Composer dependencies

This commit is contained in:
Paul Nicoué 2022-03-22 15:39:39 +01:00
parent f5d3ea5e84
commit ec74d78ba9
382 changed files with 25077 additions and 4955 deletions

View file

@ -2,29 +2,21 @@ module.exports = {
extends: [
"eslint:recommended",
"plugin:cypress/recommended",
"plugin:vue/recommended"
"plugin:vue/recommended",
"prettier"
],
rules: {
"vue/component-definition-name-casing": "off",
"vue/require-default-prop": "off",
"vue/attributes-order": "error",
"vue/require-prop-types": "error",
"vue/max-attributes-per-line": [
"error",
{
"singleline": 3,
"multiline": {
"max": 1,
"allowFirstLine": false
}
}
],
"vue/component-definition-name-casing": "off",
"vue/html-closing-bracket-newline": [
"error",
{
"singleline": "never",
"multiline": "always"
singleline: "never",
multiline: "always"
}
]
],
"vue/multi-word-component-names": "off",
"vue/require-default-prop": "off",
"vue/require-prop-types": "error"
}
}
};

View file

@ -0,0 +1,3 @@
{
"trailingComma": "none"
}

File diff suppressed because one or more lines are too long

View file

@ -422,6 +422,12 @@
<symbol id="icon-mobile" viewBox="0 0 16 16">
<path d="M12,0H4C2.897,0,2,0.897,2,2v12c0,1.103,0.897,2,2,2h8c1.103,0,2-0.897,2-2V2C14,0.897,13.103,0,12,0z M8,14 c-0.552,0-1-0.448-1-1s0.448-1,1-1s1,0.448,1,1S8.552,14,8,14z M12,10H4V2h8V10z" />
</symbol>
<symbol id="icon-moon" viewBox="0 0 16 16">
<path d="M5.2,2C2.2,2.8,0,5.6,0,8.9C0,12.8,3.2,16,7.1,16c3.3,0,6-2.2,6.9-5.2C8.7,12.2,3.8,7.3,5.2,2z" />
<circle cx="10" cy="1" r="1" />
<circle cx="15" cy="7" r="1" />
<circle cx="10" cy="6" r="1" />
</symbol>
<symbol id="icon-open" viewBox="0 0 16 16">
<path d="M8 7l-4 4h3v5h2v-5h3z" />
<path d="M0 1v12a1 1 0 0 0 1 1h4v-2H2V6h12v6h-3v2h4a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1H1a1 1 0 0 0-1 1zm2 3V2h12v2H2z" />

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Before After
Before After

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,3 @@
window.panel = window.panel || {};
window.panel.plugins = {
components: {},
@ -17,7 +16,7 @@ window.panel.plugin = function (plugin, parts) {
options = { template: options };
}
window.panel.plugins["components"][`k-block-type-${name}`] = {
window.panel.plugins.components[`k-block-type-${name}`] = {
extends: "k-block-type",
...options
};
@ -25,35 +24,35 @@ window.panel.plugin = function (plugin, parts) {
// Components
resolve(parts, "components", function (name, options) {
window.panel.plugins["components"][name] = options;
window.panel.plugins.components[name] = options;
});
// Fields
resolve(parts, "fields", function (name, options) {
window.panel.plugins["components"][`k-${name}-field`] = options;
window.panel.plugins.components[`k-${name}-field`] = options;
});
// Icons
resolve(parts, "icons", function (name, options) {
window.panel.plugins["icons"][name] = options;
window.panel.plugins.icons[name] = options;
});
// Sections
resolve(parts, "sections", function (name, options) {
window.panel.plugins["components"][`k-${name}-section`] = {
window.panel.plugins.components[`k-${name}-section`] = {
...options,
mixins: ["section"].concat(options.mixins || [])
mixins: ["section", ...(options.mixins || [])]
};
});
// Vue.use
// `Vue.use`
resolve(parts, "use", function (name, options) {
window.panel.plugins["use"].push(options);
window.panel.plugins.use.push(options);
});
// created callback
// Vue `created` callback
if (parts["created"]) {
window.panel.plugins["created"].push(parts["created"]);
window.panel.plugins.created.push(parts["created"]);
}
// Login
@ -62,20 +61,15 @@ window.panel.plugin = function (plugin, parts) {
}
// Third-party plugins
resolve(parts, "thirdParty", function(name, options) {
window.panel.plugins["thirdParty"][name] = options;
resolve(parts, "thirdParty", function (name, options) {
window.panel.plugins.thirdParty[name] = options;
});
};
function resolve(object, type, callback) {
if (object[type]) {
if (Object.entries) {
Object.entries(object[type]).forEach(function ([name, options]) {
callback(name, options);
});
for (const [name, options] of Object.entries(object[type])) {
callback(name, options);
}
}
}

File diff suppressed because one or more lines are too long

View file

@ -1,3 +1,4 @@
/* eslint-env node */
import fs from "fs";
import path from "path";
import { defineConfig } from "vite";
@ -24,7 +25,7 @@ export default defineConfig(({ command }) => {
// Delete the flag file on any kind of exit
for (const eventType of ["exit", "SIGINT", "uncaughtException"]) {
process.on(eventType, function(err) {
process.on(eventType, function (err) {
if (fs.existsSync(runningPath) === true) {
fs.unlinkSync(runningPath);
}
@ -54,7 +55,7 @@ export default defineConfig(({ command }) => {
minify: "terser",
cssCodeSplit: false,
rollupOptions: {
input: "/src/index.js",
input: "./src/index.js",
output: {
entryFileNames: "js/[name].js",
chunkFileNames: "js/[name].js",
@ -63,7 +64,10 @@ export default defineConfig(({ command }) => {
}
},
optimizeDeps: {
entries: "src/**/*.{js,vue}"
entries: "src/**/*.{js,vue}",
exclude: [
"vitest"
]
},
css: {
postcss: {
@ -94,6 +98,18 @@ export default defineConfig(({ command }) => {
"/media": proxy
},
...custom
},
test: {
environment: "jsdom",
include: ["**/*.test.js"],
coverage: {
all: true,
exclude: ["**/*.e2e.js", "**/*.test.js"],
extension: ["js", "vue"],
src: "src",
reporter: ["text", "lcov"]
},
setupFiles: ["vitest.setup.js"]
}
};
});

View file

@ -0,0 +1,4 @@
import Vue from "vue";
Vue.config.productionTip = false;
Vue.config.devtools = false;