1
0

chore: move frontend files

This commit is contained in:
kolaente
2024-02-07 14:56:56 +01:00
parent 447641c222
commit fc4676315d
606 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,7 @@
/**
* Returns a date as a string value in ISO format.
* same format as `new Date().toISOString()`
*/
export type DateISO<T extends string = string> = T
new Date().toISOString()

View File

@ -0,0 +1,4 @@
/**
* Date in Format 2022-12-10
*/
export type DateKebab = `${string}-${string}-${string}`

View File

@ -0,0 +1,9 @@
export interface IFilter {
sortBy: ('done' | 'id')[]
orderBy: ('asc' | 'desc')[]
filterBy: 'done'[]
filterValue: 'false'[]
filterComparator: 'equals'[]
filterConcat: 'and'
filterIncludeNulls: boolean
}

View File

@ -0,0 +1,7 @@
export interface IProvider {
name: string;
key: string;
authUrl: string;
clientId: string;
logoutUrl: string;
}

View File

@ -0,0 +1,16 @@
export enum RELATION_KIND {
'SUBTASK' = 'subtask',
'PARENTTASK' = 'parenttask',
'RELATED' = 'related',
'DUPLICATES' = 'duplicates',
'BLOCKING' = 'blocking',
'BLOCKED' = 'blocked',
'PROCEDES' = 'precedes',
'FOLLOWS' = 'follows',
'COPIEDFROM' = 'copiedfrom',
'COPIEDTO' = 'copiedto',
}
export type IRelationKind = typeof RELATION_KIND[keyof typeof RELATION_KIND]
export const RELATION_KINDS = [...Object.values(RELATION_KIND)] as const

View File

@ -0,0 +1,8 @@
export const REMINDER_PERIOD_RELATIVE_TO_TYPES = {
DUEDATE: 'due_date',
STARTDATE: 'start_date',
ENDDATE: 'end_date',
} as const
export type IReminderPeriodRelativeTo = typeof REMINDER_PERIOD_RELATIVE_TO_TYPES[keyof typeof REMINDER_PERIOD_RELATIVE_TO_TYPES]

View File

@ -0,0 +1,16 @@
export const REPEAT_TYPES = {
Seconds: 'seconds',
Minutes: 'minutes',
Hours: 'hours',
Days: 'days',
Weeks: 'weeks',
Months: 'months',
Years: 'years',
} as const
export type IRepeatType = typeof REPEAT_TYPES[keyof typeof REPEAT_TYPES]
export interface IRepeatAfter {
type: IRepeatType,
amount: number,
}

View File

@ -0,0 +1,7 @@
export const TASK_REPEAT_MODES = {
'REPEAT_MODE_DEFAULT': 0,
'REPEAT_MODE_MONTH': 1,
'REPEAT_MODE_FROM_CURRENT_DATE': 2,
} as const
export type IRepeatMode = typeof TASK_REPEAT_MODES[keyof typeof TASK_REPEAT_MODES]

View File

@ -0,0 +1 @@
export type PartialWithId<T extends { id: unknown }> = Pick<T, 'id'> & Omit<Partial<T>, 'id'>

View File

@ -0,0 +1,8 @@
export const PROJECT_VIEWS = {
LIST: 'list',
GANTT: 'gantt',
TABLE: 'table',
KANBAN: 'kanban',
} as const
export type ProjectView = typeof PROJECT_VIEWS[keyof typeof PROJECT_VIEWS]

12
frontend/src/types/cypress.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
import { mount } from 'cypress/vue'
type MountParams = Parameters<typeof mount>;
type OptionsParam = MountParams[1];
declare global {
namespace Cypress {
interface Chainable {
mount: typeof mount;
}
}
}

View File

@ -0,0 +1,21 @@
// import FontAwesomeIcon from '@/components/misc/Icon'
import type { FontAwesomeIcon as FontAwesomeIconFixedTypes } from './vue-fontawesome'
import type XButton from '@/components/input/button.vue'
import type Modal from '@/components/misc/modal.vue'
import type Card from '@/components/misc/card.vue'
// Here we define globally imported components
// See:
// https://github.com/johnsoncodehk/volar/blob/2ca8fd3434423c7bea1c8e08132df3b9ce84eea7/extensions/vscode-vue-language-features/README.md#usage
// Under the hidden collapsible "Define Global Components"
declare module '@vue/runtime-core' {
export interface GlobalComponents {
Icon: FontAwesomeIconFixedTypes
XButton: typeof XButton,
Modal: typeof Modal,
Card: typeof Card,
}
}
export {}

13
frontend/src/types/shims-tsx.d.ts vendored Normal file
View File

@ -0,0 +1,13 @@
import Vue, { VNode } from 'vue'
declare global {
namespace JSX {
// tslint:disable no-empty-interface
interface Element extends VNode {}
// tslint:disable no-empty-interface
interface ElementClass extends Vue {}
interface IntrinsicElements {
[elem: string]: any
}
}
}

View File

@ -0,0 +1,40 @@
// copied and slightly modified from unmerged pull request that corrects types
// https://github.com/FortAwesome/vue-fontawesome/pull/355
import type { FaSymbol, FlipProp, IconLookup, IconProp, PullProp, SizeProp, Transform } from '@fortawesome/fontawesome-svg-core'
import type { DefineComponent } from 'vue'
interface FontAwesomeIconProps {
border?: boolean
fixedWidth?: boolean
flip?: FlipProp
icon: IconProp
mask?: IconLookup
listItem?: boolean
pull?: PullProp
pulse?: boolean
rotation?: 90 | 180 | 270 | '90' | '180' | '270'
swapOpacity?: boolean
size?: SizeProp
spin?: boolean
transform?: Transform
symbol?: FaSymbol
title?: string | string[]
inverse?: boolean
}
interface FontAwesomeLayersProps {
fixedWidth?: boolean
}
interface FontAwesomeLayersTextProps {
value: string | number
transform?: object | string
counter?: boolean
position?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'
}
export type FontAwesomeIcon = DefineComponent<FontAwesomeIconProps>
export type FontAwesomeLayers = DefineComponent<FontAwesomeLayersProps>
export type FontAwesomeLayersText = DefineComponent<FontAwesomeLayersTextProps>