chore: move frontend files
This commit is contained in:
7
frontend/src/types/DateISO.ts
Normal file
7
frontend/src/types/DateISO.ts
Normal 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()
|
4
frontend/src/types/DateKebab.ts
Normal file
4
frontend/src/types/DateKebab.ts
Normal file
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Date in Format 2022-12-10
|
||||
*/
|
||||
export type DateKebab = `${string}-${string}-${string}`
|
9
frontend/src/types/IFilter.ts
Normal file
9
frontend/src/types/IFilter.ts
Normal file
@ -0,0 +1,9 @@
|
||||
export interface IFilter {
|
||||
sortBy: ('done' | 'id')[]
|
||||
orderBy: ('asc' | 'desc')[]
|
||||
filterBy: 'done'[]
|
||||
filterValue: 'false'[]
|
||||
filterComparator: 'equals'[]
|
||||
filterConcat: 'and'
|
||||
filterIncludeNulls: boolean
|
||||
}
|
7
frontend/src/types/IProvider.ts
Normal file
7
frontend/src/types/IProvider.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export interface IProvider {
|
||||
name: string;
|
||||
key: string;
|
||||
authUrl: string;
|
||||
clientId: string;
|
||||
logoutUrl: string;
|
||||
}
|
16
frontend/src/types/IRelationKind.ts
Normal file
16
frontend/src/types/IRelationKind.ts
Normal 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
|
8
frontend/src/types/IReminderPeriodRelativeTo.ts
Normal file
8
frontend/src/types/IReminderPeriodRelativeTo.ts
Normal 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]
|
||||
|
16
frontend/src/types/IRepeatAfter.ts
Normal file
16
frontend/src/types/IRepeatAfter.ts
Normal 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,
|
||||
}
|
7
frontend/src/types/IRepeatMode.ts
Normal file
7
frontend/src/types/IRepeatMode.ts
Normal 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]
|
1
frontend/src/types/PartialWithId.ts
Normal file
1
frontend/src/types/PartialWithId.ts
Normal file
@ -0,0 +1 @@
|
||||
export type PartialWithId<T extends { id: unknown }> = Pick<T, 'id'> & Omit<Partial<T>, 'id'>
|
8
frontend/src/types/ProjectView.ts
Normal file
8
frontend/src/types/ProjectView.ts
Normal 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
12
frontend/src/types/cypress.d.ts
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
21
frontend/src/types/global-components.d.ts
vendored
Normal file
21
frontend/src/types/global-components.d.ts
vendored
Normal 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
13
frontend/src/types/shims-tsx.d.ts
vendored
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
40
frontend/src/types/vue-fontawesome.ts
Normal file
40
frontend/src/types/vue-fontawesome.ts
Normal 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>
|
Reference in New Issue
Block a user