@syncfusion/ej2-navigations 19.2.59 → 19.3.44

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 (292) hide show
  1. package/.eslintrc.json +1 -1
  2. package/CHANGELOG.md +32 -0
  3. package/README.md +15 -0
  4. package/breadcrumb.d.ts +4 -0
  5. package/breadcrumb.js +4 -0
  6. package/dist/ej2-navigations.umd.min.js +2 -2
  7. package/dist/ej2-navigations.umd.min.js.map +1 -1
  8. package/dist/es6/ej2-navigations.es2015.js +545 -170
  9. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  10. package/dist/es6/ej2-navigations.es5.js +567 -172
  11. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  12. package/dist/global/ej2-navigations.min.js +2 -2
  13. package/dist/global/ej2-navigations.min.js.map +1 -1
  14. package/dist/global/index.d.ts +1 -1
  15. package/package.json +13 -12
  16. package/src/accordion/accordion.d.ts +2 -8
  17. package/src/accordion/accordion.js +16 -85
  18. package/src/breadcrumb/breadcrumb-model.d.ts +147 -0
  19. package/src/breadcrumb/breadcrumb.d.ts +232 -0
  20. package/src/breadcrumb/breadcrumb.js +497 -0
  21. package/src/breadcrumb/index.d.ts +5 -0
  22. package/src/breadcrumb/index.js +4 -0
  23. package/src/index.d.ts +1 -0
  24. package/src/index.js +1 -0
  25. package/src/sidebar/sidebar.js +2 -2
  26. package/src/tab/tab-model.d.ts +1 -1
  27. package/src/tab/tab.d.ts +1 -1
  28. package/src/tab/tab.js +50 -84
  29. package/src/toolbar/toolbar.js +1 -1
  30. package/styles/accordion/_bootstrap5-dark-definition.scss +1 -0
  31. package/styles/accordion/_bootstrap5-definition.scss +81 -0
  32. package/styles/accordion/_fabric-dark-definition.scss +1 -0
  33. package/styles/accordion/_fabric-definition.scss +1 -0
  34. package/styles/accordion/_highcontrast-definition.scss +1 -1
  35. package/styles/accordion/_layout.scss +6 -8
  36. package/styles/accordion/_tailwind-dark-definition.scss +1 -77
  37. package/styles/accordion/_tailwind-definition.scss +79 -79
  38. package/styles/accordion/_theme.scss +57 -17
  39. package/styles/accordion/bootstrap5-dark.css +428 -0
  40. package/styles/accordion/bootstrap5-dark.scss +4 -0
  41. package/styles/accordion/bootstrap5.css +428 -0
  42. package/styles/accordion/bootstrap5.scss +4 -0
  43. package/styles/accordion/highcontrast-light.css +0 -1
  44. package/styles/accordion/highcontrast.css +0 -1
  45. package/styles/accordion/icons/_bootstrap4.scss +1 -1
  46. package/styles/accordion/icons/_bootstrap5-dark.scss +1 -0
  47. package/styles/accordion/icons/_bootstrap5.scss +18 -0
  48. package/styles/accordion/icons/_tailwind-dark.scss +1 -17
  49. package/styles/accordion/icons/_tailwind.scss +17 -17
  50. package/styles/accordion/material-dark.css +2 -2
  51. package/styles/accordion/tailwind-dark.css +1 -1
  52. package/styles/bootstrap-dark.css +352 -60
  53. package/styles/bootstrap-dark.scss +1 -0
  54. package/styles/bootstrap.css +349 -57
  55. package/styles/bootstrap.scss +1 -0
  56. package/styles/bootstrap4.css +351 -60
  57. package/styles/bootstrap4.scss +1 -0
  58. package/styles/bootstrap5-dark.css +9922 -0
  59. package/styles/bootstrap5-dark.scss +10 -0
  60. package/styles/bootstrap5.css +9922 -0
  61. package/styles/bootstrap5.scss +10 -0
  62. package/styles/breadcrumb/_all.scss +2 -0
  63. package/styles/breadcrumb/_bootstrap-dark-definition.scss +41 -0
  64. package/styles/breadcrumb/_bootstrap-definition.scss +41 -0
  65. package/styles/breadcrumb/_bootstrap4-definition.scss +41 -0
  66. package/styles/breadcrumb/_bootstrap5-dark-definition.scss +1 -0
  67. package/styles/breadcrumb/_bootstrap5-definition.scss +46 -0
  68. package/styles/breadcrumb/_fabric-dark-definition.scss +46 -0
  69. package/styles/breadcrumb/_fabric-definition.scss +46 -0
  70. package/styles/breadcrumb/_highcontrast-definition.scss +48 -0
  71. package/styles/breadcrumb/_highcontrast-light-definition.scss +48 -0
  72. package/styles/breadcrumb/_layout.scss +291 -0
  73. package/styles/breadcrumb/_material-dark-definition.scss +37 -0
  74. package/styles/breadcrumb/_material-definition.scss +37 -0
  75. package/styles/breadcrumb/_tailwind-dark-definition.scss +47 -0
  76. package/styles/breadcrumb/_tailwind-definition.scss +47 -0
  77. package/styles/breadcrumb/_theme.scss +134 -0
  78. package/styles/breadcrumb/bootstrap-dark.css +279 -0
  79. package/styles/breadcrumb/bootstrap-dark.scss +4 -0
  80. package/styles/breadcrumb/bootstrap.css +279 -0
  81. package/styles/breadcrumb/bootstrap.scss +4 -0
  82. package/styles/breadcrumb/bootstrap4.css +279 -0
  83. package/styles/breadcrumb/bootstrap4.scss +4 -0
  84. package/styles/breadcrumb/bootstrap5-dark.css +297 -0
  85. package/styles/breadcrumb/bootstrap5-dark.scss +4 -0
  86. package/styles/breadcrumb/bootstrap5.css +297 -0
  87. package/styles/breadcrumb/bootstrap5.scss +4 -0
  88. package/styles/breadcrumb/fabric-dark.css +277 -0
  89. package/styles/breadcrumb/fabric-dark.scss +4 -0
  90. package/styles/breadcrumb/fabric.css +277 -0
  91. package/styles/breadcrumb/fabric.scss +4 -0
  92. package/styles/breadcrumb/highcontrast-light.css +285 -0
  93. package/styles/breadcrumb/highcontrast-light.scss +4 -0
  94. package/styles/breadcrumb/highcontrast.css +285 -0
  95. package/styles/breadcrumb/highcontrast.scss +4 -0
  96. package/styles/breadcrumb/icons/_bootstrap-dark.scss +13 -0
  97. package/styles/breadcrumb/icons/_bootstrap.scss +13 -0
  98. package/styles/breadcrumb/icons/_bootstrap4.scss +13 -0
  99. package/styles/breadcrumb/icons/_bootstrap5-dark.scss +1 -0
  100. package/styles/breadcrumb/icons/_bootstrap5.scss +24 -0
  101. package/styles/breadcrumb/icons/_fabric-dark.scss +13 -0
  102. package/styles/breadcrumb/icons/_fabric.scss +13 -0
  103. package/styles/breadcrumb/icons/_highcontrast-light.scss +13 -0
  104. package/styles/breadcrumb/icons/_highcontrast.scss +13 -0
  105. package/styles/breadcrumb/icons/_material-dark.scss +24 -0
  106. package/styles/breadcrumb/icons/_material.scss +24 -0
  107. package/styles/breadcrumb/icons/_tailwind-dark.scss +13 -0
  108. package/styles/breadcrumb/icons/_tailwind.scss +13 -0
  109. package/styles/breadcrumb/material-dark.css +259 -0
  110. package/styles/breadcrumb/material-dark.scss +4 -0
  111. package/styles/breadcrumb/material.css +259 -0
  112. package/styles/breadcrumb/material.scss +4 -0
  113. package/styles/breadcrumb/tailwind-dark.css +280 -0
  114. package/styles/breadcrumb/tailwind-dark.scss +4 -0
  115. package/styles/breadcrumb/tailwind.css +280 -0
  116. package/styles/breadcrumb/tailwind.scss +4 -0
  117. package/styles/context-menu/_bootstrap5-dark-definition.scss +1 -0
  118. package/styles/context-menu/_bootstrap5-definition.scss +52 -0
  119. package/styles/context-menu/_tailwind-dark-definition.scss +1 -53
  120. package/styles/context-menu/_tailwind-definition.scss +52 -51
  121. package/styles/context-menu/bootstrap5-dark.css +382 -0
  122. package/styles/context-menu/bootstrap5-dark.scss +4 -0
  123. package/styles/context-menu/bootstrap5.css +382 -0
  124. package/styles/context-menu/bootstrap5.scss +4 -0
  125. package/styles/context-menu/icons/_bootstrap5-dark.scss +1 -0
  126. package/styles/context-menu/icons/_bootstrap5.scss +32 -0
  127. package/styles/context-menu/icons/_tailwind-dark.scss +32 -32
  128. package/styles/context-menu/icons/_tailwind.scss +32 -32
  129. package/styles/fabric-dark.css +352 -78
  130. package/styles/fabric-dark.scss +1 -0
  131. package/styles/fabric.css +346 -72
  132. package/styles/fabric.scss +1 -0
  133. package/styles/h-scroll/_bootstrap5-dark-definition.scss +1 -0
  134. package/styles/h-scroll/_bootstrap5-definition.scss +78 -0
  135. package/styles/h-scroll/_fabric-dark-definition.scss +1 -1
  136. package/styles/h-scroll/_highcontrast-definition.scss +1 -1
  137. package/styles/h-scroll/_layout.scss +1 -1
  138. package/styles/h-scroll/_tailwind-dark-definition.scss +1 -78
  139. package/styles/h-scroll/bootstrap5-dark.css +328 -0
  140. package/styles/h-scroll/bootstrap5-dark.scss +4 -0
  141. package/styles/h-scroll/bootstrap5.css +328 -0
  142. package/styles/h-scroll/bootstrap5.scss +4 -0
  143. package/styles/h-scroll/fabric-dark.css +1 -1
  144. package/styles/h-scroll/highcontrast.css +1 -1
  145. package/styles/h-scroll/icons/_bootstrap4.scss +1 -1
  146. package/styles/h-scroll/icons/_bootstrap5-dark.scss +1 -0
  147. package/styles/h-scroll/icons/_bootstrap5.scss +49 -0
  148. package/styles/h-scroll/icons/_tailwind-dark.scss +1 -49
  149. package/styles/highcontrast-light.css +354 -73
  150. package/styles/highcontrast-light.scss +1 -0
  151. package/styles/highcontrast.css +356 -75
  152. package/styles/highcontrast.scss +1 -0
  153. package/styles/material-dark.css +360 -105
  154. package/styles/material-dark.scss +1 -0
  155. package/styles/material.css +324 -69
  156. package/styles/material.scss +1 -0
  157. package/styles/menu/_bootstrap5-dark-definition.scss +1 -0
  158. package/styles/menu/_bootstrap5-definition.scss +68 -0
  159. package/styles/menu/_layout.scss +12 -2
  160. package/styles/menu/_tailwind-dark-definition.scss +1 -66
  161. package/styles/menu/_tailwind-definition.scss +66 -64
  162. package/styles/menu/_theme.scss +1 -1
  163. package/styles/menu/bootstrap-dark.css +36 -36
  164. package/styles/menu/bootstrap.css +36 -36
  165. package/styles/menu/bootstrap4.css +34 -34
  166. package/styles/menu/bootstrap5-dark.css +1251 -0
  167. package/styles/menu/bootstrap5-dark.scss +8 -0
  168. package/styles/menu/bootstrap5.css +1251 -0
  169. package/styles/menu/bootstrap5.scss +8 -0
  170. package/styles/menu/fabric-dark.css +36 -36
  171. package/styles/menu/fabric.css +36 -36
  172. package/styles/menu/highcontrast-light.css +36 -36
  173. package/styles/menu/highcontrast.css +36 -36
  174. package/styles/menu/icons/_bootstrap5-dark.scss +1 -0
  175. package/styles/menu/icons/_bootstrap5.scss +133 -0
  176. package/styles/menu/icons/_tailwind-dark.scss +133 -133
  177. package/styles/menu/icons/_tailwind.scss +133 -133
  178. package/styles/menu/material-dark.css +36 -36
  179. package/styles/menu/material.css +36 -36
  180. package/styles/menu/tailwind-dark.css +36 -36
  181. package/styles/menu/tailwind.css +36 -36
  182. package/styles/sidebar/_bootstrap5-dark-definition.scss +1 -0
  183. package/styles/sidebar/_bootstrap5-definition.scss +5 -0
  184. package/styles/sidebar/_highcontrast-definition.scss +1 -1
  185. package/styles/sidebar/_tailwind-dark-definition.scss +1 -4
  186. package/styles/sidebar/_tailwind-definition.scss +2 -1
  187. package/styles/sidebar/_theme.scss +3 -3
  188. package/styles/sidebar/bootstrap5-dark.css +155 -0
  189. package/styles/sidebar/bootstrap5-dark.scss +3 -0
  190. package/styles/sidebar/bootstrap5.css +155 -0
  191. package/styles/sidebar/bootstrap5.scss +3 -0
  192. package/styles/sidebar/highcontrast.css +1 -1
  193. package/styles/tab/_bootstrap-dark-definition.scss +2 -2
  194. package/styles/tab/_bootstrap-definition.scss +1 -1
  195. package/styles/tab/_bootstrap4-definition.scss +2 -2
  196. package/styles/tab/_bootstrap5-dark-definition.scss +1 -0
  197. package/styles/tab/_bootstrap5-definition.scss +401 -0
  198. package/styles/tab/_layout.scss +45 -51
  199. package/styles/tab/_material-dark-definition.scss +0 -1
  200. package/styles/tab/_tailwind-dark-definition.scss +1 -420
  201. package/styles/tab/_tailwind-definition.scss +420 -420
  202. package/styles/tab/_theme.scss +166 -53
  203. package/styles/tab/bootstrap-dark.css +15 -14
  204. package/styles/tab/bootstrap.css +12 -11
  205. package/styles/tab/bootstrap4.css +15 -14
  206. package/styles/tab/bootstrap5-dark.css +4442 -0
  207. package/styles/tab/bootstrap5-dark.scss +5 -0
  208. package/styles/tab/bootstrap5.css +4442 -0
  209. package/styles/tab/bootstrap5.scss +5 -0
  210. package/styles/tab/fabric-dark.css +16 -15
  211. package/styles/tab/fabric.css +14 -13
  212. package/styles/tab/highcontrast-light.css +14 -13
  213. package/styles/tab/highcontrast.css +14 -13
  214. package/styles/tab/icons/_bootstrap-dark.scss +2 -2
  215. package/styles/tab/icons/_bootstrap5-dark.scss +1 -0
  216. package/styles/tab/icons/_bootstrap5.scss +141 -0
  217. package/styles/tab/icons/_fabric-dark.scss +2 -2
  218. package/styles/tab/icons/_tailwind-dark.scss +1 -140
  219. package/styles/tab/icons/_tailwind.scss +140 -140
  220. package/styles/tab/material-dark.css +36 -35
  221. package/styles/tab/material.css +11 -10
  222. package/styles/tab/tailwind-dark.css +27 -39
  223. package/styles/tab/tailwind.css +22 -34
  224. package/styles/tailwind-dark.css +379 -111
  225. package/styles/tailwind-dark.scss +1 -0
  226. package/styles/tailwind.css +364 -96
  227. package/styles/tailwind.scss +1 -0
  228. package/styles/toolbar/_bootstrap5-dark-definition.scss +1 -0
  229. package/styles/toolbar/_bootstrap5-definition.scss +143 -0
  230. package/styles/toolbar/_fabric-dark-definition.scss +1 -3
  231. package/styles/toolbar/_layout.scss +18 -9
  232. package/styles/toolbar/_material-dark-definition.scss +0 -1
  233. package/styles/toolbar/_tailwind-dark-definition.scss +1 -143
  234. package/styles/toolbar/_tailwind-definition.scss +143 -143
  235. package/styles/toolbar/_theme.scss +98 -16
  236. package/styles/toolbar/bootstrap-dark.css +13 -10
  237. package/styles/toolbar/bootstrap.css +13 -10
  238. package/styles/toolbar/bootstrap4.css +14 -12
  239. package/styles/toolbar/bootstrap5-dark.css +1409 -0
  240. package/styles/toolbar/bootstrap5-dark.scss +8 -0
  241. package/styles/toolbar/bootstrap5.css +1409 -0
  242. package/styles/toolbar/bootstrap5.scss +8 -0
  243. package/styles/toolbar/fabric-dark.css +13 -26
  244. package/styles/toolbar/fabric.css +10 -23
  245. package/styles/toolbar/highcontrast-light.css +10 -23
  246. package/styles/toolbar/highcontrast.css +10 -23
  247. package/styles/toolbar/icons/_bootstrap5-dark.scss +1 -0
  248. package/styles/toolbar/icons/_bootstrap5.scss +17 -0
  249. package/styles/toolbar/icons/_tailwind-dark.scss +1 -16
  250. package/styles/toolbar/icons/_tailwind.scss +16 -16
  251. package/styles/toolbar/material-dark.css +11 -24
  252. package/styles/toolbar/material.css +10 -23
  253. package/styles/toolbar/tailwind-dark.css +20 -29
  254. package/styles/toolbar/tailwind.css +16 -25
  255. package/styles/treeview/_bootstrap4-definition.scss +3 -3
  256. package/styles/treeview/_bootstrap5-dark-definition.scss +1 -0
  257. package/styles/treeview/_bootstrap5-definition.scss +109 -0
  258. package/styles/treeview/_layout.scss +64 -17
  259. package/styles/treeview/_tailwind-dark-definition.scss +1 -110
  260. package/styles/treeview/_tailwind-definition.scss +30 -28
  261. package/styles/treeview/_theme.scss +26 -6
  262. package/styles/treeview/bootstrap-dark.css +8 -0
  263. package/styles/treeview/bootstrap.css +8 -0
  264. package/styles/treeview/bootstrap4.css +8 -0
  265. package/styles/treeview/bootstrap5-dark.css +974 -0
  266. package/styles/treeview/bootstrap5-dark.scss +6 -0
  267. package/styles/treeview/bootstrap5.css +974 -0
  268. package/styles/treeview/bootstrap5.scss +6 -0
  269. package/styles/treeview/fabric-dark.css +8 -0
  270. package/styles/treeview/fabric.css +8 -0
  271. package/styles/treeview/highcontrast-light.css +8 -0
  272. package/styles/treeview/highcontrast.css +8 -0
  273. package/styles/treeview/icons/_bootstrap5-dark.scss +1 -0
  274. package/styles/treeview/icons/_bootstrap5.scss +43 -0
  275. package/styles/treeview/icons/_tailwind-dark.scss +43 -43
  276. package/styles/treeview/material-dark.css +15 -7
  277. package/styles/treeview/material.css +8 -0
  278. package/styles/treeview/tailwind-dark.css +10 -2
  279. package/styles/treeview/tailwind.css +9 -1
  280. package/styles/v-scroll/_bootstrap5-dark-definition.scss +1 -0
  281. package/styles/v-scroll/_bootstrap5-definition.scss +49 -0
  282. package/styles/v-scroll/_tailwind-dark-definition.scss +1 -49
  283. package/styles/v-scroll/bootstrap5-dark.css +247 -0
  284. package/styles/v-scroll/bootstrap5-dark.scss +4 -0
  285. package/styles/v-scroll/bootstrap5.css +247 -0
  286. package/styles/v-scroll/bootstrap5.scss +4 -0
  287. package/styles/v-scroll/icons/_bootstrap4.scss +1 -1
  288. package/styles/v-scroll/icons/_bootstrap5-dark.scss +1 -0
  289. package/styles/v-scroll/icons/_bootstrap5.scss +27 -0
  290. package/styles/v-scroll/icons/_tailwind-dark.scss +1 -26
  291. package/styles/v-scroll/material-dark.css +1 -1
  292. package/styles/v-scroll/tailwind-dark.css +4 -4
@@ -0,0 +1,497 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ };
20
+ import { Component, NotifyPropertyChanges, ChildProperty, Property, Collection, append, extend, Event, EventHandler, closest, addClass, removeClass } from '@syncfusion/ej2-base';
21
+ import { ListBase } from '@syncfusion/ej2-lists';
22
+ var ICONRIGHT = 'e-icon-right';
23
+ var ITEMTEXTCLASS = 'e-breadcrumb-text';
24
+ var ICONCLASS = 'e-breadcrumb-icon';
25
+ var BreadcrumbItem = /** @class */ (function (_super) {
26
+ __extends(BreadcrumbItem, _super);
27
+ function BreadcrumbItem() {
28
+ return _super !== null && _super.apply(this, arguments) || this;
29
+ }
30
+ __decorate([
31
+ Property('')
32
+ ], BreadcrumbItem.prototype, "text", void 0);
33
+ __decorate([
34
+ Property('')
35
+ ], BreadcrumbItem.prototype, "url", void 0);
36
+ __decorate([
37
+ Property(null)
38
+ ], BreadcrumbItem.prototype, "iconCss", void 0);
39
+ return BreadcrumbItem;
40
+ }(ChildProperty));
41
+ export { BreadcrumbItem };
42
+ /**
43
+ * Breadcrumb is a graphical user interface that helps to identify or highlight the current location within a hierarchical structure of websites.
44
+ * The aim is to make the user aware of their current position in a hierarchy of website links.
45
+ * ```html
46
+ * <nav id='breadcrumb'></nav>
47
+ * ```
48
+ * ```typescript
49
+ * <script>
50
+ * var breadcrumbObj = new Breadcrumb({ items: [{ text: 'Home', url: '/' }, { text: 'Index', url: './index.html }]});
51
+ * breadcrumbObj.appendTo("#breadcrumb");
52
+ * </script>
53
+ * ```
54
+ */
55
+ var Breadcrumb = /** @class */ (function (_super) {
56
+ __extends(Breadcrumb, _super);
57
+ /**
58
+ * Constructor for creating the widget.
59
+ *
60
+ * @private
61
+ * @param {BreadcrumbModel} options - Specifies the Breadcrumb model.
62
+ * @param {string | HTMLElement} element - Specifies the element.
63
+ */
64
+ function Breadcrumb(options, element) {
65
+ return _super.call(this, options, element) || this;
66
+ }
67
+ /**
68
+ * @private
69
+ * @returns {void}
70
+ */
71
+ Breadcrumb.prototype.preRender = function () {
72
+ // pre render code
73
+ };
74
+ /**
75
+ * Initialize the control rendering.
76
+ *
77
+ * @private
78
+ * @returns {void}
79
+ */
80
+ Breadcrumb.prototype.render = function () {
81
+ this.initialize();
82
+ this.renderItems(this.items);
83
+ this.wireEvents();
84
+ };
85
+ Breadcrumb.prototype.initialize = function () {
86
+ this._maxItems = this.maxItems;
87
+ this.element.setAttribute('aria-label', 'breadcrumb');
88
+ if (this.cssClass) {
89
+ addClass([this.element], this.cssClass.split(' '));
90
+ }
91
+ this.setWidth();
92
+ this.initItems();
93
+ this.initPvtProps();
94
+ };
95
+ Breadcrumb.prototype.initPvtProps = function () {
96
+ if (this.overflowMode === 'Default' && this._maxItems > 0) {
97
+ this.startIndex = this.items.length - (this._maxItems - 1);
98
+ this.endIndex = this.items.length - 1;
99
+ }
100
+ };
101
+ Breadcrumb.prototype.setWidth = function () {
102
+ if (this.width) {
103
+ this.element.style.width = this.width;
104
+ }
105
+ };
106
+ Breadcrumb.prototype.initItems = function () {
107
+ if (!this.items.length) {
108
+ var baseUri = void 0;
109
+ var uri = void 0;
110
+ var items = [];
111
+ if (this.url) {
112
+ var url = new URL(this.url);
113
+ baseUri = url.origin + '/';
114
+ uri = url.href.split(baseUri)[1].split('/');
115
+ }
116
+ else {
117
+ baseUri = window.location.origin + '/';
118
+ uri = window.location.href.split(baseUri)[1].split('/');
119
+ }
120
+ items.push({ iconCss: 'e-icons e-home', url: baseUri });
121
+ for (var i = 0; i < uri.length; i++) {
122
+ items.push({ text: uri[i], url: baseUri + uri[i] });
123
+ baseUri += uri[i] + '/';
124
+ }
125
+ this.setProperties({ items: items }, true);
126
+ }
127
+ };
128
+ Breadcrumb.prototype.renderItems = function (items) {
129
+ var _this = this;
130
+ var item;
131
+ var isSingleLevel;
132
+ var isIconRight = this.element.classList.contains(ICONRIGHT);
133
+ var itemsLength = items.length;
134
+ if (itemsLength) {
135
+ var isActiveItem = void 0;
136
+ var isLastItem = void 0;
137
+ var j_1 = 0;
138
+ var len = (itemsLength * 2) - 1;
139
+ var ol = this.createElement('ol');
140
+ var showIcon = this.hasField(items, 'iconCss');
141
+ var isDisabled_1 = this.element.classList.contains('e-disabled');
142
+ var isCollasped = (this.overflowMode === 'Collapsed' && this._maxItems > 0 && itemsLength > this.maxItems && !this.isExpanded);
143
+ var isDefaultOverflowMode_1 = (this.overflowMode === 'Default' && this._maxItems > 0);
144
+ var listBaseOptions = {
145
+ moduleName: this.getModuleName(),
146
+ showIcon: showIcon,
147
+ itemNavigable: true,
148
+ itemCreated: function (args) {
149
+ var isLastItem = args.curData.isLastItem;
150
+ if (args.curData.isEmptyUrl) {
151
+ args.item.children[0].removeAttribute('href');
152
+ if (!isLastItem || (isLastItem && _this.enableActiveItemNavigation)) {
153
+ args.item.children[0].setAttribute('tabindex', '0');
154
+ EventHandler.add(args.item.children[0], 'keydown', _this.keyDownHandler, _this);
155
+ }
156
+ }
157
+ if (isLastItem && args.item.children.length && !_this.itemTemplate) {
158
+ delete args.curData.isLastItem;
159
+ args.item.innerHTML = _this.createElement('span', { className: ITEMTEXTCLASS, innerHTML: args.item.children[0].innerHTML }).outerHTML;
160
+ }
161
+ if (args.curData.iconCss && !args.curData.text && !_this.itemTemplate) {
162
+ args.item.classList.add('e-icon-item');
163
+ }
164
+ if (isDefaultOverflowMode_1) {
165
+ args.item.setAttribute('item-index', j_1.toString());
166
+ }
167
+ if (args.item.querySelector('.' + ITEMTEXTCLASS)) {
168
+ EventHandler.add(args.item.querySelector('.' + ITEMTEXTCLASS), 'focus', function () {
169
+ args.item.classList.add('e-focus');
170
+ }, _this);
171
+ EventHandler.add(args.item.querySelector('.' + ITEMTEXTCLASS), 'focusout', function () {
172
+ args.item.classList.remove('e-focus');
173
+ }, _this);
174
+ }
175
+ var eventArgs = {
176
+ item: extend({}, args.curData.properties ?
177
+ args.curData.properties : args.curData), element: args.item
178
+ };
179
+ _this.trigger('beforeItemRender', eventArgs);
180
+ var containsRightIcon = (isIconRight || eventArgs.element.classList.contains(ICONRIGHT));
181
+ if (containsRightIcon && args.curData.iconCss && !_this.itemTemplate) {
182
+ args.item.querySelector('.e-anchor-wrap').append(args.item.querySelector('.' + ICONCLASS));
183
+ }
184
+ if (isDisabled_1 || eventArgs.element.classList.contains('e-disabled')) {
185
+ args.item.setAttribute('aria-disabled', 'true');
186
+ }
187
+ if (!_this.itemTemplate) {
188
+ _this.beforeItemRenderChanges(args.curData, eventArgs.item, args.item, containsRightIcon);
189
+ }
190
+ }
191
+ };
192
+ for (var i = 0; i < len; (i % 2 && j_1++), i++) {
193
+ isActiveItem = (this.activeItem && this.activeItem === items[j_1].url);
194
+ if (isCollasped && i > 1 && i < len - 2) {
195
+ continue;
196
+ }
197
+ else if (isDefaultOverflowMode_1 && ((j_1 < this.startIndex || j_1 > this.endIndex)
198
+ && (i % 2 ? j_1 !== this.startIndex - 1 : true)) && j_1 !== 0) {
199
+ continue;
200
+ }
201
+ if (i % 2) {
202
+ // separator item
203
+ listBaseOptions.template = this.separatorTemplate ? this.separatorTemplate : '/';
204
+ listBaseOptions.itemClass = 'e-breadcrumb-separator';
205
+ isSingleLevel = false;
206
+ item = [{ previousItem: item.pop(), nextItem: items[j_1] }];
207
+ }
208
+ else {
209
+ // list item
210
+ listBaseOptions.itemClass = '';
211
+ if (this.itemTemplate) {
212
+ listBaseOptions.template = this.itemTemplate;
213
+ isSingleLevel = false;
214
+ }
215
+ else {
216
+ isSingleLevel = true;
217
+ }
218
+ item = [extend({}, items[j_1].properties ? items[j_1].properties
219
+ : items[j_1])];
220
+ if (!item[0].url && !this.itemTemplate) {
221
+ item = [extend({}, item[0], { isEmptyUrl: true, url: '#' })];
222
+ }
223
+ isLastItem = isDefaultOverflowMode_1 && (j_1 === this.endIndex);
224
+ if ((((i === len - 1 || isLastItem) && !this.itemTemplate) || isActiveItem) && !this.enableActiveItemNavigation) {
225
+ item[0].isLastItem = true;
226
+ }
227
+ }
228
+ append(ListBase.createList(this.createElement, item, listBaseOptions, isSingleLevel, this)
229
+ .childNodes, ol);
230
+ if (isCollasped && i === 1) {
231
+ var li = this.createElement('li', { className: 'e-icons e-breadcrumb-collapsed', attrs: { 'tabindex': '0' } });
232
+ EventHandler.add(li, 'keyup', this.expandHandler, this);
233
+ ol.append(li);
234
+ }
235
+ if (isActiveItem || isLastItem) {
236
+ break;
237
+ }
238
+ }
239
+ if (this.isReact) {
240
+ this.renderReactTemplates();
241
+ }
242
+ this.element.append(ol);
243
+ this.calculateMaxItems();
244
+ }
245
+ };
246
+ Breadcrumb.prototype.calculateMaxItems = function () {
247
+ if (!this._maxItems) {
248
+ if (this.overflowMode === 'Default' || this.overflowMode === 'Collapsed') {
249
+ var width = this.element.offsetWidth;
250
+ var liWidth = this.element.children[0].children[0].offsetWidth;
251
+ var liElems = [].slice.call(this.element.children[0].children).reverse();
252
+ for (var i = 0; i < liElems.length; i++) {
253
+ if (liWidth > width) {
254
+ this._maxItems = Math.ceil((i - 1) / 2) + 1;
255
+ this.initPvtProps();
256
+ return this.reRenderItems();
257
+ }
258
+ else {
259
+ liWidth += liElems[i].offsetWidth;
260
+ }
261
+ }
262
+ }
263
+ }
264
+ };
265
+ Breadcrumb.prototype.hasField = function (items, field) {
266
+ for (var i = 0, len = items.length; i < len; i++) {
267
+ if (items[i][field]) {
268
+ return true;
269
+ }
270
+ }
271
+ return false;
272
+ };
273
+ Breadcrumb.prototype.beforeItemRenderChanges = function (prevItem, currItem, elem, isRightIcon) {
274
+ var wrapElem = elem.querySelector('.e-anchor-wrap');
275
+ if (currItem.text !== prevItem.text) {
276
+ wrapElem.childNodes.forEach(function (child) {
277
+ if (child.nodeType === Node.TEXT_NODE) {
278
+ child.textContent = currItem.text;
279
+ }
280
+ });
281
+ }
282
+ if (currItem.iconCss !== prevItem.iconCss) {
283
+ var iconElem = elem.querySelector('.' + ICONCLASS);
284
+ if (iconElem) {
285
+ if (currItem.iconCss) {
286
+ removeClass([iconElem], prevItem.iconCss.split(' '));
287
+ addClass([iconElem], currItem.iconCss.split(' '));
288
+ }
289
+ else {
290
+ iconElem.remove();
291
+ }
292
+ }
293
+ else if (currItem.iconCss) {
294
+ var iconElem_1 = this.createElement('span', { className: ICONCLASS + ' ' + currItem.iconCss });
295
+ if (isRightIcon) {
296
+ append([iconElem_1], wrapElem);
297
+ }
298
+ else {
299
+ wrapElem.insertBefore(iconElem_1, wrapElem.childNodes[0]);
300
+ }
301
+ }
302
+ }
303
+ if (currItem.url !== prevItem.url && this.enableNavigation) {
304
+ var anchor = elem.querySelector('a.' + ITEMTEXTCLASS);
305
+ if (anchor) {
306
+ if (currItem.url) {
307
+ anchor.setAttribute('href', currItem.url);
308
+ }
309
+ else {
310
+ anchor.removeAttribute('href');
311
+ }
312
+ }
313
+ }
314
+ };
315
+ Breadcrumb.prototype.reRenderItems = function () {
316
+ this.element.innerHTML = '';
317
+ this.renderItems(this.items);
318
+ };
319
+ Breadcrumb.prototype.clickHandler = function (e) {
320
+ var li = closest(e.target, '.e-breadcrumb-item');
321
+ if (li && (closest(e.target, '.' + ITEMTEXTCLASS) || this.itemTemplate)) {
322
+ var idx = [].slice.call(li.parentElement.children).indexOf(li);
323
+ idx = Math.floor(idx / 2);
324
+ if (this.overflowMode === 'Default' && this._maxItems > 0 && this.endIndex !== 0) {
325
+ idx = parseInt(li.getAttribute('item-index'), 10);
326
+ if (this.startIndex > 1) {
327
+ this.startIndex -= (this.endIndex - idx);
328
+ }
329
+ this.endIndex = idx;
330
+ this.reRenderItems();
331
+ }
332
+ this.trigger('itemClick', { element: li, item: this.items[idx], event: e });
333
+ if (this.items[idx].url) {
334
+ this.activeItem = this.items[idx].url;
335
+ this.dataBind();
336
+ }
337
+ }
338
+ if (!this.enableNavigation) {
339
+ e.preventDefault();
340
+ }
341
+ if (e.target.classList.contains('e-breadcrumb-collapsed')) {
342
+ this.isExpanded = true;
343
+ this.reRenderItems();
344
+ }
345
+ };
346
+ Breadcrumb.prototype.resize = function () {
347
+ this._maxItems = this.maxItems;
348
+ this.initPvtProps();
349
+ this.reRenderItems();
350
+ };
351
+ Breadcrumb.prototype.expandHandler = function (e) {
352
+ if (e.key === 'Enter') {
353
+ this.isExpanded = true;
354
+ this.reRenderItems();
355
+ }
356
+ };
357
+ Breadcrumb.prototype.keyDownHandler = function (e) {
358
+ if (e.key === 'Enter') {
359
+ this.clickHandler(e);
360
+ }
361
+ };
362
+ /**
363
+ * Called internally if any of the property value changed.
364
+ *
365
+ * @private
366
+ * @param {BreadcrumbModel} newProp - Specifies the new properties.
367
+ * @param {BreadcrumbModel} oldProp - Specifies the old properties.
368
+ * @returns {void}
369
+ */
370
+ Breadcrumb.prototype.onPropertyChanged = function (newProp, oldProp) {
371
+ for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
372
+ var prop = _a[_i];
373
+ switch (prop) {
374
+ case 'activeItem':
375
+ case 'items':
376
+ case 'enableActiveItemNavigation':
377
+ this.reRenderItems();
378
+ break;
379
+ case 'overflowMode':
380
+ case 'maxItems':
381
+ this.initPvtProps();
382
+ this.reRenderItems();
383
+ break;
384
+ case 'url':
385
+ this.initItems();
386
+ this.reRenderItems();
387
+ break;
388
+ case 'width':
389
+ this.setWidth();
390
+ this._maxItems = this.maxItems;
391
+ this.initPvtProps();
392
+ this.reRenderItems();
393
+ break;
394
+ case 'cssClass':
395
+ if (oldProp.cssClass) {
396
+ removeClass([this.element], oldProp.cssClass.split(' '));
397
+ }
398
+ if (newProp.cssClass) {
399
+ addClass([this.element], newProp.cssClass.split(' '));
400
+ }
401
+ if ((oldProp.cssClass && oldProp.cssClass.indexOf(ICONRIGHT) > -1) && !(newProp.cssClass &&
402
+ newProp.cssClass.indexOf(ICONRIGHT) > -1) || !(oldProp.cssClass && oldProp.cssClass.indexOf(ICONRIGHT) > -1) &&
403
+ (newProp.cssClass && newProp.cssClass.indexOf(ICONRIGHT) > -1)) {
404
+ this.reRenderItems();
405
+ }
406
+ break;
407
+ }
408
+ }
409
+ };
410
+ Breadcrumb.prototype.wireEvents = function () {
411
+ EventHandler.add(this.element, 'click', this.clickHandler, this);
412
+ window.addEventListener('resize', this.resize.bind(this));
413
+ };
414
+ Breadcrumb.prototype.unWireEvents = function () {
415
+ EventHandler.remove(this.element, 'click', this.clickHandler);
416
+ window.removeEventListener('resize', this.resize.bind(this));
417
+ };
418
+ /**
419
+ * Get the properties to be maintained in the persisted state.
420
+ *
421
+ * @returns {string} - Persist data
422
+ */
423
+ Breadcrumb.prototype.getPersistData = function () {
424
+ return this.addOnPersist(['activeItem']);
425
+ };
426
+ /**
427
+ * Get module name.
428
+ *
429
+ * @private
430
+ * @returns {string} - Module Name
431
+ */
432
+ Breadcrumb.prototype.getModuleName = function () {
433
+ return 'breadcrumb';
434
+ };
435
+ /**
436
+ * Destroys the widget.
437
+ *
438
+ * @returns {void}
439
+ */
440
+ Breadcrumb.prototype.destroy = function () {
441
+ this.unWireEvents();
442
+ this.element.innerHTML = '';
443
+ if (this.cssClass) {
444
+ removeClass([this.element], this.cssClass.split(' '));
445
+ }
446
+ };
447
+ __decorate([
448
+ Property('')
449
+ ], Breadcrumb.prototype, "url", void 0);
450
+ __decorate([
451
+ Collection([], BreadcrumbItem)
452
+ ], Breadcrumb.prototype, "items", void 0);
453
+ __decorate([
454
+ Property('')
455
+ ], Breadcrumb.prototype, "activeItem", void 0);
456
+ __decorate([
457
+ Property(0)
458
+ ], Breadcrumb.prototype, "maxItems", void 0);
459
+ __decorate([
460
+ Property('Default')
461
+ ], Breadcrumb.prototype, "overflowMode", void 0);
462
+ __decorate([
463
+ Property('')
464
+ ], Breadcrumb.prototype, "cssClass", void 0);
465
+ __decorate([
466
+ Property('')
467
+ ], Breadcrumb.prototype, "width", void 0);
468
+ __decorate([
469
+ Property(null)
470
+ ], Breadcrumb.prototype, "itemTemplate", void 0);
471
+ __decorate([
472
+ Property('/')
473
+ ], Breadcrumb.prototype, "separatorTemplate", void 0);
474
+ __decorate([
475
+ Property(true)
476
+ ], Breadcrumb.prototype, "enableNavigation", void 0);
477
+ __decorate([
478
+ Property(false)
479
+ ], Breadcrumb.prototype, "enableActiveItemNavigation", void 0);
480
+ __decorate([
481
+ Property('')
482
+ ], Breadcrumb.prototype, "locale", void 0);
483
+ __decorate([
484
+ Event()
485
+ ], Breadcrumb.prototype, "beforeItemRender", void 0);
486
+ __decorate([
487
+ Event()
488
+ ], Breadcrumb.prototype, "itemClick", void 0);
489
+ __decorate([
490
+ Event()
491
+ ], Breadcrumb.prototype, "created", void 0);
492
+ Breadcrumb = __decorate([
493
+ NotifyPropertyChanges
494
+ ], Breadcrumb);
495
+ return Breadcrumb;
496
+ }(Component));
497
+ export { Breadcrumb };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Breadcrumb modules
3
+ */
4
+ export * from './breadcrumb';
5
+ export * from './breadcrumb-model';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Breadcrumb modules
3
+ */
4
+ export * from './breadcrumb';
package/src/index.d.ts CHANGED
@@ -9,3 +9,4 @@ export * from './menu/index';
9
9
  export * from './tab/index';
10
10
  export * from './treeview/index';
11
11
  export * from './sidebar/index';
12
+ export * from './breadcrumb/index';
package/src/index.js CHANGED
@@ -9,3 +9,4 @@ export * from './menu/index';
9
9
  export * from './tab/index';
10
10
  export * from './treeview/index';
11
11
  export * from './sidebar/index';
12
+ export * from './breadcrumb/index';
@@ -439,10 +439,10 @@ var Sidebar = /** @class */ (function (_super) {
439
439
  };
440
440
  Sidebar.prototype.wireEvents = function () {
441
441
  this.setEnableGestures();
442
- window.addEventListener('resize', this.resize.bind(this));
442
+ EventHandler.add(window, 'resize', this.resize, this);
443
443
  };
444
444
  Sidebar.prototype.unWireEvents = function () {
445
- window.removeEventListener('resize', this.resize.bind(this));
445
+ EventHandler.remove(window, 'resize', this.resize);
446
446
  EventHandler.remove(document, 'mousedown touchstart', this.documentclickHandler);
447
447
  if (this.mainContentEle) {
448
448
  this.mainContentEle.destroy();
@@ -1,4 +1,4 @@
1
- import { Component, Property, Event, EmitType, closest, Collection, Complex, attributes, detach, Instance } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, select, isVisible } from '@syncfusion/ej2-base';import { KeyboardEvents, KeyboardEventArgs, MouseEventArgs, Effect, Browser, formatUnit, DomElements, L10n } from '@syncfusion/ej2-base';import { setStyleAttribute as setStyle, isNullOrUndefined as isNOU, selectAll, addClass, removeClass, remove } from '@syncfusion/ej2-base';import { EventHandler, rippleEffect, Touch, SwipeEventArgs, compile, Animation, AnimationModel, BaseEventArgs } from '@syncfusion/ej2-base';import { getRandomId, SanitizeHtmlHelper, Draggable, DragEventArgs as DragArgs, DropEventArgs } from '@syncfusion/ej2-base';import { Base } from '@syncfusion/ej2-base';import { Popup, PopupModel } from '@syncfusion/ej2-popups';import { Toolbar, OverflowMode, ClickEventArgs } from '../toolbar/toolbar';import { ToolbarModel } from '../toolbar';
1
+ import { Component, Property, Event, EmitType, closest, Collection, Complex, attributes, detach, Instance, isNullOrUndefined } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, select, isVisible } from '@syncfusion/ej2-base';import { KeyboardEvents, KeyboardEventArgs, MouseEventArgs, Effect, Browser, formatUnit, DomElements, L10n } from '@syncfusion/ej2-base';import { setStyleAttribute as setStyle, isNullOrUndefined as isNOU, selectAll, addClass, removeClass, remove } from '@syncfusion/ej2-base';import { EventHandler, rippleEffect, Touch, SwipeEventArgs, compile, Animation, AnimationModel, BaseEventArgs } from '@syncfusion/ej2-base';import { getRandomId, SanitizeHtmlHelper, Draggable, DragEventArgs as DragArgs, DropEventArgs } from '@syncfusion/ej2-base';import { Base } from '@syncfusion/ej2-base';import { Popup, PopupModel } from '@syncfusion/ej2-popups';import { Toolbar, OverflowMode, ClickEventArgs } from '../toolbar/toolbar';import { ToolbarModel } from '../toolbar';
2
2
  import {HeaderPosition,HeightStyles,ContentLoad,AddEventArgs,SelectingEventArgs,SelectEventArgs,RemoveEventArgs,DragEventArgs} from "./tab";
3
3
  import {ComponentModel} from '@syncfusion/ej2-base';
4
4
 
package/src/tab/tab.d.ts CHANGED
@@ -250,6 +250,7 @@ export declare class Tab extends Component<HTMLElement> implements INotifyProper
250
250
  private droppedIndex;
251
251
  private draggingItems;
252
252
  private draggableItems;
253
+ private tbId;
253
254
  private resizeContext;
254
255
  /**
255
256
  * Contains the keyboard configuration of the Tab.
@@ -520,7 +521,6 @@ export declare class Tab extends Component<HTMLElement> implements INotifyProper
520
521
  private updatePopAnimationConfig;
521
522
  private changeOrientation;
522
523
  private focusItem;
523
- private serverChangeOrientation;
524
524
  private changeToolbarOrientation;
525
525
  private setOrientation;
526
526
  private setCssClass;