Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
323 changes: 164 additions & 159 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@
"prepare": "husky"
},
"dependencies": {
"@floating-ui/dom": "^1.7.3",
"@floating-ui/dom": "^1.7.4",
"@lit-labs/virtualizer": "^2.1.1",
"@lit/context": "^1.1.6",
"lit": "^3.3.1"
},
"devDependencies": {
"@biomejs/biome": "~2.1.3",
"@custom-elements-manifest/analyzer": "^0.10.4",
"@biomejs/biome": "~2.2.2",
"@custom-elements-manifest/analyzer": "^0.10.5",
"@igniteui/material-icons-extended": "^3.1.0",
"@open-wc/testing": "^4.0.0",
"@storybook/addon-a11y": "^9.1.1",
"@storybook/addon-docs": "^9.1.1",
"@storybook/addon-links": "^9.1.1",
"@storybook/web-components-vite": "^9.1.1",
"@storybook/addon-a11y": "^9.1.3",
"@storybook/addon-docs": "^9.1.3",
"@storybook/addon-links": "^9.1.3",
"@storybook/web-components-vite": "^9.1.3",
"@types/mocha": "^10.0.10",
"@web/dev-server-esbuild": "^1.0.4",
"@web/test-runner": "^0.20.2",
Expand All @@ -79,20 +79,20 @@
"globby": "^14.1.0",
"husky": "^9.1.7",
"ig-typedoc-theme": "^6.2.3",
"igniteui-theming": "^19.2.3",
"igniteui-theming": "^19.2.4",
"keep-a-changelog": "^2.6.2",
"lint-staged": "^16.1.4",
"lint-staged": "^16.1.5",
"lit-analyzer": "^2.0.3",
"madge": "^8.0.0",
"node-watch": "^0.7.4",
"playwright": "^1.54.2",
"playwright": "^1.55.0",
"postcss": "^8.5.6",
"prettier": "^3.6.2",
"rimraf": "^6.0.1",
"sass-embedded": "~1.78.0",
"sinon": "^21.0.0",
"storybook": "^9.1.1",
"stylelint": "^16.23.0",
"storybook": "^9.1.3",
"stylelint": "^16.23.1",
"stylelint-config-standard-scss": "^15.0.1",
"stylelint-prettier": "^5.0.3",
"stylelint-scss": "^6.12.1",
Expand All @@ -101,7 +101,7 @@
"typedoc": "~0.27.9",
"typedoc-plugin-localization": "^3.0.6",
"typescript": "^5.8.3",
"vite": "^7.1.0"
"vite": "^7.1.3"
},
"browserslist": [
"defaults"
Expand Down
2 changes: 1 addition & 1 deletion src/components/combo/controllers/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export class NavigationController<T extends object>
}

public navigateTo(item: T, container: IgcComboListComponent) {
this.active = this.dataState.findIndex((i) => i === item);
this.active = this.dataState.indexOf(item as ComboRecord<T>);
this.scrollToActive(container, 'smooth');
}

Expand Down
6 changes: 4 additions & 2 deletions src/components/date-time-input/date-util.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('Date Util', () => {
[DateParts.Seconds, currentDate.getSeconds()],
[
DateParts.Year,
Number.parseInt(currentDate.getFullYear().toString().slice(-2)),
Number.parseInt(currentDate.getFullYear().toString().slice(-2), 10),
],
]);

Expand All @@ -139,7 +139,9 @@ describe('Date Util', () => {
const amPm = currentDate.getHours() >= 12 ? 'PM' : 'AM';
expect(amPm).to.equal(targetValue);
} else {
expect(partsMap.get(part.type)).to.equal(Number.parseInt(targetValue));
expect(partsMap.get(part.type)).to.equal(
Number.parseInt(targetValue, 10)
);
}
}
});
Expand Down
6 changes: 3 additions & 3 deletions src/components/rating/rating.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ describe('Rating component', () => {

expect(projected.max).to.equal(3);

getProjectedSymbols(projected).forEach((symbol) =>
expect(symbol.textContent).to.eq('🐝')
);
for (const symbol of getProjectedSymbols(projected)) {
expect(symbol.textContent).to.eq('🐝');
}
});

it('sets max value correctly when igc-rating-symbols are projected', async () => {
Expand Down
59 changes: 27 additions & 32 deletions src/components/slider/slider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -473,49 +473,44 @@ describe('Slider component', () => {
expect(ticks.labelsInner).lengthOf(11);
expect(slider.tickLabelRotation).to.eq(0);

ticks.labelsInner
.map((tick) => getComputedStyle(tick))
.forEach(({ marginInlineStart, marginBlock, writingMode, transform }) =>
expect([
marginInlineStart,
marginBlock,
writingMode,
transform,
]).to.eql(['-50%', '0px', 'horizontal-tb', 'none'])
for (const {
marginInlineStart,
marginBlock,
writingMode,
transform,
} of ticks.labelsInner.map((tick) => getComputedStyle(tick))) {
expect([marginInlineStart, marginBlock, writingMode, transform]).to.eql(
['-50%', '0px', 'horizontal-tb', 'none']
);
}

slider.tickLabelRotation = 90;
await elementUpdated(slider);

ticks.labelsInner
.map((tick) => getComputedStyle(tick))
.forEach(({ marginInlineStart, marginBlock, writingMode, transform }) =>
expect([
marginInlineStart,
marginBlock,
writingMode,
transform,
]).to.eql(['0px', '-9px', 'vertical-rl', 'none'])
for (const {
marginInlineStart,
marginBlock,
writingMode,
transform,
} of ticks.labelsInner.map((tick) => getComputedStyle(tick))) {
expect([marginInlineStart, marginBlock, writingMode, transform]).to.eql(
['0px', '-9px', 'vertical-rl', 'none']
);
}

slider.tickLabelRotation = -90;
await elementUpdated(slider);

ticks.labelsInner
.map((tick) => getComputedStyle(tick))
.forEach(({ marginInlineStart, marginBlock, writingMode, transform }) =>
expect([
marginInlineStart,
marginBlock,
writingMode,
transform,
]).to.eql([
'0px',
'-9px',
'vertical-rl',
'matrix(-1, 0, 0, -1, 0, 0)',
])
for (const {
marginInlineStart,
marginBlock,
writingMode,
transform,
} of ticks.labelsInner.map((tick) => getComputedStyle(tick))) {
expect([marginInlineStart, marginBlock, writingMode, transform]).to.eql(
['0px', '-9px', 'vertical-rl', 'matrix(-1, 0, 0, -1, 0, 0)']
);
}
});

it('track should be continuos or discrete based on discreteTrack', async () => {
Expand Down
5 changes: 4 additions & 1 deletion src/components/tabs/tabs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,10 @@ describe('Tabs component', () => {
element.select('third');
await elementUpdated(element);

element.tabs.slice(0, 2).forEach((el) => el.remove());
for (const el of element.tabs.slice(0, 2)) {
el.remove();
}

await elementUpdated(element);

verifySelection(element, element.tabs[0]);
Expand Down
5 changes: 4 additions & 1 deletion src/components/tile-manager/tile-manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,10 @@ describe('Tile Manager component', () => {
document.createElement(IgcTileComponent.tagName)
);

tiles.forEach((tile) => tileManager.appendChild(tile));
for (const tile of tiles) {
tileManager.appendChild(tile);
}

await elementUpdated(tileManager);

tileManager.tiles.forEach((tile, index) => {
Expand Down
6 changes: 3 additions & 3 deletions src/components/tree/tree.navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ export class IgcTreeNavigationService {
}
});
} else {
item
.getChildren({ flatten: true })
?.forEach((c: IgcTreeItemComponent) => this._invisibleChildren.add(c));
for (const child of item.getChildren({ flatten: true })) {
this._invisibleChildren.add(child);
}
}

if (shouldUpdate) {
Expand Down
10 changes: 6 additions & 4 deletions src/components/tree/tree.selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ export class IgcTreeSelectionService {
return;
}

items.forEach((item: IgcTreeItemComponent) => this.itemSelection.add(item));
for (const item of items) {
this.itemSelection.add(item);
}

this.updateItemsState(oldSelection);
}
Expand All @@ -165,9 +167,9 @@ export class IgcTreeSelectionService {
if (!items) {
this.itemSelection.clear();
} else {
items.forEach((item: IgcTreeItemComponent) =>
this.itemSelection.delete(item)
);
for (const item of items) {
this.itemSelection.delete(item);
}
}

this.updateItemsState(oldSelection);
Expand Down
37 changes: 10 additions & 27 deletions src/components/tree/tree.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,8 @@ describe('Tree', () => {
.to.have.lengthOf(2)
.and.to.contain(topLevelItems[0])
.and.to.contain(item1Children[0]);
expect(
item1Children[0].path.findIndex((tree) => tree === topLevelItems[0])
).to.equal(0);
expect(
item1Children[0].path.findIndex((tree) => tree === item1Children[0])
).to.equal(1);
expect(item1Children[0].path.indexOf(topLevelItems[0])).to.equal(0);
expect(item1Children[0].path.indexOf(item1Children[0])).to.equal(1);

// item.getChildren({flatten: false}) should return only the direct children of item
const item2Children = topLevelItems[1].getChildren();
Expand All @@ -114,12 +110,9 @@ describe('Tree', () => {
.to.have.lengthOf(2)
.and.to.contain(topLevelItems[1])
.and.to.contain(item2Children[0]);
expect(
item2Children[0].path.findIndex((tree) => tree === topLevelItems[1])
).to.equal(0);
expect(
item2Children[0].path.findIndex((tree) => tree === item2Children[0])
).to.equal(1);

expect(item2Children[0].path.indexOf(topLevelItems[1])).to.equal(0);
expect(item2Children[0].path.indexOf(item2Children[0])).to.equal(1);

const item2GrandChildren = item2Children[0].getChildren();
expect(item2GrandChildren.length).to.equal(2);
Expand All @@ -129,20 +122,10 @@ describe('Tree', () => {
.to.contain(topLevelItems[1])
.and.to.contain(item2Children[0])
.and.to.contain(item2GrandChildren[0]);
expect(item2GrandChildren[0].path.indexOf(topLevelItems[1])).to.equal(0);
expect(item2GrandChildren[0].path.indexOf(item2Children[0])).to.equal(1);
expect(
item2GrandChildren[0].path.findIndex(
(tree) => tree === topLevelItems[1]
)
).to.equal(0);
expect(
item2GrandChildren[0].path.findIndex(
(tree) => tree === item2Children[0]
)
).to.equal(1);
expect(
item2GrandChildren[0].path.findIndex(
(tree) => tree === item2GrandChildren[0]
)
item2GrandChildren[0].path.indexOf(item2GrandChildren[0])
).to.equal(2);

// item.getChildren({flatten: true}) should return all item's children
Expand Down Expand Up @@ -901,7 +884,7 @@ describe('Tree', () => {

// Level 1
const item2Children = topLevelItems[1].getChildren();
// topLevelItems[1] is currenlty expanded
// topLevelItems[1] is currently expanded
const item21IndSlot = TreeTestFunctions.getSlot(
item2Children[0],
SLOTS.indicator
Expand Down Expand Up @@ -1185,7 +1168,7 @@ describe('Tree', () => {
expect(item21.active).to.be.false;
expect(item21Children[0].active).to.be.false;
expect(item21Children[1].active).to.be.false;
expect(item22.active).to.be.true; // item22 is the next non-disbaled
expect(item22.active).to.be.true; // item22 is the next non-disabled

item22.dispatchEvent(new Event('focus'));
expect(tree.navService.focusedItem).to.equal(item22);
Expand Down
4 changes: 3 additions & 1 deletion src/components/tree/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ export default class IgcTreeComponent extends EventEmitterMixin<
}
});
} else {
this.items.forEach((item) => item.collapseWithEvent());
for (const item of this.items) {
item.collapseWithEvent();
}
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion stories/rating.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import {
} from './story.js';

defineComponents(IgcRatingComponent, IgcIconComponent);
utils.icons.forEach((icon) => registerIconFromText(icon.name, icon.value));
for (const { name, value } of utils.icons) {
registerIconFromText(name, value);
}

// region default
const metadata: Meta<IgcRatingComponent> = {
Expand Down
4 changes: 3 additions & 1 deletion stories/tabs.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ export const Removable: Story = {
name: 'svelte',
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="0.84em" height="1em" viewBox="0 0 256 308"><path fill="#ff3e00" d="M239.682 40.707C211.113-.182 154.69-12.301 113.895 13.69L42.247 59.356a82.2 82.2 0 0 0-37.135 55.056a86.57 86.57 0 0 0 8.536 55.576a82.4 82.4 0 0 0-12.296 30.719a87.6 87.6 0 0 0 14.964 66.244c28.574 40.893 84.997 53.007 125.787 27.016l71.648-45.664a82.18 82.18 0 0 0 37.135-55.057a86.6 86.6 0 0 0-8.53-55.577a82.4 82.4 0 0 0 12.29-30.718a87.57 87.57 0 0 0-14.963-66.244"/><path fill="#fff" d="M106.889 270.841c-23.102 6.007-47.497-3.036-61.103-22.648a52.7 52.7 0 0 1-9.003-39.85a50 50 0 0 1 1.713-6.693l1.35-4.115l3.671 2.697a92.5 92.5 0 0 0 28.036 14.007l2.663.808l-.245 2.659a16.07 16.07 0 0 0 2.89 10.656a17.14 17.14 0 0 0 18.397 6.828a15.8 15.8 0 0 0 4.403-1.935l71.67-45.672a14.92 14.92 0 0 0 6.734-9.977a15.92 15.92 0 0 0-2.713-12.011a17.16 17.16 0 0 0-18.404-6.832a15.8 15.8 0 0 0-4.396 1.933l-27.35 17.434a52.3 52.3 0 0 1-14.553 6.391c-23.101 6.007-47.497-3.036-61.101-22.649a52.68 52.68 0 0 1-9.004-39.849a49.43 49.43 0 0 1 22.34-33.114l71.664-45.677a52.2 52.2 0 0 1 14.563-6.398c23.101-6.007 47.497 3.036 61.101 22.648a52.7 52.7 0 0 1 9.004 39.85a51 51 0 0 1-1.713 6.692l-1.35 4.116l-3.67-2.693a92.4 92.4 0 0 0-28.037-14.013l-2.664-.809l.246-2.658a16.1 16.1 0 0 0-2.89-10.656a17.14 17.14 0 0 0-18.398-6.828a15.8 15.8 0 0 0-4.402 1.935l-71.67 45.674a14.9 14.9 0 0 0-6.73 9.975a15.9 15.9 0 0 0 2.709 12.012a17.16 17.16 0 0 0 18.404 6.832a15.8 15.8 0 0 0 4.402-1.935l27.345-17.427a52.2 52.2 0 0 1 14.552-6.397c23.101-6.006 47.497 3.037 61.102 22.65a52.68 52.68 0 0 1 9.003 39.848a49.45 49.45 0 0 1-22.34 33.12l-71.664 45.673a52.2 52.2 0 0 1-14.563 6.398"/></svg>',
},
].forEach(({ name, svg }) => registerIconFromText(name, svg, 'logos'));
].forEach(({ name, svg }) => {
registerIconFromText(name, svg, 'logos');
});

export const NestedTabs: Story = {
args: {
Expand Down
4 changes: 3 additions & 1 deletion stories/tile-manager.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,9 @@ function handleMaximizeClick(event: Event) {

const additionalButtons =
actionsSlot.parentElement?.querySelectorAll('.additional-action');
additionalButtons?.forEach((btn) => btn.remove());
additionalButtons?.forEach((btn) => {
btn.remove();
});
}
}
}
Expand Down