Skip to content

Commit ba2592c

Browse files
Mariela TihovaMariela Tihova
authored andcommitted
feat(localization): add localization sample
1 parent fec06e1 commit ba2592c

File tree

11 files changed

+986
-0
lines changed

11 files changed

+986
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"printWidth": 250,
3+
"tabWidth": 4,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": false,
7+
"trailingComma": "none",
8+
"bracketSpacing": true,
9+
"jsxBracketSameLine": false,
10+
"fluid": false
11+
}
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-wc-examples/tree/vnext/templates/browser/sample/ReadMe.md -->
3+
4+
This folder contains implementation of Web Components application with example of Localization feature using [Grid](https://infragistics.com/webcomponentssite/components/localization.html) component.
5+
6+
7+
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
8+
<body>
9+
<a target="_blank" href="https://infragistics.com/webcomponentssite/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.ts" 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/webcomponents-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-wc-examples/tree/master/samples/grids/grid/localization?fontsize=14&hidenavigation=1&theme=dark&view=preview&file=/src/{SampleFile}" 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-angular-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-angular-examples/tree/vnext) branch only when you want to contribute new samples to this repository.
27+
28+
## Instructions
29+
30+
To set up this project locally, execute these commands:
31+
32+
```
33+
git clone https://github.com/IgniteUI/igniteui-wc-examples.git
34+
git checkout master
35+
cd ./igniteui-wc-examples
36+
cd ./samples/grids/grid/action-strip
37+
```
38+
39+
open above folder in VS Code or type:
40+
```
41+
code .
42+
```
43+
44+
In terminal window, run:
45+
46+
```
47+
npm install
48+
npm run 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 Web Components**, check out the [Web Components documentation](https://infragistics.com/webcomponentssite/components/general-getting-started.html).
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Sample | Ignite UI | Web Components | infragistics</title>
5+
<meta charset="UTF-8" />
6+
7+
<link rel="shortcut icon" href="https://dl.infragistics.com/x/img/browsers/wc.png" >
8+
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
9+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Kanit&display=swap" />
10+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Titillium Web" />
11+
<link rel="stylesheet" href="https://dl.infragistics.com/x/css/samples/shared.v8.css" />
12+
<link rel="stylesheet" href="/src/index.css" type="text/css" />
13+
14+
</head>
15+
16+
<body>
17+
<div id="root">
18+
<div class="grid-wrapper">
19+
<igc-grid
20+
id="grid"
21+
auto-generate="false"
22+
allow-filtering="true"
23+
row-editable="true"
24+
primary-key="ProductID"
25+
height="700px"
26+
width="100%">
27+
28+
<igc-grid-toolbar>
29+
<igc-grid-toolbar-title>Grid with Localization</igc-grid-toolbar-title>
30+
<igc-select id="localeSelect" max-height="30px">
31+
<igc-select-item value="hi">HI</igc-select-item>
32+
<igc-select-item value="bg">BG</igc-select-item>
33+
<igc-select-item value="cs">CS</igc-select-item>
34+
<igc-select-item value="da">DA</igc-select-item>
35+
<igc-select-item value="de">DE</igc-select-item>
36+
<igc-select-item value="en">EN</igc-select-item>
37+
<igc-select-item value="es">ES</igc-select-item>
38+
<igc-select-item value="fr">FR</igc-select-item>
39+
<igc-select-item value="hu">HU</igc-select-item>
40+
<igc-select-item value="it">IT</igc-select-item>
41+
<igc-select-item value="ja">JA</igc-select-item>
42+
<igc-select-item value="ko">KO</igc-select-item>
43+
<igc-select-item value="nb">NB</igc-select-item>
44+
<igc-select-item value="nl">NL</igc-select-item>
45+
<igc-select-item value="pl">PL</igc-select-item>
46+
<igc-select-item value="pt">PT</igc-select-item>
47+
<igc-select-item value="ro">RO</igc-select-item>
48+
<igc-select-item value="sv">SV</igc-select-item>
49+
<igc-select-item value="tr">TR</igc-select-item>
50+
<igc-select-item value="zh-Hans">zh-Hans</igc-select-item>
51+
<igc-select-item value="zh-Hant">zh-Hant</igc-select-item>
52+
</igc-select>
53+
</igc-grid-toolbar>
54+
55+
<igc-column field="ProductName" header="Product Name" groupable></igc-column>
56+
<igc-column field="QuantityPerUnit" header="Quantity Per Unit" groupable></igc-column>
57+
<igc-column
58+
field="UnitPrice"
59+
header="Unit Price"
60+
data-type="currency"
61+
sortable
62+
has-summary
63+
groupable>
64+
</igc-column>
65+
<igc-column
66+
field="OrderDate"
67+
header="Order Date"
68+
data-type="date"
69+
groupable>
70+
</igc-column>
71+
<igc-column
72+
field="Discontinued"
73+
header="Discontinued"
74+
data-type="boolean"
75+
groupable>
76+
</igc-column>
77+
78+
</igc-grid>
79+
</div>
80+
</div>
81+
82+
<!-- This script is needed only for parcel and it will be excluded for webpack -->
83+
<% if (false) { %><script src="src/index.ts"></script><% } %>
84+
</body>
85+
</html>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"name": "example-ignite-ui-web-components",
3+
"description": "This project provides example of using Ignite UI for Web Components",
4+
"author": "Infragistics",
5+
"version": "1.0.0",
6+
"license": "",
7+
"private": true,
8+
"homepage": ".",
9+
"main": "src/index.ts",
10+
"scripts": {
11+
"build": "npm run build:prod",
12+
"build:dev": "webpack --mode development --config ./webpack.config.js --progress --color --display-error-details",
13+
"build:prod": "webpack --env.NODE_ENV=production --mode production --config ./webpack.config.js --progress --color --display-error-details --bail",
14+
"serve:dev": "node --max-old-space-size=8192 node_modules/webpack-dev-server/bin/webpack-dev-server.js --mode development --config ./webpack.config.js --hot --progress --open",
15+
"serve:prod": "webpack-dev-server --env.NODE_ENV=production --mode production --config ./webpack.config.js --port 3000 --host 0.0.0.0 --hot --progress --open --content-base dist/",
16+
"start": "npm run serve:dev",
17+
"build:legacy": "npm run build:prod:legacy",
18+
"build:dev:legacy": "webpack --env.legacy=true --mode development --config ./webpack.config.js --progress --color --display-error-details",
19+
"build:prod:legacy": "webpack --env.NODE_ENV=production --env.legacy=true --mode production --config ./webpack.config.js --progress --color --display-error-details --bail",
20+
"serve:dev:legacy": "node --max-old-space-size=8192 node_modules/webpack-dev-server/bin/webpack-dev-server.js --env.legacy=true --mode development --config ./webpack.config.js --hot --progress --open",
21+
"serve:prod:legacy": "webpack-dev-server --env.NODE_ENV=production --env.legacy=true --mode production --config ./webpack.config.js --port 3000 --host 0.0.0.0 --hot --progress --open --content-base dist/",
22+
"start:legacy": "npm run serve:dev:legacy"
23+
},
24+
"dependencies": {
25+
"babel-runtime": "^6.26.0",
26+
"igniteui-i18n-resources": "^1.0.2",
27+
"igniteui-webcomponents": "6.5.1",
28+
"igniteui-webcomponents-core": "6.3.1",
29+
"igniteui-webcomponents-grids": "6.3.0-rc.0",
30+
"igniteui-webcomponents-inputs": "6.3.1",
31+
"igniteui-webcomponents-layouts": "6.3.1",
32+
"lit-html": "^3.3.1",
33+
"tslib": "^2.8.1"
34+
},
35+
"devDependencies": {
36+
"@babel/cli": "^7.28.3",
37+
"@babel/core": "^7.28.4",
38+
"@babel/plugin-transform-class-properties": "^7.27.1",
39+
"@babel/plugin-transform-class-static-block": "^7.28.3",
40+
"@babel/plugin-transform-runtime": "^7.28.3",
41+
"@babel/preset-env": "^7.28.3",
42+
"@babel/preset-typescript": "^7.27.1",
43+
"@types/source-map": "^0.5.7",
44+
"babel-loader": "^10.0.0",
45+
"babel-plugin-transform-custom-element-classes": "^0.1.0",
46+
"css-loader": "^7.1.2",
47+
"csv-loader": "^3.0.5",
48+
"file-loader": "^6.2.0",
49+
"fork-ts-checker-webpack-plugin": "^9.1.0",
50+
"html-webpack-plugin": "^5.6.4",
51+
"parcel-bundler": "^1.12.5",
52+
"source-map": "^0.7.6",
53+
"style-loader": "^4.0.0",
54+
"tsconfig-paths-webpack-plugin": "^4.2.0",
55+
"typescript": "^5.9.2",
56+
"webpack": "^5.101.3",
57+
"webpack-cli": "^6.0.1",
58+
"webpack-dev-server": "^5.2.2",
59+
"worker-loader": "^3.0.8",
60+
"xml-loader": "^1.2.1"
61+
}
62+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"infiniteLoopProtection": false,
3+
"hardReloadOnChange": false,
4+
"view": "browser",
5+
"template": "parcel"
6+
}

0 commit comments

Comments
 (0)