@progress/kendo-angular-inputs 8.0.0-dev.202112251033 → 8.0.0-dev.202201190602
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 +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 +2 -2
- 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 +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 +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/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 +19 -20
- package/dist/fesm2015/index.js +369 -285
- package/dist/fesm5/index.js +258 -140
- 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 +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 +2 -2
- package/dist/systemjs/kendo-angular-inputs.js +1 -1
- package/package.json +6 -6
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: 1642571836,
|
|
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,
|
|
@@ -1965,7 +1946,7 @@ var SwitchComponent = /** @class */ (function () {
|
|
|
1965
1946
|
return this._size;
|
|
1966
1947
|
},
|
|
1967
1948
|
/**
|
|
1968
|
-
* Specifies the
|
|
1949
|
+
* Specifies the width and height of the Switch.
|
|
1969
1950
|
*
|
|
1970
1951
|
* The possible values are:
|
|
1971
1952
|
* * `'small'`
|
|
@@ -3253,7 +3234,7 @@ var NumericTextBoxComponent = /** @class */ (function () {
|
|
|
3253
3234
|
return this._size;
|
|
3254
3235
|
},
|
|
3255
3236
|
/**
|
|
3256
|
-
* The size property specifies
|
|
3237
|
+
* The size property specifies padding of the NumericTextBox internal input element
|
|
3257
3238
|
* ([see example]({% slug appearance_numerictextbox %}#toc-size)).
|
|
3258
3239
|
* The possible values are:
|
|
3259
3240
|
* * `'small'`
|
|
@@ -4677,7 +4658,7 @@ var MaskedTextBoxComponent = /** @class */ (function () {
|
|
|
4677
4658
|
return this._size;
|
|
4678
4659
|
},
|
|
4679
4660
|
/**
|
|
4680
|
-
* The size property specifies the
|
|
4661
|
+
* The size property specifies the padding of the MaskedTextBox internal input element
|
|
4681
4662
|
* ([see example]({% slug appearance_maskedtextbox %}#toc-size)).
|
|
4682
4663
|
* The possible values are:
|
|
4683
4664
|
* * `'small'`
|
|
@@ -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
|
}());
|
|
@@ -6129,7 +6104,7 @@ var TextBoxComponent = /** @class */ (function () {
|
|
|
6129
6104
|
return this._size;
|
|
6130
6105
|
},
|
|
6131
6106
|
/**
|
|
6132
|
-
* The size property specifies the
|
|
6107
|
+
* The size property specifies the padding of the TextBox internal input element
|
|
6133
6108
|
* ([see example]({% slug appearance_textbox %}#toc-size)).
|
|
6134
6109
|
*
|
|
6135
6110
|
* The possible values are:
|
|
@@ -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,
|
|
@@ -7173,7 +7148,7 @@ var TextAreaComponent = /** @class */ (function (_super) {
|
|
|
7173
7148
|
return this._size;
|
|
7174
7149
|
},
|
|
7175
7150
|
/**
|
|
7176
|
-
* The size property specifies the
|
|
7151
|
+
* The size property specifies the padding of the internal textarea element
|
|
7177
7152
|
* ([see example]({% slug appearance_textarea %}#toc-size)).
|
|
7178
7153
|
*
|
|
7179
7154
|
* The possible values are:
|
|
@@ -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
|
}
|
|
@@ -7555,7 +7530,8 @@ var TextAreaComponent = /** @class */ (function (_super) {
|
|
|
7555
7530
|
{ provide: KendoInput, useExisting: forwardRef(function () { return TextAreaComponent_1; }) }
|
|
7556
7531
|
],
|
|
7557
7532
|
selector: 'kendo-textarea',
|
|
7558
|
-
template: "\n <textarea\n #input\n [attr.aria-multiline]=\"true\"\n [attr.aria-disabled]=\"disabled ? true : undefined\"\n [attr.aria-readonly]=\"readonly ? true : undefined\"\n class=\"k-input-inner\"\n [ngClass]=\"resizableClass\"\n [id]=\"focusableId\"\n [value]=\"value\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.rows]=\"rows\"\n [attr.cols]=\"cols\"\n [attr.tabindex]=\"tabIndex\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"maxlength\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleInputFocus,\n blur: handleInputBlur,\n input: handleInput}\">\n </textarea>\n <ng-content select=\"kendo-textarea-suffix\"></ng-content>\n "
|
|
7533
|
+
template: "\n <textarea\n #input\n [attr.aria-multiline]=\"true\"\n [attr.aria-disabled]=\"disabled ? true : undefined\"\n [attr.aria-readonly]=\"readonly ? true : undefined\"\n class=\"k-input-inner\"\n [ngClass]=\"resizableClass\"\n [id]=\"focusableId\"\n [value]=\"value\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.rows]=\"rows\"\n [attr.cols]=\"cols\"\n [attr.tabindex]=\"tabIndex\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"maxlength\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleInputFocus,\n blur: handleInputBlur,\n input: handleInput}\">\n </textarea>\n <ng-content select=\"kendo-textarea-suffix\"></ng-content>\n ",
|
|
7534
|
+
styles: ["\n :host(.k-flex-col) {\n flex-direction: column !important;\n }\n :host(.k-flex-row) {\n flex-direction: row !important;\n }\n "]
|
|
7559
7535
|
}),
|
|
7560
7536
|
__metadata("design:paramtypes", [LocalizationService,
|
|
7561
7537
|
NgZone,
|
|
@@ -8347,7 +8323,7 @@ var ColorInputComponent = /** @class */ (function () {
|
|
|
8347
8323
|
ColorInputComponent = __decorate([
|
|
8348
8324
|
Component({
|
|
8349
8325
|
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 "
|
|
8326
|
+
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
8327
|
}),
|
|
8352
8328
|
__metadata("design:paramtypes", [ElementRef,
|
|
8353
8329
|
Renderer2,
|
|
@@ -8435,6 +8411,7 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
8435
8411
|
this.updateValues = new Subject();
|
|
8436
8412
|
this.notifyNgChanged = function () { };
|
|
8437
8413
|
this.notifyNgTouched = function () { };
|
|
8414
|
+
validatePackage(packageMetadata);
|
|
8438
8415
|
this.dynamicRTLSubscription = localizationService.changes.subscribe(function (_a) {
|
|
8439
8416
|
var rtl = _a.rtl;
|
|
8440
8417
|
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
@@ -9014,6 +8991,32 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
9014
8991
|
return ColorGradientComponent;
|
|
9015
8992
|
}());
|
|
9016
8993
|
|
|
8994
|
+
/**
|
|
8995
|
+
* @hidden
|
|
8996
|
+
*/
|
|
8997
|
+
var ColorPaletteLocalizationService = /** @class */ (function (_super) {
|
|
8998
|
+
__extends(ColorPaletteLocalizationService, _super);
|
|
8999
|
+
function ColorPaletteLocalizationService(prefix, messageService, _rtl, flatColorPickerLocalization) {
|
|
9000
|
+
var _this = _super.call(this, prefix, messageService, _rtl) || this;
|
|
9001
|
+
_this.flatColorPickerLocalization = flatColorPickerLocalization;
|
|
9002
|
+
return _this;
|
|
9003
|
+
}
|
|
9004
|
+
ColorPaletteLocalizationService.prototype.get = function (shortKey) {
|
|
9005
|
+
if (this.flatColorPickerLocalization) {
|
|
9006
|
+
return this.flatColorPickerLocalization.get(shortKey);
|
|
9007
|
+
}
|
|
9008
|
+
return _super.prototype.get.call(this, shortKey);
|
|
9009
|
+
};
|
|
9010
|
+
ColorPaletteLocalizationService = __decorate([
|
|
9011
|
+
__param(0, Inject(L10N_PREFIX)),
|
|
9012
|
+
__param(1, Optional()),
|
|
9013
|
+
__param(2, Optional()), __param(2, Inject(RTL)),
|
|
9014
|
+
__param(3, Optional()), __param(3, Inject(FlatColorPickerLocalizationService)),
|
|
9015
|
+
__metadata("design:paramtypes", [String, MessageService, Boolean, FlatColorPickerLocalizationService])
|
|
9016
|
+
], ColorPaletteLocalizationService);
|
|
9017
|
+
return ColorPaletteLocalizationService;
|
|
9018
|
+
}(LocalizationService));
|
|
9019
|
+
|
|
9017
9020
|
/**
|
|
9018
9021
|
* @hidden
|
|
9019
9022
|
*/
|
|
@@ -9074,32 +9077,6 @@ var ColorPaletteService = /** @class */ (function () {
|
|
|
9074
9077
|
return ColorPaletteService;
|
|
9075
9078
|
}());
|
|
9076
9079
|
|
|
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
9080
|
var DEFAULT_TILE_SIZE = 24;
|
|
9104
9081
|
var DEFAULT_COLUMNS_COUNT = 10;
|
|
9105
9082
|
var DEFAULT_PRESET$1 = 'office';
|
|
@@ -9173,6 +9150,7 @@ var ColorPaletteComponent = /** @class */ (function () {
|
|
|
9173
9150
|
this._tabindex = 0;
|
|
9174
9151
|
this.notifyNgTouched = function () { };
|
|
9175
9152
|
this.notifyNgChanged = function () { };
|
|
9153
|
+
validatePackage(packageMetadata);
|
|
9176
9154
|
this.dynamicRTLSubscription = localizationService.changes.subscribe(function (_a) {
|
|
9177
9155
|
var rtl = _a.rtl;
|
|
9178
9156
|
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
@@ -9731,10 +9709,10 @@ var FlatColorPickerActionButtonsComponent = /** @class */ (function () {
|
|
|
9731
9709
|
* 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
9710
|
*/
|
|
9733
9711
|
var FlatColorPickerComponent = /** @class */ (function () {
|
|
9734
|
-
function FlatColorPickerComponent(
|
|
9712
|
+
function FlatColorPickerComponent(host, service, localizationService, cdr, renderer, ngZone) {
|
|
9735
9713
|
var _this = this;
|
|
9736
|
-
this.service = service;
|
|
9737
9714
|
this.host = host;
|
|
9715
|
+
this.service = service;
|
|
9738
9716
|
this.localizationService = localizationService;
|
|
9739
9717
|
this.cdr = cdr;
|
|
9740
9718
|
this.renderer = renderer;
|
|
@@ -9817,6 +9795,7 @@ var FlatColorPickerComponent = /** @class */ (function () {
|
|
|
9817
9795
|
this.subscriptions = new Subscription();
|
|
9818
9796
|
this.notifyNgChanged = function () { };
|
|
9819
9797
|
this.notifyNgTouched = function () { };
|
|
9798
|
+
validatePackage(packageMetadata);
|
|
9820
9799
|
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(function (_a) {
|
|
9821
9800
|
var rtl = _a.rtl;
|
|
9822
9801
|
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
@@ -10248,8 +10227,8 @@ var FlatColorPickerComponent = /** @class */ (function () {
|
|
|
10248
10227
|
],
|
|
10249
10228
|
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
10229
|
}),
|
|
10251
|
-
__metadata("design:paramtypes", [
|
|
10252
|
-
|
|
10230
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
10231
|
+
FlatColorPickerService,
|
|
10253
10232
|
LocalizationService,
|
|
10254
10233
|
ChangeDetectorRef,
|
|
10255
10234
|
Renderer2,
|
|
@@ -10258,7 +10237,7 @@ var FlatColorPickerComponent = /** @class */ (function () {
|
|
|
10258
10237
|
return FlatColorPickerComponent;
|
|
10259
10238
|
}());
|
|
10260
10239
|
|
|
10261
|
-
var
|
|
10240
|
+
var DOM_FOCUS_EVENTS = ['focus', 'blur'];
|
|
10262
10241
|
/**
|
|
10263
10242
|
* Represents the [Kendo UI ColorPicker component for Angular]({% slug overview_colorpicker %}).
|
|
10264
10243
|
*
|
|
@@ -10275,10 +10254,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10275
10254
|
this.ngZone = ngZone;
|
|
10276
10255
|
this.renderer = renderer;
|
|
10277
10256
|
this.hostClasses = true;
|
|
10278
|
-
|
|
10279
|
-
* @hidden
|
|
10280
|
-
*/
|
|
10281
|
-
this.focusableId = "k-colorpicker-" + serial$2++;
|
|
10257
|
+
this.role = 'listbox';
|
|
10282
10258
|
/**
|
|
10283
10259
|
* Specifies the views that will be rendered in the popup.
|
|
10284
10260
|
* By default both the gradient and palette views will be rendered.
|
|
@@ -10374,6 +10350,10 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10374
10350
|
* Used to provide a two-way binding for the `activeView` property.
|
|
10375
10351
|
*/
|
|
10376
10352
|
this.activeViewChange = new EventEmitter();
|
|
10353
|
+
/**
|
|
10354
|
+
* Indicates whether the ColorPicker wrapper is focused.
|
|
10355
|
+
*/
|
|
10356
|
+
this.isFocused = false;
|
|
10377
10357
|
this._tabindex = 0;
|
|
10378
10358
|
this._popupSettings = { animate: true };
|
|
10379
10359
|
this._paletteSettings = {};
|
|
@@ -10381,8 +10361,10 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10381
10361
|
this._size = 'medium';
|
|
10382
10362
|
this._rounded = 'medium';
|
|
10383
10363
|
this._fillMode = 'solid';
|
|
10364
|
+
this.subscriptions = new Subscription();
|
|
10384
10365
|
this.notifyNgTouched = function () { };
|
|
10385
10366
|
this.notifyNgChanged = function () { };
|
|
10367
|
+
this.domFocusListener = function (event) { return event.stopImmediatePropagation(); };
|
|
10386
10368
|
validatePackage(packageMetadata);
|
|
10387
10369
|
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(function (_a) {
|
|
10388
10370
|
var rtl = _a.rtl;
|
|
@@ -10390,6 +10372,41 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10390
10372
|
});
|
|
10391
10373
|
}
|
|
10392
10374
|
ColorPickerComponent_1 = ColorPickerComponent;
|
|
10375
|
+
Object.defineProperty(ColorPickerComponent.prototype, "focusedClass", {
|
|
10376
|
+
get: function () {
|
|
10377
|
+
return this.isFocused;
|
|
10378
|
+
},
|
|
10379
|
+
enumerable: true,
|
|
10380
|
+
configurable: true
|
|
10381
|
+
});
|
|
10382
|
+
Object.defineProperty(ColorPickerComponent.prototype, "disabledClass", {
|
|
10383
|
+
get: function () {
|
|
10384
|
+
return this.disabled;
|
|
10385
|
+
},
|
|
10386
|
+
enumerable: true,
|
|
10387
|
+
configurable: true
|
|
10388
|
+
});
|
|
10389
|
+
Object.defineProperty(ColorPickerComponent.prototype, "ariaReadonly", {
|
|
10390
|
+
get: function () {
|
|
10391
|
+
return this.readonly;
|
|
10392
|
+
},
|
|
10393
|
+
enumerable: true,
|
|
10394
|
+
configurable: true
|
|
10395
|
+
});
|
|
10396
|
+
Object.defineProperty(ColorPickerComponent.prototype, "ariaExpanded", {
|
|
10397
|
+
get: function () {
|
|
10398
|
+
return this.isOpen;
|
|
10399
|
+
},
|
|
10400
|
+
enumerable: true,
|
|
10401
|
+
configurable: true
|
|
10402
|
+
});
|
|
10403
|
+
Object.defineProperty(ColorPickerComponent.prototype, "hostTabindex", {
|
|
10404
|
+
get: function () {
|
|
10405
|
+
return this.tabindex;
|
|
10406
|
+
},
|
|
10407
|
+
enumerable: true,
|
|
10408
|
+
configurable: true
|
|
10409
|
+
});
|
|
10393
10410
|
Object.defineProperty(ColorPickerComponent.prototype, "view", {
|
|
10394
10411
|
get: function () {
|
|
10395
10412
|
return (this.views && this.views.length > 0) ? this.views[0] : null;
|
|
@@ -10477,7 +10494,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10477
10494
|
return this._size;
|
|
10478
10495
|
},
|
|
10479
10496
|
/**
|
|
10480
|
-
* The size property specifies the
|
|
10497
|
+
* The size property specifies the padding of the ColorPicker internal elements
|
|
10481
10498
|
* ([see example]({% slug appearance_colorpicker %}#toc-size)).
|
|
10482
10499
|
*
|
|
10483
10500
|
* The possible values are:
|
|
@@ -10579,6 +10596,9 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10579
10596
|
stylingInputs.forEach(function (input) {
|
|
10580
10597
|
_this.handleClasses(_this[input], input);
|
|
10581
10598
|
});
|
|
10599
|
+
this.setHostElementAriaLabel();
|
|
10600
|
+
this.handleHostId();
|
|
10601
|
+
this.initDomEvents();
|
|
10582
10602
|
};
|
|
10583
10603
|
ColorPickerComponent.prototype.ngOnChanges = function (changes) {
|
|
10584
10604
|
if (changes.format && changes.format.currentValue === 'name') {
|
|
@@ -10588,23 +10608,18 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10588
10608
|
this.format = 'rgba';
|
|
10589
10609
|
this.value = parseColor$1(this.value, this.format, this.gradientSettings.opacity);
|
|
10590
10610
|
}
|
|
10611
|
+
if (isChanged('value', changes)) {
|
|
10612
|
+
this.setHostElementAriaLabel();
|
|
10613
|
+
}
|
|
10591
10614
|
};
|
|
10592
10615
|
ColorPickerComponent.prototype.ngOnDestroy = function () {
|
|
10593
10616
|
this.closePopup();
|
|
10594
10617
|
if (this.dynamicRTLSubscription) {
|
|
10595
10618
|
this.dynamicRTLSubscription.unsubscribe();
|
|
10596
10619
|
}
|
|
10620
|
+
this.subscriptions.unsubscribe();
|
|
10621
|
+
this.handleDomEvents('remove', DOM_FOCUS_EVENTS);
|
|
10597
10622
|
};
|
|
10598
|
-
Object.defineProperty(ColorPickerComponent.prototype, "colorPickerAriaLabel", {
|
|
10599
|
-
/**
|
|
10600
|
-
* @hidden
|
|
10601
|
-
*/
|
|
10602
|
-
get: function () {
|
|
10603
|
-
return this.value ? this.value : this.localizationService.get('colorPickerNoColor');
|
|
10604
|
-
},
|
|
10605
|
-
enumerable: true,
|
|
10606
|
-
configurable: true
|
|
10607
|
-
});
|
|
10608
10623
|
/**
|
|
10609
10624
|
* @hidden
|
|
10610
10625
|
*/
|
|
@@ -10615,55 +10630,74 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10615
10630
|
* @hidden
|
|
10616
10631
|
*/
|
|
10617
10632
|
ColorPickerComponent.prototype.togglePopup = function () {
|
|
10618
|
-
this.toggleWithEvents(!this.isOpen);
|
|
10619
10633
|
this.focus();
|
|
10634
|
+
this.toggleWithEvents(!this.isOpen);
|
|
10620
10635
|
};
|
|
10621
10636
|
/**
|
|
10622
10637
|
* @hidden
|
|
10623
10638
|
*/
|
|
10624
|
-
ColorPickerComponent.prototype.
|
|
10639
|
+
ColorPickerComponent.prototype.handleWrapperClick = function (event) {
|
|
10640
|
+
var _this = this;
|
|
10641
|
+
if (this.disabled) {
|
|
10642
|
+
return;
|
|
10643
|
+
}
|
|
10625
10644
|
this.focus();
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10645
|
+
if (closest(event.target, function (element) { return element === _this.activeColor.nativeElement; })) {
|
|
10646
|
+
var event_1 = new ActiveColorClickEvent(this.value);
|
|
10647
|
+
this.activeColorClick.emit(event_1);
|
|
10648
|
+
if (!event_1.isOpenPrevented() || this.isOpen) {
|
|
10649
|
+
this.toggleWithEvents(!this.isOpen);
|
|
10650
|
+
}
|
|
10651
|
+
return;
|
|
10630
10652
|
}
|
|
10653
|
+
this.toggleWithEvents(!this.isOpen);
|
|
10631
10654
|
};
|
|
10632
10655
|
/**
|
|
10633
10656
|
* Focuses the wrapper of the ColorPicker.
|
|
10634
10657
|
*/
|
|
10635
10658
|
ColorPickerComponent.prototype.focus = function () {
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
}
|
|
10639
|
-
this.wrapper.nativeElement.focus();
|
|
10659
|
+
this.isFocused = true;
|
|
10660
|
+
this.host.nativeElement.focus();
|
|
10640
10661
|
};
|
|
10641
10662
|
/**
|
|
10642
10663
|
* @hidden
|
|
10643
10664
|
*/
|
|
10644
10665
|
ColorPickerComponent.prototype.handleWrapperFocus = function () {
|
|
10666
|
+
var _this = this;
|
|
10645
10667
|
if (this.isFocused) {
|
|
10646
10668
|
return;
|
|
10647
10669
|
}
|
|
10648
|
-
this.
|
|
10649
|
-
|
|
10670
|
+
this.ngZone.run(function () {
|
|
10671
|
+
_this.focus();
|
|
10672
|
+
_this.onFocus.emit();
|
|
10673
|
+
});
|
|
10650
10674
|
};
|
|
10651
10675
|
/**
|
|
10652
10676
|
* Blurs the ColorPicker.
|
|
10653
10677
|
*/
|
|
10654
10678
|
ColorPickerComponent.prototype.blur = function () {
|
|
10655
|
-
this.
|
|
10679
|
+
this.isFocused = false;
|
|
10680
|
+
this.host.nativeElement.blur();
|
|
10681
|
+
this.notifyNgTouched();
|
|
10656
10682
|
};
|
|
10657
10683
|
/**
|
|
10658
10684
|
* @hidden
|
|
10659
10685
|
*/
|
|
10660
10686
|
ColorPickerComponent.prototype.handleWrapperBlur = function () {
|
|
10687
|
+
var _this = this;
|
|
10661
10688
|
if (this.isOpen) {
|
|
10662
10689
|
return;
|
|
10663
10690
|
}
|
|
10664
|
-
this.
|
|
10665
|
-
|
|
10666
|
-
|
|
10691
|
+
this.ngZone.run(function () {
|
|
10692
|
+
_this.onBlur.emit();
|
|
10693
|
+
_this.isFocused = false;
|
|
10694
|
+
});
|
|
10695
|
+
};
|
|
10696
|
+
/**
|
|
10697
|
+
* @hidden
|
|
10698
|
+
*/
|
|
10699
|
+
ColorPickerComponent.prototype.arrowButtonMouseDown = function (ev) {
|
|
10700
|
+
ev.preventDefault();
|
|
10667
10701
|
};
|
|
10668
10702
|
/**
|
|
10669
10703
|
* Clears the value of the ColorPicker.
|
|
@@ -10673,6 +10707,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10673
10707
|
return;
|
|
10674
10708
|
}
|
|
10675
10709
|
this._value = undefined;
|
|
10710
|
+
this.setHostElementAriaLabel();
|
|
10676
10711
|
this.notifyNgChanged(undefined);
|
|
10677
10712
|
};
|
|
10678
10713
|
/**
|
|
@@ -10700,6 +10735,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10700
10735
|
if (valueChange) {
|
|
10701
10736
|
this.value = parsedColor;
|
|
10702
10737
|
this.valueChange.emit(parsedColor);
|
|
10738
|
+
this.setHostElementAriaLabel();
|
|
10703
10739
|
this.notifyNgChanged(parsedColor);
|
|
10704
10740
|
}
|
|
10705
10741
|
};
|
|
@@ -10744,9 +10780,12 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10744
10780
|
* @hidden
|
|
10745
10781
|
*/
|
|
10746
10782
|
ColorPickerComponent.prototype.handleWrapperKeyDown = function (event) {
|
|
10783
|
+
var _this = this;
|
|
10747
10784
|
if (event.keyCode === Keys.ArrowDown || event.keyCode === Keys.Enter) {
|
|
10748
10785
|
event.preventDefault();
|
|
10749
|
-
this.
|
|
10786
|
+
this.ngZone.run(function () {
|
|
10787
|
+
_this.toggleWithEvents(true);
|
|
10788
|
+
});
|
|
10750
10789
|
}
|
|
10751
10790
|
};
|
|
10752
10791
|
/**
|
|
@@ -10755,14 +10794,14 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10755
10794
|
ColorPickerComponent.prototype.handlePopupKeyDown = function (event) {
|
|
10756
10795
|
if (event.keyCode === Keys.Escape) {
|
|
10757
10796
|
this.toggleWithEvents(false);
|
|
10758
|
-
this.
|
|
10797
|
+
this.host.nativeElement.focus();
|
|
10759
10798
|
}
|
|
10760
10799
|
if (event.keyCode === Keys.Tab) {
|
|
10761
10800
|
var currentElement = event.shiftKey ? this.firstFocusableElement.nativeElement : this.lastFocusableElement.nativeElement;
|
|
10762
10801
|
var nextElement = event.shiftKey ? this.lastFocusableElement.nativeElement : this.firstFocusableElement.nativeElement;
|
|
10763
10802
|
if (event.target === currentElement) {
|
|
10764
10803
|
event.preventDefault();
|
|
10765
|
-
nextElement.
|
|
10804
|
+
nextElement.focus();
|
|
10766
10805
|
}
|
|
10767
10806
|
}
|
|
10768
10807
|
};
|
|
@@ -10773,6 +10812,10 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10773
10812
|
ColorPickerComponent.prototype.isEmpty = function () {
|
|
10774
10813
|
return false;
|
|
10775
10814
|
};
|
|
10815
|
+
ColorPickerComponent.prototype.setHostElementAriaLabel = function () {
|
|
10816
|
+
var ariaLabelValue = "" + (this.value ? this.value : this.localizationService.get('colorPickerNoColor'));
|
|
10817
|
+
this.renderer.setAttribute(this.host.nativeElement, 'aria-label', ariaLabelValue);
|
|
10818
|
+
};
|
|
10776
10819
|
ColorPickerComponent.prototype.handleClasses = function (value, input) {
|
|
10777
10820
|
var elem = this.host.nativeElement;
|
|
10778
10821
|
var classes = getStylingClasses('picker', input, this[input], value);
|
|
@@ -10784,9 +10827,10 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10784
10827
|
}
|
|
10785
10828
|
};
|
|
10786
10829
|
ColorPickerComponent.prototype.popupBlurInvalid = function (ev) {
|
|
10787
|
-
var
|
|
10788
|
-
var
|
|
10789
|
-
|
|
10830
|
+
var _this = this;
|
|
10831
|
+
var focusInFlatColorPickerElement = this.popupRef.popupElement.contains(ev.relatedTarget);
|
|
10832
|
+
var hostClicked = closest(ev.relatedTarget, function (element) { return element === _this.host.nativeElement; });
|
|
10833
|
+
return hostClicked || focusInFlatColorPickerElement;
|
|
10790
10834
|
};
|
|
10791
10835
|
ColorPickerComponent.prototype.toggleWithEvents = function (open) {
|
|
10792
10836
|
var sameState = this.isOpen === open;
|
|
@@ -10811,12 +10855,12 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10811
10855
|
};
|
|
10812
10856
|
ColorPickerComponent.prototype.focusFirstElement = function () {
|
|
10813
10857
|
var _this = this;
|
|
10814
|
-
this.ngZone.
|
|
10815
|
-
|
|
10858
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(function () {
|
|
10859
|
+
if (_this.flatColorPicker) {
|
|
10816
10860
|
var elementToFocus = _this.flatColorPicker.gradient ? _this.flatColorPicker.gradient.gradientDragHandle :
|
|
10817
10861
|
_this.flatColorPicker.palette.host;
|
|
10818
10862
|
elementToFocus.nativeElement.focus();
|
|
10819
|
-
}
|
|
10863
|
+
}
|
|
10820
10864
|
});
|
|
10821
10865
|
};
|
|
10822
10866
|
ColorPickerComponent.prototype.openPopup = function () {
|
|
@@ -10825,7 +10869,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10825
10869
|
var anchorPosition = { horizontal: horizontalAlign, vertical: "bottom" };
|
|
10826
10870
|
var popupPosition = { horizontal: horizontalAlign, vertical: "top" };
|
|
10827
10871
|
this.popupRef = this.popupService.open({
|
|
10828
|
-
anchor: this.
|
|
10872
|
+
anchor: this.activeColor,
|
|
10829
10873
|
animate: this.popupSettings.animate,
|
|
10830
10874
|
appendTo: this.popupSettings.appendTo,
|
|
10831
10875
|
popupAlign: popupPosition,
|
|
@@ -10837,7 +10881,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10837
10881
|
this.popupRef.popupAnchorViewportLeave.subscribe(function () {
|
|
10838
10882
|
_this.toggleWithEvents(false);
|
|
10839
10883
|
if (!_this.isOpen) {
|
|
10840
|
-
_this.
|
|
10884
|
+
_this.host.nativeElement.focus({
|
|
10841
10885
|
preventScroll: true
|
|
10842
10886
|
});
|
|
10843
10887
|
}
|
|
@@ -10873,6 +10917,53 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10873
10917
|
enumerable: true,
|
|
10874
10918
|
configurable: true
|
|
10875
10919
|
});
|
|
10920
|
+
ColorPickerComponent.prototype.handleDomEvents = function (action, events) {
|
|
10921
|
+
var _this = this;
|
|
10922
|
+
var hostElement = this.host.nativeElement;
|
|
10923
|
+
events.forEach(function (ev) { return hostElement[action + "EventListener"](ev, _this.domFocusListener, true); });
|
|
10924
|
+
};
|
|
10925
|
+
ColorPickerComponent.prototype.initDomEvents = function () {
|
|
10926
|
+
var _this = this;
|
|
10927
|
+
if (!this.host) {
|
|
10928
|
+
return;
|
|
10929
|
+
}
|
|
10930
|
+
var hostElement = this.host.nativeElement;
|
|
10931
|
+
this.ngZone.runOutsideAngular(function () {
|
|
10932
|
+
_this.subscriptions.add(_this.renderer.listen(hostElement, 'focusin', function () {
|
|
10933
|
+
_this.handleWrapperFocus();
|
|
10934
|
+
}));
|
|
10935
|
+
_this.subscriptions.add(_this.renderer.listen(hostElement, 'focusout', function (event) {
|
|
10936
|
+
var closestPopup = _this.popupRef ?
|
|
10937
|
+
closest(event.relatedTarget, function (element) { return element === _this.flatColorPicker.host.nativeElement; }) :
|
|
10938
|
+
false;
|
|
10939
|
+
var closestWrapper = closest(event.relatedTarget, function (element) { return element === _this.host.nativeElement; });
|
|
10940
|
+
if (!closestPopup && !closestWrapper) {
|
|
10941
|
+
_this.handleWrapperBlur();
|
|
10942
|
+
}
|
|
10943
|
+
}));
|
|
10944
|
+
_this.handleDomEvents('add', DOM_FOCUS_EVENTS);
|
|
10945
|
+
_this.subscriptions.add(_this.renderer.listen(hostElement, 'keydown', function (event) {
|
|
10946
|
+
_this.handleWrapperKeyDown(event);
|
|
10947
|
+
}));
|
|
10948
|
+
_this.subscriptions.add(_this.renderer.listen(hostElement, 'click', function (event) {
|
|
10949
|
+
_this.ngZone.run(function () {
|
|
10950
|
+
_this.handleWrapperClick(event);
|
|
10951
|
+
});
|
|
10952
|
+
}));
|
|
10953
|
+
});
|
|
10954
|
+
};
|
|
10955
|
+
ColorPickerComponent.prototype.handleHostId = function () {
|
|
10956
|
+
var hostElement = this.host.nativeElement;
|
|
10957
|
+
var existingId = hostElement.getAttribute('id');
|
|
10958
|
+
if (existingId) {
|
|
10959
|
+
this.focusableId = existingId;
|
|
10960
|
+
}
|
|
10961
|
+
else {
|
|
10962
|
+
var id = "k-" + guid();
|
|
10963
|
+
hostElement.setAttribute('id', id);
|
|
10964
|
+
this.focusableId = id;
|
|
10965
|
+
}
|
|
10966
|
+
};
|
|
10876
10967
|
var ColorPickerComponent_1;
|
|
10877
10968
|
__decorate([
|
|
10878
10969
|
HostBinding('class.k-colorpicker'),
|
|
@@ -10880,14 +10971,40 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
10880
10971
|
HostBinding('class.k-picker'),
|
|
10881
10972
|
__metadata("design:type", Boolean)
|
|
10882
10973
|
], ColorPickerComponent.prototype, "hostClasses", void 0);
|
|
10974
|
+
__decorate([
|
|
10975
|
+
HostBinding('class.k-focus'),
|
|
10976
|
+
__metadata("design:type", Boolean),
|
|
10977
|
+
__metadata("design:paramtypes", [])
|
|
10978
|
+
], ColorPickerComponent.prototype, "focusedClass", null);
|
|
10979
|
+
__decorate([
|
|
10980
|
+
HostBinding('attr.aria-disabled'),
|
|
10981
|
+
HostBinding('class.k-disabled'),
|
|
10982
|
+
__metadata("design:type", Boolean),
|
|
10983
|
+
__metadata("design:paramtypes", [])
|
|
10984
|
+
], ColorPickerComponent.prototype, "disabledClass", null);
|
|
10985
|
+
__decorate([
|
|
10986
|
+
HostBinding('attr.aria-readonly'),
|
|
10987
|
+
__metadata("design:type", Boolean),
|
|
10988
|
+
__metadata("design:paramtypes", [])
|
|
10989
|
+
], ColorPickerComponent.prototype, "ariaReadonly", null);
|
|
10990
|
+
__decorate([
|
|
10991
|
+
HostBinding('attr.aria-expanded'),
|
|
10992
|
+
__metadata("design:type", Boolean),
|
|
10993
|
+
__metadata("design:paramtypes", [])
|
|
10994
|
+
], ColorPickerComponent.prototype, "ariaExpanded", null);
|
|
10995
|
+
__decorate([
|
|
10996
|
+
HostBinding('attr.tabindex'),
|
|
10997
|
+
__metadata("design:type", Number),
|
|
10998
|
+
__metadata("design:paramtypes", [])
|
|
10999
|
+
], ColorPickerComponent.prototype, "hostTabindex", null);
|
|
10883
11000
|
__decorate([
|
|
10884
11001
|
HostBinding('attr.dir'),
|
|
10885
11002
|
__metadata("design:type", String)
|
|
10886
11003
|
], ColorPickerComponent.prototype, "direction", void 0);
|
|
10887
11004
|
__decorate([
|
|
10888
|
-
|
|
11005
|
+
HostBinding('attr.role'),
|
|
10889
11006
|
__metadata("design:type", String)
|
|
10890
|
-
], ColorPickerComponent.prototype, "
|
|
11007
|
+
], ColorPickerComponent.prototype, "role", void 0);
|
|
10891
11008
|
__decorate([
|
|
10892
11009
|
Input(),
|
|
10893
11010
|
__metadata("design:type", Array)
|
|
@@ -11010,9 +11127,9 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
11010
11127
|
__metadata("design:type", ViewContainerRef)
|
|
11011
11128
|
], ColorPickerComponent.prototype, "container", void 0);
|
|
11012
11129
|
__decorate([
|
|
11013
|
-
ViewChild('
|
|
11130
|
+
ViewChild('activeColor', { static: true }),
|
|
11014
11131
|
__metadata("design:type", ElementRef)
|
|
11015
|
-
], ColorPickerComponent.prototype, "
|
|
11132
|
+
], ColorPickerComponent.prototype, "activeColor", void 0);
|
|
11016
11133
|
__decorate([
|
|
11017
11134
|
ViewChild('popupTemplate', { static: true }),
|
|
11018
11135
|
__metadata("design:type", TemplateRef)
|
|
@@ -11043,7 +11160,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
11043
11160
|
useValue: 'kendo.colorpicker'
|
|
11044
11161
|
}
|
|
11045
11162
|
],
|
|
11046
|
-
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
|
|
11163
|
+
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 "
|
|
11047
11164
|
}),
|
|
11048
11165
|
__metadata("design:paramtypes", [ElementRef,
|
|
11049
11166
|
PopupService,
|
|
@@ -11644,6 +11761,7 @@ var RadioButtonDirective = /** @class */ (function () {
|
|
|
11644
11761
|
this.hostElement = hostElement;
|
|
11645
11762
|
this.kendoClass = true;
|
|
11646
11763
|
this._size = 'medium';
|
|
11764
|
+
validatePackage(packageMetadata);
|
|
11647
11765
|
}
|
|
11648
11766
|
Object.defineProperty(RadioButtonDirective.prototype, "size", {
|
|
11649
11767
|
get: function () {
|
|
@@ -11746,7 +11864,7 @@ var RadioButtonModule = /** @class */ (function () {
|
|
|
11746
11864
|
return RadioButtonModule;
|
|
11747
11865
|
}());
|
|
11748
11866
|
|
|
11749
|
-
var serial$
|
|
11867
|
+
var serial$2 = 0;
|
|
11750
11868
|
/**
|
|
11751
11869
|
* Represents an error message that will be shown underneath
|
|
11752
11870
|
* a Kendo control or native HTML form-bound component after a validation.
|
|
@@ -11765,7 +11883,7 @@ var ErrorComponent = /** @class */ (function () {
|
|
|
11765
11883
|
/**
|
|
11766
11884
|
* @hidden
|
|
11767
11885
|
*/
|
|
11768
|
-
this.id = "kendo-error-" + serial$
|
|
11886
|
+
this.id = "kendo-error-" + serial$2++;
|
|
11769
11887
|
this.roleAttribute = 'alert';
|
|
11770
11888
|
}
|
|
11771
11889
|
Object.defineProperty(ErrorComponent.prototype, "startClass", {
|
|
@@ -11825,7 +11943,7 @@ var ErrorComponent = /** @class */ (function () {
|
|
|
11825
11943
|
return ErrorComponent;
|
|
11826
11944
|
}());
|
|
11827
11945
|
|
|
11828
|
-
var serial$
|
|
11946
|
+
var serial$3 = 0;
|
|
11829
11947
|
/**
|
|
11830
11948
|
* Represents a hint message that will be shown underneath a form-bound component.
|
|
11831
11949
|
*/
|
|
@@ -11842,7 +11960,7 @@ var HintComponent = /** @class */ (function () {
|
|
|
11842
11960
|
/**
|
|
11843
11961
|
* @hidden
|
|
11844
11962
|
*/
|
|
11845
|
-
this.id = "kendo-hint-" + serial$
|
|
11963
|
+
this.id = "kendo-hint-" + serial$3++;
|
|
11846
11964
|
this.hostClass = true;
|
|
11847
11965
|
}
|
|
11848
11966
|
Object.defineProperty(HintComponent.prototype, "startClass", {
|