From 8fc96cab2dcf23cd171930867c10fb579e3f03b8 Mon Sep 17 00:00:00 2001 From: Chris Holt Date: Tue, 26 Apr 2022 10:13:19 -0700 Subject: [PATCH] feat: update private change handlers to protected (#5872) * update attribute and observable change handlers with internal logic to be protected instead of private * Change files * udpate api docs --- .../fast-foundation/src/combobox/combobox.ts | 10 ++++++++++ .../fast-foundation/src/data-grid/README.md | 8 ++++++++ .../fast-foundation/src/data-grid/data-grid-row.ts | 6 ++++++ .../fast-foundation/src/data-grid/data-grid.ts | 6 ++++++ .../fast-foundation/src/text-field/text-field.ts | 6 ++++++ .../fast-foundation/src/tooltip/README.md | 4 ++++ 6 files changed, 40 insertions(+) diff --git a/packages/web-components/fast-foundation/src/combobox/combobox.ts b/packages/web-components/fast-foundation/src/combobox/combobox.ts index c40b19fbaf1..9913ef0c78a 100644 --- a/packages/web-components/fast-foundation/src/combobox/combobox.ts +++ b/packages/web-components/fast-foundation/src/combobox/combobox.ts @@ -53,7 +53,17 @@ export class Combobox extends FormAssociatedCombobox { * HTML Attribute: autocomplete */ @attr({ attribute: "autocomplete", mode: "fromView" }) +<<<<<<< HEAD autocomplete: ComboboxAutocomplete | undefined; +======= + public autocomplete: + | ComboboxAutocomplete + | "inline" + | "list" + | "both" + | "none" + | undefined; +>>>>>>> feat: update private change handlers to protected (#5872) /** * Reference to the internal text input element. diff --git a/packages/web-components/fast-foundation/src/data-grid/README.md b/packages/web-components/fast-foundation/src/data-grid/README.md index 19269f82459..ea3b08bc320 100644 --- a/packages/web-components/fast-foundation/src/data-grid/README.md +++ b/packages/web-components/fast-foundation/src/data-grid/README.md @@ -194,6 +194,10 @@ export const myDataGrid = DataGrid.compose({ | Name | Privacy | Description | Parameters | Return | Inherited From | | ---------------------------- | --------- | ----------- | ------------------ | ------ | ----------------- | | `gridTemplateColumnsChanged` | protected | | | `void` | | +<<<<<<< HEAD +======= +| `rowTypeChanged` | protected | | | `void` | | +>>>>>>> feat: update private change handlers to protected (#5872) | `rowDataChanged` | protected | | | `void` | | | `handleFocusout` | public | | `e: FocusEvent` | `void` | | | `handleCellFocus` | public | | `e: Event` | `void` | | @@ -293,6 +297,10 @@ export const myDataGrid = DataGrid.compose({ | Name | Privacy | Description | Parameters | Return | Inherited From | | ---------------------------- | --------- | ----------- | ---------- | ------ | ----------------- | | `noTabbingChanged` | protected | | | `void` | | +<<<<<<< HEAD +======= +| `generateHeaderChanged` | protected | | | `void` | | +>>>>>>> feat: update private change handlers to protected (#5872) | `gridTemplateColumnsChanged` | protected | | | `void` | | | `rowsDataChanged` | protected | | | `void` | | | `columnDefinitionsChanged` | protected | | | `void` | | diff --git a/packages/web-components/fast-foundation/src/data-grid/data-grid-row.ts b/packages/web-components/fast-foundation/src/data-grid/data-grid-row.ts index dd348ac27d9..edbf37d59d2 100644 --- a/packages/web-components/fast-foundation/src/data-grid/data-grid-row.ts +++ b/packages/web-components/fast-foundation/src/data-grid/data-grid-row.ts @@ -48,8 +48,14 @@ export class DataGridRow extends FoundationElement { * HTML Attribute: row-type */ @attr({ attribute: "row-type" }) +<<<<<<< HEAD public rowType: DataGridRowTypes = DataGridRowTypes.default; private rowTypeChanged(): void { +======= + public rowType: DataGridRowTypes | "default" | "header" | "sticky-header" = + DataGridRowTypes.default; + protected rowTypeChanged(): void { +>>>>>>> feat: update private change handlers to protected (#5872) if (this.$fastController.isConnected) { this.updateItemTemplate(); } diff --git a/packages/web-components/fast-foundation/src/data-grid/data-grid.ts b/packages/web-components/fast-foundation/src/data-grid/data-grid.ts index e8993f4ef78..5b3bb4d7a0c 100644 --- a/packages/web-components/fast-foundation/src/data-grid/data-grid.ts +++ b/packages/web-components/fast-foundation/src/data-grid/data-grid.ts @@ -162,8 +162,14 @@ export class DataGrid extends FoundationElement { * HTML Attribute: generate-header */ @attr({ attribute: "generate-header" }) +<<<<<<< HEAD public generateHeader: GenerateHeaderOptions = GenerateHeaderOptions.default; private generateHeaderChanged(): void { +======= + public generateHeader: GenerateHeaderOptions | "none" | "default" | "sticky" = + GenerateHeaderOptions.default; + protected generateHeaderChanged(): void { +>>>>>>> feat: update private change handlers to protected (#5872) if (this.$fastController.isConnected) { this.toggleGeneratedHeader(); } diff --git a/packages/web-components/fast-foundation/src/text-field/text-field.ts b/packages/web-components/fast-foundation/src/text-field/text-field.ts index e3c95cf230d..50a62fe1b27 100644 --- a/packages/web-components/fast-foundation/src/text-field/text-field.ts +++ b/packages/web-components/fast-foundation/src/text-field/text-field.ts @@ -84,8 +84,14 @@ export class TextField extends FormAssociatedTextField { * HTML Attribute: type */ @attr +<<<<<<< HEAD public type: TextFieldType = TextFieldType.text; private typeChanged(): void { +======= + public type: TextFieldType | "email" | "password" | "tel" | "text" | "url" = + TextFieldType.text; + protected typeChanged(): void { +>>>>>>> feat: update private change handlers to protected (#5872) if (this.proxy instanceof HTMLInputElement) { this.proxy.type = this.type; this.validate(); diff --git a/packages/web-components/fast-foundation/src/tooltip/README.md b/packages/web-components/fast-foundation/src/tooltip/README.md index 7b9240cba50..a4ad979f95b 100644 --- a/packages/web-components/fast-foundation/src/tooltip/README.md +++ b/packages/web-components/fast-foundation/src/tooltip/README.md @@ -88,6 +88,10 @@ export const myTooltip = Tooltip.compose({ | ------------------------ | --------- | ----------- | ------------------------------- | ------ | ----------------- | | `visibleChanged` | protected | | | `void` | | | `anchorChanged` | protected | | | `void` | | +<<<<<<< HEAD +======= +| `positionChanged` | protected | | | `void` | | +>>>>>>> feat: update private change handlers to protected (#5872) | `anchorElementChanged` | protected | | `oldValue: HTMLElement or null` | `void` | | | `viewportElementChanged` | protected | | | `void` | | | `templateChanged` | protected | | | `void` | FoundationElement |