@progress/kendo-angular-inputs 8.0.0-dev.202112211528 → 8.0.0-dev.202201181548
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-input.component.js +1 -1
- package/dist/es/colorpicker/color-palette.component.js +6 -3
- package/dist/es/colorpicker/colorpicker.component.js +206 -48
- package/dist/es/colorpicker/flatcolorpicker.component.js +7 -4
- 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/textbox/textbox.component.js +1 -1
- package/dist/es2015/colorpicker/color-gradient.component.js +3 -0
- package/dist/es2015/colorpicker/color-input.component.js +1 -1
- 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 +22 -6
- package/dist/es2015/colorpicker/colorpicker.component.js +181 -69
- 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/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 +56 -59
- 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/textbox/textbox.component.js +18 -19
- package/dist/fesm2015/index.js +368 -278
- package/dist/fesm5/index.js +268 -133
- package/dist/npm/colorpicker/color-gradient.component.js +3 -0
- package/dist/npm/colorpicker/color-input.component.js +1 -1
- package/dist/npm/colorpicker/color-palette.component.js +6 -3
- package/dist/npm/colorpicker/colorpicker.component.js +205 -47
- package/dist/npm/colorpicker/flatcolorpicker.component.js +7 -4
- 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/textbox/textbox.component.js +1 -1
- package/dist/systemjs/kendo-angular-inputs.js +1 -1
- package/package.json +5 -5
package/dist/fesm5/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';
|
|
@@ -155,16 +155,6 @@ var calculateFixedTrackSize = function (_a) {
|
|
|
155
155
|
var max = _a.max, min = _a.min, smallStep = _a.smallStep, fixedTickWidth = _a.fixedTickWidth;
|
|
156
156
|
return ((max - min) / smallStep) * fixedTickWidth;
|
|
157
157
|
};
|
|
158
|
-
/**
|
|
159
|
-
* @hidden
|
|
160
|
-
*/
|
|
161
|
-
var calculateTrackSize = function (wrapperWidth, offset, showButtons) {
|
|
162
|
-
if (showButtons === void 0) { showButtons = true; }
|
|
163
|
-
var BUTTONS_COUNT = 2;
|
|
164
|
-
var trackOffset = showButtons ? parseFloat(offset) * BUTTONS_COUNT : 0;
|
|
165
|
-
var trackWidth = wrapperWidth - trackOffset;
|
|
166
|
-
return Math.floor(trackWidth);
|
|
167
|
-
};
|
|
168
158
|
/**
|
|
169
159
|
* @hidden
|
|
170
160
|
*/
|
|
@@ -192,14 +182,13 @@ var calculateValueFromTick = function (index, _a) {
|
|
|
192
182
|
* @hidden
|
|
193
183
|
*/
|
|
194
184
|
var calculateHandlePosition = function (_a) {
|
|
195
|
-
var
|
|
196
|
-
var halfHandleWidth = Math.floor(handleWidth / 2);
|
|
185
|
+
var trackWidth = _a.trackWidth, min = _a.min, max = _a.max, reverse = _a.reverse, value = _a.value;
|
|
197
186
|
var step = trackWidth / Math.abs(max - min);
|
|
198
187
|
var pos = isPresent(value) ? step * (value - min) : min;
|
|
199
188
|
if (reverse) {
|
|
200
189
|
pos = trackWidth - pos;
|
|
201
190
|
}
|
|
202
|
-
return Math.floor(pos
|
|
191
|
+
return Math.floor(pos);
|
|
203
192
|
};
|
|
204
193
|
/**
|
|
205
194
|
* @hidden
|
|
@@ -368,8 +357,10 @@ var SliderModelBase = /** @class */ (function () {
|
|
|
368
357
|
}
|
|
369
358
|
SliderModelBase.prototype.resizeTrack = function () {
|
|
370
359
|
var orientation = this.props.vertical ? 'height' : 'width';
|
|
360
|
+
var altOrientation = this.props.vertical ? 'width' : 'height';
|
|
371
361
|
var trackWidth = this.trackWidth();
|
|
372
|
-
this.track.style[orientation] = trackWidth + "px";
|
|
362
|
+
this.track.parentElement.style[orientation] = trackWidth + "px";
|
|
363
|
+
this.track.parentElement.style[altOrientation] = '';
|
|
373
364
|
};
|
|
374
365
|
SliderModelBase.prototype.resizeTicks = function (ticksContainer, ticks) {
|
|
375
366
|
var _this = this;
|
|
@@ -381,22 +372,17 @@ var SliderModelBase = /** @class */ (function () {
|
|
|
381
372
|
};
|
|
382
373
|
SliderModelBase.prototype.resizeWrapper = function () {
|
|
383
374
|
var dimension = this.props.vertical ? "height" : "width";
|
|
384
|
-
var wrapperSize = this.elementSize(this.wrapper);
|
|
385
|
-
var trackWidth = calculateTrackSize(wrapperSize, this.elementOffset(this.track));
|
|
386
375
|
var fixedTrackWidth = calculateFixedTrackSize(this.props);
|
|
387
376
|
var wrapperParentEl = this.wrapper.parentElement;
|
|
388
|
-
if (
|
|
389
|
-
wrapperParentEl.style[dimension] =
|
|
390
|
-
}
|
|
391
|
-
else {
|
|
392
|
-
wrapperParentEl.style[dimension] = wrapperSize + (fixedTrackWidth - trackWidth) + "px";
|
|
377
|
+
if (fixedTrackWidth) {
|
|
378
|
+
wrapperParentEl.style[dimension] = "auto";
|
|
393
379
|
}
|
|
394
380
|
};
|
|
395
381
|
SliderModelBase.prototype.trackWidth = function () {
|
|
396
382
|
if (this.props.fixedTickWidth) {
|
|
397
383
|
return calculateFixedTrackSize(this.props);
|
|
398
384
|
}
|
|
399
|
-
return
|
|
385
|
+
return this.elementSize(this.track.parentElement);
|
|
400
386
|
};
|
|
401
387
|
SliderModelBase.prototype.getTickSizes = function () {
|
|
402
388
|
var _a = this.props, min = _a.min, max = _a.max, smallStep = _a.smallStep;
|
|
@@ -463,16 +449,14 @@ var SliderModel = /** @class */ (function (_super) {
|
|
|
463
449
|
max: max,
|
|
464
450
|
reverse: reverse,
|
|
465
451
|
value: value,
|
|
466
|
-
trackWidth: trackWidth
|
|
467
|
-
handleWidth: dragHandle.offsetWidth
|
|
452
|
+
trackWidth: trackWidth
|
|
468
453
|
});
|
|
469
454
|
this.renderer.setStyle(dragHandle, position, this.handlePosition + "px");
|
|
470
455
|
};
|
|
471
|
-
SliderModel.prototype.positionSelection = function (
|
|
456
|
+
SliderModel.prototype.positionSelection = function (selection) {
|
|
472
457
|
var _a = this.props, reverse = _a.reverse, vertical = _a.vertical;
|
|
473
458
|
var dimension = vertical ? 'height' : 'width';
|
|
474
|
-
var
|
|
475
|
-
var size = this.handlePosition + handleWidth;
|
|
459
|
+
var size = this.handlePosition;
|
|
476
460
|
if (reverse) {
|
|
477
461
|
size = this.trackWidth() - size;
|
|
478
462
|
}
|
|
@@ -516,7 +500,7 @@ var containsFocus = function (hostElement, contender) {
|
|
|
516
500
|
/**
|
|
517
501
|
* @hidden
|
|
518
502
|
*/
|
|
519
|
-
var closest = function (node, predicate) {
|
|
503
|
+
var closest$1 = function (node, predicate) {
|
|
520
504
|
while (node && !predicate(node)) {
|
|
521
505
|
node = node.parentNode;
|
|
522
506
|
}
|
|
@@ -530,7 +514,7 @@ var packageMetadata = {
|
|
|
530
514
|
name: '@progress/kendo-angular-inputs',
|
|
531
515
|
productName: 'Kendo UI for Angular',
|
|
532
516
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
533
|
-
publishDate:
|
|
517
|
+
publishDate: 1642520654,
|
|
534
518
|
version: '',
|
|
535
519
|
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'
|
|
536
520
|
};
|
|
@@ -1164,7 +1148,7 @@ var SliderComponent = /** @class */ (function (_super) {
|
|
|
1164
1148
|
model.resizeTicks(this.ticksContainer.nativeElement, this.ticks.tickElements.map(function (element) { return element.nativeElement; }));
|
|
1165
1149
|
}
|
|
1166
1150
|
model.positionHandle(dragHandleEl);
|
|
1167
|
-
model.positionSelection(
|
|
1151
|
+
model.positionSelection(selectionEl);
|
|
1168
1152
|
if (!animate) {
|
|
1169
1153
|
this.hostElement.nativeElement.getBoundingClientRect();
|
|
1170
1154
|
this.renderer.addClass(this.hostElement.nativeElement, 'k-slider-transitions');
|
|
@@ -1339,7 +1323,7 @@ var SliderComponent = /** @class */ (function (_super) {
|
|
|
1339
1323
|
{ provide: KendoInput, useExisting: forwardRef(function () { return SliderComponent_1; }) }
|
|
1340
1324
|
],
|
|
1341
1325
|
selector: 'kendo-slider',
|
|
1342
|
-
template: "\n <ng-container kendoSliderLocalizedMessages\n i18n-increment=\"kendo.slider.increment|The title of the **Increase** button of the Slider.\"\n increment=\"increment\"\n i18n-decrement=\"kendo.slider.decrement|The title of the **Decrease** button of the Slider.\"\n decrement=\"decrement\"\n i18n-dragHandle=\"kendo.slider.dragHandle|The title of the drag handle of the Slider.\"\n dragHandle=\"Drag\"\n >\n <div class=\"k-slider-wrap\" #wrap\n [class.k-slider-buttons]=\"showButtons\"\n [class.k-slider-topleft]=\"tickPlacement === 'before'\"\n [class.k-slider-bottomright]=\"tickPlacement === 'after'\"\n [kendoEventsOutsideAngular]=\"{ click: onWrapClick, keydown: onKeyDown }\"\n >\n <
|
|
1326
|
+
template: "\n <ng-container kendoSliderLocalizedMessages\n i18n-increment=\"kendo.slider.increment|The title of the **Increase** button of the Slider.\"\n increment=\"increment\"\n i18n-decrement=\"kendo.slider.decrement|The title of the **Decrease** button of the Slider.\"\n decrement=\"decrement\"\n i18n-dragHandle=\"kendo.slider.dragHandle|The title of the drag handle of the Slider.\"\n dragHandle=\"Drag\"\n >\n <div class=\"k-slider-wrap\" #wrap\n [class.k-slider-buttons]=\"showButtons\"\n [class.k-slider-topleft]=\"tickPlacement === 'before'\"\n [class.k-slider-bottomright]=\"tickPlacement === 'after'\"\n [kendoEventsOutsideAngular]=\"{ click: onWrapClick, keydown: onKeyDown }\"\n >\n <button *ngIf=\"showButtons\" type=\"button\" #decreaseButton\n class=\"k-button-decrease k-button k-button-md k-rounded-full k-button-rectangle k-button-solid k-button-solid-base k-icon-button\"\n [title]=\"decrementMessage\"\n [attr.tabindex]=\"-1\"\n role=\"presentation\">\n <span class=\"k-button-icon k-icon\"\n [class.k-i-arrow-w]=\"!vertical\"\n [class.k-i-arrow-s]=\"vertical\">\n </span>\n </button>\n <div class=\"k-slider-track-wrap\">\n <ul kendoSliderTicks\n #ticks\n *ngIf=\"tickPlacement !== 'none'\"\n [tickTitle]=\"title\"\n [vertical]=\"vertical\"\n [step]=\"smallStep\"\n [largeStep]=\"largeStep\"\n [min]=\"min\"\n [max]=\"max\"\n [labelTemplate]=\"labelTemplate?.templateRef\"\n [attr.aria-hidden]=\"true\"\n >\n </ul>\n <div #track class=\"k-slider-track\">\n <div #sliderSelection class=\"k-slider-selection\">\n </div>\n <a #draghandle\n role=\"slider\"\n [attr.aria-valuemin]=\"min\"\n [attr.aria-valuemax]=\"max\"\n [attr.aria-valuenow]=\"currentValue\"\n [attr.aria-valuetext]=\"currentValue\"\n [attr.aria-disabled]=\"disabled ? true : undefined\"\n [attr.aria-readonly]=\"readonly ? true : undefined\"\n [attr.aria-orientation]=\"vertical ? 'vertical' : 'horizontal'\"\n [style.touch-action]=\"isDisabled ? '' : 'none'\"\n class=\"k-draghandle\"\n [title]=\"dragHandleMessage\"\n [attr.tabindex]=\"disabled ? '-1' : tabIndex\"\n [id]=\"focusableId\"\n kendoDraggable\n (kendoPress)=\"ifEnabled(handleDragPress, $event)\"\n (kendoDrag)=\"ifEnabled(onHandleDrag, $event)\"\n (kendoRelease)=\"ifEnabled(onHandleRelease, $event)\"\n ></a>\n </div>\n </div>\n <button *ngIf=\"showButtons\" type=\"button\" #increaseButton\n 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\"\n [title]=\"incrementMessage\"\n (click)=\"$event.preventDefault()\"\n [attr.tabindex]=\"-1\"\n [attr.aria-label]=\"currentValue\"\n role=\"presentation\">\n <span class=\"k-button-icon k-icon\"\n [class.k-i-arrow-e]=\"!vertical\"\n [class.k-i-arrow-n]=\"vertical\">\n </span>\n </button>\n <kendo-resize-sensor (resize)=\"sizeComponent(false)\"></kendo-resize-sensor>\n </div>\n "
|
|
1343
1327
|
}),
|
|
1344
1328
|
__metadata("design:paramtypes", [LocalizationService,
|
|
1345
1329
|
Injector,
|
|
@@ -1374,8 +1358,7 @@ var RangeSliderModel = /** @class */ (function (_super) {
|
|
|
1374
1358
|
max: max,
|
|
1375
1359
|
reverse: reverse,
|
|
1376
1360
|
value: value,
|
|
1377
|
-
trackWidth: trackWidth
|
|
1378
|
-
handleWidth: dragHandle.offsetWidth
|
|
1361
|
+
trackWidth: trackWidth
|
|
1379
1362
|
});
|
|
1380
1363
|
this.renderer.setStyle(dragHandle, position, this.startHandlePosition + "px");
|
|
1381
1364
|
}
|
|
@@ -1385,8 +1368,7 @@ var RangeSliderModel = /** @class */ (function (_super) {
|
|
|
1385
1368
|
max: max,
|
|
1386
1369
|
reverse: reverse,
|
|
1387
1370
|
value: value,
|
|
1388
|
-
trackWidth: trackWidth
|
|
1389
|
-
handleWidth: dragHandle.offsetWidth
|
|
1371
|
+
trackWidth: trackWidth
|
|
1390
1372
|
});
|
|
1391
1373
|
this.renderer.setStyle(dragHandle, position, this.endHandlePosition + "px");
|
|
1392
1374
|
}
|
|
@@ -1395,12 +1377,11 @@ var RangeSliderModel = /** @class */ (function (_super) {
|
|
|
1395
1377
|
var _a = this.props, reverse = _a.reverse, vertical = _a.vertical;
|
|
1396
1378
|
var dimension = vertical ? 'height' : 'width';
|
|
1397
1379
|
var position = vertical ? 'bottom' : reverse ? 'right' : 'left';
|
|
1398
|
-
var handleWidth = Math.floor(dragHandle.offsetWidth / 2);
|
|
1399
1380
|
var size = Math.abs(this.endHandlePosition - this.startHandlePosition);
|
|
1400
1381
|
var currentSelectionPosition = vertical ? dragHandle.style.bottom : dragHandle.style.left;
|
|
1401
1382
|
this.renderer.setStyle(selection, dimension, size + "px");
|
|
1402
|
-
this.renderer.setStyle(selection, position, reverse ? this.trackWidth() - parseFloat(currentSelectionPosition)
|
|
1403
|
-
: parseFloat(currentSelectionPosition) +
|
|
1383
|
+
this.renderer.setStyle(selection, position, reverse ? this.trackWidth() - parseFloat(currentSelectionPosition) + 'px'
|
|
1384
|
+
: parseFloat(currentSelectionPosition) + 'px');
|
|
1404
1385
|
};
|
|
1405
1386
|
return RangeSliderModel;
|
|
1406
1387
|
}(SliderModelBase));
|
|
@@ -1844,7 +1825,7 @@ var RangeSliderComponent = /** @class */ (function (_super) {
|
|
|
1844
1825
|
{ provide: KendoInput, useExisting: forwardRef(function () { return RangeSliderComponent_1; }) }
|
|
1845
1826
|
],
|
|
1846
1827
|
selector: 'kendo-rangeslider',
|
|
1847
|
-
template: "\n <ng-container kendoSliderLocalizedMessages\n i18n-dragHandleStart=\"kendo.rangeslider.dragHandleStart|The title of the **Start** drag handle of the Slider.\"\n dragHandleStart=\"Drag\"\n i18n-dragHandleEnd=\"kendo.rangeslider.dragHandleEnd|The title of the **End** drag handle of the Slider.\"\n dragHandleEnd=\"Drag\"\n >\n\n <div class=\"k-slider-wrap\" #wrap\n [class.k-slider-topleft]=\"tickPlacement === 'before'\"\n [class.k-slider-bottomright]=\"tickPlacement === 'after'\"\n [kendoEventsOutsideAngular]=\"{ click: onWrapClick, keydown: onKeyDown }\"\n >\n <ul kendoSliderTicks\n
|
|
1828
|
+
template: "\n <ng-container kendoSliderLocalizedMessages\n i18n-dragHandleStart=\"kendo.rangeslider.dragHandleStart|The title of the **Start** drag handle of the Slider.\"\n dragHandleStart=\"Drag\"\n i18n-dragHandleEnd=\"kendo.rangeslider.dragHandleEnd|The title of the **End** drag handle of the Slider.\"\n dragHandleEnd=\"Drag\"\n >\n\n <div class=\"k-slider-wrap\" #wrap\n [class.k-slider-topleft]=\"tickPlacement === 'before'\"\n [class.k-slider-bottomright]=\"tickPlacement === 'after'\"\n [kendoEventsOutsideAngular]=\"{ click: onWrapClick, keydown: onKeyDown }\"\n >\n <div class=\"k-slider-track-wrap\">\n <ul kendoSliderTicks\n #ticks\n *ngIf=\"tickPlacement !== 'none'\"\n [tickTitle]=\"title\"\n [vertical]=\"vertical\"\n [step]=\"smallStep\"\n [largeStep]=\"largeStep\"\n [min]=\"min\"\n [max]=\"max\"\n [labelTemplate]=\"labelTemplate?.templateRef\"\n [attr.aria-hidden]=\"true\"\n >\n </ul>\n <div #track class=\"k-slider-track\">\n <div #sliderSelection class=\"k-slider-selection\">\n </div>\n <a #draghandleStart\n role=\"slider\"\n [id]=\"startHandleId\"\n [attr.tabindex]=\"disabled ? undefined : tabindex\"\n [attr.aria-valuemin]=\"min\"\n [attr.aria-valuemax]=\"max\"\n [attr.aria-valuenow]=\"value ? value[0] : null\"\n [attr.aria-valuetext]=\"valueText\"\n [attr.aria-disabled]=\"disabled ? true : undefined\"\n [attr.aria-readonly]=\"readonly ? true : undefined\"\n [attr.aria-orientation]=\"vertical ? 'vertical' : 'horizontal'\"\n [style.touch-action]=\"isDisabled ? '' : 'none'\"\n class=\"k-draghandle\"\n [title]=\"textFor('dragHandleStart')\"\n kendoDraggable\n (kendoPress)=\"ifEnabled(handleDragPress ,$event)\"\n (kendoDrag)=\"ifEnabled(onHandleDrag ,$event)\"\n (kendoRelease)=\"ifEnabled(onHandleRelease, $event)\"\n ></a>\n <a #draghandleEnd\n role=\"slider\"\n [id]=\"endHandleId\"\n [attr.tabindex]=\"disabled ? undefined : tabindex\"\n [attr.aria-valuemin]=\"min\"\n [attr.aria-valuemax]=\"max\"\n [attr.aria-valuenow]=\"value ? value[1] : null\"\n [attr.aria-valuetext]=\"valueText\"\n [attr.aria-disabled]=\"disabled ? true : undefined\"\n [attr.aria-readonly]=\"readonly ? true : undefined\"\n [attr.aria-orientation]=\"vertical ? 'vertical' : 'horizontal'\"\n [style.touch-action]=\"isDisabled ? '' : 'none'\"\n class=\"k-draghandle\"\n [title]=\"textFor('dragHandleEnd')\"\n kendoDraggable\n (kendoPress)=\"ifEnabled(handleDragPress ,$event)\"\n (kendoDrag)=\"ifEnabled(onHandleDrag ,$event)\"\n (kendoRelease)=\"ifEnabled(onHandleRelease, $event)\"\n ></a>\n </div>\n </div>\n <kendo-resize-sensor (resize)=\"sizeComponent()\"></kendo-resize-sensor>\n </div>\n "
|
|
1848
1829
|
}),
|
|
1849
1830
|
__metadata("design:paramtypes", [LocalizationService,
|
|
1850
1831
|
Injector,
|
|
@@ -5208,8 +5189,7 @@ var SliderTick = /** @class */ (function () {
|
|
|
5208
5189
|
* @hidden
|
|
5209
5190
|
*/
|
|
5210
5191
|
var SliderTicksComponent = /** @class */ (function () {
|
|
5211
|
-
function SliderTicksComponent(
|
|
5212
|
-
this.rtl = rtl;
|
|
5192
|
+
function SliderTicksComponent() {
|
|
5213
5193
|
this.wrapperClasses = 'k-reset k-slider-items';
|
|
5214
5194
|
this.ticks = [];
|
|
5215
5195
|
}
|
|
@@ -5232,9 +5212,6 @@ var SliderTicksComponent = /** @class */ (function () {
|
|
|
5232
5212
|
result[i].classes['k-tick-large'] = true;
|
|
5233
5213
|
}
|
|
5234
5214
|
}
|
|
5235
|
-
if (this.rtl || this.vertical) {
|
|
5236
|
-
result = result.reverse();
|
|
5237
|
-
}
|
|
5238
5215
|
if (result.length > 0) {
|
|
5239
5216
|
Object.assign(result[0].classes, this.endTickClasses(true));
|
|
5240
5217
|
Object.assign(result[result.length - 1].classes, this.endTickClasses(false));
|
|
@@ -5287,9 +5264,7 @@ var SliderTicksComponent = /** @class */ (function () {
|
|
|
5287
5264
|
Component({
|
|
5288
5265
|
selector: '[kendoSliderTicks]',
|
|
5289
5266
|
template: "\n <li #tickElement *ngFor=\"let tick of ticks;\"\n [ngClass]=\"tick.classes\"\n title=\"{{ tickTitle(tick.value) }}\"\n role=\"presentation\"\n >\n <ng-container [ngSwitch]=\"tick.large\">\n <span class=\"k-label\" *ngSwitchCase=\"true\">\n <ng-container [ngTemplateOutlet]=\"labelTemplate || defaultLabel\" [ngTemplateOutletContext]=\"tick\">\n </ng-container>\n </span>\n <ng-container *ngSwitchCase=\"false\"> </ng-container>\n </ng-container>\n </li>\n\n <ng-template #defaultLabel let-value=\"value\">\n {{ tickTitle(value) }}\n </ng-template>\n "
|
|
5290
|
-
})
|
|
5291
|
-
__param(0, Optional()), __param(0, Inject(RTL)),
|
|
5292
|
-
__metadata("design:paramtypes", [Boolean])
|
|
5267
|
+
})
|
|
5293
5268
|
], SliderTicksComponent);
|
|
5294
5269
|
return SliderTicksComponent;
|
|
5295
5270
|
}());
|
|
@@ -6237,7 +6212,7 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
6237
6212
|
return;
|
|
6238
6213
|
}
|
|
6239
6214
|
if (tabbing) {
|
|
6240
|
-
var closestTextbox = closest(args.relatedTarget, function (element) { return element === _this.hostElement.nativeElement; });
|
|
6215
|
+
var closestTextbox = closest$1(args.relatedTarget, function (element) { return element === _this.hostElement.nativeElement; });
|
|
6241
6216
|
if (!closestTextbox) {
|
|
6242
6217
|
_this.handleBlur();
|
|
6243
6218
|
}
|
|
@@ -6656,7 +6631,7 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
6656
6631
|
{ provide: KendoInput, useExisting: forwardRef(function () { return TextBoxComponent_1; }) }
|
|
6657
6632
|
],
|
|
6658
6633
|
selector: 'kendo-textbox',
|
|
6659
|
-
template: "\n <ng-container kendoTextBoxLocalizedMessages\n i18n-clear=\"kendo.textbox.clear|The title for the **Clear** button in the TextBox.\"\n clear=\"Clear\">\n </ng-container>\n <span class=\"k-input-prefix\">\n <ng-template\n *ngIf=\"prefixTemplate\"\n [ngTemplateOutlet]=\"prefixTemplate?.templateRef\">\n </ng-template>\n </span>\n <input\n class=\"k-input-inner\"\n
|
|
6634
|
+
template: "\n <ng-container kendoTextBoxLocalizedMessages\n i18n-clear=\"kendo.textbox.clear|The title for the **Clear** button in the TextBox.\"\n clear=\"Clear\">\n </ng-container>\n <span class=\"k-input-prefix\">\n <ng-template\n *ngIf=\"prefixTemplate\"\n [ngTemplateOutlet]=\"prefixTemplate?.templateRef\">\n </ng-template>\n </span>\n <input #input\n class=\"k-input-inner\"\n [id]=\"focusableId\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.tabindex]=\"disabled ? undefined : tabindex\"\n [value]=\"value\"\n [attr.placeholder]=\"placeholder\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"maxlength\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleInputFocus,\n blur: handleInputBlur,\n input: handleInput}\"\n />\n <span\n role=\"button\"\n class=\"k-clear-value\"\n *ngIf=\"showClearButton\"\n (click)=\"clearValue()\"\n (mousedown)=\"$event.preventDefault()\"\n [tabindex]=\"tabIndex\"\n [attr.aria-label]=\"clearTitle()\"\n [title]=\"clearTitle()\"\n (keydown.enter)=\"clearValue($event)\"\n (keydown.space)=\"clearValue($event)\">\n <span [ngClass]=\"clearButtonClasses\"></span>\n </span>\n <span *ngIf=\"hasErrors\" [ngClass]=\"errorIconClasses\"></span>\n <span *ngIf=\"isSuccessful\" [ngClass]=\"successIconClasses\"></span>\n <span class=\"k-input-suffix\">\n <ng-template\n *ngIf=\"suffixTemplate\"\n [ngTemplateOutlet]=\"suffixTemplate?.templateRef\">\n </ng-template>\n </span>\n "
|
|
6660
6635
|
}),
|
|
6661
6636
|
__metadata("design:paramtypes", [LocalizationService,
|
|
6662
6637
|
NgZone,
|
|
@@ -7251,7 +7226,7 @@ var TextAreaComponent = /** @class */ (function (_super) {
|
|
|
7251
7226
|
return;
|
|
7252
7227
|
}
|
|
7253
7228
|
if (tabbing) {
|
|
7254
|
-
var closestTextbox = closest(args.relatedTarget, function (element) { return element === _this.hostElement.nativeElement; });
|
|
7229
|
+
var closestTextbox = closest$1(args.relatedTarget, function (element) { return element === _this.hostElement.nativeElement; });
|
|
7255
7230
|
if (!closestTextbox) {
|
|
7256
7231
|
_this.handleBlur();
|
|
7257
7232
|
}
|
|
@@ -8347,7 +8322,7 @@ var ColorInputComponent = /** @class */ (function () {
|
|
|
8347
8322
|
ColorInputComponent = __decorate([
|
|
8348
8323
|
Component({
|
|
8349
8324
|
selector: 'kendo-colorinput',
|
|
8350
|
-
template: "\n <div class=\"k-vstack\">\n <button #toggleFormatButton\n class=\"k-colorgradient-toggle-mode k-button k-button-md k-button-flat k-button-flat-base k-icon-button\"\n [attr.aria-label]=\"formatButtonTitle\"\n [attr.title]=\"formatButtonTitle\"\n >\n <span class=\"k-button-icon k-icon k-i-arrows-kpi\"></span>\n </button>\n </div>\n <div *ngIf=\"formatView === 'hex'\" class=\"k-vstack\">\n <input\n #hexInput\n [id]=\"focusableId\"\n class=\"k-textbox k-hex-value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [value]=\"hex || ''\"\n (blur)=\"handleHexInputBlur()\"\n (input)=\"handleHexValueChange(hexInput.value)\"\n />\n <label [for]=\"focusableId\" class=\"k-colorgradient-input-label\">HEX</label>\n </div>\n <ng-container *ngIf=\"formatView === 'rgba'\">\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #red\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.r\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"red.focusableId\" class=\"k-colorgradient-input-label\">R</label>\n </div>\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #green\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.g\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"green.focusableId\" class=\"k-colorgradient-input-label\">G</label>\n </div>\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #blue\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.b\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"blue.focusableId\" class=\"k-colorgradient-input-label\">B</label>\n </div>\n <div class=\"k-vstack\" *ngIf=\"opacity\">\n <kendo-numerictextbox #opacityInput\n #alpha\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"1\"\n [(value)]=\"rgba.a\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [step]=\"0.01\"\n [format]=\"'n2'\"\n [decimals]=\"2\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"alpha.focusableId\" class=\"k-colorgradient-input-label\">A</label>\n </div>\n </ng-container>\n "
|
|
8325
|
+
template: "\n <div class=\"k-vstack\">\n <button #toggleFormatButton\n class=\"k-colorgradient-toggle-mode k-button k-button-md k-button-flat k-button-flat-base k-icon-button\"\n [attr.aria-label]=\"formatButtonTitle\"\n [attr.title]=\"formatButtonTitle\"\n >\n <span class=\"k-button-icon k-icon k-i-arrows-kpi\"></span>\n </button>\n </div>\n <div *ngIf=\"formatView === 'hex'\" class=\"k-vstack\">\n <input\n #hexInput\n [id]=\"focusableId\"\n class=\"k-input k-textbox k-input-solid k-input-md k-rounded-md k-hex-value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [value]=\"hex || ''\"\n (blur)=\"handleHexInputBlur()\"\n (input)=\"handleHexValueChange(hexInput.value)\"\n />\n <label [for]=\"focusableId\" class=\"k-colorgradient-input-label\">HEX</label>\n </div>\n <ng-container *ngIf=\"formatView === 'rgba'\">\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #red\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.r\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"red.focusableId\" class=\"k-colorgradient-input-label\">R</label>\n </div>\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #green\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.g\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"green.focusableId\" class=\"k-colorgradient-input-label\">G</label>\n </div>\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #blue\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.b\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"blue.focusableId\" class=\"k-colorgradient-input-label\">B</label>\n </div>\n <div class=\"k-vstack\" *ngIf=\"opacity\">\n <kendo-numerictextbox #opacityInput\n #alpha\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"1\"\n [(value)]=\"rgba.a\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [step]=\"0.01\"\n [format]=\"'n2'\"\n [decimals]=\"2\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"alpha.focusableId\" class=\"k-colorgradient-input-label\">A</label>\n </div>\n </ng-container>\n "
|
|
8351
8326
|
}),
|
|
8352
8327
|
__metadata("design:paramtypes", [ElementRef,
|
|
8353
8328
|
Renderer2,
|
|
@@ -8435,6 +8410,7 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
8435
8410
|
this.updateValues = new Subject();
|
|
8436
8411
|
this.notifyNgChanged = function () { };
|
|
8437
8412
|
this.notifyNgTouched = function () { };
|
|
8413
|
+
validatePackage(packageMetadata);
|
|
8438
8414
|
this.dynamicRTLSubscription = localizationService.changes.subscribe(function (_a) {
|
|
8439
8415
|
var rtl = _a.rtl;
|
|
8440
8416
|
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
@@ -9014,6 +8990,32 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
9014
8990
|
return ColorGradientComponent;
|
|
9015
8991
|
}());
|
|
9016
8992
|
|
|
8993
|
+
/**
|
|
8994
|
+
* @hidden
|
|
8995
|
+
*/
|
|
8996
|
+
var ColorPaletteLocalizationService = /** @class */ (function (_super) {
|
|
8997
|
+
__extends(ColorPaletteLocalizationService, _super);
|
|
8998
|
+
function ColorPaletteLocalizationService(prefix, messageService, _rtl, flatColorPickerLocalization) {
|
|
8999
|
+
var _this = _super.call(this, prefix, messageService, _rtl) || this;
|
|
9000
|
+
_this.flatColorPickerLocalization = flatColorPickerLocalization;
|
|
9001
|
+
return _this;
|
|
9002
|
+
}
|
|
9003
|
+
ColorPaletteLocalizationService.prototype.get = function (shortKey) {
|
|
9004
|
+
if (this.flatColorPickerLocalization) {
|
|
9005
|
+
return this.flatColorPickerLocalization.get(shortKey);
|
|
9006
|
+
}
|
|
9007
|
+
return _super.prototype.get.call(this, shortKey);
|
|
9008
|
+
};
|
|
9009
|
+
ColorPaletteLocalizationService = __decorate([
|
|
9010
|
+
__param(0, Inject(L10N_PREFIX)),
|
|
9011
|
+
__param(1, Optional()),
|
|
9012
|
+
__param(2, Optional()), __param(2, Inject(RTL)),
|
|
9013
|
+
__param(3, Optional()), __param(3, Inject(FlatColorPickerLocalizationService)),
|
|
9014
|
+
__metadata("design:paramtypes", [String, MessageService, Boolean, FlatColorPickerLocalizationService])
|
|
9015
|
+
], ColorPaletteLocalizationService);
|
|
9016
|
+
return ColorPaletteLocalizationService;
|
|
9017
|
+
}(LocalizationService));
|
|
9018
|
+
|
|
9017
9019
|
/**
|
|
9018
9020
|
* @hidden
|
|
9019
9021
|
*/
|
|
@@ -9074,32 +9076,6 @@ var ColorPaletteService = /** @class */ (function () {
|
|
|
9074
9076
|
return ColorPaletteService;
|
|
9075
9077
|
}());
|
|
9076
9078
|
|
|
9077
|
-
/**
|
|
9078
|
-
* @hidden
|
|
9079
|
-
*/
|
|
9080
|
-
var ColorPaletteLocalizationService = /** @class */ (function (_super) {
|
|
9081
|
-
__extends(ColorPaletteLocalizationService, _super);
|
|
9082
|
-
function ColorPaletteLocalizationService(prefix, messageService, _rtl, flatColorPickerLocalization) {
|
|
9083
|
-
var _this = _super.call(this, prefix, messageService, _rtl) || this;
|
|
9084
|
-
_this.flatColorPickerLocalization = flatColorPickerLocalization;
|
|
9085
|
-
return _this;
|
|
9086
|
-
}
|
|
9087
|
-
ColorPaletteLocalizationService.prototype.get = function (shortKey) {
|
|
9088
|
-
if (this.flatColorPickerLocalization) {
|
|
9089
|
-
return this.flatColorPickerLocalization.get(shortKey);
|
|
9090
|
-
}
|
|
9091
|
-
return _super.prototype.get.call(this, shortKey);
|
|
9092
|
-
};
|
|
9093
|
-
ColorPaletteLocalizationService = __decorate([
|
|
9094
|
-
__param(0, Inject(L10N_PREFIX)),
|
|
9095
|
-
__param(1, Optional()),
|
|
9096
|
-
__param(2, Optional()), __param(2, Inject(RTL)),
|
|
9097
|
-
__param(3, Optional()), __param(3, Inject(FlatColorPickerLocalizationService)),
|
|
9098
|
-
__metadata("design:paramtypes", [String, MessageService, Boolean, FlatColorPickerLocalizationService])
|
|
9099
|
-
], ColorPaletteLocalizationService);
|
|
9100
|
-
return ColorPaletteLocalizationService;
|
|
9101
|
-
}(LocalizationService));
|
|
9102
|
-
|
|
9103
9079
|
var DEFAULT_TILE_SIZE = 24;
|
|
9104
9080
|
var DEFAULT_COLUMNS_COUNT = 10;
|
|
9105
9081
|
var DEFAULT_PRESET$1 = 'office';
|
|
@@ -9173,6 +9149,7 @@ var ColorPaletteComponent = /** @class */ (function () {
|
|
|
9173
9149
|
this._tabindex = 0;
|
|
9174
9150
|
this.notifyNgTouched = function () { };
|
|
9175
9151
|
this.notifyNgChanged = function () { };
|
|
9152
|
+
validatePackage(packageMetadata);
|
|
9176
9153
|
this.dynamicRTLSubscription = localizationService.changes.subscribe(function (_a) {
|
|
9177
9154
|
var rtl = _a.rtl;
|
|
9178
9155
|
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
@@ -9731,10 +9708,10 @@ var FlatColorPickerActionButtonsComponent = /** @class */ (function () {
|
|
|
9731
9708
|
* through a gradient that renders an hsv canvas. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
|
|
9732
9709
|
*/
|
|
9733
9710
|
var FlatColorPickerComponent = /** @class */ (function () {
|
|
9734
|
-
function FlatColorPickerComponent(
|
|
9711
|
+
function FlatColorPickerComponent(host, service, localizationService, cdr, renderer, ngZone) {
|
|
9735
9712
|
var _this = this;
|
|
9736
|
-
this.service = service;
|
|
9737
9713
|
this.host = host;
|
|
9714
|
+
this.service = service;
|
|
9738
9715
|
this.localizationService = localizationService;
|
|
9739
9716
|
this.cdr = cdr;
|
|
9740
9717
|
this.renderer = renderer;
|
|
@@ -9817,6 +9794,7 @@ var FlatColorPickerComponent = /** @class */ (function () {
|
|
|
9817
9794
|
this.subscriptions = new Subscription();
|
|
9818
9795
|
this.notifyNgChanged = function () { };
|
|
9819
9796
|
this.notifyNgTouched = function () { };
|
|
9797
|
+
validatePackage(packageMetadata);
|
|
9820
9798
|
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(function (_a) {
|
|
9821
9799
|
var rtl = _a.rtl;
|
|
9822
9800
|
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
@@ -10248,8 +10226,8 @@ var FlatColorPickerComponent = /** @class */ (function () {
|
|
|
10248
10226
|
],
|
|
10249
10227
|
template: "\n <ng-container kendoFlatColorPickerLocalizedMessages\n i18n-flatColorPickerNoColor=\"kendo.flatcolorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty.\"\n flatColorPickerNoColor=\"Flatcolorpicker no color chosen\"\n i18n-colorGradientNoColor=\"kendo.flatcolorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorPaletteNoColor=\"kendo.flatcolorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty.\"\n colorPaletteNoColor=\"Colorpalette no color chosen\"\n i18n-colorGradientHandle=\"kendo.flatcolorpicker.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.flatcolorpicker.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.flatcolorpicker.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.flatcolorpicker.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-contrastRatio=\"kendo.flatcolorpicker.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-previewColor=\"kendo.flatcolorpicker.previewColor|The message for the color preview pane.\"\n previewColor=\"Color preview\"\n i18n-revertSelection=\"kendo.flatcolorpicker.revertSelection|The message for the selected color pane.\"\n revertSelection=\"Revert selection\"\n i18n-gradientView=\"kendo.flatcolorpicker.gradientView|The message for the gradient view button.\"\n gradientView=\"Gradient view\"\n i18n-paletteView=\"kendo.flatcolorpicker.paletteView|The message for the palette view button.\"\n paletteView=\"Palette view\"\n i18n-formatButton=\"kendo.flatcolorpicker.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\"\n i18n-applyButton=\"kendo.flatcolorpicker.applyButton|The message for the Apply action button.\"\n applyButton=\"Apply\"\n i18n-cancelButton=\"kendo.flatcolorpicker.cancelButton|The message for the Cancel action button.\"\n cancelButton=\"Cancel\">\n </ng-container>\n <div kendoFlatColorPickerHeader\n *ngIf=\"headerHasContent\"\n #header\n [clearButton]=\"clearButton\"\n [activeView]=\"activeView\"\n [views]=\"views\"\n [value]=\"value\"\n [selection]=\"selection\"\n [preview]=\"preview\"\n (clearButtonClick)=\"onClearButtonClick()\"\n (viewChange)=\"onViewChange($event)\"\n (valuePaneClick)=\"resetSelection($event)\">\n </div>\n <div class=\"k-coloreditor-views k-vstack\">\n <kendo-colorgradient #gradient\n *ngIf=\"activeView === 'gradient'\"\n [tabindex]=\"null\"\n [value]=\"selection\"\n [format]=\"format\"\n [opacity]=\"gradientSettings.opacity\"\n [delay]=\"gradientSettings.delay\"\n [contrastTool]=\"gradientSettings.contrastTool\"\n [readonly]=\"readonly\"\n (valueChange)=\"handleValueChange($event)\"\n >\n </kendo-colorgradient>\n <kendo-colorpalette #palette\n *ngIf=\"activeView === 'palette'\"\n kendoFocusOnDomReady\n [palette]=\"paletteSettings.palette\"\n [columns]=\"paletteSettings.columns\"\n [tileSize]=\"paletteSettings.tileSize\"\n [format]=\"format\"\n [value]=\"selection\"\n (valueChange)=\"handleValueChange($event)\"\n >\n </kendo-colorpalette>\n </div>\n <div kendoFlatColorPickerActionButtons *ngIf=\"preview\"\n #footer\n [ngClass]=\"'k-justify-content-' + actionsLayout\"\n (actionButtonClick)=\"onAction($event)\">\n </div>\n"
|
|
10250
10228
|
}),
|
|
10251
|
-
__metadata("design:paramtypes", [
|
|
10252
|
-
|
|
10229
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
10230
|
+
FlatColorPickerService,
|
|
10253
10231
|
LocalizationService,
|
|
10254
10232
|
ChangeDetectorRef,
|
|
10255
10233
|
Renderer2,
|
|
@@ -10258,7 +10236,7 @@ var FlatColorPickerComponent = /** @class */ (function () {
|
|
|
10258
10236
|
return FlatColorPickerComponent;
|
|
10259
10237
|
}());
|
|
10260
10238
|
|
|
10261
|
-
var
|
|
10239
|
+
var DOM_FOCUS_EVENTS = ['focus', 'blur'];
|
|
10262
10240
|
/**
|
|
10263
10241
|
* Represents the [Kendo UI ColorPicker component for Angular]({% slug overview_colorpicker %}).
|
|
10264
10242
|
*
|
|
@@ -10275,10 +10253,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10275
10253
|
this.ngZone = ngZone;
|
|
10276
10254
|
this.renderer = renderer;
|
|
10277
10255
|
this.hostClasses = true;
|
|
10278
|
-
|
|
10279
|
-
* @hidden
|
|
10280
|
-
*/
|
|
10281
|
-
this.focusableId = "k-colorpicker-" + serial$2++;
|
|
10256
|
+
this.role = 'listbox';
|
|
10282
10257
|
/**
|
|
10283
10258
|
* Specifies the views that will be rendered in the popup.
|
|
10284
10259
|
* By default both the gradient and palette views will be rendered.
|
|
@@ -10374,6 +10349,10 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10374
10349
|
* Used to provide a two-way binding for the `activeView` property.
|
|
10375
10350
|
*/
|
|
10376
10351
|
this.activeViewChange = new EventEmitter();
|
|
10352
|
+
/**
|
|
10353
|
+
* Indicates whether the ColorPicker wrapper is focused.
|
|
10354
|
+
*/
|
|
10355
|
+
this.isFocused = false;
|
|
10377
10356
|
this._tabindex = 0;
|
|
10378
10357
|
this._popupSettings = { animate: true };
|
|
10379
10358
|
this._paletteSettings = {};
|
|
@@ -10381,8 +10360,10 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10381
10360
|
this._size = 'medium';
|
|
10382
10361
|
this._rounded = 'medium';
|
|
10383
10362
|
this._fillMode = 'solid';
|
|
10363
|
+
this.subscriptions = new Subscription();
|
|
10384
10364
|
this.notifyNgTouched = function () { };
|
|
10385
10365
|
this.notifyNgChanged = function () { };
|
|
10366
|
+
this.domFocusListener = function (event) { return event.stopImmediatePropagation(); };
|
|
10386
10367
|
validatePackage(packageMetadata);
|
|
10387
10368
|
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(function (_a) {
|
|
10388
10369
|
var rtl = _a.rtl;
|
|
@@ -10390,6 +10371,54 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10390
10371
|
});
|
|
10391
10372
|
}
|
|
10392
10373
|
ColorPickerComponent_1 = ColorPickerComponent;
|
|
10374
|
+
Object.defineProperty(ColorPickerComponent.prototype, "focusedClass", {
|
|
10375
|
+
get: function () {
|
|
10376
|
+
return this.isFocused;
|
|
10377
|
+
},
|
|
10378
|
+
enumerable: true,
|
|
10379
|
+
configurable: true
|
|
10380
|
+
});
|
|
10381
|
+
Object.defineProperty(ColorPickerComponent.prototype, "disabledClass", {
|
|
10382
|
+
get: function () {
|
|
10383
|
+
return this.disabled;
|
|
10384
|
+
},
|
|
10385
|
+
enumerable: true,
|
|
10386
|
+
configurable: true
|
|
10387
|
+
});
|
|
10388
|
+
Object.defineProperty(ColorPickerComponent.prototype, "ariaReadonly", {
|
|
10389
|
+
get: function () {
|
|
10390
|
+
return this.readonly;
|
|
10391
|
+
},
|
|
10392
|
+
enumerable: true,
|
|
10393
|
+
configurable: true
|
|
10394
|
+
});
|
|
10395
|
+
Object.defineProperty(ColorPickerComponent.prototype, "ariaExpanded", {
|
|
10396
|
+
get: function () {
|
|
10397
|
+
return this.isOpen;
|
|
10398
|
+
},
|
|
10399
|
+
enumerable: true,
|
|
10400
|
+
configurable: true
|
|
10401
|
+
});
|
|
10402
|
+
Object.defineProperty(ColorPickerComponent.prototype, "hostTabindex", {
|
|
10403
|
+
get: function () {
|
|
10404
|
+
return this.tabindex;
|
|
10405
|
+
},
|
|
10406
|
+
enumerable: true,
|
|
10407
|
+
configurable: true
|
|
10408
|
+
});
|
|
10409
|
+
Object.defineProperty(ColorPickerComponent.prototype, "view", {
|
|
10410
|
+
get: function () {
|
|
10411
|
+
return (this.views && this.views.length > 0) ? this.views[0] : null;
|
|
10412
|
+
},
|
|
10413
|
+
/**
|
|
10414
|
+
* @hidden
|
|
10415
|
+
*/
|
|
10416
|
+
set: function (view) {
|
|
10417
|
+
this.views = [view];
|
|
10418
|
+
},
|
|
10419
|
+
enumerable: true,
|
|
10420
|
+
configurable: true
|
|
10421
|
+
});
|
|
10393
10422
|
Object.defineProperty(ColorPickerComponent.prototype, "value", {
|
|
10394
10423
|
get: function () {
|
|
10395
10424
|
return this._value;
|
|
@@ -10566,6 +10595,9 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10566
10595
|
stylingInputs.forEach(function (input) {
|
|
10567
10596
|
_this.handleClasses(_this[input], input);
|
|
10568
10597
|
});
|
|
10598
|
+
this.setHostElementAriaLabel();
|
|
10599
|
+
this.handleHostId();
|
|
10600
|
+
this.initDomEvents();
|
|
10569
10601
|
};
|
|
10570
10602
|
ColorPickerComponent.prototype.ngOnChanges = function (changes) {
|
|
10571
10603
|
if (changes.format && changes.format.currentValue === 'name') {
|
|
@@ -10575,23 +10607,18 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10575
10607
|
this.format = 'rgba';
|
|
10576
10608
|
this.value = parseColor$1(this.value, this.format, this.gradientSettings.opacity);
|
|
10577
10609
|
}
|
|
10610
|
+
if (isChanged('value', changes)) {
|
|
10611
|
+
this.setHostElementAriaLabel();
|
|
10612
|
+
}
|
|
10578
10613
|
};
|
|
10579
10614
|
ColorPickerComponent.prototype.ngOnDestroy = function () {
|
|
10580
10615
|
this.closePopup();
|
|
10581
10616
|
if (this.dynamicRTLSubscription) {
|
|
10582
10617
|
this.dynamicRTLSubscription.unsubscribe();
|
|
10583
10618
|
}
|
|
10619
|
+
this.subscriptions.unsubscribe();
|
|
10620
|
+
this.handleDomEvents('remove', DOM_FOCUS_EVENTS);
|
|
10584
10621
|
};
|
|
10585
|
-
Object.defineProperty(ColorPickerComponent.prototype, "colorPickerAriaLabel", {
|
|
10586
|
-
/**
|
|
10587
|
-
* @hidden
|
|
10588
|
-
*/
|
|
10589
|
-
get: function () {
|
|
10590
|
-
return this.value ? this.value : this.localizationService.get('colorPickerNoColor');
|
|
10591
|
-
},
|
|
10592
|
-
enumerable: true,
|
|
10593
|
-
configurable: true
|
|
10594
|
-
});
|
|
10595
10622
|
/**
|
|
10596
10623
|
* @hidden
|
|
10597
10624
|
*/
|
|
@@ -10602,55 +10629,74 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10602
10629
|
* @hidden
|
|
10603
10630
|
*/
|
|
10604
10631
|
ColorPickerComponent.prototype.togglePopup = function () {
|
|
10605
|
-
this.toggleWithEvents(!this.isOpen);
|
|
10606
10632
|
this.focus();
|
|
10633
|
+
this.toggleWithEvents(!this.isOpen);
|
|
10607
10634
|
};
|
|
10608
10635
|
/**
|
|
10609
10636
|
* @hidden
|
|
10610
10637
|
*/
|
|
10611
|
-
ColorPickerComponent.prototype.
|
|
10638
|
+
ColorPickerComponent.prototype.handleWrapperClick = function (event) {
|
|
10639
|
+
var _this = this;
|
|
10640
|
+
if (this.disabled) {
|
|
10641
|
+
return;
|
|
10642
|
+
}
|
|
10612
10643
|
this.focus();
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10644
|
+
if (closest(event.target, function (element) { return element === _this.activeColor.nativeElement; })) {
|
|
10645
|
+
var event_1 = new ActiveColorClickEvent(this.value);
|
|
10646
|
+
this.activeColorClick.emit(event_1);
|
|
10647
|
+
if (!event_1.isOpenPrevented() || this.isOpen) {
|
|
10648
|
+
this.toggleWithEvents(!this.isOpen);
|
|
10649
|
+
}
|
|
10650
|
+
return;
|
|
10617
10651
|
}
|
|
10652
|
+
this.toggleWithEvents(!this.isOpen);
|
|
10618
10653
|
};
|
|
10619
10654
|
/**
|
|
10620
10655
|
* Focuses the wrapper of the ColorPicker.
|
|
10621
10656
|
*/
|
|
10622
10657
|
ColorPickerComponent.prototype.focus = function () {
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
}
|
|
10626
|
-
this.wrapper.nativeElement.focus();
|
|
10658
|
+
this.isFocused = true;
|
|
10659
|
+
this.host.nativeElement.focus();
|
|
10627
10660
|
};
|
|
10628
10661
|
/**
|
|
10629
10662
|
* @hidden
|
|
10630
10663
|
*/
|
|
10631
10664
|
ColorPickerComponent.prototype.handleWrapperFocus = function () {
|
|
10665
|
+
var _this = this;
|
|
10632
10666
|
if (this.isFocused) {
|
|
10633
10667
|
return;
|
|
10634
10668
|
}
|
|
10635
|
-
this.
|
|
10636
|
-
|
|
10669
|
+
this.ngZone.run(function () {
|
|
10670
|
+
_this.focus();
|
|
10671
|
+
_this.onFocus.emit();
|
|
10672
|
+
});
|
|
10637
10673
|
};
|
|
10638
10674
|
/**
|
|
10639
10675
|
* Blurs the ColorPicker.
|
|
10640
10676
|
*/
|
|
10641
10677
|
ColorPickerComponent.prototype.blur = function () {
|
|
10642
|
-
this.
|
|
10678
|
+
this.isFocused = false;
|
|
10679
|
+
this.host.nativeElement.blur();
|
|
10680
|
+
this.notifyNgTouched();
|
|
10643
10681
|
};
|
|
10644
10682
|
/**
|
|
10645
10683
|
* @hidden
|
|
10646
10684
|
*/
|
|
10647
10685
|
ColorPickerComponent.prototype.handleWrapperBlur = function () {
|
|
10686
|
+
var _this = this;
|
|
10648
10687
|
if (this.isOpen) {
|
|
10649
10688
|
return;
|
|
10650
10689
|
}
|
|
10651
|
-
this.
|
|
10652
|
-
|
|
10653
|
-
|
|
10690
|
+
this.ngZone.run(function () {
|
|
10691
|
+
_this.onBlur.emit();
|
|
10692
|
+
_this.isFocused = false;
|
|
10693
|
+
});
|
|
10694
|
+
};
|
|
10695
|
+
/**
|
|
10696
|
+
* @hidden
|
|
10697
|
+
*/
|
|
10698
|
+
ColorPickerComponent.prototype.arrowButtonMouseDown = function (ev) {
|
|
10699
|
+
ev.preventDefault();
|
|
10654
10700
|
};
|
|
10655
10701
|
/**
|
|
10656
10702
|
* Clears the value of the ColorPicker.
|
|
@@ -10660,6 +10706,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10660
10706
|
return;
|
|
10661
10707
|
}
|
|
10662
10708
|
this._value = undefined;
|
|
10709
|
+
this.setHostElementAriaLabel();
|
|
10663
10710
|
this.notifyNgChanged(undefined);
|
|
10664
10711
|
};
|
|
10665
10712
|
/**
|
|
@@ -10687,6 +10734,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10687
10734
|
if (valueChange) {
|
|
10688
10735
|
this.value = parsedColor;
|
|
10689
10736
|
this.valueChange.emit(parsedColor);
|
|
10737
|
+
this.setHostElementAriaLabel();
|
|
10690
10738
|
this.notifyNgChanged(parsedColor);
|
|
10691
10739
|
}
|
|
10692
10740
|
};
|
|
@@ -10731,9 +10779,12 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10731
10779
|
* @hidden
|
|
10732
10780
|
*/
|
|
10733
10781
|
ColorPickerComponent.prototype.handleWrapperKeyDown = function (event) {
|
|
10782
|
+
var _this = this;
|
|
10734
10783
|
if (event.keyCode === Keys.ArrowDown || event.keyCode === Keys.Enter) {
|
|
10735
10784
|
event.preventDefault();
|
|
10736
|
-
this.
|
|
10785
|
+
this.ngZone.run(function () {
|
|
10786
|
+
_this.toggleWithEvents(true);
|
|
10787
|
+
});
|
|
10737
10788
|
}
|
|
10738
10789
|
};
|
|
10739
10790
|
/**
|
|
@@ -10742,14 +10793,14 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10742
10793
|
ColorPickerComponent.prototype.handlePopupKeyDown = function (event) {
|
|
10743
10794
|
if (event.keyCode === Keys.Escape) {
|
|
10744
10795
|
this.toggleWithEvents(false);
|
|
10745
|
-
this.
|
|
10796
|
+
this.host.nativeElement.focus();
|
|
10746
10797
|
}
|
|
10747
10798
|
if (event.keyCode === Keys.Tab) {
|
|
10748
10799
|
var currentElement = event.shiftKey ? this.firstFocusableElement.nativeElement : this.lastFocusableElement.nativeElement;
|
|
10749
10800
|
var nextElement = event.shiftKey ? this.lastFocusableElement.nativeElement : this.firstFocusableElement.nativeElement;
|
|
10750
10801
|
if (event.target === currentElement) {
|
|
10751
10802
|
event.preventDefault();
|
|
10752
|
-
nextElement.
|
|
10803
|
+
nextElement.focus();
|
|
10753
10804
|
}
|
|
10754
10805
|
}
|
|
10755
10806
|
};
|
|
@@ -10760,6 +10811,10 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10760
10811
|
ColorPickerComponent.prototype.isEmpty = function () {
|
|
10761
10812
|
return false;
|
|
10762
10813
|
};
|
|
10814
|
+
ColorPickerComponent.prototype.setHostElementAriaLabel = function () {
|
|
10815
|
+
var ariaLabelValue = "" + (this.value ? this.value : this.localizationService.get('colorPickerNoColor'));
|
|
10816
|
+
this.renderer.setAttribute(this.host.nativeElement, 'aria-label', ariaLabelValue);
|
|
10817
|
+
};
|
|
10763
10818
|
ColorPickerComponent.prototype.handleClasses = function (value, input) {
|
|
10764
10819
|
var elem = this.host.nativeElement;
|
|
10765
10820
|
var classes = getStylingClasses('picker', input, this[input], value);
|
|
@@ -10771,9 +10826,10 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10771
10826
|
}
|
|
10772
10827
|
};
|
|
10773
10828
|
ColorPickerComponent.prototype.popupBlurInvalid = function (ev) {
|
|
10774
|
-
var
|
|
10775
|
-
var
|
|
10776
|
-
|
|
10829
|
+
var _this = this;
|
|
10830
|
+
var focusInFlatColorPickerElement = this.popupRef.popupElement.contains(ev.relatedTarget);
|
|
10831
|
+
var hostClicked = closest(ev.relatedTarget, function (element) { return element === _this.host.nativeElement; });
|
|
10832
|
+
return hostClicked || focusInFlatColorPickerElement;
|
|
10777
10833
|
};
|
|
10778
10834
|
ColorPickerComponent.prototype.toggleWithEvents = function (open) {
|
|
10779
10835
|
var sameState = this.isOpen === open;
|
|
@@ -10798,12 +10854,12 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10798
10854
|
};
|
|
10799
10855
|
ColorPickerComponent.prototype.focusFirstElement = function () {
|
|
10800
10856
|
var _this = this;
|
|
10801
|
-
this.ngZone.
|
|
10802
|
-
|
|
10857
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(function () {
|
|
10858
|
+
if (_this.flatColorPicker) {
|
|
10803
10859
|
var elementToFocus = _this.flatColorPicker.gradient ? _this.flatColorPicker.gradient.gradientDragHandle :
|
|
10804
10860
|
_this.flatColorPicker.palette.host;
|
|
10805
10861
|
elementToFocus.nativeElement.focus();
|
|
10806
|
-
}
|
|
10862
|
+
}
|
|
10807
10863
|
});
|
|
10808
10864
|
};
|
|
10809
10865
|
ColorPickerComponent.prototype.openPopup = function () {
|
|
@@ -10812,7 +10868,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10812
10868
|
var anchorPosition = { horizontal: horizontalAlign, vertical: "bottom" };
|
|
10813
10869
|
var popupPosition = { horizontal: horizontalAlign, vertical: "top" };
|
|
10814
10870
|
this.popupRef = this.popupService.open({
|
|
10815
|
-
anchor: this.
|
|
10871
|
+
anchor: this.activeColor,
|
|
10816
10872
|
animate: this.popupSettings.animate,
|
|
10817
10873
|
appendTo: this.popupSettings.appendTo,
|
|
10818
10874
|
popupAlign: popupPosition,
|
|
@@ -10824,7 +10880,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10824
10880
|
this.popupRef.popupAnchorViewportLeave.subscribe(function () {
|
|
10825
10881
|
_this.toggleWithEvents(false);
|
|
10826
10882
|
if (!_this.isOpen) {
|
|
10827
|
-
_this.
|
|
10883
|
+
_this.host.nativeElement.focus({
|
|
10828
10884
|
preventScroll: true
|
|
10829
10885
|
});
|
|
10830
10886
|
}
|
|
@@ -10860,6 +10916,53 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10860
10916
|
enumerable: true,
|
|
10861
10917
|
configurable: true
|
|
10862
10918
|
});
|
|
10919
|
+
ColorPickerComponent.prototype.handleDomEvents = function (action, events) {
|
|
10920
|
+
var _this = this;
|
|
10921
|
+
var hostElement = this.host.nativeElement;
|
|
10922
|
+
events.forEach(function (ev) { return hostElement[action + "EventListener"](ev, _this.domFocusListener, true); });
|
|
10923
|
+
};
|
|
10924
|
+
ColorPickerComponent.prototype.initDomEvents = function () {
|
|
10925
|
+
var _this = this;
|
|
10926
|
+
if (!this.host) {
|
|
10927
|
+
return;
|
|
10928
|
+
}
|
|
10929
|
+
var hostElement = this.host.nativeElement;
|
|
10930
|
+
this.ngZone.runOutsideAngular(function () {
|
|
10931
|
+
_this.subscriptions.add(_this.renderer.listen(hostElement, 'focusin', function () {
|
|
10932
|
+
_this.handleWrapperFocus();
|
|
10933
|
+
}));
|
|
10934
|
+
_this.subscriptions.add(_this.renderer.listen(hostElement, 'focusout', function (event) {
|
|
10935
|
+
var closestPopup = _this.popupRef ?
|
|
10936
|
+
closest(event.relatedTarget, function (element) { return element === _this.flatColorPicker.host.nativeElement; }) :
|
|
10937
|
+
false;
|
|
10938
|
+
var closestWrapper = closest(event.relatedTarget, function (element) { return element === _this.host.nativeElement; });
|
|
10939
|
+
if (!closestPopup && !closestWrapper) {
|
|
10940
|
+
_this.handleWrapperBlur();
|
|
10941
|
+
}
|
|
10942
|
+
}));
|
|
10943
|
+
_this.handleDomEvents('add', DOM_FOCUS_EVENTS);
|
|
10944
|
+
_this.subscriptions.add(_this.renderer.listen(hostElement, 'keydown', function (event) {
|
|
10945
|
+
_this.handleWrapperKeyDown(event);
|
|
10946
|
+
}));
|
|
10947
|
+
_this.subscriptions.add(_this.renderer.listen(hostElement, 'click', function (event) {
|
|
10948
|
+
_this.ngZone.run(function () {
|
|
10949
|
+
_this.handleWrapperClick(event);
|
|
10950
|
+
});
|
|
10951
|
+
}));
|
|
10952
|
+
});
|
|
10953
|
+
};
|
|
10954
|
+
ColorPickerComponent.prototype.handleHostId = function () {
|
|
10955
|
+
var hostElement = this.host.nativeElement;
|
|
10956
|
+
var existingId = hostElement.getAttribute('id');
|
|
10957
|
+
if (existingId) {
|
|
10958
|
+
this.focusableId = existingId;
|
|
10959
|
+
}
|
|
10960
|
+
else {
|
|
10961
|
+
var id = "k-" + guid();
|
|
10962
|
+
hostElement.setAttribute('id', id);
|
|
10963
|
+
this.focusableId = id;
|
|
10964
|
+
}
|
|
10965
|
+
};
|
|
10863
10966
|
var ColorPickerComponent_1;
|
|
10864
10967
|
__decorate([
|
|
10865
10968
|
HostBinding('class.k-colorpicker'),
|
|
@@ -10867,18 +10970,49 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10867
10970
|
HostBinding('class.k-picker'),
|
|
10868
10971
|
__metadata("design:type", Boolean)
|
|
10869
10972
|
], ColorPickerComponent.prototype, "hostClasses", void 0);
|
|
10973
|
+
__decorate([
|
|
10974
|
+
HostBinding('class.k-focus'),
|
|
10975
|
+
__metadata("design:type", Boolean),
|
|
10976
|
+
__metadata("design:paramtypes", [])
|
|
10977
|
+
], ColorPickerComponent.prototype, "focusedClass", null);
|
|
10978
|
+
__decorate([
|
|
10979
|
+
HostBinding('attr.aria-disabled'),
|
|
10980
|
+
HostBinding('class.k-disabled'),
|
|
10981
|
+
__metadata("design:type", Boolean),
|
|
10982
|
+
__metadata("design:paramtypes", [])
|
|
10983
|
+
], ColorPickerComponent.prototype, "disabledClass", null);
|
|
10984
|
+
__decorate([
|
|
10985
|
+
HostBinding('attr.aria-readonly'),
|
|
10986
|
+
__metadata("design:type", Boolean),
|
|
10987
|
+
__metadata("design:paramtypes", [])
|
|
10988
|
+
], ColorPickerComponent.prototype, "ariaReadonly", null);
|
|
10989
|
+
__decorate([
|
|
10990
|
+
HostBinding('attr.aria-expanded'),
|
|
10991
|
+
__metadata("design:type", Boolean),
|
|
10992
|
+
__metadata("design:paramtypes", [])
|
|
10993
|
+
], ColorPickerComponent.prototype, "ariaExpanded", null);
|
|
10994
|
+
__decorate([
|
|
10995
|
+
HostBinding('attr.tabindex'),
|
|
10996
|
+
__metadata("design:type", Number),
|
|
10997
|
+
__metadata("design:paramtypes", [])
|
|
10998
|
+
], ColorPickerComponent.prototype, "hostTabindex", null);
|
|
10870
10999
|
__decorate([
|
|
10871
11000
|
HostBinding('attr.dir'),
|
|
10872
11001
|
__metadata("design:type", String)
|
|
10873
11002
|
], ColorPickerComponent.prototype, "direction", void 0);
|
|
10874
11003
|
__decorate([
|
|
10875
|
-
|
|
11004
|
+
HostBinding('attr.role'),
|
|
10876
11005
|
__metadata("design:type", String)
|
|
10877
|
-
], ColorPickerComponent.prototype, "
|
|
11006
|
+
], ColorPickerComponent.prototype, "role", void 0);
|
|
10878
11007
|
__decorate([
|
|
10879
11008
|
Input(),
|
|
10880
11009
|
__metadata("design:type", Array)
|
|
10881
11010
|
], ColorPickerComponent.prototype, "views", void 0);
|
|
11011
|
+
__decorate([
|
|
11012
|
+
Input(),
|
|
11013
|
+
__metadata("design:type", String),
|
|
11014
|
+
__metadata("design:paramtypes", [String])
|
|
11015
|
+
], ColorPickerComponent.prototype, "view", null);
|
|
10882
11016
|
__decorate([
|
|
10883
11017
|
Input(),
|
|
10884
11018
|
__metadata("design:type", String)
|
|
@@ -10992,9 +11126,9 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10992
11126
|
__metadata("design:type", ViewContainerRef)
|
|
10993
11127
|
], ColorPickerComponent.prototype, "container", void 0);
|
|
10994
11128
|
__decorate([
|
|
10995
|
-
ViewChild('
|
|
11129
|
+
ViewChild('activeColor', { static: true }),
|
|
10996
11130
|
__metadata("design:type", ElementRef)
|
|
10997
|
-
], ColorPickerComponent.prototype, "
|
|
11131
|
+
], ColorPickerComponent.prototype, "activeColor", void 0);
|
|
10998
11132
|
__decorate([
|
|
10999
11133
|
ViewChild('popupTemplate', { static: true }),
|
|
11000
11134
|
__metadata("design:type", TemplateRef)
|
|
@@ -11025,7 +11159,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
11025
11159
|
useValue: 'kendo.colorpicker'
|
|
11026
11160
|
}
|
|
11027
11161
|
],
|
|
11028
|
-
template: "\n <ng-container kendoColorPickerLocalizedMessages\n i18n-colorPickerNoColor=\"kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty.\"\n colorPickerNoColor=\"Colorpicker no color chosen\"\n i18n-flatColorPickerNoColor=\"kendo.colorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty.\"\n flatColorPickerNoColor=\"Flatcolorpicker no color chosen\"\n i18n-colorGradientNoColor=\"kendo.colorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorPaletteNoColor=\"kendo.colorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty.\"\n colorPaletteNoColor=\"Colorpalette no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorpicker.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorpicker.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorpicker.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorpicker.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-contrastRatio=\"kendo.colorpicker.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-previewColor=\"kendo.colorpicker.previewColor|The message for the color preview pane.\"\n previewColor=\"Color preview\"\n i18n-revertSelection=\"kendo.colorpicker.revertSelection|The message for the selected color pane.\"\n revertSelection=\"Revert selection\"\n i18n-gradientView=\"kendo.colorpicker.gradientView|The message for the gradient view button.\"\n gradientView=\"Gradient view\"\n i18n-paletteView=\"kendo.colorpicker.paletteView|The message for the palette view button.\"\n paletteView=\"Palette view\"\n i18n-formatButton=\"kendo.colorpicker.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\"\n i18n-applyButton=\"kendo.colorpicker.applyButton|The message for the Apply action button.\"\n applyButton=\"Apply\"\n i18n-cancelButton=\"kendo.colorpicker.cancelButton|The message for the Cancel action button.\"\n cancelButton=\"Cancel\">\n </ng-container>\n <span
|
|
11162
|
+
template: "\n <ng-container kendoColorPickerLocalizedMessages\n i18n-colorPickerNoColor=\"kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty.\"\n colorPickerNoColor=\"Colorpicker no color chosen\"\n i18n-flatColorPickerNoColor=\"kendo.colorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty.\"\n flatColorPickerNoColor=\"Flatcolorpicker no color chosen\"\n i18n-colorGradientNoColor=\"kendo.colorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorPaletteNoColor=\"kendo.colorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty.\"\n colorPaletteNoColor=\"Colorpalette no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorpicker.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorpicker.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorpicker.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorpicker.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-contrastRatio=\"kendo.colorpicker.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-previewColor=\"kendo.colorpicker.previewColor|The message for the color preview pane.\"\n previewColor=\"Color preview\"\n i18n-revertSelection=\"kendo.colorpicker.revertSelection|The message for the selected color pane.\"\n revertSelection=\"Revert selection\"\n i18n-gradientView=\"kendo.colorpicker.gradientView|The message for the gradient view button.\"\n gradientView=\"Gradient view\"\n i18n-paletteView=\"kendo.colorpicker.paletteView|The message for the palette view button.\"\n paletteView=\"Palette view\"\n i18n-formatButton=\"kendo.colorpicker.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\"\n i18n-applyButton=\"kendo.colorpicker.applyButton|The message for the Apply action button.\"\n applyButton=\"Apply\"\n i18n-cancelButton=\"kendo.colorpicker.cancelButton|The message for the Cancel action button.\"\n cancelButton=\"Cancel\">\n </ng-container>\n <span #activeColor class=\"k-input-inner\">\n <span\n class=\"k-value-icon k-color-preview\"\n [ngClass]=\"{'k-icon-color-preview': iconStyles, 'k-no-color': !value}\">\n <span *ngIf=\"iconClass || icon\" class=\"k-color-preview-icon k-icon\" [ngClass]=\"iconStyles\"></span>\n <span class=\"k-color-preview-mask\" [style.background-color]=\"value\"></span>\n </span>\n </span>\n <button\n #arrowButton\n tabindex=\"-1\"\n role=\"button\"\n class=\"k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button\">\n <span class=\"k-button-icon k-icon k-i-arrow-s\"></span>\n </button>\n <ng-template #popupTemplate>\n <kendo-flatcolorpicker\n #flatColorPicker\n [value]=\"value\"\n [format]=\"format\"\n [views]=\"views\"\n [activeView]=\"activeView\"\n [actionsLayout]=\"actionsLayout\"\n [preview]=\"preview\"\n [gradientSettings]=\"gradientSettings\"\n [paletteSettings]=\"paletteSettings\"\n [clearButton]=\"clearButton\"\n (cancel)=\"handleCancelEvent($event)\"\n (focusout)=\"handlePopupBlur($event)\"\n (valueChange)=\"handleValueChange($event)\"\n (keydown)=\"handlePopupKeyDown($event)\"\n (activeViewChange)=\"activeViewChange.emit($event)\"\n (actionButtonClick)=\"togglePopup()\">\n </kendo-flatcolorpicker>\n </ng-template>\n <ng-container #container></ng-container>\n "
|
|
11029
11163
|
}),
|
|
11030
11164
|
__metadata("design:paramtypes", [ElementRef,
|
|
11031
11165
|
PopupService,
|
|
@@ -11626,6 +11760,7 @@ var RadioButtonDirective = /** @class */ (function () {
|
|
|
11626
11760
|
this.hostElement = hostElement;
|
|
11627
11761
|
this.kendoClass = true;
|
|
11628
11762
|
this._size = 'medium';
|
|
11763
|
+
validatePackage(packageMetadata);
|
|
11629
11764
|
}
|
|
11630
11765
|
Object.defineProperty(RadioButtonDirective.prototype, "size", {
|
|
11631
11766
|
get: function () {
|
|
@@ -11728,7 +11863,7 @@ var RadioButtonModule = /** @class */ (function () {
|
|
|
11728
11863
|
return RadioButtonModule;
|
|
11729
11864
|
}());
|
|
11730
11865
|
|
|
11731
|
-
var serial$
|
|
11866
|
+
var serial$2 = 0;
|
|
11732
11867
|
/**
|
|
11733
11868
|
* Represents an error message that will be shown underneath
|
|
11734
11869
|
* a Kendo control or native HTML form-bound component after a validation.
|
|
@@ -11747,7 +11882,7 @@ var ErrorComponent = /** @class */ (function () {
|
|
|
11747
11882
|
/**
|
|
11748
11883
|
* @hidden
|
|
11749
11884
|
*/
|
|
11750
|
-
this.id = "kendo-error-" + serial$
|
|
11885
|
+
this.id = "kendo-error-" + serial$2++;
|
|
11751
11886
|
this.roleAttribute = 'alert';
|
|
11752
11887
|
}
|
|
11753
11888
|
Object.defineProperty(ErrorComponent.prototype, "startClass", {
|
|
@@ -11807,7 +11942,7 @@ var ErrorComponent = /** @class */ (function () {
|
|
|
11807
11942
|
return ErrorComponent;
|
|
11808
11943
|
}());
|
|
11809
11944
|
|
|
11810
|
-
var serial$
|
|
11945
|
+
var serial$3 = 0;
|
|
11811
11946
|
/**
|
|
11812
11947
|
* Represents a hint message that will be shown underneath a form-bound component.
|
|
11813
11948
|
*/
|
|
@@ -11824,7 +11959,7 @@ var HintComponent = /** @class */ (function () {
|
|
|
11824
11959
|
/**
|
|
11825
11960
|
* @hidden
|
|
11826
11961
|
*/
|
|
11827
|
-
this.id = "kendo-hint-" + serial$
|
|
11962
|
+
this.id = "kendo-hint-" + serial$3++;
|
|
11828
11963
|
this.hostClass = true;
|
|
11829
11964
|
}
|
|
11830
11965
|
Object.defineProperty(HintComponent.prototype, "startClass", {
|