Skip to content

Commit 0be78a3

Browse files
committed
Merge branch 'master' into dmdimitrov/hgrid-adv-filtering-schema
2 parents 4501c70 + 4296934 commit 0be78a3

File tree

1,826 files changed

+45221
-28917
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,826 files changed

+45221
-28917
lines changed

.github/CONTRIBUTING.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,31 @@ There are several ways to localize components' string resources:
9494
1.1. Localize a given instance of component - each component which supports localization has input property `resourceStrings`. Setting a newly instantiated object to this property will localize only that given component's instance.
9595
1.2. Localize all resources for a component type - each component which supports localization has input property `resourceStrings`. To localize all instances of a given component in the application the following steps should be performed - get the value of the input property `resourceStrings` of the component to be localized; do not create a new instance but replace the existing strings within the object. By default all components of a given type in an application share one instance of the resource strings. Replacing a value in that instance affects all components of that type in the application.
9696
1.3. Localize all resources for all components - use global method `getCurrentResourceStrings` to get an object containing current resource strings for all components. To provide localized resources just pass an object of type `IResourceStrings` to the global method `changei18n`.
97+
1.4 As of 21.1.x the localization has new implementation and you can use the new API `registerI18n` to register resource string for a component or all components for the whole app, as well as which locale it corresponds to. To localize a single component you will need to get is corresponding resource string keys using one of the available resources and provide only those keys.
9798

9899
2. Using npm package:
99100
We've created new repository which will hold the resource strings for languages different than English:
100101
https://github.com/IgniteUI/igniteui-angular-i18n
101102

102-
**NOTE** The localization repo has been moved to live inside the `igniteui-angular` repository under `./projects/igniteui-angular-i18n`
103+
**NOTE** The localization repo has been moved to live inside the `igniteui-angular` repository under `./projects/igniteui-angular-i18n`
104+
**NOTE** As of 21.1.x the localization resource strings have been moved to the [`igniteui-i18n`](https://github.com/IgniteUI/igniteui-i18n) repository under `projects/igniteui-i18n-resources`.
103105

104106
A npm package should be published each time we release new version of Ignite UI for Angular. Its version should correspond to the version of the igniteui-angular npm package.
105107
One could localize an application by importing the corresponding localized resource strings from the localization package (`igniteui-angular-i18n`) and use the methods described in the previous bullet to localize the whole application or part of it.
106-
Example:
108+
109+
**Example:**
110+
107111
Inside app.module you can perform:
108-
_import { IgxResouceStringsJA } from ‘igniteui-angular-i18n’;_
109-
And then:
110-
_Changei18n(IgxResouceStringsJA);_
112+
```ts
113+
import { IgxResouceStringsJA } fromigniteui-angular-i18n’;
114+
changei18n(IgxResouceStringsJA);
115+
```
116+
117+
**Example new API:**
118+
```ts
119+
import { ResouceStringsJA } fromigniteui-i18n-resources’;
120+
registerI18n(IgxResouceStringsJA, 'ja');
121+
```
111122

112123
### Resource strings keys naming convention
113124
Each key in the `IResourceStrings` (and `IGridResourceStrings`, `ITimePickerResourceStrings`, etc.) is prefixed with components' selector and followed by the resource string key. Having components' selectors as prefixes allows us to have same resource strings keys for more than one component.
@@ -220,3 +231,15 @@ In order to test a pull request that is awaiting test, perform the following act
220231
4. Verify that the expected behavior is observed with the changes in the pull request.
221232
5. Return the pull request in a not fixed state if you're still reproducing the issue.
222233
6. Don't forget to make the necessary status updates, as described in the workflow section.
234+
235+
# Running the Dev Demos
236+
The developer demos for testing purposes are runnable:
237+
238+
```bash
239+
npm i
240+
npm start
241+
```
242+
243+
If you cannot find a suitable demo for a component, when trying to test and reproduce an issue or scenario, then add a new demo for the scenario.
244+
245+

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: Feature request
33
about: Suggest an idea for this project
44
title: ''
5+
type: Feature
56
labels: ':toolbox: feature-request,:new: status: new'
67
assignees: ''
78
projects: IgniteUI/16

.github/copilot-instructions.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Persona
2+
3+
You are a dedicated Angular developer who thrives on leveraging the absolute latest features of the framework to build cutting-edge applications. You are currently immersed in Angular v20+, passionately adopting signals for reactive state management, embracing standalone components for streamlined architecture, and utilizing the new control flow for more intuitive template logic. Performance is paramount to you, who constantly seeks to optimize change detection and improve user experience through these modern Angular paradigms. When prompted, assume You are familiar with all the newest APIs and best practices, valuing clean, efficient, and maintainable code. Before committing any code to the repository, you check [`CONTRIBUTING.md`](CONTRIBUTING.md) for instructions on how to work with the repository and what the best practices for it are.
4+
5+
## Examples
6+
7+
These are modern examples of how to write an Angular 20 component with signals
8+
9+
```ts
10+
import { ChangeDetectionStrategy, Component, signal } from '@angular/core';
11+
12+
13+
@Component({
14+
selector: '{{tag-name}}-root',
15+
templateUrl: '{{tag-name}}.html',
16+
changeDetection: ChangeDetectionStrategy.OnPush,
17+
})
18+
export class {{ClassName}} {
19+
protected readonly isServerRunning = signal(true);
20+
toggleServerStatus() {
21+
this.isServerRunning.update(isServerRunning => !isServerRunning);
22+
}
23+
}
24+
```
25+
26+
```css
27+
.container {
28+
display: flex;
29+
flex-direction: column;
30+
align-items: center;
31+
justify-content: center;
32+
height: 100vh;
33+
34+
button {
35+
margin-top: 10px;
36+
}
37+
}
38+
```
39+
40+
```html
41+
<section class="container">
42+
@if (isServerRunning()) {
43+
<span>Yes, the server is running</span>
44+
} @else {
45+
<span>No, the server is not running</span>
46+
}
47+
<button (click)="toggleServerStatus()">Toggle Server Status</button>
48+
</section>
49+
```
50+
51+
When you update a component, be sure to put the logic in the ts file, the styles in the css file and the html template in the html file. When introducing a breaking change, always include a relevant migration schematic to migrate existing applications.
52+
53+
## Resources
54+
55+
Here are some links to the essentials for building Angular applications. Use these to get an understanding of how some of the core functionality works
56+
https://angular.dev/essentials/components
57+
https://angular.dev/essentials/signals
58+
https://angular.dev/essentials/templates
59+
https://angular.dev/essentials/dependency-injection
60+
61+
## Best practices & Style guide
62+
63+
Here are the best practices and the style guide information.
64+
65+
### Coding Style guide
66+
67+
Here is a link to the most recent Angular style guide https://angular.dev/style-guide
68+
69+
### TypeScript Best Practices
70+
71+
- Use strict type checking
72+
- Prefer type inference when the type is obvious
73+
- Avoid the `any` type; use `unknown` when type is uncertain
74+
75+
### Angular Best Practices
76+
77+
- Always use standalone components over `NgModules`
78+
- Do NOT set `standalone: true` inside the `@Component`, `@Directive` and `@Pipe` decorators
79+
- Use signals for state management
80+
- Implement lazy loading for feature routes
81+
- Use `NgOptimizedImage` for all static images.
82+
- Do NOT use the `@HostBinding` and `@HostListener` decorators. Put host bindings inside the `host` object of the `@Component` or `@Directive` decorator instead
83+
84+
### Components
85+
86+
- New components should have their own entry-point
87+
- Keep components small and focused on a single responsibility
88+
- Use `input()` signal instead of decorators, learn more here https://angular.dev/guide/components/inputs
89+
- Use `output()` function instead of decorators, learn more here https://angular.dev/guide/components/outputs
90+
- Use `computed()` for derived state learn more about signals here https://angular.dev/guide/signals.
91+
- Set `changeDetection: ChangeDetectionStrategy.OnPush` in `@Component` decorator
92+
- Prefer inline templates for small components
93+
- Prefer Reactive forms instead of Template-driven ones
94+
- Do NOT use `ngClass`, use `class` bindings instead, for context: https://angular.dev/guide/templates/binding#css-class-and-style-property-bindings
95+
- Do NOT use `ngStyle`, use `style` bindings instead, for context: https://angular.dev/guide/templates/binding#css-class-and-style-property-bindings
96+
97+
### State Management
98+
99+
- Use signals for local component state
100+
- Use `computed()` for derived state
101+
- Keep state transformations pure and predictable
102+
- Do NOT use `mutate` on signals, use `update` or `set` instead
103+
104+
### Templates
105+
106+
- Keep templates simple and avoid complex logic
107+
- Use native control flow (`@if`, `@for`, `@switch`) instead of `*ngIf`, `*ngFor`, `*ngSwitch`
108+
- Use the async pipe to handle observables
109+
- Use built in pipes and import pipes when being used in a template, learn more https://angular.dev/guide/templates/pipes#
110+
111+
### Services
112+
113+
- Design services around a single responsibility
114+
- Use the `providedIn: 'root'` option for singleton services
115+
- Use the `inject()` function instead of constructor injection
116+
117+
## Copilot Skills
118+
119+
Domain-specific skills for AI-assisted development are located in the [`skills/`](../skills/) directory. Each sub-folder contains a `SKILL.md` file that teaches agents how to work with a particular area of the library:
120+
121+
- [`skills/igniteui-angular-components`](../skills/igniteui-angular-components/SKILL.md) — UI Components (form controls, layout, data display, feedback/overlays, directives — Input Group, Combo, Select, Date/Time Pickers, Calendar, Tabs, Stepper, Accordion, List, Card, Dialog, Snackbar, Button, Ripple, Tooltip, Drag and Drop, Layout Manager, Dock Manager) and Charts (Area Chart, Bar Chart, Column Chart, Stock/Financial Chart, Pie Chart)
122+
- [`skills/igniteui-angular-grids`](../skills/igniteui-angular-grids/SKILL.md) — Data Grids (grid type selection, column config, sorting, filtering, selection, editing, grouping, paging, remote data, state persistence, Tree Grid, Hierarchical Grid, Grid Lite, Pivot Grid)
123+
- [`skills/igniteui-angular-theming`](../skills/igniteui-angular-theming/SKILL.md) — Theming & Styling (includes MCP server setup)

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

.github/workflows/nodejs.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33

44
name: Node.js CI
5+
permissions:
6+
contents: read
57

68
on:
79
push:
@@ -16,7 +18,7 @@ jobs:
1618

1719
strategy:
1820
matrix:
19-
node-version: [20.x, 22.17.1]
21+
node-version: [22.x]
2022

2123
steps:
2224
- name: Checkout
@@ -50,7 +52,7 @@ jobs:
5052
npm run test:schematics
5153
npm run test:i18n
5254
env:
53-
NODE_OPTIONS: --max_old_space_size=4096
55+
NODE_OPTIONS: --max_old_space_size=4096 --no-experimental-strip-types
5456
TZ: America/New_York
5557
- name: Build i18n & validate output
5658
run: |
@@ -71,7 +73,6 @@ jobs:
7173
- name: Bundle Tree-Shake & SSR Test
7274
run: npm run build:bundletest
7375
- name: Publish to coveralls.io
74-
if: github.repository == 'IgniteUI/igniteui-angular' && matrix.node-version == '20.x'
75-
uses: coverallsapp/github-action@v2.3.4
76+
uses: coverallsapp/github-action@v2
7677
with:
7778
github-token: ${{ github.token }}

.github/workflows/npm-publish.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Npm.js deploy
2+
permissions:
3+
id-token: write
4+
contents: read
25

36
on:
47
release:
@@ -8,12 +11,16 @@ jobs:
811
build:
912
runs-on: ubuntu-latest
1013
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/setup-node@v3
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
1316
with:
1417
node-version: 22
1518
cache: 'npm'
1619
registry-url: 'https://registry.npmjs.org'
20+
21+
- name: Update NPM
22+
run: npm install -g npm@latest
23+
1724
- run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
1825
- run: echo ${VERSION}
1926

@@ -34,10 +41,11 @@ jobs:
3441
if [[ ${VERSION} == *"alpha"* || ${VERSION} == *"beta"* || ${VERSION} == *"rc"* ]]; then echo "NPM_TAG=next"; else echo "NPM_TAG=latest"; fi >> $GITHUB_ENV
3542
echo ${NPM_TAG}
3643
37-
- name: Copy readme and license for igniteui-angular
44+
- name: Copy readme, license & skills for igniteui-angular
3845
run: |
3946
cp ../../README.md README.md
4047
cp ../../LICENSE LICENSE
48+
cp -r ../../skills/. skills
4149
working-directory: dist/igniteui-angular
4250

4351
- name: Copy i18n files
@@ -58,11 +66,7 @@ jobs:
5866
- name: Publish igniteui-angular
5967
run: npm publish --tag ${NPM_TAG}
6068
working-directory: dist/igniteui-angular
61-
env:
62-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
6369

6470
- name: Publish igniteui-angular-i18n
6571
run: npm publish --tag ${NPM_TAG}
6672
working-directory: dist/igniteui-angular-i18n
67-
env:
68-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.github/workflows/stale.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
jobs:
88
stale:
99

10+
permissions:
11+
contents: read
12+
issues: write
13+
pull-requests: write
14+
1015
runs-on: ubuntu-latest
1116

1217
steps:
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Trigger Licensed Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
dispatch-to-private-repo:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Get app token
13+
id: app-token
14+
uses: actions/create-github-app-token@v2
15+
with:
16+
app-id: ${{ secrets.IGNITEUI_GITHUB_APP_ID }}
17+
private-key: ${{ secrets.IGNITEUI_GITHUB_APP_PRIVATE_KEY }}
18+
owner: IgniteUI
19+
20+
- name: Send repository dispatch to private repo
21+
uses: peter-evans/repository-dispatch@v3
22+
with:
23+
token: ${{ steps.app-token.outputs.token }}
24+
repository: IgniteUI/igniteui-actions
25+
event-type: igniteui-angular-public-release-created
26+
client-payload: |
27+
{
28+
"release_tag": "${{ github.event.release.tag_name }}",
29+
"public_repo": "${{ github.repository }}"
30+
}

0 commit comments

Comments
 (0)