@syncfusion/ej2-vue-navigations 20.4.53 → 21.1.35

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 (162) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +211 -142
  3. package/dist/ej2-vue-navigations.umd.min.js +2 -2
  4. package/dist/ej2-vue-navigations.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-vue-navigations.es2015.js +1195 -1613
  6. package/dist/es6/ej2-vue-navigations.es2015.js.map +1 -1
  7. package/dist/es6/ej2-vue-navigations.es5.js +1337 -1877
  8. package/dist/es6/ej2-vue-navigations.es5.js.map +1 -1
  9. package/dist/global/ej2-vue-navigations.min.js +2 -2
  10. package/package.json +9 -9
  11. package/src/accordion/accordion.component.d.ts +3 -31
  12. package/src/accordion/accordion.component.js +137 -168
  13. package/src/accordion/items.directive.d.ts +2 -12
  14. package/src/accordion/items.directive.js +22 -71
  15. package/src/appbar/appbar.component.d.ts +3 -22
  16. package/src/appbar/appbar.component.js +83 -112
  17. package/src/breadcrumb/breadcrumb.component.d.ts +3 -25
  18. package/src/breadcrumb/breadcrumb.component.js +119 -150
  19. package/src/breadcrumb/items.directive.d.ts +2 -12
  20. package/src/breadcrumb/items.directive.js +22 -71
  21. package/src/carousel/carousel.component.d.ts +3 -29
  22. package/src/carousel/carousel.component.js +131 -162
  23. package/src/carousel/items.directive.d.ts +2 -12
  24. package/src/carousel/items.directive.js +22 -71
  25. package/src/context-menu/contextmenu.component.d.ts +3 -32
  26. package/src/context-menu/contextmenu.component.js +113 -142
  27. package/src/menu/items.directive.d.ts +2 -12
  28. package/src/menu/items.directive.js +22 -71
  29. package/src/menu/menu.component.d.ts +3 -32
  30. package/src/menu/menu.component.js +113 -142
  31. package/src/sidebar/sidebar.component.d.ts +3 -28
  32. package/src/sidebar/sidebar.component.js +128 -159
  33. package/src/tab/items.directive.d.ts +2 -12
  34. package/src/tab/items.directive.js +22 -71
  35. package/src/tab/tab.component.d.ts +3 -32
  36. package/src/tab/tab.component.js +113 -142
  37. package/src/toolbar/items.directive.d.ts +2 -12
  38. package/src/toolbar/items.directive.js +22 -71
  39. package/src/toolbar/toolbar.component.d.ts +3 -28
  40. package/src/toolbar/toolbar.component.js +101 -130
  41. package/src/treeview/treeview.component.d.ts +3 -39
  42. package/src/treeview/treeview.component.js +134 -163
  43. package/styles/accordion/bootstrap-dark.css +0 -1
  44. package/styles/accordion/bootstrap.css +0 -1
  45. package/styles/accordion/bootstrap4.css +0 -1
  46. package/styles/accordion/bootstrap5-dark.css +3 -4
  47. package/styles/accordion/bootstrap5.css +3 -4
  48. package/styles/accordion/fabric-dark.css +0 -1
  49. package/styles/accordion/fabric.css +0 -1
  50. package/styles/accordion/fluent-dark.css +3 -4
  51. package/styles/accordion/fluent.css +3 -4
  52. package/styles/accordion/highcontrast-light.css +0 -1
  53. package/styles/accordion/highcontrast.css +0 -1
  54. package/styles/accordion/material-dark.css +0 -1
  55. package/styles/accordion/material.css +0 -1
  56. package/styles/accordion/tailwind-dark.css +3 -4
  57. package/styles/accordion/tailwind.css +3 -4
  58. package/styles/appbar/bootstrap-dark.css +3 -0
  59. package/styles/appbar/bootstrap.css +3 -0
  60. package/styles/appbar/bootstrap4.css +3 -0
  61. package/styles/appbar/bootstrap5-dark.css +3 -0
  62. package/styles/appbar/bootstrap5.css +3 -0
  63. package/styles/appbar/fabric-dark.css +3 -0
  64. package/styles/appbar/fabric.css +3 -0
  65. package/styles/appbar/fluent-dark.css +3 -0
  66. package/styles/appbar/fluent.css +3 -0
  67. package/styles/appbar/highcontrast-light.css +3 -0
  68. package/styles/appbar/highcontrast.css +3 -0
  69. package/styles/appbar/material-dark.css +3 -0
  70. package/styles/appbar/material.css +3 -0
  71. package/styles/appbar/tailwind-dark.css +3 -0
  72. package/styles/appbar/tailwind.css +3 -0
  73. package/styles/bootstrap-dark.css +669 -938
  74. package/styles/bootstrap.css +658 -927
  75. package/styles/bootstrap4.css +724 -993
  76. package/styles/bootstrap5-dark.css +685 -954
  77. package/styles/bootstrap5.css +686 -955
  78. package/styles/carousel/bootstrap-dark.css +4 -0
  79. package/styles/carousel/bootstrap.css +4 -0
  80. package/styles/carousel/bootstrap4.css +4 -0
  81. package/styles/carousel/bootstrap5-dark.css +4 -0
  82. package/styles/carousel/bootstrap5.css +4 -0
  83. package/styles/carousel/fabric-dark.css +4 -0
  84. package/styles/carousel/fabric.css +4 -0
  85. package/styles/carousel/fluent-dark.css +4 -0
  86. package/styles/carousel/fluent.css +4 -0
  87. package/styles/carousel/highcontrast-light.css +4 -0
  88. package/styles/carousel/highcontrast.css +4 -0
  89. package/styles/carousel/material-dark.css +4 -0
  90. package/styles/carousel/material.css +4 -0
  91. package/styles/carousel/tailwind-dark.css +4 -0
  92. package/styles/carousel/tailwind.css +4 -0
  93. package/styles/fabric-dark.css +669 -938
  94. package/styles/fabric.css +669 -938
  95. package/styles/fluent-dark.css +677 -946
  96. package/styles/fluent.css +677 -946
  97. package/styles/h-scroll/bootstrap-dark.css +1 -1
  98. package/styles/h-scroll/bootstrap.css +1 -1
  99. package/styles/h-scroll/bootstrap4.css +1 -1
  100. package/styles/h-scroll/bootstrap5-dark.css +1 -1
  101. package/styles/h-scroll/bootstrap5.css +1 -1
  102. package/styles/h-scroll/fabric-dark.css +1 -1
  103. package/styles/h-scroll/fabric.css +1 -1
  104. package/styles/h-scroll/fluent-dark.css +1 -1
  105. package/styles/h-scroll/fluent.css +1 -1
  106. package/styles/h-scroll/highcontrast-light.css +1 -1
  107. package/styles/h-scroll/highcontrast.css +1 -1
  108. package/styles/h-scroll/material-dark.css +1 -1
  109. package/styles/h-scroll/material.css +1 -1
  110. package/styles/h-scroll/tailwind-dark.css +1 -1
  111. package/styles/h-scroll/tailwind.css +1 -1
  112. package/styles/highcontrast-light.css +668 -937
  113. package/styles/highcontrast.css +675 -944
  114. package/styles/material-dark.css +669 -938
  115. package/styles/material.css +661 -930
  116. package/styles/menu/bootstrap-dark.css +7 -7
  117. package/styles/menu/bootstrap.css +7 -7
  118. package/styles/menu/bootstrap4.css +10 -10
  119. package/styles/menu/bootstrap5-dark.css +7 -7
  120. package/styles/menu/bootstrap5.css +7 -7
  121. package/styles/menu/fabric-dark.css +7 -7
  122. package/styles/menu/fabric.css +7 -7
  123. package/styles/menu/fluent-dark.css +7 -7
  124. package/styles/menu/fluent.css +7 -7
  125. package/styles/menu/highcontrast-light.css +7 -7
  126. package/styles/menu/highcontrast.css +7 -7
  127. package/styles/menu/material-dark.css +7 -7
  128. package/styles/menu/material.css +7 -7
  129. package/styles/menu/tailwind-dark.css +7 -7
  130. package/styles/menu/tailwind.css +7 -7
  131. package/styles/tab/bootstrap-dark.css +5 -2
  132. package/styles/tab/bootstrap.css +5 -2
  133. package/styles/tab/bootstrap4.css +12 -9
  134. package/styles/tab/bootstrap5-dark.css +11 -8
  135. package/styles/tab/bootstrap5.css +11 -8
  136. package/styles/tab/fabric-dark.css +7 -4
  137. package/styles/tab/fabric.css +7 -4
  138. package/styles/tab/fluent-dark.css +8 -5
  139. package/styles/tab/fluent.css +8 -5
  140. package/styles/tab/highcontrast-light.css +10 -7
  141. package/styles/tab/highcontrast.css +10 -7
  142. package/styles/tab/material-dark.css +4 -1
  143. package/styles/tab/material.css +4 -1
  144. package/styles/tab/tailwind-dark.css +8 -5
  145. package/styles/tab/tailwind.css +8 -5
  146. package/styles/tailwind-dark.css +668 -937
  147. package/styles/tailwind.css +668 -937
  148. package/styles/toolbar/bootstrap-dark.css +647 -925
  149. package/styles/toolbar/bootstrap.css +638 -916
  150. package/styles/toolbar/bootstrap4.css +657 -935
  151. package/styles/toolbar/bootstrap5-dark.css +658 -936
  152. package/styles/toolbar/bootstrap5.css +658 -936
  153. package/styles/toolbar/fabric-dark.css +645 -923
  154. package/styles/toolbar/fabric.css +651 -929
  155. package/styles/toolbar/fluent-dark.css +650 -928
  156. package/styles/toolbar/fluent.css +650 -928
  157. package/styles/toolbar/highcontrast-light.css +642 -920
  158. package/styles/toolbar/highcontrast.css +647 -925
  159. package/styles/toolbar/material-dark.css +649 -927
  160. package/styles/toolbar/material.css +646 -924
  161. package/styles/toolbar/tailwind-dark.css +647 -925
  162. package/styles/toolbar/tailwind.css +645 -923
@@ -1,33 +1,11 @@
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 { ComponentBase, EJComponentDecorator, getProps, gh, isExecute } from '@syncfusion/ej2-vue-base';
1
+ import { ComponentBase, gh, getProps, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
21
2
  import { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';
22
3
  import { Menu } from '@syncfusion/ej2-navigations';
23
4
  import { MenuItemsDirective, MenuItemDirective, MenuItemsPlugin, MenuItemPlugin } from './items.directive';
24
- import { Options } from 'vue-class-component';
25
5
  export var properties = ['isLazyUpdate', 'plugins', 'animationSettings', 'cssClass', 'enableHtmlSanitizer', 'enablePersistence', 'enableRtl', 'enableScrolling', 'fields', 'filter', 'hamburgerMode', 'hoverDelay', 'items', 'locale', 'orientation', 'showItemOnClick', 'target', 'template', 'title', 'beforeClose', 'beforeItemRender', 'beforeOpen', 'created', 'onClose', 'onOpen', 'select'];
26
6
  export var modelProps = [];
27
7
  export var testProp = getProps({ props: properties });
28
- export var props = testProp[0];
29
- export var watch = testProp[1];
30
- export var emitProbs = Object.keys(watch);
8
+ export var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch);
31
9
  emitProbs.push('modelchanged', 'update:modelValue');
32
10
  for (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {
33
11
  var props_1 = modelProps_1[_i];
@@ -39,132 +17,125 @@ for (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {
39
17
  * <ejs-menu :items='menuItems'></ejs-menu>
40
18
  * ```
41
19
  */
42
- var MenuComponent = /** @class */ (function (_super) {
43
- __extends(MenuComponent, _super);
44
- function MenuComponent() {
45
- var _this = _super.call(this, arguments) || this;
46
- _this.propKeys = properties;
47
- _this.models = modelProps;
48
- _this.hasChildDirective = true;
49
- _this.hasInjectedModules = false;
50
- _this.tagMapper = { "e-menu-items": "e-" };
51
- _this.tagNameMapper = { "e-menu-items": "e-items" };
52
- _this.isVue3 = !isExecute;
53
- _this.ej2Instances = new Menu({});
54
- _this.bindProperties();
55
- _this.ej2Instances._setProperties = _this.ej2Instances.setProperties;
56
- _this.ej2Instances.setProperties = _this.setProperties;
57
- _this.ej2Instances.clearTemplate = _this.clearTemplate;
58
- _this.updated = _this.updated;
59
- return _this;
60
- }
61
- MenuComponent.prototype.clearTemplate = function (templateNames) {
62
- if (!templateNames) {
63
- templateNames = Object.keys(this.templateCollection || {});
20
+ export var MenuComponent = vueDefineComponent({
21
+ name: 'MenuComponent',
22
+ mixins: [ComponentBase],
23
+ props: props,
24
+ watch: watch,
25
+ emits: emitProbs,
26
+ provide: function () { return { custom: this.custom }; },
27
+ data: function () {
28
+ return {
29
+ ej2Instances: new Menu({}),
30
+ propKeys: properties,
31
+ models: modelProps,
32
+ hasChildDirective: true,
33
+ hasInjectedModules: false,
34
+ tagMapper: { "e-menu-items": "e-" },
35
+ tagNameMapper: { "e-menu-items": "e-items" },
36
+ isVue3: !isExecute,
37
+ templateCollection: {},
38
+ };
39
+ },
40
+ created: function () {
41
+ this.bindProperties();
42
+ this.ej2Instances._setProperties = this.ej2Instances.setProperties;
43
+ this.ej2Instances.setProperties = this.setProperties;
44
+ this.ej2Instances.clearTemplate = this.clearTemplate;
45
+ this.updated = this.updated;
46
+ },
47
+ render: function (createElement) {
48
+ var h = !isExecute ? gh : createElement;
49
+ var slots = null;
50
+ if (!isNullOrUndefined(this.$slots.default)) {
51
+ slots = !isExecute ? this.$slots.default() : this.$slots.default;
64
52
  }
65
- if (templateNames.length && this.templateCollection) {
66
- for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
67
- var tempName = templateNames_1[_i];
68
- var elementCollection = this.templateCollection[tempName];
69
- if (elementCollection && elementCollection.length) {
70
- for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
71
- var ele = elementCollection_1[_a];
72
- var destroy = getValue('__vue__.$destroy', ele);
73
- if (destroy) {
74
- ele.__vue__.$destroy();
75
- }
76
- if (ele.innerHTML) {
77
- ele.innerHTML = '';
53
+ return h('ul', slots);
54
+ },
55
+ methods: {
56
+ clearTemplate: function (templateNames) {
57
+ if (!templateNames) {
58
+ templateNames = Object.keys(this.templateCollection || {});
59
+ }
60
+ if (templateNames.length && this.templateCollection) {
61
+ for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
62
+ var tempName = templateNames_1[_i];
63
+ var elementCollection = this.templateCollection[tempName];
64
+ if (elementCollection && elementCollection.length) {
65
+ for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
66
+ var ele = elementCollection_1[_a];
67
+ var destroy = getValue('__vue__.$destroy', ele);
68
+ if (destroy) {
69
+ ele.__vue__.$destroy();
70
+ }
71
+ if (ele.innerHTML) {
72
+ ele.innerHTML = '';
73
+ }
78
74
  }
75
+ delete this.templateCollection[tempName];
79
76
  }
80
- delete this.templateCollection[tempName];
81
77
  }
82
78
  }
83
- }
84
- };
85
- MenuComponent.prototype.setProperties = function (prop, muteOnChange) {
86
- var _this = this;
87
- if (this.isVue3) {
88
- this.models = !this.models ? this.ej2Instances.referModels : this.models;
89
- }
90
- if (this.ej2Instances && this.ej2Instances._setProperties) {
91
- this.ej2Instances._setProperties(prop, muteOnChange);
92
- }
93
- if (prop && this.models && this.models.length) {
94
- Object.keys(prop).map(function (key) {
95
- _this.models.map(function (model) {
96
- if ((key === model) && !(/datasource/i.test(key))) {
97
- if (_this.isVue3) {
98
- _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
99
- }
100
- else {
101
- _this.$emit('update:' + key, prop[key]);
102
- _this.$emit('modelchanged', prop[key]);
79
+ },
80
+ setProperties: function (prop, muteOnChange) {
81
+ var _this = this;
82
+ if (this.isVue3) {
83
+ this.models = !this.models ? this.ej2Instances.referModels : this.models;
84
+ }
85
+ if (this.ej2Instances && this.ej2Instances._setProperties) {
86
+ this.ej2Instances._setProperties(prop, muteOnChange);
87
+ }
88
+ if (prop && this.models && this.models.length) {
89
+ Object.keys(prop).map(function (key) {
90
+ _this.models.map(function (model) {
91
+ if ((key === model) && !(/datasource/i.test(key))) {
92
+ if (_this.isVue3) {
93
+ _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
94
+ }
95
+ else {
96
+ _this.$emit('update:' + key, prop[key]);
97
+ _this.$emit('modelchanged', prop[key]);
98
+ }
103
99
  }
104
- }
100
+ });
105
101
  });
106
- });
107
- }
108
- };
109
- MenuComponent.prototype.render = function (createElement) {
110
- var h = !isExecute ? gh : createElement;
111
- var slots = null;
112
- if (!isNullOrUndefined(this.$slots.default)) {
113
- slots = !isExecute ? this.$slots.default() : this.$slots.default;
114
- }
115
- return h('ul', slots);
116
- };
117
- MenuComponent.prototype.custom = function () {
118
- this.updated();
119
- };
120
- MenuComponent.prototype.close = function () {
121
- return this.ej2Instances.close();
122
- };
123
- MenuComponent.prototype.enableItems = function (items, enable, isUniqueId) {
124
- return this.ej2Instances.enableItems(items, enable, isUniqueId);
125
- };
126
- MenuComponent.prototype.getItemIndex = function (item, isUniqueId) {
127
- return this.ej2Instances.getItemIndex(item, isUniqueId);
128
- };
129
- MenuComponent.prototype.hideItems = function (items, isUniqueId) {
130
- return this.ej2Instances.hideItems(items, isUniqueId);
131
- };
132
- MenuComponent.prototype.insertAfter = function (items, text, isUniqueId) {
133
- return this.ej2Instances.insertAfter(items, text, isUniqueId);
134
- };
135
- MenuComponent.prototype.insertBefore = function (items, text, isUniqueId) {
136
- return this.ej2Instances.insertBefore(items, text, isUniqueId);
137
- };
138
- MenuComponent.prototype.open = function () {
139
- return this.ej2Instances.open();
140
- };
141
- MenuComponent.prototype.removeItems = function (items, isUniqueId) {
142
- return this.ej2Instances.removeItems(items, isUniqueId);
143
- };
144
- MenuComponent.prototype.setItem = function (item, id, isUniqueId) {
145
- return this.ej2Instances.setItem(item, id, isUniqueId);
146
- };
147
- MenuComponent.prototype.showItems = function (items, isUniqueId) {
148
- return this.ej2Instances.showItems(items, isUniqueId);
149
- };
150
- MenuComponent = __decorate([
151
- EJComponentDecorator({
152
- props: properties
153
- }, isExecute)
154
- ,Options({
155
- props: props,
156
- watch: watch,
157
- emits: emitProbs,
158
- provide: function provide() {
159
- return {
160
- custom: this.custom
161
- };
162
102
  }
163
- })
164
- ], MenuComponent);
165
- return MenuComponent;
166
- }(ComponentBase));
167
- export { MenuComponent };
103
+ },
104
+ custom: function () {
105
+ this.updated();
106
+ },
107
+ close: function () {
108
+ return this.ej2Instances.close();
109
+ },
110
+ enableItems: function (items, enable, isUniqueId) {
111
+ return this.ej2Instances.enableItems(items, enable, isUniqueId);
112
+ },
113
+ getItemIndex: function (item, isUniqueId) {
114
+ return this.ej2Instances.getItemIndex(item, isUniqueId);
115
+ },
116
+ hideItems: function (items, isUniqueId) {
117
+ return this.ej2Instances.hideItems(items, isUniqueId);
118
+ },
119
+ insertAfter: function (items, text, isUniqueId) {
120
+ return this.ej2Instances.insertAfter(items, text, isUniqueId);
121
+ },
122
+ insertBefore: function (items, text, isUniqueId) {
123
+ return this.ej2Instances.insertBefore(items, text, isUniqueId);
124
+ },
125
+ open: function () {
126
+ return this.ej2Instances.open();
127
+ },
128
+ removeItems: function (items, isUniqueId) {
129
+ return this.ej2Instances.removeItems(items, isUniqueId);
130
+ },
131
+ setItem: function (item, id, isUniqueId) {
132
+ return this.ej2Instances.setItem(item, id, isUniqueId);
133
+ },
134
+ showItems: function (items, isUniqueId) {
135
+ return this.ej2Instances.showItems(items, isUniqueId);
136
+ },
137
+ }
138
+ });
168
139
  export var MenuPlugin = {
169
140
  name: 'ejs-menu',
170
141
  install: function (Vue) {
@@ -1,40 +1,15 @@
1
- import { ComponentBase } from '@syncfusion/ej2-vue-base';
2
1
  export declare const properties: string[];
3
2
  export declare const modelProps: string[];
4
3
  export declare const testProp: any;
5
- export declare const props: any;
6
- export declare const watch: any;
7
- export declare const emitProbs: any;
4
+ export declare const props: any, watch: any, emitProbs: any;
8
5
  /**
9
6
  * Represents the Essential JS 2 VueJS Sidebar Component.
10
7
  * ```html
11
8
  * <ejs-sidebar></ejs-sidebar>
12
9
  * ```
13
10
  */
14
- export declare class SidebarComponent extends ComponentBase {
15
- ej2Instances: any;
16
- propKeys: string[];
17
- models: string[];
18
- hasChildDirective: boolean;
19
- protected hasInjectedModules: boolean;
20
- tagMapper: {
21
- [key: string]: Object;
22
- };
23
- tagNameMapper: Object;
24
- isVue3: boolean;
25
- templateCollection: any;
26
- constructor();
27
- clearTemplate(templateNames?: string[]): any;
28
- setProperties(prop: any, muteOnChange: boolean): void;
29
- trigger(eventName: string, eventProp: {
30
- [key: string]: Object;
31
- }, successHandler?: Function): void;
32
- render(createElement: any): any;
33
- custom(): void;
34
- hide(e?: Object): void;
35
- show(e?: Object): void;
36
- toggle(): void;
37
- }
11
+ export declare let SidebarComponent: any;
12
+ export declare type SidebarComponent = InstanceType<typeof SidebarComponent>;
38
13
  export declare const SidebarPlugin: {
39
14
  name: string;
40
15
  install(Vue: any): void;
@@ -1,33 +1,11 @@
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 { isUndefined } from '@syncfusion/ej2-base';
21
- import { ComponentBase, EJComponentDecorator, getProps, gh, isExecute } from '@syncfusion/ej2-vue-base';
1
+ import { ComponentBase, gh, getProps, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
22
2
  import { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';
3
+ import { isUndefined } from '@syncfusion/ej2-base';
23
4
  import { Sidebar } from '@syncfusion/ej2-navigations';
24
- import { Options } from 'vue-class-component';
25
5
  export var properties = ['isLazyUpdate', 'plugins', 'animate', 'closeOnDocumentClick', 'dockSize', 'enableDock', 'enableGestures', 'enablePersistence', 'enableRtl', 'height', 'isOpen', 'locale', 'mediaQuery', 'position', 'showBackdrop', 'target', 'type', 'width', 'zIndex', 'change', 'close', 'created', 'destroyed', 'open'];
26
6
  export var modelProps = ['isOpen'];
27
7
  export var testProp = getProps({ props: properties });
28
- export var props = testProp[0];
29
- export var watch = testProp[1];
30
- export var emitProbs = Object.keys(watch);
8
+ export var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch);
31
9
  emitProbs.push('modelchanged', 'update:modelValue');
32
10
  for (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {
33
11
  var props_1 = modelProps_1[_i];
@@ -39,155 +17,146 @@ for (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {
39
17
  * <ejs-sidebar></ejs-sidebar>
40
18
  * ```
41
19
  */
42
- var SidebarComponent = /** @class */ (function (_super) {
43
- __extends(SidebarComponent, _super);
44
- function SidebarComponent() {
45
- var _this = _super.call(this, arguments) || this;
46
- _this.propKeys = properties;
47
- _this.models = modelProps;
48
- _this.hasChildDirective = false;
49
- _this.hasInjectedModules = false;
50
- _this.tagMapper = {};
51
- _this.tagNameMapper = {};
52
- _this.isVue3 = !isExecute;
53
- _this.ej2Instances = new Sidebar({});
54
- _this.ej2Instances._trigger = _this.ej2Instances.trigger;
55
- _this.ej2Instances.trigger = _this.trigger;
56
- _this.bindProperties();
57
- _this.ej2Instances._setProperties = _this.ej2Instances.setProperties;
58
- _this.ej2Instances.setProperties = _this.setProperties;
59
- _this.ej2Instances.clearTemplate = _this.clearTemplate;
60
- _this.updated = _this.updated;
61
- return _this;
62
- }
63
- SidebarComponent.prototype.clearTemplate = function (templateNames) {
64
- if (!templateNames) {
65
- templateNames = Object.keys(this.templateCollection || {});
20
+ export var SidebarComponent = vueDefineComponent({
21
+ name: 'SidebarComponent',
22
+ mixins: [ComponentBase],
23
+ props: props,
24
+ watch: watch,
25
+ emits: emitProbs,
26
+ model: { event: 'modelchanged' },
27
+ provide: function () { return { custom: this.custom }; },
28
+ data: function () {
29
+ return {
30
+ ej2Instances: new Sidebar({}),
31
+ propKeys: properties,
32
+ models: modelProps,
33
+ hasChildDirective: false,
34
+ hasInjectedModules: false,
35
+ tagMapper: {},
36
+ tagNameMapper: {},
37
+ isVue3: !isExecute,
38
+ templateCollection: {},
39
+ };
40
+ },
41
+ created: function () {
42
+ this.ej2Instances._trigger = this.ej2Instances.trigger;
43
+ this.ej2Instances.trigger = this.trigger;
44
+ this.bindProperties();
45
+ this.ej2Instances._setProperties = this.ej2Instances.setProperties;
46
+ this.ej2Instances.setProperties = this.setProperties;
47
+ this.ej2Instances.clearTemplate = this.clearTemplate;
48
+ this.updated = this.updated;
49
+ },
50
+ render: function (createElement) {
51
+ var h = !isExecute ? gh : createElement;
52
+ var slots = null;
53
+ if (!isNullOrUndefined(this.$slots.default)) {
54
+ slots = !isExecute ? this.$slots.default() : this.$slots.default;
66
55
  }
67
- if (templateNames.length && this.templateCollection) {
68
- for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
69
- var tempName = templateNames_1[_i];
70
- var elementCollection = this.templateCollection[tempName];
71
- if (elementCollection && elementCollection.length) {
72
- for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
73
- var ele = elementCollection_1[_a];
74
- var destroy = getValue('__vue__.$destroy', ele);
75
- if (destroy) {
76
- ele.__vue__.$destroy();
77
- }
78
- if (ele.innerHTML) {
79
- ele.innerHTML = '';
56
+ return h('div', slots);
57
+ },
58
+ methods: {
59
+ clearTemplate: function (templateNames) {
60
+ if (!templateNames) {
61
+ templateNames = Object.keys(this.templateCollection || {});
62
+ }
63
+ if (templateNames.length && this.templateCollection) {
64
+ for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
65
+ var tempName = templateNames_1[_i];
66
+ var elementCollection = this.templateCollection[tempName];
67
+ if (elementCollection && elementCollection.length) {
68
+ for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
69
+ var ele = elementCollection_1[_a];
70
+ var destroy = getValue('__vue__.$destroy', ele);
71
+ if (destroy) {
72
+ ele.__vue__.$destroy();
73
+ }
74
+ if (ele.innerHTML) {
75
+ ele.innerHTML = '';
76
+ }
80
77
  }
78
+ delete this.templateCollection[tempName];
81
79
  }
82
- delete this.templateCollection[tempName];
83
80
  }
84
81
  }
85
- }
86
- };
87
- SidebarComponent.prototype.setProperties = function (prop, muteOnChange) {
88
- var _this = this;
89
- if (this.isVue3) {
90
- this.models = !this.models ? this.ej2Instances.referModels : this.models;
91
- }
92
- if (this.ej2Instances && this.ej2Instances._setProperties) {
93
- this.ej2Instances._setProperties(prop, muteOnChange);
94
- }
95
- if (prop && this.models && this.models.length) {
96
- Object.keys(prop).map(function (key) {
97
- _this.models.map(function (model) {
98
- if ((key === model) && !(/datasource/i.test(key))) {
99
- if (_this.isVue3) {
100
- _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
82
+ },
83
+ setProperties: function (prop, muteOnChange) {
84
+ var _this = this;
85
+ if (this.isVue3) {
86
+ this.models = !this.models ? this.ej2Instances.referModels : this.models;
87
+ }
88
+ if (this.ej2Instances && this.ej2Instances._setProperties) {
89
+ this.ej2Instances._setProperties(prop, muteOnChange);
90
+ }
91
+ if (prop && this.models && this.models.length) {
92
+ Object.keys(prop).map(function (key) {
93
+ _this.models.map(function (model) {
94
+ if ((key === model) && !(/datasource/i.test(key))) {
95
+ if (_this.isVue3) {
96
+ _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
97
+ }
98
+ else {
99
+ _this.$emit('update:' + key, prop[key]);
100
+ _this.$emit('modelchanged', prop[key]);
101
+ }
101
102
  }
102
- else {
103
- _this.$emit('update:' + key, prop[key]);
104
- _this.$emit('modelchanged', prop[key]);
103
+ });
104
+ });
105
+ }
106
+ },
107
+ trigger: function (eventName, eventProp, successHandler) {
108
+ if (!isExecute) {
109
+ this.models = !this.models ? this.ej2Instances.referModels : this.models;
110
+ }
111
+ if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
112
+ var key = this.models.toString().match(/checked|value/) || [];
113
+ var propKey = key[0];
114
+ if (eventProp && key && !isUndefined(eventProp[propKey])) {
115
+ if (!isExecute) {
116
+ this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
117
+ this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
118
+ this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
119
+ }
120
+ else {
121
+ if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
122
+ this.$emit('update:' + propKey, eventProp[propKey]);
123
+ this.$emit('modelchanged', eventProp[propKey]);
105
124
  }
106
125
  }
107
- });
108
- });
109
- }
110
- };
111
- SidebarComponent.prototype.trigger = function (eventName, eventProp, successHandler) {
112
- if (!isExecute) {
113
- this.models = !this.models ? this.ej2Instances.referModels : this.models;
114
- }
115
- if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
116
- var key = this.models.toString().match(/checked|value/) || [];
117
- var propKey = key[0];
118
- if (eventProp && key && !isUndefined(eventProp[propKey])) {
119
- if (!isExecute) {
120
- this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
121
- this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
122
- this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
123
126
  }
124
- else {
125
- if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
127
+ }
128
+ else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
129
+ var key = this.models.toString().match(/currentView|selectedDate/) || [];
130
+ var propKey = key[0];
131
+ if (eventProp && key && !isUndefined(eventProp[propKey])) {
132
+ if (!isExecute) {
133
+ this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
134
+ this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
135
+ }
136
+ else {
126
137
  this.$emit('update:' + propKey, eventProp[propKey]);
127
138
  this.$emit('modelchanged', eventProp[propKey]);
128
139
  }
129
140
  }
130
141
  }
131
- }
132
- else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
133
- var key = this.models.toString().match(/currentView|selectedDate/) || [];
134
- var propKey = key[0];
135
- if (eventProp && key && !isUndefined(eventProp[propKey])) {
136
- if (!isExecute) {
137
- this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
138
- this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
139
- }
140
- else {
141
- this.$emit('update:' + propKey, eventProp[propKey]);
142
- this.$emit('modelchanged', eventProp[propKey]);
143
- }
142
+ if ((this.ej2Instances && this.ej2Instances._trigger)) {
143
+ this.ej2Instances._trigger(eventName, eventProp, successHandler);
144
144
  }
145
- }
146
- if ((this.ej2Instances && this.ej2Instances._trigger)) {
147
- this.ej2Instances._trigger(eventName, eventProp, successHandler);
148
- }
149
- };
150
- SidebarComponent.prototype.render = function (createElement) {
151
- var h = !isExecute ? gh : createElement;
152
- var slots = null;
153
- if (!isNullOrUndefined(this.$slots.default)) {
154
- slots = !isExecute ? this.$slots.default() : this.$slots.default;
155
- }
156
- return h('div', slots);
157
- };
158
- SidebarComponent.prototype.custom = function () {
159
- this.updated();
160
- };
161
- SidebarComponent.prototype.hide = function (e) {
162
- return this.ej2Instances.hide(e);
163
- };
164
- SidebarComponent.prototype.show = function (e) {
165
- return this.ej2Instances.show(e);
166
- };
167
- SidebarComponent.prototype.toggle = function () {
168
- return this.ej2Instances.toggle();
169
- };
170
- SidebarComponent = __decorate([
171
- EJComponentDecorator({
172
- props: properties,
173
- model: {
174
- event: 'modelchanged'
175
- }
176
- }, isExecute)
177
- ,Options({
178
- props: props,
179
- watch: watch,
180
- emits: emitProbs,
181
- provide: function provide() {
182
- return {
183
- custom: this.custom
184
- };
185
- }
186
- })
187
- ], SidebarComponent);
188
- return SidebarComponent;
189
- }(ComponentBase));
190
- export { SidebarComponent };
145
+ },
146
+ custom: function () {
147
+ this.updated();
148
+ },
149
+ hide: function (e) {
150
+ return this.ej2Instances.hide(e);
151
+ },
152
+ show: function (e) {
153
+ return this.ej2Instances.show(e);
154
+ },
155
+ toggle: function () {
156
+ return this.ej2Instances.toggle();
157
+ },
158
+ }
159
+ });
191
160
  export var SidebarPlugin = {
192
161
  name: 'ejs-sidebar',
193
162
  install: function (Vue) {