projects/wms-framework/src/lib/basecomponentmodel/CalendarBlackoutDatesCollectionModel.ts
CalendarBlackoutDatesCollection support class
Properties |
|
Methods |
|
constructor(owner: CalendarModel)
|
||||||
|
Parameters :
|
| Public AddNewItem |
Type : SubscriptionEvent<void>
|
Default value : new SubscriptionEvent()
|
|
Inherited from
ObservableCollection
|
|
Defined in
ObservableCollection:888
|
|
Event AddNewItem have changed. |
| Public CollectionChanged |
Type : SubscriptionEvent<void>
|
Default value : new SubscriptionEvent()
|
|
Inherited from
ObservableCollection
|
|
Defined in
ObservableCollection:878
|
|
Event to indicate that the collection have changed. |
| Protected Static interfacesInitialized |
Default value : false
|
|
Inherited from
SimpleList
|
|
Defined in
SimpleList:862
|
|
Flag to indicate if supported interfaces have been initialized. |
| Public PropertyChanged |
Type : SubscriptionEvent<void>
|
Default value : new SubscriptionEvent()
|
|
Inherited from
ObservableCollection
|
|
Defined in
ObservableCollection:869
|
|
Event to indicate that a property have changed. |
| Protected _internalArray |
Type : T[]
|
Default value : []
|
|
Inherited from
SimpleList
|
|
Defined in
SimpleList:276
|
| Public AddDatesInPast |
AddDatesInPast()
|
|
Adds all dates before today to the collection.
Returns :
void
|
| Public Contains | ||||||
Contains(...args: | | )
|
||||||
|
Parameters :
Returns :
boolean
|
| add | ||||||
add(value: T)
|
||||||
|
Inherited from
SimpleList
|
||||||
|
Defined in
SimpleList:995
|
||||||
|
Adds the given element at the end of the collection.
Parameters :
Returns :
void
|
| clear |
clear()
|
|
Inherited from
SimpleList
|
|
Defined in
SimpleList:1031
|
|
Removes all elements from the collection.
Returns :
void
|
| Protected clearItems |
clearItems()
|
|
Inherited from
ObservableCollection
|
|
Defined in
ObservableCollection:1066
|
|
Removes all elements from the collection.
Returns :
void
|
| Protected Static initializeSupportedInterfaces |
initializeSupportedInterfaces()
|
|
Inherited from
SimpleList
|
|
Defined in
SimpleList:913
|
|
Initialize the interfaces supported by this collection.
Returns :
void
|
| insert | |||||||||
insert(index: number, value: T)
|
|||||||||
|
Inherited from
SimpleList
|
|||||||||
|
Defined in
SimpleList:937
|
|||||||||
|
Inserts a new element at the specified position.
Parameters :
Returns :
void
|
| Protected onCollectionChanged | ||||||
onCollectionChanged(info: CollectionChangeInfo)
|
||||||
|
Inherited from
ObservableCollection
|
||||||
|
Defined in
ObservableCollection:1078
|
||||||
|
Trigger a
Parameters :
Returns :
void
|
| Protected onPropertyChanged | ||||||
onPropertyChanged(info: literal type)
|
||||||
|
Inherited from
ObservableCollection
|
||||||
|
Defined in
ObservableCollection:1090
|
||||||
|
Trigger a
Parameters :
Returns :
void
|
| remove | ||||||
remove(value: T)
|
||||||
|
Inherited from
SimpleList
|
||||||
|
Defined in
SimpleList:955
|
||||||
|
Removes the first element from the collection which matches the given value.
Parameters :
Returns :
boolean
{boolean} |
| removeAt | ||||||
removeAt(index: number)
|
||||||
|
Inherited from
SimpleList
|
||||||
|
Defined in
SimpleList:977
|
||||||
|
Removes the element at the given position.
Parameters :
Returns :
void
|
| setItem | |||||||||
setItem(index: number, value: T)
|
|||||||||
|
Inherited from
SimpleList
|
|||||||||
|
Defined in
SimpleList:1047
|
|||||||||
|
Replace the element at the given position with the given element.
Parameters :
Returns :
void
|
| silentAddRange | ||||||
silentAddRange(range: Iterable<T>)
|
||||||
|
Inherited from
ObservableCollection
|
||||||
|
Defined in
ObservableCollection:1013
|
||||||
|
Adds elements of an iterable to the list
Parameters :
Returns :
void
|
| addRange | ||||||
addRange(range: Iterable<T>)
|
||||||
|
Inherited from
SimpleList
|
||||||
|
Defined in
SimpleList:452
|
||||||
|
Adds elements of an iterable to the list
Parameters :
Returns :
void
|
| contains | ||||||
contains(value: T)
|
||||||
|
Inherited from
SimpleList
|
||||||
|
Defined in
SimpleList:410
|
||||||
|
Check if a value is contained in the list
Parameters :
Returns :
boolean
|
| copyTo | |||||||||
copyTo(target: T[], index: number)
|
|||||||||
|
Inherited from
SimpleList
|
|||||||||
|
Defined in
SimpleList:513
|
|||||||||
|
Copies the list to a target array
Parameters :
Returns :
void
|
| forEach | ||||||
forEach(action: (e: T) => void)
|
||||||
|
Inherited from
SimpleList
|
||||||
|
Defined in
SimpleList:439
|
||||||
|
Performs an action on each element of the list
Parameters :
Returns :
void
|
| getItem | ||||||
getItem(index: number)
|
||||||
|
Inherited from
SimpleList
|
||||||
|
Defined in
SimpleList:323
|
||||||
|
Parameters :
Returns :
T
|
| indexOf | ||||||
indexOf(value: T)
|
||||||
|
Inherited from
SimpleList
|
||||||
|
Defined in
SimpleList:343
|
||||||
|
Index of value in list
Parameters :
Returns :
any
|
| insertRange | |||||||||
insertRange(position: number, range: Iterable<T>)
|
|||||||||
|
Inherited from
SimpleList
|
|||||||||
|
Defined in
SimpleList:466
|
|||||||||
|
Inserts elements of an interable to the list in a position
Parameters :
Returns :
void
|
| Public removeAll | ||||||
removeAll(predicate: (e: T) => void)
|
||||||
|
Inherited from
SimpleList
|
||||||
|
Defined in
SimpleList:527
|
||||||
|
Removes all elements from the collection by a predicate
Parameters :
Returns :
number
|
| sort |
sort()
|
|
Inherited from
SimpleList
|
|
Defined in
SimpleList:479
|
|
Sorts the list
Returns :
any
|
| Public toArray |
toArray()
|
|
Inherited from
SimpleList
|
|
Defined in
SimpleList:545
|
|
Converts the list to an array
Returns :
{}
|
()
|
|
Inherited from
SimpleList
|
|
Defined in
SimpleList:549
|
|
Returns :
Iterator<T, any, undefined>
|
import { ObservableCollection } from '../baseframework';
import { Debugger } from '../diagnostics/Debugger';
import { CalendarDateRangeModel } from '../models/controls/CalendarDateRangeModel';
import { CalendarModel } from '../models/controls/CalendarModel';
/**
* CalendarBlackoutDatesCollection support class
*
* @export
* @class CalendarBlackoutDatesCollectionModel
* @extends {ObservableCollection<CalendarDateRangeModel>}
* @wType System.Windows.Controls.CalendarBlackoutDatesCollection
*/
export class CalendarBlackoutDatesCollectionModel extends ObservableCollection<CalendarDateRangeModel> {
constructor(private owner: CalendarModel) {
super();
}
/**
* Adds all dates before today to the collection.
*
* @memberof CalendarBlackoutDatesCollectionModel
* @wNoMap
*/
public AddDatesInPast(): void {
Debugger.Throw('not implemented');
}
public Contains(
...args:
| [day: Date]
| [start: Date, end: Date]
| [range: CalendarDateRangeModel]
): boolean {
if (args[0] instanceof CalendarDateRangeModel) {
return this.contains(args[0]);
} else if (args.length === 1) {
return this.contains(new CalendarDateRangeModel(args[0]));
}
return this.contains(new CalendarDateRangeModel(args[0], args[1]));
}
}