Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/components/NcActions/NcActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -921,14 +921,13 @@
import { useElementBounding, useWindowSize } from '@vueuse/core'
import { Fragment, computed, h, mergeProps, ref, toRef, warn } from 'vue'
import { useTrapStackControl } from '../../composables/useTrapStackControl.ts'
import { createElementId } from '../../utils/createElementId.ts'
import { isSlotPopulated } from '../../utils/isSlotPopulated.ts'
import { t } from '../../l10n.js'

import IconDotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'
import NcButton from '../NcButton/index.ts'
import NcPopover from '../NcPopover/index.js'
import { createElementId } from '../../utils/createElementId.ts'
import isSlotPopulated from '../../utils/isSlotPopulated.ts'

import IconDotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'

const focusableSelector = '.focusable'

Expand Down Expand Up @@ -1396,7 +1395,7 @@
},

/**
* @return {NodeListOf<HTMLElement>}

Check warning on line 1398 in src/components/NcActions/NcActions.vue

View workflow job for this annotation

GitHub Actions / NPM lint

The type 'NodeListOf' is undefined
*/
getFocusableMenuItemElements() {
return this.$refs.menu.querySelectorAll(focusableSelector)
Expand Down
4 changes: 2 additions & 2 deletions src/components/NcAppSidebar/NcAppSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,10 @@
import { vOnClickOutside as ClickOutside } from '@vueuse/components'
import { createFocusTrap } from 'focus-trap'
import { useIsSmallMobile } from '../../composables/useIsMobile/index.js'
import { getTrapStack } from '../../utils/focusTrap.ts'
import { createElementId } from '../../utils/createElementId.ts'
import { getTrapStack } from '../../utils/focusTrap.ts'
import { isSlotPopulated } from '../../utils/isSlotPopulated.ts'
import { t } from '../../l10n.js'
import isSlotPopulated from '../../utils/isSlotPopulated.ts'

import IconArrowRight from 'vue-material-design-icons/ArrowRight.vue'
import IconClose from 'vue-material-design-icons/Close.vue'
Expand Down Expand Up @@ -1099,7 +1099,7 @@
* @type {Event}
*/
// eslint-disable-next-line vue/require-explicit-emits
this.$emit('figure-click', e)

Check warning on line 1102 in src/components/NcAppSidebar/NcAppSidebar.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Custom event name 'figure-click' must be camelCase
},

/**
Expand Down Expand Up @@ -1190,7 +1190,7 @@
*
* @type {Event}
*/
this.$emit('submit-name', event)

Check warning on line 1193 in src/components/NcAppSidebar/NcAppSidebar.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Custom event name 'submit-name' must be camelCase
},
onDismissEditing() {
// Disable editing
Expand All @@ -1200,7 +1200,7 @@
*
* @type {Event}
*/
this.$emit('dismiss-editing')

Check warning on line 1203 in src/components/NcAppSidebar/NcAppSidebar.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Custom event name 'dismiss-editing' must be camelCase
},
onUpdateActive(activeTab) {
/**
Expand Down
15 changes: 7 additions & 8 deletions src/components/NcBreadcrumbs/NcBreadcrumbs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,18 @@ export default {
</docs>

<script>
import { subscribe, unsubscribe } from '@nextcloud/event-bus'
import { cloneVNode, h, Fragment } from 'vue'
import debounce from 'debounce'

import { isSlotPopulated } from '../../utils/isSlotPopulated.ts'

import IconFolder from 'vue-material-design-icons/Folder.vue'
import NcActions from '../NcActions/index.js'
import NcActionButton from '../NcActionButton/index.js'
import NcActionRouter from '../NcActionRouter/index.js'
import NcActionLink from '../NcActionLink/index.js'
import NcBreadcrumb from '../NcBreadcrumb/index.js'
import isSlotPopulated from '../../utils/isSlotPopulated.ts'

import { subscribe, unsubscribe } from '@nextcloud/event-bus'

import IconFolder from 'vue-material-design-icons/Folder.vue'

import debounce from 'debounce'
import { cloneVNode, h, Fragment } from 'vue'

const crumbClass = 'vue-crumb'

Expand Down
4 changes: 2 additions & 2 deletions src/components/NcButton/NcButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ td.row-size {
import type { PropType } from 'vue'

import { defineComponent, h, resolveComponent } from 'vue'
import { ButtonAlignment, ButtonNativeType, ButtonType } from './types'
import isSlotPopulated from '../../utils/isSlotPopulated'
import { ButtonAlignment, ButtonNativeType, ButtonType } from './types.ts'
import { isSlotPopulated } from '../../utils/isSlotPopulated.ts'

export default defineComponent({
name: 'NcButton',
Expand Down
4 changes: 1 addition & 3 deletions src/utils/isSlotPopulated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Fragment, Comment, Text } from 'vue'
*
* @param vnodes The array of vnodes to check
*/
const isSlotPopulated = function(vnodes?: VNode[] | VNodeNormalizedChildren) {
export function isSlotPopulated(vnodes?: VNode[] | VNodeNormalizedChildren) {
return Array.isArray(vnodes) && vnodes.some(node => {
if (node === null) return false
if (typeof node === 'object') {
Expand All @@ -23,5 +23,3 @@ const isSlotPopulated = function(vnodes?: VNode[] | VNodeNormalizedChildren) {
return true
})
}

export default isSlotPopulated
2 changes: 1 addition & 1 deletion tests/unit/utils/isSlotPopulated.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { mount } from '@vue/test-utils'
import { describe, expect, it } from 'vitest'
import { defineComponent } from 'vue'

import isSlotPopulated from '../../../src/utils/isSlotPopulated'
import { isSlotPopulated } from '../../../src/utils/isSlotPopulated.ts'

const IsSlotPopulatedTest = defineComponent({
name: 'IsSlotPopulatedTest',
Expand Down
Loading