Skip to content

Commit

Permalink
update exports and re-exports
Browse files Browse the repository at this point in the history
  • Loading branch information
VasilyStrelyaev committed Nov 2, 2024
1 parent 1260bd1 commit fc916b8
Show file tree
Hide file tree
Showing 656 changed files with 5,617 additions and 4,935 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export {
isLoadResultObject,
LoadResult,
LoadResultObject,
} from 'devextreme/common/data/custom-store';
} from 'devextreme/common/data';
2 changes: 1 addition & 1 deletion packages/devextreme-react/src/common/data/custom-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export {
isLoadResultObject,
LoadResult,
LoadResultObject,
} from "devextreme/common/data/custom-store";
} from "devextreme/common/data";
2 changes: 1 addition & 1 deletion packages/devextreme-vue/src/common/data/custom-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export {
isLoadResultObject,
LoadResult,
LoadResultObject,
} from "devextreme/common/data/custom-store";
} from "devextreme/common/data";
4 changes: 2 additions & 2 deletions packages/devextreme/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ themebuilder-scss/src/data/metadata/*
js/bundles/dx.custom.js
testing/jest/utils/transformers/*
ts/
js/localization/cldr-data/*
js/localization/default_messages.js
js/common/core/localization/cldr-data/*
js/common/core/localization/default_messages.js
4 changes: 2 additions & 2 deletions packages/devextreme/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ node_modules
/testing/LastSuiteTime.txt
/dotnet_packages
/js/bundles/dx.custom.js
/js/localization/default_messages.js
/js/localization/cldr-data
/js/common/core/localization/default_messages.js
/js/common/core/localization/cldr-data
/js/renovation/**/*.j.tsx
/js/renovation/code_coverage
/scss/bundles/*.scss
Expand Down
4 changes: 2 additions & 2 deletions packages/devextreme/build/gulp/localization-template.jst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
(function(root, factory) {
if(typeof define === 'function' && define.amd) {
define(function(require) {
factory(require("devextreme/localization"));
factory(require("devextreme/common/core/localization"));
});
} else if(typeof module === "object" && module.exports) {
factory(require("devextreme/localization"));
factory(require("devextreme/common/core/localization"));
} else {
factory(DevExpress.localization);
}
Expand Down
22 changes: 11 additions & 11 deletions packages/devextreme/build/gulp/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const accountingFormats = function() {
};

const RESULT_PATH = path.join(context.RESULT_JS_PATH, 'localization');
const DICTIONARY_SOURCE_FOLDER = 'js/localization/messages';
const DICTIONARY_SOURCE_FOLDER = 'js/common/core/localization/messages';

const getLocales = function(directory) {
return fs.readdirSync(directory).map(file => {
Expand All @@ -110,7 +110,7 @@ const getMessages = function(directory, locale) {
};

gulp.task('clean-cldr-data', function() {
return del('js/localization/cldr-data/**', { force: true });
return del('js/common/core/localization/cldr-data/**', { force: true });
});

gulp.task('generate-community-locales', () => {
Expand All @@ -119,8 +119,8 @@ gulp.task('generate-community-locales', () => {

return gulp
.src([
'js/localization/messages/*.json',
'!js/localization/messages/en.json'
'js/common/core/localization/messages/*.json',
'!js/common/core/localization/messages/en.json'
])
.pipe(through.obj(function(file, encoding, callback) {
const parsedFile = JSON.parse(file.contents.toString(encoding));
Expand Down Expand Up @@ -169,38 +169,38 @@ gulp.task('localization-messages', gulp.parallel(getLocales(DICTIONARY_SOURCE_FO

gulp.task('localization-generated-sources', gulp.parallel([
{
data: require('../../js/localization/messages/en.json'),
data: require('../../js/common/core/localization/messages/en.json'),
filename: 'default_messages.js',
exportName: 'defaultMessages',
destination: 'js/localization'
destination: 'js/common/core/localization'
},
{
data: parentLocales,
filename: 'parent_locales.js',
destination: 'js/localization/cldr-data'
destination: 'js/common/core/localization/cldr-data'
},
{
data: firstDayOfWeekData(),
filename: 'first_day_of_week_data.js',
destination: 'js/localization/cldr-data'
destination: 'js/common/core/localization/cldr-data'
},
{
data: accountingFormats(),
filename: 'accounting_formats.js',
destination: 'js/localization/cldr-data'
destination: 'js/common/core/localization/cldr-data'

},
{
data: globalizeEnCldr,
exportName: 'enCldr',
filename: 'en.js',
destination: 'js/localization/cldr-data'
destination: 'js/common/core/localization/cldr-data'
},
{
data: globalizeSupplementalCldr,
exportName: 'supplementalCldr',
filename: 'supplemental.js',
destination: 'js/localization/cldr-data'
destination: 'js/common/core/localization/cldr-data'
}
].map((source) => Object.assign(
function() {
Expand Down
2 changes: 1 addition & 1 deletion packages/devextreme/js/__internal/core/m_element_data.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable object-shorthand */
import eventsEngine from '@js/common/core/events/core/events_engine';
import domAdapter from '@js/core/dom_adapter';
import MemorizedCallbacks from '@js/core/memorized_callbacks';
import eventsEngine from '@js/events/core/events_engine';

const dataMap = new WeakMap();
let strategy;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable @typescript-eslint/ban-types */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable class-methods-use-this */
import '@js/events/click';
import '@js/events/core/emitter.feedback';
import '@js/events/hover';
import '@js/common/core/events/click';
import '@js/common/core/events/core/emitter.feedback';
import '@js/common/core/events/hover';

import domAdapter from '@js/core/dom_adapter';
import DOMComponent from '@js/core/dom_component';
Expand All @@ -21,8 +21,8 @@ import {
createRef,
} from 'inferno';

import KeyboardProcessor from '../../../common/core/events/core/keyboard_processor';
import renderer from '../../../core/inferno_renderer';
import KeyboardProcessor from '../../../events/core/keyboard_processor';
import type { TemplateModel } from './template_wrapper';
import { buildTemplateArgs, TemplateWrapper } from './template_wrapper';
import type { Option, TemplateComponent } from './types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import globalConfig from '../../../../core/config';
import { config as globalConfig } from '../../../../common';
import { isDefined } from '../../../../core/utils/type';
import type { ConfigContextValue } from '../config_context';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as clickEvent from '../../../../events/click';
import eventsEngine from '../../../../events/core/events_engine';
import scrollEvents from '../../../../events/gesture/emitter.gesture.scroll';
import pointerEvents from '../../../../events/pointer';
import { addNamespace } from '../../../../events/utils/index';
import * as clickEvent from '../../../../common/core/events/click';
import eventsEngine from '../../../../common/core/events/core/events_engine';
import scrollEvents from '../../../../common/core/events/gesture/emitter.gesture.scroll';
import pointerEvents from '../../../../common/core/events/pointer';
import { addNamespace } from '../../../../common/core/events/utils/index';
import type { EffectReturn } from './effect_return';

export function subscribeToEvent(eventName: string) {
Expand Down
10 changes: 5 additions & 5 deletions packages/devextreme/js/__internal/core/r1/widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
/* eslint-disable spellcheck/spell-checker */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
/* eslint-disable @typescript-eslint/no-explicit-any */
import '@js/events/click';
import '@js/events/hover';
import '@js/common/core/events/click';
import '@js/common/core/events/hover';

import {
createReRenderEffect, InfernoEffect, InfernoWrapperComponent,
} from '@devextreme/runtime/inferno';
import type { RefObject } from '@devextreme-generator/declarations';
import {
dxClick, focus, keyboard, resize, visibility,
} from '@js/common/core/events/short';
import domAdapter from '@js/core/dom_adapter';
import errors from '@js/core/errors';
import { extend } from '@js/core/utils/extend';
import resizeCallbacks from '@js/core/utils/resize_callbacks';
import { normalizeStyleProp } from '@js/core/utils/style';
import { isFunction } from '@js/core/utils/type';
import {
dxClick, focus, keyboard, resize, visibility,
} from '@js/events/short';
import type { ConfigContextValue } from '@ts/core/r1/config_context';
import { ConfigContext } from '@ts/core/r1/config_context';
import { ConfigProvider } from '@ts/core/r1/config_provider';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import eventsEngine from '@js/common/core/events/core/events_engine';
import { removeEvent } from '@js/common/core/events/remove';
import $ from '@js/core/renderer';
import { TemplateBase } from '@js/core/templates/template_base';
import { isPrimitive } from '@js/core/utils/type';
import eventsEngine from '@js/events/core/events_engine';
import { removeEvent } from '@js/events/remove';

const watchChanges = (function () {
const globalWatch = (data, watchMethod, callback) => watchMethod(() => data, callback);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { triggerShownEvent } from '@js/common/core/events/visibility_change';
import domAdapter from '@js/core/dom_adapter';
import errors from '@js/core/errors';
import $ from '@js/core/renderer';
import Callbacks from '@js/core/utils/callbacks';
import { contains } from '@js/core/utils/dom';
import { triggerShownEvent } from '@js/events/visibility_change';

export const renderedCallbacks = Callbacks({ syncStrategy: true });

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import defaultDateNames from '@js/common/core/localization/default_date_names';
import { getFormatter as getLDMLFormatter } from '@js/common/core/localization/ldml/date.formatter';
import config from '@js/core/config';
import { isDate, isNumeric as isNumber, isString } from '@js/core/utils/type';
import defaultDateNames from '@js/localization/default_date_names';
import { getFormatter as getLDMLFormatter } from '@js/localization/ldml/date.formatter';

const NUMBER_SERIALIZATION_FORMAT = 'number';
const DATE_SERIALIZATION_FORMAT = 'yyyy/MM/dd';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import eventsEngine from '@js/common/core/events/core/events_engine';
import { removeEvent } from '@js/common/core/events/remove';
import { data as elementData } from '@js/core/element_data';
import { isDefined } from '@js/core/utils/type';
import eventsEngine from '@js/events/core/events_engine';
import { removeEvent } from '@js/events/remove';

const COMPONENT_NAMES_DATA_KEY = 'dxComponents';
const ANONYMOUS_COMPONENT_DATA_KEY = 'dxPrivateComponent';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { resize as resizeEvent, visibility as visibilityEvents } from '@js/common/core/events/short';
import config from '@js/core/config';
import type { DOMComponentOptions } from '@js/core/dom_component';
import { getPublicElement } from '@js/core/element';
Expand All @@ -14,7 +15,6 @@ import windowResizeCallbacks from '@js/core/utils/resize_callbacks';
import { addShadowDomStyles } from '@js/core/utils/shadow_dom';
import { isDefined, isFunction, isString } from '@js/core/utils/type';
import { hasWindow } from '@js/core/utils/window';
import { resize as resizeEvent, visibility as visibilityEvents } from '@js/events/short';
import license, { peekValidationPerformed } from '@ts/core/license/license_validation';
import TemplateManagerModule from '@ts/core/m_template_manager';

Expand Down
12 changes: 6 additions & 6 deletions packages/devextreme/js/__internal/core/widget/widget.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import '@js/events/click';
import '@js/events/core/emitter.feedback';
import '@js/events/hover';
import '@js/common/core/events/click';
import '@js/common/core/events/core/emitter.feedback';
import '@js/common/core/events/hover';

import {
active, focus, hover, keyboard,
} from '@js/common/core/events/short';
import Action from '@js/core/action';
import devices from '@js/core/devices';
import type { DefaultOptionsRule } from '@js/core/options/utils';
Expand All @@ -13,9 +16,6 @@ import { extend } from '@js/core/utils/extend';
import { each } from '@js/core/utils/iterator';
import { isDefined, isPlainObject } from '@js/core/utils/type';
import { compare as compareVersions } from '@js/core/utils/version';
import {
active, focus, hover, keyboard,
} from '@js/events/short';
import { focusable as focusableSelector } from '@js/ui/widget/selectors';
import type { WidgetOptions } from '@js/ui/widget/ui.widget';

Expand Down
30 changes: 14 additions & 16 deletions packages/devextreme/js/__internal/data/data_source/m_data_source.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
import { CustomStore } from '@js/common/data';
import { applyBatch } from '@js/common/data/array_utils';
import OperationManager from '@js/common/data/data_source/operation_manager';
import {
CANCELED_TOKEN,
isPending,
mapDataRespectingGrouping,
normalizeDataSourceOptions,
normalizeLoadResult,
normalizeStoreLoadOptionAccessorArguments,
} from '@js/common/data/data_source/utils';
import { errors } from '@js/common/data/errors';
import { throttleChanges } from '@js/common/data/utils';
import Class from '@js/core/class';
import { EventsStrategy } from '@js/core/events_strategy';
import { Deferred, when } from '@js/core/utils/deferred';
Expand All @@ -7,21 +20,6 @@ import { create } from '@js/core/utils/queue';
import {
isBoolean, isDefined, isEmptyObject, isNumeric, isObject, isString,
} from '@js/core/utils/type';
import { applyBatch } from '@js/data/array_utils';
import CustomStore from '@js/data/custom_store';
import OperationManager from '@js/data/data_source/operation_manager';
import {
CANCELED_TOKEN,
isPending,
mapDataRespectingGrouping,
normalizeDataSourceOptions,
normalizeLoadResult,
normalizeStoreLoadOptionAccessorArguments,
} from '@js/data/data_source/utils';
// @ts-expect-error
import { errors } from '@js/data/errors';
// @ts-expect-error
import { throttleChanges } from '@js/data/utils';
import commonUtils from '@ts/core/utils/m_common';

export const DataSource = Class.inherit({
Expand Down Expand Up @@ -354,7 +352,7 @@ export const DataSource = Class.inherit({
const handleDone = (data) => {
const isEmptyArray = Array.isArray(data) && !data.length;
if (!isDefined(data) || isEmptyArray) {
d.reject(new errors.Error('E4009'));
d.reject(errors.Error('E4009'));
} else {
if (!Array.isArray(data)) {
data = [data];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CANCELED_TOKEN } from '@js/data/data_source/utils';
import { CANCELED_TOKEN } from '@js/common/data/data_source/utils';

export default class OperationManager {
constructor() {
Expand Down
8 changes: 3 additions & 5 deletions packages/devextreme/js/__internal/data/data_source/m_utils.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { ArrayStore, CustomStore } from '@js/common/data';
import Store from '@js/common/data/abstract_store';
import { normalizeSortingInfo } from '@js/common/data/utils';
import ajaxUtils from '@js/core/utils/ajax';
import { extend } from '@js/core/utils/extend';
import { each, map } from '@js/core/utils/iterator';
import { isPlainObject } from '@js/core/utils/type';
import Store from '@js/data/abstract_store';
import ArrayStore from '@js/data/array_store';
import CustomStore from '@js/data/custom_store';
// @ts-expect-error
import { normalizeSortingInfo } from '@js/data/utils';

export const CANCELED_TOKEN = 'canceled';

Expand Down
8 changes: 3 additions & 5 deletions packages/devextreme/js/__internal/data/m_abstract_store.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { errors, handleError } from '@js/common/data/errors';
import storeHelper from '@js/common/data/store_helper';
import { processRequestResultLock } from '@js/common/data/utils';
import Class from '@js/core/class';
import { EventsStrategy } from '@js/core/events_strategy';
import { noop } from '@js/core/utils/common';
import { compileGetter } from '@js/core/utils/data';
import { Deferred, when } from '@js/core/utils/deferred';
import { each } from '@js/core/utils/iterator';
import { isEmptyObject } from '@js/core/utils/type';
// @ts-expect-error
import { errors, handleError } from '@js/data/errors';
import storeHelper from '@js/data/store_helper';
// @ts-expect-error
import { processRequestResultLock } from '@js/data/utils';

const { abstract } = Class;
const { queryByOptions } = storeHelper;
Expand Down
Loading

0 comments on commit fc916b8

Please sign in to comment.