From 70cb416c0f27c3e9fe31abe23722134926a4e5ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Tue, 30 May 2023 15:28:04 +0300 Subject: [PATCH] Update #3965 - Overlay - misc components --- components/lib/avatar/BaseAvatar.vue | 14 ++++++-------- components/lib/badge/BaseBadge.vue | 14 ++++++-------- components/lib/blockui/BaseBlockUI.vue | 14 ++++++-------- components/lib/chip/BaseChip.vue | 14 ++++++-------- .../lib/confirmdialog/BaseConfirmDialog.vue | 5 +++++ components/lib/confirmpopup/BaseConfirmPopup.vue | 14 ++++++-------- components/lib/dialog/BaseDialog.vue | 14 ++++++-------- components/lib/divider/BaseDivider.vue | 14 ++++++-------- components/lib/inplace/BaseInplace.vue | 14 ++++++-------- components/lib/overlaypanel/BaseOverlayPanel.vue | 14 ++++++-------- components/lib/progressbar/BaseProgressBar.vue | 14 ++++++-------- .../lib/progressspinner/BaseProgressSpinner.vue | 14 ++++++-------- components/lib/radiobutton/BaseRadioButton.vue | 14 ++++++-------- components/lib/scrollpanel/BaseScrollPanel.vue | 14 ++++++-------- components/lib/scrolltop/BaseScrollTop.vue | 14 ++++++-------- components/lib/selectbutton/BaseSelectButton.vue | 5 +++++ components/lib/sidebar/BaseSidebar.vue | 14 ++++++-------- components/lib/skeleton/BaseSkeleton.vue | 14 ++++++-------- components/lib/slider/BaseSlider.vue | 14 ++++++-------- components/lib/tag/BaseTag.vue | 14 ++++++-------- components/lib/terminal/BaseTerminal.vue | 14 ++++++-------- components/lib/textarea/BaseTextarea.vue | 16 +++++++--------- components/lib/toast/BaseToast.vue | 14 ++++++-------- components/lib/toast/ToastMessage.vue | 4 ++-- components/lib/togglebutton/BaseToggleButton.vue | 5 +++++ .../tristatecheckbox/BaseTriStateCheckbox.vue | 5 +++++ 26 files changed, 149 insertions(+), 171 deletions(-) diff --git a/components/lib/avatar/BaseAvatar.vue b/components/lib/avatar/BaseAvatar.vue index 17b5ca12e..1851bf6bb 100644 --- a/components/lib/avatar/BaseAvatar.vue +++ b/components/lib/avatar/BaseAvatar.vue @@ -84,15 +84,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/badge/BaseBadge.vue b/components/lib/badge/BaseBadge.vue index fdfcc5bd4..07cc4ce6b 100644 --- a/components/lib/badge/BaseBadge.vue +++ b/components/lib/badge/BaseBadge.vue @@ -74,15 +74,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/blockui/BaseBlockUI.vue b/components/lib/blockui/BaseBlockUI.vue index f4aba47a3..a4d6e6b64 100644 --- a/components/lib/blockui/BaseBlockUI.vue +++ b/components/lib/blockui/BaseBlockUI.vue @@ -52,15 +52,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/chip/BaseChip.vue b/components/lib/chip/BaseChip.vue index 5099c634f..453a4d216 100644 --- a/components/lib/chip/BaseChip.vue +++ b/components/lib/chip/BaseChip.vue @@ -66,15 +66,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/confirmdialog/BaseConfirmDialog.vue b/components/lib/confirmdialog/BaseConfirmDialog.vue index 0a4915133..72524ec9e 100644 --- a/components/lib/confirmdialog/BaseConfirmDialog.vue +++ b/components/lib/confirmdialog/BaseConfirmDialog.vue @@ -27,6 +27,11 @@ export default { }, css: { classes + }, + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/confirmpopup/BaseConfirmPopup.vue b/components/lib/confirmpopup/BaseConfirmPopup.vue index c540387b4..191a418d4 100644 --- a/components/lib/confirmpopup/BaseConfirmPopup.vue +++ b/components/lib/confirmpopup/BaseConfirmPopup.vue @@ -101,15 +101,13 @@ export default { group: String }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/dialog/BaseDialog.vue b/components/lib/dialog/BaseDialog.vue index 688d3b80c..df32357c2 100644 --- a/components/lib/dialog/BaseDialog.vue +++ b/components/lib/dialog/BaseDialog.vue @@ -316,15 +316,13 @@ export default { _instance: null }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/divider/BaseDivider.vue b/components/lib/divider/BaseDivider.vue index 7d7934a4d..9532e602b 100644 --- a/components/lib/divider/BaseDivider.vue +++ b/components/lib/divider/BaseDivider.vue @@ -124,15 +124,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/inplace/BaseInplace.vue b/components/lib/inplace/BaseInplace.vue index e6bef028b..e619784cf 100644 --- a/components/lib/inplace/BaseInplace.vue +++ b/components/lib/inplace/BaseInplace.vue @@ -60,15 +60,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/overlaypanel/BaseOverlayPanel.vue b/components/lib/overlaypanel/BaseOverlayPanel.vue index d754c9341..28fb459aa 100644 --- a/components/lib/overlaypanel/BaseOverlayPanel.vue +++ b/components/lib/overlaypanel/BaseOverlayPanel.vue @@ -126,15 +126,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/progressbar/BaseProgressBar.vue b/components/lib/progressbar/BaseProgressBar.vue index 666f500b9..599ee33ea 100644 --- a/components/lib/progressbar/BaseProgressBar.vue +++ b/components/lib/progressbar/BaseProgressBar.vue @@ -145,15 +145,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/progressspinner/BaseProgressSpinner.vue b/components/lib/progressspinner/BaseProgressSpinner.vue index def707578..6760f8300 100644 --- a/components/lib/progressspinner/BaseProgressSpinner.vue +++ b/components/lib/progressspinner/BaseProgressSpinner.vue @@ -56,15 +56,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/radiobutton/BaseRadioButton.vue b/components/lib/radiobutton/BaseRadioButton.vue index e944f4112..ee5fa366b 100644 --- a/components/lib/radiobutton/BaseRadioButton.vue +++ b/components/lib/radiobutton/BaseRadioButton.vue @@ -98,15 +98,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/scrollpanel/BaseScrollPanel.vue b/components/lib/scrollpanel/BaseScrollPanel.vue index 683b86f66..58bfcf88c 100644 --- a/components/lib/scrollpanel/BaseScrollPanel.vue +++ b/components/lib/scrollpanel/BaseScrollPanel.vue @@ -80,15 +80,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/scrolltop/BaseScrollTop.vue b/components/lib/scrolltop/BaseScrollTop.vue index 2793893de..a703d78e4 100644 --- a/components/lib/scrolltop/BaseScrollTop.vue +++ b/components/lib/scrolltop/BaseScrollTop.vue @@ -66,15 +66,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/selectbutton/BaseSelectButton.vue b/components/lib/selectbutton/BaseSelectButton.vue index 97b5d014e..996203542 100644 --- a/components/lib/selectbutton/BaseSelectButton.vue +++ b/components/lib/selectbutton/BaseSelectButton.vue @@ -36,6 +36,11 @@ export default { }, css: { classes + }, + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/sidebar/BaseSidebar.vue b/components/lib/sidebar/BaseSidebar.vue index f4955e419..93e8b055e 100644 --- a/components/lib/sidebar/BaseSidebar.vue +++ b/components/lib/sidebar/BaseSidebar.vue @@ -247,15 +247,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/skeleton/BaseSkeleton.vue b/components/lib/skeleton/BaseSkeleton.vue index c957582eb..6fd70698e 100644 --- a/components/lib/skeleton/BaseSkeleton.vue +++ b/components/lib/skeleton/BaseSkeleton.vue @@ -84,15 +84,13 @@ export default { }, css: { classes, - inlineStyles + inlineStyles, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/slider/BaseSlider.vue b/components/lib/slider/BaseSlider.vue index 19cd26b85..7eda174ff 100644 --- a/components/lib/slider/BaseSlider.vue +++ b/components/lib/slider/BaseSlider.vue @@ -106,15 +106,13 @@ export default { }, css: { classes, - inlineStyles + inlineStyles, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/tag/BaseTag.vue b/components/lib/tag/BaseTag.vue index 48701cc7e..1c3470a3c 100644 --- a/components/lib/tag/BaseTag.vue +++ b/components/lib/tag/BaseTag.vue @@ -47,15 +47,13 @@ export default { icon: String }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/terminal/BaseTerminal.vue b/components/lib/terminal/BaseTerminal.vue index 46e061190..7b1af88ae 100644 --- a/components/lib/terminal/BaseTerminal.vue +++ b/components/lib/terminal/BaseTerminal.vue @@ -53,15 +53,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/textarea/BaseTextarea.vue b/components/lib/textarea/BaseTextarea.vue index 117e41ed2..4f4914529 100644 --- a/components/lib/textarea/BaseTextarea.vue +++ b/components/lib/textarea/BaseTextarea.vue @@ -23,7 +23,7 @@ const classes = { ] }; -const { load: loadStyle, unload: unloadStyle } = useStyle(styles, { id: 'primevue_textarea_style', manual: true }); +const { load: loadStyle } = useStyle(styles, { id: 'primevue_textarea_style', manual: true }); export default { name: 'BaseTextarea', @@ -33,15 +33,13 @@ export default { autoResize: Boolean }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/toast/BaseToast.vue b/components/lib/toast/BaseToast.vue index ea4beb705..7dbe856f1 100644 --- a/components/lib/toast/BaseToast.vue +++ b/components/lib/toast/BaseToast.vue @@ -185,15 +185,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/toast/ToastMessage.vue b/components/lib/toast/ToastMessage.vue index cbabd9978..3c3131117 100755 --- a/components/lib/toast/ToastMessage.vue +++ b/components/lib/toast/ToastMessage.vue @@ -25,11 +25,11 @@ import InfoCircleIcon from 'primevue/icons/infocircle'; import TimesIcon from 'primevue/icons/times'; import TimesCircleIcon from 'primevue/icons/timescircle'; import Ripple from 'primevue/ripple'; -import BaseToast from './BaseToast.vue'; +import BaseComponent from 'primevue/basecomponent'; export default { name: 'ToastMessage', - extends: BaseToast, + extends: BaseComponent, emits: ['close'], closeTimeout: null, props: { diff --git a/components/lib/togglebutton/BaseToggleButton.vue b/components/lib/togglebutton/BaseToggleButton.vue index 0d969f1d7..3f1934496 100644 --- a/components/lib/togglebutton/BaseToggleButton.vue +++ b/components/lib/togglebutton/BaseToggleButton.vue @@ -77,6 +77,11 @@ export default { }, css: { classes + }, + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/tristatecheckbox/BaseTriStateCheckbox.vue b/components/lib/tristatecheckbox/BaseTriStateCheckbox.vue index 061c88828..90d45be17 100644 --- a/components/lib/tristatecheckbox/BaseTriStateCheckbox.vue +++ b/components/lib/tristatecheckbox/BaseTriStateCheckbox.vue @@ -57,6 +57,11 @@ export default { }, css: { classes + }, + provide() { + return { + $parentInstance: this + }; } };