diff --git a/packages/documentation/pages/usage/components/form-fields.vue b/packages/documentation/pages/usage/components/form-fields.vue index bf57782fa0..547ded1fe9 100644 --- a/packages/documentation/pages/usage/components/form-fields.vue +++ b/packages/documentation/pages/usage/components/form-fields.vue @@ -745,9 +745,13 @@ import { TimeConversion } from '@metatypes/units' import cloneDeep from 'lodash/cloneDeep' import { computed, defineComponent, ref } from 'vue' -import { useRouter } from '../../..//hooks/use-router' -import { ISO8601, ISO8601_SECONDS } from '../../../../kotti-ui/source/constants' -import { getLast, today } from '../../../utilities/date' +import { useRouter } from '../../../hooks/use-router' +import { + getLast, + today, + ISO8601, + ISO8601_SECONDS, +} from '../../../utilities/date' import { createActions, createRemoteUpload, diff --git a/packages/documentation/utilities/date.ts b/packages/documentation/utilities/date.ts index 3b5c889c9d..a1287f09f0 100644 --- a/packages/documentation/utilities/date.ts +++ b/packages/documentation/utilities/date.ts @@ -1,8 +1,9 @@ -import x from '@3yourmind/kotti-ui' -import { ISO8601 } from '@3yourmind/kotti-ui/source/constants' import dayjs from 'dayjs' import type { ManipulateType } from 'dayjs' +export const ISO8601 = 'YYYY-MM-DD' as const +export const ISO8601_SECONDS = 'YYYY-MM-DD HH:mm:ss' as const + /** * Returns formatted today's date. Default template is ISO8601. * @param templateFormat dayjs compatible datetime format string @@ -20,4 +21,4 @@ export const today = (templateFormat: string = ISO8601): string => export const getLast = ( unit: ManipulateType, templateFormat: string = ISO8601, -) => dayjs().subtract(1, unit).format(templateFormat) +): string => dayjs().subtract(1, unit).format(templateFormat) diff --git a/packages/kotti-ui/source/kotti-field-select/hooks/use-select-tippy.ts b/packages/kotti-ui/source/kotti-field-select/hooks/use-select-tippy.ts index c2645c45e4..36baae7193 100644 --- a/packages/kotti-ui/source/kotti-field-select/hooks/use-select-tippy.ts +++ b/packages/kotti-ui/source/kotti-field-select/hooks/use-select-tippy.ts @@ -61,7 +61,7 @@ export const useSelectTippy = ( }, theme: 'light-border', trigger: 'click focusin', - triggerTarget: triggerTargets ? triggerTargets.value : undefined, + triggerTarget: triggerTargets?.value ?? undefined, })), ) diff --git a/packages/kotti-ui/source/kotti-field/components/FieldHelpText.vue b/packages/kotti-ui/source/kotti-field/components/FieldHelpText.vue index 91ba04ecb5..7c4ccfeaff 100644 --- a/packages/kotti-ui/source/kotti-field/components/FieldHelpText.vue +++ b/packages/kotti-ui/source/kotti-field/components/FieldHelpText.vue @@ -44,14 +44,14 @@ export default defineComponent({ 'i', { class: 'yoco', - ref: 'helpTextTriggerRef', + ref: helpTextTriggerRef, }, [Yoco.Icon.CIRCLE_QUESTION], ), h( 'div', { - ref: 'helpTextContentRef', + ref: helpTextContentRef, }, props.helpTextSlot.length > 0 ? props.helpTextSlot