Skip to content

Commit

Permalink
Merge pull request #5128 from primefaces/issue-5046
Browse files Browse the repository at this point in the history
Icon id hydration
  • Loading branch information
tugcekucukoglu authored Jan 23, 2024
2 parents 537671f + 6ccebe1 commit f0880cd
Show file tree
Hide file tree
Showing 28 changed files with 33 additions and 190 deletions.
7 changes: 6 additions & 1 deletion components/lib/baseicon/BaseIcon.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script>
import BaseComponent from 'primevue/basecomponent';
import BaseIconStyle from 'primevue/baseicon/style';
import { ObjectUtils } from 'primevue/utils';
import { ObjectUtils, UniqueComponentId } from 'primevue/utils';
export default {
name: 'BaseIcon',
Expand All @@ -17,6 +17,11 @@ export default {
}
},
style: BaseIconStyle,
computed: {
pathId() {
return UniqueComponentId('pv_icon_clip_pv_id_');
}
},
methods: {

Check failure on line 25 in components/lib/baseicon/BaseIcon.vue

View workflow job for this annotation

GitHub Actions / build (16.x)

The "methods" property should be above the "computed" property on line 20

Check failure on line 25 in components/lib/baseicon/BaseIcon.vue

View workflow job for this annotation

GitHub Actions / build (18.x)

The "methods" property should be above the "computed" property on line 20
pti() {
const isLabelEmpty = ObjectUtils.isEmpty(this.label);
Expand Down
8 changes: 1 addition & 7 deletions components/lib/icons/arrowdown/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'ArrowDownIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/arrowup/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'ArrowUpIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/ban/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'BanIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/exclamationtriangle/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'ExclamationTriangleIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/eyeslash/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'EyeSlashIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/filter/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'FilterIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/filterslash/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'FilterSlashIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/infocircle/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'InfoCircleIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/pencil/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'PencilIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/plus/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'PlusIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/refresh/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'RefreshIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/search/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'SearchIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/searchminus/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'SearchMinusIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/searchplus/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'SearchPlusIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/sortalt/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'SortAltIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/sortamountdown/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'SortAmountDownIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/sortamountupalt/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'SortAmountUpAltIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/spinner/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'SpinnerIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/star/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'StarIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/starfill/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'StarFillIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/thlarge/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'ThLargeIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
8 changes: 1 addition & 7 deletions components/lib/icons/timescircle/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@

<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'TimesCircleIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>
Loading

0 comments on commit f0880cd

Please sign in to comment.