diff --git a/api-generator/components/rating.js b/api-generator/components/rating.js index 454c194ed..92d845af9 100644 --- a/api-generator/components/rating.js +++ b/api-generator/components/rating.js @@ -23,12 +23,6 @@ const RatingProps = [ default: '5', description: 'Number of stars.' }, - { - name: 'cancel', - type: 'boolean', - default: 'true', - description: 'When specified a cancel icon is displayed to allow clearing the value.' - }, { name: 'onIcon', type: 'string', @@ -41,12 +35,6 @@ const RatingProps = [ default: 'null', description: 'Icon for the off state.' }, - { - name: 'cancelIcon', - type: 'string', - default: 'null', - description: 'Icon for the cancelable state.' - }, { name: 'pt', type: 'any', @@ -62,10 +50,6 @@ const RatingProps = [ ]; const RatingSlots = [ - { - name: 'cancelicon', - description: 'Custom cancel icon template.' - }, { name: 'onicon', description: 'Custom on icon template.' diff --git a/components/lib/rating/BaseRating.vue b/components/lib/rating/BaseRating.vue index 7710adf6e..9d3a2aa09 100644 --- a/components/lib/rating/BaseRating.vue +++ b/components/lib/rating/BaseRating.vue @@ -22,10 +22,6 @@ export default { type: Number, default: 5 }, - cancel: { - type: Boolean, - default: false - }, onIcon: { type: String, default: undefined @@ -33,10 +29,6 @@ export default { offIcon: { type: String, default: undefined - }, - cancelIcon: { - type: String, - default: undefined } }, style: RatingStyle, diff --git a/components/lib/rating/Rating.d.ts b/components/lib/rating/Rating.d.ts index 36e093013..11837be10 100755 --- a/components/lib/rating/Rating.d.ts +++ b/components/lib/rating/Rating.d.ts @@ -57,14 +57,6 @@ export interface RatingPassThroughOptions { * Used to pass attributes to the root's DOM element. */ root?: RatingPassThroughOptionType; - /** - * Used to pass attributes to the cancel item's DOM element. - */ - cancelItem?: RatingPassThroughOptionType; - /** - * Used to pass attributes to the cancel icon's DOM element. - */ - cancelIcon?: RatingPassThroughOptionType; /** * Used to pass attributes to the item's DOM element. */ @@ -77,14 +69,6 @@ export interface RatingPassThroughOptions { * Used to pass attributes to the off icon's DOM element. */ offIcon?: RatingPassThroughOptionType; - /** - * Used to pass attributes to the hidden cancel inputW wapper's DOM element. - */ - hiddenCancelInputWrapper?: RatingPassThroughOptionType; - /** - * Used to pass attributes to the hidden cancel input's DOM element. - */ - hiddenCancelInput?: RatingPassThroughOptionType; /** * Used to pass attributes to the hidden item input wrapper's DOM element. */ @@ -179,12 +163,6 @@ export interface RatingProps { * @defaultValue 5 */ stars?: number | undefined; - /** - * When specified a cancel icon is displayed to allow clearing the value. - * @deprecated since v4.0.0-beta.1 - * @defaultValue false - */ - cancel?: boolean | undefined; /** * Icon for the on state. * @deprecated since v3.27.0. Use 'onicon' slot. @@ -195,11 +173,6 @@ export interface RatingProps { * @deprecated since v3.27.0. Use 'officon' slot. */ offIcon?: string | undefined; - /** - * Icon for the cancelable state. - * @deprecated since v3.27.0. Use 'cancelicon' slot. - */ - cancelIcon?: string | undefined; /** * It generates scoped CSS variables using design tokens for the component. */ @@ -225,16 +198,6 @@ export interface RatingProps { * Defines valid slots in Rating component. */ export interface RatingSlots { - /** - * Custom cancel icon template. - * @param {Object} scope - cancelicon slot's params. - */ - cancelicon(scope: { - /** - * Style class of the icon. - */ - class: string; - }): VNode[]; /** * Custom on icon template. * @param {Object} scope - on icon slot's params. diff --git a/components/lib/rating/Rating.spec.js b/components/lib/rating/Rating.spec.js index 58b16df6d..fc0e45550 100644 --- a/components/lib/rating/Rating.spec.js +++ b/components/lib/rating/Rating.spec.js @@ -28,12 +28,6 @@ describe('Rating.vue', () => { expect(wrapper.emitted()['blur'][0]).toEqual([true]); }); - it('should not cancel', async () => { - await wrapper.setProps({ cancel: false }); - - expect(wrapper.find('.p-rating-cancel').exists()).toBe(false); - }); - it('When star is clicked, onOptionClick method should triggered', async () => { await wrapper.find('.p-rating-item').trigger('click'); diff --git a/components/lib/rating/Rating.vue b/components/lib/rating/Rating.vue index 1f9543726..291b51b08 100755 --- a/components/lib/rating/Rating.vue +++ b/components/lib/rating/Rating.vue @@ -1,25 +1,5 @@