Skip to content

Commit

Permalink
Merge branch 'master' into feat/date-ranges-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
didoda committed Aug 24, 2023
2 parents 2d101ae + f998777 commit c8698ad
Show file tree
Hide file tree
Showing 80 changed files with 602 additions and 254 deletions.
68 changes: 65 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ module.exports = {
'es6': true,
'browser': true,
},
extends: [
'eslint:recommended',
'plugin:vue/recommended',
],
globals: {
'BEDITA': true,
'tinymce': true,
Expand All @@ -18,7 +22,66 @@ module.exports = {
}],
'no-extra-semi': 'off',
'no-console': 'off',
'semi': 'off'
'semi': 'off',

// override/add rules settings here
"vue/attributes-order": ["warn", {
"order": [
"GLOBAL",
"OTHER_ATTR",
"DEFINITION",
"TWO_WAY_BINDING",
"OTHER_DIRECTIVES",
"EVENTS",
"RENDER_MODIFIERS",
"CONTENT",
"CONDITIONALS",
],
"alphabetical": false
}],
"vue/order-in-components": ["warn", {
"order": [
["template", "render"],
"extends",
"el",
"name",
"key",
"parent",
"functional",
["delimiters", "comments"],
["components", "directives", "filters"],
"mixins",
["provide", "inject"],
"ROUTER_GUARDS",
"layout",
"middleware",
"validate",
"scrollToTop",
"transition",
"loading",
"inheritAttrs",
"model",
["props", "propsData"],
"emits",
"setup",
"asyncData",
"data",
"fetch",
"head",
"computed",
"watch",
"watchQuery",
"LIFECYCLE_HOOKS",
"methods",
"renderError"
]
}],
"vue/first-attribute-linebreak": ["warn", {
"singleline": "beside",
"multiline": "ignore"
}],
"vue/multi-word-component-names": ["warn"],
"vue/no-v-html": ["off"],
},
parserOptions: {
ecmaVersion: 2021,
Expand All @@ -27,6 +90,5 @@ module.exports = {
ignorePatterns: [
'node_modules',
'webroot/js/*'
],
extends: ['eslint:recommended']
]
}
6 changes: 3 additions & 3 deletions config/app_local.example.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
* 'sort' - sort order to be used in index; use a field name prepending optionl `-` sign
* to indicate a descendant order, f.i. '-title' will sort by title in reverse alphabetical order
* (default is '-id'),
* 'icon' - icon code, f.i. `icon-article`, have a look in
* `webroot/css/be-icons-codes.css` for a complete list of codes
* 'icon' - icon, f.i. `carbon:document`, have a look at https://icon-sets.iconify.design/
* for a complete list of icons
* 'sidebar' - additional custom sidebar links added in modules index and single item view,
* defined as associative array with 'index' and 'view' keys
*/
Expand All @@ -119,7 +119,7 @@
// 'color' => '#230637',
// // 'secondaryColor' => '#d95700',
// 'sort' => '-modified',
// // 'icon' => 'icon-cube',
// // 'icon' => 'carbon:document',
// ],
// 'folders' => [
// 'color' => '#072440',
Expand Down
2 changes: 1 addition & 1 deletion config/version.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Manager]
version=4.11.3
version=4.12.0
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"browser-sync-webpack-plugin": "^2.3.0",
"css-loader": "^6.4.0",
"css-minimizer-webpack-plugin": "^3.1.1",
"eslint-plugin-vue": "^9.12.0",
"gettext-parser": "^4.0.2",
"json-loader": "^0.5.7",
"mini-css-extract-plugin": "^2.4.2",
Expand Down
42 changes: 21 additions & 21 deletions resources/js/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { buildSearchParams } from '../libs/urlUtils.js';

import vTitle from 'vuejs-title';

import { Icon } from '@iconify/vue2';
import { Icon as AppIcon } from '@iconify/vue2';

const _vueInstance = new Vue({
el: 'main',
Expand Down Expand Up @@ -77,7 +77,17 @@ const _vueInstance = new Vue({
ObjectsHistory:() => import(/* webpackChunkName: "objects-history" */'app/components/objects-history/objects-history'),
SystemInfo:() => import(/* webpackChunkName: "system-info" */'app/components/system-info/system-info'),
UserAccesses:() => import(/* webpackChunkName: "user-accesses" */'app/components/user-accesses/user-accesses'),
Icon,
AppIcon,
},

/**
* properties or methods available for injection into its descendants
* (inject: ['property'])
*/
provide() {
return {
getCSFRToken: () => BEDITA.csrfToken,
};
},

data() {
Expand All @@ -103,13 +113,14 @@ const _vueInstance = new Vue({
}
},

/**
* properties or methods available for injection into its descendants
* (inject: ['property'])
*/
provide() {
return {
getCSFRToken: () => BEDITA.csrfToken,
watch: {
/**
* watch pageSize variable and update pagination.page_size accordingly
*
* @param {Number} value page size number
*/
pageSize(value) {
this.pagination.page_size = value;
}
},

Expand Down Expand Up @@ -163,17 +174,6 @@ const _vueInstance = new Vue({
Vue.prototype.$eventBus = new Vue();
},

watch: {
/**
* watch pageSize variable and update pagination.page_size accordingly
*
* @param {Number} value page size number
*/
pageSize(value) {
this.pagination.page_size = value;
}
},

mounted: function () {
this.$nextTick(function () {
this.alertBeforePageUnload(BEDITA.template);
Expand Down Expand Up @@ -580,4 +580,4 @@ const _vueInstance = new Vue({
window._vueInstance = _vueInstance;

// use component everywhere in Manager
Vue.component('Icon', Icon);
Vue.component('AppIcon', AppIcon);
2 changes: 1 addition & 1 deletion resources/js/app/components/ajax-login/ajax-login.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Vue from 'vue';

export const AjaxLogin = Vue.extend({
name: 'AjaxLogin',

template: `
<div class="ajax-login-modal" role="dialog">
Expand All @@ -24,6 +23,7 @@ export const AjaxLogin = Vue.extend({
</transition>
</div>
`,
name: 'AjaxLogin',

props: {
headerText: {
Expand Down
6 changes: 3 additions & 3 deletions resources/js/app/components/autosize-textarea.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import autosize from "autosize";
import autosize from 'autosize';

export default {
props: ["value", "reset-value"],
props: ['value', 'reset-value'],

template: `<textarea @input="handleChange" :value="text"></textarea>`,
template: '<textarea @input="handleChange" :value="text"></textarea>',

data() {
return {
Expand Down
10 changes: 5 additions & 5 deletions resources/js/app/components/category/category.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ export default {
<form class="table-row">
<div class="name-cell">
<input type="text" name="name" autocomplete="off" autocorrect="off" autocapitalize="off" size="50" maxlength="50" @change="onChangeName($event)" v-model="name" />
<span class="ml-05" v-title="this.$helpers.minLength(3)"><Icon icon="carbon:information"></Icon></span>
<span class="ml-05" v-title="this.$helpers.minLength(3)"><app-icon icon="carbon:information"></app-icon></span>
<div v-if="nameInUse()" v-text="errorAlreadyInUse"></div>
</div>
<div class="label-cell">
<input type="text" name="label" autocomplete="off" autocorrect="off" autocapitalize="off" v-model="label" />
<span class="ml-05" v-title="this.$helpers.minLength(3)"><Icon icon="carbon:information"></Icon></span>
<span class="ml-05" v-title="this.$helpers.minLength(3)"><app-icon icon="carbon:information"></app-icon></span>
</div>
<div class="parent_id-cell">
<select v-model="parent">
Expand All @@ -32,7 +32,7 @@ export default {
</div>
<div v-show="!id" class="buttons-cell narrow">
<button :disabled="name.length < 3 || label.length < 3 || nameInUse() || type === ''" class="button button-text-white is-width-auto" @click.stop.prevent="onCreate()">
<Icon icon="carbon:save"></Icon>
<app-icon icon="carbon:save"></app-icon>
<span class="ml-05">${t`Create`}</span>
</button>
</div>
Expand All @@ -41,13 +41,13 @@ export default {
</div>
<div v-show="id" class="buttons-cell narrow">
<button :disabled="name.length < 3 || label.length < 3 || unchanged() || nameInUse()" class="button button-text-white is-width-auto" @click.stop.prevent="onModify()">
<Icon icon="carbon:save"></Icon>
<app-icon icon="carbon:save"></app-icon>
<span class="ml-05">${t`Modify`}</span>
</button>
</div>
<div v-show="id" class="buttons-cell narrow">
<button class="button button-text-white is-width-auto" @click.stop.prevent="onDelete()">
<Icon icon="carbon:trash-can"></Icon>
<app-icon icon="carbon:trash-can"></app-icon>
<span class="ml-05">${t`Delete`}</span>
</button>
</div>
Expand Down
10 changes: 5 additions & 5 deletions resources/js/app/components/dialog/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ export const Dialog = Vue.extend({
<header class="is-flex space-between align-center is-expanded">
<div class="is-flex align-center">
<span class="is-capitalized mr-05" v-if="headerText"><: t(headerText) :></span>
<Icon icon="carbon:checkmark" color="green" v-if="dialogType === 'success'"></Icon>
<Icon icon="carbon:information" color="blue" v-if="dialogType === 'info'"></Icon>
<Icon icon="carbon:warning" color="orange" v-if="dialogType === 'warning'"></Icon>
<Icon icon="carbon:misuse" color="red" v-if="dialogType === 'error'"></Icon>
<app-icon icon="carbon:checkmark" color="green" v-if="dialogType === 'success'"></app-icon>
<app-icon icon="carbon:information" color="blue" v-if="dialogType === 'info'"></app-icon>
<app-icon icon="carbon:warning" color="orange" v-if="dialogType === 'warning'"></app-icon>
<app-icon icon="carbon:misuse" color="red" v-if="dialogType === 'error'"></app-icon>
</div>
<i @click="hide()">
<Icon icon="carbon:close"></Icon>
<app-icon icon="carbon:close"></app-icon>
</i>
</header>
<div class="message mt-1 has-text-size-larger" v-if="message"><: message :></div>
Expand Down
4 changes: 2 additions & 2 deletions resources/js/app/components/drop-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ export default {
<span class="name" :class="info.cancelled? 'has-text-gray-500' : ''"><: info.file.name :></span>
<button v-show="!info.error && !info.cancelled && !info.done && !info.pending" class="button-outlined" @click.stop.prevent="abortUpload(info.file)">
<Icon icon="carbon:stop"></Icon>
<app-icon icon="carbon:stop"></app-icon>
<span class="ml-05">${t`stop`}</span>
</button>
<button v-show="(info.error || info.cancelled) && !info.done" class="button-outlined" @click.stop.prevent="removeProgressItem(info.file)">
<Icon icon="carbon:trash-can"></Icon>
<app-icon icon="carbon:trash-can"></app-icon>
<span class="ml-05">${t`remove`}</span>
</button>
Expand Down
10 changes: 5 additions & 5 deletions resources/js/app/components/filter-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default {
props: {
configPaginateSizes: {
type: String,
default: "[10]"
default: '[10]'
},
filterActive: Boolean,
filterList: {
Expand Down Expand Up @@ -227,7 +227,7 @@ export default {
* @returns {void}
*/
pageSize() {
this.$emit("filter-update-page-size", this.pageSize);
this.$emit('filter-update-page-size', this.pageSize);
},

/**
Expand Down Expand Up @@ -351,7 +351,7 @@ export default {
}

const filter = this.prepareFilters();
this.$emit("filter-objects", { ...this.queryFilter, filter });
this.$emit('filter-objects', { ...this.queryFilter, filter });
},

/**
Expand All @@ -363,7 +363,7 @@ export default {
this.selectedStatuses = [];
this.selectedType = '';
this.queryFilter = this.getCleanQuery();
this.$emit("filter-reset");
this.$emit('filter-reset');
},

/**
Expand All @@ -374,7 +374,7 @@ export default {
* @emits Event#filter-update-current-page
*/
onChangePage(index) {
this.$emit("filter-update-current-page", index);
this.$emit('filter-update-current-page', index);
},
onChangePageNumber(e) {
let val = e.target.value;
Expand Down
10 changes: 5 additions & 5 deletions resources/js/app/components/flash-message.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<div :class="['message', level, (params?.class || '').trim()]">
<h2>
<i v-if="viewName.toLowerCase() !== 'login'">
<Icon icon="carbon:checkmark" color="green" v-if="level === 'success'"></Icon>
<Icon icon="carbon:information" color="blue" v-if="level === 'info'"></Icon>
<Icon icon="carbon:warning" color="orange" v-if="level === 'warning'"></Icon>
<Icon icon="carbon:misuse" color="red" v-if="level === 'error'"></Icon>
<app-icon icon="carbon:checkmark" color="green" v-if="level === 'success'"></app-icon>
<app-icon icon="carbon:information" color="blue" v-if="level === 'info'"></app-icon>
<app-icon icon="carbon:warning" color="orange" v-if="level === 'warning'"></app-icon>
<app-icon icon="carbon:misuse" color="red" v-if="level === 'error'"></app-icon>
</i>
{{ message }}
</h2>
Expand All @@ -22,7 +22,7 @@
<p v-if="shouldShowDump && !isAdmin">{{ dumpLabel }}</p>
<label v-if="viewName.toLowerCase() !== 'login'" @click="hide">
<Icon icon="carbon:close-outline"></Icon>
<app-icon icon="carbon:close-outline"></app-icon>
{{ t('Close') }}
</label>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/app/components/index-cell/index-cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
template: `
<div :class="className()" untitled-label="${t`Untitled`}" @mouseover="onMouseover()" @mouseleave="onMouseleave()">
<: !msg ? truncated : '' :>
<Icon icon="carbon:copy" v-if="showCopyIcon()" @click.stop.prevent="copy()"></Icon>
<app-icon icon="carbon:copy" v-if="showCopyIcon()" @click.stop.prevent="copy()"></app-icon>
<div v-if="msg" v-text="msg" style="color: gray"></div>
</div>
`,
Expand Down
4 changes: 2 additions & 2 deletions resources/js/app/components/json-fields/string-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
</div>
<div v-if="!readonly">
<button @click.prevent="remove(index)" class="button button-primary" style="min-width: 32px; border-top-left-radius: 0; border-bottom-left-radius: 0;">
<Icon icon="carbon:trash-can"></Icon>
<app-icon icon="carbon:trash-can"></app-icon>
<span class="ml-05">{{ t('Remove') }}</span>
</button>
</div>
</div>
</div>
<button @click.prevent="add" v-if="!readonly">
<Icon icon="carbon:add"></Icon>
<app-icon icon="carbon:add"></app-icon>
<span class="ml-05">{{ t('Add') }}</span>
</button>

Expand Down
Loading

0 comments on commit c8698ad

Please sign in to comment.