@syncfusion/ej2-navigations 30.2.5 → 31.1.17
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/dist/ej2-navigations.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js.map +1 -1
- package/dist/es6/ej2-navigations.es2015.js +1 -0
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +1 -0
- package/dist/es6/ej2-navigations.es5.js.map +1 -1
- package/dist/global/ej2-navigations.min.js +2 -2
- package/dist/global/ej2-navigations.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/dist/ts/accordion/accordion-model.d.ts +285 -0
- package/dist/ts/accordion/accordion.d.ts +458 -0
- package/dist/ts/accordion/accordion.ts +1580 -0
- package/dist/ts/accordion/index.d.ts +5 -0
- package/dist/ts/accordion/index.ts +5 -0
- package/dist/ts/appbar/appbar-model.d.ts +76 -0
- package/dist/ts/appbar/appbar.d.ts +115 -0
- package/dist/ts/appbar/appbar.ts +281 -0
- package/dist/ts/appbar/index.d.ts +3 -0
- package/dist/ts/appbar/index.ts +3 -0
- package/dist/ts/breadcrumb/breadcrumb-model.d.ts +170 -0
- package/dist/ts/breadcrumb/breadcrumb.d.ts +297 -0
- package/dist/ts/breadcrumb/breadcrumb.ts +959 -0
- package/dist/ts/breadcrumb/index.d.ts +5 -0
- package/dist/ts/breadcrumb/index.ts +5 -0
- package/dist/ts/carousel/carousel-model.d.ts +282 -0
- package/dist/ts/carousel/carousel.d.ts +439 -0
- package/dist/ts/carousel/carousel.ts +1633 -0
- package/dist/ts/carousel/index.d.ts +3 -0
- package/dist/ts/carousel/index.ts +3 -0
- package/dist/ts/common/h-scroll-model.d.ts +16 -0
- package/dist/ts/common/h-scroll.d.ts +105 -0
- package/dist/ts/common/h-scroll.ts +481 -0
- package/dist/ts/common/index.d.ts +9 -0
- package/dist/ts/common/index.ts +10 -0
- package/dist/ts/common/menu-base-model.d.ts +308 -0
- package/dist/ts/common/menu-base.d.ts +558 -0
- package/dist/ts/common/menu-base.ts +2736 -0
- package/dist/ts/common/menu-scroll.d.ts +29 -0
- package/dist/ts/common/menu-scroll.ts +105 -0
- package/dist/ts/common/v-scroll-model.d.ts +16 -0
- package/dist/ts/common/v-scroll.d.ts +106 -0
- package/dist/ts/common/v-scroll.ts +454 -0
- package/dist/ts/context-menu/context-menu-model.d.ts +47 -0
- package/dist/ts/context-menu/context-menu.d.ts +102 -0
- package/dist/ts/context-menu/context-menu.ts +165 -0
- package/dist/ts/context-menu/index.d.ts +5 -0
- package/dist/ts/context-menu/index.ts +5 -0
- package/dist/ts/index.d.ts +16 -0
- package/dist/ts/index.ts +16 -0
- package/dist/ts/menu/index.d.ts +5 -0
- package/dist/ts/menu/index.ts +5 -0
- package/dist/ts/menu/menu-model.d.ts +70 -0
- package/dist/ts/menu/menu.d.ts +127 -0
- package/dist/ts/menu/menu.ts +313 -0
- package/dist/ts/sidebar/index.d.ts +5 -0
- package/dist/ts/sidebar/index.ts +5 -0
- package/dist/ts/sidebar/sidebar-model.d.ts +200 -0
- package/dist/ts/sidebar/sidebar.d.ts +336 -0
- package/dist/ts/sidebar/sidebar.ts +907 -0
- package/dist/ts/stepper/index.d.ts +3 -0
- package/dist/ts/stepper/index.ts +3 -0
- package/dist/ts/stepper/stepper-model.d.ts +159 -0
- package/dist/ts/stepper/stepper.d.ts +381 -0
- package/dist/ts/stepper/stepper.ts +1350 -0
- package/dist/ts/stepper-base/index.d.ts +5 -0
- package/dist/ts/stepper-base/index.ts +6 -0
- package/dist/ts/stepper-base/stepper-base-model.d.ts +124 -0
- package/dist/ts/stepper-base/stepper-base.d.ts +187 -0
- package/dist/ts/stepper-base/stepper-base.ts +290 -0
- package/dist/ts/tab/index.d.ts +5 -0
- package/dist/ts/tab/index.ts +5 -0
- package/dist/ts/tab/tab-model.d.ts +408 -0
- package/dist/ts/tab/tab.d.ts +715 -0
- package/dist/ts/tab/tab.ts +2842 -0
- package/dist/ts/toolbar/index.d.ts +5 -0
- package/dist/ts/toolbar/index.ts +5 -0
- package/dist/ts/toolbar/toolbar-model.d.ts +294 -0
- package/dist/ts/toolbar/toolbar.d.ts +541 -0
- package/dist/ts/toolbar/toolbar.ts +2646 -0
- package/dist/ts/treeview/index.d.ts +5 -0
- package/dist/ts/treeview/index.ts +5 -0
- package/dist/ts/treeview/treeview-model.d.ts +637 -0
- package/dist/ts/treeview/treeview.d.ts +1518 -0
- package/dist/ts/treeview/treeview.ts +6780 -0
- package/package.json +70 -17
- package/src/context-menu/context-menu-model.d.ts +1 -1
- package/src/context-menu/context-menu.js +1 -1
- package/src/tab/tab.js +1 -0
- package/styles/accordion/_bootstrap-dark-definition.scss +1 -1
- package/styles/accordion/_bootstrap-definition.scss +1 -1
- package/styles/accordion/bootstrap-dark.css +1 -1
- package/styles/accordion/bootstrap.css +1 -1
- package/styles/bds-lite.css +1 -1
- package/styles/bds.css +1 -1
- package/styles/bootstrap-dark-lite.css +2 -2
- package/styles/bootstrap-dark.css +2 -2
- package/styles/bootstrap-lite.css +2 -2
- package/styles/bootstrap.css +2 -2
- package/styles/bootstrap4-lite.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark-lite.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5-lite.css +1 -1
- package/styles/bootstrap5.3-lite.css +1 -1
- package/styles/bootstrap5.3.css +9 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/fabric-dark-lite.css +1 -1
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric-lite.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/fluent-dark-lite.css +1 -1
- package/styles/fluent-dark.css +1 -1
- package/styles/fluent-lite.css +1 -1
- package/styles/fluent.css +1 -1
- package/styles/fluent2-lite.css +4 -1
- package/styles/fluent2.css +4 -1
- package/styles/h-scroll/_layout.scss +1 -1
- package/styles/h-scroll/bds.css +1 -1
- package/styles/h-scroll/bootstrap-dark.css +1 -1
- package/styles/h-scroll/bootstrap.css +1 -1
- package/styles/h-scroll/bootstrap4.css +1 -1
- package/styles/h-scroll/bootstrap5-dark.css +1 -1
- package/styles/h-scroll/bootstrap5.3.css +1 -1
- package/styles/h-scroll/bootstrap5.css +1 -1
- package/styles/h-scroll/fabric-dark.css +1 -1
- package/styles/h-scroll/fabric.css +1 -1
- package/styles/h-scroll/fluent-dark.css +1 -1
- package/styles/h-scroll/fluent.css +1 -1
- package/styles/h-scroll/fluent2.css +1 -1
- package/styles/h-scroll/highcontrast-light.css +1 -1
- package/styles/h-scroll/highcontrast.css +1 -1
- package/styles/h-scroll/material-dark.css +1 -1
- package/styles/h-scroll/material.css +1 -1
- package/styles/h-scroll/material3-dark.css +1 -1
- package/styles/h-scroll/material3.css +1 -1
- package/styles/h-scroll/tailwind-dark.css +1 -1
- package/styles/h-scroll/tailwind.css +1 -1
- package/styles/h-scroll/tailwind3.css +1 -1
- package/styles/highcontrast-light-lite.css +1 -1
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast-lite.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/material-dark-lite.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material-lite.css +1 -1
- package/styles/material.css +1 -1
- package/styles/material3-dark-lite.css +1 -1
- package/styles/material3-dark.css +1 -7
- package/styles/material3-lite.css +1 -1
- package/styles/material3.css +1 -7
- package/styles/tailwind-dark-lite.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind-lite.css +1 -1
- package/styles/tailwind.css +1 -1
- package/styles/tailwind3-lite.css +1 -1
- package/styles/tailwind3.css +1 -1
- package/styles/toolbar/_layout.scss +1 -1
- package/styles/treeview/_bigger.scss +2 -2
- package/styles/treeview/_bootstrap5.3-definition.scss +1 -0
- package/styles/treeview/_layout.scss +3 -0
- package/styles/treeview/bootstrap5.3.css +8 -0
- package/styles/treeview/fluent2.css +3 -0
- package/styles/treeview/material3-dark.css +0 -6
- package/styles/treeview/material3.css +0 -6
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/triple-slash-reference */
|
|
2
|
+
/// <reference path='../common/menu-base-model.d.ts'/>
|
|
3
|
+
import { attributes, getUniqueID, Collection, NotifyPropertyChanges, INotifyPropertyChanged, Property, removeClass, isNullOrUndefined, addClass } from '@syncfusion/ej2-base';
|
|
4
|
+
import { getZindexPartial } from '@syncfusion/ej2-popups';
|
|
5
|
+
import { ContextMenuModel } from './context-menu-model';
|
|
6
|
+
import { MenuBase, MenuItem } from '../common/menu-base';
|
|
7
|
+
import { MenuItemModel } from './../common/menu-base-model';
|
|
8
|
+
const CONTEXTMENUTEMPLATE: string = 'e-contextmenu-template';
|
|
9
|
+
/**
|
|
10
|
+
* The ContextMenu is a graphical user interface that appears on the user right click/touch hold operation.
|
|
11
|
+
* ```html
|
|
12
|
+
* <div id = 'target'></div>
|
|
13
|
+
* <ul id = 'contextmenu'></ul>
|
|
14
|
+
* ```
|
|
15
|
+
* ```typescript
|
|
16
|
+
* <script>
|
|
17
|
+
* var contextMenuObj = new ContextMenu({items: [{ text: 'Cut' }, { text: 'Copy' },{ text: 'Paste' }], target: '#target'});
|
|
18
|
+
* </script>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
@NotifyPropertyChanges
|
|
22
|
+
export class ContextMenu extends MenuBase implements INotifyPropertyChanged {
|
|
23
|
+
/**
|
|
24
|
+
* Constructor for creating the widget.
|
|
25
|
+
*
|
|
26
|
+
* @private
|
|
27
|
+
* @param {ContextMenuModel} options - Specifies the context menu model
|
|
28
|
+
* @param {string} element - Specifies the element
|
|
29
|
+
*/
|
|
30
|
+
constructor(options?: ContextMenuModel, element?: string | HTMLUListElement) {
|
|
31
|
+
super(options, <HTMLUListElement | string>element);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Specifies target element selector in which the ContextMenu should be opened.
|
|
36
|
+
*
|
|
37
|
+
* @default ''
|
|
38
|
+
*/
|
|
39
|
+
@Property('')
|
|
40
|
+
public target: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Specifies the filter selector for elements inside the target in that the context menu will be opened.
|
|
44
|
+
*
|
|
45
|
+
* @default ''
|
|
46
|
+
*/
|
|
47
|
+
@Property('')
|
|
48
|
+
public filter: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Specifies menu items with its properties which will be rendered as ContextMenu.
|
|
52
|
+
*
|
|
53
|
+
* @default []
|
|
54
|
+
* @aspType object
|
|
55
|
+
* @blazorType object
|
|
56
|
+
*/
|
|
57
|
+
@Collection<MenuItemModel>([], MenuItem)
|
|
58
|
+
public items: MenuItemModel[];
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* This property allows you to define custom templates for items in the ContextMenu.
|
|
62
|
+
*
|
|
63
|
+
* @default null
|
|
64
|
+
* @aspType string
|
|
65
|
+
*/
|
|
66
|
+
@Property(null)
|
|
67
|
+
public itemTemplate: string | Function;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Specifies whether to enable / disable the scrollable option in ContextMenu.
|
|
71
|
+
*
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
74
|
+
@Property(false)
|
|
75
|
+
public enableScrolling: boolean;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* For internal use only - prerender processing.
|
|
79
|
+
*
|
|
80
|
+
* @private
|
|
81
|
+
* @returns {void}
|
|
82
|
+
*/
|
|
83
|
+
protected preRender(): void {
|
|
84
|
+
this.isMenu = false;
|
|
85
|
+
this.element.id = this.element.id || getUniqueID('ej2-contextmenu');
|
|
86
|
+
super.preRender();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
protected initialize(): void {
|
|
90
|
+
this.template = this.itemTemplate ? this.itemTemplate : null;
|
|
91
|
+
this.addTemplateClass();
|
|
92
|
+
super.initialize();
|
|
93
|
+
attributes(this.element, <{ [key: string]: string }>{ 'role': 'menubar', 'tabindex': '0' });
|
|
94
|
+
this.element.style.zIndex = getZindexPartial(this.element).toString();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* This method is used to open the ContextMenu in specified position.
|
|
99
|
+
*
|
|
100
|
+
* @param {number} top - To specify ContextMenu vertical positioning.
|
|
101
|
+
* @param {number} left - To specify ContextMenu horizontal positioning.
|
|
102
|
+
* @param {HTMLElement} target - To calculate z-index for ContextMenu based upon the specified target.
|
|
103
|
+
* @function open
|
|
104
|
+
* @returns {void}
|
|
105
|
+
*/
|
|
106
|
+
public open(top: number, left: number, target?: HTMLElement): void {
|
|
107
|
+
super.openMenu(null, null, top, left, null, target);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Closes the ContextMenu if it is opened.
|
|
112
|
+
*
|
|
113
|
+
* @function close
|
|
114
|
+
* @returns {void}
|
|
115
|
+
*/
|
|
116
|
+
public close(): void {
|
|
117
|
+
super.closeMenu();
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
private addTemplateClass(): void {
|
|
121
|
+
if (!isNullOrUndefined(this.itemTemplate) && typeof this.itemTemplate === 'function' ||
|
|
122
|
+
(typeof this.itemTemplate === 'string' && this.itemTemplate !== '')) {
|
|
123
|
+
addClass([this.element], CONTEXTMENUTEMPLATE);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Called internally if any of the property value changed.
|
|
129
|
+
*
|
|
130
|
+
* @private
|
|
131
|
+
* @param {ContextMenuModel} newProp - Specifies new properties
|
|
132
|
+
* @param {ContextMenuModel} oldProp - Specifies old properties
|
|
133
|
+
* @returns {void}
|
|
134
|
+
*/
|
|
135
|
+
public onPropertyChanged(newProp: ContextMenuModel, oldProp: ContextMenuModel): void {
|
|
136
|
+
super.onPropertyChanged(newProp, oldProp);
|
|
137
|
+
for (const prop of Object.keys(newProp)) {
|
|
138
|
+
switch (prop) {
|
|
139
|
+
case 'filter':
|
|
140
|
+
this.close();
|
|
141
|
+
this.filter = newProp.filter;
|
|
142
|
+
break;
|
|
143
|
+
case 'target':
|
|
144
|
+
this.unWireEvents(oldProp.target);
|
|
145
|
+
this.wireEvents();
|
|
146
|
+
break;
|
|
147
|
+
case 'itemTemplate':
|
|
148
|
+
this.itemTemplate = newProp.itemTemplate;
|
|
149
|
+
removeClass([this.element], CONTEXTMENUTEMPLATE);
|
|
150
|
+
this.addTemplateClass();
|
|
151
|
+
this.refresh();
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Get module name.
|
|
158
|
+
*
|
|
159
|
+
* @returns {string} - Module Name
|
|
160
|
+
* @private
|
|
161
|
+
*/
|
|
162
|
+
protected getModuleName(): string {
|
|
163
|
+
return 'contextmenu';
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Navigation all modules
|
|
3
|
+
*/
|
|
4
|
+
export * from './common/index';
|
|
5
|
+
export * from './toolbar/index';
|
|
6
|
+
export * from './accordion/index';
|
|
7
|
+
export * from './context-menu/index';
|
|
8
|
+
export * from './menu/index';
|
|
9
|
+
export * from './tab/index';
|
|
10
|
+
export * from './treeview/index';
|
|
11
|
+
export * from './sidebar/index';
|
|
12
|
+
export * from './breadcrumb/index';
|
|
13
|
+
export * from './carousel/index';
|
|
14
|
+
export * from './appbar/index';
|
|
15
|
+
export * from './stepper-base/index';
|
|
16
|
+
export * from './stepper/index';
|
package/dist/ts/index.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Navigation all modules
|
|
3
|
+
*/
|
|
4
|
+
export * from './common/index';
|
|
5
|
+
export * from './toolbar/index';
|
|
6
|
+
export * from './accordion/index';
|
|
7
|
+
export * from './context-menu/index';
|
|
8
|
+
export * from './menu/index';
|
|
9
|
+
export * from './tab/index';
|
|
10
|
+
export * from './treeview/index';
|
|
11
|
+
export * from './sidebar/index';
|
|
12
|
+
export * from './breadcrumb/index';
|
|
13
|
+
export * from './carousel/index';
|
|
14
|
+
export * from './appbar/index';
|
|
15
|
+
export * from './stepper-base/index';
|
|
16
|
+
export * from './stepper/index';
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { attributes, NotifyPropertyChanges, INotifyPropertyChanged, Property } from '@syncfusion/ej2-base';import { Browser, Complex, getUniqueID, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { MenuBase, FieldSettings } from '../common/menu-base';import { MenuItemModel, FieldSettingsModel } from '../common/menu-base-model';
|
|
2
|
+
import {Orientation} from "./menu";
|
|
3
|
+
import {MenuBaseModel} from "../common/menu-base-model";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Interface for a class Menu
|
|
7
|
+
*/
|
|
8
|
+
export interface MenuModel extends MenuBaseModel{
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Specified the orientation of Menu whether it can be horizontal or vertical.
|
|
12
|
+
*
|
|
13
|
+
* @default 'Horizontal'
|
|
14
|
+
*/
|
|
15
|
+
orientation?: Orientation;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Specifies target element to open/close Menu while click in Hamburger mode.
|
|
19
|
+
*
|
|
20
|
+
* @default ''
|
|
21
|
+
*/
|
|
22
|
+
target?: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Specifies the template for Menu item.
|
|
26
|
+
*
|
|
27
|
+
* @default null
|
|
28
|
+
* @aspType string
|
|
29
|
+
*/
|
|
30
|
+
template?: string | Function;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Specifies whether to enable / disable the scrollable option in Menu.
|
|
34
|
+
*
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
enableScrolling?: boolean;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Specifies whether to enable / disable the hamburger mode in Menu.
|
|
41
|
+
*
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
hamburgerMode?: boolean;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Specifies the title text for hamburger mode in Menu.
|
|
48
|
+
*
|
|
49
|
+
* @default 'Menu'
|
|
50
|
+
*/
|
|
51
|
+
title?: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Specifies whether to enable the rendering of untrusted HTML values in the Menu component.
|
|
55
|
+
* If 'enableHtmlSanitizer' set to true, the component will sanitize any suspected untrusted strings and scripts before rendering them.
|
|
56
|
+
*
|
|
57
|
+
* @default true
|
|
58
|
+
*/
|
|
59
|
+
enableHtmlSanitizer?: boolean;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Specifies mapping fields from the dataSource.
|
|
63
|
+
*
|
|
64
|
+
* @default { itemId: "id", text: "text", parentId: "parentId", iconCss: "iconCss", url: "url", separator: "separator",
|
|
65
|
+
* children: "items" }
|
|
66
|
+
*/
|
|
67
|
+
// eslint:disable-next-line
|
|
68
|
+
fields?: FieldSettingsModel;
|
|
69
|
+
|
|
70
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/// <reference path="../common/menu-base-model.d.ts" />
|
|
2
|
+
import { INotifyPropertyChanged } from '@syncfusion/ej2-base';
|
|
3
|
+
import { MenuBase } from '../common/menu-base';
|
|
4
|
+
import { FieldSettingsModel } from '../common/menu-base-model';
|
|
5
|
+
import { MenuModel } from './menu-model';
|
|
6
|
+
/**
|
|
7
|
+
* Defines the different types of orientation option available in the Menu.
|
|
8
|
+
* ```props
|
|
9
|
+
* Horizontal - It renders the menu in a horizontal orientation mode.
|
|
10
|
+
* Vertical - It renders the menu in a vertical orientation mode.
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare type Orientation = 'Horizontal' | 'Vertical';
|
|
14
|
+
/**
|
|
15
|
+
* The Menu is a graphical user interface that serve as navigation headers for your application or site.
|
|
16
|
+
* ```html
|
|
17
|
+
* <ul id = 'menu'></ul>
|
|
18
|
+
* ```
|
|
19
|
+
* ```typescript
|
|
20
|
+
* <script>
|
|
21
|
+
* var menuObj = new Menu({ items: [{ text: 'Home' }, { text: 'Contact Us' },{ text: 'Login' }]});
|
|
22
|
+
* menuObj.appendTo("#menu");
|
|
23
|
+
* </script>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare class Menu extends MenuBase implements INotifyPropertyChanged {
|
|
27
|
+
private tempItems;
|
|
28
|
+
/**
|
|
29
|
+
* Specified the orientation of Menu whether it can be horizontal or vertical.
|
|
30
|
+
*
|
|
31
|
+
* @default 'Horizontal'
|
|
32
|
+
*/
|
|
33
|
+
orientation: Orientation;
|
|
34
|
+
/**
|
|
35
|
+
* Specifies target element to open/close Menu while click in Hamburger mode.
|
|
36
|
+
*
|
|
37
|
+
* @default ''
|
|
38
|
+
*/
|
|
39
|
+
target: string;
|
|
40
|
+
/**
|
|
41
|
+
* Specifies the template for Menu item.
|
|
42
|
+
*
|
|
43
|
+
* @default null
|
|
44
|
+
* @aspType string
|
|
45
|
+
*/
|
|
46
|
+
template: string | Function;
|
|
47
|
+
/**
|
|
48
|
+
* Specifies whether to enable / disable the scrollable option in Menu.
|
|
49
|
+
*
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
enableScrolling: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Specifies whether to enable / disable the hamburger mode in Menu.
|
|
55
|
+
*
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
hamburgerMode: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Specifies the title text for hamburger mode in Menu.
|
|
61
|
+
*
|
|
62
|
+
* @default 'Menu'
|
|
63
|
+
*/
|
|
64
|
+
title: string;
|
|
65
|
+
/**
|
|
66
|
+
* Specifies whether to enable the rendering of untrusted HTML values in the Menu component.
|
|
67
|
+
* If 'enableHtmlSanitizer' set to true, the component will sanitize any suspected untrusted strings and scripts before rendering them.
|
|
68
|
+
*
|
|
69
|
+
* @default true
|
|
70
|
+
*/
|
|
71
|
+
enableHtmlSanitizer: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Specifies mapping fields from the dataSource.
|
|
74
|
+
*
|
|
75
|
+
* @default { itemId: "id", text: "text", parentId: "parentId", iconCss: "iconCss", url: "url", separator: "separator",
|
|
76
|
+
* children: "items" }
|
|
77
|
+
*/
|
|
78
|
+
fields: FieldSettingsModel;
|
|
79
|
+
/**
|
|
80
|
+
* Constructor for creating the component.
|
|
81
|
+
*
|
|
82
|
+
* @private
|
|
83
|
+
* @param {MenuModel} options - Specifies the menu model
|
|
84
|
+
* @param {string} element - Specifies the element
|
|
85
|
+
*/
|
|
86
|
+
constructor(options?: MenuModel, element?: string | HTMLUListElement);
|
|
87
|
+
/**
|
|
88
|
+
* Get module name.
|
|
89
|
+
*
|
|
90
|
+
* @private
|
|
91
|
+
* @returns {string} - Module Name
|
|
92
|
+
*/
|
|
93
|
+
protected getModuleName(): string;
|
|
94
|
+
/**
|
|
95
|
+
* For internal use only - prerender processing.
|
|
96
|
+
*
|
|
97
|
+
* @private
|
|
98
|
+
* @returns {void}
|
|
99
|
+
*/
|
|
100
|
+
protected preRender(): void;
|
|
101
|
+
protected initialize(): void;
|
|
102
|
+
private updateMenuItems;
|
|
103
|
+
/**
|
|
104
|
+
* Called internally if any of the property value changed.
|
|
105
|
+
*
|
|
106
|
+
* @private
|
|
107
|
+
* @param {MenuModel} newProp - Specifies the new properties.
|
|
108
|
+
* @param {MenuModel} oldProp - Specifies the old properties.
|
|
109
|
+
* @returns {void}
|
|
110
|
+
*/
|
|
111
|
+
onPropertyChanged(newProp: MenuModel, oldProp: MenuModel): void;
|
|
112
|
+
private createMenuItems;
|
|
113
|
+
/**
|
|
114
|
+
* This method is used to open the Menu in hamburger mode.
|
|
115
|
+
*
|
|
116
|
+
* @function open
|
|
117
|
+
* @returns {void}
|
|
118
|
+
*/
|
|
119
|
+
open(): void;
|
|
120
|
+
/**
|
|
121
|
+
* Closes the Menu if it is opened in hamburger mode.
|
|
122
|
+
*
|
|
123
|
+
* @function close
|
|
124
|
+
* @returns {void}
|
|
125
|
+
*/
|
|
126
|
+
close(): void;
|
|
127
|
+
}
|