Skip to content

Commit

Permalink
Merge pull request #28486 from VasilyStrelyaev/export-from-common-fol…
Browse files Browse the repository at this point in the history
…der-experimental-3

feat: export common entities from 'common' folder
  • Loading branch information
VasilyStrelyaev authored Dec 6, 2024
2 parents 2b27e50 + aff2d59 commit 11a7c3c
Show file tree
Hide file tree
Showing 1,588 changed files with 15,680 additions and 14,393 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import 'devextreme/localization/globalize/date';
import 'devextreme/localization/globalize/currency';
import 'devextreme/localization/globalize/message';

import deMessages from 'npm:devextreme/localization/messages/de.json!json';
import ruMessages from 'npm:devextreme/localization/messages/ru.json!json';
import deMessages from 'npm:devextreme/common/core/localization/messages/de.json!json';
import ruMessages from 'npm:devextreme/common/core/localization/messages/ru.json!json';

import deCldrData from 'npm:devextreme-cldr-data/de.json!json';
import ruCldrData from 'npm:devextreme-cldr-data/ru.json!json';
Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Localization/UsingGlobalize/React/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import 'devextreme/localization/globalize/date';
import 'devextreme/localization/globalize/currency';
import 'devextreme/localization/globalize/message';

import deMessages from 'devextreme/localization/messages/de.json';
import ruMessages from 'devextreme/localization/messages/ru.json';
import deMessages from 'devextreme/common/core/localization/messages/de.json';
import ruMessages from 'devextreme/common/core/localization/messages/ru.json';

import deCldrData from 'devextreme-cldr-data/de.json';
import ruCldrData from 'devextreme-cldr-data/ru.json';
Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Localization/UsingGlobalize/ReactJs/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import 'devextreme/localization/globalize/number';
import 'devextreme/localization/globalize/date';
import 'devextreme/localization/globalize/currency';
import 'devextreme/localization/globalize/message';
import deMessages from 'devextreme/localization/messages/de.json';
import ruMessages from 'devextreme/localization/messages/ru.json';
import deMessages from 'devextreme/common/core/localization/messages/de.json';
import ruMessages from 'devextreme/common/core/localization/messages/ru.json';
import deCldrData from 'devextreme-cldr-data/de.json';
import ruCldrData from 'devextreme-cldr-data/ru.json';
import supplementalCldrData from 'devextreme-cldr-data/supplemental.json';
Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Localization/UsingGlobalize/Vue/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ import 'devextreme/localization/globalize/currency';
import 'devextreme/localization/globalize/message';
/* eslint-disable import/no-unresolved */
/* eslint-disable import/no-webpack-loader-syntax */
import * as deMessages from 'npm:devextreme/localization/messages/de.json!json';
import * as ruMessages from 'npm:devextreme/localization/messages/ru.json!json';
import * as deMessages from 'npm:devextreme/common/core/localization/messages/de.json!json';
import * as ruMessages from 'npm:devextreme/common/core/localization/messages/ru.json!json';
import * as deCldrData from 'npm:devextreme-cldr-data/de.json!json';
import * as ruCldrData from 'npm:devextreme-cldr-data/ru.json!json';
import * as supplementalCldrData from 'npm:devextreme-cldr-data/supplemental.json!json';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { DxSelectBoxModule, DxDataGridModule } from 'devextreme-angular';

import { locale, loadMessages, formatMessage } from 'devextreme/localization';

import deMessages from 'npm:devextreme/localization/messages/de.json!json';
import ruMessages from 'npm:devextreme/localization/messages/ru.json!json';
import deMessages from 'npm:devextreme/common/core/localization/messages/de.json!json';
import ruMessages from 'npm:devextreme/common/core/localization/messages/ru.json!json';
import { Locale, Payment, Service } from './app.service';

if (!/localhost/.test(document.location.host)) {
Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Localization/UsingIntl/React/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import React, { useState } from 'react';
import DataGrid, { Column, Editing, FilterRow } from 'devextreme-react/data-grid';
import SelectBox, { SelectBoxTypes } from 'devextreme-react/select-box';

import deMessages from 'devextreme/localization/messages/de.json';
import ruMessages from 'devextreme/localization/messages/ru.json';
import deMessages from 'devextreme/common/core/localization/messages/de.json';
import ruMessages from 'devextreme/common/core/localization/messages/ru.json';
import { locale, loadMessages, formatMessage } from 'devextreme/localization';

import service from './data.ts';
Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Localization/UsingIntl/ReactJs/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import React, { useState } from 'react';
import DataGrid, { Column, Editing, FilterRow } from 'devextreme-react/data-grid';
import SelectBox from 'devextreme-react/select-box';
import deMessages from 'devextreme/localization/messages/de.json';
import ruMessages from 'devextreme/localization/messages/ru.json';
import deMessages from 'devextreme/common/core/localization/messages/de.json';
import ruMessages from 'devextreme/common/core/localization/messages/ru.json';
import { locale, loadMessages, formatMessage } from 'devextreme/localization';
import service from './data.js';

Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Localization/UsingIntl/Vue/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ import {
import DxSelectBox, { DxSelectBoxTypes } from 'devextreme-vue/select-box';
/* eslint-disable import/no-unresolved */
/* eslint-disable import/no-webpack-loader-syntax */
import * as deMessages from 'npm:devextreme/localization/messages/de.json!json';
import * as ruMessages from 'npm:devextreme/localization/messages/ru.json!json';
import * as deMessages from 'npm:devextreme/common/core/localization/messages/de.json!json';
import * as ruMessages from 'npm:devextreme/common/core/localization/messages/ru.json!json';
import { locale as dxLocale, loadMessages, formatMessage as dxFormatMessage } from 'devextreme/localization';
import service from './data.ts';
Expand Down
16 changes: 15 additions & 1 deletion apps/demos/configs/Angular/config.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ const bundleConfig = {
bundles: {
'devextreme.angular.systemjs.js': [
'devextreme/*',
'devextreme/data/*',
'devextreme/data/odata/*',
'devextreme/animation/*',
'devextreme/common/*',
'devextreme/core/*',
'devextreme/core/utils/*',
'devextreme/data/*',
Expand All @@ -23,8 +24,21 @@ const bundleConfig = {
'devextreme/ui/toast/*',
'devextreme/viz/*',
'devextreme/viz/vector_map/*',
'devextreme/common/*',
'devextreme/common/data/*',
'devextreme/common/data/odata/*',
'devextreme/common/export/*',
'devextreme/common/core/*',
'devextreme/common/core/animation/*',
'devextreme/common/core/environment/*',
'devextreme/common/core/events/*',
'devextreme/common/core/localization/*',
'devextreme-angular',
'devextreme-angular/*',
'devextreme-angular/core/*',
'devextreme-angular/common/*',
'devextreme-angular/common/core/*',
'devextreme-angular/common/export/*',
'devexpress-gantt',
'devexpress-diagram',
'rxjs/*',
Expand Down
18 changes: 16 additions & 2 deletions apps/demos/configs/React/config.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ const bundleConfig = {
bundles: {
'devextreme.react.systemjs.js': [
'devextreme/*',
'devextreme/data/*',
'devextreme/data/odata/*',
'devextreme/animation/*',
'devextreme/common/*',
'devextreme/core/*',
'devextreme/core/utils/*',
'devextreme/data/*',
Expand All @@ -23,8 +24,21 @@ const bundleConfig = {
'devextreme/ui/toast/*',
'devextreme/viz/*',
'devextreme/viz/vector_map/*',
'devextreme/common/*',
'devextreme/common/data/*',
'devextreme/common/data/odata/*',
'devextreme/common/export/*',
'devextreme/common/core/*',
'devextreme/common/core/animation/*',
'devextreme/common/core/environment/*',
'devextreme/common/core/events/*',
'devextreme/common/core/localization/*',
'devextreme/common/core/localization/globalize/*',
'devextreme-react/*',
'devextreme-react/core/*',
'devextreme-react/common/*',
'devextreme-react/common/core/*',
'devextreme-react/common/export/*',
'devexpress-gantt',
'devexpress-diagram',
'react/*',
Expand All @@ -33,7 +47,7 @@ const bundleConfig = {
},
map: {
'devextreme.react.systemjs.js': '../../../../bundles/devextreme.react.systemjs.js',
'devextreme/localization/messages': 'npm:devextreme/localization/messages',
'devextreme/common/core/localization/messages': 'npm:devextreme/common/core/localization/messages',
},
packages: {
'react': {
Expand Down
2 changes: 1 addition & 1 deletion apps/demos/configs/React/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ window.config = {
'devextreme/events/utils': {
main: 'index',
},
'devextreme/localization/messages': {
'devextreme/common/core/localization/messages': {
format: 'json',
defaultExtension: 'json',
},
Expand Down
18 changes: 17 additions & 1 deletion apps/demos/configs/ReactJs/config.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ const bundleConfig = {
bundles: {
'devextreme.react.systemjs.js': [
'devextreme/*',
'devextreme/data/*',
'devextreme/data/odata/*',
'devextreme/animation/*',
'devextreme/core/*',
'devextreme/core/utils/*',
Expand All @@ -17,7 +19,21 @@ const bundleConfig = {
'devextreme/ui/pivot_grid/*',
'devextreme/viz/*',
'devextreme/viz/vector_map/*',
'devextreme/common/*',
'devextreme/common/data/*',
'devextreme/common/data/odata/*',
'devextreme/common/export/*',
'devextreme/common/core/*',
'devextreme/common/core/animation/*',
'devextreme/common/core/environment/*',
'devextreme/common/core/events/*',
'devextreme/common/core/localization/*',
'devextreme/common/core/localization/globalize/*',
'devextreme-react/*',
'devextreme-react/core/*',
'devextreme-react/common/*',
'devextreme-react/common/core/*',
'devextreme-react/common/export/*',
'devexpress-gantt',
'devexpress-diagram',
'react/*',
Expand All @@ -26,7 +42,7 @@ const bundleConfig = {
},
map: {
'devextreme.react.systemjs.js': '../../../../../bundles/devextreme.react.systemjs.js',
'devextreme/localization/messages': 'npm:devextreme/localization/messages',
'devextreme/common/core/localization/messages': 'npm:devextreme/common/core/localization/messages',
},
packages: {
'react': {
Expand Down
2 changes: 1 addition & 1 deletion apps/demos/configs/ReactJs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ window.config = {
'devextreme/events/utils': {
main: 'index',
},
'devextreme/localization/messages': {
'devextreme/common/core/localization/messages': {
format: 'json',
defaultExtension: '',
},
Expand Down
16 changes: 15 additions & 1 deletion apps/demos/configs/Vue/config.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ const bundleConfig = {
bundles: {
'devextreme.vue.systemjs.js': [
'devextreme/*',
'devextreme/data/*',
'devextreme/data/odata/*',
'devextreme/animation/*',
'devextreme/common/*',
'devextreme/core/*',
'devextreme/core/utils/*',
'devextreme/data/*',
Expand All @@ -23,7 +24,20 @@ const bundleConfig = {
'devextreme/ui/toast/*',
'devextreme/viz/*',
'devextreme/viz/vector_map/*',
'devextreme/common/*',
'devextreme/common/data/*',
'devextreme/common/data/odata/*',
'devextreme/common/export/*',
'devextreme/common/core/*',
'devextreme/common/core/animation/*',
'devextreme/common/core/environment/*',
'devextreme/common/core/events/*',
'devextreme/common/core/localization/*',
'devextreme-vue/*',
'devextreme-vue/core/*',
'devextreme-vue/common/*',
'devextreme-vue/common/core/*',
'devextreme-vue/common/export/*',
'devexpress-gantt',
'devexpress-diagram',
],
Expand Down
9 changes: 6 additions & 3 deletions apps/demos/rollup.devextreme-angular.umd.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ import babel from '@rollup/plugin-babel';
import fs from 'fs-extra';

const baseDir = './node_modules/devextreme-angular/fesm2022/';
const componentNames = fs.readdirSync(baseDir)
const fileNames = fs.readdirSync(baseDir)
.filter((fileName) => fileName.indexOf('mjs.map') !== -1)
.filter((fileName) => fileName.indexOf('devextreme-angular-ui') === 0)
.filter((fileName) =>
fileName.indexOf('devextreme-angular-ui') === 0
|| fileName.indexOf('devextreme-angular-common') === 0
)
.map((fileName) => fileName.replace('.mjs.map', ''));

const inputs = {
'devextreme-angular': `${baseDir}devextreme-angular.mjs`,
'devextreme-angular-core': `${baseDir}devextreme-angular-core.mjs`,
'devextreme-angular-http': `${baseDir}devextreme-angular-http.mjs`,
...componentNames.reduce((acc, name) => {
...fileNames.reduce((acc, name) => {
acc[name] = `${baseDir}${name}.mjs`;

return acc;
Expand Down
3 changes: 2 additions & 1 deletion apps/demos/utils/bundle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ const prepareConfigs = (framework)=> {
prepareDevextremexAngularFiles();

const bundlesRoot = 'node_modules/devextreme-angular/bundles';

const componentNames = fs.readdirSync(bundlesRoot)
.filter((fileName) => fileName.indexOf('umd.js') !== -1)
.filter((fileName) => fileName.indexOf('devextreme-angular-ui') === 0)
Expand Down Expand Up @@ -175,7 +176,7 @@ const prepareConfigs = (framework)=> {
}];

additionPaths = {
'devextreme/localization/messages/*': 'node_modules/devextreme/localization/messages/*',
'devextreme/common/core/localization/messages/*': 'node_modules/devextreme/common/core/localization/messages/*',
};

packages = [
Expand Down
24 changes: 14 additions & 10 deletions e2e/compilation-cases/data/data_source.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
/* eslint-disable import/named */
/* eslint-disable @typescript-eslint/no-type-alias */
/* eslint-disable @typescript-eslint/no-unsafe-return */
import {
Store,
DataSource,
CustomStore,
ArrayStore,
ODataStore,
LocalStore,
} from 'devextreme/common/data';

import {
DataSourceOptionsStub,
DataSourceLike,
} from 'devextreme/data/data_source';

import {
AnotherType,
ANY,
Expand All @@ -11,16 +25,6 @@ import {
SomeType,
} from '../consts';

import DataSource, {
DataSourceLike,
DataSourceOptionsStub,
} from 'devextreme/data/data_source';
import CustomStore from 'devextreme/data/custom_store';
import ArrayStore from 'devextreme/data/array_store';
import ODataStore from 'devextreme/data/odata/store';
import LocalStore from 'devextreme/data/local_store';
import { Store } from 'devextreme/data/index';

export function promiseResolveAcceptsMultipleArguments() {
const callback: (a: any, b: any) => void = ANY;
const dataSource: DataSource = ANY;
Expand Down
10 changes: 7 additions & 3 deletions e2e/compilation-cases/data/stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import $ from 'jquery';
import { HttpClient } from '@angular/common/http';
import CustomStore from 'devextreme/data/custom_store';
import { Store, StoreOptions } from 'devextreme/data';
import {
Store,
StoreOptions,
CustomStore,
LoadResult,
} from 'devextreme/common/data';

import {
ANY,
assertType,
notAny,
notNever,
toAssertion,
} from '../consts';
import type { LoadResult } from 'devextreme/common/data/custom-store';

export async function infersTItemFromComplexLoadResult() {
const store = new CustomStore({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"axe-core": "4.10.2",
"cheerio": "1.0.0-rc.10",
"codelyzer": "6.0.2",
"devextreme-internal-tools": "16.0.0-beta.18",
"devextreme-internal-tools": "16.0.0",
"http-server": "14.1.1",
"husky": "8.0.3",
"jest": "29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/devextreme-angular/build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = {
outputFileName: 'tests/src/server/component-names.ts'
},
commonReexportsGenerator: {
metadataPath: './metadata/NGMetaData.json',
imdMetadataFilePath: './metadata/integration-data.json',
outputPath: './src/'
},
},
Expand Down
Loading

0 comments on commit 11a7c3c

Please sign in to comment.