UNPKG

@progress/kendo-angular-gantt

Version:
180 lines (179 loc) 6.56 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Day } from '@progress/kendo-date-math'; import { GanttColumnBase, GanttColumnGroupComponent } from './columns/columns'; import { DependencyType } from './models/dependency-type.enum'; import { ViewItem } from './models/view-item.interface'; /** * @hidden */ export declare const isWorkDay: (date: Date, start: number, end: number) => boolean; /** * @hidden */ export declare const isWorkHour: (date: Date, start: number, end: number) => boolean; /** * @hidden */ export declare const isPresent: (item: any) => boolean; /** * @hidden * * Normalized the data to an array in case a falsy value is passed * or a TreeListDataResult object (applicable for the data-binding directives). */ export declare const normalizeGanttData: (data: any) => any[]; /** * @hidden */ export declare const isArray: Function; /** * @hidden * * Returns a new date with the specified hours, minutes, seconds and millliseconds set. * Only the hours are required, the rest of the params are set to `0` by default. */ export declare const setTime: (date: Date, hours: number, minutes?: number, seconds?: number, milliseconds?: number) => Date; /** * @hidden * * Returns the last day of a week. * @param standingPoint - Any day of the target week. * @param firstWeekDay - The week's starting day (e.g. Monday, Tuesday, etc.) */ export declare const lastDayOfWeek: (standingPoint: Date, firstWeekDay: Day) => Date; /** * @hidden * * Returns the total number of days in a month */ export declare const getTotalDaysInMonth: (date: Date) => number; /** * @hidden * * Returns the total number of months between two dates * by excluding the months of the dates themselves. */ export declare const getTotalMonthsInBetween: (start: Date, end: Date) => number; /** * @hidden * * Gets the default scrollbar width accoring to the current environment. */ export declare const scrollbarWidth: () => number; /** * @hidden */ export declare const isColumnGroup: (column: GanttColumnBase) => column is GanttColumnGroupComponent; /** * @hidden */ export declare const isNumber: (contender: any) => contender is number; /** * @hidden */ export declare const isString: (contender: any) => contender is string; /** * @hidden * * Native Omit appears in TS v3.5, we can use it when we drop Angular 8 (requires v3.4) */ export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; /** * @hidden * * Gets the closest timeline task wrapper element from an event target. * Restricts the search up to the provided parent element from the second param. */ export declare const getClosestTaskWrapper: (element: Element, parentScope: Element) => Element; /** * @hidden * * Checks whether the queried item or its parent items has a `k-task-wrap` selector. * Restricts the search up to the provided parent element from the second param. */ export declare const isTaskWrapper: (contender: Element, parentScope: Element) => boolean; /** * @hidden * * Gets the closest timeline task element from an event target. * Restricts the search up to the provided parent element from the second param. */ export declare const getClosestTask: (element: Element, parentScope: Element) => Element; /** * @hidden * * Gets the closest timeline task element index from an event target. * Uses the `data-task-index` attribute assigned to each task. * Restricts the search up to the provided parent element from the second param. */ export declare const getClosestTaskIndex: (element: Element | EventTarget, parentScope: Element) => number; /** * @hidden * * Checks whether the queried item or its parent items has a `k-task` selector. * Restricts the search up to the provided parent element from the second param. */ export declare const isTask: (contender: Element | EventTarget, parentScope: Element) => boolean; /** * @hidden * * Checks whether the queried item or its parent items has a `k-toolbar` selector. * Restricts the search up to the provided parent element from the second param. */ export declare const isToolbar: (contender: Element | EventTarget, parentScope: Element) => boolean; /** * @hidden * * Checks whether the queried item or its parent items has a `k-task-actions` selector - used for the clear button. * Restricts the search up to the provided parent element from the second param. */ export declare const isClearButton: (contender: Element | EventTarget, parentScope: Element) => boolean; /** * @hidden * * Checks whether the queried item has a `k-task-dot` selector - used for the dependency drag clues. */ export declare const isDependencyDragClue: (element: Element) => boolean; /** * @hidden * * Checks whether the queried item has a `k-task-dot` & `k-task-start` selector - used for the dependency drag start clues. */ export declare const isDependencyDragStartClue: (element: Element) => boolean; /** * @hidden * * Gets the `DependencyType` for an attempted dependency create from the provided two elements. * The two linked drag clue HTML elements are used to extract this data (via their CSS classes). */ export declare const getDependencyTypeFromTargetTasks: (fromTaskClue: Element, toTaskClue: Element) => DependencyType; /** * @hidden * * Checks whether the two provided drag clues belong to the same task element. */ export declare const sameTaskClues: (fromTaskClue: Element, toTaskClue: Element, parentScope: Element) => boolean; /** * @hidden * * Fits a contender number between a min and max range. * If the contender is below the min value, the min value is returned. * If the contender is above the max value, the max value is returned. */ export declare const fitToRange: (contender: number, min: number, max: number) => number; /** * @hidden * * Checks whether either of the two provided tasks is a parent of the other. */ export declare const areParentChild: (taskA: ViewItem, taskB: ViewItem) => boolean; /** * @hidden * * Extracts an element from the provided client coords. * Using the `event.target` is not reliable under mobile devices with the current implementation of the draggable, so use this instead. */ export declare const elementFromPoint: (clientX: number, clientY: number) => HTMLElement;