diff --git a/packages/devextreme-angular/src/ui/scheduler/index.ts b/packages/devextreme-angular/src/ui/scheduler/index.ts index 6a4bb57d80f7..d1128a9a78af 100644 --- a/packages/devextreme-angular/src/ui/scheduler/index.ts +++ b/packages/devextreme-angular/src/ui/scheduler/index.ts @@ -26,7 +26,7 @@ import dxScheduler from 'devextreme/ui/scheduler'; import dxSortable from 'devextreme/ui/sortable'; import dxDraggable from 'devextreme/ui/draggable'; import DataSource from 'devextreme/data/data_source'; -import { AllDayPanelMode, ViewType, dxSchedulerAppointment, CellAppointmentsLimit, AppointmentAddedEvent, AppointmentAddingEvent, AppointmentClickEvent, AppointmentContextMenuEvent, AppointmentDblClickEvent, AppointmentDeletedEvent, AppointmentDeletingEvent, AppointmentFormOpeningEvent, AppointmentRenderedEvent, AppointmentTooltipShowingEvent, AppointmentUpdatedEvent, AppointmentUpdatingEvent, CellClickEvent, CellContextMenuEvent, ContentReadyEvent, DisposingEvent, InitializedEvent, OptionChangedEvent, RecurrenceEditMode, dxSchedulerScrolling, dxSchedulerToolbar } from 'devextreme/ui/scheduler'; +import { AllDayPanelMode, ViewType, dxSchedulerAppointment, SchedulerAppointmentFormIconDisplay, CellAppointmentsLimit, AppointmentAddedEvent, AppointmentAddingEvent, AppointmentClickEvent, AppointmentContextMenuEvent, AppointmentDblClickEvent, AppointmentDeletedEvent, AppointmentDeletingEvent, AppointmentFormOpeningEvent, AppointmentRenderedEvent, AppointmentTooltipShowingEvent, AppointmentUpdatedEvent, AppointmentUpdatingEvent, CellClickEvent, CellContextMenuEvent, ContentReadyEvent, DisposingEvent, InitializedEvent, OptionChangedEvent, RecurrenceEditMode, dxSchedulerScrolling, dxSchedulerToolbar } from 'devextreme/ui/scheduler'; import { event } from 'devextreme/events/events.types'; import { DataSourceOptions } from 'devextreme/data/data_source'; import { Store } from 'devextreme/data/store'; @@ -393,10 +393,10 @@ export class DxSchedulerComponent extends DxComponent implements OnDestroy, OnCh */ @Input() - get editing(): boolean | { allowAdding?: boolean, allowDeleting?: boolean, allowDragging?: boolean, allowResizing?: boolean, allowTimeZoneEditing?: boolean, allowUpdating?: boolean, form?: undefined | { items?: Array, onCanceled?: ((formData: any) => void), onSaved?: ((formData: any) => void) } } { + get editing(): boolean | { allowAdding?: boolean, allowDeleting?: boolean, allowDragging?: boolean, allowResizing?: boolean, allowTimeZoneEditing?: boolean, allowUpdating?: boolean, form?: undefined | { items?: Array, onCanceled?: ((formData: any) => void), onSaved?: ((formData: any) => void), showIcons?: SchedulerAppointmentFormIconDisplay } } { return this._getOption('editing'); } - set editing(value: boolean | { allowAdding?: boolean, allowDeleting?: boolean, allowDragging?: boolean, allowResizing?: boolean, allowTimeZoneEditing?: boolean, allowUpdating?: boolean, form?: undefined | { items?: Array, onCanceled?: ((formData: any) => void), onSaved?: ((formData: any) => void) } }) { + set editing(value: boolean | { allowAdding?: boolean, allowDeleting?: boolean, allowDragging?: boolean, allowResizing?: boolean, allowTimeZoneEditing?: boolean, allowUpdating?: boolean, form?: undefined | { items?: Array, onCanceled?: ((formData: any) => void), onSaved?: ((formData: any) => void), showIcons?: SchedulerAppointmentFormIconDisplay } }) { this._setOption('editing', value); } @@ -679,10 +679,10 @@ export class DxSchedulerComponent extends DxComponent implements OnDestroy, OnCh */ @Input() - get resources(): { allowMultiple?: boolean, colorExpr?: string, dataSource?: Array | DataSource | DataSourceOptions | null | Store | string, displayExpr?: ((resource: any) => string) | string, fieldExpr?: string, label?: string, useColorAsDefault?: boolean, valueExpr?: Function | string }[] { + get resources(): { allowMultiple?: boolean, colorExpr?: string, dataSource?: Array | DataSource | DataSourceOptions | null | Store | string, displayExpr?: ((resource: any) => string) | string, fieldExpr?: string, icon?: string, label?: string, useColorAsDefault?: boolean, valueExpr?: Function | string }[] { return this._getOption('resources'); } - set resources(value: { allowMultiple?: boolean, colorExpr?: string, dataSource?: Array | DataSource | DataSourceOptions | null | Store | string, displayExpr?: ((resource: any) => string) | string, fieldExpr?: string, label?: string, useColorAsDefault?: boolean, valueExpr?: Function | string }[]) { + set resources(value: { allowMultiple?: boolean, colorExpr?: string, dataSource?: Array | DataSource | DataSourceOptions | null | Store | string, displayExpr?: ((resource: any) => string) | string, fieldExpr?: string, icon?: string, label?: string, useColorAsDefault?: boolean, valueExpr?: Function | string }[]) { this._setOption('resources', value); } @@ -1202,7 +1202,7 @@ export class DxSchedulerComponent extends DxComponent implements OnDestroy, OnCh * This member supports the internal infrastructure and is not intended to be used directly from your code. */ - @Output() editingChange: EventEmitter, onCanceled?: ((formData: any) => void), onSaved?: ((formData: any) => void) } }>; + @Output() editingChange: EventEmitter, onCanceled?: ((formData: any) => void), onSaved?: ((formData: any) => void), showIcons?: SchedulerAppointmentFormIconDisplay } }>; /** @@ -1356,7 +1356,7 @@ export class DxSchedulerComponent extends DxComponent implements OnDestroy, OnCh * This member supports the internal infrastructure and is not intended to be used directly from your code. */ - @Output() resourcesChange: EventEmitter<{ allowMultiple?: boolean, colorExpr?: string, dataSource?: Array | DataSource | DataSourceOptions | null | Store | string, displayExpr?: ((resource: any) => string) | string, fieldExpr?: string, label?: string, useColorAsDefault?: boolean, valueExpr?: Function | string }[]>; + @Output() resourcesChange: EventEmitter<{ allowMultiple?: boolean, colorExpr?: string, dataSource?: Array | DataSource | DataSourceOptions | null | Store | string, displayExpr?: ((resource: any) => string) | string, fieldExpr?: string, icon?: string, label?: string, useColorAsDefault?: boolean, valueExpr?: Function | string }[]>; /** diff --git a/packages/devextreme-angular/src/ui/scheduler/nested/editing.ts b/packages/devextreme-angular/src/ui/scheduler/nested/editing.ts index 317ab278d6e1..5a415befaba7 100644 --- a/packages/devextreme-angular/src/ui/scheduler/nested/editing.ts +++ b/packages/devextreme-angular/src/ui/scheduler/nested/editing.ts @@ -15,6 +15,7 @@ import { import { dxFormButtonItem, dxFormEmptyItem, dxFormGroupItem, dxFormSimpleItem, dxFormTabbedItem } from 'devextreme/ui/form'; +import { SchedulerAppointmentFormIconDisplay } from 'devextreme/ui/scheduler'; import { DxIntegrationModule, @@ -81,10 +82,10 @@ export class DxoSchedulerEditingComponent extends NestedOption implements OnDest } @Input() - get form(): undefined | { items?: Array, onCanceled?: ((formData: any) => void), onSaved?: ((formData: any) => void) } { + get form(): undefined | { items?: Array, onCanceled?: ((formData: any) => void), onSaved?: ((formData: any) => void), showIcons?: SchedulerAppointmentFormIconDisplay } { return this._getOption('form'); } - set form(value: undefined | { items?: Array, onCanceled?: ((formData: any) => void), onSaved?: ((formData: any) => void) }) { + set form(value: undefined | { items?: Array, onCanceled?: ((formData: any) => void), onSaved?: ((formData: any) => void), showIcons?: SchedulerAppointmentFormIconDisplay }) { this._setOption('form', value); } diff --git a/packages/devextreme-angular/src/ui/scheduler/nested/form.ts b/packages/devextreme-angular/src/ui/scheduler/nested/form.ts index 97106cd5e916..f4c8555e61d3 100644 --- a/packages/devextreme-angular/src/ui/scheduler/nested/form.ts +++ b/packages/devextreme-angular/src/ui/scheduler/nested/form.ts @@ -17,6 +17,7 @@ import { import { dxFormButtonItem, dxFormEmptyItem, dxFormGroupItem, dxFormSimpleItem, dxFormTabbedItem } from 'devextreme/ui/form'; +import { SchedulerAppointmentFormIconDisplay } from 'devextreme/ui/scheduler'; import { DxIntegrationModule, @@ -67,6 +68,14 @@ export class DxoSchedulerFormComponent extends NestedOption implements OnDestroy this._setOption('onSaved', value); } + @Input() + get showIcons(): SchedulerAppointmentFormIconDisplay { + return this._getOption('showIcons'); + } + set showIcons(value: SchedulerAppointmentFormIconDisplay) { + this._setOption('showIcons', value); + } + protected get _optionPath() { return 'form'; diff --git a/packages/devextreme-angular/src/ui/scheduler/nested/resource-dxi.ts b/packages/devextreme-angular/src/ui/scheduler/nested/resource-dxi.ts index eb57a7cc68b7..cfa3d74e2df2 100644 --- a/packages/devextreme-angular/src/ui/scheduler/nested/resource-dxi.ts +++ b/packages/devextreme-angular/src/ui/scheduler/nested/resource-dxi.ts @@ -79,6 +79,14 @@ export class DxiSchedulerResourceComponent extends CollectionNestedOption { this._setOption('fieldExpr', value); } + @Input() + get icon(): string { + return this._getOption('icon'); + } + set icon(value: string) { + this._setOption('icon', value); + } + @Input() get label(): string { return this._getOption('label'); diff --git a/packages/devextreme-metadata/make-angular-metadata.ts b/packages/devextreme-metadata/make-angular-metadata.ts index f78239d1789c..07c9940f11d1 100644 --- a/packages/devextreme-metadata/make-angular-metadata.ts +++ b/packages/devextreme-metadata/make-angular-metadata.ts @@ -21,6 +21,7 @@ Ng.makeMetadata({ removeMembers(/\/grids:LoadPanel.indicatorOptions/), removeMembers(/\/scheduler:Toolbar/), removeMembers(/\/scheduler:dxSchedulerOptions\.editing\.form/), + removeMembers(/\/scheduler:dxSchedulerOptions\.resources\.icon/), removeMembers(/\/stepper:/), removeMembers(/\/speech_to_text:/), ], diff --git a/packages/devextreme-react/src/scheduler.ts b/packages/devextreme-react/src/scheduler.ts index aa6afd250302..79b291cdbff5 100644 --- a/packages/devextreme-react/src/scheduler.ts +++ b/packages/devextreme-react/src/scheduler.ts @@ -8,7 +8,7 @@ import dxScheduler, { import { Component as BaseComponent, IHtmlOptions, ComponentRef, NestedComponentMeta } from "./core/component"; import NestedOption from "./core/nested-option"; -import type { ViewType, AppointmentAddedEvent, AppointmentAddingEvent, AppointmentClickEvent, AppointmentContextMenuEvent, AppointmentDblClickEvent, AppointmentDeletedEvent, AppointmentDeletingEvent, AppointmentFormOpeningEvent, AppointmentRenderedEvent, AppointmentTooltipShowingEvent, AppointmentUpdatedEvent, AppointmentUpdatingEvent, CellClickEvent, CellContextMenuEvent, ContentReadyEvent, DisposingEvent, InitializedEvent, SchedulerPredefinedToolbarItem, DateNavigatorItemProperties, SchedulerPredefinedDateNavigatorItem, dxSchedulerToolbarItem, AllDayPanelMode, AppointmentCollectorTemplateData, AppointmentTemplateData, AppointmentTooltipTemplateData, CellAppointmentsLimit, dxSchedulerScrolling } from "devextreme/ui/scheduler"; +import type { ViewType, AppointmentAddedEvent, AppointmentAddingEvent, AppointmentClickEvent, AppointmentContextMenuEvent, AppointmentDblClickEvent, AppointmentDeletedEvent, AppointmentDeletingEvent, AppointmentFormOpeningEvent, AppointmentRenderedEvent, AppointmentTooltipShowingEvent, AppointmentUpdatedEvent, AppointmentUpdatingEvent, CellClickEvent, CellContextMenuEvent, ContentReadyEvent, DisposingEvent, InitializedEvent, SchedulerAppointmentFormIconDisplay, SchedulerPredefinedToolbarItem, DateNavigatorItemProperties, SchedulerPredefinedDateNavigatorItem, dxSchedulerToolbarItem, AllDayPanelMode, AppointmentCollectorTemplateData, AppointmentTemplateData, AppointmentTooltipTemplateData, CellAppointmentsLimit, dxSchedulerScrolling } from "devextreme/ui/scheduler"; import type { ContentReadyEvent as ButtonContentReadyEvent, DisposingEvent as ButtonDisposingEvent, InitializedEvent as ButtonInitializedEvent, dxButtonOptions, ClickEvent, OptionChangedEvent } from "devextreme/ui/button"; import type { ContentReadyEvent as ButtonGroupContentReadyEvent, DisposingEvent as ButtonGroupDisposingEvent, InitializedEvent as ButtonGroupInitializedEvent, OptionChangedEvent as ButtonGroupOptionChangedEvent, dxButtonGroupItem, ItemClickEvent, SelectionChangedEvent } from "devextreme/ui/button_group"; import type { ContentReadyEvent as TabPanelContentReadyEvent, DisposingEvent as TabPanelDisposingEvent, InitializedEvent as TabPanelInitializedEvent, OptionChangedEvent as TabPanelOptionChangedEvent, dxTabPanelOptions, ItemClickEvent as TabPanelItemClickEvent, SelectionChangedEvent as TabPanelSelectionChangedEvent, dxTabPanelItem, ItemContextMenuEvent, ItemHoldEvent, ItemRenderedEvent, SelectionChangingEvent, TitleClickEvent, TitleHoldEvent, TitleRenderedEvent } from "devextreme/ui/tab_panel"; @@ -401,6 +401,7 @@ type IEditingProps = React.PropsWithChildren<{ items?: Array; onCanceled?: ((formData: any) => void); onSaved?: ((formData: any) => void); + showIcons?: SchedulerAppointmentFormIconDisplay; }; }> const _componentEditing = (props: IEditingProps) => { @@ -476,6 +477,7 @@ type IFormProps = React.PropsWithChildren<{ items?: Array; onCanceled?: ((formData: any) => void); onSaved?: ((formData: any) => void); + showIcons?: SchedulerAppointmentFormIconDisplay; }> const _componentForm = (props: IFormProps) => { return React.createElement(NestedOption, { @@ -923,6 +925,7 @@ type IResourceProps = React.PropsWithChildren<{ dataSource?: Array | DataSource | DataSourceOptions | null | Store | string; displayExpr?: ((resource: any) => string) | string; fieldExpr?: string; + icon?: string; label?: string; useColorAsDefault?: boolean; valueExpr?: (() => void) | string; diff --git a/packages/devextreme-vue/src/scheduler.ts b/packages/devextreme-vue/src/scheduler.ts index f5178833656b..0ff797bcac8f 100644 --- a/packages/devextreme-vue/src/scheduler.ts +++ b/packages/devextreme-vue/src/scheduler.ts @@ -32,6 +32,7 @@ import { RecurrenceEditMode, dxSchedulerScrolling, dxSchedulerToolbar, + SchedulerAppointmentFormIconDisplay, SchedulerPredefinedToolbarItem, DateNavigatorItemProperties, SchedulerPredefinedDateNavigatorItem, @@ -750,11 +751,13 @@ const DxFormConfig = { "update:items": null, "update:onCanceled": null, "update:onSaved": null, + "update:showIcons": null, }, props: { items: Array as PropType>, onCanceled: Function as PropType<((formData: any) => void)>, - onSaved: Function as PropType<((formData: any) => void)> + onSaved: Function as PropType<((formData: any) => void)>, + showIcons: String as PropType } }; @@ -1184,6 +1187,7 @@ const DxResourceConfig = { "update:dataSource": null, "update:displayExpr": null, "update:fieldExpr": null, + "update:icon": null, "update:label": null, "update:useColorAsDefault": null, "update:valueExpr": null, @@ -1194,6 +1198,7 @@ const DxResourceConfig = { dataSource: [Array, Object, String] as PropType | DataSource | DataSourceOptions | null | Store | string | Record>, displayExpr: [Function, String] as PropType<(((resource: any) => string)) | string>, fieldExpr: String, + icon: String, label: String, useColorAsDefault: Boolean, valueExpr: [Function, String] as PropType<((() => void)) | string> diff --git a/packages/devextreme/js/ui/scheduler.d.ts b/packages/devextreme/js/ui/scheduler.d.ts index 9359c469a5fd..4a5412c31590 100644 --- a/packages/devextreme/js/ui/scheduler.d.ts +++ b/packages/devextreme/js/ui/scheduler.d.ts @@ -78,6 +78,8 @@ export type CellAppointmentsLimit = 'auto' | 'unlimited'; /** @public */ export type RecurrenceEditMode = 'dialog' | 'occurrence' | 'series'; /** @public */ +export type SchedulerAppointmentFormIconDisplay = 'both' | 'main' | 'recurrence' | 'none'; +/** @public */ export type ViewType = 'agenda' | 'day' | 'month' | 'timelineDay' | 'timelineMonth' | 'timelineWeek' | 'timelineWorkWeek' | 'week' | 'workWeek'; /** @public */ export type SchedulerPredefinedToolbarItem = 'today' | 'dateNavigator' | 'viewSwitcher'; @@ -656,6 +658,12 @@ export interface dxSchedulerOptions extends WidgetOptions { * @public */ onCanceled?: ((formData: any) => void); + /** + * @docid + * @default "main" + * @public + */ + showIcons?: SchedulerAppointmentFormIconDisplay; } | undefined; }; /** @@ -912,6 +920,11 @@ export interface dxSchedulerOptions extends WidgetOptions { * @default "" */ fieldExpr?: string; + /** + * @docid + * @default "" + */ + icon?: string; /** * @docid * @default "" diff --git a/packages/devextreme/js/ui/scheduler_types.d.ts b/packages/devextreme/js/ui/scheduler_types.d.ts index 17695a72da7d..45e9a7862d6a 100644 --- a/packages/devextreme/js/ui/scheduler_types.d.ts +++ b/packages/devextreme/js/ui/scheduler_types.d.ts @@ -5,6 +5,7 @@ export { AllDayPanelMode, CellAppointmentsLimit, RecurrenceEditMode, + SchedulerAppointmentFormIconDisplay, ViewType, SchedulerPredefinedToolbarItem, SchedulerPredefinedDateNavigatorItem, diff --git a/packages/devextreme/ts/dx.all.d.ts b/packages/devextreme/ts/dx.all.d.ts index 2521522ec554..f2cf3f007625 100644 --- a/packages/devextreme/ts/dx.all.d.ts +++ b/packages/devextreme/ts/dx.all.d.ts @@ -26174,6 +26174,11 @@ declare module DevExpress.ui { DevExpress.common.core.events.ChangedOptionInfo; export type Properties = dxSchedulerOptions; export type RecurrenceEditMode = 'dialog' | 'occurrence' | 'series'; + export type SchedulerAppointmentFormIconDisplay = + | 'both' + | 'main' + | 'recurrence' + | 'none'; export type SchedulerPredefinedDateNavigatorItem = | 'prev' | 'next' @@ -26464,6 +26469,10 @@ declare module DevExpress.ui { * [descr:dxSchedulerOptions.editing.form.onCanceled] */ onCanceled?: (formData: any) => void; + /** + * [descr:dxSchedulerOptions.editing.form.showIcons] + */ + showIcons?: DevExpress.ui.dxScheduler.SchedulerAppointmentFormIconDisplay; } | undefined; }; @@ -26652,6 +26661,10 @@ declare module DevExpress.ui { * [descr:dxSchedulerOptions.resources.fieldExpr] */ fieldExpr?: string; + /** + * [descr:dxSchedulerOptions.resources.icon] + */ + icon?: string; /** * [descr:dxSchedulerOptions.resources.label] */