UNPKG

@progress/kendo-angular-scheduler

Version:

Kendo UI Scheduler Angular - Outlook or Google-style angular scheduler calendar. Full-featured and customizable embedded scheduling from the creator developers trust for professional UI components.

39 lines (38 loc) 1.13 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ /** * @hidden */ export class ItemMap { count = 0; items = {}; get first() { if (this.count > 0) { return this.items[Object.keys(this.items)[0]]; } } get last() { if (this.count > 0) { const keys = Object.keys(this.items); return this.items[keys[keys.length - 1]]; } } addItem(index, item) { if (!this.items[index]) { this.count++; } this.items[index] = item; } removeItem(index, item) { const current = this.items[index]; if (current === item) { delete this.items[index]; this.count--; } } toArray() { return Object.keys(this.items).map(index => this.items[index]); } }