@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.
Files changed (165) hide show
  1. package/dist/ej2-navigations.min.js +2 -2
  2. package/dist/ej2-navigations.umd.min.js +2 -2
  3. package/dist/ej2-navigations.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-navigations.es2015.js +1 -0
  5. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  6. package/dist/es6/ej2-navigations.es5.js +1 -0
  7. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  8. package/dist/global/ej2-navigations.min.js +2 -2
  9. package/dist/global/ej2-navigations.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/dist/ts/accordion/accordion-model.d.ts +285 -0
  12. package/dist/ts/accordion/accordion.d.ts +458 -0
  13. package/dist/ts/accordion/accordion.ts +1580 -0
  14. package/dist/ts/accordion/index.d.ts +5 -0
  15. package/dist/ts/accordion/index.ts +5 -0
  16. package/dist/ts/appbar/appbar-model.d.ts +76 -0
  17. package/dist/ts/appbar/appbar.d.ts +115 -0
  18. package/dist/ts/appbar/appbar.ts +281 -0
  19. package/dist/ts/appbar/index.d.ts +3 -0
  20. package/dist/ts/appbar/index.ts +3 -0
  21. package/dist/ts/breadcrumb/breadcrumb-model.d.ts +170 -0
  22. package/dist/ts/breadcrumb/breadcrumb.d.ts +297 -0
  23. package/dist/ts/breadcrumb/breadcrumb.ts +959 -0
  24. package/dist/ts/breadcrumb/index.d.ts +5 -0
  25. package/dist/ts/breadcrumb/index.ts +5 -0
  26. package/dist/ts/carousel/carousel-model.d.ts +282 -0
  27. package/dist/ts/carousel/carousel.d.ts +439 -0
  28. package/dist/ts/carousel/carousel.ts +1633 -0
  29. package/dist/ts/carousel/index.d.ts +3 -0
  30. package/dist/ts/carousel/index.ts +3 -0
  31. package/dist/ts/common/h-scroll-model.d.ts +16 -0
  32. package/dist/ts/common/h-scroll.d.ts +105 -0
  33. package/dist/ts/common/h-scroll.ts +481 -0
  34. package/dist/ts/common/index.d.ts +9 -0
  35. package/dist/ts/common/index.ts +10 -0
  36. package/dist/ts/common/menu-base-model.d.ts +308 -0
  37. package/dist/ts/common/menu-base.d.ts +558 -0
  38. package/dist/ts/common/menu-base.ts +2736 -0
  39. package/dist/ts/common/menu-scroll.d.ts +29 -0
  40. package/dist/ts/common/menu-scroll.ts +105 -0
  41. package/dist/ts/common/v-scroll-model.d.ts +16 -0
  42. package/dist/ts/common/v-scroll.d.ts +106 -0
  43. package/dist/ts/common/v-scroll.ts +454 -0
  44. package/dist/ts/context-menu/context-menu-model.d.ts +47 -0
  45. package/dist/ts/context-menu/context-menu.d.ts +102 -0
  46. package/dist/ts/context-menu/context-menu.ts +165 -0
  47. package/dist/ts/context-menu/index.d.ts +5 -0
  48. package/dist/ts/context-menu/index.ts +5 -0
  49. package/dist/ts/index.d.ts +16 -0
  50. package/dist/ts/index.ts +16 -0
  51. package/dist/ts/menu/index.d.ts +5 -0
  52. package/dist/ts/menu/index.ts +5 -0
  53. package/dist/ts/menu/menu-model.d.ts +70 -0
  54. package/dist/ts/menu/menu.d.ts +127 -0
  55. package/dist/ts/menu/menu.ts +313 -0
  56. package/dist/ts/sidebar/index.d.ts +5 -0
  57. package/dist/ts/sidebar/index.ts +5 -0
  58. package/dist/ts/sidebar/sidebar-model.d.ts +200 -0
  59. package/dist/ts/sidebar/sidebar.d.ts +336 -0
  60. package/dist/ts/sidebar/sidebar.ts +907 -0
  61. package/dist/ts/stepper/index.d.ts +3 -0
  62. package/dist/ts/stepper/index.ts +3 -0
  63. package/dist/ts/stepper/stepper-model.d.ts +159 -0
  64. package/dist/ts/stepper/stepper.d.ts +381 -0
  65. package/dist/ts/stepper/stepper.ts +1350 -0
  66. package/dist/ts/stepper-base/index.d.ts +5 -0
  67. package/dist/ts/stepper-base/index.ts +6 -0
  68. package/dist/ts/stepper-base/stepper-base-model.d.ts +124 -0
  69. package/dist/ts/stepper-base/stepper-base.d.ts +187 -0
  70. package/dist/ts/stepper-base/stepper-base.ts +290 -0
  71. package/dist/ts/tab/index.d.ts +5 -0
  72. package/dist/ts/tab/index.ts +5 -0
  73. package/dist/ts/tab/tab-model.d.ts +408 -0
  74. package/dist/ts/tab/tab.d.ts +715 -0
  75. package/dist/ts/tab/tab.ts +2842 -0
  76. package/dist/ts/toolbar/index.d.ts +5 -0
  77. package/dist/ts/toolbar/index.ts +5 -0
  78. package/dist/ts/toolbar/toolbar-model.d.ts +294 -0
  79. package/dist/ts/toolbar/toolbar.d.ts +541 -0
  80. package/dist/ts/toolbar/toolbar.ts +2646 -0
  81. package/dist/ts/treeview/index.d.ts +5 -0
  82. package/dist/ts/treeview/index.ts +5 -0
  83. package/dist/ts/treeview/treeview-model.d.ts +637 -0
  84. package/dist/ts/treeview/treeview.d.ts +1518 -0
  85. package/dist/ts/treeview/treeview.ts +6780 -0
  86. package/package.json +70 -17
  87. package/src/context-menu/context-menu-model.d.ts +1 -1
  88. package/src/context-menu/context-menu.js +1 -1
  89. package/src/tab/tab.js +1 -0
  90. package/styles/accordion/_bootstrap-dark-definition.scss +1 -1
  91. package/styles/accordion/_bootstrap-definition.scss +1 -1
  92. package/styles/accordion/bootstrap-dark.css +1 -1
  93. package/styles/accordion/bootstrap.css +1 -1
  94. package/styles/bds-lite.css +1 -1
  95. package/styles/bds.css +1 -1
  96. package/styles/bootstrap-dark-lite.css +2 -2
  97. package/styles/bootstrap-dark.css +2 -2
  98. package/styles/bootstrap-lite.css +2 -2
  99. package/styles/bootstrap.css +2 -2
  100. package/styles/bootstrap4-lite.css +1 -1
  101. package/styles/bootstrap4.css +1 -1
  102. package/styles/bootstrap5-dark-lite.css +1 -1
  103. package/styles/bootstrap5-dark.css +1 -1
  104. package/styles/bootstrap5-lite.css +1 -1
  105. package/styles/bootstrap5.3-lite.css +1 -1
  106. package/styles/bootstrap5.3.css +9 -1
  107. package/styles/bootstrap5.css +1 -1
  108. package/styles/fabric-dark-lite.css +1 -1
  109. package/styles/fabric-dark.css +1 -1
  110. package/styles/fabric-lite.css +1 -1
  111. package/styles/fabric.css +1 -1
  112. package/styles/fluent-dark-lite.css +1 -1
  113. package/styles/fluent-dark.css +1 -1
  114. package/styles/fluent-lite.css +1 -1
  115. package/styles/fluent.css +1 -1
  116. package/styles/fluent2-lite.css +4 -1
  117. package/styles/fluent2.css +4 -1
  118. package/styles/h-scroll/_layout.scss +1 -1
  119. package/styles/h-scroll/bds.css +1 -1
  120. package/styles/h-scroll/bootstrap-dark.css +1 -1
  121. package/styles/h-scroll/bootstrap.css +1 -1
  122. package/styles/h-scroll/bootstrap4.css +1 -1
  123. package/styles/h-scroll/bootstrap5-dark.css +1 -1
  124. package/styles/h-scroll/bootstrap5.3.css +1 -1
  125. package/styles/h-scroll/bootstrap5.css +1 -1
  126. package/styles/h-scroll/fabric-dark.css +1 -1
  127. package/styles/h-scroll/fabric.css +1 -1
  128. package/styles/h-scroll/fluent-dark.css +1 -1
  129. package/styles/h-scroll/fluent.css +1 -1
  130. package/styles/h-scroll/fluent2.css +1 -1
  131. package/styles/h-scroll/highcontrast-light.css +1 -1
  132. package/styles/h-scroll/highcontrast.css +1 -1
  133. package/styles/h-scroll/material-dark.css +1 -1
  134. package/styles/h-scroll/material.css +1 -1
  135. package/styles/h-scroll/material3-dark.css +1 -1
  136. package/styles/h-scroll/material3.css +1 -1
  137. package/styles/h-scroll/tailwind-dark.css +1 -1
  138. package/styles/h-scroll/tailwind.css +1 -1
  139. package/styles/h-scroll/tailwind3.css +1 -1
  140. package/styles/highcontrast-light-lite.css +1 -1
  141. package/styles/highcontrast-light.css +1 -1
  142. package/styles/highcontrast-lite.css +1 -1
  143. package/styles/highcontrast.css +1 -1
  144. package/styles/material-dark-lite.css +1 -1
  145. package/styles/material-dark.css +1 -1
  146. package/styles/material-lite.css +1 -1
  147. package/styles/material.css +1 -1
  148. package/styles/material3-dark-lite.css +1 -1
  149. package/styles/material3-dark.css +1 -7
  150. package/styles/material3-lite.css +1 -1
  151. package/styles/material3.css +1 -7
  152. package/styles/tailwind-dark-lite.css +1 -1
  153. package/styles/tailwind-dark.css +1 -1
  154. package/styles/tailwind-lite.css +1 -1
  155. package/styles/tailwind.css +1 -1
  156. package/styles/tailwind3-lite.css +1 -1
  157. package/styles/tailwind3.css +1 -1
  158. package/styles/toolbar/_layout.scss +1 -1
  159. package/styles/treeview/_bigger.scss +2 -2
  160. package/styles/treeview/_bootstrap5.3-definition.scss +1 -0
  161. package/styles/treeview/_layout.scss +3 -0
  162. package/styles/treeview/bootstrap5.3.css +8 -0
  163. package/styles/treeview/fluent2.css +3 -0
  164. package/styles/treeview/material3-dark.css +0 -6
  165. package/styles/treeview/material3.css +0 -6
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Accordion all modules
3
+ */
4
+ export * from './accordion';
5
+ export * from './accordion-model';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Accordion all modules
3
+ */
4
+ export * from './accordion';
5
+ export * from './accordion-model';
@@ -0,0 +1,76 @@
1
+ import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, Event, EmitType } from '@syncfusion/ej2-base';import { addClass, removeClass, isNullOrUndefined } from '@syncfusion/ej2-base';
2
+ import {AppBarMode,AppBarPosition,AppBarColor} from "./appbar";
3
+ import {ComponentModel} from '@syncfusion/ej2-base';
4
+
5
+ /**
6
+ * Interface for a class AppBar
7
+ */
8
+ export interface AppBarModel extends ComponentModel{
9
+
10
+ /**
11
+ * Specifies the mode of the AppBar that defines the AppBar height. The possible values for this property are as follows:
12
+ * * `Regular`: Specifies default height for the AppBar.
13
+ * * `Prominent`: Specifies longer height for the AppBar to show the longer titles and images, or to provide a stronger presence.
14
+ * * `Dense`: Specifies compressed (short) height for the AppBar to accommodate all the app bar content in a denser layout.
15
+ *
16
+ * @default 'Regular'
17
+ */
18
+ mode?: AppBarMode;
19
+
20
+ /**
21
+ * Specifies the position of the AppBar. The possible values for this property are as follows:
22
+ * * `Top`: Position the AppBar at the top.
23
+ * * `Bottom`: Position the AppBar at the bottom.
24
+ *
25
+ * @default 'Top'
26
+ */
27
+ position?: AppBarPosition;
28
+
29
+ /**
30
+ * Accepts single/multiple CSS classes (separated by a space) to be used for AppBar customization.
31
+ *
32
+ * @default null
33
+ */
34
+ cssClass?: string;
35
+
36
+ /**
37
+ * Defines whether the AppBar position is fixed or not while scrolling the page.
38
+ * When set to `true`, the AppBar will be sticky while scrolling.
39
+ *
40
+ * @default false
41
+ */
42
+ isSticky?: boolean;
43
+
44
+ /**
45
+ * Accepts HTML attributes/custom attributes that will be applied to the AppBar element.
46
+ *
47
+ * @default null
48
+ */
49
+ htmlAttributes?: Record<string, string>;
50
+
51
+ /**
52
+ * Specifies the color mode that defines the color of the AppBar component. The possible values for this property are as follows:
53
+ * * `Light`: Specifies the AppBar in light color.
54
+ * * `Dark`: Specifies the AppBar in dark color.
55
+ * * `Primary`: Specifies the AppBar in a primary color.
56
+ * * `Inherit`: Inherit color from parent for AppBar. AppBar background and colors are inherited from its parent element.
57
+ *
58
+ * @default 'Light'
59
+ */
60
+ colorMode?: AppBarColor;
61
+
62
+ /**
63
+ * Triggers after the AppBar component is created.
64
+ *
65
+ * @event created
66
+ */
67
+ created?: EmitType<Event>;
68
+
69
+ /**
70
+ * Triggers when the AppBar component is destroyed.
71
+ *
72
+ * @event destroyed
73
+ */
74
+ destroyed?: EmitType<Event>;
75
+
76
+ }
@@ -0,0 +1,115 @@
1
+ import { Component, INotifyPropertyChanged, EmitType } from '@syncfusion/ej2-base';
2
+ import { AppBarModel } from './appbar-model';
3
+ /**
4
+ * Specifies the height mode of the AppBar component which defines the height of the AppBar.
5
+ * ```props
6
+ * Regular :- Specifies default height for the AppBar.
7
+ * Prominent :- Specifies longer height for the AppBar to show the longer titles and images, or to provide a stronger presence.
8
+ * Dense :- Specifies compressed (short) height for the AppBar to accommodate all the app bar content in a denser layout.
9
+ * ```
10
+ */
11
+ export declare type AppBarMode = 'Regular' | 'Prominent' | 'Dense';
12
+ /**
13
+ * Specifies the position of the AppBar.
14
+ * ```props
15
+ * Top :- Position the AppBar at the top.
16
+ * Bottom :- Position the AppBar at the bottom.
17
+ * ```
18
+ */
19
+ export declare type AppBarPosition = 'Top' | 'Bottom';
20
+ /**
21
+ * Specifies the color of the AppBar component.
22
+ * ```props
23
+ * Light :- Specifies the AppBar in light color.
24
+ * Dark :- Specifies the AppBar in dark color.
25
+ * Primary :- Specifies the AppBar in a primary color.
26
+ * Inherit :- Inherit color from parent for AppBar. AppBar background and colors are inherited from its parent element.
27
+ * ```
28
+ */
29
+ export declare type AppBarColor = 'Light' | 'Dark' | 'Primary' | 'Inherit';
30
+ /**
31
+ * The AppBar displays the information and actions related to the current application screen. It is used to show branding, screen titles, navigation, and actions.
32
+ * Support to inherit colors from AppBar provided to <c>Button</c>, <c>DropDownButton</c>, <c>Menu</c> and <c>TextBox</c>.
33
+ * Set <c>CssClass</c> property with <code>e-inherit</code> CSS class to inherit the background and color from AppBar.
34
+ */
35
+ export declare class AppBar extends Component<HTMLElement> implements INotifyPropertyChanged {
36
+ /**
37
+ * Specifies the mode of the AppBar that defines the AppBar height. The possible values for this property are as follows:
38
+ * * `Regular`: Specifies default height for the AppBar.
39
+ * * `Prominent`: Specifies longer height for the AppBar to show the longer titles and images, or to provide a stronger presence.
40
+ * * `Dense`: Specifies compressed (short) height for the AppBar to accommodate all the app bar content in a denser layout.
41
+ *
42
+ * @default 'Regular'
43
+ */
44
+ mode: AppBarMode;
45
+ /**
46
+ * Specifies the position of the AppBar. The possible values for this property are as follows:
47
+ * * `Top`: Position the AppBar at the top.
48
+ * * `Bottom`: Position the AppBar at the bottom.
49
+ *
50
+ * @default 'Top'
51
+ */
52
+ position: AppBarPosition;
53
+ /**
54
+ * Accepts single/multiple CSS classes (separated by a space) to be used for AppBar customization.
55
+ *
56
+ * @default null
57
+ */
58
+ cssClass: string;
59
+ /**
60
+ * Defines whether the AppBar position is fixed or not while scrolling the page.
61
+ * When set to `true`, the AppBar will be sticky while scrolling.
62
+ *
63
+ * @default false
64
+ */
65
+ isSticky: boolean;
66
+ /**
67
+ * Accepts HTML attributes/custom attributes that will be applied to the AppBar element.
68
+ *
69
+ * @default null
70
+ */
71
+ htmlAttributes: Record<string, string>;
72
+ /**
73
+ * Specifies the color mode that defines the color of the AppBar component. The possible values for this property are as follows:
74
+ * * `Light`: Specifies the AppBar in light color.
75
+ * * `Dark`: Specifies the AppBar in dark color.
76
+ * * `Primary`: Specifies the AppBar in a primary color.
77
+ * * `Inherit`: Inherit color from parent for AppBar. AppBar background and colors are inherited from its parent element.
78
+ *
79
+ * @default 'Light'
80
+ */
81
+ colorMode: AppBarColor;
82
+ /**
83
+ * Triggers after the AppBar component is created.
84
+ *
85
+ * @event created
86
+ */
87
+ created: EmitType<Event>;
88
+ /**
89
+ * Triggers when the AppBar component is destroyed.
90
+ *
91
+ * @event destroyed
92
+ */
93
+ destroyed: EmitType<Event>;
94
+ /**
95
+ * Constructor for creating the AppBar widget
96
+ *
97
+ * @param {AppBarModel} options Accepts the AppBar model properties to initiate the rendering
98
+ * @param {string | HTMLElement} element Accepts the DOM element reference
99
+ */
100
+ constructor(options?: AppBarModel, element?: string | HTMLElement);
101
+ /**
102
+ * Removes the control from the DOM and also removes all its related events.
103
+ *
104
+ * @returns {void}
105
+ */
106
+ destroy(): void;
107
+ protected getModuleName(): string;
108
+ protected getPersistData(): string;
109
+ protected preRender(): void;
110
+ protected render(): void;
111
+ onPropertyChanged(newProp: AppBarModel, oldProp: AppBarModel): void;
112
+ private setHtmlAttributes;
113
+ private setHeightMode;
114
+ private setColorMode;
115
+ }
@@ -0,0 +1,281 @@
1
+ import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, Event, EmitType } from '@syncfusion/ej2-base';
2
+ import { addClass, removeClass, isNullOrUndefined } from '@syncfusion/ej2-base';
3
+ import { AppBarModel } from './appbar-model';
4
+
5
+ // Constant variables
6
+ const CLS_APPBAR: string = 'e-appbar';
7
+ const CLS_HORIZONTAL_BOTTOM: string = 'e-horizontal-bottom';
8
+ const CLS_STICKY: string = 'e-sticky';
9
+ const CLS_PROMINENT: string = 'e-prominent';
10
+ const CLS_DENSE: string = 'e-dense';
11
+ const CLS_RTL: string = 'e-rtl';
12
+ const CLS_LIGHT: string = 'e-light';
13
+ const CLS_DARK: string = 'e-dark';
14
+ const CLS_PRIMARY: string = 'e-primary';
15
+ const CLS_INHERIT: string = 'e-inherit';
16
+
17
+ /**
18
+ * Specifies the height mode of the AppBar component which defines the height of the AppBar.
19
+ * ```props
20
+ * Regular :- Specifies default height for the AppBar.
21
+ * Prominent :- Specifies longer height for the AppBar to show the longer titles and images, or to provide a stronger presence.
22
+ * Dense :- Specifies compressed (short) height for the AppBar to accommodate all the app bar content in a denser layout.
23
+ * ```
24
+ */
25
+ export type AppBarMode = 'Regular' | 'Prominent' | 'Dense';
26
+
27
+ /**
28
+ * Specifies the position of the AppBar.
29
+ * ```props
30
+ * Top :- Position the AppBar at the top.
31
+ * Bottom :- Position the AppBar at the bottom.
32
+ * ```
33
+ */
34
+ export type AppBarPosition = 'Top' | 'Bottom';
35
+
36
+ /**
37
+ * Specifies the color of the AppBar component.
38
+ * ```props
39
+ * Light :- Specifies the AppBar in light color.
40
+ * Dark :- Specifies the AppBar in dark color.
41
+ * Primary :- Specifies the AppBar in a primary color.
42
+ * Inherit :- Inherit color from parent for AppBar. AppBar background and colors are inherited from its parent element.
43
+ * ```
44
+ */
45
+ export type AppBarColor = 'Light' | 'Dark' | 'Primary' | 'Inherit';
46
+
47
+ /**
48
+ * The AppBar displays the information and actions related to the current application screen. It is used to show branding, screen titles, navigation, and actions.
49
+ * Support to inherit colors from AppBar provided to <c>Button</c>, <c>DropDownButton</c>, <c>Menu</c> and <c>TextBox</c>.
50
+ * Set <c>CssClass</c> property with <code>e-inherit</code> CSS class to inherit the background and color from AppBar.
51
+ */
52
+ @NotifyPropertyChanges
53
+ export class AppBar extends Component<HTMLElement> implements INotifyPropertyChanged {
54
+
55
+ /**
56
+ * Specifies the mode of the AppBar that defines the AppBar height. The possible values for this property are as follows:
57
+ * * `Regular`: Specifies default height for the AppBar.
58
+ * * `Prominent`: Specifies longer height for the AppBar to show the longer titles and images, or to provide a stronger presence.
59
+ * * `Dense`: Specifies compressed (short) height for the AppBar to accommodate all the app bar content in a denser layout.
60
+ *
61
+ * @default 'Regular'
62
+ */
63
+ @Property('Regular')
64
+ public mode: AppBarMode;
65
+
66
+ /**
67
+ * Specifies the position of the AppBar. The possible values for this property are as follows:
68
+ * * `Top`: Position the AppBar at the top.
69
+ * * `Bottom`: Position the AppBar at the bottom.
70
+ *
71
+ * @default 'Top'
72
+ */
73
+ @Property('Top')
74
+ public position: AppBarPosition;
75
+
76
+ /**
77
+ * Accepts single/multiple CSS classes (separated by a space) to be used for AppBar customization.
78
+ *
79
+ * @default null
80
+ */
81
+ @Property()
82
+ public cssClass: string;
83
+
84
+ /**
85
+ * Defines whether the AppBar position is fixed or not while scrolling the page.
86
+ * When set to `true`, the AppBar will be sticky while scrolling.
87
+ *
88
+ * @default false
89
+ */
90
+ @Property(false)
91
+ public isSticky: boolean;
92
+
93
+ /**
94
+ * Accepts HTML attributes/custom attributes that will be applied to the AppBar element.
95
+ *
96
+ * @default null
97
+ */
98
+ @Property()
99
+ public htmlAttributes: Record<string, string>;
100
+
101
+ /**
102
+ * Specifies the color mode that defines the color of the AppBar component. The possible values for this property are as follows:
103
+ * * `Light`: Specifies the AppBar in light color.
104
+ * * `Dark`: Specifies the AppBar in dark color.
105
+ * * `Primary`: Specifies the AppBar in a primary color.
106
+ * * `Inherit`: Inherit color from parent for AppBar. AppBar background and colors are inherited from its parent element.
107
+ *
108
+ * @default 'Light'
109
+ */
110
+ @Property('Light')
111
+ public colorMode: AppBarColor;
112
+
113
+ /**
114
+ * Triggers after the AppBar component is created.
115
+ *
116
+ * @event created
117
+ */
118
+ @Event()
119
+ public created: EmitType<Event>;
120
+
121
+ /**
122
+ * Triggers when the AppBar component is destroyed.
123
+ *
124
+ * @event destroyed
125
+ */
126
+ @Event()
127
+ public destroyed: EmitType<Event>;
128
+
129
+ /**
130
+ * Constructor for creating the AppBar widget
131
+ *
132
+ * @param {AppBarModel} options Accepts the AppBar model properties to initiate the rendering
133
+ * @param {string | HTMLElement} element Accepts the DOM element reference
134
+ */
135
+ public constructor(options?: AppBarModel, element?: string | HTMLElement) {
136
+ super(options, <HTMLElement | string>element);
137
+ }
138
+
139
+ /**
140
+ * Removes the control from the DOM and also removes all its related events.
141
+ *
142
+ * @returns {void}
143
+ */
144
+ public destroy(): void {
145
+ super.destroy();
146
+ this.element.classList.remove(CLS_APPBAR);
147
+ this.element.removeAttribute('style');
148
+ this.element.removeAttribute('role');
149
+ }
150
+
151
+ protected getModuleName(): string {
152
+ return 'appbar';
153
+ }
154
+
155
+ protected getPersistData(): string {
156
+ return this.addOnPersist([]);
157
+ }
158
+
159
+ protected preRender(): void {
160
+ // pre render code
161
+ }
162
+
163
+ protected render(): void {
164
+ this.element.classList.add(CLS_APPBAR);
165
+ if (this.element.tagName !== 'HEADER') {
166
+ this.element.setAttribute('role', 'banner');
167
+ }
168
+ if (this.cssClass) {
169
+ addClass([this.element], this.cssClass.split(' '));
170
+ }
171
+ if (this.position === 'Bottom') {
172
+ this.element.classList.add(CLS_HORIZONTAL_BOTTOM);
173
+ }
174
+ if (this.isSticky) {
175
+ this.element.classList.add(CLS_STICKY);
176
+ }
177
+ if (this.enableRtl) {
178
+ this.element.classList.add(CLS_RTL);
179
+ }
180
+ this.setHeightMode();
181
+ this.setColorMode();
182
+ if (!isNullOrUndefined(this.htmlAttributes)) {
183
+ this.setHtmlAttributes(this.htmlAttributes, this.element);
184
+ }
185
+ }
186
+
187
+ public onPropertyChanged(newProp: AppBarModel, oldProp: AppBarModel): void {
188
+ for (const prop of Object.keys(newProp)) {
189
+ switch (prop) {
190
+ case 'mode':
191
+ removeClass([this.element], [CLS_DENSE, CLS_PROMINENT]);
192
+ this.setHeightMode();
193
+ break;
194
+ case 'position':
195
+ if (this.position === 'Bottom') {
196
+ addClass([this.element], CLS_HORIZONTAL_BOTTOM);
197
+ } else {
198
+ removeClass([this.element], CLS_HORIZONTAL_BOTTOM);
199
+ }
200
+ break;
201
+ case 'cssClass':
202
+ if (oldProp.cssClass) {
203
+ removeClass([this.element], oldProp.cssClass.split(' '));
204
+ }
205
+ if (newProp.cssClass) {
206
+ addClass([this.element], newProp.cssClass.split(' '));
207
+ }
208
+ break;
209
+ case 'isSticky':
210
+ if (this.isSticky) {
211
+ addClass([this.element], CLS_STICKY);
212
+ } else {
213
+ removeClass([this.element], CLS_STICKY);
214
+ }
215
+ break;
216
+ case 'htmlAttributes':
217
+ if (!isNullOrUndefined(this.htmlAttributes)) {
218
+ if (!isNullOrUndefined(oldProp.htmlAttributes)) {
219
+ const keys: string[] = Object.keys(oldProp.htmlAttributes);
220
+ for (const key of keys) {
221
+ if (key === 'class') {
222
+ removeClass([this.element], oldProp.htmlAttributes[`${key}`]);
223
+ } else {
224
+ this.element.removeAttribute(key);
225
+ }
226
+ }
227
+ }
228
+ this.setHtmlAttributes(newProp.htmlAttributes, this.element);
229
+ }
230
+ break;
231
+ case 'colorMode':
232
+ removeClass([this.element], [CLS_DARK, CLS_PRIMARY, CLS_INHERIT, CLS_LIGHT]);
233
+ this.setColorMode();
234
+ break;
235
+ case 'enableRtl':
236
+ if (this.enableRtl) {
237
+ addClass([this.element], CLS_RTL);
238
+ } else {
239
+ removeClass([this.element], CLS_RTL);
240
+ }
241
+ break;
242
+ }
243
+ }
244
+ }
245
+
246
+ private setHtmlAttributes(attribute: Record<string, string>, element: HTMLElement): void {
247
+ const keys: string[] = Object.keys(attribute);
248
+ for (const key of keys) {
249
+ if (key === 'class') {
250
+ addClass([element], attribute[`${key}`]);
251
+ } else {
252
+ element.setAttribute(key, attribute[`${key}`]);
253
+ }
254
+ }
255
+ }
256
+
257
+ private setHeightMode(): void {
258
+ if (this.mode === 'Prominent') {
259
+ this.element.classList.add(CLS_PROMINENT);
260
+ } else if (this.mode === 'Dense') {
261
+ this.element.classList.add(CLS_DENSE);
262
+ }
263
+ }
264
+
265
+ private setColorMode(): void {
266
+ switch (this.colorMode) {
267
+ case 'Light':
268
+ this.element.classList.add(CLS_LIGHT);
269
+ break;
270
+ case 'Dark':
271
+ this.element.classList.add(CLS_DARK);
272
+ break;
273
+ case 'Primary':
274
+ this.element.classList.add(CLS_PRIMARY);
275
+ break;
276
+ case 'Inherit':
277
+ this.element.classList.add(CLS_INHERIT);
278
+ break;
279
+ }
280
+ }
281
+ }
@@ -0,0 +1,3 @@
1
+ /** AppBar export modules */
2
+ export * from './appbar';
3
+ export * from './appbar-model';
@@ -0,0 +1,3 @@
1
+ /** AppBar export modules */
2
+ export * from './appbar';
3
+ export * from './appbar-model';
@@ -0,0 +1,170 @@
1
+ import { Component, NotifyPropertyChanges, INotifyPropertyChanged, ChildProperty, Property, Collection, append, extend, Event, EmitType, BaseEventArgs, EventHandler, closest, addClass, removeClass, detach, remove, initializeCSPTemplate, isNullOrUndefined } from '@syncfusion/ej2-base';import { ListBase, ListBaseOptions } from '@syncfusion/ej2-lists';import { Popup } from '@syncfusion/ej2-popups';
2
+ import {BreadcrumbOverflowMode,BreadcrumbBeforeItemRenderEventArgs,BreadcrumbClickEventArgs} from "./breadcrumb";
3
+ import {ComponentModel} from '@syncfusion/ej2-base';
4
+
5
+ /**
6
+ * Interface for a class BreadcrumbItem
7
+ */
8
+ export interface BreadcrumbItemModel {
9
+
10
+ /**
11
+ * Specifies the text content of the Breadcrumb item.
12
+ *
13
+ * @default ''
14
+ */
15
+ text?: string;
16
+
17
+ /**
18
+ * Specifies the id of the Breadcrumb item.
19
+ *
20
+ * @default ''
21
+ */
22
+ id?: string;
23
+
24
+ /**
25
+ * Specifies the Url of the Breadcrumb item that will be activated when clicked.
26
+ *
27
+ * @default ''
28
+ */
29
+ url?: string;
30
+
31
+ /**
32
+ * Defines a class/multiple classes separated by a space for the item that is used to include an icon.
33
+ *
34
+ * @default null
35
+ */
36
+ iconCss?: string;
37
+
38
+ /**
39
+ * Enable or disable the breadcrumb item, when set to true, the breadcrumb item will be disabled.
40
+ *
41
+ * @default false
42
+ */
43
+ disabled?: boolean;
44
+
45
+ }
46
+
47
+ /**
48
+ * Interface for a class Breadcrumb
49
+ */
50
+ export interface BreadcrumbModel extends ComponentModel{
51
+
52
+ /**
53
+ * Defines the Url based on which the Breadcrumb items are generated.
54
+ *
55
+ * @default ''
56
+ */
57
+ url?: string;
58
+
59
+ /**
60
+ * Defines the list of Breadcrumb items.
61
+ *
62
+ * @default []
63
+ */
64
+ items?: BreadcrumbItemModel[];
65
+
66
+ /**
67
+ * Specifies the Url of the active Breadcrumb item.
68
+ *
69
+ * @default ''
70
+ */
71
+ activeItem?: string;
72
+
73
+ /**
74
+ * Specifies an integer to enable overflow behavior when the Breadcrumb items count exceeds and it is based on the overflowMode property.
75
+ *
76
+ * @default -1
77
+ * @aspType int
78
+ */
79
+ maxItems?: number;
80
+
81
+ /**
82
+ * Specifies the overflow mode of the Breadcrumb item when it exceeds maxItems count. The possible values are,
83
+ * - Default: Specified maxItems count will be visible and the remaining items will be hidden. While clicking on the previous item, the hidden item will become visible.
84
+ * - Collapsed: Only the first and last items will be visible, and the remaining items will be hidden in the collapsed icon. When the collapsed icon is clicked, all items become visible.
85
+ * - Menu: Shows the number of breadcrumb items that can be accommodated within the container space, and creates a sub menu with the remaining items.
86
+ * - Wrap: Wraps the items on multiple lines when the Breadcrumb’s width exceeds the container space.
87
+ * - Scroll: Shows an HTML scroll bar when the Breadcrumb’s width exceeds the container space.
88
+ * - None: Shows all the items on a single line.
89
+ *
90
+ * @isenumeration true
91
+ * @default BreadcrumbOverflowMode.Menu
92
+ * @asptype BreadcrumbOverflowMode
93
+ */
94
+ overflowMode?: string | BreadcrumbOverflowMode;
95
+
96
+ /**
97
+ * Defines class/multiple classes separated by a space in the Breadcrumb element.
98
+ *
99
+ * @default ''
100
+ */
101
+ cssClass?: string;
102
+
103
+ /**
104
+ * Specifies the template for Breadcrumb item.
105
+ *
106
+ * @default null
107
+ * @aspType string
108
+ */
109
+ itemTemplate?: string | Function;
110
+
111
+ /**
112
+ * Specifies the separator template for Breadcrumb.
113
+ *
114
+ * @default '/'
115
+ * @aspType string
116
+ */
117
+ separatorTemplate?: string | Function;
118
+
119
+ /**
120
+ * Enable or disable the item's navigation, when set to false, each item navigation will be prevented.
121
+ *
122
+ * @default true
123
+ */
124
+ enableNavigation?: boolean;
125
+
126
+ /**
127
+ * Enable or disable the active item navigation, when set to true, active item will be navigable.
128
+ *
129
+ * @default false
130
+ */
131
+ enableActiveItemNavigation?: boolean;
132
+
133
+ /**
134
+ * Enable or disable the breadcrumb, when set to true, the breadcrumb will be disabled.
135
+ *
136
+ * @default false
137
+ */
138
+ disabled?: boolean;
139
+
140
+ /**
141
+ * Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
142
+ *
143
+ * @default ''
144
+ * @private
145
+ * @aspIgnore
146
+ */
147
+ locale?: string;
148
+
149
+ /**
150
+ * Triggers while rendering each breadcrumb item.
151
+ *
152
+ * @event beforeItemRender
153
+ */
154
+ beforeItemRender?: EmitType<BreadcrumbBeforeItemRenderEventArgs>;
155
+
156
+ /**
157
+ * Triggers while clicking the breadcrumb item.
158
+ *
159
+ * @event itemClick
160
+ */
161
+ itemClick?: EmitType<BreadcrumbClickEventArgs>;
162
+
163
+ /**
164
+ * Triggers once the component rendering is completed.
165
+ *
166
+ * @event created
167
+ */
168
+ created?: EmitType<Event>;
169
+
170
+ }