Skip to content

Commit

Permalink
Merge cdd7659 into c1909e9
Browse files Browse the repository at this point in the history
  • Loading branch information
radium-v authored Sep 17, 2022
2 parents c1909e9 + cdd7659 commit 4036381
Show file tree
Hide file tree
Showing 136 changed files with 11,523 additions and 15,529 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Never lint test files
*.spec.ts
!*.pw.spec.ts

# Never lint node_modules
node_modules
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.spec.ts
!*.pw.spec.ts
*.spec.tsx
**/__tests__
**/__test__
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "make ElementsFilter type arguments optional",
"packageName": "@microsoft/fast-element",
"email": "[email protected]",
"dependentChangeType": "prerelease"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Convert karma and mocha tests to playwright",
"packageName": "@microsoft/fast-foundation",
"email": "[email protected]",
"dependentChangeType": "prerelease"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "update playwright",
"packageName": "@microsoft/fast-ssr",
"email": "[email protected]",
"dependentChangeType": "prerelease"
}
2 changes: 1 addition & 1 deletion packages/web-components/fast-element/docs/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export class ElementController<TElement extends HTMLElement = HTMLElement> exten
export const elements: (selector?: string) => ElementsFilter;

// @public
export type ElementsFilter = (value: Node, index: number, array: Node[]) => boolean;
export type ElementsFilter = (value: Node, index?: number, array?: Node[]) => boolean;

// @public
export class ElementStyles {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface NodeBehaviorOptions<T = any> {
*
* @public
*/
export type ElementsFilter = (value: Node, index: number, array: Node[]) => boolean;
export type ElementsFilter = (value: Node, index?: number, array?: Node[]) => boolean;

const selectElements = (value: Node): boolean => value.nodeType === 1;

Expand Down
13 changes: 4 additions & 9 deletions packages/web-components/fast-foundation/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# don't ever lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
# don't lint coverage output
coverage
# don't lint tests
*.spec.*
#
karma.conf.cjs
dist
node_modules
*.spec.ts
!*.pw.spec.ts
2 changes: 1 addition & 1 deletion packages/web-components/fast-foundation/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"no-restricted-imports": [
"error",
{
"patterns": ["**/stories/**"]
"patterns": ["**/stories/**", "**/*.pw.spec.ts"]
}
]
}
Expand Down
9 changes: 0 additions & 9 deletions packages/web-components/fast-foundation/.mocharc.json

This file was deleted.

22 changes: 20 additions & 2 deletions packages/web-components/fast-foundation/.storybook/main.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,19 @@ module.exports = {
},
core: {
disableTelemetry: true,
builder: "webpack5",
builder: {
name: "webpack5",
options: {
lazyCompilation: true,
fsCache: true,
},
},
},
webpackFinal: async config => {
config.performance = {
...(config.performance ?? {}),
hints: false,
};
config.module.rules = [
{
test: /\.ts$/,
Expand All @@ -23,10 +33,18 @@ module.exports = {
transpileOnly: true,
},
},
{
test: /\.m?js$/,
enforce: "pre",
loader: require.resolve("source-map-loader"),
resolve: {
fullySpecified: false,
},
},
];

config.resolve.plugins = [
...(config.resolve.plugins || []),
...(config.resolve.plugins ?? []),
new ResolveTypescriptPlugin({
includeNodeModules: true,
}),
Expand Down

This file was deleted.

9 changes: 9 additions & 0 deletions packages/web-components/fast-foundation/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { useArgs } from "@storybook/client-api";

import "@microsoft/fast-element/polyfills";
import "../src/anchor/stories/anchor.register.js";
import "../src/anchored-region/stories/anchored-region.register.js";
Expand Down Expand Up @@ -56,3 +58,10 @@ import "../src/menu/stories/menu.register.js";

import "../src/tree-item/stories/tree-item.register.js";
import "../src/tree-view/stories/tree-view.register.js";

export const decorators = [
(Story, context) => {
const [_, updateArgs] = useArgs();
return Story({ ...context, updateArgs });
},
];
38 changes: 30 additions & 8 deletions packages/web-components/fast-foundation/docs/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import type { CaptureType } from '@microsoft/fast-element';
import { composedContains } from '@microsoft/fast-element/utilities';
import { composedParent } from '@microsoft/fast-element/utilities';
import { Constructable } from '@microsoft/fast-element';
import { CSSDirective } from '@microsoft/fast-element';
import type { CSSDirective } from '@microsoft/fast-element';
import { Direction } from '@microsoft/fast-web-utilities';
import type { ElementsFilter } from '@microsoft/fast-element';
import { ElementStyles } from '@microsoft/fast-element';
import { ElementViewTemplate } from '@microsoft/fast-element';
import { FASTElement } from '@microsoft/fast-element';
Expand Down Expand Up @@ -269,12 +270,12 @@ export function checkboxTemplate<T extends FASTCheckbox>(options?: CheckboxOptio
export interface ColumnDefinition {
cellFocusTargetCallback?: (cell: FASTDataGridCell) => HTMLElement;
cellInternalFocusQueue?: boolean;
cellTemplate?: ViewTemplate;
cellTemplate?: ViewTemplate | SyntheticViewTemplate | string;
columnDataKey: string;
gridColumn?: string;
headerCellFocusTargetCallback?: (cell: FASTDataGridCell) => HTMLElement;
headerCellInternalFocusQueue?: boolean;
headerCellTemplate?: ViewTemplate;
headerCellTemplate?: ViewTemplate | SyntheticViewTemplate | string;
isRowHeader?: boolean;
title?: string;
}
Expand Down Expand Up @@ -513,6 +514,20 @@ export class DelegatesARIAToolbar {
export interface DelegatesARIAToolbar extends ARIAGlobalStatesAndProperties {
}

// Warning: (ae-different-release-tags) This symbol has another declaration with a different release tag
// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "DelegatesARIATreeItem" because one of its declarations is marked as @internal
//
// @public
export class DelegatesARIATreeItem {
ariaDisabled: "true" | "false" | string | null;
ariaExpanded: "true" | "false" | string | null;
ariaSelected: "true" | "false" | string | null;
}

// @internal
export interface DelegatesARIATreeItem extends ARIAGlobalStatesAndProperties {
}

// @public
export type DerivedDesignTokenValue<T> = (resolve: DesignTokenResolver) => T;

Expand Down Expand Up @@ -1327,14 +1342,16 @@ export class FASTMenu extends FASTElement {
// @internal (undocumented)
disconnectedCallback(): void;
focus(): void;
// (undocumented)
handleChange(source: any, propertyName: string): void;
// @internal
handleFocusOut: (e: FocusEvent) => void;
// @internal (undocumented)
handleMenuKeyDown(e: KeyboardEvent): void | boolean;
// @internal (undocumented)
readonly isNestedMenu: () => boolean;
// @internal (undocumented)
items: HTMLSlotElement;
items: HTMLElement[];
// (undocumented)
protected itemsChanged(oldValue: HTMLElement[], newValue: HTMLElement[]): void;
}
Expand Down Expand Up @@ -1367,6 +1384,7 @@ export class FASTMenuItem extends FASTElement {
handleMouseOver: (e: MouseEvent) => boolean;
// @internal (undocumented)
hasSubmenu: boolean;
hidden: boolean;
role: MenuItemRole;
// @internal (undocumented)
startColumnCount: MenuItemColumnCount;
Expand Down Expand Up @@ -1770,6 +1788,8 @@ export class FASTSkeleton extends FASTElement {
//
// @public
export class FASTSlider extends FormAssociatedSlider implements SliderConfiguration {
// @internal
calculateNewValue(rawValue: number): number;
// @internal (undocumented)
connectedCallback(): void;
decrement(): void;
Expand Down Expand Up @@ -2113,11 +2133,13 @@ export class FASTTreeItem extends FASTElement {
// @internal (undocumented)
childItems: HTMLElement[];
disabled: boolean;
// (undocumented)
protected disabledChanged(prev: boolean | undefined, next: boolean): void;
// @internal
expandCollapseButton: HTMLDivElement;
expanded: boolean;
// (undocumented)
protected expandedChanged(): void;
protected expandedChanged(prev: boolean | undefined, next: boolean): void;
// @internal
focusable: boolean;
static focusItem(el: HTMLElement): void;
Expand All @@ -2136,11 +2158,11 @@ export class FASTTreeItem extends FASTElement {
nested: boolean;
selected: boolean;
// (undocumented)
protected selectedChanged(): void;
protected selectedChanged(prev: boolean | undefined, next: boolean): void;
}

// @internal
export interface FASTTreeItem extends StartEnd {
export interface FASTTreeItem extends StartEnd, DelegatesARIATreeItem {
}

// @public
Expand Down Expand Up @@ -2795,7 +2817,7 @@ export type WeekdayText = {
};

// @public
export function whitespaceFilter(value: Node, index: number, array: Node[]): boolean;
export const whitespaceFilter: ElementsFilter;

// @public
export const YearFormat: {
Expand Down
Loading

0 comments on commit 4036381

Please sign in to comment.