Skip to content

Commit

Permalink
Extract functions from imports
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyLahtak committed Jan 16, 2020
1 parent fc343a3 commit f457a4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/data/data_source/utils.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import ajax from '../../core/utils/ajax';
import { sendRequest } from '../../core/utils/ajax';
import Store from '../abstract_store';
import ArrayStore from '../array_store';
import { each, map } from '../../core/utils/iterator';
import CustomStore from '../custom_store';
import { extend } from '../../core/utils/extend';
import { isPlainObject } from '../../core/utils/type';
import dataUtils from '../utils';
import { normalizeSortingInfo } from '../utils';

export const CANCELED_TOKEN = 'canceled';

Expand Down Expand Up @@ -47,7 +47,7 @@ const mapRecursive = (items, level, mapper) => {
};

export const mapDataRespectingGrouping = (items, mapper, groupInfo) => {
const level = groupInfo ? dataUtils.normalizeSortingInfo(groupInfo).length : 0;
const level = groupInfo ? normalizeSortingInfo(groupInfo).length : 0;

return mapRecursive(items, level, mapper);
};
Expand Down Expand Up @@ -89,7 +89,7 @@ const createStoreFromConfig = (storeConfig) => {

const createCustomStoreFromUrl = (url, normalizationOptions) =>
new CustomStore({
load: () => ajax.sendRequest({ url, dataType: 'json' }),
load: () => sendRequest({ url, dataType: 'json' }),
loadMode: normalizationOptions?.fromUrlLoadMode
});

Expand Down

0 comments on commit f457a4f

Please sign in to comment.