Skip to content

Commit 49d3e48

Browse files
author
Mariela Tihova
authored
Add Localization Sample (#1031)
1 parent 81e09c7 commit 49d3e48

File tree

14 files changed

+889
-0
lines changed

14 files changed

+889
-0
lines changed

browser/package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

browser/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"file-saver": "1.3.8",
2626
"igniteui-dockmanager": "^1.17.0",
2727
"igniteui-grid-lite": "~0.6.0",
28+
"igniteui-i18n-resources": "^1.0.4",
2829
"igniteui-react": "^19.5.0",
2930
"igniteui-react-charts": "19.3.2",
3031
"igniteui-react-core": "19.3.2",

browser/tasks/gulp-samples.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,7 @@ function updateIG(cb) {
857857
{ version: "19.3.2", name: "igniteui-react-spreadsheet" },
858858
{ version: "19.3.2", name: "igniteui-react-datasources" },
859859
{ version: "19.3.2", name: "igniteui-react-dashboards" },
860+
{ version: "^1.0.4", name: "igniteui-i18n-resources" },
860861
{ version: "^19.5.0", name: "igniteui-react" },
861862
// these IG packages are sometimes updated:
862863
{ version: "^7.0.0", name: "igniteui-webcomponents" },
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "Node.js",
3+
"image": "mcr.microsoft.com/devcontainers/javascript-node:22"
4+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project
2+
module.exports = {
3+
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
4+
parserOptions: {
5+
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
6+
sourceType: "module", // Allows for the use of imports
7+
ecmaFeatures: {
8+
jsx: true // Allows for the parsing of JSX
9+
}
10+
},
11+
settings: {
12+
react: {
13+
version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use
14+
}
15+
},
16+
extends: [
17+
"eslint:recommended",
18+
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
19+
"plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin
20+
],
21+
rules: {
22+
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
23+
"default-case": "off",
24+
"jsx-a11y/alt-text": "off",
25+
"jsx-a11y/iframe-has-title": "off",
26+
"no-undef": "off",
27+
"no-unused-vars": "off",
28+
"no-extend-native": "off",
29+
"no-throw-literal": "off",
30+
"no-useless-concat": "off",
31+
"no-mixed-operators": "off",
32+
"no-prototype-builtins": "off",
33+
"no-mixed-spaces-and-tabs": 0,
34+
"prefer-const": "off",
35+
"prefer-rest-params": "off",
36+
"@typescript-eslint/no-unused-vars": "off",
37+
"@typescript-eslint/no-explicit-any": "off",
38+
"@typescript-eslint/no-inferrable-types": "off",
39+
"@typescript-eslint/no-useless-constructor": "off",
40+
"@typescript-eslint/no-use-before-define": "off",
41+
"@typescript-eslint/no-non-null-assertion": "off",
42+
"@typescript-eslint/interface-name-prefix": "off",
43+
"@typescript-eslint/prefer-namespace-keyword": "off",
44+
"@typescript-eslint/explicit-function-return-type": "off",
45+
"@typescript-eslint/explicit-module-boundary-types": "off"
46+
},
47+
"overrides": [
48+
{
49+
"files": ["*.ts", "*.tsx"],
50+
"rules": {
51+
"default-case": "off",
52+
"jsx-a11y/alt-text": "off",
53+
"jsx-a11y/iframe-has-title": "off",
54+
"no-var": "off",
55+
"no-undef": "off",
56+
"no-unused-vars": "off",
57+
"no-extend-native": "off",
58+
"no-throw-literal": "off",
59+
"no-useless-concat": "off",
60+
"no-mixed-operators": "off",
61+
"no-mixed-spaces-and-tabs": 0,
62+
"no-prototype-builtins": "off",
63+
"prefer-const": "off",
64+
"prefer-rest-params": "off",
65+
"@typescript-eslint/no-unused-vars": "off",
66+
"@typescript-eslint/no-explicit-any": "off",
67+
"@typescript-eslint/no-inferrable-types": "off",
68+
"@typescript-eslint/no-useless-constructor": "off",
69+
"@typescript-eslint/no-use-before-define": "off",
70+
"@typescript-eslint/no-non-null-assertion": "off",
71+
"@typescript-eslint/interface-name-prefix": "off",
72+
"@typescript-eslint/prefer-namespace-keyword": "off",
73+
"@typescript-eslint/explicit-function-return-type": "off",
74+
"@typescript-eslint/explicit-module-boundary-types": "off"
75+
}
76+
}
77+
]
78+
};
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<!-- NOTE: do not change this file because it's auto re-generated from template: -->
2+
<!-- https://github.com/IgniteUI/igniteui-react-examples/tree/vnext/templates/sample/ReadMe.md -->
3+
4+
This folder contains implementation of React application with example of Localization feature using [Grid](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.
5+
6+
7+
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
8+
<body>
9+
<a target="_blank" href="https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html" rel="noopener noreferrer">
10+
<img height="40px" style="border-radius: 0rem" alt="View Docs" src="https://dl.infragistics.com/x/img/browsers/button-docs.png"/>
11+
</a>
12+
<a target="_blank" href="./src/index.tsx" rel="noopener noreferrer">
13+
<img height="40px" style="border-radius: 0rem; max-width: 100%;" alt="View Code" src="https://dl.infragistics.com/x/img/browsers/button-code.png"/>
14+
</a>
15+
<a target="_blank" href="https://www.infragistics.com/react-demos/samples/grids/grid/localization" rel="noopener noreferrer">
16+
<img height="40px" style="border-radius: 0rem; max-width: 100%;" alt="Run Sample" src="https://dl.infragistics.com/x/img/browsers/button-run.png"/>
17+
</a>
18+
<a target="_blank" href="https://codesandbox.io/s/github/IgniteUI/igniteui-react-examples/tree/master/samples/grids/grid/localization?fontsize=14&hidenavigation=1&theme=dark&view=preview&file=/src/index.tsx" rel="noopener noreferrer">
19+
<img height="40px" style="border-radius: 0rem; max-width: 100%;" alt="Run Sample" src="https://dl.infragistics.com/x/img/browsers/button-sandbox.png"/>
20+
</a>
21+
</body>
22+
</html>
23+
24+
## Branches
25+
26+
> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository.
27+
28+
## Instructions
29+
30+
Follow these instructions to run this example:
31+
32+
33+
```
34+
git clone https://github.com/IgniteUI/igniteui-react-examples.git
35+
git checkout master
36+
cd ./igniteui-react-examples
37+
cd ./samples/grids/grid/action-strip
38+
```
39+
40+
open above folder in VS Code or type:
41+
```
42+
code .
43+
```
44+
45+
In terminal window, run:
46+
```
47+
npm install --legacy-peer-deps
48+
npm run-script start
49+
```
50+
51+
Then open http://localhost:4200/ in your browser
52+
53+
54+
## Learn More
55+
56+
To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html).
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Sample | Ignite UI | React | infragistics</title>
5+
<link rel="shortcut icon" href="https://dl.infragistics.com/x/img/browsers/react.png" >
6+
<link rel="stylesheet" href="https://dl.infragistics.com/x/css/samples/shared.v8.css" />
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
<script type="module" src="/src/index.tsx"></script>
11+
</body>
12+
</html>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "example-ignite-ui-react",
3+
"description": "This project provides example of using Ignite UI for React components",
4+
"author": "Infragistics",
5+
"version": "1.4.0",
6+
"license": "",
7+
"homepage": ".",
8+
"private": true,
9+
"scripts": {
10+
"start": "vite --port 4200",
11+
"build": "tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite build",
12+
"preview": "vite preview",
13+
"test": "vitest",
14+
"lint": "eslint ./src/**/*.{ts,tsx}"
15+
},
16+
"dependencies": {
17+
"igniteui-dockmanager": "^1.17.0",
18+
"igniteui-i18n-resources": "^1.0.2",
19+
"igniteui-react": "^19.4.0",
20+
"igniteui-react-core": "19.3.2",
21+
"igniteui-react-grids": "^19.5.0-beta.3",
22+
"igniteui-react-inputs": "19.3.2",
23+
"igniteui-react-layouts": "19.3.2",
24+
"igniteui-webcomponents": "^6.3.0",
25+
"lit-html": "^3.2.0",
26+
"react": "^19.2.0",
27+
"react-dom": "^19.2.0",
28+
"tslib": "^2.4.0"
29+
},
30+
"devDependencies": {
31+
"@types/jest": "^29.2.0",
32+
"@types/node": "^24.7.1",
33+
"@types/react": "^18.0.24",
34+
"@types/react-dom": "^18.0.8",
35+
"@vitejs/plugin-react": "^5.0.4",
36+
"@vitest/browser": "^3.2.4",
37+
"eslint": "^8.33.0",
38+
"eslint-config-react": "^1.1.7",
39+
"eslint-plugin-react": "^7.20.0",
40+
"typescript": "^4.8.4",
41+
"vite": "^7.1.9",
42+
"vitest": "^3.2.4",
43+
"vitest-canvas-mock": "^0.3.3",
44+
"worker-loader": "^3.0.8"
45+
},
46+
"browserslist": [
47+
">0.2%",
48+
"not dead",
49+
"not ie <= 11",
50+
"not op_mini all"
51+
]
52+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"infiniteLoopProtection": false,
3+
"hardReloadOnChange": false,
4+
"view": "browser"
5+
}

0 commit comments

Comments
 (0)