Commit 1986f9a7 authored by Vladimir Erokhov's avatar Vladimir Erokhov

feature(lodash-refactoring): Finished task

parent cd39855f
Pipeline #4436 passed with stage
in 2 minutes and 5 seconds
{
"plugins": [
"lodash"
],
"presets": [
"@vue/app"
]
}
\ No newline at end of file
}
......@@ -5,3 +5,5 @@ VUE_APP_POPUP_AUTO_CLOSE_DELAY=3000
VUE_APP_PAGINATION_LIMIT=10
VUE_APP_COOKIE_SESSION_KEY=beaker.session.id
BUNDLE_ANALYZER_MODE=disabled # disabled / server / static
......@@ -54,6 +54,7 @@
"@vue/test-utils": "^1.0.0-beta.10",
"babel-core": "^7.0.0-0",
"babel-jest": "^22.0.4",
"babel-plugin-lodash": "^3.3.4",
"husky": "^1.3.1",
"jest-localstorage-mock": "^2.2.0",
"lint-staged": "^6.0.0",
......@@ -64,6 +65,7 @@
"sass-loader": "^6.0.6",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"vue-cli-plugin-webpack-bundle-analyzer": "^1.2.0",
"vue-template-compiler": "^2.5.21"
},
"browserslist": [
......
......@@ -172,8 +172,7 @@
<script>
import RRule from 'rrule';
import mapValues from 'lodash/mapValues';
import pickBy from 'lodash/pickBy';
import { mapValues, pickBy } from 'lodash';
import DateTimePicker from '@/components/forms/fields/date-time-picker.vue';
......
......@@ -39,7 +39,7 @@ v-card
</template>
<script>
import pick from 'lodash/pick';
import { pick } from 'lodash';
import { MODALS } from '@/constants';
......
......@@ -72,8 +72,7 @@
<script>
import sha1 from 'sha1';
import omit from 'lodash/omit';
import pick from 'lodash/pick';
import { omit, pick } from 'lodash';
import { MODALS } from '@/constants';
......
......@@ -26,7 +26,7 @@
</template>
<script>
import find from 'lodash/find';
import { find } from 'lodash';
import { MODALS } from '@/constants';
......
......@@ -25,7 +25,7 @@
</template>
<script>
import pick from 'lodash/pick';
import { pick } from 'lodash';
import { MODALS } from '@/constants';
......
......@@ -16,8 +16,7 @@
</template>
<script>
import union from 'lodash/union';
import filter from 'lodash/filter';
import { union, filter } from 'lodash';
import ContextGeneralList from '@/components/other/context/context-general-list.vue';
......
......@@ -25,7 +25,7 @@
</template>
<script>
import omit from 'lodash/omit';
import { omit } from 'lodash';
import { MODALS } from '@/constants';
......
......@@ -33,7 +33,7 @@
</template>
<script>
import cloneDeep from 'lodash/cloneDeep';
import { cloneDeep } from 'lodash';
import { MODALS, EVENT_FILTER_RULE_TYPES, EVENT_FILTER_ENRICHMENT_RULE_AFTER_TYPES } from '@/constants';
import modalInnerMixin from '@/mixins/modal/inner';
......
......@@ -50,8 +50,7 @@
<script>
import Draggable from 'vuedraggable';
import cloneDeep from 'lodash/cloneDeep';
import pick from 'lodash/pick';
import { cloneDeep, pick } from 'lodash';
import { MODALS, EVENT_FILTER_ENRICHMENT_ACTIONS_TYPES } from '@/constants';
......
......@@ -18,7 +18,7 @@
</template>
<script>
import cloneDeep from 'lodash/cloneDeep';
import { cloneDeep } from 'lodash';
import { MODALS } from '@/constants';
......
......@@ -19,7 +19,7 @@
</template>
<script>
import get from 'lodash/get';
import { get } from 'lodash';
import { MODALS } from '@/constants';
......
......@@ -69,8 +69,7 @@
</template>
<script>
import find from 'lodash/find';
import omit from 'lodash/omit';
import { find, omit } from 'lodash';
import { MODALS, USERS_RIGHTS_TYPES, USERS_RIGHTS_MASKS } from '@/constants';
import { generateView, generateViewRow, generateRight, generateRoleRightByChecksum } from '@/helpers/entities';
......
......@@ -31,7 +31,7 @@
</template>
<script>
import find from 'lodash/find';
import { find } from 'lodash';
import {
MODALS,
......
......@@ -32,8 +32,7 @@
</template>
<script>
import pick from 'lodash/pick';
import mapValues from 'lodash/mapValues';
import { pick, mapValues } from 'lodash';
import VRuntimeTemplate from 'v-runtime-template';
......
......@@ -3,7 +3,7 @@
</template>
<script>
import pickBy from 'lodash/pickBy';
import { pickBy } from 'lodash';
import {
MODALS,
......
......@@ -67,9 +67,7 @@
</template>
<script>
import omit from 'lodash/omit';
import pick from 'lodash/pick';
import isEmpty from 'lodash/isEmpty';
import { omit, pick, isEmpty } from 'lodash';
import { MODALS, USERS_RIGHTS } from '@/constants';
......
......@@ -5,7 +5,7 @@
</template>
<script>
import get from 'lodash/get';
import { get } from 'lodash';
import AlarmChips from '../alarm-chips.vue';
......
......@@ -15,7 +15,7 @@
</template>
<script>
import get from 'lodash/get';
import { get } from 'lodash';
import { compile } from '@/helpers/handlebars';
import popupMixin from '@/mixins/popup';
......
......@@ -32,8 +32,9 @@
</template>
<script>
import pickBy from 'lodash/pickBy';
import moment from 'moment';
import { pickBy } from 'lodash';
import { stepTitle, stepType } from '@/helpers/timeline';
import Flag from '@/components/other/alarm/timeline/timeline-flag.vue';
......
......@@ -3,7 +3,7 @@
</template>
<script>
import pickBy from 'lodash/pickBy';
import { pickBy } from 'lodash';
import { MODALS, ENTITIES_TYPES, WIDGETS_ACTIONS_TYPES } from '@/constants';
......
......@@ -59,8 +59,7 @@
</template>
<script>
import omit from 'lodash/omit';
import isString from 'lodash/isString';
import { omit, isString } from 'lodash';
import { USERS_RIGHTS } from '@/constants';
import { prepareMainFilterToQueryFilter } from '@/helpers/filter';
......
......@@ -27,9 +27,7 @@
<script>
import cloneDeep from 'lodash/cloneDeep';
import isEmpty from 'lodash/isEmpty';
import isString from 'lodash/isString';
import { cloneDeep, isEmpty, isString } from 'lodash';
import { ENTITIES_TYPES, FILTER_DEFAULT_VALUES } from '@/constants';
......
......@@ -55,8 +55,7 @@
</template>
<script>
import omit from 'lodash/omit';
import cloneDeep from 'lodash/cloneDeep';
import { omit, cloneDeep } from 'lodash';
import { FILTER_DEFAULT_VALUES } from '@/constants';
......
......@@ -16,7 +16,7 @@
</template>
<script>
import find from 'lodash/find';
import { find } from 'lodash';
import {
MODALS,
......
......@@ -4,10 +4,12 @@
</template>
<script>
import omit from 'lodash/omit';
import { omit } from 'lodash';
import entitiesStatsMixin from '@/mixins/entities/stats';
import widgetQueryMixin from '@/mixins/widget/query';
import entitiesUserPreferenceMixin from '@/mixins/entities/user-preference';
import StatsCurves from './stats-curves.vue';
export default {
......
<script>
import get from 'lodash/get';
import { get } from 'lodash';
import { DsCalendarEventTime } from 'dayspan-vuetify/src/components';
export default {
......
<script>
import get from 'lodash/get';
import { get } from 'lodash';
import { DsCalendarEvent } from 'dayspan-vuetify/src/components';
export default {
......
......@@ -4,7 +4,7 @@
</template>
<script>
import omit from 'lodash/omit';
import { omit } from 'lodash';
import entitiesStatsMixin from '@/mixins/entities/stats';
import widgetQueryMixin from '@/mixins/widget/query';
import entitiesUserPreferenceMixin from '@/mixins/entities/user-preference';
......
......@@ -26,10 +26,7 @@
</template>
<script>
import get from 'lodash/get';
import omit from 'lodash/omit';
import pick from 'lodash/pick';
import isEmpty from 'lodash/isEmpty';
import { get, omit, pick, isEmpty } from 'lodash';
import { createNamespacedHelpers } from 'vuex';
import { Calendar, Units } from 'dayspan';
......
......@@ -30,7 +30,7 @@
</template>
<script>
import isEqual from 'lodash/isEqual';
import { isEqual } from 'lodash';
import ViewTabs from './view-tabs.vue';
import ViewTabRows from './view-tab-rows.vue';
......
......@@ -53,7 +53,7 @@
</template>
<script>
import omit from 'lodash/omit';
import { omit } from 'lodash';
import Draggable from 'vuedraggable';
import { createNamespacedHelpers } from 'vuex';
......
......@@ -46,8 +46,7 @@
</template>
<script>
import get from 'lodash/get';
import cloneDeep from 'lodash/cloneDeep';
import { get, cloneDeep } from 'lodash';
import { PAGINATION_LIMIT } from '@/config';
import { SIDE_BARS, USERS_RIGHTS, FILTER_DEFAULT_VALUES } from '@/constants';
......
......@@ -34,8 +34,7 @@
</template>
<script>
import get from 'lodash/get';
import cloneDeep from 'lodash/cloneDeep';
import { get, cloneDeep } from 'lodash';
import { SIDE_BARS, FILTER_DEFAULT_VALUES, USERS_RIGHTS } from '@/constants';
......
......@@ -34,7 +34,7 @@
</template>
<script>
import isEmpty from 'lodash/isEmpty';
import { isEmpty } from 'lodash';
import { generateViewRow } from '@/helpers/entities';
import vuetifyComboboxMixin from '@/mixins/vuetify/combobox';
......
......@@ -25,7 +25,7 @@
</template>
<script>
import find from 'lodash/find';
import { find } from 'lodash';
export default {
inject: ['$validator'],
......
......@@ -12,7 +12,8 @@
</template>
<script>
import set from 'lodash/set';
import { set } from 'lodash';
import modalMixin from '@/mixins/modal';
export default {
......
......@@ -17,7 +17,7 @@
</template>
<script>
import pullAt from 'lodash/pullAt';
import { pullAt } from 'lodash';
import modalMixin from '@/mixins/modal';
import formMixin from '@/mixins/form';
......
......@@ -25,9 +25,7 @@
</template>
<script>
import omit from 'lodash/omit';
import set from 'lodash/set';
import unset from 'lodash/unset';
import { omit, set, unset } from 'lodash';
import modalMixin from '@/mixins/modal';
......
......@@ -47,7 +47,7 @@
</template>
<script>
import cloneDeep from 'lodash/cloneDeep';
import { cloneDeep } from 'lodash';
import { SIDE_BARS } from '@/constants';
......
......@@ -34,7 +34,7 @@
</template>
<script>
import cloneDeep from 'lodash/cloneDeep';
import { cloneDeep } from 'lodash';
import entitiesStatsMixin from '@/mixins/entities/stats';
import widgetSettingsMixin from '@/mixins/widget/settings';
......
......@@ -32,7 +32,7 @@
</template>
<script>
import cloneDeep from 'lodash/cloneDeep';
import { cloneDeep } from 'lodash';
import widgetSettingsMixin from '@/mixins/widget/settings';
import { SIDE_BARS } from '@/constants';
......
......@@ -30,7 +30,8 @@
</template>
<script>
import cloneDeep from 'lodash/cloneDeep';
import { cloneDeep } from 'lodash';
import widgetSettingsMixin from '@/mixins/widget/settings';
import { SIDE_BARS } from '@/constants';
......
......@@ -28,7 +28,8 @@
</template>
<script>
import cloneDeep from 'lodash/cloneDeep';
import { cloneDeep } from 'lodash';
import { SIDE_BARS } from '@/constants';
import widgetSettingsMixin from '@/mixins/widget/settings';
......
......@@ -90,7 +90,7 @@
</template>
<script>
import cloneDeep from 'lodash/cloneDeep';
import { cloneDeep } from 'lodash';
import { SIDE_BARS } from '@/constants';
......
import get from 'lodash/get';
import { get } from 'lodash';
/**
*
......
import moment from 'moment';
import groupBy from 'lodash/groupBy';
import { groupBy } from 'lodash';
import { Day, Schedule } from 'dayspan';
/**
......
import isEmpty from 'lodash/isEmpty';
import { isEmpty } from 'lodash';
import { FILTER_OPERATORS } from '@/constants';
......
import isEmpty from 'lodash/isEmpty';
import isObject from 'lodash/isObject';
import cloneDeep from 'lodash/cloneDeep';
import { isEmpty, isObject, cloneDeep } from 'lodash';
import { FILTER_OPERATORS, FILTER_DEFAULT_VALUES } from '@/constants';
import uid from '@/helpers/uid';
......
import get from 'lodash/get';
import { get } from 'lodash';
import { FILTER_DEFAULT_VALUES } from '@/constants';
......
import omit from 'lodash/omit';
import isUndefined from 'lodash/isUndefined';
import isEmpty from 'lodash/isEmpty';
import { omit, isUndefined, isEmpty } from 'lodash';
import { PAGINATION_LIMIT } from '@/config';
import { WIDGET_TYPES } from '@/constants';
......
import get from 'lodash/get';
import { get } from 'lodash';
export function checkUserAccess(user, rightId, rightMask) {
const checksum = get(user, ['rights', rightId, 'checksum'], 0);
......
import get from 'lodash/get';
import { get } from 'lodash';
/**
* If entity has parent we should use this processStrategy
......
import get from 'lodash/get';
import { get } from 'lodash';
/**
* Sort an array of objects by a property whith string value
......
import get from 'lodash/get';
import { get } from 'lodash';
import schemas from '@/store/schemas';
......
......@@ -3,7 +3,7 @@ We regroup this two function, because in the component, stepTitle can't access s
in the component filter
*/
import { ENTITY_INFOS_TYPE } from '@/constants';
import capitalize from 'lodash/capitalize';
import { capitalize } from 'lodash';
export function stepType(title) {
if (title.startsWith('status')) {
......@@ -13,6 +13,7 @@ export function stepType(title) {
}
return ENTITY_INFOS_TYPE.action;
}
export function stepTitle(title, author) {
let formattedStepTitle = '';
if (stepType(title) !== ENTITY_INFOS_TYPE.action) {
......
import isObject from 'lodash/isObject';
import isArray from 'lodash/isArray';
import { isObject, isArray } from 'lodash';
export default function convertObjectFieldToTreeBranch(branch, branchName, prevPath = '') {
const children = Object.keys(branch).reduce((acc, field) => {
......
import omit from 'lodash/omit';
import { omit } from 'lodash';
import uid from '@/helpers/uid';
......
import { createNamespacedHelpers } from 'vuex';
import first from 'lodash/first';
import { first } from 'lodash';
import modalInnerMixin from './inner';
......
import omit from 'lodash/omit';
import { omit } from 'lodash';
/**
* @mixin Add searching logic, need Pagination mixins
......
import isString from 'lodash/isString';
import { isString } from 'lodash';
export default {
methods: {
......
import isFunction from 'lodash/isFunction';
import { isFunction } from 'lodash';
export default {
methods: {
......
import omit from 'lodash/omit';
import { omit } from 'lodash';
import { MODALS, EVENT_ENTITY_TYPES, BUSINESS_USER_RIGHTS_ACTIONS_MAP } from '@/constants';
......
import isEmpty from 'lodash/isEmpty';
import isBoolean from 'lodash/isBoolean';
import { isEmpty, isBoolean } from 'lodash';