@progress/kendo-angular-indicators 3.0.2 → 11.0.0-develop.79

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 (56) hide show
  1. package/NOTICE.txt +3 -3
  2. package/badge/badge-container.component.d.ts +1 -1
  3. package/badge/badge.component.d.ts +1 -1
  4. package/badge/models/align.d.ts +1 -1
  5. package/badge/models/fill.d.ts +1 -1
  6. package/badge/models/position.d.ts +1 -1
  7. package/badge/models/rounded.d.ts +1 -1
  8. package/badge/models/size.d.ts +1 -1
  9. package/badge/models/theme-color.d.ts +1 -1
  10. package/badge.module.d.ts +1 -1
  11. package/{esm2015/badge/badge-container.component.js → esm2020/badge/badge-container.component.mjs} +4 -4
  12. package/{esm2015/badge/badge.component.js → esm2020/badge/badge.component.mjs} +5 -5
  13. package/{esm2015/badge/models/align.js → esm2020/badge/models/align.mjs} +1 -1
  14. package/{esm2015/badge/models/fill.js → esm2020/badge/models/fill.mjs} +1 -1
  15. package/{esm2015/badge/models/position.js → esm2020/badge/models/position.mjs} +1 -1
  16. package/{esm2015/badge/models/rounded.js → esm2020/badge/models/rounded.mjs} +1 -1
  17. package/esm2020/badge/models/size.mjs +5 -0
  18. package/esm2020/badge/models/theme-color.mjs +5 -0
  19. package/{esm2015/badge.module.js → esm2020/badge.module.mjs} +5 -5
  20. package/{esm2015/main.js → esm2020/index.mjs} +1 -1
  21. package/{esm2015/indicators.module.js → esm2020/indicators.module.mjs} +5 -5
  22. package/{esm2015/loader/loader.component.js → esm2020/loader/loader.component.mjs} +5 -5
  23. package/esm2020/loader/models/size.mjs +5 -0
  24. package/esm2020/loader/models/theme-color.mjs +5 -0
  25. package/esm2020/loader/models/type.mjs +5 -0
  26. package/{esm2015/loader.module.js → esm2020/loader.module.mjs} +5 -5
  27. package/{esm2015/package-metadata.js → esm2020/package-metadata.mjs} +3 -3
  28. package/{esm2015/kendo-angular-indicators.js → esm2020/progress-kendo-angular-indicators.mjs} +2 -2
  29. package/{esm2015/skeleton/constants.js → esm2020/skeleton/constants.mjs} +1 -1
  30. package/{esm2015/skeleton/models.js → esm2020/skeleton/models.mjs} +1 -1
  31. package/{esm2015/skeleton/skeleton.component.js → esm2020/skeleton/skeleton.component.mjs} +5 -5
  32. package/{esm2015/skeleton.module.js → esm2020/skeleton.module.mjs} +5 -5
  33. package/fesm2015/{kendo-angular-indicators.js → progress-kendo-angular-indicators.mjs} +31 -31
  34. package/fesm2020/progress-kendo-angular-indicators.mjs +694 -0
  35. package/{main.d.ts → index.d.ts} +1 -1
  36. package/indicators.module.d.ts +1 -1
  37. package/loader/loader.component.d.ts +1 -1
  38. package/loader/models/size.d.ts +1 -1
  39. package/loader/models/theme-color.d.ts +1 -1
  40. package/loader/models/type.d.ts +1 -1
  41. package/loader.module.d.ts +1 -1
  42. package/package-metadata.d.ts +1 -1
  43. package/package.json +28 -54
  44. package/{kendo-angular-indicators.d.ts → progress-kendo-angular-indicators.d.ts} +2 -2
  45. package/schematics/ngAdd/index.js +1 -5
  46. package/skeleton/constants.d.ts +1 -1
  47. package/skeleton/models.d.ts +1 -1
  48. package/skeleton/skeleton.component.d.ts +1 -1
  49. package/skeleton.module.d.ts +1 -1
  50. package/bundles/kendo-angular-indicators.umd.js +0 -5
  51. package/esm2015/badge/models/size.js +0 -5
  52. package/esm2015/badge/models/theme-color.js +0 -5
  53. package/esm2015/loader/models/size.js +0 -5
  54. package/esm2015/loader/models/theme-color.js +0 -5
  55. package/esm2015/loader/models/type.js +0 -5
  56. package/schematics/ngAdd/index.js.map +0 -1
@@ -0,0 +1,694 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2022 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as i0 from '@angular/core';
6
+ import { Component, HostBinding, Input, NgModule, isDevMode, ChangeDetectionStrategy } from '@angular/core';
7
+ import * as i1 from '@progress/kendo-angular-l10n';
8
+ import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
9
+ import { validatePackage } from '@progress/kendo-licensing';
10
+ import * as i1$1 from '@angular/common';
11
+ import { CommonModule } from '@angular/common';
12
+
13
+ /**
14
+ * @hidden
15
+ */
16
+ const packageMetadata = {
17
+ name: '@progress/kendo-angular-indicators',
18
+ productName: 'Kendo UI for Angular',
19
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
20
+ publishDate: 1672320734,
21
+ version: '',
22
+ licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
23
+ };
24
+
25
+ const SIZE_CLASSES$1 = {
26
+ 'small': 'k-badge-sm',
27
+ 'medium': 'k-badge-md',
28
+ 'large': 'k-badge-lg'
29
+ };
30
+ const ROUNDED_CLASSES = {
31
+ 'small': 'k-rounded-sm',
32
+ 'medium': 'k-rounded-md',
33
+ 'large': 'k-rounded-lg',
34
+ 'full': 'k-rounded-full'
35
+ };
36
+ /**
37
+ * Represents the [Kendo UI Badge component for Angular]({% slug overview_badge %}).
38
+ * Used to display additional information or status that is related to an element.
39
+ */
40
+ class BadgeComponent {
41
+ constructor(element, renderer, localizationService) {
42
+ this.element = element;
43
+ this.renderer = renderer;
44
+ this.localizationService = localizationService;
45
+ this.hostClass = true;
46
+ /**
47
+ * Specifies the size of the Badge ([see example]({% slug appearance_badge %}#toc-size)).
48
+ *
49
+ * The possible values are:
50
+ * * `small`
51
+ * * `medium`
52
+ * * `large`
53
+ * * `none`
54
+ *
55
+ * @default medium
56
+ */
57
+ this.size = 'medium';
58
+ /**
59
+ * Specifies the appearance fill style of the Badge ([see example]({% slug appearance_badge %}#toc-fill)).
60
+ *
61
+ * The possible values are:
62
+ * * `solid`
63
+ * * `outline`
64
+ * * `none`
65
+ *
66
+ * @default solid
67
+ */
68
+ this.fill = 'solid';
69
+ /**
70
+ * Specifies the theme color of the Badge.
71
+ * The theme color will be applied as background and border color, while also amending the text color accordingly
72
+ * ([see example]({% slug appearance_badge %}#toc-theme-color)).
73
+ *
74
+ * The possible values are:
75
+ * * `primary`
76
+ * * `secondary`
77
+ * * `tertiary`
78
+ * * `inherit`
79
+ * * `info`
80
+ * * `success`
81
+ * * `warning`
82
+ * * `error`
83
+ * * `dark`
84
+ * * `light`
85
+ * * `inverse`
86
+ * * `none`
87
+ *
88
+ * @default primary
89
+ */
90
+ this.themeColor = 'primary';
91
+ /**
92
+ * Specifies the roundness of the Badge ([see example]({% slug appearance_badge %}#toc-rounded)).
93
+ *
94
+ * The possible values are:
95
+ * * `small`
96
+ * * `medium`
97
+ * * `large`
98
+ * * `full`
99
+ * * `none`
100
+ *
101
+ * @default medium
102
+ */
103
+ this.rounded = 'medium';
104
+ /**
105
+ * Specifies the position of the Badge relative to the edge of the parent container element ([see example]({% slug alignandposition_badge %}#toc-position)).
106
+ *
107
+ * The possible values are:
108
+ * * `edge`
109
+ * * `inside`
110
+ * * `outside`
111
+ *
112
+ * @default edge
113
+ */
114
+ this.position = 'edge';
115
+ /**
116
+ * Specifies whether or not to render additional `cutout` border around the Badge ([see example]({% slug appearance_badge %}#toc-cutout-border)).
117
+ *
118
+ * The possible values are:
119
+ * * `true`
120
+ * * `false`
121
+ *
122
+ * @default false
123
+ */
124
+ this.cutoutBorder = false;
125
+ this.badgeClasses = [];
126
+ this.badgeAlign = { vertical: 'top', horizontal: 'end' };
127
+ this.rtl = false;
128
+ validatePackage(packageMetadata);
129
+ this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
130
+ this.rtl = rtl;
131
+ this.direction = this.rtl ? 'rtl' : 'ltr';
132
+ });
133
+ }
134
+ get cutoutBorderClass() {
135
+ return this.cutoutBorder;
136
+ }
137
+ /**
138
+ * Specifies the alignment of the Badge ([see example]({% slug alignandposition_badge %}#toc-alignment)).
139
+ *
140
+ * The possible values are:
141
+ * * `{ vertical: 'top', horizontal: 'end' }`
142
+ * * `{ vertical: 'top', horizontal: 'start' }`
143
+ * * `{ vertical: 'bottom', horizontal: 'start' }`
144
+ * * `{ vertical: 'bottom', horizontal: 'end' }`
145
+ *
146
+ * @default "{ vertical: 'top', horizontal: 'end' }"
147
+ */
148
+ get align() {
149
+ return this.badgeAlign;
150
+ }
151
+ set align(align) {
152
+ this.badgeAlign = Object.assign(this.badgeAlign, align);
153
+ }
154
+ ngAfterViewInit() {
155
+ if (!this.badgeClasses.length) {
156
+ this.setBadgeClasses();
157
+ }
158
+ }
159
+ ngOnChanges() {
160
+ this.setBadgeClasses();
161
+ }
162
+ ngOnDestroy() {
163
+ if (this.dynamicRTLSubscription) {
164
+ this.dynamicRTLSubscription.unsubscribe();
165
+ }
166
+ }
167
+ alignClass() {
168
+ return `k-${this.badgeAlign.vertical}-${this.badgeAlign.horizontal}`;
169
+ }
170
+ positionClass() {
171
+ return `k-badge-${this.position}`;
172
+ }
173
+ sizeClass() {
174
+ if (this.size !== 'none') {
175
+ return SIZE_CLASSES$1[this.size];
176
+ }
177
+ return '';
178
+ }
179
+ roundedClass() {
180
+ if (this.rounded !== 'none') {
181
+ return ROUNDED_CLASSES[this.rounded];
182
+ }
183
+ return '';
184
+ }
185
+ themeColorClass() {
186
+ if (this.themeColor !== 'none' && this.fill !== 'none') {
187
+ return `k-badge-${this.fill}-${this.themeColor}`;
188
+ }
189
+ return '';
190
+ }
191
+ fillClass() {
192
+ if (this.fill !== 'none') {
193
+ return `k-badge-${this.fill}`;
194
+ }
195
+ return '';
196
+ }
197
+ setBadgeClasses() {
198
+ const element = this.element.nativeElement;
199
+ this.badgeClasses.forEach((className) => {
200
+ this.renderer.removeClass(element, className);
201
+ });
202
+ this.badgeClasses = [
203
+ this.themeColorClass(),
204
+ this.fillClass(),
205
+ this.sizeClass(),
206
+ this.roundedClass(),
207
+ this.alignClass(),
208
+ this.positionClass()
209
+ ];
210
+ this.badgeClasses.forEach((className) => {
211
+ if (className) {
212
+ this.renderer.addClass(element, className);
213
+ }
214
+ });
215
+ }
216
+ }
217
+ BadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BadgeComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
218
+ BadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: BadgeComponent, selector: "kendo-badge", inputs: { align: "align", size: "size", fill: "fill", themeColor: "themeColor", rounded: "rounded", position: "position", cutoutBorder: "cutoutBorder" }, host: { properties: { "class.k-badge": "this.hostClass", "class.k-badge-border-cutout": "this.cutoutBorderClass", "attr.dir": "this.direction" } }, providers: [
219
+ LocalizationService,
220
+ {
221
+ provide: L10N_PREFIX,
222
+ useValue: 'kendo.badge.component'
223
+ }
224
+ ], usesOnChanges: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BadgeComponent, decorators: [{
226
+ type: Component,
227
+ args: [{
228
+ selector: 'kendo-badge',
229
+ providers: [
230
+ LocalizationService,
231
+ {
232
+ provide: L10N_PREFIX,
233
+ useValue: 'kendo.badge.component'
234
+ }
235
+ ],
236
+ template: `<ng-content></ng-content>`
237
+ }]
238
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.LocalizationService }]; }, propDecorators: { hostClass: [{
239
+ type: HostBinding,
240
+ args: ['class.k-badge']
241
+ }], cutoutBorderClass: [{
242
+ type: HostBinding,
243
+ args: ['class.k-badge-border-cutout']
244
+ }], direction: [{
245
+ type: HostBinding,
246
+ args: ['attr.dir']
247
+ }], align: [{
248
+ type: Input
249
+ }], size: [{
250
+ type: Input
251
+ }], fill: [{
252
+ type: Input
253
+ }], themeColor: [{
254
+ type: Input
255
+ }], rounded: [{
256
+ type: Input
257
+ }], position: [{
258
+ type: Input
259
+ }], cutoutBorder: [{
260
+ type: Input
261
+ }] } });
262
+
263
+ class BadgeContainerComponent {
264
+ constructor(localizationService) {
265
+ this.localizationService = localizationService;
266
+ this.hostClass = true;
267
+ this.rtl = false;
268
+ this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
269
+ this.rtl = rtl;
270
+ this.direction = this.rtl ? 'rtl' : 'ltr';
271
+ });
272
+ }
273
+ ngOnDestroy() {
274
+ if (this.dynamicRTLSubscription) {
275
+ this.dynamicRTLSubscription.unsubscribe();
276
+ }
277
+ }
278
+ }
279
+ BadgeContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BadgeContainerComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
280
+ BadgeContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: BadgeContainerComponent, selector: "kendo-badge-container", host: { properties: { "class.k-badge-container": "this.hostClass", "attr.dir": "this.direction" } }, providers: [
281
+ LocalizationService,
282
+ {
283
+ provide: L10N_PREFIX,
284
+ useValue: 'kendo.badge.component'
285
+ }
286
+ ], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BadgeContainerComponent, decorators: [{
288
+ type: Component,
289
+ args: [{
290
+ selector: 'kendo-badge-container',
291
+ providers: [
292
+ LocalizationService,
293
+ {
294
+ provide: L10N_PREFIX,
295
+ useValue: 'kendo.badge.component'
296
+ }
297
+ ],
298
+ template: `<ng-content></ng-content>`
299
+ }]
300
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { hostClass: [{
301
+ type: HostBinding,
302
+ args: ['class.k-badge-container']
303
+ }], direction: [{
304
+ type: HostBinding,
305
+ args: ['attr.dir']
306
+ }] } });
307
+
308
+ const exportedModules$1 = [
309
+ BadgeComponent,
310
+ BadgeContainerComponent
311
+ ];
312
+ const declarations$1 = [
313
+ ...exportedModules$1
314
+ ];
315
+ /**
316
+ * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
317
+ * definition for the Badge component.
318
+ */
319
+ class BadgeModule {
320
+ }
321
+ BadgeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
322
+ BadgeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BadgeModule, declarations: [BadgeComponent,
323
+ BadgeContainerComponent], imports: [CommonModule], exports: [BadgeComponent,
324
+ BadgeContainerComponent] });
325
+ BadgeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BadgeModule, imports: [[CommonModule]] });
326
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BadgeModule, decorators: [{
327
+ type: NgModule,
328
+ args: [{
329
+ declarations: [declarations$1],
330
+ exports: [exportedModules$1],
331
+ imports: [CommonModule]
332
+ }]
333
+ }] });
334
+
335
+ const SIZE_CLASSES = {
336
+ 'small': 'k-loader-sm',
337
+ 'medium': 'k-loader-md',
338
+ 'large': 'k-loader-lg'
339
+ };
340
+ const SEGMENT_COUNT = {
341
+ 'pulsing': 2,
342
+ 'infinite-spinner': 3,
343
+ 'converging-spinner': 4
344
+ };
345
+ const TYPE_CLASSES = {
346
+ 'pulsing': 'k-loader-pulsing-2',
347
+ 'infinite-spinner': 'k-loader-spinner-3',
348
+ 'converging-spinner': 'k-loader-spinner-4'
349
+ };
350
+ /**
351
+ * Represents the [Kendo UI Loader component for Angular]({% slug overview_loader %}).
352
+ * Displays a Loader that represents an indeterminate wait time.
353
+ */
354
+ class LoaderComponent {
355
+ constructor(element, renderer) {
356
+ this.element = element;
357
+ this.renderer = renderer;
358
+ this.hostClass = true;
359
+ this._type = 'pulsing';
360
+ this._themeColor = 'primary';
361
+ this._size = 'medium';
362
+ this.loader = this.element.nativeElement;
363
+ validatePackage(packageMetadata);
364
+ }
365
+ /**
366
+ * Specifies the Loader animation type.
367
+ *
368
+ * The possible values are:
369
+ * - `pulsing` (default)
370
+ * - `infinite-spinner`
371
+ * - `converging-spinner`
372
+ */
373
+ set type(type) {
374
+ this.renderer.removeClass(this.loader, TYPE_CLASSES[this.type]);
375
+ this.renderer.addClass(this.loader, TYPE_CLASSES[type]);
376
+ this._type = type;
377
+ }
378
+ get type() {
379
+ return this._type;
380
+ }
381
+ /**
382
+ * Specifies the theme color of the Loader.
383
+ *
384
+ * The possible values are:
385
+ * * `primary` (Default)&mdash;Applies coloring based on primary theme color.
386
+ * * `secondary`&mdash;Applies coloring based on secondary theme color.
387
+ * * `tertiary`&mdash; Applies coloring based on tertiary theme color.
388
+ * * `info`&mdash;Applies coloring based on info theme color.
389
+ * * `success`&mdash; Applies coloring based on success theme color.
390
+ * * `warning`&mdash; Applies coloring based on warning theme color.
391
+ * * `error`&mdash; Applies coloring based on error theme color.
392
+ * * `dark`&mdash; Applies coloring based on dark theme color.
393
+ * * `light`&mdash; Applies coloring based on light theme color.
394
+ * * `inverse`&mdash; Applies coloring based on inverted theme color.
395
+ *
396
+ */
397
+ set themeColor(themeColor) {
398
+ this.renderer.removeClass(this.loader, `k-loader-${this.themeColor}`);
399
+ this.renderer.addClass(this.loader, `k-loader-${themeColor}`);
400
+ this._themeColor = themeColor;
401
+ }
402
+ get themeColor() {
403
+ return this._themeColor;
404
+ }
405
+ /**
406
+ * Specifies the size of the Loader.
407
+ *
408
+ * The possible values are:
409
+ * * `small`
410
+ * * `medium` (Default)
411
+ * * `large`
412
+ *
413
+ */
414
+ set size(size) {
415
+ this.renderer.removeClass(this.loader, SIZE_CLASSES[this.size]);
416
+ this.renderer.addClass(this.loader, SIZE_CLASSES[size]);
417
+ this._size = size;
418
+ }
419
+ get size() {
420
+ return this._size;
421
+ }
422
+ ngAfterViewInit() {
423
+ this.setLoaderClasses();
424
+ }
425
+ /**
426
+ * @hidden
427
+ */
428
+ get segmentCount() {
429
+ return new Array(SEGMENT_COUNT[this.type]);
430
+ }
431
+ setLoaderClasses() {
432
+ this.renderer.addClass(this.loader, TYPE_CLASSES[this.type]);
433
+ this.renderer.addClass(this.loader, `k-loader-${this.themeColor}`);
434
+ this.renderer.addClass(this.loader, SIZE_CLASSES[this.size]);
435
+ }
436
+ }
437
+ LoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LoaderComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
438
+ LoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: LoaderComponent, selector: "kendo-loader", inputs: { type: "type", themeColor: "themeColor", size: "size" }, host: { properties: { "class.k-loader": "this.hostClass" } }, ngImport: i0, template: `
439
+ <div class="k-loader-canvas">
440
+ <span *ngFor="let segment of segmentCount" class="k-loader-segment"></span>
441
+ </div>
442
+ `, isInline: true, directives: [{ type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
443
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LoaderComponent, decorators: [{
444
+ type: Component,
445
+ args: [{
446
+ selector: 'kendo-loader',
447
+ template: `
448
+ <div class="k-loader-canvas">
449
+ <span *ngFor="let segment of segmentCount" class="k-loader-segment"></span>
450
+ </div>
451
+ `
452
+ }]
453
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { hostClass: [{
454
+ type: HostBinding,
455
+ args: ['class.k-loader']
456
+ }], type: [{
457
+ type: Input
458
+ }], themeColor: [{
459
+ type: Input
460
+ }], size: [{
461
+ type: Input
462
+ }] } });
463
+
464
+ const exportedModules = [
465
+ LoaderComponent
466
+ ];
467
+ const declarations = [
468
+ ...exportedModules
469
+ ];
470
+ /**
471
+ * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
472
+ * definition for the Loader component.
473
+ */
474
+ class LoaderModule {
475
+ }
476
+ LoaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
477
+ LoaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LoaderModule, declarations: [LoaderComponent], imports: [CommonModule], exports: [LoaderComponent] });
478
+ LoaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LoaderModule, imports: [[CommonModule]] });
479
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LoaderModule, decorators: [{
480
+ type: NgModule,
481
+ args: [{
482
+ declarations: [declarations],
483
+ exports: [exportedModules],
484
+ imports: [CommonModule]
485
+ }]
486
+ }] });
487
+
488
+ /**
489
+ * @hidden
490
+ */
491
+ const validAnimations = [false, 'pulse', 'wave'];
492
+ /**
493
+ * @hidden
494
+ */
495
+ const validShapes = ['circle', 'rectangle', 'text'];
496
+
497
+ /**
498
+ * @hidden
499
+ */
500
+ const ANIMATION_CLASSES = {
501
+ pulse: 'k-skeleton-pulse',
502
+ wave: 'k-skeleton-wave'
503
+ };
504
+ /**
505
+ * @hidden
506
+ */
507
+ const SHAPE_CLASSES = {
508
+ rectangle: 'k-skeleton-rect',
509
+ circle: 'k-skeleton-circle',
510
+ text: 'k-skeleton-text'
511
+ };
512
+ /**
513
+ * @hidden
514
+ */
515
+ const skeletonShapeError = (input) => `"${input}" is not a valid kendo-skeleton shape. Valid shapes are: ${validShapes.map(s => `"${s}"`).join(" | ")}.`;
516
+ /**
517
+ * @hidden
518
+ */
519
+ const skeletonAnimationError = (input) => `"${input}" is not a valid kendo-skeleton animation. Valid values are: 'pulse' | 'wave' | false.`;
520
+
521
+ /**
522
+ * Represents the [Kendo UI Skeleton component for Angular]({% slug overview_skeleton %}).
523
+ * Displays a Skeleton that represents loading content.
524
+ */
525
+ class SkeletonComponent {
526
+ constructor(renderer, hostElement) {
527
+ this.renderer = renderer;
528
+ this.hostElement = hostElement;
529
+ this._animation = "pulse";
530
+ this._shape = 'text';
531
+ }
532
+ /**
533
+ * Specifies the animation settings of the Skeleton.
534
+ *
535
+ * The possible values are:
536
+ * * `pulse` &mdash; (Default) Shows a pulse animation effect.
537
+ * * `wave` &mdash; Shows a wave animation effect.
538
+ * * `false` &mdash; Disables the animation. Note that it's a boolean, not a string.
539
+ */
540
+ set animation(animation) {
541
+ if (isDevMode() && validAnimations.indexOf(animation) === -1) {
542
+ throw new Error(skeletonAnimationError(animation));
543
+ }
544
+ if (this.animation) {
545
+ this.renderer.removeClass(this.hostElement.nativeElement, ANIMATION_CLASSES[this.animation]);
546
+ }
547
+ if (animation) {
548
+ this.renderer.addClass(this.hostElement.nativeElement, ANIMATION_CLASSES[animation]);
549
+ }
550
+ this._animation = animation;
551
+ }
552
+ get animation() {
553
+ return this._animation;
554
+ }
555
+ /**
556
+ * Specifies the shape of the Skeleton.
557
+ *
558
+ * The possible values are:
559
+ * * `text` &mdash; (Default) Renders a line Skeleton.
560
+ * * `circle` &mdash; Renders a circular Skeleton.
561
+ * * `rectangle` &mdash; Renders a rectangular Skeleton.
562
+ */
563
+ set shape(shape) {
564
+ if (isDevMode() && validShapes.indexOf(shape) === -1) {
565
+ throw new Error(skeletonShapeError(shape));
566
+ }
567
+ this.renderer.removeClass(this.hostElement.nativeElement, SHAPE_CLASSES[this.shape]);
568
+ this.renderer.addClass(this.hostElement.nativeElement, SHAPE_CLASSES[shape]);
569
+ this._shape = shape;
570
+ }
571
+ get shape() {
572
+ return this._shape;
573
+ }
574
+ /**
575
+ * Specifies the width of the Skeleton component.
576
+ * * Required for all Skeleton shapes.
577
+ * * Can be set to a string, e.g. '100px', '3em', '50%'.
578
+ * * Can be set to an integer number (will be read as width in pixels).
579
+ */
580
+ set width(width) {
581
+ this.renderer.setStyle(this.hostElement.nativeElement, "width", typeof width === "string" ? width : width + "px");
582
+ }
583
+ /**
584
+ * Specifies the height of the Skeleton component.
585
+ * * Required for 'circle' and 'rectangle' shapes.
586
+ * * Not required for 'text', as it is derived from the current CSS font-size.
587
+ * * Can be set to a string, e.g. '100px', '3em', '50%'.
588
+ * * Can be set to an integer number (will be read as height in pixels).
589
+ */
590
+ set height(height) {
591
+ this.renderer.setStyle(this.hostElement.nativeElement, "height", typeof height === "string" ? height : height + "px");
592
+ }
593
+ ngAfterViewInit() {
594
+ const hostElement = this.hostElement.nativeElement;
595
+ hostElement.classList.add("k-skeleton", SHAPE_CLASSES[this.shape]);
596
+ if (this.animation) {
597
+ hostElement.classList.add(ANIMATION_CLASSES[this.animation]);
598
+ }
599
+ }
600
+ }
601
+ SkeletonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkeletonComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
602
+ SkeletonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: SkeletonComponent, selector: "kendo-skeleton", inputs: { animation: "animation", shape: "shape", width: "width", height: "height" }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
603
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkeletonComponent, decorators: [{
604
+ type: Component,
605
+ args: [{
606
+ selector: "kendo-skeleton",
607
+ changeDetection: ChangeDetectionStrategy.OnPush,
608
+ template: ``
609
+ }]
610
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { animation: [{
611
+ type: Input
612
+ }], shape: [{
613
+ type: Input
614
+ }], width: [{
615
+ type: Input
616
+ }], height: [{
617
+ type: Input
618
+ }] } });
619
+
620
+ /**
621
+ * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
622
+ * definition for the Skeleton component.
623
+ */
624
+ class SkeletonModule {
625
+ }
626
+ SkeletonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkeletonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
627
+ SkeletonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkeletonModule, declarations: [SkeletonComponent], imports: [CommonModule], exports: [SkeletonComponent] });
628
+ SkeletonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkeletonModule, imports: [[CommonModule]] });
629
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SkeletonModule, decorators: [{
630
+ type: NgModule,
631
+ args: [{
632
+ declarations: [SkeletonComponent],
633
+ exports: [SkeletonComponent],
634
+ imports: [CommonModule]
635
+ }]
636
+ }] });
637
+
638
+ /**
639
+ * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
640
+ * definition for the Indicators components.
641
+ *
642
+ * @example
643
+ *
644
+ * ```ts-no-run
645
+ * // Import the Indicators module
646
+ * import { IndicatorsModule } from '@progress/kendo-angular-indicators';
647
+ *
648
+ * // The browser platform with a compiler
649
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
650
+ *
651
+ * import { NgModule } from '@angular/core';
652
+ *
653
+ * // Import the app component
654
+ * import { AppComponent } from './app.component';
655
+ *
656
+ * // Define the app module
657
+ * _@NgModule({
658
+ * declarations: [AppComponent], // declare app component
659
+ * imports: [BrowserModule, IndicatorsModule], // import Indicators module
660
+ * bootstrap: [AppComponent]
661
+ * })
662
+ * export class AppModule {}
663
+ *
664
+ * // Compile and launch the module
665
+ * platformBrowserDynamic().bootstrapModule(AppModule);
666
+ *
667
+ * ```
668
+ */
669
+ class IndicatorsModule {
670
+ }
671
+ IndicatorsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IndicatorsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
672
+ IndicatorsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IndicatorsModule, exports: [BadgeModule,
673
+ LoaderModule,
674
+ SkeletonModule] });
675
+ IndicatorsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IndicatorsModule, imports: [BadgeModule,
676
+ LoaderModule,
677
+ SkeletonModule] });
678
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IndicatorsModule, decorators: [{
679
+ type: NgModule,
680
+ args: [{
681
+ exports: [
682
+ BadgeModule,
683
+ LoaderModule,
684
+ SkeletonModule
685
+ ]
686
+ }]
687
+ }] });
688
+
689
+ /**
690
+ * Generated bundle index. Do not edit.
691
+ */
692
+
693
+ export { BadgeComponent, BadgeContainerComponent, BadgeModule, IndicatorsModule, LoaderComponent, LoaderModule, SkeletonComponent, SkeletonModule };
694
+
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2022 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  export { BadgeComponent } from './badge/badge.component';