diff --git a/package-lock.json b/package-lock.json index 172d932c7..02118673f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,62 +15,6 @@ "puppeteer": "^21.11.0" } }, - "node_modules/@angular-devkit/core": { - "version": "16.1.2", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-16.1.2.tgz", - "integrity": "sha512-RGSkcu03Zybg7drenKxBHvQ/xF8LLZR7o09S4vtLVDwMTGW/ZHnZ+YSC0OuRddbtBlBRhjmsQN6HPvXXfwGLkQ==", - "dev": true, - "peer": true, - "dependencies": { - "ajv": "8.12.0", - "ajv-formats": "2.1.1", - "jsonc-parser": "3.2.0", - "rxjs": "7.8.1", - "source-map": "0.7.4" - }, - "engines": { - "node": "^16.14.0 || >=18.10.0", - "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", - "yarn": ">= 1.13.0" - }, - "peerDependencies": { - "chokidar": "^3.5.2" - }, - "peerDependenciesMeta": { - "chokidar": { - "optional": true - } - } - }, - "node_modules/@angular-devkit/core/node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "dev": true, - "peer": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@angular-devkit/schematics": { - "version": "16.1.2", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-16.1.2.tgz", - "integrity": "sha512-5CRHrurFwJh7IPpo56DbIjcqzI1usraYwjHKZFeXoW4sQTRP5yeSuJoBM9zuBX5ZFQVCRt24j5DQTlsGk7Ky8Q==", - "dev": true, - "peer": true, - "dependencies": { - "@angular-devkit/core": "16.1.2", - "jsonc-parser": "3.2.0", - "magic-string": "0.30.0", - "ora": "5.4.1", - "rxjs": "7.8.1" - }, - "engines": { - "node": "^16.14.0 || >=18.10.0", - "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", - "yarn": ">= 1.13.0" - } - }, "node_modules/@angular-eslint/schematics": { "version": "0.2.0-beta.1", "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-0.2.0-beta.1.tgz", @@ -201,13 +145,6 @@ "integrity": "sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==", "dev": true }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true, - "peer": true - }, "node_modules/@lerna/add": { "version": "5.6.2", "resolved": "https://registry.npmjs.org/@lerna/add/-/add-5.6.2.tgz", @@ -1955,41 +1892,6 @@ "node": ">=8" } }, - "node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "dev": true, - "peer": true, - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -3348,13 +3250,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "peer": true - }, "node_modules/fast-fifo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", @@ -4539,13 +4434,6 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "peer": true - }, "node_modules/json-stringify-nice": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz", @@ -4853,19 +4741,6 @@ "node": ">=12" } }, - "node_modules/magic-string": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz", - "integrity": "sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.13" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -6708,16 +6583,6 @@ "once": "^1.3.1" } }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/puppeteer": { "version": "21.11.0", "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.11.0.tgz", @@ -6779,21 +6644,6 @@ } } }, - "node_modules/puppeteer/node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", - "dev": true, - "optional": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -7163,16 +7013,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/resolve": { "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", @@ -8034,16 +7874,6 @@ "yarn": "*" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "peer": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, "node_modules/urlpattern-polyfill": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", @@ -8427,43 +8257,6 @@ } }, "dependencies": { - "@angular-devkit/core": { - "version": "16.1.2", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-16.1.2.tgz", - "integrity": "sha512-RGSkcu03Zybg7drenKxBHvQ/xF8LLZR7o09S4vtLVDwMTGW/ZHnZ+YSC0OuRddbtBlBRhjmsQN6HPvXXfwGLkQ==", - "dev": true, - "peer": true, - "requires": { - "ajv": "8.12.0", - "ajv-formats": "2.1.1", - "jsonc-parser": "3.2.0", - "rxjs": "7.8.1", - "source-map": "0.7.4" - }, - "dependencies": { - "source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "dev": true, - "peer": true - } - } - }, - "@angular-devkit/schematics": { - "version": "16.1.2", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-16.1.2.tgz", - "integrity": "sha512-5CRHrurFwJh7IPpo56DbIjcqzI1usraYwjHKZFeXoW4sQTRP5yeSuJoBM9zuBX5ZFQVCRt24j5DQTlsGk7Ky8Q==", - "dev": true, - "peer": true, - "requires": { - "@angular-devkit/core": "16.1.2", - "jsonc-parser": "3.2.0", - "magic-string": "0.30.0", - "ora": "5.4.1", - "rxjs": "7.8.1" - } - }, "@angular-eslint/schematics": { "version": "0.2.0-beta.1", "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-0.2.0-beta.1.tgz", @@ -8569,13 +8362,6 @@ "integrity": "sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==", "dev": true }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true, - "peer": true - }, "@lerna/add": { "version": "5.6.2", "resolved": "https://registry.npmjs.org/@lerna/add/-/add-5.6.2.tgz", @@ -9725,8 +9511,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", - "dev": true, - "requires": {} + "dev": true }, "@octokit/plugin-rest-endpoint-methods": { "version": "6.7.0", @@ -10002,29 +9787,6 @@ "indent-string": "^4.0.0" } }, - "ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "peer": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "dev": true, - "peer": true, - "requires": { - "ajv": "^8.0.0" - } - }, "ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -11056,13 +10818,6 @@ } } }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "peer": true - }, "fast-fifo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", @@ -11978,13 +11733,6 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "peer": true - }, "json-stringify-nice": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz", @@ -12233,16 +11981,6 @@ "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true }, - "magic-string": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz", - "integrity": "sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==", - "dev": true, - "peer": true, - "requires": { - "@jridgewell/sourcemap-codec": "^1.4.13" - } - }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -13661,13 +13399,6 @@ "once": "^1.3.1" } }, - "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "peer": true - }, "puppeteer": { "version": "21.11.0", "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.11.0.tgz", @@ -13690,14 +13421,6 @@ "js-yaml": "^4.1.0", "parse-json": "^5.2.0" } - }, - "typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", - "dev": true, - "optional": true, - "peer": true } } }, @@ -13994,13 +13717,6 @@ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "peer": true - }, "resolve": { "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", @@ -14660,16 +14376,6 @@ "integrity": "sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==", "dev": true }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "peer": true, - "requires": { - "punycode": "^2.1.0" - } - }, "urlpattern-polyfill": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", @@ -14914,8 +14620,7 @@ "version": "8.16.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", - "dev": true, - "requires": {} + "dev": true }, "xtend": { "version": "4.0.2", diff --git a/packages/devextreme-cli/package-lock.json b/packages/devextreme-cli/package-lock.json index 7f35170dd..604e9d2b5 100644 --- a/packages/devextreme-cli/package-lock.json +++ b/packages/devextreme-cli/package-lock.json @@ -26,6 +26,7 @@ "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", "babel-eslint": "^10.1.0", + "create-vite": "6.3.1", "cross-env": "^5.2.1", "eslint": "^7.32.0", "eslint-config-angular": "^0.5.0", @@ -2877,6 +2878,22 @@ "node": ">=8" } }, + "node_modules/create-vite": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/create-vite/-/create-vite-6.3.1.tgz", + "integrity": "sha512-kI3S6OgiBYnRlmhr4gNY76Fj62fMh+KukEd2PSAvMPdnY95rHhJCjCoUlt4BuHVNjfmRMbsFBBtO5dryFoSyUw==", + "dev": true, + "bin": { + "create-vite": "index.js", + "cva": "index.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + } + }, "node_modules/cross-env": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.2.1.tgz", @@ -10769,8 +10786,7 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} + "dev": true }, "ajv": { "version": "6.12.6", @@ -11359,6 +11375,12 @@ } } }, + "create-vite": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/create-vite/-/create-vite-6.3.1.tgz", + "integrity": "sha512-kI3S6OgiBYnRlmhr4gNY76Fj62fMh+KukEd2PSAvMPdnY95rHhJCjCoUlt4BuHVNjfmRMbsFBBtO5dryFoSyUw==", + "dev": true + }, "cross-env": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.2.1.tgz", @@ -11427,8 +11449,7 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", - "dev": true, - "requires": {} + "dev": true }, "deep-is": { "version": "0.1.4", @@ -11911,8 +11932,7 @@ "version": "8.10.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-angular": { "version": "4.1.0", @@ -12041,8 +12061,7 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-unused-imports": { "version": "1.1.5", @@ -13753,8 +13772,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "requires": {} + "dev": true }, "jest-regex-util": { "version": "29.6.3", diff --git a/packages/devextreme-cli/package.json b/packages/devextreme-cli/package.json index e0965ac5f..5a82a2df7 100644 --- a/packages/devextreme-cli/package.json +++ b/packages/devextreme-cli/package.json @@ -52,6 +52,7 @@ "@typescript-eslint/parser": "^4.33.0", "babel-eslint": "^10.1.0", "cross-env": "^5.2.1", + "create-vite": "6.3.1", "eslint": "^7.32.0", "eslint-config-angular": "^0.5.0", "eslint-config-prettier": "^8.10.0", diff --git a/packages/devextreme-cli/src/applications/application.react.js b/packages/devextreme-cli/src/applications/application.react.js index 9be907fa6..6452d5da7 100644 --- a/packages/devextreme-cli/src/applications/application.react.js +++ b/packages/devextreme-cli/src/applications/application.react.js @@ -13,13 +13,12 @@ const stringUtils = require('../utility/string'); const typescriptUtils = require('../utility/typescript-extension'); const removeFile = require('../utility/file-operations').remove; const latestVersions = require('../utility/latest-versions'); -const { extractToolingVersion } = require('../utility/extract-tooling-version'); const defaultStyles = [ 'devextreme/dist/css/dx.light.css' ]; const getExtension = (appPath) => { - return fs.existsSync(path.join(appPath, 'src', 'App.tsx')) ? '.tsx' : '.js'; + return fs.existsSync(path.join(appPath, 'src', 'App.tsx')) ? '.tsx' : '.jsx'; }; const pathToPagesIndex = () => { @@ -27,9 +26,9 @@ const pathToPagesIndex = () => { return path.join(process.cwd(), 'src', 'pages', `index${extension}`); }; -const preparePackageJsonForTemplate = (appPath, appName, isTypeScript) => { +const preparePackageJsonForTemplate = (appPath, appName) => { const dependencies = [ - { name: 'sass', version: '^1.34.1' }, + { name: 'sass-embedded', version: '^1.85.1' }, { name: 'devextreme-cli', version: latestVersions['devextreme-cli'], dev: true }, { name: 'react-router-dom', version: '^6.3.0' }, ]; @@ -60,27 +59,25 @@ const create = async(appName, options) => { layout: stringUtils.classify(layoutType), isTypeScript: typescriptUtils.isTypeScript(templateType) }); - const toolingVersion = extractToolingVersion(options); - const commandArguments = [`-p=create-react-app${toolingVersion}`, 'create-react-app', appName]; - const templateSuffix = templateOptions.isTypeScript ? '-typescript' : ''; - const templatePath = path.resolve(__dirname, `../templates/cra-template${templateSuffix}`); + const commandArguments = [`-p=create-vite@${latestVersions['create-vite']}`, 'create-vite', appName]; - commandArguments.push(`--template file:${templatePath}`); + commandArguments.push(`--template react${templateOptions.isTypeScript ? '-ts' : ''}`); await runCommand('npx', commandArguments); const appPath = path.join(process.cwd(), appName); modifyIndexHtml(appPath, templateOptions.project); + addTemplate(appPath, appName, templateOptions); }; const modifyIndexHtml = (appPath, appName) => { - const indexHtmlPath = path.join(appPath, 'public', 'index.html'); + const indexHtmlPath = path.join(appPath, 'index.html'); let htmlContent = fs.readFileSync(indexHtmlPath).toString(); - htmlContent = htmlContent.replace(/(\w+\s*)+<\/title>/, `<title>${appName}<\/title>`); + htmlContent = htmlContent.replace(/<title>[^<]+<\/title>/, `<title>${appName}<\/title>`); htmlContent = htmlContent.replace('<body>', '<body class="dx-viewport">'); fs.writeFileSync(indexHtmlPath, htmlContent); @@ -97,7 +94,6 @@ const addTemplate = (appPath, appName, templateOptions) => { ); const manifestPath = path.join(appPath, 'public', 'manifest.json'); - const indexPath = path.join(appPath, 'src', templateOptions.isTypeScript ? 'index.tsx' : 'index.js'); const styles = [ './themes/generated/theme.additional.css', @@ -108,15 +104,15 @@ const addTemplate = (appPath, appName, templateOptions) => { ]; templateCreator.moveTemplateFilesToProject(applicationTemplatePath, appPath, templateOptions, getCorrectPath); - removeFile(path.join(appPath, 'src', 'App.css')); - !templateOptions.isTypeScript && removeFile(path.join(appPath, 'src', 'types.js')); + + !templateOptions.isTypeScript && removeFile(path.join(appPath, 'src', 'types.jsx')); + if(!templateOptions.empty) { addSamplePages(appPath, templateOptions); } preparePackageJsonForTemplate(appPath, appName, templateOptions.isTypeScript); updateJsonPropName(manifestPath, appName); - addPolyfills(packageJsonUtils.getPackageJsonPath(), indexPath); install({}, appPath, styles); }; @@ -130,15 +126,6 @@ const install = (options, appPath, styles) => { packageManager.runInstall({ cwd: appPath }); }; -const addPolyfills = (packagePath, indexPath) => { - const packages = [ - { name: 'react-app-polyfill', version: '^1.0.0' } - ]; - - packageJsonUtils.addDependencies(packagePath, packages); - moduleUtils.insertImport(indexPath, './polyfills'); -}; - const addStylesToApp = (filePath, styles) => { styles.forEach(style => { moduleUtils.insertImport(filePath, style); diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/LICENSE b/packages/devextreme-cli/src/templates/cra-template-typescript/LICENSE deleted file mode 100644 index 5930f2b8d..000000000 --- a/packages/devextreme-cli/src/templates/cra-template-typescript/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/README.md b/packages/devextreme-cli/src/templates/cra-template-typescript/README.md deleted file mode 100644 index e7197568d..000000000 --- a/packages/devextreme-cli/src/templates/cra-template-typescript/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# cra-template-typescript - -This is the official TypeScript template for [Create React App](https://github.com/facebook/create-react-app). - -To use this template, add `--template typescript` when creating a new app. - -For example: - -```sh -npx create-react-app my-app --template typescript - -# or - -yarn create react-app my-app --template typescript -``` - -For more information, please refer to: - -- [Getting Started](https://create-react-app.dev/docs/getting-started) – How to create a new app. -- [User Guide](https://create-react-app.dev) – How to develop apps bootstrapped with Create React App. diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/package.json b/packages/devextreme-cli/src/templates/cra-template-typescript/package.json deleted file mode 100644 index 88de656d7..000000000 --- a/packages/devextreme-cli/src/templates/cra-template-typescript/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "cra-template-typescript", - "version": "1.2.0", - "keywords": [ - "react", - "create-react-app", - "template", - "typescript" - ], - "description": "The base TypeScript template for Create React App.", - "repository": { - "type": "git", - "url": "https://github.com/facebook/create-react-app.git", - "directory": "packages/cra-template-typescript" - }, - "license": "MIT", - "engines": { - "node": ">=14.21.3" - }, - "bugs": { - "url": "https://github.com/facebook/create-react-app/issues" - }, - "files": [ - "template", - "template.json" - ] -} diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template.json b/packages/devextreme-cli/src/templates/cra-template-typescript/template.json deleted file mode 100644 index 3678a922d..000000000 --- a/packages/devextreme-cli/src/templates/cra-template-typescript/template.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "package": { - "dependencies": { - "@testing-library/jest-dom": "^6.6.3", - "@testing-library/react": "^16.2.0", - "@testing-library/dom": "^10.4.0", - "@testing-library/user-event": "^14.6.0", - "@types/jest": "^29.5.14", - "@types/node": "^22.0.0", - "@types/react": "^19.0.0", - "@types/react-dom": "^19.0.0", - "typescript": "^4.0.0", - "web-vitals": "^4.2.4" - }, - "eslintConfig": { - "extends": ["react-app", "react-app/jest"] - } - } -} diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/README.md b/packages/devextreme-cli/src/templates/cra-template-typescript/template/README.md deleted file mode 100644 index b87cb0044..000000000 --- a/packages/devextreme-cli/src/templates/cra-template-typescript/template/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Getting Started with Create React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.\ -You will also see any lint errors in the console. - -### `npm test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `npm run build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/gitignore b/packages/devextreme-cli/src/templates/cra-template-typescript/template/gitignore deleted file mode 100644 index 4d29575de..000000000 --- a/packages/devextreme-cli/src/templates/cra-template-typescript/template/gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/public/index.html b/packages/devextreme-cli/src/templates/cra-template-typescript/template/public/index.html deleted file mode 100644 index aa069f27c..000000000 --- a/packages/devextreme-cli/src/templates/cra-template-typescript/template/public/index.html +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8" /> - <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <meta name="theme-color" content="#000000" /> - <meta - name="description" - content="Web site created using create-react-app" - /> - <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> - <!-- - manifest.json provides metadata used when your web app is installed on a - user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ - --> - <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> - <!-- - Notice the use of %PUBLIC_URL% in the tags above. - It will be replaced with the URL of the `public` folder during the build. - Only files inside the `public` folder can be referenced from the HTML. - - Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will - work correctly both with client-side routing and a non-root public URL. - Learn how to configure a non-root public URL by running `npm run build`. - --> - <title>React App - - - -
- - - diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/App.css b/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/App.css deleted file mode 100644 index 74b5e0534..000000000 --- a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/App.css +++ /dev/null @@ -1,38 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/App.test.tsx b/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/App.test.tsx deleted file mode 100644 index f0db7d3d4..000000000 --- a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/App.test.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import { screen } from '@testing-library/dom'; -import App from './App'; - -test('renders learn react link', () => { - render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/App.tsx b/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/App.tsx deleted file mode 100644 index a53698aab..000000000 --- a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/App.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import logo from './logo.svg'; -import './App.css'; - -function App() { - return ( -
-
- logo -

- Edit src/App.tsx and save to reload. -

- - Learn React - -
-
- ); -} - -export default App; diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/index.tsx b/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/index.tsx deleted file mode 100644 index 032464fb6..000000000 --- a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/index.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import './index.css'; -import App from './App'; -import reportWebVitals from './reportWebVitals'; - -const root = ReactDOM.createRoot( - document.getElementById('root') as HTMLElement -); -root.render( - - - -); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/logo.svg b/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/logo.svg deleted file mode 100644 index 9dfc1c058..000000000 --- a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/reportWebVitals.ts b/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/reportWebVitals.ts deleted file mode 100644 index 1e8febd4a..000000000 --- a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/reportWebVitals.ts +++ /dev/null @@ -1,13 +0,0 @@ -const reportWebVitals = (onPerfEntry?: () => any) => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ onLCP, onINP, onCLS, onFCP, onTTFB }) => { - onCLS(onPerfEntry); - onINP(onPerfEntry); - onLCP(onPerfEntry); - onFCP(onPerfEntry); - onTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/setupTests.ts b/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/setupTests.ts deleted file mode 100644 index 8f2609b7b..000000000 --- a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/setupTests.ts +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; diff --git a/packages/devextreme-cli/src/templates/cra-template/LICENSE b/packages/devextreme-cli/src/templates/cra-template/LICENSE deleted file mode 100644 index 5930f2b8d..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/packages/devextreme-cli/src/templates/cra-template/README.md b/packages/devextreme-cli/src/templates/cra-template/README.md deleted file mode 100644 index 9e8434b78..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# cra-template - -This is the official base template for [Create React App](https://github.com/facebook/create-react-app). - -If you don't specify a template (for example, `--template typescript`), this template will be used by default. - -For more information, please refer to: - -- [Getting Started](https://create-react-app.dev/docs/getting-started) – How to create a new app. -- [User Guide](https://create-react-app.dev) – How to develop apps bootstrapped with Create React App. diff --git a/packages/devextreme-cli/src/templates/cra-template/package.json b/packages/devextreme-cli/src/templates/cra-template/package.json deleted file mode 100644 index 53350728e..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "cra-template", - "version": "1.2.0", - "keywords": [ - "react", - "create-react-app", - "template" - ], - "description": "The base template for Create React App.", - "repository": { - "type": "git", - "url": "https://github.com/facebook/create-react-app.git", - "directory": "packages/cra-template" - }, - "license": "MIT", - "engines": { - "node": ">=14.21.3" - }, - "bugs": { - "url": "https://github.com/facebook/create-react-app/issues" - }, - "files": [ - "template", - "template.json" - ] -} diff --git a/packages/devextreme-cli/src/templates/cra-template/template.json b/packages/devextreme-cli/src/templates/cra-template/template.json deleted file mode 100644 index 65327dcb1..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/template.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "package": { - "dependencies": { - "@testing-library/jest-dom": "^6.6.3", - "@testing-library/react": "^16.2.0", - "@testing-library/dom": "^10.4.0", - "@testing-library/user-event": "^14.6.0", - "web-vitals": "^4.2.4" - }, - "eslintConfig": { - "extends": ["react-app", "react-app/jest"] - } - } -} diff --git a/packages/devextreme-cli/src/templates/cra-template/template/README.md b/packages/devextreme-cli/src/templates/cra-template/template/README.md deleted file mode 100644 index 58beeaccd..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/template/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# Getting Started with Create React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in your browser. - -The page will reload when you make changes.\ -You may also see any lint errors in the console. - -### `npm test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `npm run build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can't go back!** - -If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. - -You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) - -### Analyzing the Bundle Size - -This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) - -### Making a Progressive Web App - -This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) - -### Advanced Configuration - -This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) - -### Deployment - -This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) - -### `npm run build` fails to minify - -This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) diff --git a/packages/devextreme-cli/src/templates/cra-template/template/gitignore b/packages/devextreme-cli/src/templates/cra-template/template/gitignore deleted file mode 100644 index 4d29575de..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/template/gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/packages/devextreme-cli/src/templates/cra-template/template/public/favicon.ico b/packages/devextreme-cli/src/templates/cra-template/template/public/favicon.ico deleted file mode 100644 index a11777cc4..000000000 Binary files a/packages/devextreme-cli/src/templates/cra-template/template/public/favicon.ico and /dev/null differ diff --git a/packages/devextreme-cli/src/templates/cra-template/template/public/index.html b/packages/devextreme-cli/src/templates/cra-template/template/public/index.html deleted file mode 100644 index aa069f27c..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/template/public/index.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - React App - - - -
- - - diff --git a/packages/devextreme-cli/src/templates/cra-template/template/public/logo192.png b/packages/devextreme-cli/src/templates/cra-template/template/public/logo192.png deleted file mode 100644 index fc44b0a37..000000000 Binary files a/packages/devextreme-cli/src/templates/cra-template/template/public/logo192.png and /dev/null differ diff --git a/packages/devextreme-cli/src/templates/cra-template/template/public/logo512.png b/packages/devextreme-cli/src/templates/cra-template/template/public/logo512.png deleted file mode 100644 index a4e47a654..000000000 Binary files a/packages/devextreme-cli/src/templates/cra-template/template/public/logo512.png and /dev/null differ diff --git a/packages/devextreme-cli/src/templates/cra-template/template/public/manifest.json b/packages/devextreme-cli/src/templates/cra-template/template/public/manifest.json deleted file mode 100644 index 080d6c77a..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/template/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/packages/devextreme-cli/src/templates/cra-template/template/public/robots.txt b/packages/devextreme-cli/src/templates/cra-template/template/public/robots.txt deleted file mode 100644 index e9e57dc4d..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/template/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/packages/devextreme-cli/src/templates/cra-template/template/src/App.css b/packages/devextreme-cli/src/templates/cra-template/template/src/App.css deleted file mode 100644 index 74b5e0534..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/template/src/App.css +++ /dev/null @@ -1,38 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/packages/devextreme-cli/src/templates/cra-template/template/src/App.js b/packages/devextreme-cli/src/templates/cra-template/template/src/App.js deleted file mode 100644 index 378457572..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/template/src/App.js +++ /dev/null @@ -1,25 +0,0 @@ -import logo from './logo.svg'; -import './App.css'; - -function App() { - return ( -
-
- logo -

- Edit src/App.js and save to reload. -

- - Learn React - -
-
- ); -} - -export default App; diff --git a/packages/devextreme-cli/src/templates/cra-template/template/src/App.test.js b/packages/devextreme-cli/src/templates/cra-template/template/src/App.test.js deleted file mode 100644 index 23b8367e5..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/template/src/App.test.js +++ /dev/null @@ -1,9 +0,0 @@ -import { render } from '@testing-library/react'; -import { screen } from '@testing-library/dom'; -import App from './App'; - -test('renders learn react link', () => { - render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/packages/devextreme-cli/src/templates/cra-template/template/src/index.css b/packages/devextreme-cli/src/templates/cra-template/template/src/index.css deleted file mode 100644 index 027255b22..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/template/src/index.css +++ /dev/null @@ -1,12 +0,0 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -} diff --git a/packages/devextreme-cli/src/templates/cra-template/template/src/index.js b/packages/devextreme-cli/src/templates/cra-template/template/src/index.js deleted file mode 100644 index d563c0fb1..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/template/src/index.js +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import './index.css'; -import App from './App'; -import reportWebVitals from './reportWebVitals'; - -const root = ReactDOM.createRoot(document.getElementById('root')); -root.render( - - - -); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/packages/devextreme-cli/src/templates/cra-template/template/src/logo.svg b/packages/devextreme-cli/src/templates/cra-template/template/src/logo.svg deleted file mode 100644 index 9dfc1c058..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/template/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/devextreme-cli/src/templates/cra-template/template/src/reportWebVitals.js b/packages/devextreme-cli/src/templates/cra-template/template/src/reportWebVitals.js deleted file mode 100644 index 3c0ccb0dc..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/template/src/reportWebVitals.js +++ /dev/null @@ -1,13 +0,0 @@ -const reportWebVitals = onPerfEntry => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ onLCP, onINP, onCLS, onFCP, onTTFB }) => { - onCLS(onPerfEntry); - onINP(onPerfEntry); - onLCP(onPerfEntry); - onFCP(onPerfEntry); - onTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/packages/devextreme-cli/src/templates/cra-template/template/src/setupTests.js b/packages/devextreme-cli/src/templates/cra-template/template/src/setupTests.js deleted file mode 100644 index 8f2609b7b..000000000 --- a/packages/devextreme-cli/src/templates/cra-template/template/src/setupTests.js +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/public/favicon.ico b/packages/devextreme-cli/src/templates/react/application/public/favicon.ico similarity index 100% rename from packages/devextreme-cli/src/templates/cra-template-typescript/template/public/favicon.ico rename to packages/devextreme-cli/src/templates/react/application/public/favicon.ico diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/public/logo192.png b/packages/devextreme-cli/src/templates/react/application/public/logo192.png similarity index 100% rename from packages/devextreme-cli/src/templates/cra-template-typescript/template/public/logo192.png rename to packages/devextreme-cli/src/templates/react/application/public/logo192.png diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/public/logo512.png b/packages/devextreme-cli/src/templates/react/application/public/logo512.png similarity index 100% rename from packages/devextreme-cli/src/templates/cra-template-typescript/template/public/logo512.png rename to packages/devextreme-cli/src/templates/react/application/public/logo512.png diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/public/manifest.json b/packages/devextreme-cli/src/templates/react/application/public/manifest.json similarity index 100% rename from packages/devextreme-cli/src/templates/cra-template-typescript/template/public/manifest.json rename to packages/devextreme-cli/src/templates/react/application/public/manifest.json diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/public/robots.txt b/packages/devextreme-cli/src/templates/react/application/public/robots.txt similarity index 100% rename from packages/devextreme-cli/src/templates/cra-template-typescript/template/public/robots.txt rename to packages/devextreme-cli/src/templates/react/application/public/robots.txt diff --git a/packages/devextreme-cli/src/templates/react/application/src/App.test.tsx b/packages/devextreme-cli/src/templates/react/application/src/App.test.tsx deleted file mode 100644 index 98f3f6bef..000000000 --- a/packages/devextreme-cli/src/templates/react/application/src/App.test.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import './matchMediaMock'; -import { render } from '@testing-library/react'; -import { screen } from '@testing-library/dom'; -import App from './App'; -import { act } from 'react-dom/test-utils'; - -describe("App", () => { - test('renders learn react link', async () => { - await act( async () => { render() }); - const linkElement = screen.getByText(/create react app/i); - expect(linkElement).toBeInTheDocument(); - }); -}) \ No newline at end of file diff --git a/packages/devextreme-cli/src/templates/react/application/src/App.tsx b/packages/devextreme-cli/src/templates/react/application/src/App.tsx index ba8178d88..bbc2abfdc 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/App.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/App.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { HashRouter as Router } from 'react-router-dom'; import './dx-styles.scss'; import LoadPanel from 'devextreme-react/load-panel'; diff --git a/packages/devextreme-cli/src/templates/react/application/src/components/change-password-form/ChangePasswordForm.tsx b/packages/devextreme-cli/src/templates/react/application/src/components/change-password-form/ChangePasswordForm.tsx index b6e76ade8..f04886bbc 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/components/change-password-form/ChangePasswordForm.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/components/change-password-form/ChangePasswordForm.tsx @@ -1,4 +1,4 @@ -import React, { useState, useRef, useCallback } from 'react'; +import <%=#isTypeScript%>React, <%=/isTypeScript%>{ useState, useRef, useCallback } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; import Form, { Item, @@ -19,7 +19,7 @@ export default function ChangePasswordForm() { const formData = useRef({ password: '' }); const { recoveryCode } = useParams(); - const onSubmit = useCallback(async (e<%=#isTypeScript%>: any<%=/isTypeScript%>) => { + const onSubmit = useCallback(async (e<%=#isTypeScript%>: React.FormEvent<%=/isTypeScript%>) => { e.preventDefault(); const { password } = formData.current; setLoading(true); diff --git a/packages/devextreme-cli/src/templates/react/application/src/components/create-account-form/CreateAccountForm.scss b/packages/devextreme-cli/src/templates/react/application/src/components/create-account-form/CreateAccountForm.scss index d6fb5410a..830ab7065 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/components/create-account-form/CreateAccountForm.scss +++ b/packages/devextreme-cli/src/templates/react/application/src/components/create-account-form/CreateAccountForm.scss @@ -1,5 +1,3 @@ -@import "../../themes/generated/variables.base.scss"; - .create-account-form { .policy-info { color: var(--base-text-color-alpha-7); diff --git a/packages/devextreme-cli/src/templates/react/application/src/components/create-account-form/CreateAccountForm.tsx b/packages/devextreme-cli/src/templates/react/application/src/components/create-account-form/CreateAccountForm.tsx index b01342f02..983f5c849 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/components/create-account-form/CreateAccountForm.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/components/create-account-form/CreateAccountForm.tsx @@ -1,4 +1,4 @@ -import React, { useState, useRef, useCallback } from 'react'; +import <%=#isTypeScript%>React, <%=/isTypeScript%>{ useState, useRef, useCallback } from 'react'; import { Link, useNavigate } from 'react-router-dom'; import Form, { Item, @@ -20,7 +20,7 @@ export default function CreateAccountForm() { const [loading, setLoading] = useState(false); const formData = useRef({ email: '', password: '' }); - const onSubmit = useCallback(async (e<%=#isTypeScript%>: any<%=/isTypeScript%>) => { + const onSubmit = useCallback(async (e<%=#isTypeScript%>: React.FormEvent<%=/isTypeScript%>) => { e.preventDefault(); const { email, password } = formData.current; setLoading(true); diff --git a/packages/devextreme-cli/src/templates/react/application/src/components/footer/Footer.tsx b/packages/devextreme-cli/src/templates/react/application/src/components/footer/Footer.tsx index b20269670..bc82bfbd5 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/components/footer/Footer.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/components/footer/Footer.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import './Footer.scss'; export default function Footer({ ...rest }) { diff --git a/packages/devextreme-cli/src/templates/react/application/src/components/header/Header.tsx b/packages/devextreme-cli/src/templates/react/application/src/components/header/Header.tsx index 347fc555d..f020997de 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/components/header/Header.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/components/header/Header.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import Toolbar, { Item } from 'devextreme-react/toolbar'; import Button from 'devextreme-react/button'; import UserPanel from '../user-panel/UserPanel'; diff --git a/packages/devextreme-cli/src/templates/react/application/src/components/login-form/LoginForm.scss b/packages/devextreme-cli/src/templates/react/application/src/components/login-form/LoginForm.scss index e8fea8fde..702162654 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/components/login-form/LoginForm.scss +++ b/packages/devextreme-cli/src/templates/react/application/src/components/login-form/LoginForm.scss @@ -1,5 +1,3 @@ -@import "../../themes/generated/variables.base.scss"; - .login-form { .link { text-align: center; diff --git a/packages/devextreme-cli/src/templates/react/application/src/components/login-form/LoginForm.tsx b/packages/devextreme-cli/src/templates/react/application/src/components/login-form/LoginForm.tsx index 5e150363d..beadddd2e 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/components/login-form/LoginForm.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/components/login-form/LoginForm.tsx @@ -1,4 +1,4 @@ -import React, { useState, useRef, useCallback } from 'react'; +import <%=#isTypeScript%>React, <%=/isTypeScript%>{ useState, useRef, useCallback } from 'react'; import { Link, useNavigate } from 'react-router-dom'; import Form, { Item, @@ -21,7 +21,7 @@ export default function LoginForm() { const [loading, setLoading] = useState(false); const formData = useRef({ email: '', password: '' }); - const onSubmit = useCallback(async (e<%=#isTypeScript%>: any<%=/isTypeScript%>) => { + const onSubmit = useCallback(async (e<%=#isTypeScript%>: React.FormEvent<%=/isTypeScript%>) => { e.preventDefault(); const { email, password } = formData.current; setLoading(true); diff --git a/packages/devextreme-cli/src/templates/react/application/src/components/reset-password-form/ResetPasswordForm.scss b/packages/devextreme-cli/src/templates/react/application/src/components/reset-password-form/ResetPasswordForm.scss index 8631e7323..f9bf5090b 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/components/reset-password-form/ResetPasswordForm.scss +++ b/packages/devextreme-cli/src/templates/react/application/src/components/reset-password-form/ResetPasswordForm.scss @@ -1,5 +1,3 @@ -@import "../../themes/generated/variables.base.scss"; - .reset-password-form { .submit-button { margin-top: 18px; diff --git a/packages/devextreme-cli/src/templates/react/application/src/components/reset-password-form/ResetPasswordForm.tsx b/packages/devextreme-cli/src/templates/react/application/src/components/reset-password-form/ResetPasswordForm.tsx index 313e53537..55402df1d 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/components/reset-password-form/ResetPasswordForm.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/components/reset-password-form/ResetPasswordForm.tsx @@ -1,4 +1,4 @@ -import React, { useState, useRef, useCallback } from 'react'; +import <%=#isTypeScript%>React, <%=/isTypeScript%>{ useState, useRef, useCallback } from 'react'; import { Link, useNavigate } from "react-router-dom"; import Form, { Item, @@ -20,7 +20,7 @@ export default function ResetPasswordForm() { const [loading, setLoading] = useState(false); const formData = useRef({ email: '', password: '' }); - const onSubmit = useCallback(async (e<%=#isTypeScript%>: any<%=/isTypeScript%>) => { + const onSubmit = useCallback(async (e<%=#isTypeScript%>: React.FormEvent<%=/isTypeScript%>) => { e.preventDefault(); const { email } = formData.current; setLoading(true); diff --git a/packages/devextreme-cli/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.scss b/packages/devextreme-cli/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.scss index d6ea2297d..911d90e88 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.scss +++ b/packages/devextreme-cli/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.scss @@ -1,4 +1,5 @@ -@use "../../dx-styles.scss" as *; +@use "../../dx-styles" as *; +@use "../../utils/patches"; .dx-swatch-additional, .dx-swatch-additional-dark { &.side-navigation-menu { @@ -71,6 +72,5 @@ } .dx-drawer-overlap.pre-init-blink-fix { - @import "../../utils/patches.scss"; - @include menu-pre-init-patch; + @include patches.menu-pre-init-patch; } diff --git a/packages/devextreme-cli/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.tsx b/packages/devextreme-cli/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.tsx index 26866775f..1b8ed001f 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useRef, useCallback, useMemo, useContext } from 'react'; import { TreeView<%=#isTypeScript%>, TreeViewRef<%=/isTypeScript%> } from 'devextreme-react/tree-view'; -import * as events from 'devextreme/events'; +import * as events from 'devextreme-react/common/core/events'; import { navigation } from '../../app-navigation'; import { useNavigation } from '../../contexts/navigation'; import { useScreenSize } from '../../utils/media-query'; diff --git a/packages/devextreme-cli/src/templates/react/application/src/components/theme-switcher/ThemeSwitcher.tsx b/packages/devextreme-cli/src/templates/react/application/src/components/theme-switcher/ThemeSwitcher.tsx index bcd0bd535..87b26a376 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/components/theme-switcher/ThemeSwitcher.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/components/theme-switcher/ThemeSwitcher.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useContext } from 'react'; +import { useCallback, useContext } from 'react'; import Button from 'devextreme-react/button'; import { ThemeContext } from '../../theme'; diff --git a/packages/devextreme-cli/src/templates/react/application/src/components/user-panel/UserPanel.tsx b/packages/devextreme-cli/src/templates/react/application/src/components/user-panel/UserPanel.tsx index 6c2997d52..50a5c2269 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/components/user-panel/UserPanel.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/components/user-panel/UserPanel.tsx @@ -1,4 +1,4 @@ -import React, { useMemo, useCallback } from 'react'; +import { useMemo, useCallback } from 'react'; import { useNavigate } from "react-router-dom"; import DropDownButton from 'devextreme-react/drop-down-button'; import List from 'devextreme-react/list'; diff --git a/packages/devextreme-cli/src/templates/react/application/src/dx-styles.scss b/packages/devextreme-cli/src/templates/react/application/src/dx-styles.scss index a9accd9ff..5ce2bdfda 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/dx-styles.scss +++ b/packages/devextreme-cli/src/templates/react/application/src/dx-styles.scss @@ -1,3 +1,5 @@ +@use "variables.scss" as *; + $side-panel-min-width: 60px; html, diff --git a/packages/devextreme-cli/src/templates/cra-template-typescript/template/src/index.css b/packages/devextreme-cli/src/templates/react/application/src/index.css similarity index 100% rename from packages/devextreme-cli/src/templates/cra-template-typescript/template/src/index.css rename to packages/devextreme-cli/src/templates/react/application/src/index.css diff --git a/packages/devextreme-cli/src/templates/react/application/src/layouts/side-nav-inner-toolbar/side-nav-inner-toolbar.tsx b/packages/devextreme-cli/src/templates/react/application/src/layouts/side-nav-inner-toolbar/side-nav-inner-toolbar.tsx index e6335b526..eb0d8b108 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/layouts/side-nav-inner-toolbar/side-nav-inner-toolbar.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/layouts/side-nav-inner-toolbar/side-nav-inner-toolbar.tsx @@ -3,7 +3,7 @@ import Drawer from 'devextreme-react/drawer'; import { ScrollView<%=#isTypeScript%>, ScrollViewRef<%=/isTypeScript%> } from 'devextreme-react/scroll-view'; import Toolbar, { Item } from 'devextreme-react/toolbar'; import React, { useState, useCallback, useRef } from 'react'; -import { useNavigate } from 'react-router'; +import { useNavigate } from 'react-router-dom'; import { Header, SideNavigationMenu, Footer } from '../../components'; import './side-nav-inner-toolbar.scss'; import { useScreenSize } from '../../utils/media-query'; @@ -84,13 +84,19 @@ export default function SideNavInnerToolbar({ title, children }<%=#isTypeScript% />
- {React.Children.map(children, (item<%=#isTypeScript%>: any<%=/isTypeScript%>) => { - return item.type !== Footer && item; + {React.Children.map(children, (item) => { + if (<%=#isTypeScript%>React.isValidElement(item) && <%=/isTypeScript%>item.type !== Footer) { + return item; + } + return null; })}
- {React.Children.map(children, (item<%=#isTypeScript%>: any<%=/isTypeScript%>) => { - return item.type === Footer && item; + {React.Children.map(children, (item) => { + if (<%=#isTypeScript%>React.isValidElement(item) && <%=/isTypeScript%>item.type === Footer) { + return item; + } + return null; })}
diff --git a/packages/devextreme-cli/src/templates/react/application/src/layouts/side-nav-outer-toolbar/side-nav-outer-toolbar.tsx b/packages/devextreme-cli/src/templates/react/application/src/layouts/side-nav-outer-toolbar/side-nav-outer-toolbar.tsx index 637bf6e58..7d32cdad4 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/layouts/side-nav-outer-toolbar/side-nav-outer-toolbar.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/layouts/side-nav-outer-toolbar/side-nav-outer-toolbar.tsx @@ -1,7 +1,7 @@ import Drawer from 'devextreme-react/drawer'; import { ScrollView<%=#isTypeScript%>, ScrollViewRef<%=/isTypeScript%> } from 'devextreme-react/scroll-view'; import React, { useState, useCallback, useRef } from 'react'; -import { useNavigate } from 'react-router'; +import { useNavigate } from 'react-router-dom'; import { Header, SideNavigationMenu, Footer } from '../../components'; import './side-nav-outer-toolbar.scss'; import { useScreenSize } from '../../utils/media-query'; @@ -83,13 +83,19 @@ export default function SideNavOuterToolbar({ title, children }<%=#isTypeScript%
- {React.Children.map(children, (item<%=#isTypeScript%>: any<%=/isTypeScript%>) => { - return item.type !== Footer && item; + {React.Children.map(children, (item) => { + if (<%=#isTypeScript%>React.isValidElement(item) && <%=/isTypeScript%>item.type !== Footer) { + return item; + } + return null; })}
- {React.Children.map(children, (item<%=#isTypeScript%>: any<%=/isTypeScript%>) => { - return item.type === Footer && item; + {React.Children.map(children, (item) => { + if (<%=#isTypeScript%>React.isValidElement(item) && <%=/isTypeScript%>item.type === Footer) { + return item; + } + return null; })}
diff --git a/packages/devextreme-cli/src/templates/react/application/src/layouts/single-card/single-card.scss b/packages/devextreme-cli/src/templates/react/application/src/layouts/single-card/single-card.scss index 32fc3b6b2..e4d0f96bb 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/layouts/single-card/single-card.scss +++ b/packages/devextreme-cli/src/templates/react/application/src/layouts/single-card/single-card.scss @@ -1,5 +1,3 @@ -@import "../../themes/generated/variables.base.scss"; - .single-card { width: 100%; height: 100%; diff --git a/packages/devextreme-cli/src/templates/react/application/src/layouts/single-card/single-card.tsx b/packages/devextreme-cli/src/templates/react/application/src/layouts/single-card/single-card.tsx index 879233c1c..1e207fefc 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/layouts/single-card/single-card.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/layouts/single-card/single-card.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import ScrollView from 'devextreme-react/scroll-view'; import './single-card.scss'; <%=#isTypeScript%>import type { SingleCardProps } from '../../types';<%=/isTypeScript%> diff --git a/packages/devextreme-cli/src/templates/react/application/src/matchMediaMock.tsx b/packages/devextreme-cli/src/templates/react/application/src/matchMediaMock.tsx deleted file mode 100644 index 9b289b6a3..000000000 --- a/packages/devextreme-cli/src/templates/react/application/src/matchMediaMock.tsx +++ /dev/null @@ -1,14 +0,0 @@ -Object.defineProperty(window, 'matchMedia', { - writable: true, - value: jest.fn().mockImplementation(query => ({ - matches: false, - media: query, - onchange: null, - addListener: jest.fn(), // deprecated - removeListener: jest.fn(), // deprecated - addEventListener: jest.fn(), - removeEventListener: jest.fn(), - dispatchEvent: jest.fn(), - })), -}); -export {}; \ No newline at end of file diff --git a/packages/devextreme-cli/src/templates/react/application/src/polyfills.tsx b/packages/devextreme-cli/src/templates/react/application/src/polyfills.tsx deleted file mode 100644 index 89b637058..000000000 --- a/packages/devextreme-cli/src/templates/react/application/src/polyfills.tsx +++ /dev/null @@ -1,2 +0,0 @@ -import 'react-app-polyfill/ie11'; -import 'react-app-polyfill/stable'; diff --git a/packages/devextreme-cli/src/templates/react/application/src/types.tsx b/packages/devextreme-cli/src/templates/react/application/src/types.tsx index b152a5c41..8f75467f8 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/types.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/types.tsx @@ -1,6 +1,5 @@ import { TreeViewTypes } from 'devextreme-react/tree-view'; import { ButtonTypes } from 'devextreme-react/button'; -import React from 'react'; export interface HeaderProps { menuToggleEnabled: boolean; @@ -53,4 +52,4 @@ export type NavigationContextType = { export type ValidationType = { value: string; -} \ No newline at end of file +} diff --git a/packages/devextreme-cli/src/templates/react/application/src/utils/media-query.tsx b/packages/devextreme-cli/src/templates/react/application/src/utils/media-query.tsx index abe116dbe..9432f1671 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/utils/media-query.tsx +++ b/packages/devextreme-cli/src/templates/react/application/src/utils/media-query.tsx @@ -44,7 +44,9 @@ const largeMedia = window.matchMedia('(min-width: 1280px)'); [xSmallMedia, smallMedia, mediumMedia, largeMedia].forEach(media => { media.addListener((e) => { - e.matches && handlers.forEach(handler => handler()); + if(e.matches) { + handlers.forEach(handler => handler()) + } }); }); diff --git a/packages/devextreme-cli/src/templates/react/application/src/utils/patches.scss b/packages/devextreme-cli/src/templates/react/application/src/utils/patches.scss index 0b9c544c0..a0e75b42e 100644 --- a/packages/devextreme-cli/src/templates/react/application/src/utils/patches.scss +++ b/packages/devextreme-cli/src/templates/react/application/src/utils/patches.scss @@ -1,12 +1,12 @@ -@import "../themes/generated/variables.additional.scss"; +@use "../themes/generated/variables.additional.scss" as *; @mixin menu-pre-init-patch { $menuMinSize: 60px; - + .dx-drawer-content { padding-left: $menuMinSize; } - + .dx-drawer-panel-content.dx-overlay::before { content: ""; width: $menuMinSize; @@ -15,7 +15,7 @@ position: absolute; background-color: $base-bg; } - + .dx-overlay-content { width: $menuMinSize !important; } diff --git a/packages/devextreme-cli/src/templates/react/sample-pages/home/home.scss b/packages/devextreme-cli/src/templates/react/sample-pages/home/home.scss index d26e0dc76..f440f973f 100644 --- a/packages/devextreme-cli/src/templates/react/sample-pages/home/home.scss +++ b/packages/devextreme-cli/src/templates/react/sample-pages/home/home.scss @@ -1,5 +1,3 @@ -@use "../../variables.scss" as *; - .logos-container { margin: 0 0 40px 0; diff --git a/packages/devextreme-cli/src/templates/react/sample-pages/home/home.tsx b/packages/devextreme-cli/src/templates/react/sample-pages/home/home.tsx index 852e02a51..a79858f2a 100644 --- a/packages/devextreme-cli/src/templates/react/sample-pages/home/home.tsx +++ b/packages/devextreme-cli/src/templates/react/sample-pages/home/home.tsx @@ -68,7 +68,7 @@ export default function Home() {

Thanks for using the DevExtreme React App Template.

This application was built using - Create React App + create-vite and DevExtreme CLI and includes the following DevExtreme components: diff --git a/packages/devextreme-cli/src/templates/react/sample-pages/tasks/tasks.tsx b/packages/devextreme-cli/src/templates/react/sample-pages/tasks/tasks.tsx index 796e40f96..d768d19e0 100644 --- a/packages/devextreme-cli/src/templates/react/sample-pages/tasks/tasks.tsx +++ b/packages/devextreme-cli/src/templates/react/sample-pages/tasks/tasks.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import 'devextreme/data/odata/store'; +import { DataSource } from 'devextreme-react/common/data'; import DataGrid, { Column, Pager, @@ -16,7 +16,7 @@ export default function Task() { as any<%=/isTypeScript%>} + dataSource={dataSource} showBorders={false} focusedRowEnabled={true} defaultFocusedRowIndex={0} @@ -83,7 +83,7 @@ export default function Task() { )} -const dataSource = { +const dataSource = new DataSource({ store: { version: 2, type: 'odata', @@ -101,7 +101,7 @@ const dataSource = { 'Task_Completion', 'ResponsibleEmployee/Employee_Full_Name' ] -}; +}); const priorities = [ { name: 'High', value: 4 }, diff --git a/packages/devextreme-cli/src/templates/vue-v3/sample-pages/tasks-page.vue b/packages/devextreme-cli/src/templates/vue-v3/sample-pages/tasks-page.vue index 898e010ca..2de95b5cd 100644 --- a/packages/devextreme-cli/src/templates/vue-v3/sample-pages/tasks-page.vue +++ b/packages/devextreme-cli/src/templates/vue-v3/sample-pages/tasks-page.vue @@ -80,7 +80,7 @@