@progress/kendo-angular-inputs 8.0.0-dev.202201101634 → 8.0.0
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.
- package/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/README.md +1 -1
- package/dist/cdn/js/kendo-angular-inputs.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/colorpicker/color-gradient.component.js +3 -0
- package/dist/es/colorpicker/color-palette.component.js +6 -3
- package/dist/es/colorpicker/colorpicker.component.js +189 -49
- package/dist/es/colorpicker/flatcolorpicker.component.js +7 -4
- package/dist/es/maskedtextbox/maskedtextbox.component.js +1 -1
- package/dist/es/numerictextbox/numerictextbox.component.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/radiobutton/radiobutton.directive.js +3 -0
- package/dist/es/rangeslider/rangeslider-model.js +4 -7
- package/dist/es/rangeslider/rangeslider.component.js +1 -1
- package/dist/es/slider/slider-model.js +3 -5
- package/dist/es/slider/slider.component.js +2 -2
- package/dist/es/sliders-common/slider-model.base.js +7 -10
- package/dist/es/sliders-common/slider-ticks.component.js +3 -10
- package/dist/es/sliders-common/sliders-util.js +2 -3
- package/dist/es/switch/switch.component.js +1 -1
- package/dist/es/textarea/textarea.component.js +3 -2
- package/dist/es/textbox/textbox.component.js +1 -1
- package/dist/es2015/colorpicker/color-gradient.component.js +3 -0
- package/dist/es2015/colorpicker/color-palette.component.d.ts +1 -1
- package/dist/es2015/colorpicker/color-palette.component.js +6 -3
- package/dist/es2015/colorpicker/colorpicker.component.d.ts +19 -7
- package/dist/es2015/colorpicker/colorpicker.component.js +168 -70
- package/dist/es2015/colorpicker/flatcolorpicker.component.d.ts +2 -2
- package/dist/es2015/colorpicker/flatcolorpicker.component.js +7 -4
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/maskedtextbox/maskedtextbox.component.d.ts +1 -1
- package/dist/es2015/maskedtextbox/maskedtextbox.component.js +1 -1
- package/dist/es2015/numerictextbox/numerictextbox.component.d.ts +1 -1
- package/dist/es2015/numerictextbox/numerictextbox.component.js +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/radiobutton/radiobutton.directive.js +3 -0
- package/dist/es2015/rangeslider/rangeslider-model.js +4 -7
- package/dist/es2015/rangeslider/rangeslider.component.js +55 -54
- package/dist/es2015/slider/slider-model.d.ts +1 -1
- package/dist/es2015/slider/slider-model.js +3 -5
- package/dist/es2015/slider/slider.component.js +39 -37
- package/dist/es2015/sliders-common/slider-model.base.js +7 -10
- package/dist/es2015/sliders-common/slider-ticks.component.d.ts +0 -2
- package/dist/es2015/sliders-common/slider-ticks.component.js +6 -10
- package/dist/es2015/sliders-common/sliders-util.d.ts +2 -2
- package/dist/es2015/sliders-common/sliders-util.js +2 -3
- package/dist/es2015/switch/switch.component.d.ts +1 -1
- package/dist/es2015/switch/switch.component.js +1 -1
- package/dist/es2015/textarea/textarea.component.d.ts +1 -1
- package/dist/es2015/textarea/textarea.component.js +10 -2
- package/dist/es2015/textbox/textbox.component.d.ts +1 -1
- package/dist/es2015/textbox/textbox.component.js +1 -1
- package/dist/fesm2015/index.js +333 -243
- package/dist/fesm5/index.js +256 -138
- package/dist/npm/colorpicker/color-gradient.component.js +3 -0
- package/dist/npm/colorpicker/color-palette.component.js +6 -3
- package/dist/npm/colorpicker/colorpicker.component.js +188 -48
- package/dist/npm/colorpicker/flatcolorpicker.component.js +7 -4
- package/dist/npm/maskedtextbox/maskedtextbox.component.js +1 -1
- package/dist/npm/numerictextbox/numerictextbox.component.js +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/radiobutton/radiobutton.directive.js +3 -0
- package/dist/npm/rangeslider/rangeslider-model.js +4 -7
- package/dist/npm/rangeslider/rangeslider.component.js +1 -1
- package/dist/npm/slider/slider-model.js +3 -5
- package/dist/npm/slider/slider.component.js +2 -2
- package/dist/npm/sliders-common/slider-model.base.js +6 -9
- package/dist/npm/sliders-common/slider-ticks.component.js +2 -9
- package/dist/npm/sliders-common/sliders-util.js +2 -3
- package/dist/npm/switch/switch.component.js +1 -1
- package/dist/npm/textarea/textarea.component.js +3 -2
- package/dist/npm/textbox/textbox.component.js +1 -1
- package/dist/systemjs/kendo-angular-inputs.js +1 -1
- package/package.json +5 -5
package/dist/fesm2015/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { NgControl, NG_VALUE_ACCESSOR, NG_VALIDATORS, RadioControlValueAccessor
|
|
|
8
8
|
import { Subscription, fromEvent, interval, merge, BehaviorSubject, Subject } from 'rxjs';
|
|
9
9
|
import { take, filter, concatMap, startWith, takeUntil, skip, debounceTime, throttleTime } from 'rxjs/operators';
|
|
10
10
|
import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages, MessageService } from '@progress/kendo-angular-l10n';
|
|
11
|
-
import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, isChanged, DraggableModule, EventsModule, ResizeSensorModule, PreventableEvent } from '@progress/kendo-angular-common';
|
|
11
|
+
import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, isChanged, DraggableModule, EventsModule, ResizeSensorModule, PreventableEvent, closest } from '@progress/kendo-angular-common';
|
|
12
12
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
13
13
|
import { browser, mobileOS, detectDesktopBrowser, detectMobileOS } from '@progress/kendo-common';
|
|
14
14
|
import { IntlService } from '@progress/kendo-angular-intl';
|
|
@@ -150,15 +150,6 @@ const remainder = (dividend, divisor) => {
|
|
|
150
150
|
* @hidden
|
|
151
151
|
*/
|
|
152
152
|
const calculateFixedTrackSize = ({ max, min, smallStep, fixedTickWidth }) => ((max - min) / smallStep) * fixedTickWidth;
|
|
153
|
-
/**
|
|
154
|
-
* @hidden
|
|
155
|
-
*/
|
|
156
|
-
const calculateTrackSize = (wrapperWidth, offset, showButtons = true) => {
|
|
157
|
-
const BUTTONS_COUNT = 2;
|
|
158
|
-
const trackOffset = showButtons ? parseFloat(offset) * BUTTONS_COUNT : 0;
|
|
159
|
-
const trackWidth = wrapperWidth - trackOffset;
|
|
160
|
-
return Math.floor(trackWidth);
|
|
161
|
-
};
|
|
162
153
|
/**
|
|
163
154
|
* @hidden
|
|
164
155
|
*/
|
|
@@ -181,14 +172,13 @@ const calculateValueFromTick = (index, { max, min, smallStep, reverse, vertical
|
|
|
181
172
|
/**
|
|
182
173
|
* @hidden
|
|
183
174
|
*/
|
|
184
|
-
const calculateHandlePosition = ({
|
|
185
|
-
const halfHandleWidth = Math.floor(handleWidth / 2);
|
|
175
|
+
const calculateHandlePosition = ({ trackWidth, min, max, reverse, value }) => {
|
|
186
176
|
const step = trackWidth / Math.abs(max - min);
|
|
187
177
|
let pos = isPresent(value) ? step * (value - min) : min;
|
|
188
178
|
if (reverse) {
|
|
189
179
|
pos = trackWidth - pos;
|
|
190
180
|
}
|
|
191
|
-
return Math.floor(pos
|
|
181
|
+
return Math.floor(pos);
|
|
192
182
|
};
|
|
193
183
|
/**
|
|
194
184
|
* @hidden
|
|
@@ -351,8 +341,10 @@ class SliderModelBase {
|
|
|
351
341
|
}
|
|
352
342
|
resizeTrack() {
|
|
353
343
|
const orientation = this.props.vertical ? 'height' : 'width';
|
|
344
|
+
const altOrientation = this.props.vertical ? 'width' : 'height';
|
|
354
345
|
const trackWidth = this.trackWidth();
|
|
355
|
-
this.track.style[orientation] = `${trackWidth}px`;
|
|
346
|
+
this.track.parentElement.style[orientation] = `${trackWidth}px`;
|
|
347
|
+
this.track.parentElement.style[altOrientation] = '';
|
|
356
348
|
}
|
|
357
349
|
resizeTicks(ticksContainer, ticks) {
|
|
358
350
|
const dimension = this.props.vertical ? "height" : "width";
|
|
@@ -363,22 +355,17 @@ class SliderModelBase {
|
|
|
363
355
|
}
|
|
364
356
|
resizeWrapper() {
|
|
365
357
|
const dimension = this.props.vertical ? "height" : "width";
|
|
366
|
-
const wrapperSize = this.elementSize(this.wrapper);
|
|
367
|
-
const trackWidth = calculateTrackSize(wrapperSize, this.elementOffset(this.track));
|
|
368
358
|
const fixedTrackWidth = calculateFixedTrackSize(this.props);
|
|
369
359
|
const wrapperParentEl = this.wrapper.parentElement;
|
|
370
|
-
if (
|
|
371
|
-
wrapperParentEl.style[dimension] =
|
|
372
|
-
}
|
|
373
|
-
else {
|
|
374
|
-
wrapperParentEl.style[dimension] = `${wrapperSize + (fixedTrackWidth - trackWidth)}px`;
|
|
360
|
+
if (fixedTrackWidth) {
|
|
361
|
+
wrapperParentEl.style[dimension] = "auto";
|
|
375
362
|
}
|
|
376
363
|
}
|
|
377
364
|
trackWidth() {
|
|
378
365
|
if (this.props.fixedTickWidth) {
|
|
379
366
|
return calculateFixedTrackSize(this.props);
|
|
380
367
|
}
|
|
381
|
-
return
|
|
368
|
+
return this.elementSize(this.track.parentElement);
|
|
382
369
|
}
|
|
383
370
|
getTickSizes() {
|
|
384
371
|
const { min, max, smallStep } = this.props;
|
|
@@ -440,16 +427,14 @@ class SliderModel extends SliderModelBase {
|
|
|
440
427
|
max,
|
|
441
428
|
reverse,
|
|
442
429
|
value,
|
|
443
|
-
trackWidth
|
|
444
|
-
handleWidth: dragHandle.offsetWidth
|
|
430
|
+
trackWidth
|
|
445
431
|
});
|
|
446
432
|
this.renderer.setStyle(dragHandle, position, `${this.handlePosition}px`);
|
|
447
433
|
}
|
|
448
|
-
positionSelection(
|
|
434
|
+
positionSelection(selection) {
|
|
449
435
|
const { reverse, vertical } = this.props;
|
|
450
436
|
const dimension = vertical ? 'height' : 'width';
|
|
451
|
-
|
|
452
|
-
let size = this.handlePosition + handleWidth;
|
|
437
|
+
let size = this.handlePosition;
|
|
453
438
|
if (reverse) {
|
|
454
439
|
size = this.trackWidth() - size;
|
|
455
440
|
}
|
|
@@ -482,7 +467,7 @@ const containsFocus = (hostElement, contender) => hostElement && contender && (h
|
|
|
482
467
|
/**
|
|
483
468
|
* @hidden
|
|
484
469
|
*/
|
|
485
|
-
const closest = (node, predicate) => {
|
|
470
|
+
const closest$1 = (node, predicate) => {
|
|
486
471
|
while (node && !predicate(node)) {
|
|
487
472
|
node = node.parentNode;
|
|
488
473
|
}
|
|
@@ -496,7 +481,7 @@ const packageMetadata = {
|
|
|
496
481
|
name: '@progress/kendo-angular-inputs',
|
|
497
482
|
productName: 'Kendo UI for Angular',
|
|
498
483
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
499
|
-
publishDate:
|
|
484
|
+
publishDate: 1642572427,
|
|
500
485
|
version: '',
|
|
501
486
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
502
487
|
};
|
|
@@ -1068,7 +1053,7 @@ let SliderComponent = SliderComponent_1 = class SliderComponent extends SliderBa
|
|
|
1068
1053
|
model.resizeTicks(this.ticksContainer.nativeElement, this.ticks.tickElements.map(element => element.nativeElement));
|
|
1069
1054
|
}
|
|
1070
1055
|
model.positionHandle(dragHandleEl);
|
|
1071
|
-
model.positionSelection(
|
|
1056
|
+
model.positionSelection(selectionEl);
|
|
1072
1057
|
if (!animate) {
|
|
1073
1058
|
this.hostElement.nativeElement.getBoundingClientRect();
|
|
1074
1059
|
this.renderer.addClass(this.hostElement.nativeElement, 'k-slider-transitions');
|
|
@@ -1256,6 +1241,44 @@ SliderComponent = SliderComponent_1 = __decorate([
|
|
|
1256
1241
|
[class.k-i-arrow-s]="vertical">
|
|
1257
1242
|
</span>
|
|
1258
1243
|
</button>
|
|
1244
|
+
<div class="k-slider-track-wrap">
|
|
1245
|
+
<ul kendoSliderTicks
|
|
1246
|
+
#ticks
|
|
1247
|
+
*ngIf="tickPlacement !== 'none'"
|
|
1248
|
+
[tickTitle]="title"
|
|
1249
|
+
[vertical]="vertical"
|
|
1250
|
+
[step]="smallStep"
|
|
1251
|
+
[largeStep]="largeStep"
|
|
1252
|
+
[min]="min"
|
|
1253
|
+
[max]="max"
|
|
1254
|
+
[labelTemplate]="labelTemplate?.templateRef"
|
|
1255
|
+
[attr.aria-hidden]="true"
|
|
1256
|
+
>
|
|
1257
|
+
</ul>
|
|
1258
|
+
<div #track class="k-slider-track">
|
|
1259
|
+
<div #sliderSelection class="k-slider-selection">
|
|
1260
|
+
</div>
|
|
1261
|
+
<a #draghandle
|
|
1262
|
+
role="slider"
|
|
1263
|
+
[attr.aria-valuemin]="min"
|
|
1264
|
+
[attr.aria-valuemax]="max"
|
|
1265
|
+
[attr.aria-valuenow]="currentValue"
|
|
1266
|
+
[attr.aria-valuetext]="currentValue"
|
|
1267
|
+
[attr.aria-disabled]="disabled ? true : undefined"
|
|
1268
|
+
[attr.aria-readonly]="readonly ? true : undefined"
|
|
1269
|
+
[attr.aria-orientation]="vertical ? 'vertical' : 'horizontal'"
|
|
1270
|
+
[style.touch-action]="isDisabled ? '' : 'none'"
|
|
1271
|
+
class="k-draghandle"
|
|
1272
|
+
[title]="dragHandleMessage"
|
|
1273
|
+
[attr.tabindex]="disabled ? '-1' : tabIndex"
|
|
1274
|
+
[id]="focusableId"
|
|
1275
|
+
kendoDraggable
|
|
1276
|
+
(kendoPress)="ifEnabled(handleDragPress, $event)"
|
|
1277
|
+
(kendoDrag)="ifEnabled(onHandleDrag, $event)"
|
|
1278
|
+
(kendoRelease)="ifEnabled(onHandleRelease, $event)"
|
|
1279
|
+
></a>
|
|
1280
|
+
</div>
|
|
1281
|
+
</div>
|
|
1259
1282
|
<button *ngIf="showButtons" type="button" #increaseButton
|
|
1260
1283
|
class="k-button-increase k-button k-button-md k-rounded-full k-button-rectangle k-button-solid k-button-solid-base k-icon-button"
|
|
1261
1284
|
[title]="incrementMessage"
|
|
@@ -1268,42 +1291,6 @@ SliderComponent = SliderComponent_1 = __decorate([
|
|
|
1268
1291
|
[class.k-i-arrow-n]="vertical">
|
|
1269
1292
|
</span>
|
|
1270
1293
|
</button>
|
|
1271
|
-
<ul kendoSliderTicks
|
|
1272
|
-
#ticks
|
|
1273
|
-
*ngIf="tickPlacement !== 'none'"
|
|
1274
|
-
[tickTitle]="title"
|
|
1275
|
-
[vertical]="vertical"
|
|
1276
|
-
[step]="smallStep"
|
|
1277
|
-
[largeStep]="largeStep"
|
|
1278
|
-
[min]="min"
|
|
1279
|
-
[max]="max"
|
|
1280
|
-
[labelTemplate]="labelTemplate?.templateRef"
|
|
1281
|
-
[attr.aria-hidden]="true"
|
|
1282
|
-
>
|
|
1283
|
-
</ul>
|
|
1284
|
-
<div #track class="k-slider-track">
|
|
1285
|
-
<div #sliderSelection class="k-slider-selection">
|
|
1286
|
-
</div>
|
|
1287
|
-
<a #draghandle
|
|
1288
|
-
role="slider"
|
|
1289
|
-
[attr.aria-valuemin]="min"
|
|
1290
|
-
[attr.aria-valuemax]="max"
|
|
1291
|
-
[attr.aria-valuenow]="currentValue"
|
|
1292
|
-
[attr.aria-valuetext]="currentValue"
|
|
1293
|
-
[attr.aria-disabled]="disabled ? true : undefined"
|
|
1294
|
-
[attr.aria-readonly]="readonly ? true : undefined"
|
|
1295
|
-
[attr.aria-orientation]="vertical ? 'vertical' : 'horizontal'"
|
|
1296
|
-
[style.touch-action]="isDisabled ? '' : 'none'"
|
|
1297
|
-
class="k-draghandle"
|
|
1298
|
-
[title]="dragHandleMessage"
|
|
1299
|
-
[attr.tabindex]="disabled ? '-1' : tabIndex"
|
|
1300
|
-
[id]="focusableId"
|
|
1301
|
-
kendoDraggable
|
|
1302
|
-
(kendoPress)="ifEnabled(handleDragPress, $event)"
|
|
1303
|
-
(kendoDrag)="ifEnabled(onHandleDrag, $event)"
|
|
1304
|
-
(kendoRelease)="ifEnabled(onHandleRelease, $event)"
|
|
1305
|
-
></a>
|
|
1306
|
-
</div>
|
|
1307
1294
|
<kendo-resize-sensor (resize)="sizeComponent(false)"></kendo-resize-sensor>
|
|
1308
1295
|
</div>
|
|
1309
1296
|
`
|
|
@@ -1335,8 +1322,7 @@ class RangeSliderModel extends SliderModelBase {
|
|
|
1335
1322
|
max,
|
|
1336
1323
|
reverse,
|
|
1337
1324
|
value,
|
|
1338
|
-
trackWidth
|
|
1339
|
-
handleWidth: dragHandle.offsetWidth
|
|
1325
|
+
trackWidth
|
|
1340
1326
|
});
|
|
1341
1327
|
this.renderer.setStyle(dragHandle, position, `${this.startHandlePosition}px`);
|
|
1342
1328
|
}
|
|
@@ -1346,8 +1332,7 @@ class RangeSliderModel extends SliderModelBase {
|
|
|
1346
1332
|
max,
|
|
1347
1333
|
reverse,
|
|
1348
1334
|
value,
|
|
1349
|
-
trackWidth
|
|
1350
|
-
handleWidth: dragHandle.offsetWidth
|
|
1335
|
+
trackWidth
|
|
1351
1336
|
});
|
|
1352
1337
|
this.renderer.setStyle(dragHandle, position, `${this.endHandlePosition}px`);
|
|
1353
1338
|
}
|
|
@@ -1356,12 +1341,11 @@ class RangeSliderModel extends SliderModelBase {
|
|
|
1356
1341
|
const { reverse, vertical } = this.props;
|
|
1357
1342
|
const dimension = vertical ? 'height' : 'width';
|
|
1358
1343
|
const position = vertical ? 'bottom' : reverse ? 'right' : 'left';
|
|
1359
|
-
const handleWidth = Math.floor(dragHandle.offsetWidth / 2);
|
|
1360
1344
|
const size = Math.abs(this.endHandlePosition - this.startHandlePosition);
|
|
1361
1345
|
const currentSelectionPosition = vertical ? dragHandle.style.bottom : dragHandle.style.left;
|
|
1362
1346
|
this.renderer.setStyle(selection, dimension, `${size}px`);
|
|
1363
|
-
this.renderer.setStyle(selection, position, reverse ? this.trackWidth() - parseFloat(currentSelectionPosition)
|
|
1364
|
-
: parseFloat(currentSelectionPosition) +
|
|
1347
|
+
this.renderer.setStyle(selection, position, reverse ? this.trackWidth() - parseFloat(currentSelectionPosition) + 'px'
|
|
1348
|
+
: parseFloat(currentSelectionPosition) + 'px');
|
|
1365
1349
|
}
|
|
1366
1350
|
}
|
|
1367
1351
|
|
|
@@ -1794,62 +1778,63 @@ RangeSliderComponent = RangeSliderComponent_1 = __decorate([
|
|
|
1794
1778
|
[class.k-slider-bottomright]="tickPlacement === 'after'"
|
|
1795
1779
|
[kendoEventsOutsideAngular]="{ click: onWrapClick, keydown: onKeyDown }"
|
|
1796
1780
|
>
|
|
1797
|
-
<
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
<div #
|
|
1781
|
+
<div class="k-slider-track-wrap">
|
|
1782
|
+
<ul kendoSliderTicks
|
|
1783
|
+
#ticks
|
|
1784
|
+
*ngIf="tickPlacement !== 'none'"
|
|
1785
|
+
[tickTitle]="title"
|
|
1786
|
+
[vertical]="vertical"
|
|
1787
|
+
[step]="smallStep"
|
|
1788
|
+
[largeStep]="largeStep"
|
|
1789
|
+
[min]="min"
|
|
1790
|
+
[max]="max"
|
|
1791
|
+
[labelTemplate]="labelTemplate?.templateRef"
|
|
1792
|
+
[attr.aria-hidden]="true"
|
|
1793
|
+
>
|
|
1794
|
+
</ul>
|
|
1795
|
+
<div #track class="k-slider-track">
|
|
1796
|
+
<div #sliderSelection class="k-slider-selection">
|
|
1797
|
+
</div>
|
|
1798
|
+
<a #draghandleStart
|
|
1799
|
+
role="slider"
|
|
1800
|
+
[id]="startHandleId"
|
|
1801
|
+
[attr.tabindex]="disabled ? undefined : tabindex"
|
|
1802
|
+
[attr.aria-valuemin]="min"
|
|
1803
|
+
[attr.aria-valuemax]="max"
|
|
1804
|
+
[attr.aria-valuenow]="value ? value[0] : null"
|
|
1805
|
+
[attr.aria-valuetext]="valueText"
|
|
1806
|
+
[attr.aria-disabled]="disabled ? true : undefined"
|
|
1807
|
+
[attr.aria-readonly]="readonly ? true : undefined"
|
|
1808
|
+
[attr.aria-orientation]="vertical ? 'vertical' : 'horizontal'"
|
|
1809
|
+
[style.touch-action]="isDisabled ? '' : 'none'"
|
|
1810
|
+
class="k-draghandle"
|
|
1811
|
+
[title]="textFor('dragHandleStart')"
|
|
1812
|
+
kendoDraggable
|
|
1813
|
+
(kendoPress)="ifEnabled(handleDragPress ,$event)"
|
|
1814
|
+
(kendoDrag)="ifEnabled(onHandleDrag ,$event)"
|
|
1815
|
+
(kendoRelease)="ifEnabled(onHandleRelease, $event)"
|
|
1816
|
+
></a>
|
|
1817
|
+
<a #draghandleEnd
|
|
1818
|
+
role="slider"
|
|
1819
|
+
[id]="endHandleId"
|
|
1820
|
+
[attr.tabindex]="disabled ? undefined : tabindex"
|
|
1821
|
+
[attr.aria-valuemin]="min"
|
|
1822
|
+
[attr.aria-valuemax]="max"
|
|
1823
|
+
[attr.aria-valuenow]="value ? value[1] : null"
|
|
1824
|
+
[attr.aria-valuetext]="valueText"
|
|
1825
|
+
[attr.aria-disabled]="disabled ? true : undefined"
|
|
1826
|
+
[attr.aria-readonly]="readonly ? true : undefined"
|
|
1827
|
+
[attr.aria-orientation]="vertical ? 'vertical' : 'horizontal'"
|
|
1828
|
+
[style.touch-action]="isDisabled ? '' : 'none'"
|
|
1829
|
+
class="k-draghandle"
|
|
1830
|
+
[title]="textFor('dragHandleEnd')"
|
|
1831
|
+
kendoDraggable
|
|
1832
|
+
(kendoPress)="ifEnabled(handleDragPress ,$event)"
|
|
1833
|
+
(kendoDrag)="ifEnabled(onHandleDrag ,$event)"
|
|
1834
|
+
(kendoRelease)="ifEnabled(onHandleRelease, $event)"
|
|
1835
|
+
></a>
|
|
1812
1836
|
</div>
|
|
1813
|
-
<a #draghandleStart
|
|
1814
|
-
role="slider"
|
|
1815
|
-
[id]="startHandleId"
|
|
1816
|
-
[attr.tabindex]="disabled ? undefined : tabindex"
|
|
1817
|
-
[attr.aria-valuemin]="min"
|
|
1818
|
-
[attr.aria-valuemax]="max"
|
|
1819
|
-
[attr.aria-valuenow]="value ? value[0] : null"
|
|
1820
|
-
[attr.aria-valuetext]="valueText"
|
|
1821
|
-
[attr.aria-disabled]="disabled ? true : undefined"
|
|
1822
|
-
[attr.aria-readonly]="readonly ? true : undefined"
|
|
1823
|
-
[attr.aria-orientation]="vertical ? 'vertical' : 'horizontal'"
|
|
1824
|
-
[style.touch-action]="isDisabled ? '' : 'none'"
|
|
1825
|
-
class="k-draghandle"
|
|
1826
|
-
[title]="textFor('dragHandleStart')"
|
|
1827
|
-
kendoDraggable
|
|
1828
|
-
(kendoPress)="ifEnabled(handleDragPress ,$event)"
|
|
1829
|
-
(kendoDrag)="ifEnabled(onHandleDrag ,$event)"
|
|
1830
|
-
(kendoRelease)="ifEnabled(onHandleRelease, $event)"
|
|
1831
|
-
></a>
|
|
1832
|
-
<a #draghandleEnd
|
|
1833
|
-
role="slider"
|
|
1834
|
-
[id]="endHandleId"
|
|
1835
|
-
[attr.tabindex]="disabled ? undefined : tabindex"
|
|
1836
|
-
[attr.aria-valuemin]="min"
|
|
1837
|
-
[attr.aria-valuemax]="max"
|
|
1838
|
-
[attr.aria-valuenow]="value ? value[1] : null"
|
|
1839
|
-
[attr.aria-valuetext]="valueText"
|
|
1840
|
-
[attr.aria-disabled]="disabled ? true : undefined"
|
|
1841
|
-
[attr.aria-readonly]="readonly ? true : undefined"
|
|
1842
|
-
[attr.aria-orientation]="vertical ? 'vertical' : 'horizontal'"
|
|
1843
|
-
[style.touch-action]="isDisabled ? '' : 'none'"
|
|
1844
|
-
class="k-draghandle"
|
|
1845
|
-
[title]="textFor('dragHandleEnd')"
|
|
1846
|
-
kendoDraggable
|
|
1847
|
-
(kendoPress)="ifEnabled(handleDragPress ,$event)"
|
|
1848
|
-
(kendoDrag)="ifEnabled(onHandleDrag ,$event)"
|
|
1849
|
-
(kendoRelease)="ifEnabled(onHandleRelease, $event)"
|
|
1850
|
-
></a>
|
|
1851
1837
|
</div>
|
|
1852
|
-
|
|
1853
1838
|
<kendo-resize-sensor (resize)="sizeComponent()"></kendo-resize-sensor>
|
|
1854
1839
|
</div>
|
|
1855
1840
|
`
|
|
@@ -1962,7 +1947,7 @@ let SwitchComponent = SwitchComponent_1 = class SwitchComponent {
|
|
|
1962
1947
|
return this._checked;
|
|
1963
1948
|
}
|
|
1964
1949
|
/**
|
|
1965
|
-
* Specifies the
|
|
1950
|
+
* Specifies the width and height of the Switch.
|
|
1966
1951
|
*
|
|
1967
1952
|
* The possible values are:
|
|
1968
1953
|
* * `'small'`
|
|
@@ -3193,7 +3178,7 @@ let NumericTextBoxComponent = NumericTextBoxComponent_1 = class NumericTextBoxCo
|
|
|
3193
3178
|
return this.tabindex;
|
|
3194
3179
|
}
|
|
3195
3180
|
/**
|
|
3196
|
-
* The size property specifies
|
|
3181
|
+
* The size property specifies padding of the NumericTextBox internal input element
|
|
3197
3182
|
* ([see example]({% slug appearance_numerictextbox %}#toc-size)).
|
|
3198
3183
|
* The possible values are:
|
|
3199
3184
|
* * `'small'`
|
|
@@ -4575,7 +4560,7 @@ let MaskedTextBoxComponent = MaskedTextBoxComponent_1 = class MaskedTextBoxCompo
|
|
|
4575
4560
|
this.updateService();
|
|
4576
4561
|
}
|
|
4577
4562
|
/**
|
|
4578
|
-
* The size property specifies the
|
|
4563
|
+
* The size property specifies the padding of the MaskedTextBox internal input element
|
|
4579
4564
|
* ([see example]({% slug appearance_maskedtextbox %}#toc-size)).
|
|
4580
4565
|
* The possible values are:
|
|
4581
4566
|
* * `'small'`
|
|
@@ -5090,8 +5075,10 @@ class SliderTick {
|
|
|
5090
5075
|
* @hidden
|
|
5091
5076
|
*/
|
|
5092
5077
|
let SliderTicksComponent = class SliderTicksComponent {
|
|
5093
|
-
|
|
5094
|
-
|
|
5078
|
+
/**
|
|
5079
|
+
* @hidden
|
|
5080
|
+
*/
|
|
5081
|
+
constructor() {
|
|
5095
5082
|
this.wrapperClasses = 'k-reset k-slider-items';
|
|
5096
5083
|
this.ticks = [];
|
|
5097
5084
|
}
|
|
@@ -5114,9 +5101,6 @@ let SliderTicksComponent = class SliderTicksComponent {
|
|
|
5114
5101
|
result[i].classes['k-tick-large'] = true;
|
|
5115
5102
|
}
|
|
5116
5103
|
}
|
|
5117
|
-
if (this.rtl || this.vertical) {
|
|
5118
|
-
result = result.reverse();
|
|
5119
|
-
}
|
|
5120
5104
|
if (result.length > 0) {
|
|
5121
5105
|
Object.assign(result[0].classes, this.endTickClasses(true));
|
|
5122
5106
|
Object.assign(result[result.length - 1].classes, this.endTickClasses(false));
|
|
@@ -5188,9 +5172,7 @@ SliderTicksComponent = __decorate([
|
|
|
5188
5172
|
{{ tickTitle(value) }}
|
|
5189
5173
|
</ng-template>
|
|
5190
5174
|
`
|
|
5191
|
-
})
|
|
5192
|
-
__param(0, Optional()), __param(0, Inject(RTL)),
|
|
5193
|
-
__metadata("design:paramtypes", [Boolean])
|
|
5175
|
+
})
|
|
5194
5176
|
], SliderTicksComponent);
|
|
5195
5177
|
|
|
5196
5178
|
/**
|
|
@@ -5948,7 +5930,7 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
5948
5930
|
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
5949
5931
|
}
|
|
5950
5932
|
/**
|
|
5951
|
-
* The size property specifies the
|
|
5933
|
+
* The size property specifies the padding of the TextBox internal input element
|
|
5952
5934
|
* ([see example]({% slug appearance_textbox %}#toc-size)).
|
|
5953
5935
|
*
|
|
5954
5936
|
* The possible values are:
|
|
@@ -6037,7 +6019,7 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
|
|
|
6037
6019
|
return;
|
|
6038
6020
|
}
|
|
6039
6021
|
if (tabbing) {
|
|
6040
|
-
const closestTextbox = closest(args.relatedTarget, (element) => element === this.hostElement.nativeElement);
|
|
6022
|
+
const closestTextbox = closest$1(args.relatedTarget, (element) => element === this.hostElement.nativeElement);
|
|
6041
6023
|
if (!closestTextbox) {
|
|
6042
6024
|
this.handleBlur();
|
|
6043
6025
|
}
|
|
@@ -6962,7 +6944,7 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent extends Te
|
|
|
6962
6944
|
return this.tabindex;
|
|
6963
6945
|
}
|
|
6964
6946
|
/**
|
|
6965
|
-
* The size property specifies the
|
|
6947
|
+
* The size property specifies the padding of the internal textarea element
|
|
6966
6948
|
* ([see example]({% slug appearance_textarea %}#toc-size)).
|
|
6967
6949
|
*
|
|
6968
6950
|
* The possible values are:
|
|
@@ -7031,7 +7013,7 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent extends Te
|
|
|
7031
7013
|
return;
|
|
7032
7014
|
}
|
|
7033
7015
|
if (tabbing) {
|
|
7034
|
-
const closestTextbox = closest(args.relatedTarget, (element) => element === this.hostElement.nativeElement);
|
|
7016
|
+
const closestTextbox = closest$1(args.relatedTarget, (element) => element === this.hostElement.nativeElement);
|
|
7035
7017
|
if (!closestTextbox) {
|
|
7036
7018
|
this.handleBlur();
|
|
7037
7019
|
}
|
|
@@ -7347,7 +7329,15 @@ TextAreaComponent = TextAreaComponent_1 = __decorate([
|
|
|
7347
7329
|
input: handleInput}">
|
|
7348
7330
|
</textarea>
|
|
7349
7331
|
<ng-content select="kendo-textarea-suffix"></ng-content>
|
|
7350
|
-
|
|
7332
|
+
`,
|
|
7333
|
+
styles: [`
|
|
7334
|
+
:host(.k-flex-col) {
|
|
7335
|
+
flex-direction: column !important;
|
|
7336
|
+
}
|
|
7337
|
+
:host(.k-flex-row) {
|
|
7338
|
+
flex-direction: row !important;
|
|
7339
|
+
}
|
|
7340
|
+
`]
|
|
7351
7341
|
}),
|
|
7352
7342
|
__metadata("design:paramtypes", [LocalizationService,
|
|
7353
7343
|
NgZone,
|
|
@@ -8282,6 +8272,7 @@ let ColorGradientComponent = ColorGradientComponent_1 = class ColorGradientCompo
|
|
|
8282
8272
|
this.updateValues = new Subject();
|
|
8283
8273
|
this.notifyNgChanged = () => { };
|
|
8284
8274
|
this.notifyNgTouched = () => { };
|
|
8275
|
+
validatePackage(packageMetadata);
|
|
8285
8276
|
this.dynamicRTLSubscription = localizationService.changes.subscribe(({ rtl }) => {
|
|
8286
8277
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
8287
8278
|
});
|
|
@@ -8919,6 +8910,29 @@ ColorGradientComponent = ColorGradientComponent_1 = __decorate([
|
|
|
8919
8910
|
LocalizationService])
|
|
8920
8911
|
], ColorGradientComponent);
|
|
8921
8912
|
|
|
8913
|
+
/**
|
|
8914
|
+
* @hidden
|
|
8915
|
+
*/
|
|
8916
|
+
let ColorPaletteLocalizationService = class ColorPaletteLocalizationService extends LocalizationService {
|
|
8917
|
+
constructor(prefix, messageService, _rtl, flatColorPickerLocalization) {
|
|
8918
|
+
super(prefix, messageService, _rtl);
|
|
8919
|
+
this.flatColorPickerLocalization = flatColorPickerLocalization;
|
|
8920
|
+
}
|
|
8921
|
+
get(shortKey) {
|
|
8922
|
+
if (this.flatColorPickerLocalization) {
|
|
8923
|
+
return this.flatColorPickerLocalization.get(shortKey);
|
|
8924
|
+
}
|
|
8925
|
+
return super.get(shortKey);
|
|
8926
|
+
}
|
|
8927
|
+
};
|
|
8928
|
+
ColorPaletteLocalizationService = __decorate([
|
|
8929
|
+
__param(0, Inject(L10N_PREFIX)),
|
|
8930
|
+
__param(1, Optional()),
|
|
8931
|
+
__param(2, Optional()), __param(2, Inject(RTL)),
|
|
8932
|
+
__param(3, Optional()), __param(3, Inject(FlatColorPickerLocalizationService)),
|
|
8933
|
+
__metadata("design:paramtypes", [String, MessageService, Boolean, FlatColorPickerLocalizationService])
|
|
8934
|
+
], ColorPaletteLocalizationService);
|
|
8935
|
+
|
|
8922
8936
|
/**
|
|
8923
8937
|
* @hidden
|
|
8924
8938
|
*/
|
|
@@ -8981,29 +8995,6 @@ ColorPaletteService = __decorate([
|
|
|
8981
8995
|
Injectable()
|
|
8982
8996
|
], ColorPaletteService);
|
|
8983
8997
|
|
|
8984
|
-
/**
|
|
8985
|
-
* @hidden
|
|
8986
|
-
*/
|
|
8987
|
-
let ColorPaletteLocalizationService = class ColorPaletteLocalizationService extends LocalizationService {
|
|
8988
|
-
constructor(prefix, messageService, _rtl, flatColorPickerLocalization) {
|
|
8989
|
-
super(prefix, messageService, _rtl);
|
|
8990
|
-
this.flatColorPickerLocalization = flatColorPickerLocalization;
|
|
8991
|
-
}
|
|
8992
|
-
get(shortKey) {
|
|
8993
|
-
if (this.flatColorPickerLocalization) {
|
|
8994
|
-
return this.flatColorPickerLocalization.get(shortKey);
|
|
8995
|
-
}
|
|
8996
|
-
return super.get(shortKey);
|
|
8997
|
-
}
|
|
8998
|
-
};
|
|
8999
|
-
ColorPaletteLocalizationService = __decorate([
|
|
9000
|
-
__param(0, Inject(L10N_PREFIX)),
|
|
9001
|
-
__param(1, Optional()),
|
|
9002
|
-
__param(2, Optional()), __param(2, Inject(RTL)),
|
|
9003
|
-
__param(3, Optional()), __param(3, Inject(FlatColorPickerLocalizationService)),
|
|
9004
|
-
__metadata("design:paramtypes", [String, MessageService, Boolean, FlatColorPickerLocalizationService])
|
|
9005
|
-
], ColorPaletteLocalizationService);
|
|
9006
|
-
|
|
9007
8998
|
var ColorPaletteComponent_1;
|
|
9008
8999
|
const DEFAULT_TILE_SIZE = 24;
|
|
9009
9000
|
const DEFAULT_COLUMNS_COUNT = 10;
|
|
@@ -9077,6 +9068,7 @@ let ColorPaletteComponent = ColorPaletteComponent_1 = class ColorPaletteComponen
|
|
|
9077
9068
|
this._tabindex = 0;
|
|
9078
9069
|
this.notifyNgTouched = () => { };
|
|
9079
9070
|
this.notifyNgChanged = () => { };
|
|
9071
|
+
validatePackage(packageMetadata);
|
|
9080
9072
|
this.dynamicRTLSubscription = localizationService.changes.subscribe(({ rtl }) => {
|
|
9081
9073
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
9082
9074
|
});
|
|
@@ -9669,9 +9661,9 @@ var FlatColorPickerComponent_1;
|
|
|
9669
9661
|
* through a gradient that renders an hsv canvas. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
|
|
9670
9662
|
*/
|
|
9671
9663
|
let FlatColorPickerComponent = FlatColorPickerComponent_1 = class FlatColorPickerComponent {
|
|
9672
|
-
constructor(
|
|
9673
|
-
this.service = service;
|
|
9664
|
+
constructor(host, service, localizationService, cdr, renderer, ngZone) {
|
|
9674
9665
|
this.host = host;
|
|
9666
|
+
this.service = service;
|
|
9675
9667
|
this.localizationService = localizationService;
|
|
9676
9668
|
this.cdr = cdr;
|
|
9677
9669
|
this.renderer = renderer;
|
|
@@ -9754,6 +9746,7 @@ let FlatColorPickerComponent = FlatColorPickerComponent_1 = class FlatColorPicke
|
|
|
9754
9746
|
this.subscriptions = new Subscription();
|
|
9755
9747
|
this.notifyNgChanged = () => { };
|
|
9756
9748
|
this.notifyNgTouched = () => { };
|
|
9749
|
+
validatePackage(packageMetadata);
|
|
9757
9750
|
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
9758
9751
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
9759
9752
|
});
|
|
@@ -10227,8 +10220,8 @@ FlatColorPickerComponent = FlatColorPickerComponent_1 = __decorate([
|
|
|
10227
10220
|
</div>
|
|
10228
10221
|
`
|
|
10229
10222
|
}),
|
|
10230
|
-
__metadata("design:paramtypes", [
|
|
10231
|
-
|
|
10223
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
10224
|
+
FlatColorPickerService,
|
|
10232
10225
|
LocalizationService,
|
|
10233
10226
|
ChangeDetectorRef,
|
|
10234
10227
|
Renderer2,
|
|
@@ -10236,7 +10229,7 @@ FlatColorPickerComponent = FlatColorPickerComponent_1 = __decorate([
|
|
|
10236
10229
|
], FlatColorPickerComponent);
|
|
10237
10230
|
|
|
10238
10231
|
var ColorPickerComponent_1;
|
|
10239
|
-
|
|
10232
|
+
const DOM_FOCUS_EVENTS = ['focus', 'blur'];
|
|
10240
10233
|
/**
|
|
10241
10234
|
* Represents the [Kendo UI ColorPicker component for Angular]({% slug overview_colorpicker %}).
|
|
10242
10235
|
*
|
|
@@ -10252,10 +10245,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10252
10245
|
this.ngZone = ngZone;
|
|
10253
10246
|
this.renderer = renderer;
|
|
10254
10247
|
this.hostClasses = true;
|
|
10255
|
-
|
|
10256
|
-
* @hidden
|
|
10257
|
-
*/
|
|
10258
|
-
this.focusableId = `k-colorpicker-${serial$2++}`;
|
|
10248
|
+
this.role = 'listbox';
|
|
10259
10249
|
/**
|
|
10260
10250
|
* Specifies the views that will be rendered in the popup.
|
|
10261
10251
|
* By default both the gradient and palette views will be rendered.
|
|
@@ -10351,6 +10341,10 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10351
10341
|
* Used to provide a two-way binding for the `activeView` property.
|
|
10352
10342
|
*/
|
|
10353
10343
|
this.activeViewChange = new EventEmitter();
|
|
10344
|
+
/**
|
|
10345
|
+
* Indicates whether the ColorPicker wrapper is focused.
|
|
10346
|
+
*/
|
|
10347
|
+
this.isFocused = false;
|
|
10354
10348
|
this._tabindex = 0;
|
|
10355
10349
|
this._popupSettings = { animate: true };
|
|
10356
10350
|
this._paletteSettings = {};
|
|
@@ -10358,13 +10352,30 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10358
10352
|
this._size = 'medium';
|
|
10359
10353
|
this._rounded = 'medium';
|
|
10360
10354
|
this._fillMode = 'solid';
|
|
10355
|
+
this.subscriptions = new Subscription();
|
|
10361
10356
|
this.notifyNgTouched = () => { };
|
|
10362
10357
|
this.notifyNgChanged = () => { };
|
|
10358
|
+
this.domFocusListener = (event) => event.stopImmediatePropagation();
|
|
10363
10359
|
validatePackage(packageMetadata);
|
|
10364
10360
|
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
10365
10361
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
10366
10362
|
});
|
|
10367
10363
|
}
|
|
10364
|
+
get focusedClass() {
|
|
10365
|
+
return this.isFocused;
|
|
10366
|
+
}
|
|
10367
|
+
get disabledClass() {
|
|
10368
|
+
return this.disabled;
|
|
10369
|
+
}
|
|
10370
|
+
get ariaReadonly() {
|
|
10371
|
+
return this.readonly;
|
|
10372
|
+
}
|
|
10373
|
+
get ariaExpanded() {
|
|
10374
|
+
return this.isOpen;
|
|
10375
|
+
}
|
|
10376
|
+
get hostTabindex() {
|
|
10377
|
+
return this.tabindex;
|
|
10378
|
+
}
|
|
10368
10379
|
/**
|
|
10369
10380
|
* @hidden
|
|
10370
10381
|
*/
|
|
@@ -10424,7 +10435,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10424
10435
|
return !this.disabled ? this._tabindex : undefined;
|
|
10425
10436
|
}
|
|
10426
10437
|
/**
|
|
10427
|
-
* The size property specifies the
|
|
10438
|
+
* The size property specifies the padding of the ColorPicker internal elements
|
|
10428
10439
|
* ([see example]({% slug appearance_colorpicker %}#toc-size)).
|
|
10429
10440
|
*
|
|
10430
10441
|
* The possible values are:
|
|
@@ -10509,6 +10520,9 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10509
10520
|
stylingInputs.forEach(input => {
|
|
10510
10521
|
this.handleClasses(this[input], input);
|
|
10511
10522
|
});
|
|
10523
|
+
this.setHostElementAriaLabel();
|
|
10524
|
+
this.handleHostId();
|
|
10525
|
+
this.initDomEvents();
|
|
10512
10526
|
}
|
|
10513
10527
|
ngOnChanges(changes) {
|
|
10514
10528
|
if (changes.format && changes.format.currentValue === 'name') {
|
|
@@ -10518,18 +10532,17 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10518
10532
|
this.format = 'rgba';
|
|
10519
10533
|
this.value = parseColor$1(this.value, this.format, this.gradientSettings.opacity);
|
|
10520
10534
|
}
|
|
10535
|
+
if (isChanged('value', changes)) {
|
|
10536
|
+
this.setHostElementAriaLabel();
|
|
10537
|
+
}
|
|
10521
10538
|
}
|
|
10522
10539
|
ngOnDestroy() {
|
|
10523
10540
|
this.closePopup();
|
|
10524
10541
|
if (this.dynamicRTLSubscription) {
|
|
10525
10542
|
this.dynamicRTLSubscription.unsubscribe();
|
|
10526
10543
|
}
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
* @hidden
|
|
10530
|
-
*/
|
|
10531
|
-
get colorPickerAriaLabel() {
|
|
10532
|
-
return this.value ? this.value : this.localizationService.get('colorPickerNoColor');
|
|
10544
|
+
this.subscriptions.unsubscribe();
|
|
10545
|
+
this.handleDomEvents('remove', DOM_FOCUS_EVENTS);
|
|
10533
10546
|
}
|
|
10534
10547
|
/**
|
|
10535
10548
|
* @hidden
|
|
@@ -10541,28 +10554,33 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10541
10554
|
* @hidden
|
|
10542
10555
|
*/
|
|
10543
10556
|
togglePopup() {
|
|
10544
|
-
this.toggleWithEvents(!this.isOpen);
|
|
10545
10557
|
this.focus();
|
|
10558
|
+
this.toggleWithEvents(!this.isOpen);
|
|
10546
10559
|
}
|
|
10547
10560
|
/**
|
|
10548
10561
|
* @hidden
|
|
10549
10562
|
*/
|
|
10550
|
-
|
|
10563
|
+
handleWrapperClick(event) {
|
|
10564
|
+
if (this.disabled) {
|
|
10565
|
+
return;
|
|
10566
|
+
}
|
|
10551
10567
|
this.focus();
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
|
|
10568
|
+
if (closest(event.target, (element) => element === this.activeColor.nativeElement)) {
|
|
10569
|
+
const event = new ActiveColorClickEvent(this.value);
|
|
10570
|
+
this.activeColorClick.emit(event);
|
|
10571
|
+
if (!event.isOpenPrevented() || this.isOpen) {
|
|
10572
|
+
this.toggleWithEvents(!this.isOpen);
|
|
10573
|
+
}
|
|
10574
|
+
return;
|
|
10556
10575
|
}
|
|
10576
|
+
this.toggleWithEvents(!this.isOpen);
|
|
10557
10577
|
}
|
|
10558
10578
|
/**
|
|
10559
10579
|
* Focuses the wrapper of the ColorPicker.
|
|
10560
10580
|
*/
|
|
10561
10581
|
focus() {
|
|
10562
|
-
|
|
10563
|
-
|
|
10564
|
-
}
|
|
10565
|
-
this.wrapper.nativeElement.focus();
|
|
10582
|
+
this.isFocused = true;
|
|
10583
|
+
this.host.nativeElement.focus();
|
|
10566
10584
|
}
|
|
10567
10585
|
/**
|
|
10568
10586
|
* @hidden
|
|
@@ -10571,14 +10589,18 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10571
10589
|
if (this.isFocused) {
|
|
10572
10590
|
return;
|
|
10573
10591
|
}
|
|
10574
|
-
this.
|
|
10575
|
-
|
|
10592
|
+
this.ngZone.run(() => {
|
|
10593
|
+
this.focus();
|
|
10594
|
+
this.onFocus.emit();
|
|
10595
|
+
});
|
|
10576
10596
|
}
|
|
10577
10597
|
/**
|
|
10578
10598
|
* Blurs the ColorPicker.
|
|
10579
10599
|
*/
|
|
10580
10600
|
blur() {
|
|
10581
|
-
this.
|
|
10601
|
+
this.isFocused = false;
|
|
10602
|
+
this.host.nativeElement.blur();
|
|
10603
|
+
this.notifyNgTouched();
|
|
10582
10604
|
}
|
|
10583
10605
|
/**
|
|
10584
10606
|
* @hidden
|
|
@@ -10587,9 +10609,16 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10587
10609
|
if (this.isOpen) {
|
|
10588
10610
|
return;
|
|
10589
10611
|
}
|
|
10590
|
-
this.
|
|
10591
|
-
|
|
10592
|
-
|
|
10612
|
+
this.ngZone.run(() => {
|
|
10613
|
+
this.onBlur.emit();
|
|
10614
|
+
this.isFocused = false;
|
|
10615
|
+
});
|
|
10616
|
+
}
|
|
10617
|
+
/**
|
|
10618
|
+
* @hidden
|
|
10619
|
+
*/
|
|
10620
|
+
arrowButtonMouseDown(ev) {
|
|
10621
|
+
ev.preventDefault();
|
|
10593
10622
|
}
|
|
10594
10623
|
/**
|
|
10595
10624
|
* Clears the value of the ColorPicker.
|
|
@@ -10599,6 +10628,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10599
10628
|
return;
|
|
10600
10629
|
}
|
|
10601
10630
|
this._value = undefined;
|
|
10631
|
+
this.setHostElementAriaLabel();
|
|
10602
10632
|
this.notifyNgChanged(undefined);
|
|
10603
10633
|
}
|
|
10604
10634
|
/**
|
|
@@ -10626,6 +10656,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10626
10656
|
if (valueChange) {
|
|
10627
10657
|
this.value = parsedColor;
|
|
10628
10658
|
this.valueChange.emit(parsedColor);
|
|
10659
|
+
this.setHostElementAriaLabel();
|
|
10629
10660
|
this.notifyNgChanged(parsedColor);
|
|
10630
10661
|
}
|
|
10631
10662
|
}
|
|
@@ -10672,7 +10703,9 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10672
10703
|
handleWrapperKeyDown(event) {
|
|
10673
10704
|
if (event.keyCode === Keys.ArrowDown || event.keyCode === Keys.Enter) {
|
|
10674
10705
|
event.preventDefault();
|
|
10675
|
-
this.
|
|
10706
|
+
this.ngZone.run(() => {
|
|
10707
|
+
this.toggleWithEvents(true);
|
|
10708
|
+
});
|
|
10676
10709
|
}
|
|
10677
10710
|
}
|
|
10678
10711
|
/**
|
|
@@ -10681,14 +10714,14 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10681
10714
|
handlePopupKeyDown(event) {
|
|
10682
10715
|
if (event.keyCode === Keys.Escape) {
|
|
10683
10716
|
this.toggleWithEvents(false);
|
|
10684
|
-
this.
|
|
10717
|
+
this.host.nativeElement.focus();
|
|
10685
10718
|
}
|
|
10686
10719
|
if (event.keyCode === Keys.Tab) {
|
|
10687
10720
|
const currentElement = event.shiftKey ? this.firstFocusableElement.nativeElement : this.lastFocusableElement.nativeElement;
|
|
10688
10721
|
const nextElement = event.shiftKey ? this.lastFocusableElement.nativeElement : this.firstFocusableElement.nativeElement;
|
|
10689
10722
|
if (event.target === currentElement) {
|
|
10690
10723
|
event.preventDefault();
|
|
10691
|
-
nextElement.
|
|
10724
|
+
nextElement.focus();
|
|
10692
10725
|
}
|
|
10693
10726
|
}
|
|
10694
10727
|
}
|
|
@@ -10699,6 +10732,10 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10699
10732
|
isEmpty() {
|
|
10700
10733
|
return false;
|
|
10701
10734
|
}
|
|
10735
|
+
setHostElementAriaLabel() {
|
|
10736
|
+
const ariaLabelValue = `${this.value ? this.value : this.localizationService.get('colorPickerNoColor')}`;
|
|
10737
|
+
this.renderer.setAttribute(this.host.nativeElement, 'aria-label', ariaLabelValue);
|
|
10738
|
+
}
|
|
10702
10739
|
handleClasses(value, input) {
|
|
10703
10740
|
const elem = this.host.nativeElement;
|
|
10704
10741
|
const classes = getStylingClasses('picker', input, this[input], value);
|
|
@@ -10710,9 +10747,9 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10710
10747
|
}
|
|
10711
10748
|
}
|
|
10712
10749
|
popupBlurInvalid(ev) {
|
|
10713
|
-
const
|
|
10714
|
-
const
|
|
10715
|
-
return
|
|
10750
|
+
const focusInFlatColorPickerElement = this.popupRef.popupElement.contains(ev.relatedTarget);
|
|
10751
|
+
const hostClicked = closest(ev.relatedTarget, (element) => element === this.host.nativeElement);
|
|
10752
|
+
return hostClicked || focusInFlatColorPickerElement;
|
|
10716
10753
|
}
|
|
10717
10754
|
toggleWithEvents(open) {
|
|
10718
10755
|
const sameState = this.isOpen === open;
|
|
@@ -10736,12 +10773,12 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10736
10773
|
}
|
|
10737
10774
|
}
|
|
10738
10775
|
focusFirstElement() {
|
|
10739
|
-
this.ngZone.
|
|
10740
|
-
|
|
10776
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
10777
|
+
if (this.flatColorPicker) {
|
|
10741
10778
|
const elementToFocus = this.flatColorPicker.gradient ? this.flatColorPicker.gradient.gradientDragHandle :
|
|
10742
10779
|
this.flatColorPicker.palette.host;
|
|
10743
10780
|
elementToFocus.nativeElement.focus();
|
|
10744
|
-
}
|
|
10781
|
+
}
|
|
10745
10782
|
});
|
|
10746
10783
|
}
|
|
10747
10784
|
openPopup() {
|
|
@@ -10749,7 +10786,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10749
10786
|
const anchorPosition = { horizontal: horizontalAlign, vertical: "bottom" };
|
|
10750
10787
|
const popupPosition = { horizontal: horizontalAlign, vertical: "top" };
|
|
10751
10788
|
this.popupRef = this.popupService.open({
|
|
10752
|
-
anchor: this.
|
|
10789
|
+
anchor: this.activeColor,
|
|
10753
10790
|
animate: this.popupSettings.animate,
|
|
10754
10791
|
appendTo: this.popupSettings.appendTo,
|
|
10755
10792
|
popupAlign: popupPosition,
|
|
@@ -10761,7 +10798,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10761
10798
|
this.popupRef.popupAnchorViewportLeave.subscribe(() => {
|
|
10762
10799
|
this.toggleWithEvents(false);
|
|
10763
10800
|
if (!this.isOpen) {
|
|
10764
|
-
this.
|
|
10801
|
+
this.host.nativeElement.focus({
|
|
10765
10802
|
preventScroll: true
|
|
10766
10803
|
});
|
|
10767
10804
|
}
|
|
@@ -10789,6 +10826,51 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
10789
10826
|
}
|
|
10790
10827
|
return this.gradientSettings.opacity ? this.flatColorPicker.gradient.inputs.opacityInput.numericInput : this.flatColorPicker.gradient.inputs.blueInput;
|
|
10791
10828
|
}
|
|
10829
|
+
handleDomEvents(action, events) {
|
|
10830
|
+
const hostElement = this.host.nativeElement;
|
|
10831
|
+
events.forEach(ev => hostElement[`${action}EventListener`](ev, this.domFocusListener, true));
|
|
10832
|
+
}
|
|
10833
|
+
initDomEvents() {
|
|
10834
|
+
if (!this.host) {
|
|
10835
|
+
return;
|
|
10836
|
+
}
|
|
10837
|
+
let hostElement = this.host.nativeElement;
|
|
10838
|
+
this.ngZone.runOutsideAngular(() => {
|
|
10839
|
+
this.subscriptions.add(this.renderer.listen(hostElement, 'focusin', () => {
|
|
10840
|
+
this.handleWrapperFocus();
|
|
10841
|
+
}));
|
|
10842
|
+
this.subscriptions.add(this.renderer.listen(hostElement, 'focusout', (event) => {
|
|
10843
|
+
const closestPopup = this.popupRef ?
|
|
10844
|
+
closest(event.relatedTarget, (element) => element === this.flatColorPicker.host.nativeElement) :
|
|
10845
|
+
false;
|
|
10846
|
+
const closestWrapper = closest(event.relatedTarget, (element) => element === this.host.nativeElement);
|
|
10847
|
+
if (!closestPopup && !closestWrapper) {
|
|
10848
|
+
this.handleWrapperBlur();
|
|
10849
|
+
}
|
|
10850
|
+
}));
|
|
10851
|
+
this.handleDomEvents('add', DOM_FOCUS_EVENTS);
|
|
10852
|
+
this.subscriptions.add(this.renderer.listen(hostElement, 'keydown', (event) => {
|
|
10853
|
+
this.handleWrapperKeyDown(event);
|
|
10854
|
+
}));
|
|
10855
|
+
this.subscriptions.add(this.renderer.listen(hostElement, 'click', (event) => {
|
|
10856
|
+
this.ngZone.run(() => {
|
|
10857
|
+
this.handleWrapperClick(event);
|
|
10858
|
+
});
|
|
10859
|
+
}));
|
|
10860
|
+
});
|
|
10861
|
+
}
|
|
10862
|
+
handleHostId() {
|
|
10863
|
+
const hostElement = this.host.nativeElement;
|
|
10864
|
+
const existingId = hostElement.getAttribute('id');
|
|
10865
|
+
if (existingId) {
|
|
10866
|
+
this.focusableId = existingId;
|
|
10867
|
+
}
|
|
10868
|
+
else {
|
|
10869
|
+
const id = `k-${guid()}`;
|
|
10870
|
+
hostElement.setAttribute('id', id);
|
|
10871
|
+
this.focusableId = id;
|
|
10872
|
+
}
|
|
10873
|
+
}
|
|
10792
10874
|
};
|
|
10793
10875
|
__decorate([
|
|
10794
10876
|
HostBinding('class.k-colorpicker'),
|
|
@@ -10796,14 +10878,40 @@ __decorate([
|
|
|
10796
10878
|
HostBinding('class.k-picker'),
|
|
10797
10879
|
__metadata("design:type", Boolean)
|
|
10798
10880
|
], ColorPickerComponent.prototype, "hostClasses", void 0);
|
|
10881
|
+
__decorate([
|
|
10882
|
+
HostBinding('class.k-focus'),
|
|
10883
|
+
__metadata("design:type", Boolean),
|
|
10884
|
+
__metadata("design:paramtypes", [])
|
|
10885
|
+
], ColorPickerComponent.prototype, "focusedClass", null);
|
|
10886
|
+
__decorate([
|
|
10887
|
+
HostBinding('attr.aria-disabled'),
|
|
10888
|
+
HostBinding('class.k-disabled'),
|
|
10889
|
+
__metadata("design:type", Boolean),
|
|
10890
|
+
__metadata("design:paramtypes", [])
|
|
10891
|
+
], ColorPickerComponent.prototype, "disabledClass", null);
|
|
10892
|
+
__decorate([
|
|
10893
|
+
HostBinding('attr.aria-readonly'),
|
|
10894
|
+
__metadata("design:type", Boolean),
|
|
10895
|
+
__metadata("design:paramtypes", [])
|
|
10896
|
+
], ColorPickerComponent.prototype, "ariaReadonly", null);
|
|
10897
|
+
__decorate([
|
|
10898
|
+
HostBinding('attr.aria-expanded'),
|
|
10899
|
+
__metadata("design:type", Boolean),
|
|
10900
|
+
__metadata("design:paramtypes", [])
|
|
10901
|
+
], ColorPickerComponent.prototype, "ariaExpanded", null);
|
|
10902
|
+
__decorate([
|
|
10903
|
+
HostBinding('attr.tabindex'),
|
|
10904
|
+
__metadata("design:type", Number),
|
|
10905
|
+
__metadata("design:paramtypes", [])
|
|
10906
|
+
], ColorPickerComponent.prototype, "hostTabindex", null);
|
|
10799
10907
|
__decorate([
|
|
10800
10908
|
HostBinding('attr.dir'),
|
|
10801
10909
|
__metadata("design:type", String)
|
|
10802
10910
|
], ColorPickerComponent.prototype, "direction", void 0);
|
|
10803
10911
|
__decorate([
|
|
10804
|
-
|
|
10912
|
+
HostBinding('attr.role'),
|
|
10805
10913
|
__metadata("design:type", String)
|
|
10806
|
-
], ColorPickerComponent.prototype, "
|
|
10914
|
+
], ColorPickerComponent.prototype, "role", void 0);
|
|
10807
10915
|
__decorate([
|
|
10808
10916
|
Input(),
|
|
10809
10917
|
__metadata("design:type", Array)
|
|
@@ -10926,9 +11034,9 @@ __decorate([
|
|
|
10926
11034
|
__metadata("design:type", ViewContainerRef)
|
|
10927
11035
|
], ColorPickerComponent.prototype, "container", void 0);
|
|
10928
11036
|
__decorate([
|
|
10929
|
-
ViewChild('
|
|
11037
|
+
ViewChild('activeColor', { static: true }),
|
|
10930
11038
|
__metadata("design:type", ElementRef)
|
|
10931
|
-
], ColorPickerComponent.prototype, "
|
|
11039
|
+
], ColorPickerComponent.prototype, "activeColor", void 0);
|
|
10932
11040
|
__decorate([
|
|
10933
11041
|
ViewChild('popupTemplate', { static: true }),
|
|
10934
11042
|
__metadata("design:type", TemplateRef)
|
|
@@ -10994,38 +11102,19 @@ ColorPickerComponent = ColorPickerComponent_1 = __decorate([
|
|
|
10994
11102
|
i18n-cancelButton="kendo.colorpicker.cancelButton|The message for the Cancel action button."
|
|
10995
11103
|
cancelButton="Cancel">
|
|
10996
11104
|
</ng-container>
|
|
10997
|
-
<span
|
|
10998
|
-
#wrapper
|
|
10999
|
-
[ngClass]="{
|
|
11000
|
-
'k-input-inner': true,
|
|
11001
|
-
'k-disabled': this.disabled,
|
|
11002
|
-
'k-focus': this.isFocused
|
|
11003
|
-
}"
|
|
11004
|
-
role="listbox"
|
|
11005
|
-
[attr.aria-expanded]="isOpen"
|
|
11006
|
-
[attr.aria-readonly]="readonly"
|
|
11007
|
-
[attr.aria-disabled]="disabled"
|
|
11008
|
-
[attr.aria-label]="colorPickerAriaLabel"
|
|
11009
|
-
[id]="focusableId"
|
|
11010
|
-
[attr.tabindex]="tabindex"
|
|
11011
|
-
(focus)="handleWrapperFocus()"
|
|
11012
|
-
(blur)="handleWrapperBlur()"
|
|
11013
|
-
(mousedown)="$event.preventDefault()"
|
|
11014
|
-
(keydown)="handleWrapperKeyDown($event)"
|
|
11015
|
-
>
|
|
11105
|
+
<span #activeColor class="k-input-inner">
|
|
11016
11106
|
<span
|
|
11017
11107
|
class="k-value-icon k-color-preview"
|
|
11018
|
-
[ngClass]="{'k-icon-color-preview': iconStyles, 'k-no-color': !value}"
|
|
11019
|
-
(click)="handleActiveColorClick()">
|
|
11108
|
+
[ngClass]="{'k-icon-color-preview': iconStyles, 'k-no-color': !value}">
|
|
11020
11109
|
<span *ngIf="iconClass || icon" class="k-color-preview-icon k-icon" [ngClass]="iconStyles"></span>
|
|
11021
11110
|
<span class="k-color-preview-mask" [style.background-color]="value"></span>
|
|
11022
11111
|
</span>
|
|
11023
11112
|
</span>
|
|
11024
11113
|
<button
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
|
|
11114
|
+
#arrowButton
|
|
11115
|
+
tabindex="-1"
|
|
11116
|
+
role="button"
|
|
11117
|
+
class="k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button">
|
|
11029
11118
|
<span class="k-button-icon k-icon k-i-arrow-s"></span>
|
|
11030
11119
|
</button>
|
|
11031
11120
|
<ng-template #popupTemplate>
|
|
@@ -11040,8 +11129,8 @@ ColorPickerComponent = ColorPickerComponent_1 = __decorate([
|
|
|
11040
11129
|
[gradientSettings]="gradientSettings"
|
|
11041
11130
|
[paletteSettings]="paletteSettings"
|
|
11042
11131
|
[clearButton]="clearButton"
|
|
11043
|
-
(focusout)="handlePopupBlur($event)"
|
|
11044
11132
|
(cancel)="handleCancelEvent($event)"
|
|
11133
|
+
(focusout)="handlePopupBlur($event)"
|
|
11045
11134
|
(valueChange)="handleValueChange($event)"
|
|
11046
11135
|
(keydown)="handlePopupKeyDown($event)"
|
|
11047
11136
|
(activeViewChange)="activeViewChange.emit($event)"
|
|
@@ -11616,6 +11705,7 @@ let RadioButtonDirective = class RadioButtonDirective {
|
|
|
11616
11705
|
this.hostElement = hostElement;
|
|
11617
11706
|
this.kendoClass = true;
|
|
11618
11707
|
this._size = 'medium';
|
|
11708
|
+
validatePackage(packageMetadata);
|
|
11619
11709
|
}
|
|
11620
11710
|
/**
|
|
11621
11711
|
* The size property specifies the width and height of the RadioButton
|
|
@@ -11709,7 +11799,7 @@ RadioButtonModule = __decorate([
|
|
|
11709
11799
|
})
|
|
11710
11800
|
], RadioButtonModule);
|
|
11711
11801
|
|
|
11712
|
-
let serial$
|
|
11802
|
+
let serial$2 = 0;
|
|
11713
11803
|
/**
|
|
11714
11804
|
* Represents an error message that will be shown underneath
|
|
11715
11805
|
* a Kendo control or native HTML form-bound component after a validation.
|
|
@@ -11732,7 +11822,7 @@ let ErrorComponent = class ErrorComponent {
|
|
|
11732
11822
|
/**
|
|
11733
11823
|
* @hidden
|
|
11734
11824
|
*/
|
|
11735
|
-
this.id = `kendo-error-${serial$
|
|
11825
|
+
this.id = `kendo-error-${serial$2++}`;
|
|
11736
11826
|
this.roleAttribute = 'alert';
|
|
11737
11827
|
}
|
|
11738
11828
|
get startClass() {
|
|
@@ -11781,7 +11871,7 @@ ErrorComponent = __decorate([
|
|
|
11781
11871
|
})
|
|
11782
11872
|
], ErrorComponent);
|
|
11783
11873
|
|
|
11784
|
-
let serial$
|
|
11874
|
+
let serial$3 = 0;
|
|
11785
11875
|
/**
|
|
11786
11876
|
* Represents a hint message that will be shown underneath a form-bound component.
|
|
11787
11877
|
*/
|
|
@@ -11801,7 +11891,7 @@ let HintComponent = class HintComponent {
|
|
|
11801
11891
|
/**
|
|
11802
11892
|
* @hidden
|
|
11803
11893
|
*/
|
|
11804
|
-
this.id = `kendo-hint-${serial$
|
|
11894
|
+
this.id = `kendo-hint-${serial$3++}`;
|
|
11805
11895
|
this.hostClass = true;
|
|
11806
11896
|
}
|
|
11807
11897
|
get startClass() {
|