@bryntum/scheduler-react 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -0
- package/lib/BryntumAIFilterField.d.ts +231 -0
- package/lib/BryntumAIFilterField.js +168 -0
- package/lib/BryntumAIFilterField.js.map +1 -0
- package/lib/BryntumButton.d.ts +206 -0
- package/lib/BryntumButton.js +148 -0
- package/lib/BryntumButton.js.map +1 -0
- package/lib/BryntumButtonGroup.d.ts +201 -0
- package/lib/BryntumButtonGroup.js +154 -0
- package/lib/BryntumButtonGroup.js.map +1 -0
- package/lib/BryntumChatPanel.d.ts +246 -0
- package/lib/BryntumChatPanel.js +178 -0
- package/lib/BryntumChatPanel.js.map +1 -0
- package/lib/BryntumCheckbox.d.ts +239 -0
- package/lib/BryntumCheckbox.js +168 -0
- package/lib/BryntumCheckbox.js.map +1 -0
- package/lib/BryntumCheckboxGroup.d.ts +249 -0
- package/lib/BryntumCheckboxGroup.js +182 -0
- package/lib/BryntumCheckboxGroup.js.map +1 -0
- package/lib/BryntumChecklistFilterCombo.d.ts +268 -0
- package/lib/BryntumChecklistFilterCombo.js +205 -0
- package/lib/BryntumChecklistFilterCombo.js.map +1 -0
- package/lib/BryntumChipView.d.ts +208 -0
- package/lib/BryntumChipView.js +152 -0
- package/lib/BryntumChipView.js.map +1 -0
- package/lib/BryntumCodeEditor.d.ts +237 -0
- package/lib/BryntumCodeEditor.js +176 -0
- package/lib/BryntumCodeEditor.js.map +1 -0
- package/lib/BryntumColorField.d.ts +231 -0
- package/lib/BryntumColorField.js +169 -0
- package/lib/BryntumColorField.js.map +1 -0
- package/lib/BryntumCombo.d.ts +266 -0
- package/lib/BryntumCombo.js +202 -0
- package/lib/BryntumCombo.js.map +1 -0
- package/lib/BryntumContainer.d.ts +185 -0
- package/lib/BryntumContainer.js +148 -0
- package/lib/BryntumContainer.js.map +1 -0
- package/lib/BryntumDateField.d.ts +241 -0
- package/lib/BryntumDateField.js +178 -0
- package/lib/BryntumDateField.js.map +1 -0
- package/lib/BryntumDatePicker.d.ts +310 -0
- package/lib/BryntumDatePicker.js +213 -0
- package/lib/BryntumDatePicker.js.map +1 -0
- package/lib/BryntumDateRangeField.d.ts +242 -0
- package/lib/BryntumDateRangeField.js +179 -0
- package/lib/BryntumDateRangeField.js.map +1 -0
- package/lib/BryntumDateTimeField.d.ts +222 -0
- package/lib/BryntumDateTimeField.js +158 -0
- package/lib/BryntumDateTimeField.js.map +1 -0
- package/lib/BryntumDemoCodeEditor.d.ts +240 -0
- package/lib/BryntumDemoCodeEditor.js +179 -0
- package/lib/BryntumDemoCodeEditor.js.map +1 -0
- package/lib/BryntumDemoHeader.d.ts +30 -0
- package/lib/BryntumDemoHeader.js +84 -0
- package/lib/BryntumDemoHeader.js.map +1 -0
- package/lib/BryntumDisplayField.d.ts +227 -0
- package/lib/BryntumDisplayField.js +163 -0
- package/lib/BryntumDisplayField.js.map +1 -0
- package/lib/BryntumDurationField.d.ts +234 -0
- package/lib/BryntumDurationField.js +175 -0
- package/lib/BryntumDurationField.js.map +1 -0
- package/lib/BryntumEditor.d.ts +249 -0
- package/lib/BryntumEditor.js +167 -0
- package/lib/BryntumEditor.js.map +1 -0
- package/lib/BryntumEventColorField.d.ts +231 -0
- package/lib/BryntumEventColorField.js +169 -0
- package/lib/BryntumEventColorField.js.map +1 -0
- package/lib/BryntumFieldFilterPicker.d.ts +202 -0
- package/lib/BryntumFieldFilterPicker.js +161 -0
- package/lib/BryntumFieldFilterPicker.js.map +1 -0
- package/lib/BryntumFieldFilterPickerGroup.d.ts +207 -0
- package/lib/BryntumFieldFilterPickerGroup.js +164 -0
- package/lib/BryntumFieldFilterPickerGroup.js.map +1 -0
- package/lib/BryntumFieldSet.d.ts +235 -0
- package/lib/BryntumFieldSet.js +174 -0
- package/lib/BryntumFieldSet.js.map +1 -0
- package/lib/BryntumFileField.d.ts +228 -0
- package/lib/BryntumFileField.js +164 -0
- package/lib/BryntumFileField.js.map +1 -0
- package/lib/BryntumFilePicker.d.ts +192 -0
- package/lib/BryntumFilePicker.js +153 -0
- package/lib/BryntumFilePicker.js.map +1 -0
- package/lib/BryntumFilterField.d.ts +234 -0
- package/lib/BryntumFilterField.js +171 -0
- package/lib/BryntumFilterField.js.map +1 -0
- package/lib/BryntumFullscreenButton.d.ts +8 -0
- package/lib/BryntumFullscreenButton.js +37 -0
- package/lib/BryntumFullscreenButton.js.map +1 -0
- package/lib/BryntumGrid.d.ts +844 -0
- package/lib/BryntumGrid.js +335 -0
- package/lib/BryntumGrid.js.map +1 -0
- package/lib/BryntumGridBase.d.ts +842 -0
- package/lib/BryntumGridBase.js +333 -0
- package/lib/BryntumGridBase.js.map +1 -0
- package/lib/BryntumGridChartDesigner.d.ts +162 -0
- package/lib/BryntumGridChartDesigner.js +127 -0
- package/lib/BryntumGridChartDesigner.js.map +1 -0
- package/lib/BryntumGridFieldFilterPicker.d.ts +203 -0
- package/lib/BryntumGridFieldFilterPicker.js +162 -0
- package/lib/BryntumGridFieldFilterPicker.js.map +1 -0
- package/lib/BryntumGridFieldFilterPickerGroup.d.ts +206 -0
- package/lib/BryntumGridFieldFilterPickerGroup.js +163 -0
- package/lib/BryntumGridFieldFilterPickerGroup.js.map +1 -0
- package/lib/BryntumGroupBar.d.ts +208 -0
- package/lib/BryntumGroupBar.js +152 -0
- package/lib/BryntumGroupBar.js.map +1 -0
- package/lib/BryntumHint.d.ts +260 -0
- package/lib/BryntumHint.js +184 -0
- package/lib/BryntumHint.js.map +1 -0
- package/lib/BryntumLabel.d.ts +161 -0
- package/lib/BryntumLabel.js +126 -0
- package/lib/BryntumLabel.js.map +1 -0
- package/lib/BryntumList.d.ts +205 -0
- package/lib/BryntumList.js +149 -0
- package/lib/BryntumList.js.map +1 -0
- package/lib/BryntumMenu.d.ts +264 -0
- package/lib/BryntumMenu.js +187 -0
- package/lib/BryntumMenu.js.map +1 -0
- package/lib/BryntumMonthPicker.d.ts +240 -0
- package/lib/BryntumMonthPicker.js +173 -0
- package/lib/BryntumMonthPicker.js.map +1 -0
- package/lib/BryntumNumberField.d.ts +234 -0
- package/lib/BryntumNumberField.js +170 -0
- package/lib/BryntumNumberField.js.map +1 -0
- package/lib/BryntumPagingToolbar.d.ts +210 -0
- package/lib/BryntumPagingToolbar.js +156 -0
- package/lib/BryntumPagingToolbar.js.map +1 -0
- package/lib/BryntumPanel.d.ts +231 -0
- package/lib/BryntumPanel.js +170 -0
- package/lib/BryntumPanel.js.map +1 -0
- package/lib/BryntumPasswordField.d.ts +226 -0
- package/lib/BryntumPasswordField.js +162 -0
- package/lib/BryntumPasswordField.js.map +1 -0
- package/lib/BryntumProjectCombo.d.ts +267 -0
- package/lib/BryntumProjectCombo.js +203 -0
- package/lib/BryntumProjectCombo.js.map +1 -0
- package/lib/BryntumRadio.d.ts +239 -0
- package/lib/BryntumRadio.js +168 -0
- package/lib/BryntumRadio.js.map +1 -0
- package/lib/BryntumRadioGroup.d.ts +239 -0
- package/lib/BryntumRadioGroup.js +178 -0
- package/lib/BryntumRadioGroup.js.map +1 -0
- package/lib/BryntumResourceCombo.d.ts +267 -0
- package/lib/BryntumResourceCombo.js +203 -0
- package/lib/BryntumResourceCombo.js.map +1 -0
- package/lib/BryntumResourceFilter.d.ts +214 -0
- package/lib/BryntumResourceFilter.js +154 -0
- package/lib/BryntumResourceFilter.js.map +1 -0
- package/lib/BryntumScheduler.d.ts +2037 -0
- package/lib/BryntumScheduler.js +642 -0
- package/lib/BryntumScheduler.js.map +1 -0
- package/lib/BryntumSchedulerBase.d.ts +2036 -0
- package/lib/BryntumSchedulerBase.js +641 -0
- package/lib/BryntumSchedulerBase.js.map +1 -0
- package/lib/BryntumSchedulerDatePicker.d.ts +313 -0
- package/lib/BryntumSchedulerDatePicker.js +216 -0
- package/lib/BryntumSchedulerDatePicker.js.map +1 -0
- package/lib/BryntumSchedulerProjectModel.d.ts +90 -0
- package/lib/BryntumSchedulerProjectModel.js +98 -0
- package/lib/BryntumSchedulerProjectModel.js.map +1 -0
- package/lib/BryntumSlideToggle.d.ts +239 -0
- package/lib/BryntumSlideToggle.js +168 -0
- package/lib/BryntumSlideToggle.js.map +1 -0
- package/lib/BryntumSlider.d.ts +184 -0
- package/lib/BryntumSlider.js +142 -0
- package/lib/BryntumSlider.js.map +1 -0
- package/lib/BryntumSplitter.d.ts +174 -0
- package/lib/BryntumSplitter.js +130 -0
- package/lib/BryntumSplitter.js.map +1 -0
- package/lib/BryntumTabPanel.d.ts +249 -0
- package/lib/BryntumTabPanel.js +178 -0
- package/lib/BryntumTabPanel.js.map +1 -0
- package/lib/BryntumTextAreaField.d.ts +228 -0
- package/lib/BryntumTextAreaField.js +164 -0
- package/lib/BryntumTextAreaField.js.map +1 -0
- package/lib/BryntumTextAreaPickerField.d.ts +232 -0
- package/lib/BryntumTextAreaPickerField.js +170 -0
- package/lib/BryntumTextAreaPickerField.js.map +1 -0
- package/lib/BryntumTextField.d.ts +229 -0
- package/lib/BryntumTextField.js +166 -0
- package/lib/BryntumTextField.js.map +1 -0
- package/lib/BryntumThemeCombo.d.ts +17 -0
- package/lib/BryntumThemeCombo.js +75 -0
- package/lib/BryntumThemeCombo.js.map +1 -0
- package/lib/BryntumTimeField.d.ts +238 -0
- package/lib/BryntumTimeField.js +175 -0
- package/lib/BryntumTimeField.js.map +1 -0
- package/lib/BryntumTimePicker.d.ts +192 -0
- package/lib/BryntumTimePicker.js +154 -0
- package/lib/BryntumTimePicker.js.map +1 -0
- package/lib/BryntumTimelineHistogram.d.ts +1183 -0
- package/lib/BryntumTimelineHistogram.js +448 -0
- package/lib/BryntumTimelineHistogram.js.map +1 -0
- package/lib/BryntumToolbar.d.ts +209 -0
- package/lib/BryntumToolbar.js +155 -0
- package/lib/BryntumToolbar.js.map +1 -0
- package/lib/BryntumTreeCombo.d.ts +266 -0
- package/lib/BryntumTreeCombo.js +202 -0
- package/lib/BryntumTreeCombo.js.map +1 -0
- package/lib/BryntumTreeGrid.d.ts +843 -0
- package/lib/BryntumTreeGrid.js +334 -0
- package/lib/BryntumTreeGrid.js.map +1 -0
- package/lib/BryntumUndoRedo.d.ts +189 -0
- package/lib/BryntumUndoRedo.js +152 -0
- package/lib/BryntumUndoRedo.js.map +1 -0
- package/lib/BryntumViewPresetCombo.d.ts +215 -0
- package/lib/BryntumViewPresetCombo.js +158 -0
- package/lib/BryntumViewPresetCombo.js.map +1 -0
- package/lib/BryntumWidget.d.ts +160 -0
- package/lib/BryntumWidget.js +125 -0
- package/lib/BryntumWidget.js.map +1 -0
- package/lib/BryntumYearPicker.d.ts +240 -0
- package/lib/BryntumYearPicker.js +177 -0
- package/lib/BryntumYearPicker.js.map +1 -0
- package/lib/WrapperHelper.d.ts +26 -0
- package/lib/WrapperHelper.js +569 -0
- package/lib/WrapperHelper.js.map +1 -0
- package/lib/index.d.ts +71 -0
- package/lib/index.js +72 -0
- package/lib/index.js.map +1 -0
- package/license.pdf +0 -0
- package/licenses.md +310 -0
- package/package.json +25 -0
- package/src/BryntumAIFilterField.tsx +998 -0
- package/src/BryntumButton.tsx +887 -0
- package/src/BryntumButtonGroup.tsx +902 -0
- package/src/BryntumChatPanel.tsx +1082 -0
- package/src/BryntumCheckbox.tsx +1000 -0
- package/src/BryntumCheckboxGroup.tsx +1116 -0
- package/src/BryntumChecklistFilterCombo.tsx +1241 -0
- package/src/BryntumChipView.tsx +914 -0
- package/src/BryntumCodeEditor.tsx +1065 -0
- package/src/BryntumColorField.tsx +995 -0
- package/src/BryntumCombo.tsx +1230 -0
- package/src/BryntumContainer.tsx +861 -0
- package/src/BryntumDateField.tsx +1055 -0
- package/src/BryntumDatePicker.tsx +1340 -0
- package/src/BryntumDateRangeField.tsx +1057 -0
- package/src/BryntumDateTimeField.tsx +942 -0
- package/src/BryntumDemoCodeEditor.tsx +1081 -0
- package/src/BryntumDemoHeader.tsx +160 -0
- package/src/BryntumDisplayField.tsx +979 -0
- package/src/BryntumDurationField.tsx +1038 -0
- package/src/BryntumEditor.tsx +1013 -0
- package/src/BryntumEventColorField.tsx +995 -0
- package/src/BryntumFieldFilterPicker.tsx +943 -0
- package/src/BryntumFieldFilterPickerGroup.tsx +976 -0
- package/src/BryntumFieldSet.tsx +1058 -0
- package/src/BryntumFileField.tsx +982 -0
- package/src/BryntumFilePicker.tsx +888 -0
- package/src/BryntumFilterField.tsx +1023 -0
- package/src/BryntumFullscreenButton.tsx +45 -0
- package/src/BryntumGrid.tsx +2402 -0
- package/src/BryntumGridBase.tsx +2399 -0
- package/src/BryntumGridChartDesigner.tsx +728 -0
- package/src/BryntumGridFieldFilterPicker.tsx +956 -0
- package/src/BryntumGridFieldFilterPickerGroup.tsx +970 -0
- package/src/BryntumGroupBar.tsx +914 -0
- package/src/BryntumHint.tsx +1125 -0
- package/src/BryntumLabel.tsx +720 -0
- package/src/BryntumList.tsx +891 -0
- package/src/BryntumMenu.tsx +1143 -0
- package/src/BryntumMonthPicker.tsx +1056 -0
- package/src/BryntumNumberField.tsx +1025 -0
- package/src/BryntumPagingToolbar.tsx +924 -0
- package/src/BryntumPanel.tsx +1035 -0
- package/src/BryntumPasswordField.tsx +969 -0
- package/src/BryntumProjectCombo.tsx +1232 -0
- package/src/BryntumRadio.tsx +1000 -0
- package/src/BryntumRadioGroup.tsx +1088 -0
- package/src/BryntumResourceCombo.tsx +1235 -0
- package/src/BryntumResourceFilter.tsx +930 -0
- package/src/BryntumScheduler.tsx +5182 -0
- package/src/BryntumSchedulerBase.tsx +5180 -0
- package/src/BryntumSchedulerDatePicker.tsx +1364 -0
- package/src/BryntumSchedulerProjectModel.tsx +423 -0
- package/src/BryntumSlideToggle.tsx +1000 -0
- package/src/BryntumSlider.tsx +815 -0
- package/src/BryntumSplitter.tsx +754 -0
- package/src/BryntumTabPanel.tsx +1087 -0
- package/src/BryntumTextAreaField.tsx +981 -0
- package/src/BryntumTextAreaPickerField.tsx +1002 -0
- package/src/BryntumTextField.tsx +987 -0
- package/src/BryntumThemeCombo.tsx +101 -0
- package/src/BryntumTimeField.tsx +1036 -0
- package/src/BryntumTimePicker.tsx +893 -0
- package/src/BryntumTimelineHistogram.tsx +3425 -0
- package/src/BryntumToolbar.tsx +917 -0
- package/src/BryntumTreeCombo.tsx +1230 -0
- package/src/BryntumTreeGrid.tsx +2401 -0
- package/src/BryntumUndoRedo.tsx +885 -0
- package/src/BryntumViewPresetCombo.tsx +914 -0
- package/src/BryntumWidget.tsx +715 -0
- package/src/BryntumYearPicker.tsx +1070 -0
- package/src/WrapperHelper.tsx +1125 -0
- package/src/index.ts +76 -0
|
@@ -0,0 +1,1143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React wrapper for Bryntum Menu
|
|
3
|
+
*/
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5
|
+
import React, { RefObject } from 'react';
|
|
6
|
+
import { AlignSpec, Base, Container, ContainerItemConfig, ContainerLayoutConfig, DomConfig, KeyMapConfig, Layout, MaskConfig, Menu, MenuItem, MenuItemConfig, MenuItemEntry, MenuListeners, Model, PagingToolbarConfig, Panel, PanelCollapserConfig, PanelCollapserOverlayConfig, PanelHeader, Popup, Rectangle, StateProvider, TabConfig, Tool, ToolConfig, ToolbarConfig, ToolbarItems, TooltipConfig, VueConfig, Widget } from '@bryntum/scheduler';
|
|
7
|
+
|
|
8
|
+
import { createWidget, shouldComponentUpdate, processWidgetContent } from './WrapperHelper.js';
|
|
9
|
+
|
|
10
|
+
export type BryntumMenuProps = {
|
|
11
|
+
// Configs
|
|
12
|
+
/**
|
|
13
|
+
* Element (or element id) to adopt as this Widget's encapsulating element. The widget's
|
|
14
|
+
* content will be placed inside this element.
|
|
15
|
+
* ...
|
|
16
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-adopt)
|
|
17
|
+
*/
|
|
18
|
+
adopt? : HTMLElement|string
|
|
19
|
+
/**
|
|
20
|
+
* *Only valid if this Widget is [floating](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-floating).*
|
|
21
|
+
* ...
|
|
22
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-align)
|
|
23
|
+
*/
|
|
24
|
+
align? : AlignSpec|string
|
|
25
|
+
/**
|
|
26
|
+
* When this widget is a child of a [Container](https://bryntum.com/products/scheduler/docs/api/Core/widget/Container), it will by default be participating in a
|
|
27
|
+
* flexbox layout. This config allows you to set this widget's
|
|
28
|
+
* [align-self](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self) style.
|
|
29
|
+
*/
|
|
30
|
+
alignSelf? : string
|
|
31
|
+
/**
|
|
32
|
+
* *Only valid if this Widget is [floating](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-floating) and being shown through [showBy](#Core/widget/Widget#function-showBy).*
|
|
33
|
+
* `true` to show a connector arrow pointing to the align target.
|
|
34
|
+
*/
|
|
35
|
+
anchor? : boolean
|
|
36
|
+
/**
|
|
37
|
+
* Element (or the id of an element) to append this widget's element to. Can be configured, or set once at
|
|
38
|
+
* runtime. To access the element of a rendered widget, see [element](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#property-element).
|
|
39
|
+
*/
|
|
40
|
+
appendTo? : HTMLElement|string
|
|
41
|
+
/**
|
|
42
|
+
* A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject
|
|
43
|
+
* into an element which will be linked using the `aria-describedby` attribute.
|
|
44
|
+
* ...
|
|
45
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-ariaDescription)
|
|
46
|
+
*/
|
|
47
|
+
ariaDescription? : string
|
|
48
|
+
/**
|
|
49
|
+
* A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject as
|
|
50
|
+
* the `aria-label` attribute.
|
|
51
|
+
* ...
|
|
52
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-ariaLabel)
|
|
53
|
+
*/
|
|
54
|
+
ariaLabel? : string
|
|
55
|
+
/**
|
|
56
|
+
* By default, a Popup is transient, and will [close](https://bryntum.com/products/scheduler/docs/api/Core/widget/Popup#function-close) when the user clicks or
|
|
57
|
+
* taps outside its owned widgets and when focus moves outside its owned widgets.
|
|
58
|
+
* ...
|
|
59
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-autoClose)
|
|
60
|
+
*/
|
|
61
|
+
autoClose? : boolean
|
|
62
|
+
/**
|
|
63
|
+
* Auto show flag for Popup.
|
|
64
|
+
* If truthy then Popup is shown automatically upon hover.
|
|
65
|
+
*/
|
|
66
|
+
autoShow? : boolean
|
|
67
|
+
/**
|
|
68
|
+
* Update assigned [record](https://bryntum.com/products/scheduler/docs/api/Core/widget/Container#config-record) automatically on field changes
|
|
69
|
+
*/
|
|
70
|
+
autoUpdateRecord? : boolean
|
|
71
|
+
/**
|
|
72
|
+
* A Config object representing the configuration of a [Toolbar](https://bryntum.com/products/scheduler/docs/api/Core/widget/Toolbar),
|
|
73
|
+
* or array of config objects representing the child items of a Toolbar. Another way to add a bbar is to use [strips](https://bryntum.com/products/scheduler/docs/api/Core/widget/Panel#config-strips).
|
|
74
|
+
* ...
|
|
75
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-bbar)
|
|
76
|
+
*/
|
|
77
|
+
bbar? : (ContainerItemConfig|string)[]|ToolbarConfig|PagingToolbarConfig|null
|
|
78
|
+
/**
|
|
79
|
+
* Custom CSS classes to add to the panel's body element.
|
|
80
|
+
* ...
|
|
81
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-bodyCls)
|
|
82
|
+
*/
|
|
83
|
+
bodyCls? : string|object
|
|
84
|
+
/**
|
|
85
|
+
* An object where property names with a truthy value indicate which events should bubble up the ownership
|
|
86
|
+
* hierarchy when triggered.
|
|
87
|
+
* ...
|
|
88
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-bubbleEvents)
|
|
89
|
+
*/
|
|
90
|
+
bubbleEvents? : object
|
|
91
|
+
/**
|
|
92
|
+
* Set to `false` to not call onXXX method names (e.g. `onShow`, `onClick`), as an easy way to listen for events.
|
|
93
|
+
* ...
|
|
94
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-callOnFunctions)
|
|
95
|
+
*/
|
|
96
|
+
callOnFunctions? : boolean
|
|
97
|
+
/**
|
|
98
|
+
* By default, if an event handler throws an exception, the error propagates up the stack and the
|
|
99
|
+
* application state is undefined. Code which follows the event handler will *not* be executed.
|
|
100
|
+
* ...
|
|
101
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-catchEventHandlerExceptions)
|
|
102
|
+
*/
|
|
103
|
+
catchEventHandlerExceptions? : boolean
|
|
104
|
+
/**
|
|
105
|
+
* *Only valid if this Widget is [floating](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-floating).*
|
|
106
|
+
* Set to `true` to centre the Widget in browser viewport space.
|
|
107
|
+
*/
|
|
108
|
+
centered? : boolean
|
|
109
|
+
/**
|
|
110
|
+
* Show a tool in the header to close this Popup.
|
|
111
|
+
* The tool is available in the [tools](https://bryntum.com/products/scheduler/docs/api/Core/widget/mixin/Toolable#property-tools) object
|
|
112
|
+
* under the name `close`. It uses the CSS class `b-popup-close` to apply a
|
|
113
|
+
* default close icon. This may be customized with your own CSS rules.
|
|
114
|
+
*/
|
|
115
|
+
closable? : boolean
|
|
116
|
+
/**
|
|
117
|
+
* The action to take when calling the [close](https://bryntum.com/products/scheduler/docs/api/Core/widget/Popup#function-close) method.
|
|
118
|
+
* By default, the popup is hidden.
|
|
119
|
+
* ...
|
|
120
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-closeAction)
|
|
121
|
+
*/
|
|
122
|
+
closeAction? : 'hide'|'destroy'
|
|
123
|
+
/**
|
|
124
|
+
* Close popup when `ESC` key is pressed.
|
|
125
|
+
*/
|
|
126
|
+
closeOnEscape? : boolean
|
|
127
|
+
/**
|
|
128
|
+
* Custom CSS classes to add to element.
|
|
129
|
+
* May be specified as a space separated string, or as an object in which property names
|
|
130
|
+
* with truthy values are used as the class names:
|
|
131
|
+
* ...
|
|
132
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-cls)
|
|
133
|
+
*/
|
|
134
|
+
cls? : string|object
|
|
135
|
+
/**
|
|
136
|
+
* Controls whether the panel is collapsed (the body of the panel is hidden while only the header is
|
|
137
|
+
* visible). Only valid if the panel is [collapsible](https://bryntum.com/products/scheduler/docs/api/Core/widget/Panel#config-collapsible).
|
|
138
|
+
*/
|
|
139
|
+
collapsed? : boolean
|
|
140
|
+
/**
|
|
141
|
+
* This config enables collapsibility for the panel. See [collapsed](https://bryntum.com/products/scheduler/docs/api/Core/widget/Panel#config-collapsed).
|
|
142
|
+
* ...
|
|
143
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-collapsible)
|
|
144
|
+
*/
|
|
145
|
+
collapsible? : boolean|PanelCollapserConfig|PanelCollapserOverlayConfig
|
|
146
|
+
/**
|
|
147
|
+
* Applies the specified color to the widget, by setting the `--b-primary` CSS variable in the widgets
|
|
148
|
+
* `style` block.
|
|
149
|
+
* ...
|
|
150
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-color)
|
|
151
|
+
*/
|
|
152
|
+
color? : string
|
|
153
|
+
/**
|
|
154
|
+
* Programmatic control over which column to start in when used in a grid layout.
|
|
155
|
+
*/
|
|
156
|
+
column? : number
|
|
157
|
+
config? : object
|
|
158
|
+
/**
|
|
159
|
+
* *Only valid if this Widget is [floating](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-floating) or [positioned](#Core/widget/Widget#config-positioned).*
|
|
160
|
+
* Element, Widget or Rectangle to which this Widget is constrained.
|
|
161
|
+
*/
|
|
162
|
+
constrainTo? : HTMLElement|Widget|Rectangle
|
|
163
|
+
/**
|
|
164
|
+
* The HTML content that coexists with sibling elements which may have been added to the
|
|
165
|
+
* [contentElement](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#property-contentElement) by plugins and features.
|
|
166
|
+
* When specifying html, this widget's element will also have the [htmlCls](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-htmlCls)
|
|
167
|
+
* class added to its classList, to allow targeted styling.
|
|
168
|
+
*/
|
|
169
|
+
content? : string
|
|
170
|
+
/**
|
|
171
|
+
* Custom CSS classes to add to the [contentElement](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#property-contentElement).
|
|
172
|
+
* May be specified as a space separated string, or as an object in which property names
|
|
173
|
+
* with truthy values are used as the class names:
|
|
174
|
+
* ...
|
|
175
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-contentElementCls)
|
|
176
|
+
*/
|
|
177
|
+
contentElementCls? : string|object
|
|
178
|
+
/**
|
|
179
|
+
* When this Widget configuration is used in the Grid's RowExpander feature's `widget` config, provide the
|
|
180
|
+
* field on the expanded record to use for populating this widget's store (if applicable)
|
|
181
|
+
*/
|
|
182
|
+
dataField? : string
|
|
183
|
+
/**
|
|
184
|
+
* Object to apply to elements dataset (each key will be used as a data-attribute on the element)
|
|
185
|
+
*/
|
|
186
|
+
dataset? : Record<string, string>
|
|
187
|
+
/**
|
|
188
|
+
* The name of the property to set when a single value is to be applied to this Widget. Such as when used
|
|
189
|
+
* in a grid WidgetColumn, this is the property to which the column's `field` is applied.
|
|
190
|
+
*/
|
|
191
|
+
defaultBindProperty? : string
|
|
192
|
+
/**
|
|
193
|
+
* A [query](https://bryntum.com/products/scheduler/docs/api/Core/widget/Container#function-query) selector function which can identify the descendant widget to which
|
|
194
|
+
* focus should be directed by default.
|
|
195
|
+
* ...
|
|
196
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-defaultFocus)
|
|
197
|
+
* @param {Core.widget.Widget} widget Widget passed to method
|
|
198
|
+
* @returns {boolean} truthy value if widget is the default one
|
|
199
|
+
*/
|
|
200
|
+
defaultFocus? : ((widget: Widget) => boolean)|string
|
|
201
|
+
/**
|
|
202
|
+
* A config object containing default settings to apply to all child widgets.
|
|
203
|
+
*/
|
|
204
|
+
defaults? : ContainerItemConfig
|
|
205
|
+
/**
|
|
206
|
+
* Check for CSS compatibility issues when upgrading to v7. Performs the following checks:
|
|
207
|
+
* ...
|
|
208
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-detectCSSCompatibilityIssues)
|
|
209
|
+
*/
|
|
210
|
+
detectCSSCompatibilityIssues? : boolean
|
|
211
|
+
/**
|
|
212
|
+
* Disable or enable the widget. It is similar to [readOnly](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-readOnly) except a disabled widget
|
|
213
|
+
* cannot be focused, uses a different rendition (usually greyish) and does not allow selecting its value.
|
|
214
|
+
* ...
|
|
215
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-disabled)
|
|
216
|
+
*/
|
|
217
|
+
disabled? : boolean|'inert'
|
|
218
|
+
/**
|
|
219
|
+
* Controls the placement of this widget when it is added to a [panel's ](https://bryntum.com/products/scheduler/docs/api/Core/widget/Panel)
|
|
220
|
+
* [strips collection](https://bryntum.com/products/scheduler/docs/api/Core/widget/Panel#config-strips). Typical values for this config are `'top'`,
|
|
221
|
+
* `'bottom'`, `'left'`, or `'right'`, which cause the widget to be placed on that side of the panel's
|
|
222
|
+
* body. Such widgets are called "edge strips".
|
|
223
|
+
* ...
|
|
224
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-dock)
|
|
225
|
+
*/
|
|
226
|
+
dock? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
|
|
227
|
+
/**
|
|
228
|
+
* Set to `false` to prevent dragging the popup element.
|
|
229
|
+
*/
|
|
230
|
+
draggable? : boolean|{
|
|
231
|
+
handleSelector?: string
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Make this Panel a docked drawer which slides out from one side of the browser viewport by default.
|
|
235
|
+
* ...
|
|
236
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-drawer)
|
|
237
|
+
* @param {'start','left','end','right','top','bottom'} side The side of the viewport to dock the drawer to. * `'start'` means the `inline-start` side. * `'end'` means the `inline-end` side.
|
|
238
|
+
* @param {string,number} size The size of the drawer in its collapsible axis.
|
|
239
|
+
* @param {boolean} inline If using the [appendTo](https://bryntum.com/products/scheduler/docs/api/Core/widget/Panel#config-appendTo) config to place the drawer inside a host widget, this may be set to `true` to make the drawer inline within that host. Note that, if using this, the layout of the host element must have `flex-direction` set appropriately.
|
|
240
|
+
* @param {boolean,object} autoClose Specifies what user actions should automatically close the drawer. Defaults to closing when the user clicks outside of the drawer or when focus moves outside of the drawer.
|
|
241
|
+
* @param {boolean,string} autoClose.mousedown If the user clicks outside of the drawer, the drawer will automatically be hidden. If the value is a string, it is used as a CSS selector to filter clicks which should close the drawer.
|
|
242
|
+
* @param {boolean,string} autoClose.focusout If focus moves outside of the drawer, the drawer will automatically be hidden.
|
|
243
|
+
* @param {string} autoClose.mouseout Hides the drawer when the mouse leaves the drawer after the `autoCloseDelay` period.
|
|
244
|
+
* @param {number} autoCloseDelay When using `mouseout`, this is the delay in milliseconds
|
|
245
|
+
*/
|
|
246
|
+
drawer? : boolean|{side?: 'start'|'left'|'end'|'right'|'top'|'bottom', size?: string|number, inline?: boolean, autoClose: { mousedown?: boolean|string, focusout?: boolean|string, mouseout?: string }, autoCloseDelay?: number}
|
|
247
|
+
/**
|
|
248
|
+
* An object specifying attributes to assign to the root element of this widget.
|
|
249
|
+
* Set `null` value to attribute to remove it.
|
|
250
|
+
* ...
|
|
251
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-elementAttributes)
|
|
252
|
+
*/
|
|
253
|
+
elementAttributes? : Record<string, string|null>
|
|
254
|
+
extraData? : any
|
|
255
|
+
/**
|
|
256
|
+
* When this widget is a child of a [Container](https://bryntum.com/products/scheduler/docs/api/Core/widget/Container), it will by default be participating in a
|
|
257
|
+
* flexbox layout. This config allows you to set this widget's
|
|
258
|
+
* [flex](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) style.
|
|
259
|
+
* This may be configured as a single number or a `<flex-grow> <flex-shrink> <flex-basis>` format string.
|
|
260
|
+
* numeric-only values are interpreted as the `flex-grow` value.
|
|
261
|
+
*/
|
|
262
|
+
flex? : number|string
|
|
263
|
+
/**
|
|
264
|
+
* Set to `true` to move the widget out of the document flow and position it
|
|
265
|
+
* absolutely in browser viewport space.
|
|
266
|
+
*/
|
|
267
|
+
floating? : boolean
|
|
268
|
+
/**
|
|
269
|
+
* Specify false to prevent the menu from getting focus when hovering items
|
|
270
|
+
*/
|
|
271
|
+
focusOnHover? : boolean
|
|
272
|
+
/**
|
|
273
|
+
* By default a Popup is focused when it is shown.
|
|
274
|
+
* Configure this as `false` to prevent automatic focus on show.
|
|
275
|
+
*/
|
|
276
|
+
focusOnToFront? : boolean
|
|
277
|
+
/**
|
|
278
|
+
* Config object of a footer. May contain a `dock`, `html` and a `cls` property. A footer is not a widget,
|
|
279
|
+
* but rather plain HTML that follows the last element of the panel's body and [strips](https://bryntum.com/products/scheduler/docs/api/Core/widget/Panel#config-strips).
|
|
280
|
+
* ...
|
|
281
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-footer)
|
|
282
|
+
*/
|
|
283
|
+
footer? : {
|
|
284
|
+
dock?: 'top'|'right'|'bottom'|'left'|'start'|'end'
|
|
285
|
+
html?: string
|
|
286
|
+
cls?: string
|
|
287
|
+
}|string
|
|
288
|
+
/**
|
|
289
|
+
* DOM element to attach popup.
|
|
290
|
+
*/
|
|
291
|
+
forElement? : HTMLElement
|
|
292
|
+
/**
|
|
293
|
+
* A config [object](https://bryntum.com/products/scheduler/docs/api/Core/widget/Panel#typedef-PanelHeader) for the panel's header or a string in place of a `title`.
|
|
294
|
+
* ...
|
|
295
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-header)
|
|
296
|
+
*/
|
|
297
|
+
header? : string|boolean|PanelHeader
|
|
298
|
+
/**
|
|
299
|
+
* Widget's height, used to set element `style.height`. Either specify a valid height string or a number,
|
|
300
|
+
* which will get 'px' appended. We recommend using CSS as the primary way to control height, but in some
|
|
301
|
+
* cases this config is convenient.
|
|
302
|
+
*/
|
|
303
|
+
height? : string|number
|
|
304
|
+
/**
|
|
305
|
+
* Configure with true to make widget initially hidden.
|
|
306
|
+
*/
|
|
307
|
+
hidden? : boolean
|
|
308
|
+
/**
|
|
309
|
+
* *Only valid if this Widget is [floating](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-floating).*
|
|
310
|
+
* ...
|
|
311
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-hideAnimation)
|
|
312
|
+
*/
|
|
313
|
+
hideAnimation? : boolean|object
|
|
314
|
+
/**
|
|
315
|
+
* Specify `true` to make this container hide when it has no visible children (Either empty
|
|
316
|
+
* or all children hidden).
|
|
317
|
+
* ...
|
|
318
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-hideWhenEmpty)
|
|
319
|
+
*/
|
|
320
|
+
hideWhenEmpty? : boolean
|
|
321
|
+
/**
|
|
322
|
+
* The HTML to display initially or a function returning the markup (called at widget construction time).
|
|
323
|
+
* ...
|
|
324
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-html)
|
|
325
|
+
* @param {Core.widget.Widget} widget The calling Widget
|
|
326
|
+
* @returns {string}
|
|
327
|
+
*/
|
|
328
|
+
html? : string|((widget: Widget) => string)|DomConfig|DomConfig[]|VueConfig
|
|
329
|
+
/**
|
|
330
|
+
* The CSS class(es) to add when HTML content is being applied to this widget.
|
|
331
|
+
*/
|
|
332
|
+
htmlCls? : string|object
|
|
333
|
+
/**
|
|
334
|
+
* An icon to show before the [title](https://bryntum.com/products/scheduler/docs/api/Core/widget/Panel#config-title). Either pass a CSS class as a string, or pass a
|
|
335
|
+
* [DomConfig](https://bryntum.com/products/scheduler/docs/api/Core/helper/DomHelper#typedef-DomConfig) object describing an element to represent the icon.
|
|
336
|
+
*/
|
|
337
|
+
icon? : string|DomConfig
|
|
338
|
+
/**
|
|
339
|
+
* Widget id, if not specified one will be generated. Also used for lookups through Widget.getById
|
|
340
|
+
*/
|
|
341
|
+
id? : string
|
|
342
|
+
/**
|
|
343
|
+
* Determines if the widgets read-only state should be controlled by its parent.
|
|
344
|
+
* ...
|
|
345
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-ignoreParentReadOnly)
|
|
346
|
+
*/
|
|
347
|
+
ignoreParentReadOnly? : boolean
|
|
348
|
+
/**
|
|
349
|
+
* Convenience setting to align input fields of child widgets. By default, the Field input element is
|
|
350
|
+
* placed immediately following the `label`. If you prefer to have all input fields aligned to the
|
|
351
|
+
* right, set this config to `'end'`.
|
|
352
|
+
* ...
|
|
353
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-inputFieldAlign)
|
|
354
|
+
*/
|
|
355
|
+
inputFieldAlign? : 'start'|'end'
|
|
356
|
+
/**
|
|
357
|
+
* Element (or element id) to insert this widget before. If provided, [appendTo](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
|
|
358
|
+
*/
|
|
359
|
+
insertBefore? : HTMLElement|string
|
|
360
|
+
/**
|
|
361
|
+
* Element (or element id) to append this widget element to, as a first child. If provided, [appendTo](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
|
|
362
|
+
*/
|
|
363
|
+
insertFirst? : HTMLElement|string
|
|
364
|
+
/**
|
|
365
|
+
* An optional CSS class to add to child items of this container.
|
|
366
|
+
*/
|
|
367
|
+
itemCls? : string
|
|
368
|
+
/**
|
|
369
|
+
* An object containing typed child widget config objects or Widgets. May also be specified
|
|
370
|
+
* as an array.
|
|
371
|
+
* ...
|
|
372
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-items)
|
|
373
|
+
*/
|
|
374
|
+
items? : Record<string, ContainerItemConfig|MenuItemEntry>|(ContainerItemConfig|MenuItemEntry|Widget)[]
|
|
375
|
+
/**
|
|
376
|
+
* An object whose keys are the [key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) name
|
|
377
|
+
* and optional modifier prefixes: `'Ctrl+'`, `'Alt+'`, `'Meta+'`, and `'Shift+'` (case-insensitive). The values
|
|
378
|
+
* are the name of the instance method to call when the keystroke is received.
|
|
379
|
+
* ...
|
|
380
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-keyMap)
|
|
381
|
+
*/
|
|
382
|
+
keyMap? : Record<string, KeyMapConfig>
|
|
383
|
+
/**
|
|
384
|
+
* Convenience setting to use same label placement on all child widgets.
|
|
385
|
+
* ...
|
|
386
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-labelPosition)
|
|
387
|
+
*/
|
|
388
|
+
labelPosition? : 'before'|'above'|'align-before'|'auto'|null
|
|
389
|
+
/**
|
|
390
|
+
* The short name of a helper class which manages rendering and styling of child items.
|
|
391
|
+
* ...
|
|
392
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-layout)
|
|
393
|
+
*/
|
|
394
|
+
layout? : string|ContainerLayoutConfig
|
|
395
|
+
/**
|
|
396
|
+
* The CSS style properties to apply to the [contentElement](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#property-contentElement).
|
|
397
|
+
* ...
|
|
398
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-layoutStyle)
|
|
399
|
+
*/
|
|
400
|
+
layoutStyle? : object
|
|
401
|
+
/**
|
|
402
|
+
* An array of [child item](https://bryntum.com/products/scheduler/docs/api/Core/widget/Container#config-items) *config objects* which is to be converted into
|
|
403
|
+
* instances only when this Container is rendered, rather than eagerly at construct time.
|
|
404
|
+
* ...
|
|
405
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-lazyItems)
|
|
406
|
+
*/
|
|
407
|
+
lazyItems? : Record<string, ContainerItemConfig>|ContainerItemConfig[]|Widget[]
|
|
408
|
+
/**
|
|
409
|
+
* The listener set for this object.
|
|
410
|
+
* ...
|
|
411
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-listeners)
|
|
412
|
+
*/
|
|
413
|
+
listeners? : MenuListeners
|
|
414
|
+
/**
|
|
415
|
+
* A class translations of which are used for translating this entity.
|
|
416
|
+
* This is often used when translations of an item are defined on its container class.
|
|
417
|
+
* For example:
|
|
418
|
+
* ...
|
|
419
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-localeClass)
|
|
420
|
+
*/
|
|
421
|
+
localeClass? : typeof Base
|
|
422
|
+
/**
|
|
423
|
+
* Set to `false` to disable localization of this object.
|
|
424
|
+
*/
|
|
425
|
+
localizable? : boolean
|
|
426
|
+
/**
|
|
427
|
+
* List of properties which values should be translated automatically upon a locale applying.
|
|
428
|
+
* In case there is a need to localize not typical value (not a String value or a field with re-defined setter/getter),
|
|
429
|
+
* you could use 'localeKey' meta configuration.
|
|
430
|
+
* Example:
|
|
431
|
+
* ...
|
|
432
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-localizableProperties)
|
|
433
|
+
*/
|
|
434
|
+
localizableProperties? : string[]
|
|
435
|
+
/**
|
|
436
|
+
* Widget's margin. This may be configured as a single number or a `TRBL` format string.
|
|
437
|
+
* numeric-only values are interpreted as pixels.
|
|
438
|
+
*/
|
|
439
|
+
margin? : number|string
|
|
440
|
+
/**
|
|
441
|
+
* This config object contains the defaults for the [Mask](https://bryntum.com/products/scheduler/docs/api/Core/widget/Mask) created for the
|
|
442
|
+
* [masked](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-masked) config. Any properties specified in the `masked` config will override these
|
|
443
|
+
* values.
|
|
444
|
+
*/
|
|
445
|
+
maskDefaults? : MaskConfig
|
|
446
|
+
/**
|
|
447
|
+
* Set to `true` to apply the default mask to the widget. Alternatively, this can be the mask message or a
|
|
448
|
+
* [Mask](https://bryntum.com/products/scheduler/docs/api/Core/widget/Mask) config object.
|
|
449
|
+
*/
|
|
450
|
+
masked? : boolean|string|MaskConfig
|
|
451
|
+
/**
|
|
452
|
+
* The element's maxHeight. Can be either a String or a Number (which will have 'px' appended). Note that
|
|
453
|
+
* like [height](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
|
|
454
|
+
*/
|
|
455
|
+
maxHeight? : string|number
|
|
456
|
+
/**
|
|
457
|
+
* Show a tool in the header to maximize this popup
|
|
458
|
+
*/
|
|
459
|
+
maximizable? : boolean
|
|
460
|
+
/**
|
|
461
|
+
* Set to `true` to make this widget take all available space in the visible viewport.
|
|
462
|
+
*/
|
|
463
|
+
maximized? : boolean
|
|
464
|
+
/**
|
|
465
|
+
* *Only valid if this Widget is [floating](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-floating).*
|
|
466
|
+
* ...
|
|
467
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-maximizeOnMobile)
|
|
468
|
+
*/
|
|
469
|
+
maximizeOnMobile? : number|string
|
|
470
|
+
/**
|
|
471
|
+
* The elements maxWidth. Can be either a String or a Number (which will have 'px' appended). Note that
|
|
472
|
+
* like [width](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
|
|
473
|
+
*/
|
|
474
|
+
maxWidth? : string|number
|
|
475
|
+
/**
|
|
476
|
+
* The element's minHeight. Can be either a String or a Number (which will have 'px' appended). Note that
|
|
477
|
+
* like [height](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
|
|
478
|
+
*/
|
|
479
|
+
minHeight? : string|number
|
|
480
|
+
/**
|
|
481
|
+
* The elements minWidth. Can be either a String or a Number (which will have 'px' appended). Note that
|
|
482
|
+
* like [width](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
|
|
483
|
+
*/
|
|
484
|
+
minWidth? : string|number
|
|
485
|
+
/**
|
|
486
|
+
* Optionally show an opaque mask below this Popup when shown.
|
|
487
|
+
* Configure this as `true` to show the mask.
|
|
488
|
+
* ...
|
|
489
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-modal)
|
|
490
|
+
*/
|
|
491
|
+
modal? : boolean|{
|
|
492
|
+
closeOnMaskTap?: boolean
|
|
493
|
+
transparent?: boolean
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* When this is configured as `true` a [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
|
|
497
|
+
* is used to monitor this element for size changes caused by either style manipulation, or by CSS
|
|
498
|
+
* layout.
|
|
499
|
+
* ...
|
|
500
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-monitorResize)
|
|
501
|
+
*/
|
|
502
|
+
monitorResize? : boolean|{
|
|
503
|
+
immediate?: boolean
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* An object containing default config objects which may be referenced by name in the [items](https://bryntum.com/products/scheduler/docs/api/Core/widget/Container#config-items)
|
|
507
|
+
* config. For example, a specialized [Menu](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu) subclass may have a `namedItems` default
|
|
508
|
+
* value defined like this:
|
|
509
|
+
* ...
|
|
510
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-namedItems)
|
|
511
|
+
*/
|
|
512
|
+
namedItems? : Record<string, ContainerItemConfig>
|
|
513
|
+
/**
|
|
514
|
+
* The owning Widget of this Widget. If this Widget is directly contained (that is, it is one of the
|
|
515
|
+
* [items](https://bryntum.com/products/scheduler/docs/api/Core/widget/Container#property-items) of a Container), this config will be ignored. In this case
|
|
516
|
+
* the owner is <strong>always</strong> the encapsulating Container.
|
|
517
|
+
* ...
|
|
518
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-owner)
|
|
519
|
+
*/
|
|
520
|
+
owner? : Widget|any
|
|
521
|
+
/**
|
|
522
|
+
* Set to `true` when a widget is rendered into another widget's [contentElement](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#property-contentElement), but must
|
|
523
|
+
* not participate in the standard layout of that widget, and must be positioned relatively to that
|
|
524
|
+
* widget's [contentElement](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#property-contentElement).
|
|
525
|
+
* ...
|
|
526
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-positioned)
|
|
527
|
+
*/
|
|
528
|
+
positioned? : boolean
|
|
529
|
+
/**
|
|
530
|
+
* Prevent tooltip from being displayed on touch devices. Useful for example for buttons that display a
|
|
531
|
+
* menu on click etc, since the tooltip would be displayed at the same time.
|
|
532
|
+
*/
|
|
533
|
+
preventTooltipOnTouch? : boolean
|
|
534
|
+
/**
|
|
535
|
+
* Whether this widget is read-only. This is only valid if the widget is an input
|
|
536
|
+
* field, <strong>or contains input fields at any depth</strong>.
|
|
537
|
+
* ...
|
|
538
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-readOnly)
|
|
539
|
+
*/
|
|
540
|
+
readOnly? : boolean
|
|
541
|
+
/**
|
|
542
|
+
* [Record](https://bryntum.com/products/scheduler/docs/api/Core/data/Model) whose values will be used to populate fields in the container.
|
|
543
|
+
* ...
|
|
544
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-record)
|
|
545
|
+
*/
|
|
546
|
+
record? : Model
|
|
547
|
+
relayStoreEvents? : boolean
|
|
548
|
+
/**
|
|
549
|
+
* Either a default `rendition` to apply to all child widgets, or a map of renditions keyed by child widget
|
|
550
|
+
* `type`.
|
|
551
|
+
* ...
|
|
552
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-rendition)
|
|
553
|
+
*/
|
|
554
|
+
rendition? : string|Record<string, string>|null
|
|
555
|
+
/**
|
|
556
|
+
* Configure this property to allow the widget/component to be resized. Pressing <kbd>Shift</kbd> while resizing will
|
|
557
|
+
* constrain the aspect ratio.
|
|
558
|
+
* ...
|
|
559
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-resizable)
|
|
560
|
+
*/
|
|
561
|
+
resizable? : boolean|{
|
|
562
|
+
minWidth?: number
|
|
563
|
+
maxWidth?: number
|
|
564
|
+
minHeight?: number
|
|
565
|
+
maxHeight?: number
|
|
566
|
+
handles?: object
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* Configure as `true` to have the component display a translucent ripple when its
|
|
570
|
+
* [focusElement](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#property-focusElement), or [element](#Core/widget/Widget#property-element) is tapped <em>if the
|
|
571
|
+
* current theme supports ripples</em>. Out of the box, only the Material theme supports ripples.
|
|
572
|
+
* ...
|
|
573
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-ripple)
|
|
574
|
+
*/
|
|
575
|
+
ripple? : boolean|{
|
|
576
|
+
delegate?: string
|
|
577
|
+
color?: string
|
|
578
|
+
radius?: number
|
|
579
|
+
clip?: string
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* If you are rendering this widget to a shadow root inside a web component, set this config to the shadowRoot. If not inside a web component, set it to `document.body`
|
|
583
|
+
*/
|
|
584
|
+
rootElement? : ShadowRoot|HTMLElement
|
|
585
|
+
/**
|
|
586
|
+
* This may be configured as `true` to make the widget's element use the `direction:rtl` style.
|
|
587
|
+
* ...
|
|
588
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-rtl)
|
|
589
|
+
*/
|
|
590
|
+
rtl? : boolean
|
|
591
|
+
/**
|
|
592
|
+
* Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to `true`).
|
|
593
|
+
* Valid values: ´null´: do nothing, ´hide´: hide the widget or ´realign´: realign to the target if possible.
|
|
594
|
+
*/
|
|
595
|
+
scrollAction? : 'hide'|'realign'|null
|
|
596
|
+
/**
|
|
597
|
+
* *Only valid if this Widget is [floating](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-floating).*
|
|
598
|
+
* ...
|
|
599
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-showAnimation)
|
|
600
|
+
*/
|
|
601
|
+
showAnimation? : boolean|object
|
|
602
|
+
/**
|
|
603
|
+
* Show popup when user clicks the element that it is anchored to. Cannot be combined with showOnHover. Can
|
|
604
|
+
* also be provided as the button number (0: main button, 2: right button).
|
|
605
|
+
*/
|
|
606
|
+
showOnClick? : boolean|number
|
|
607
|
+
/**
|
|
608
|
+
* Set to `false` to not show the tooltip when this widget is [disabled](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#property-disabled)
|
|
609
|
+
*/
|
|
610
|
+
showTooltipWhenDisabled? : boolean
|
|
611
|
+
/**
|
|
612
|
+
* Programmatic control over how many columns to span when used in a grid layout.
|
|
613
|
+
*/
|
|
614
|
+
span? : number
|
|
615
|
+
/**
|
|
616
|
+
* This value can be one of the following:
|
|
617
|
+
* ...
|
|
618
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-stateful)
|
|
619
|
+
*/
|
|
620
|
+
stateful? : boolean|object|string[]
|
|
621
|
+
/**
|
|
622
|
+
* The events that, when fired by this component, should trigger it to save its state by calling
|
|
623
|
+
* [saveState](https://bryntum.com/products/scheduler/docs/api/Core/mixin/State#function-saveState).
|
|
624
|
+
* ...
|
|
625
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-statefulEvents)
|
|
626
|
+
*/
|
|
627
|
+
statefulEvents? : object|string[]
|
|
628
|
+
/**
|
|
629
|
+
* The key to use when saving this object's state in the [stateProvider](https://bryntum.com/products/scheduler/docs/api/Core/mixin/State#config-stateProvider). If this config is
|
|
630
|
+
* not assigned, and [stateful](https://bryntum.com/products/scheduler/docs/api/Core/mixin/State#config-stateful) is not set to `false`, the [id](#Core/widget/Widget#config-id)
|
|
631
|
+
* (if explicitly specified) will be used as the `stateId`.
|
|
632
|
+
* ...
|
|
633
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-stateId)
|
|
634
|
+
*/
|
|
635
|
+
stateId? : string
|
|
636
|
+
/**
|
|
637
|
+
* The `StateProvider` to use to save and restore this object's [state](https://bryntum.com/products/scheduler/docs/api/Core/mixin/State#property-state). By default, `state`
|
|
638
|
+
* will be saved using the [default state provider](https://bryntum.com/products/scheduler/docs/api/Core/state/StateProvider#property-instance-static).
|
|
639
|
+
* ...
|
|
640
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-stateProvider)
|
|
641
|
+
*/
|
|
642
|
+
stateProvider? : StateProvider
|
|
643
|
+
/**
|
|
644
|
+
* Specify `true` to match fields by their `name` property only when assigning a [record](https://bryntum.com/products/scheduler/docs/api/Core/widget/Container#config-record),
|
|
645
|
+
* without falling back to `ref`.
|
|
646
|
+
*/
|
|
647
|
+
strictRecordMapping? : boolean
|
|
648
|
+
/**
|
|
649
|
+
* An object containing widgets keyed by name. By default (when no `type` is given), strips are
|
|
650
|
+
* [toolbars](https://bryntum.com/products/scheduler/docs/api/Core/widget/Toolbar). If you want to pass an array, you can use
|
|
651
|
+
* the toolbar's [items](https://bryntum.com/products/scheduler/docs/api/Core/widget/Container#config-items).
|
|
652
|
+
* ...
|
|
653
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-strips)
|
|
654
|
+
*/
|
|
655
|
+
strips? : Record<string, ContainerItemConfig>
|
|
656
|
+
/**
|
|
657
|
+
* A configuration for the [tab](https://bryntum.com/products/scheduler/docs/api/Core/widget/Tab) created for this widget when it is placed in a
|
|
658
|
+
* [TabPanel](https://bryntum.com/products/scheduler/docs/api/Core/widget/TabPanel). For example, this config can be used to control the icon of the `tab` for
|
|
659
|
+
* this widget:
|
|
660
|
+
* ...
|
|
661
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-tab)
|
|
662
|
+
*/
|
|
663
|
+
tab? : boolean|TabConfig
|
|
664
|
+
/**
|
|
665
|
+
* When this container is used as a tab in a TabPanel, these items are added to the
|
|
666
|
+
* [TabBar](https://bryntum.com/products/scheduler/docs/api/Core/widget/TabBar) when this container is the active tab.
|
|
667
|
+
* ...
|
|
668
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-tabBarItems)
|
|
669
|
+
*/
|
|
670
|
+
tabBarItems? : ToolbarItems[]|Widget[]
|
|
671
|
+
/**
|
|
672
|
+
* The tag name of this Widget's root element
|
|
673
|
+
*/
|
|
674
|
+
tag? : string
|
|
675
|
+
/**
|
|
676
|
+
* A Config object representing the configuration of a [Toolbar](https://bryntum.com/products/scheduler/docs/api/Core/widget/Toolbar),
|
|
677
|
+
* or array of config objects representing the child items of a Toolbar.
|
|
678
|
+
* This creates a toolbar docked to the top of the panel immediately below the header.
|
|
679
|
+
* ...
|
|
680
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-tbar)
|
|
681
|
+
*/
|
|
682
|
+
tbar? : (ContainerItemConfig|string)[]|ToolbarConfig|PagingToolbarConfig|null
|
|
683
|
+
/**
|
|
684
|
+
* Text alignment: 'left', 'center' or 'right'. Also accepts direction neutral 'start' and 'end'.
|
|
685
|
+
* ...
|
|
686
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-textAlign)
|
|
687
|
+
*/
|
|
688
|
+
textAlign? : 'left'|'center'|'right'|'start'|'end'
|
|
689
|
+
/**
|
|
690
|
+
* Specify `true` for a container used to show text markup. It will apply the CSS class `b-text-content`
|
|
691
|
+
* which specifies a default max-width that makes long text more readable.
|
|
692
|
+
* ...
|
|
693
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-textContent)
|
|
694
|
+
*/
|
|
695
|
+
textContent? : boolean
|
|
696
|
+
/**
|
|
697
|
+
* A title to display in the header or owning TabPanel. Causes creation and docking of a header
|
|
698
|
+
* to the top if no header is configured.
|
|
699
|
+
* ...
|
|
700
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-title)
|
|
701
|
+
*/
|
|
702
|
+
title? : string
|
|
703
|
+
/**
|
|
704
|
+
* The [tools](https://bryntum.com/products/scheduler/docs/api/Core/widget/Tool) to add either before or after the `title` in the Panel header. Each
|
|
705
|
+
* property name is the reference by which an instantiated tool may be retrieved from the live
|
|
706
|
+
* `[tools](https://bryntum.com/products/scheduler/docs/api/Core/widget/mixin/Toolable#property-tools)` property.
|
|
707
|
+
* ...
|
|
708
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-tools)
|
|
709
|
+
*/
|
|
710
|
+
tools? : Record<string, ToolConfig>|null
|
|
711
|
+
/**
|
|
712
|
+
* Tooltip for the widget, either as a string or as a Tooltip config object.
|
|
713
|
+
* ...
|
|
714
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-tooltip)
|
|
715
|
+
*/
|
|
716
|
+
tooltip? : string|TooltipConfig|null
|
|
717
|
+
/**
|
|
718
|
+
* By default, tabbing within a Popup is circular - that is it does not exit.
|
|
719
|
+
* Configure this as `false` to allow tabbing out of the Popup.
|
|
720
|
+
*/
|
|
721
|
+
trapFocus? : boolean
|
|
722
|
+
type? : 'menu'
|
|
723
|
+
/**
|
|
724
|
+
* Custom CSS class name suffixes to apply to the elements rendered by this widget. This may be specified
|
|
725
|
+
* as a space separated string, an array of strings, or as an object in which property names with truthy
|
|
726
|
+
* values are used as the class names.
|
|
727
|
+
* ...
|
|
728
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-ui)
|
|
729
|
+
*/
|
|
730
|
+
ui? : 'plain'|'toolbar'|string|object
|
|
731
|
+
/**
|
|
732
|
+
* A widgets weight determines its position among siblings when added to a [Container](https://bryntum.com/products/scheduler/docs/api/Core/widget/Container).
|
|
733
|
+
* Higher weights go further down.
|
|
734
|
+
*/
|
|
735
|
+
weight? : number
|
|
736
|
+
/**
|
|
737
|
+
* Widget's width, used to set element `style.width`. Either specify a valid width string or a number, which
|
|
738
|
+
* will get 'px' appended. We recommend using CSS as the primary way to control width, but in some cases
|
|
739
|
+
* this config is convenient.
|
|
740
|
+
*/
|
|
741
|
+
width? : string|number
|
|
742
|
+
/**
|
|
743
|
+
* The x position for the widget.
|
|
744
|
+
* ...
|
|
745
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-x)
|
|
746
|
+
*/
|
|
747
|
+
x? : number
|
|
748
|
+
/**
|
|
749
|
+
* The y position for the widget.
|
|
750
|
+
* ...
|
|
751
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#config-y)
|
|
752
|
+
*/
|
|
753
|
+
y? : number
|
|
754
|
+
|
|
755
|
+
// Events
|
|
756
|
+
/**
|
|
757
|
+
* Fired when the [close](https://bryntum.com/products/scheduler/docs/api/Core/widget/Popup#function-close) method is called and the popup is not hidden.
|
|
758
|
+
* May be vetoed by returning `false` from a handler.
|
|
759
|
+
* @param {object} event Event object
|
|
760
|
+
* @param {Core.widget.Popup} event.source This Popup
|
|
761
|
+
*/
|
|
762
|
+
onBeforeClose? : ((event: { source: Popup }) => Promise<boolean>|boolean|void)|string
|
|
763
|
+
/**
|
|
764
|
+
* Fires before an object is destroyed.
|
|
765
|
+
* @param {object} event Event object
|
|
766
|
+
* @param {Core.Base} event.source The Object that is being destroyed.
|
|
767
|
+
*/
|
|
768
|
+
onBeforeDestroy? : ((event: { source: Base }) => void)|string
|
|
769
|
+
/**
|
|
770
|
+
* Triggered before a widget is hidden. Return `false` to prevent the action.
|
|
771
|
+
* @param {object} event Event object
|
|
772
|
+
* @param {Core.widget.Widget} event.source The widget being hidden.
|
|
773
|
+
*/
|
|
774
|
+
onBeforeHide? : ((event: { source: Widget }) => Promise<boolean>|boolean|void)|string
|
|
775
|
+
/**
|
|
776
|
+
* Fired before this container will load record values into its child fields. This is useful if you
|
|
777
|
+
* want to modify the UI before data is loaded (e.g. set some input field to be readonly)
|
|
778
|
+
* @param {object} event Event object
|
|
779
|
+
* @param {Core.widget.Container} event.source The container
|
|
780
|
+
* @param {Core.data.Model} event.record The record
|
|
781
|
+
*/
|
|
782
|
+
onBeforeSetRecord? : ((event: { source: Container, record: Model }) => void)|string
|
|
783
|
+
/**
|
|
784
|
+
* Triggered before a widget is shown. Return `false` to prevent the action.
|
|
785
|
+
* @param {object} event Event object
|
|
786
|
+
* @param {Core.widget.Widget,any} event.source The widget being shown
|
|
787
|
+
*/
|
|
788
|
+
onBeforeShow? : ((event: { source: Widget|any }) => Promise<boolean>|boolean|void)|string
|
|
789
|
+
/**
|
|
790
|
+
* Fired before state is applied to the source. Allows editing the state object or preventing the operation.
|
|
791
|
+
* @param {object} event Event object
|
|
792
|
+
* @param {any} event.state State object config
|
|
793
|
+
*/
|
|
794
|
+
onBeforeStateApply? : ((event: { state: any }) => Promise<boolean>|boolean|void)|string
|
|
795
|
+
/**
|
|
796
|
+
* Fired before state is saved by the StateProvider. Allows editing the state object or preventing the operation.
|
|
797
|
+
* @param {object} event Event object
|
|
798
|
+
* @param {any} event.state State object config
|
|
799
|
+
*/
|
|
800
|
+
onBeforeStateSave? : ((event: { state: any }) => Promise<boolean>|boolean|void)|string
|
|
801
|
+
/**
|
|
802
|
+
* Fires when any other event is fired from the object.
|
|
803
|
+
* ...
|
|
804
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#event-catchAll)
|
|
805
|
+
* @param {object} event Event object
|
|
806
|
+
* @param {{[key: string]: any, type: string}} event.event The Object that contains event details
|
|
807
|
+
* @param {string} event.event.type The type of the event which is caught by the listener
|
|
808
|
+
*/
|
|
809
|
+
onCatchAll? : ((event: {[key: string]: any, type: string}) => void)|string
|
|
810
|
+
/**
|
|
811
|
+
* Fires when a Panel is collapsed using the [collapsible](https://bryntum.com/products/scheduler/docs/api/Core/widget/Panel#config-collapsible) setting.
|
|
812
|
+
* @param {object} event Event object
|
|
813
|
+
* @param {Core.widget.Panel} event.source This Panel.
|
|
814
|
+
*/
|
|
815
|
+
onCollapse? : ((event: { source: Panel }) => void)|string
|
|
816
|
+
/**
|
|
817
|
+
* Fires when an object is destroyed.
|
|
818
|
+
* @param {object} event Event object
|
|
819
|
+
* @param {Core.Base} event.source The Object that is being destroyed.
|
|
820
|
+
*/
|
|
821
|
+
onDestroy? : ((event: { source: Base }) => void)|string
|
|
822
|
+
/**
|
|
823
|
+
* Fires when a field is mutated and the state of the [hasChanges](https://bryntum.com/products/scheduler/docs/api/Core/widget/Container#property-hasChanges) property changes
|
|
824
|
+
* @param {object} event Event object
|
|
825
|
+
* @param {Core.widget.Container} event.source The container.
|
|
826
|
+
* @param {boolean} event.dirty The dirty state of the Container - `true` if there are any fields which have been changed since initial load.
|
|
827
|
+
*/
|
|
828
|
+
onDirtyStateChange? : ((event: { source: Container, dirty: boolean }) => void)|string
|
|
829
|
+
/**
|
|
830
|
+
* Triggered when a widget's [element](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#property-element) is available.
|
|
831
|
+
* @param {object} event Event object
|
|
832
|
+
* @param {HTMLElement} event.element The Widget's element.
|
|
833
|
+
*/
|
|
834
|
+
onElementCreated? : ((event: { element: HTMLElement }) => void)|string
|
|
835
|
+
/**
|
|
836
|
+
* Fires when a Panel is expanded using the [collapsible](https://bryntum.com/products/scheduler/docs/api/Core/widget/Panel#config-collapsible) setting.
|
|
837
|
+
* @param {object} event Event object
|
|
838
|
+
* @param {Core.widget.Panel} event.source This Panel.
|
|
839
|
+
*/
|
|
840
|
+
onExpand? : ((event: { source: Panel }) => void)|string
|
|
841
|
+
/**
|
|
842
|
+
* Fired when focus enters this Widget.
|
|
843
|
+
* @param {object} event Event object
|
|
844
|
+
* @param {Core.widget.Widget} event.source This Widget
|
|
845
|
+
* @param {HTMLElement} event.fromElement The element which lost focus.
|
|
846
|
+
* @param {HTMLElement} event.toElement The element which gained focus.
|
|
847
|
+
* @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
|
|
848
|
+
* @param {Core.widget.Widget} event.toWidget The widget which gained focus.
|
|
849
|
+
* @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
|
|
850
|
+
*/
|
|
851
|
+
onFocusIn? : ((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string
|
|
852
|
+
/**
|
|
853
|
+
* Fired when focus exits this Widget's ownership tree. This is different from a `blur` event.
|
|
854
|
+
* focus moving from within this Widget's ownership tree, even if there are floating widgets
|
|
855
|
+
* will not trigger this event. This is when focus exits this widget completely.
|
|
856
|
+
* @param {object} event Event object
|
|
857
|
+
* @param {Core.widget.Widget} event.source This Widget
|
|
858
|
+
* @param {HTMLElement} event.fromElement The element which lost focus.
|
|
859
|
+
* @param {HTMLElement} event.toElement The element which gained focus.
|
|
860
|
+
* @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
|
|
861
|
+
* @param {Core.widget.Widget} event.toWidget The widget which gained focus.
|
|
862
|
+
* @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
|
|
863
|
+
*/
|
|
864
|
+
onFocusOut? : ((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string
|
|
865
|
+
/**
|
|
866
|
+
* Triggered after a widget was hidden
|
|
867
|
+
* @param {object} event Event object
|
|
868
|
+
* @param {Core.widget.Widget} event.source The widget
|
|
869
|
+
*/
|
|
870
|
+
onHide? : ((event: { source: Widget }) => void)|string
|
|
871
|
+
/**
|
|
872
|
+
* A descendant menu item has been activated.
|
|
873
|
+
* ...
|
|
874
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#event-item)
|
|
875
|
+
* @param {object} event Event object
|
|
876
|
+
* @param {Core.widget.MenuItem} event.item The menu item which is being actioned.
|
|
877
|
+
* @param {Core.widget.Menu} event.menu Menu containing the menu item
|
|
878
|
+
*/
|
|
879
|
+
onItem? : ((event: { item: MenuItem, menu: Menu }) => void)|string
|
|
880
|
+
/**
|
|
881
|
+
* Triggered when a widget which had been in a non-visible state for any reason
|
|
882
|
+
* achieves visibility.
|
|
883
|
+
* ...
|
|
884
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#event-paint)
|
|
885
|
+
* @param {object} event Event object
|
|
886
|
+
* @param {Core.widget.Widget} event.source The widget being painted.
|
|
887
|
+
* @param {boolean} event.firstPaint `true` if this is the first paint.
|
|
888
|
+
*/
|
|
889
|
+
onPaint? : ((event: { source: Widget, firstPaint: boolean }) => void)|string
|
|
890
|
+
/**
|
|
891
|
+
* Fired when a Widget's read only state is toggled
|
|
892
|
+
* @param {object} event Event object
|
|
893
|
+
* @param {boolean} event.readOnly Read only or not
|
|
894
|
+
*/
|
|
895
|
+
onReadOnly? : ((event: { readOnly: boolean }) => void)|string
|
|
896
|
+
/**
|
|
897
|
+
* This event is fired after a widget's elements have been synchronized due to a direct or indirect call
|
|
898
|
+
* to [recompose](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#function-recompose), if this results in some change to the widget's rendered DOM elements.
|
|
899
|
+
*/
|
|
900
|
+
onRecompose? : (() => void)|string
|
|
901
|
+
/**
|
|
902
|
+
* Fired when the encapsulating element of a Widget resizes *only when [monitorResize](https://bryntum.com/products/scheduler/docs/api/Core/widget/Widget#config-monitorResize) is `true`*.
|
|
903
|
+
* @param {object} event Event object
|
|
904
|
+
* @param {Core.widget.Widget} event.source This Widget
|
|
905
|
+
* @param {number} event.width The new width
|
|
906
|
+
* @param {number} event.height The new height
|
|
907
|
+
* @param {number} event.oldWidth The old width
|
|
908
|
+
* @param {number} event.oldHeight The old height
|
|
909
|
+
*/
|
|
910
|
+
onResize? : ((event: { source: Widget, width: number, height: number, oldWidth: number, oldHeight: number }) => void)|string
|
|
911
|
+
/**
|
|
912
|
+
* Triggered after a widget is shown.
|
|
913
|
+
* @param {object} event Event object
|
|
914
|
+
* @param {Core.widget.Widget} event.source The widget
|
|
915
|
+
*/
|
|
916
|
+
onShow? : ((event: { source: Widget }) => void)|string
|
|
917
|
+
/**
|
|
918
|
+
* The checked state of a descendant menu item has changed.
|
|
919
|
+
* ...
|
|
920
|
+
* [View online docs...](https://bryntum.com/products/scheduler/docs/api/Core/widget/Menu#event-toggle)
|
|
921
|
+
* @param {object} event Event object
|
|
922
|
+
* @param {Core.widget.MenuItem} event.item The menu item whose checked state changed.
|
|
923
|
+
* @param {Core.widget.Menu} event.menu Menu containing the menu item
|
|
924
|
+
* @param {boolean} event.checked The *new* checked state.
|
|
925
|
+
*/
|
|
926
|
+
onToggle? : ((event: { item: MenuItem, menu: Menu, checked: boolean }) => void)|string
|
|
927
|
+
/**
|
|
928
|
+
* A header [tool](https://bryntum.com/products/scheduler/docs/api/Core/widget/Panel#config-tools) has been clicked.
|
|
929
|
+
* @param {object} event Event object
|
|
930
|
+
* @param {Core.widget.Tool} event.source This Panel.
|
|
931
|
+
* @param {Core.widget.Tool} event.tool The tool which is being clicked.
|
|
932
|
+
*/
|
|
933
|
+
onToolClick? : ((event: { source: Tool, tool: Tool }) => void)|string
|
|
934
|
+
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
export class BryntumMenu extends React.Component<BryntumMenuProps> {
|
|
938
|
+
|
|
939
|
+
static instanceClass = Menu;
|
|
940
|
+
|
|
941
|
+
static instanceName = 'Menu';
|
|
942
|
+
|
|
943
|
+
processWidgetContent = processWidgetContent;
|
|
944
|
+
|
|
945
|
+
static configNames = [
|
|
946
|
+
'adopt',
|
|
947
|
+
'align',
|
|
948
|
+
'anchor',
|
|
949
|
+
'ariaDescription',
|
|
950
|
+
'ariaLabel',
|
|
951
|
+
'autoClose',
|
|
952
|
+
'autoShow',
|
|
953
|
+
'autoUpdateRecord',
|
|
954
|
+
'bbar',
|
|
955
|
+
'bodyCls',
|
|
956
|
+
'bubbleEvents',
|
|
957
|
+
'centered',
|
|
958
|
+
'closable',
|
|
959
|
+
'closeAction',
|
|
960
|
+
'closeOnEscape',
|
|
961
|
+
'collapsible',
|
|
962
|
+
'color',
|
|
963
|
+
'config',
|
|
964
|
+
'constrainTo',
|
|
965
|
+
'contentElementCls',
|
|
966
|
+
'dataField',
|
|
967
|
+
'defaultBindProperty',
|
|
968
|
+
'defaultFocus',
|
|
969
|
+
'defaults',
|
|
970
|
+
'detectCSSCompatibilityIssues',
|
|
971
|
+
'dock',
|
|
972
|
+
'draggable',
|
|
973
|
+
'drawer',
|
|
974
|
+
'elementAttributes',
|
|
975
|
+
'floating',
|
|
976
|
+
'focusOnHover',
|
|
977
|
+
'focusOnToFront',
|
|
978
|
+
'footer',
|
|
979
|
+
'forElement',
|
|
980
|
+
'header',
|
|
981
|
+
'hideAnimation',
|
|
982
|
+
'hideWhenEmpty',
|
|
983
|
+
'htmlCls',
|
|
984
|
+
'icon',
|
|
985
|
+
'ignoreParentReadOnly',
|
|
986
|
+
'itemCls',
|
|
987
|
+
'lazyItems',
|
|
988
|
+
'listeners',
|
|
989
|
+
'localeClass',
|
|
990
|
+
'localizable',
|
|
991
|
+
'localizableProperties',
|
|
992
|
+
'maskDefaults',
|
|
993
|
+
'masked',
|
|
994
|
+
'maximizable',
|
|
995
|
+
'modal',
|
|
996
|
+
'monitorResize',
|
|
997
|
+
'namedItems',
|
|
998
|
+
'owner',
|
|
999
|
+
'positioned',
|
|
1000
|
+
'preventTooltipOnTouch',
|
|
1001
|
+
'relayStoreEvents',
|
|
1002
|
+
'ripple',
|
|
1003
|
+
'rootElement',
|
|
1004
|
+
'scrollAction',
|
|
1005
|
+
'showAnimation',
|
|
1006
|
+
'showOnClick',
|
|
1007
|
+
'showTooltipWhenDisabled',
|
|
1008
|
+
'stateful',
|
|
1009
|
+
'statefulEvents',
|
|
1010
|
+
'stateId',
|
|
1011
|
+
'stateProvider',
|
|
1012
|
+
'strips',
|
|
1013
|
+
'tab',
|
|
1014
|
+
'tabBarItems',
|
|
1015
|
+
'tag',
|
|
1016
|
+
'tbar',
|
|
1017
|
+
'textAlign',
|
|
1018
|
+
'textContent',
|
|
1019
|
+
'trapFocus',
|
|
1020
|
+
'type',
|
|
1021
|
+
'ui',
|
|
1022
|
+
'weight'
|
|
1023
|
+
];
|
|
1024
|
+
|
|
1025
|
+
static propertyConfigNames = [
|
|
1026
|
+
'alignSelf',
|
|
1027
|
+
'appendTo',
|
|
1028
|
+
'callOnFunctions',
|
|
1029
|
+
'catchEventHandlerExceptions',
|
|
1030
|
+
'cls',
|
|
1031
|
+
'collapsed',
|
|
1032
|
+
'column',
|
|
1033
|
+
'content',
|
|
1034
|
+
'dataset',
|
|
1035
|
+
'disabled',
|
|
1036
|
+
'extraData',
|
|
1037
|
+
'flex',
|
|
1038
|
+
'height',
|
|
1039
|
+
'hidden',
|
|
1040
|
+
'html',
|
|
1041
|
+
'id',
|
|
1042
|
+
'inputFieldAlign',
|
|
1043
|
+
'insertBefore',
|
|
1044
|
+
'insertFirst',
|
|
1045
|
+
'items',
|
|
1046
|
+
'keyMap',
|
|
1047
|
+
'labelPosition',
|
|
1048
|
+
'layout',
|
|
1049
|
+
'layoutStyle',
|
|
1050
|
+
'margin',
|
|
1051
|
+
'maxHeight',
|
|
1052
|
+
'maximized',
|
|
1053
|
+
'maximizeOnMobile',
|
|
1054
|
+
'maxWidth',
|
|
1055
|
+
'minHeight',
|
|
1056
|
+
'minWidth',
|
|
1057
|
+
'onBeforeClose',
|
|
1058
|
+
'onBeforeDestroy',
|
|
1059
|
+
'onBeforeHide',
|
|
1060
|
+
'onBeforeSetRecord',
|
|
1061
|
+
'onBeforeShow',
|
|
1062
|
+
'onBeforeStateApply',
|
|
1063
|
+
'onBeforeStateSave',
|
|
1064
|
+
'onCatchAll',
|
|
1065
|
+
'onCollapse',
|
|
1066
|
+
'onDestroy',
|
|
1067
|
+
'onDirtyStateChange',
|
|
1068
|
+
'onElementCreated',
|
|
1069
|
+
'onExpand',
|
|
1070
|
+
'onFocusIn',
|
|
1071
|
+
'onFocusOut',
|
|
1072
|
+
'onHide',
|
|
1073
|
+
'onItem',
|
|
1074
|
+
'onPaint',
|
|
1075
|
+
'onReadOnly',
|
|
1076
|
+
'onRecompose',
|
|
1077
|
+
'onResize',
|
|
1078
|
+
'onShow',
|
|
1079
|
+
'onToggle',
|
|
1080
|
+
'onToolClick',
|
|
1081
|
+
'readOnly',
|
|
1082
|
+
'record',
|
|
1083
|
+
'rendition',
|
|
1084
|
+
'resizable',
|
|
1085
|
+
'rtl',
|
|
1086
|
+
'span',
|
|
1087
|
+
'strictRecordMapping',
|
|
1088
|
+
'title',
|
|
1089
|
+
'tools',
|
|
1090
|
+
'tooltip',
|
|
1091
|
+
'width',
|
|
1092
|
+
'x',
|
|
1093
|
+
'y'
|
|
1094
|
+
];
|
|
1095
|
+
|
|
1096
|
+
static propertyNames = [
|
|
1097
|
+
'anchorSize',
|
|
1098
|
+
'focusVisible',
|
|
1099
|
+
'hasChanges',
|
|
1100
|
+
'isSettingValues',
|
|
1101
|
+
'isValid',
|
|
1102
|
+
'parent',
|
|
1103
|
+
'parentMenu',
|
|
1104
|
+
'selectedElement',
|
|
1105
|
+
'state',
|
|
1106
|
+
'values'
|
|
1107
|
+
];
|
|
1108
|
+
|
|
1109
|
+
// Component instance
|
|
1110
|
+
instance!: Menu;
|
|
1111
|
+
|
|
1112
|
+
// Component element
|
|
1113
|
+
element! : HTMLElement;
|
|
1114
|
+
|
|
1115
|
+
componentDidMount(): void {
|
|
1116
|
+
this.instance = createWidget(this);
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
componentWillUnmount(): void {
|
|
1120
|
+
// @ts-ignore
|
|
1121
|
+
this.instance?.destroy?.();
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
/**
|
|
1125
|
+
* Component about to be updated, from changing a prop using state.
|
|
1126
|
+
* React to it depending on what changed and prevent react from re-rendering our component.
|
|
1127
|
+
* @param nextProps
|
|
1128
|
+
* @param nextState
|
|
1129
|
+
* @returns {boolean}
|
|
1130
|
+
*/
|
|
1131
|
+
shouldComponentUpdate(nextProps: Readonly<BryntumMenuProps>, nextState: Readonly<{}>): boolean {
|
|
1132
|
+
return shouldComponentUpdate(this, nextProps, nextState);
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
render(): React.ReactNode {
|
|
1136
|
+
|
|
1137
|
+
const className = `b-react-menu-container`;
|
|
1138
|
+
return (
|
|
1139
|
+
<div className={className} ref={(element) => (this.element = element!)}></div>
|
|
1140
|
+
);
|
|
1141
|
+
|
|
1142
|
+
}
|
|
1143
|
+
}
|