@syncfusion/ej2-inputs 20.3.57 → 20.4.40

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 (122) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +8 -15
  3. package/dist/ej2-inputs.min.js +2 -2
  4. package/dist/ej2-inputs.umd.min.js +2 -2
  5. package/dist/ej2-inputs.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-inputs.es2015.js +884 -63
  7. package/dist/es6/ej2-inputs.es2015.js.map +1 -1
  8. package/dist/es6/ej2-inputs.es5.js +908 -63
  9. package/dist/es6/ej2-inputs.es5.js.map +1 -1
  10. package/dist/global/ej2-inputs.min.js +2 -2
  11. package/dist/global/ej2-inputs.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +11 -10
  14. package/rating.d.ts +4 -0
  15. package/rating.js +4 -0
  16. package/src/color-picker/color-picker-model.d.ts +4 -4
  17. package/src/color-picker/color-picker.d.ts +4 -4
  18. package/src/color-picker/color-picker.js +4 -2
  19. package/src/common/signature-base.d.ts +0 -1
  20. package/src/common/signature-base.js +3 -8
  21. package/src/index.d.ts +1 -0
  22. package/src/index.js +1 -0
  23. package/src/input/input.d.ts +1 -0
  24. package/src/input/input.js +5 -1
  25. package/src/maskedtextbox/base/mask-base.d.ts +1 -0
  26. package/src/maskedtextbox/base/mask-base.js +20 -13
  27. package/src/maskedtextbox/maskedtextbox/maskedtextbox-model.d.ts +1 -0
  28. package/src/maskedtextbox/maskedtextbox/maskedtextbox.d.ts +1 -0
  29. package/src/maskedtextbox/maskedtextbox/maskedtextbox.js +16 -7
  30. package/src/numerictextbox/numerictextbox.js +21 -9
  31. package/src/rating/index.d.ts +5 -0
  32. package/src/rating/index.js +4 -0
  33. package/src/rating/rating-model.d.ts +185 -0
  34. package/src/rating/rating.d.ts +344 -0
  35. package/src/rating/rating.js +783 -0
  36. package/src/slider/slider.js +4 -2
  37. package/src/textbox/textbox.js +10 -9
  38. package/src/uploader/uploader-model.d.ts +10 -1
  39. package/src/uploader/uploader.d.ts +8 -0
  40. package/src/uploader/uploader.js +41 -12
  41. package/styles/bootstrap-dark.css +265 -0
  42. package/styles/bootstrap-dark.scss +1 -0
  43. package/styles/bootstrap.css +265 -0
  44. package/styles/bootstrap.scss +1 -0
  45. package/styles/bootstrap4.css +268 -2
  46. package/styles/bootstrap4.scss +1 -0
  47. package/styles/bootstrap5-dark.css +266 -0
  48. package/styles/bootstrap5-dark.scss +1 -0
  49. package/styles/bootstrap5.css +266 -0
  50. package/styles/bootstrap5.scss +1 -0
  51. package/styles/color-picker/_theme.scss +2 -2
  52. package/styles/color-picker/bootstrap4.css +2 -2
  53. package/styles/fabric-dark.css +265 -0
  54. package/styles/fabric-dark.scss +1 -0
  55. package/styles/fabric.css +265 -0
  56. package/styles/fabric.scss +1 -0
  57. package/styles/fluent-dark.css +265 -0
  58. package/styles/fluent-dark.scss +1 -0
  59. package/styles/fluent.css +265 -0
  60. package/styles/fluent.scss +1 -0
  61. package/styles/highcontrast-light.css +265 -0
  62. package/styles/highcontrast-light.scss +1 -0
  63. package/styles/highcontrast.css +265 -0
  64. package/styles/highcontrast.scss +1 -0
  65. package/styles/material-dark.css +265 -0
  66. package/styles/material-dark.scss +1 -0
  67. package/styles/material.css +265 -0
  68. package/styles/material.scss +1 -0
  69. package/styles/rating/_all.scss +2 -0
  70. package/styles/rating/_bootstrap-dark-definition.scss +45 -0
  71. package/styles/rating/_bootstrap-definition.scss +45 -0
  72. package/styles/rating/_bootstrap4-definition.scss +45 -0
  73. package/styles/rating/_bootstrap5-dark-definition.scss +1 -0
  74. package/styles/rating/_bootstrap5-definition.scss +45 -0
  75. package/styles/rating/_fabric-dark-definition.scss +45 -0
  76. package/styles/rating/_fabric-definition.scss +45 -0
  77. package/styles/rating/_fluent-dark-definition.scss +1 -0
  78. package/styles/rating/_fluent-definition.scss +45 -0
  79. package/styles/rating/_fusionnew-definition.scss +45 -0
  80. package/styles/rating/_highcontrast-definition.scss +45 -0
  81. package/styles/rating/_highcontrast-light-definition.scss +45 -0
  82. package/styles/rating/_layout.scss +204 -0
  83. package/styles/rating/_material-dark-definition.scss +45 -0
  84. package/styles/rating/_material-definition.scss +45 -0
  85. package/styles/rating/_material3-definition.scss +45 -0
  86. package/styles/rating/_tailwind-dark-definition.scss +1 -0
  87. package/styles/rating/_tailwind-definition.scss +45 -0
  88. package/styles/rating/_theme.scss +158 -0
  89. package/styles/rating/bootstrap-dark.css +264 -0
  90. package/styles/rating/bootstrap-dark.scss +4 -0
  91. package/styles/rating/bootstrap.css +264 -0
  92. package/styles/rating/bootstrap.scss +4 -0
  93. package/styles/rating/bootstrap4.css +265 -0
  94. package/styles/rating/bootstrap4.scss +4 -0
  95. package/styles/rating/bootstrap5-dark.css +265 -0
  96. package/styles/rating/bootstrap5-dark.scss +4 -0
  97. package/styles/rating/bootstrap5.css +265 -0
  98. package/styles/rating/bootstrap5.scss +4 -0
  99. package/styles/rating/fabric-dark.css +264 -0
  100. package/styles/rating/fabric-dark.scss +4 -0
  101. package/styles/rating/fabric.css +264 -0
  102. package/styles/rating/fabric.scss +4 -0
  103. package/styles/rating/fluent-dark.css +264 -0
  104. package/styles/rating/fluent-dark.scss +4 -0
  105. package/styles/rating/fluent.css +264 -0
  106. package/styles/rating/fluent.scss +4 -0
  107. package/styles/rating/highcontrast-light.css +264 -0
  108. package/styles/rating/highcontrast-light.scss +4 -0
  109. package/styles/rating/highcontrast.css +264 -0
  110. package/styles/rating/highcontrast.scss +4 -0
  111. package/styles/rating/material-dark.css +265 -0
  112. package/styles/rating/material-dark.scss +4 -0
  113. package/styles/rating/material.css +265 -0
  114. package/styles/rating/material.scss +4 -0
  115. package/styles/rating/tailwind-dark.css +270 -0
  116. package/styles/rating/tailwind-dark.scss +4 -0
  117. package/styles/rating/tailwind.css +270 -0
  118. package/styles/rating/tailwind.scss +4 -0
  119. package/styles/tailwind-dark.css +271 -0
  120. package/styles/tailwind-dark.scss +1 -0
  121. package/styles/tailwind.css +271 -0
  122. package/styles/tailwind.scss +1 -0
@@ -0,0 +1,185 @@
1
+ import { addClass, Event, attributes, BaseEventArgs, compile, Component, EmitType, EventHandler, getUniqueID, INotifyPropertyChanged, select } from '@syncfusion/ej2-base';import { isNullOrUndefined, KeyboardEventArgs, KeyboardEvents, MouseEventArgs, NotifyPropertyChanges, Property, remove, removeClass } from '@syncfusion/ej2-base';import { Tooltip } from '@syncfusion/ej2-popups';
2
+ import {LabelPosition,PrecisionType,RatingItemEventArgs,RatingHoverEventArgs,RatingChangedEventArgs} from "./rating";
3
+ import {ComponentModel} from '@syncfusion/ej2-base';
4
+
5
+ /**
6
+ * Interface for a class Rating
7
+ */
8
+ export interface RatingModel extends ComponentModel{
9
+
10
+ /**
11
+ * Defines whether to show or hide the reset button.
12
+ * If min is not zero, then reset button won’t be displayed regardless of allowReset value.
13
+ *
14
+ * @default false
15
+ */
16
+ allowReset?: boolean;
17
+
18
+ /**
19
+ * Defines the CSS class to customize the rating appearance.
20
+ *
21
+ * @default ''
22
+ */
23
+ cssClass?: string;
24
+
25
+ /**
26
+ * Defines whether the rating is enabled or disabled.
27
+ *
28
+ * @default false
29
+ */
30
+ disabled?: boolean;
31
+
32
+ /**
33
+ * Defines whether to add animation when an item is hovered.
34
+ *
35
+ * @default true
36
+ */
37
+ enableAnimation?: boolean;
38
+
39
+ /**
40
+ * Defines the template content for each item when it is not selected.
41
+ * The template context will contain the current item value for customization.
42
+ *
43
+ * @default ''
44
+ */
45
+ emptyTemplate?: string;
46
+
47
+ /**
48
+ * Defines whether to enable single selection like radio button or not.
49
+ * If not enabled all the items before the selected item will also be in the selected state.
50
+ *
51
+ * @default false
52
+ */
53
+ enableSingleSelection?: boolean;
54
+
55
+ /**
56
+ * Defines the template content for each item when it is selected.
57
+ * The template context will contain the current item value for customization.
58
+ *
59
+ * @default ''
60
+ */
61
+ fullTemplate?: string;
62
+
63
+ /**
64
+ * Defines the number of rating items.
65
+ *
66
+ * @default 5
67
+ * @aspType int
68
+ */
69
+ itemsCount?: number;
70
+
71
+ /**
72
+ * Defines the position of the label in the rating.
73
+ * *Top
74
+ * *Bottom
75
+ * *Left
76
+ * *Right
77
+ *
78
+ * @isenumeration true
79
+ * @default LabelPosition.Right
80
+ * @asptype LabelPosition
81
+ */
82
+ labelPosition?: string | LabelPosition;
83
+
84
+ /**
85
+ * Defines the template content for the label.
86
+ * The template context will contain the current value and maximum value for customization.
87
+ *
88
+ * @default ''
89
+ */
90
+ labelTemplate?: string;
91
+
92
+ /**
93
+ * Defines the minimum value of the rating.
94
+ *
95
+ * @default 0.0
96
+ * @aspType double
97
+ */
98
+ min?: number;
99
+
100
+ /**
101
+ * Defines the minimum increase in the value.
102
+ * *Full
103
+ * *Half
104
+ * *Quarter
105
+ * *Exact
106
+ *
107
+ * @isenumeration true
108
+ * @default PrecisionType.Full
109
+ * @asptype PrecisionType
110
+ */
111
+ precision?: string | PrecisionType;
112
+
113
+ /**
114
+ * Defines whether the read only mode is enabled or not where interaction is disabled without any UI change.
115
+ *
116
+ * @default false
117
+ */
118
+ readOnly?: boolean;
119
+
120
+ /**
121
+ * Defines whether to show a label which display the current value.
122
+ *
123
+ * @default false
124
+ */
125
+ showLabel?: boolean;
126
+
127
+ /**
128
+ * Defines whether to show tooltip for the items.
129
+ *
130
+ * @default true
131
+ */
132
+ showTooltip?: boolean;
133
+
134
+ /**
135
+ * Defines the template content for the tooltip.
136
+ * The template context will contain the current value for customization.
137
+ *
138
+ * @default ''
139
+ */
140
+ tooltipTemplate?: string;
141
+
142
+ /**
143
+ * Defines the rating value.
144
+ *
145
+ * @default 0.0
146
+ * @aspType double
147
+ */
148
+ value?: number;
149
+
150
+ /**
151
+ * Defines whether the rating is visible or hidden.
152
+ *
153
+ * @default true
154
+ */
155
+ visible?: boolean;
156
+
157
+ /**
158
+ * Event triggers before rendering each item.
159
+ *
160
+ * @event beforeItemRender
161
+ */
162
+ beforeItemRender?: EmitType<RatingItemEventArgs>;
163
+
164
+ /**
165
+ * Event triggers after the creation of Rating.
166
+ *
167
+ * @event created
168
+ */
169
+ created?: EmitType<Event>;
170
+
171
+ /**
172
+ * Event triggers whenever a new item is hovered.
173
+ *
174
+ * @event onItemHover
175
+ */
176
+ onItemHover?: EmitType<RatingHoverEventArgs>;
177
+
178
+ /**
179
+ * Event triggers whenever the value changes.
180
+ *
181
+ * @event valueChanged
182
+ */
183
+ valueChanged?: EmitType<RatingChangedEventArgs>;
184
+
185
+ }
@@ -0,0 +1,344 @@
1
+ import { BaseEventArgs, Component, EmitType, INotifyPropertyChanged } from '@syncfusion/ej2-base';
2
+ import { RatingModel } from './rating-model';
3
+ /**
4
+ * Defines the position of the label in the rating.
5
+ */
6
+ export declare enum LabelPosition {
7
+ /**
8
+ * Shows the label above the rating.
9
+ */
10
+ Top = "Top",
11
+ /**
12
+ * Shows the label below the rating.
13
+ */
14
+ Bottom = "Bottom",
15
+ /**
16
+ * Shows the label to the left of rating.
17
+ */
18
+ Left = "Left",
19
+ /**
20
+ * Shows the label to the right of rating.
21
+ */
22
+ Right = "Right"
23
+ }
24
+ /**
25
+ * Defines the minimum increase in the value in Rating Control.
26
+ */
27
+ export declare enum PrecisionType {
28
+ /**
29
+ * Process the value as whole numbers.
30
+ */
31
+ Full = "Full",
32
+ /**
33
+ * Process the value in terms of 0.5 (half).
34
+ */
35
+ Half = "Half",
36
+ /**
37
+ * Process the value in terms of 0.25 (quarter).
38
+ */
39
+ Quarter = "Quarter",
40
+ /**
41
+ * Process the value in terms of 0.1.
42
+ */
43
+ Exact = "Exact"
44
+ }
45
+ /**
46
+ * Event triggers whenever the value changes.
47
+ */
48
+ export interface RatingChangedEventArgs extends BaseEventArgs {
49
+ /**
50
+ * Provides the original event
51
+ */
52
+ event: Event;
53
+ /**
54
+ * Provides whether the change is triggered by user interaction.
55
+ */
56
+ isInteracted: boolean;
57
+ /**
58
+ * Provides the previous value.
59
+ */
60
+ previousValue: number;
61
+ /**
62
+ * Provides the current value.
63
+ */
64
+ value: number;
65
+ }
66
+ /**
67
+ * Event triggers whenever a new item is hovered.
68
+ */
69
+ export interface RatingHoverEventArgs extends BaseEventArgs {
70
+ /**
71
+ * Provides the hovered item element.
72
+ */
73
+ element: HTMLElement;
74
+ /**
75
+ * Provides the original event.
76
+ */
77
+ event: Event;
78
+ /**
79
+ * Provides the current value of the hovered item.
80
+ */
81
+ value: number;
82
+ }
83
+ /**
84
+ * Event triggers before rendering each item.
85
+ */
86
+ export interface RatingItemEventArgs extends BaseEventArgs {
87
+ /**
88
+ * Html element of the current item to be rendered.
89
+ */
90
+ element: HTMLElement;
91
+ /**
92
+ * Provides the place value of the item.
93
+ */
94
+ value: number;
95
+ }
96
+ export declare class Rating extends Component<HTMLElement> implements INotifyPropertyChanged {
97
+ /**
98
+ * Defines whether to show or hide the reset button.
99
+ * If min is not zero, then reset button won’t be displayed regardless of allowReset value.
100
+ *
101
+ * @default false
102
+ */
103
+ allowReset: boolean;
104
+ /**
105
+ * Defines the CSS class to customize the rating appearance.
106
+ *
107
+ * @default ''
108
+ */
109
+ cssClass: string;
110
+ /**
111
+ * Defines whether the rating is enabled or disabled.
112
+ *
113
+ * @default false
114
+ */
115
+ disabled: boolean;
116
+ /**
117
+ * Defines whether to add animation when an item is hovered.
118
+ *
119
+ * @default true
120
+ */
121
+ enableAnimation: boolean;
122
+ /**
123
+ * Defines the template content for each item when it is not selected.
124
+ * The template context will contain the current item value for customization.
125
+ *
126
+ * @default ''
127
+ */
128
+ emptyTemplate: string;
129
+ /**
130
+ * Defines whether to enable single selection like radio button or not.
131
+ * If not enabled all the items before the selected item will also be in the selected state.
132
+ *
133
+ * @default false
134
+ */
135
+ enableSingleSelection: boolean;
136
+ /**
137
+ * Defines the template content for each item when it is selected.
138
+ * The template context will contain the current item value for customization.
139
+ *
140
+ * @default ''
141
+ */
142
+ fullTemplate: string;
143
+ /**
144
+ * Defines the number of rating items.
145
+ *
146
+ * @default 5
147
+ * @aspType int
148
+ */
149
+ itemsCount: number;
150
+ /**
151
+ * Defines the position of the label in the rating.
152
+ * *Top
153
+ * *Bottom
154
+ * *Left
155
+ * *Right
156
+ *
157
+ * @isenumeration true
158
+ * @default LabelPosition.Right
159
+ * @asptype LabelPosition
160
+ */
161
+ labelPosition: string | LabelPosition;
162
+ /**
163
+ * Defines the template content for the label.
164
+ * The template context will contain the current value and maximum value for customization.
165
+ *
166
+ * @default ''
167
+ */
168
+ labelTemplate: string;
169
+ /**
170
+ * Defines the minimum value of the rating.
171
+ *
172
+ * @default 0.0
173
+ * @aspType double
174
+ */
175
+ min: number;
176
+ /**
177
+ * Defines the minimum increase in the value.
178
+ * *Full
179
+ * *Half
180
+ * *Quarter
181
+ * *Exact
182
+ *
183
+ * @isenumeration true
184
+ * @default PrecisionType.Full
185
+ * @asptype PrecisionType
186
+ */
187
+ precision: string | PrecisionType;
188
+ /**
189
+ * Defines whether the read only mode is enabled or not where interaction is disabled without any UI change.
190
+ *
191
+ * @default false
192
+ */
193
+ readOnly: boolean;
194
+ /**
195
+ * Defines whether to show a label which display the current value.
196
+ *
197
+ * @default false
198
+ */
199
+ showLabel: boolean;
200
+ /**
201
+ * Defines whether to show tooltip for the items.
202
+ *
203
+ * @default true
204
+ */
205
+ showTooltip: boolean;
206
+ /**
207
+ * Defines the template content for the tooltip.
208
+ * The template context will contain the current value for customization.
209
+ *
210
+ * @default ''
211
+ */
212
+ tooltipTemplate: string;
213
+ /**
214
+ * Defines the rating value.
215
+ *
216
+ * @default 0.0
217
+ * @aspType double
218
+ */
219
+ value: number;
220
+ /**
221
+ * Defines whether the rating is visible or hidden.
222
+ *
223
+ * @default true
224
+ */
225
+ visible: boolean;
226
+ /**
227
+ * Event triggers before rendering each item.
228
+ *
229
+ * @event beforeItemRender
230
+ */
231
+ beforeItemRender: EmitType<RatingItemEventArgs>;
232
+ /**
233
+ * Event triggers after the creation of Rating.
234
+ *
235
+ * @event created
236
+ */
237
+ created: EmitType<Event>;
238
+ /**
239
+ * Event triggers whenever a new item is hovered.
240
+ *
241
+ * @event onItemHover
242
+ */
243
+ onItemHover: EmitType<RatingHoverEventArgs>;
244
+ /**
245
+ * Event triggers whenever the value changes.
246
+ *
247
+ * @event valueChanged
248
+ */
249
+ valueChanged: EmitType<RatingChangedEventArgs>;
250
+ private wrapper;
251
+ private ratingItemList;
252
+ private spanLabel;
253
+ private itemElements;
254
+ private resetElement;
255
+ private keyboardModuleRating;
256
+ private keyConfigs;
257
+ private tooltipObj;
258
+ private currentValue;
259
+ private emptyTemplateFunction;
260
+ private fullTemplateFunction;
261
+ private tooltipOpen;
262
+ /**
263
+ * Constructor for creating the widget
264
+ *
265
+ * @param {RatingModel} options - Specifies the rating model
266
+ * @param {string|HTMLButtonElement} element - Specifies the target element
267
+ */
268
+ constructor(options?: RatingModel, element?: string | HTMLInputElement);
269
+ protected preRender(): void;
270
+ render(): void;
271
+ private initialize;
272
+ private updateDisabled;
273
+ private updateResetButton;
274
+ private renderItemList;
275
+ private touchMoveHandler;
276
+ private touchEndHandler;
277
+ private updateTemplateFunction;
278
+ private renderItems;
279
+ private renderItemContent;
280
+ private removeItemContent;
281
+ private updateTooltip;
282
+ private updateMinValue;
283
+ private updatePrecision;
284
+ private validateValue;
285
+ private getRatingValue;
286
+ private updateItemValue;
287
+ private updateItemContent;
288
+ private updateTooltipContent;
289
+ private getTemplateString;
290
+ private displayLabel;
291
+ private updateLabel;
292
+ private updateReset;
293
+ private updateLabelPosition;
294
+ private clearLabelPosition;
295
+ private wireItemsEvents;
296
+ private clickHandler;
297
+ private triggerChange;
298
+ private mouseMoveHandler;
299
+ private openRatingTooltip;
300
+ private closeRatingTooltip;
301
+ private updateCurrentValue;
302
+ private mouseLeaveHandler;
303
+ private calculateCurrentValue;
304
+ /**
305
+ * Reset’s the value to minimum.
306
+ *
307
+ * @returns {void}
308
+ */
309
+ reset(): void;
310
+ private resetClicked;
311
+ private wireKeyboardEvent;
312
+ private keyActionHandler;
313
+ private handleNavigation;
314
+ private updateContent;
315
+ /**
316
+ * To get component name.
317
+ *
318
+ * @returns {string} - Module Name
319
+ * @private
320
+ */
321
+ getModuleName(): string;
322
+ /**
323
+ * To get the properties to be maintained in the persisted state.
324
+ *
325
+ * @returns {string} - Persist data
326
+ */
327
+ protected getPersistData(): string;
328
+ private removeItemElements;
329
+ /**
330
+ * Destroys the Rating instance.
331
+ *
332
+ * @returns {void}
333
+ */
334
+ destroy(): void;
335
+ /**
336
+ * Called internally if any of the property value changed.
337
+ *
338
+ * @param {RatingModel} newProp - Specifies new properties
339
+ * @param {RatingModel} oldProp - Specifies old properties
340
+ * @returns {void}
341
+ * @private
342
+ */
343
+ onPropertyChanged(newProp: RatingModel, oldProp?: RatingModel): void;
344
+ }