claude-web/node_modules/@primevue/core/basecomponent/index.mjs.map

1 line
47 KiB
Plaintext
Raw Normal View History

2026-02-23 02:23:38 +00:00
{"version":3,"file":"index.mjs","sources":["../../src/basecomponent/style/BaseComponentStyle.js","../../src/basecomponent/BaseComponent.vue"],"sourcesContent":["import BaseStyle from '@primevue/core/base/style';\n\nexport default BaseStyle.extend({\n name: 'common'\n});\n","<script>\nimport { Theme, ThemeService } from '@primeuix/styled';\nimport { findSingle, isElement } from '@primeuix/utils/dom';\nimport { getKeyValue, isArray, isFunction, isNotEmpty, isString, resolve, toFlatCase } from '@primeuix/utils/object';\nimport Base from '@primevue/core/base';\nimport BaseStyle from '@primevue/core/base/style';\nimport { useAttrSelector } from '@primevue/core/useattrselector';\nimport { mergeProps } from 'vue';\nimport BaseComponentStyle from './style/BaseComponentStyle';\n\nexport default {\n name: 'BaseComponent',\n props: {\n pt: {\n type: Object,\n default: undefined\n },\n ptOptions: {\n type: Object,\n default: undefined\n },\n unstyled: {\n type: Boolean,\n default: undefined\n },\n dt: {\n type: Object,\n default: undefined\n }\n },\n inject: {\n $parentInstance: {\n default: undefined\n }\n },\n watch: {\n isUnstyled: {\n immediate: true,\n handler(newValue) {\n ThemeService.off('theme:change', this._loadCoreStyles);\n\n if (!newValue) {\n this._loadCoreStyles();\n this._themeChangeListener(this._loadCoreStyles); // update styles with theme settings\n }\n }\n },\n dt: {\n immediate: true,\n handler(newValue, oldValue) {\n ThemeService.off('theme:change', this._themeScopedListener);\n\n if (newValue) {\n this._loadScopedThemeStyles(newValue);\n this._themeScopedListener = () => this._loadScopedThemeStyles(newValue);\n this._themeChangeListener(this._themeScopedListener);\n } else {\n this._unloadScopedThemeStyles();\n }\n }\n }\n },\n scopedStyleEl: undefined,\n rootEl: undefined,\n uid: undefined,\n $attrSelector: undefined,\n beforeCreate() {\n const _usept = this.pt?.['_usept'];\n const originalValue = _usept ? this.pt?.originalValue?.[this.$.type.name] : undefined;\n const value = _usept ? this.pt?.value?.[this.$.type.name] : this.pt;\n\n (value || originalValue)?.hooks?.['onBeforeCreate']?.();\n\n const _useptInConfig = this.$primevueConfig?.pt?.['_usept'];\n const originalValueInConfig = _useptInConfig ? this.$primevue?.config?.pt?.originalValue : undefined;\n const valueInConfig = _useptInConfig ? this.$primevue?.config?.pt?.value : this.$primevue?.config?.pt;\n\n (valueInConfig || originalValueInConfig)?.[this.$.type.name]?.hooks?.['onBeforeCreate']?.();\n\n this.$attrSelector = useAttrSelector();\n this.uid = this.$attrs.id || this.$attrSelector.replace('pc', 'pv_id_');\n },\n created() {\n this._hook('onCreated');\n },\n beforeMount() {\n // @deprecated - remove in v5\n this.rootEl = findSingle(isElement(this.$el) ? this.$el : this.$el?.parentElement, `[${this.$attrSelector}]`);\n\n if (this.rootEl) {\n this.rootEl.$pc = { name: this.$.type.name, attrSelector: this.$attrSelector, ...this.$params };\n }\n\n this._loadStyles();\n this._hook('onBeforeMount');\n },\n mounted() {\n this._hook('onMounted');\n },\n beforeUpdate() {\n this._hook('onBeforeUpdate');\n },\n updated() {\n this._hook('onUpdated');\n },\n beforeUnmount() {\n this._hook('onBeforeUnmount');\n },\n unmounted() {\n this._removeThemeListeners();\n this._unloadScopedThemeStyles();\n this._hook('onUnmounted');\n