Merge pull request #5128 from primefaces/issue-5046

Icon id hydration
pull/5134/head
Tuğçe Küçükoğlu 2024-01-23 16:05:00 +03:00 committed by GitHub
commit f0880cda5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
28 changed files with 33 additions and 190 deletions

View File

@ -1,7 +1,7 @@
<script> <script>
import BaseComponent from 'primevue/basecomponent'; import BaseComponent from 'primevue/basecomponent';
import BaseIconStyle from 'primevue/baseicon/style'; import BaseIconStyle from 'primevue/baseicon/style';
import { ObjectUtils } from 'primevue/utils'; import { ObjectUtils, UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'BaseIcon', name: 'BaseIcon',
@ -17,6 +17,11 @@ export default {
} }
}, },
style: BaseIconStyle, style: BaseIconStyle,
computed: {
pathId() {
return UniqueComponentId('pv_icon_clip_pv_id_');
}
},
methods: { methods: {
pti() { pti() {
const isLabelEmpty = ObjectUtils.isEmpty(this.label); const isLabelEmpty = ObjectUtils.isEmpty(this.label);

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'ArrowDownIcon', name: 'ArrowDownIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'ArrowUpIcon', name: 'ArrowUpIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -16,15 +16,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'BanIcon', name: 'BanIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -24,15 +24,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'ExclamationTriangleIcon', name: 'ExclamationTriangleIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'EyeSlashIcon', name: 'EyeSlashIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -16,15 +16,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'FilterIcon', name: 'FilterIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'FilterSlashIcon', name: 'FilterSlashIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'InfoCircleIcon', name: 'InfoCircleIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -16,15 +16,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'PencilIcon', name: 'PencilIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -16,15 +16,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'PlusIcon', name: 'PlusIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'RefreshIcon', name: 'RefreshIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'SearchIcon', name: 'SearchIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'SearchMinusIcon', name: 'SearchMinusIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'SearchPlusIcon', name: 'SearchPlusIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -22,15 +22,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'SortAltIcon', name: 'SortAltIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -16,15 +16,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'SortAmountDownIcon', name: 'SortAmountDownIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -16,15 +16,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'SortAmountUpAltIcon', name: 'SortAmountUpAltIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -16,15 +16,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'SpinnerIcon', name: 'SpinnerIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -16,15 +16,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'StarIcon', name: 'StarIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -16,15 +16,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'StarFillIcon', name: 'StarFillIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'ThLargeIcon', name: 'ThLargeIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

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

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'TrashIcon', name: 'TrashIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'UndoIcon', name: 'UndoIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'UploadIcon', name: 'UploadIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'WindowMaximizeIcon', name: 'WindowMaximizeIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>

View File

@ -18,15 +18,9 @@
<script> <script>
import BaseIcon from 'primevue/baseicon'; import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default { export default {
name: 'WindowMinimizeIcon', name: 'WindowMinimizeIcon',
extends: BaseIcon, extends: BaseIcon
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
}; };
</script> </script>