Skip to content

Commit

Permalink
Fixed #1093 - Anonymous Component in vue-devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed May 11, 2021
1 parent aac1e1c commit 367d4a5
Show file tree
Hide file tree
Showing 118 changed files with 284 additions and 181 deletions.
3 changes: 2 additions & 1 deletion src/components/accordion/Accordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import {UniqueComponentId} from 'primevue/utils';
export default {
name: 'Accordion',
emits: ['tab-close', 'tab-open', 'update:activeIndex'],
props: {
multiple: Boolean,
Expand Down Expand Up @@ -100,7 +101,7 @@ export default {
return ['p-accordion-toggle-icon pi', {'pi-chevron-right': !active, 'pi-chevron-down': active}];
},
isAccordionTab(child) {
return child.type.name === 'accordiontab'
return child.type.name === 'AccordionTab'
}
},
computed: {
Expand Down
4 changes: 2 additions & 2 deletions src/components/accordiontab/AccordionTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

<script>
export default {
name: 'accordiontab',
name: 'AccordionTab',
props: {
header: null,
disabled: Boolean
}
}
</script>
</script>
9 changes: 5 additions & 4 deletions src/components/autocomplete/AutoComplete.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<template>
<span ref="container" :class="containerClass" aria-haspopup="listbox" :aria-owns="listId" :aria-expanded="overlayVisible" :style="style">
<input ref="input" :class="inputFieldClass" :style="inputStyle" v-bind="$attrs" :value="inputValue" @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" @change="onChange"
<input ref="input" :class="inputFieldClass" :style="inputStyle" v-bind="$attrs" :value="inputValue" @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" @change="onChange"
type="text" autoComplete="off" v-if="!multiple" role="searchbox" aria-autocomplete="list" :aria-controls="listId">
<ul ref="multiContainer" :class="multiContainerClass" v-if="multiple" @click="onMultiContainerClick">
<li v-for="(item, i) of modelValue" :key="i" class="p-autocomplete-token">
<span class="p-autocomplete-token-label">{{getItemContent(item)}}</span>
<span class="p-autocomplete-token-icon pi pi-times-circle" @click="removeItem($event, i)"></span>
</li>
<li class="p-autocomplete-input-token">
<input ref="input" type="text" autoComplete="off" v-bind="$attrs" @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" @change="onChange"
<input ref="input" type="text" autoComplete="off" v-bind="$attrs" @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" @change="onChange"
role="searchbox" aria-autocomplete="list" :aria-controls="listId">
</li>
</ul>
Expand Down Expand Up @@ -49,6 +49,7 @@ import Button from 'primevue/button';
import Ripple from 'primevue/ripple';
export default {
name: 'AutoComplete',
inheritAttrs: false,
emits: ['update:modelValue', 'item-select', 'item-unselect', 'dropdown-click', 'clear', 'complete'],
props: {
Expand Down Expand Up @@ -180,7 +181,7 @@ export default {
else {
this.overlay.style.minWidth = DomHandler.getOuterWidth(target) + 'px';
DomHandler.absolutePosition(this.overlay, target);
}
}
},
bindOutsideClickListener() {
if (!this.outsideClickListener) {
Expand Down Expand Up @@ -475,7 +476,7 @@ export default {
if (this.forceSelection) {
let valid = false;
let inputValue = event.target.value.trim();
if (this.suggestions) {
for (let item of this.suggestions) {
let itemValue = this.field ? ObjectUtils.resolveFieldData(item, this.field) : item;
Expand Down
1 change: 1 addition & 0 deletions src/components/avatar/Avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<script>
export default {
name: 'Avatar',
props: {
label: {
type: String,
Expand Down
4 changes: 3 additions & 1 deletion src/components/avatargroup/AvatarGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
</template>

<script>
export default {}
export default {
name: 'AvatarGroup'
}
</script>

<style>
Expand Down
3 changes: 2 additions & 1 deletion src/components/badge/Badge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

<script>
export default {
name: 'Badge',
props: {
value: null,
severity: null,
Expand All @@ -27,4 +28,4 @@ export default {
}
}
}
</script>
</script>
1 change: 1 addition & 0 deletions src/components/blockui/BlockUI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import {DomHandler,ZIndexUtils} from 'primevue/utils';
export default {
name: 'BlockUI',
emits: ['block', 'unblock'],
props: {
blocked: {
Expand Down
3 changes: 2 additions & 1 deletion src/components/breadcrumb/Breadcrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import BreadcrumbItem from './BreadcrumbItem.vue';
export default {
name: 'Breadcrumb',
props: {
model: {
type: Array,
Expand Down Expand Up @@ -47,4 +48,4 @@ export default {
.p-breadcrumb .p-menuitem-link {
text-decoration: none;
}
</style>
</style>
3 changes: 2 additions & 1 deletion src/components/breadcrumb/BreadcrumbItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

<script>
export default {
name: 'BreadcrumbItem',
props: {
item: null
},
Expand Down Expand Up @@ -44,4 +45,4 @@ export default {
}
}
}
</script>
</script>
1 change: 1 addition & 0 deletions src/components/button/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import Ripple from 'primevue/ripple';
export default {
name: 'Button',
props: {
label: {
type: String
Expand Down
11 changes: 6 additions & 5 deletions src/components/calendar/Calendar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<span ref="container" :class="containerClass" :style="style">
<CalendarInputText ref="input" v-if="!inline" type="text" v-bind="$attrs" :value="inputFieldValue" @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" :readonly="!manualInput" inputmode="none"
<CalendarInputText ref="input" v-if="!inline" type="text" v-bind="$attrs" :value="inputFieldValue" @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" :readonly="!manualInput" inputmode="none"
:class="inputClass" :style="inputStyle" />
<CalendarButton v-if="showIcon" :icon="icon" tabindex="-1" class="p-datepicker-trigger" :disabled="$attrs.disabled" @click="onButtonClick" type="button" :aria-label="inputFieldValue"/>
<Teleport :to="appendTarget" :disabled="appendDisabled">
Expand Down Expand Up @@ -140,6 +140,7 @@ import Button from 'primevue/button';
import Ripple from 'primevue/ripple';
export default {
name: 'Calendar',
inheritAttrs: false,
emits: ['show', 'hide', 'month-change', 'year-change', 'date-select', 'update:modelValue', 'today-click', 'clear-click'],
props: {
Expand Down Expand Up @@ -548,7 +549,7 @@ export default {
this.unbindScrollListener();
this.unbindResizeListener();
this.$emit('hide');
if (this.mask) {
this.disableModality();
}
Expand Down Expand Up @@ -1155,7 +1156,7 @@ export default {
let newHour = this.currentHour + this.stepHour;
let newPM = this.pm;
if (this.hourFormat == '24')
newHour = (newHour >= 24) ? (newHour - 24) : newHour;
else if (this.hourFormat == '12') {
Expand All @@ -1165,7 +1166,7 @@ export default {
}
newHour = (newHour >= 13) ? (newHour - 12) : newHour;
}
if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) {
this.currentHour = newHour;
Expand Down Expand Up @@ -1961,7 +1962,7 @@ export default {
if (this.overlay) {
DomHandler.getFocusableElements(this.overlay).forEach(el => el.tabIndex = '-1');
}
if (this.overlayVisible) {
this.overlayVisible = false;
}
Expand Down
6 changes: 4 additions & 2 deletions src/components/card/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
</template>

<script>
export default {}
export default {
name: 'Card'
}
</script>

<style>
.p-card-header img {
width: 100%;
}
</style>
</style>
4 changes: 2 additions & 2 deletions src/components/carousel/Carousel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import {DomHandler} from 'primevue/utils';
import Ripple from 'primevue/ripple';
export default {
name: 'Carousel',
emits: ['update:page'],
props: {
value: null,
Expand Down Expand Up @@ -496,8 +497,7 @@ export default {
},
directives: {
'ripple': Ripple
},
name: "Carousel"
}
}
</script>

Expand Down
11 changes: 6 additions & 5 deletions src/components/cascadeselect/CascadeSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<transition name="p-connected-overlay" @enter="onOverlayEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave">
<div :ref="overlayRef" :class="panelStyleClass" v-if="overlayVisible" @click="onOverlayClick">
<div class="p-cascadeselect-items-wrapper">
<CascadeSelectSub :options="options" :selectionPath="selectionPath"
<CascadeSelectSub :options="options" :selectionPath="selectionPath"
:optionLabel="optionLabel" :optionValue="optionValue" :level="0" :templates="$slots"
:optionGroupLabel="optionGroupLabel" :optionGroupChildren="optionGroupChildren"
:optionGroupLabel="optionGroupLabel" :optionGroupChildren="optionGroupChildren"
@option-select="onOptionSelect" @optiongroup-select="onOptionGroupSelect" :dirty="dirty" :root="true" />
</div>
</div>
Expand All @@ -33,6 +33,7 @@ import OverlayEventBus from 'primevue/overlayeventbus';
import CascadeSelectSub from './CascadeSelectSub.vue';
export default {
name: 'CascadeSelect',
emits: ['update:modelValue','change','group-change', 'before-show','before-hide','hide','show'],
data() {
return {
Expand Down Expand Up @@ -73,7 +74,7 @@ export default {
this.scrollHandler.destroy();
this.scrollHandler = null;
}
if (this.overlay) {
ZIndexUtils.clear(this.overlay);
this.overlay = null;
Expand Down Expand Up @@ -121,7 +122,7 @@ export default {
}
}
this.selectionPath = path;
this.selectionPath = path;
},
findModelOptionInGroup(option, level) {
if (this.isOptionGroup(option, level)) {
Expand All @@ -137,7 +138,7 @@ export default {
else if ((ObjectUtils.equals(this.modelValue, this.getOptionValue(option), this.dataKey))) {
return [option];
}
return null;
},
show() {
Expand Down
6 changes: 3 additions & 3 deletions src/components/cascadeselect/CascadeSelectSub.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</template>
<span class="p-cascadeselect-group-icon pi pi-angle-right" v-if="isOptionGroup(option)"></span>
</div>
<cascadeselect-sub v-if="isOptionGroup(option) && isOptionActive(option)" class="p-cascadeselect-sublist" :selectionPath="selectionPath" :options="getOptionGroupChildren(option)"
<CascadeSelectSub v-if="isOptionGroup(option) && isOptionActive(option)" class="p-cascadeselect-sublist" :selectionPath="selectionPath" :options="getOptionGroupChildren(option)"
:optionLabel="optionLabel" :optionValue="optionValue" :level="level + 1" @option-select="onOptionSelect" @optiongroup-select="onOptionGroupSelect"
:optionGroupLabel="optionGroupLabel" :optionGroupChildren="optionGroupChildren" :parentActive="isOptionActive(option)" :dirty="dirty" :templates="templates"/>
</li>
Expand All @@ -23,8 +23,8 @@ import {DomHandler} from 'primevue/utils';
import Ripple from 'primevue/ripple';
export default {
name: 'CascadeSelectSub',
emits: ['option-select','optiongroup-select'],
name: 'cascadeselect-sub',
props: {
selectionPath: Array,
level: Number,
Expand Down Expand Up @@ -179,4 +179,4 @@ export default {
'ripple': Ripple
}
}
</script>
</script>
1 change: 1 addition & 0 deletions src/components/chart/Chart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

<script>
export default {
name: 'Chart',
emits: ['select'],
props: {
type: String,
Expand Down
3 changes: 2 additions & 1 deletion src/components/checkbox/Checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import {ObjectUtils} from 'primevue/utils';
export default {
name: 'Checkbox',
inheritAttrs: false,
emits: ['click', 'update:modelValue', 'change'],
props: {
Expand Down Expand Up @@ -64,4 +65,4 @@ export default {
}
}
}
</script>
</script>
5 changes: 3 additions & 2 deletions src/components/chip/Chip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
<img :src="image" v-if="image">
<span :class="iconClass" v-else-if="icon"></span>
<div class="p-chip-text" v-if="label">{{label}}</div>
<span v-if="removable" tabindex="0" :class="removeIconClass"
<span v-if="removable" tabindex="0" :class="removeIconClass"
@click="close" @keydown.enter="close"></span>
</slot>
</div>
</template>

<script>
export default {
name: 'Chip',
emits: ['remove'],
props: {
label: {
Expand Down Expand Up @@ -71,7 +72,7 @@ export default {
.p-chip-text {
line-height: 1.5;
}
.p-chip-icon.pi {
line-height: 1.5;
}
Expand Down
1 change: 1 addition & 0 deletions src/components/chips/Chips.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

<script>
export default {
name: 'Chips',
inheritAttrs: false,
emits: ['update:modelValue', 'add', 'remove'],
props: {
Expand Down
3 changes: 2 additions & 1 deletion src/components/colorpicker/ColorPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {ConnectedOverlayScrollHandler,DomHandler,ZIndexUtils} from 'primevue/uti
import OverlayEventBus from 'primevue/overlayeventbus';
export default {
name: 'ColorPicker',
emits: ['update:modelValue'],
props: {
modelValue: {
Expand Down Expand Up @@ -100,7 +101,7 @@ export default {
this.scrollHandler.destroy();
this.scrollHandler = null;
}
if (this.picker && this.autoZIndex) {
ZIndexUtils.clear(this.picker);
}
Expand Down
Loading

0 comments on commit 367d4a5

Please sign in to comment.