Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(scrim,rating,time-picker,input-time-picker,value-list)!: removed deprecated intl*properties #6053

Merged
merged 4 commits into from
Dec 15, 2022
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
99 changes: 0 additions & 99 deletions src/components/input-time-picker/input-time-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,94 +104,8 @@ 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.
*
* @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides`
*/
@Prop() messagesOverrides: Partial<Messages>;

Expand Down Expand Up @@ -618,19 +532,6 @@ export class InputTimePicker
triggerDisabled={true}
>
<calcite-time-picker
//t9n props are used here to forward the messages only.
intlHour={this.intlHour}
intlHourDown={this.intlHourDown}
intlHourUp={this.intlHourUp}
intlMeridiem={this.intlMeridiem}
intlMeridiemDown={this.intlMeridiemDown}
intlMeridiemUp={this.intlMeridiemUp}
intlMinute={this.intlMinute}
intlMinuteDown={this.intlMinuteDown}
intlMinuteUp={this.intlMinuteUp}
intlSecond={this.intlSecond}
intlSecondDown={this.intlSecondDown}
intlSecondUp={this.intlSecondUp}
lang={this.effectiveLocale}
messageOverrides={this.messagesOverrides}
numberingSystem={this.numberingSystem}
Expand Down
4 changes: 0 additions & 4 deletions src/components/rating/rating.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}")}"
></calcite-rating>
`;

Expand All @@ -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}")}"
></calcite-rating>
`;

Expand Down
16 changes: 0 additions & 16 deletions src/components/rating/rating.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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 */
Expand Down
8 changes: 1 addition & 7 deletions src/components/scrim/scrim.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -50,7 +45,6 @@ export class Scrim implements LocalizedComponent, T9nComponent {
*/
@Prop({ mutable: true }) messageOverrides: Partial<Messages>;

@Watch("intlLoading")
@Watch("messageOverrides")
onMessagesChange(): void {
/* wired up by t9n util */
Expand Down
107 changes: 0 additions & 107 deletions src/components/time-picker/time-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -207,18 +112,6 @@ export class TimePicker
*/
@Prop({ mutable: true }) messageOverrides: Partial<Messages>;

@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 */
Expand Down
40 changes: 0 additions & 40 deletions src/components/value-list/value-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<Messages>;

@Watch("intlDragHandleActive")
@Watch("intlDragHandleChange")
@Watch("intlDragHandleCommit")
@Watch("intlDragHandleIdle")
@Watch("messageOverrides")
onMessagesChange(): void {
/* wired up by t9n util */
Expand Down