From 53e6268ca3be7f1432f3a21e2bb9cf1f3b629b0b Mon Sep 17 00:00:00 2001 From: anveshmekala Date: Wed, 14 Dec 2022 19:18:05 -0600 Subject: [PATCH 1/3] refactor(scrim,rating,time-picker,value-list): removed deprecated intl properties --- src/components/rating/rating.stories.ts | 4 - src/components/rating/rating.tsx | 16 --- src/components/scrim/scrim.tsx | 8 +- src/components/time-picker/time-picker.tsx | 107 --------------------- src/components/value-list/value-list.tsx | 40 -------- 5 files changed, 1 insertion(+), 174 deletions(-) diff --git a/src/components/rating/rating.stories.ts b/src/components/rating/rating.stories.ts index 00485b8871c..7b9dcd724fb 100644 --- a/src/components/rating/rating.stories.ts +++ b/src/components/rating/rating.stories.ts @@ -21,8 +21,6 @@ export const simple = (): string => html` count="${number("count", 10)}" ${boolean("read-only", false)} ${boolean("disabled", false)} - intl-rating="${text("intl-rating", "Rating")}" - intl-stars="${text("intl-rating", "Stars: ${num}")}" > `; @@ -37,8 +35,6 @@ export const darkThemeRTL_TestOnly = (): string => html` count="${number("count", 10)}" ${boolean("read-only", false)} ${boolean("disabled", false)} - intl-rating="${text("intl-rating", "Rating")}" - intl-stars="${text("intl-rating", "Stars: ${num}")}" > `; diff --git a/src/components/rating/rating.tsx b/src/components/rating/rating.tsx index d84b2566cde..3f32318f31b 100644 --- a/src/components/rating/rating.tsx +++ b/src/components/rating/rating.tsx @@ -87,20 +87,6 @@ export class Rating /** Specifies the name of the component on form submission. */ @Prop({ reflect: true }) name: string; - /** - * Accessible name for the component. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlRating: string; - - /** - * Accessible name for each star. The `${num}` in the string will be replaced by the number. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlStars: string; - /** * Made into a prop for testing purposes only * @@ -120,8 +106,6 @@ export class Rating */ @Prop({ reflect: true }) required = false; - @Watch("intlRating") - @Watch("intlStars") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/scrim/scrim.tsx b/src/components/scrim/scrim.tsx index f7402ec3537..1e1c54a9290 100644 --- a/src/components/scrim/scrim.tsx +++ b/src/components/scrim/scrim.tsx @@ -27,12 +27,7 @@ export class Scrim implements LocalizedComponent, T9nComponent { // -------------------------------------------------------------------------- /** - * Accessible name when the component is loading. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlLoading: string; - + /** * When `true`, a busy indicator is displayed. */ @@ -50,7 +45,6 @@ export class Scrim implements LocalizedComponent, T9nComponent { */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlLoading") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/time-picker/time-picker.tsx b/src/components/time-picker/time-picker.tsx index 3f1c6da3aa1..3d8121accb3 100644 --- a/src/components/time-picker/time-picker.tsx +++ b/src/components/time-picker/time-picker.tsx @@ -80,101 +80,6 @@ export class TimePicker // //-------------------------------------------------------------------------- - /** - * Accessible name for the component's hour input. - * - * @default "Hour" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlHour: string; - - /** - * Accessible name for the component's hour down button. - * - * @default "Decrease hour" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlHourDown: string; - - /** - * Accessible name for the component's hour up button. - * - * @default "Increase hour" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlHourUp: string; - - /** - * Accessible name for the component's meridiem (AM/PM) input. - * - * @default "AM/PM" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMeridiem: string; - - /** - * Accessible name for the component's meridiem (AM/PM) down button. - * - * @default "Decrease AM/PM" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMeridiemDown: string; - - /** - * Accessible name for the component's meridiem (AM/PM) up button. - * - * @default "Increase AM/PM" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMeridiemUp: string; - - /** - * Accessible name for the component's minute input. - * - * @default "Minute" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMinute: string; - - /** - * Accessible name for the component's minute down button. - * - * @default "Decrease minute" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMinuteDown: string; - - /** - * Accessible name for the component's minute up button. - * - * @default "Increase minute" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMinuteUp: string; - - /** - * Accessible name for the component's second input. - * - * @default "Second" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlSecond: string; - - /** - * Accessible name for the component's second down button. - * - * @default "Decrease second" - */ - @Prop() intlSecondDown: string; - - /** - * Accessible name for the component's second up button. - * - * @default "Increase second" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlSecondUp: string; - /** Specifies the size of the component. */ @Prop({ reflect: true }) scale: Scale = "m"; @@ -207,18 +112,6 @@ export class TimePicker */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlHour") - @Watch("intlHourDown") - @Watch("intlHourUp") - @Watch("intlMeridiem") - @Watch("intlMeridiemDown") - @Watch("intlMeridiemUp") - @Watch("intlMinute") - @Watch("intlMinuteDown") - @Watch("intlMinuteUp") - @Watch("intlSecond") - @Watch("intlSecondDown") - @Watch("intlSecondUp") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/value-list/value-list.tsx b/src/components/value-list/value-list.tsx index 49379ec78f4..c6ad7234431 100644 --- a/src/components/value-list/value-list.tsx +++ b/src/components/value-list/value-list.tsx @@ -140,51 +140,11 @@ export class ValueList< */ @Prop({ reflect: true }) selectionFollowsFocus = false; - /** - * When "drag-enabled" is true and active, specifies accessible context to the component. - * - * Use ${position} of ${total} as placeholder for displaying indices and ${item.label} as placeholder for displaying label of `calcite-value-list-item`. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlDragHandleActive: string; - - /** - * When "drag-enabled" is true and active, specifies accessible context to the `calcite-value-list-item`'s new position. - * - * Use ${position} of ${total} as placeholder for displaying indices and ${item.label} as placeholder for displaying label of `calcite-value-list-item`. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlDragHandleChange: string; - - /** - * When "drag-enabled" is true and active, specifies accessible context to the `calcite-value-list-item`'s current position after commit. - * - * Use ${position} of ${total} as placeholder for displaying indices and ${item.label} as placeholder for displaying label of `calcite-value-list-item`. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlDragHandleCommit: string; - - /** - * When "drag-enabled" is true and active, specifies accessible context to the `calcite-value-list-item`'s initial position. - * - * Use ${position} of ${total} as placeholder for displaying indices and ${item.label} as placeholder for displaying label of `calcite-value-list-item`. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlDragHandleIdle: string; - /** * Use this property to override individual strings used by the component. */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlDragHandleActive") - @Watch("intlDragHandleChange") - @Watch("intlDragHandleCommit") - @Watch("intlDragHandleIdle") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ From 6c7c2e78b4b81fa3b7cac8b452b69c806f797214 Mon Sep 17 00:00:00 2001 From: anveshmekala Date: Wed, 14 Dec 2022 19:58:11 -0600 Subject: [PATCH 2/3] fix test error --- .../input-time-picker/input-time-picker.tsx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/components/input-time-picker/input-time-picker.tsx b/src/components/input-time-picker/input-time-picker.tsx index 9282f68b080..6f88768107d 100644 --- a/src/components/input-time-picker/input-time-picker.tsx +++ b/src/components/input-time-picker/input-time-picker.tsx @@ -190,8 +190,6 @@ export class InputTimePicker /** * Use this property to override individual strings used by the component. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` */ @Prop() messagesOverrides: Partial; @@ -618,19 +616,6 @@ export class InputTimePicker triggerDisabled={true} > Date: Wed, 14 Dec 2022 20:28:16 -0600 Subject: [PATCH 3/3] add input-time-picker changes --- .../input-time-picker/input-time-picker.tsx | 84 ------------------- 1 file changed, 84 deletions(-) diff --git a/src/components/input-time-picker/input-time-picker.tsx b/src/components/input-time-picker/input-time-picker.tsx index 6f88768107d..2e83417b955 100644 --- a/src/components/input-time-picker/input-time-picker.tsx +++ b/src/components/input-time-picker/input-time-picker.tsx @@ -104,90 +104,6 @@ export class InputTimePicker } } - /** - * Accessible name for the component's hour input. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlHour?: string; - - /** - * Accessible name for the component's hour down button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlHourDown?: string; - - /** - * Accessible name for the component's hour up button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlHourUp?: string; - - /** - * Accessible name for the component's meridiem (am/pm) input. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMeridiem?: string; - - /** - * Accessible name for the component's meridiem (am/pm) down button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMeridiemDown?: string; - - /** - * Accessible name for the component's meridiem (am/pm) up button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMeridiemUp?: string; - - /** - * Accessible name for the component's minute input. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMinute?: string; - - /** - * Accessible name for the component's minute down button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMinuteDown?: string; - - /** - * Accessible name for the component's minute up button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMinuteUp?: string; - - /** - * Accessible name for the component's second input. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlSecond?: string; - - /** - * Accessible name for the component's second down button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlSecondDown?: string; - - /** - * Accessible name for the component's second up button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlSecondUp?: string; - /** * Use this property to override individual strings used by the component. */