igniteui-angular 15.0.14 → 15.0.15
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/esm2020/lib/directives/radio/radio-group.directive.mjs +52 -6
- package/esm2020/lib/grids/grid-base.directive.mjs +3 -2
- package/esm2020/lib/radio/radio.component.mjs +13 -2
- package/fesm2015/igniteui-angular.mjs +123 -66
- package/fesm2015/igniteui-angular.mjs.map +1 -1
- package/fesm2020/igniteui-angular.mjs +121 -64
- package/fesm2020/igniteui-angular.mjs.map +1 -1
- package/lib/directives/radio/radio-group.directive.d.ts +5 -0
- package/lib/radio/radio.component.d.ts +10 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i1 from '@angular/animations';
|
|
2
2
|
import { style, animate, animation, keyframes, useAnimation, trigger, transition } from '@angular/animations';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, Directive, Input, HostListener, NgModule, isDevMode, PLATFORM_ID, Inject, EventEmitter, ElementRef, Optional, Output, HostBinding, InjectionToken, Component, ViewContainerRef, ViewChild, ContentChildren, forwardRef, ContentChild, Self, SecurityContext, TemplateRef, Pipe, LOCALE_ID, QueryList, ViewChildren, Host, ChangeDetectionStrategy,
|
|
4
|
+
import { Injectable, Directive, Input, HostListener, NgModule, isDevMode, PLATFORM_ID, Inject, EventEmitter, ElementRef, Optional, Output, HostBinding, InjectionToken, Component, ViewContainerRef, ViewChild, ContentChildren, forwardRef, ContentChild, Self, SecurityContext, TemplateRef, Pipe, inject, LOCALE_ID, QueryList, ViewChildren, Host, ChangeDetectionStrategy, SkipSelf, SimpleChange, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
5
5
|
import * as i5 from '@angular/forms';
|
|
6
6
|
import { NgModel, FormControlName, NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator, FormGroup, FormsModule, NgControl, ReactiveFormsModule, FormControl, RequiredValidator, MinValidator, MaxValidator, EmailValidator, MinLengthValidator, MaxLengthValidator, PatternValidator } from '@angular/forms';
|
|
7
7
|
import * as i1$1 from '@angular/common';
|
|
@@ -18815,6 +18815,17 @@ class IgxRadioComponent {
|
|
|
18815
18815
|
*/
|
|
18816
18816
|
this._onChangeCallback = noop;
|
|
18817
18817
|
}
|
|
18818
|
+
/**
|
|
18819
|
+
* Gets the `nativeElement` of the igx-radio.
|
|
18820
|
+
*
|
|
18821
|
+
* @example
|
|
18822
|
+
* ```typescript
|
|
18823
|
+
* let igxRadioNativeElement = this.igxRadio.nativeElement;
|
|
18824
|
+
* ```
|
|
18825
|
+
*/
|
|
18826
|
+
get nativeElement() {
|
|
18827
|
+
return this.nativeRadio.nativeElement;
|
|
18828
|
+
}
|
|
18818
18829
|
/**
|
|
18819
18830
|
* Sets/gets whether the radio button is required.
|
|
18820
18831
|
* If not set, `required` will have value `false`.
|
|
@@ -18863,7 +18874,7 @@ class IgxRadioComponent {
|
|
|
18863
18874
|
* @hidden
|
|
18864
18875
|
* @internal
|
|
18865
18876
|
*/
|
|
18866
|
-
_changed() {
|
|
18877
|
+
_changed(event) {
|
|
18867
18878
|
if (event instanceof Event) {
|
|
18868
18879
|
event.preventDefault();
|
|
18869
18880
|
}
|
|
@@ -19049,6 +19060,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
|
|
|
19049
19060
|
args: ['click']
|
|
19050
19061
|
}] } });
|
|
19051
19062
|
|
|
19063
|
+
/**
|
|
19064
|
+
* @hidden
|
|
19065
|
+
*/
|
|
19066
|
+
function DIR_DOCUMENT_FACTORY() {
|
|
19067
|
+
return inject(DOCUMENT);
|
|
19068
|
+
}
|
|
19069
|
+
/**
|
|
19070
|
+
* Injection token is used to inject the document into Directionality
|
|
19071
|
+
* which factory could be faked for testing purposes.
|
|
19072
|
+
*
|
|
19073
|
+
* We can't provide and mock the DOCUMENT token from platform-browser because configureTestingModule
|
|
19074
|
+
* allows override of the default providers, directive, pipes, modules of the test injector
|
|
19075
|
+
* which causes errors.
|
|
19076
|
+
*
|
|
19077
|
+
* @hidden
|
|
19078
|
+
*/
|
|
19079
|
+
const DIR_DOCUMENT = new InjectionToken('dir-doc', {
|
|
19080
|
+
providedIn: 'root',
|
|
19081
|
+
factory: DIR_DOCUMENT_FACTORY
|
|
19082
|
+
});
|
|
19083
|
+
/**
|
|
19084
|
+
* @hidden
|
|
19085
|
+
*
|
|
19086
|
+
* Bidirectional service that extracts the value of the direction attribute on the body or html elements.
|
|
19087
|
+
*
|
|
19088
|
+
* The dir attribute over the body element takes precedence.
|
|
19089
|
+
*/
|
|
19090
|
+
class IgxDirectionality {
|
|
19091
|
+
constructor(document) {
|
|
19092
|
+
this._document = document;
|
|
19093
|
+
const bodyDir = this._document.body ? this._document.body.dir : null;
|
|
19094
|
+
const htmlDir = this._document.documentElement ? this._document.documentElement.dir : null;
|
|
19095
|
+
const extractedDir = bodyDir || htmlDir;
|
|
19096
|
+
this._dir = (extractedDir === 'ltr' || extractedDir === 'rtl') ? extractedDir : 'ltr';
|
|
19097
|
+
}
|
|
19098
|
+
get value() {
|
|
19099
|
+
return this._dir;
|
|
19100
|
+
}
|
|
19101
|
+
get document() {
|
|
19102
|
+
return this._document;
|
|
19103
|
+
}
|
|
19104
|
+
get rtl() {
|
|
19105
|
+
return this._dir === 'rtl';
|
|
19106
|
+
}
|
|
19107
|
+
}
|
|
19108
|
+
IgxDirectionality.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: IgxDirectionality, deps: [{ token: DIR_DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
19109
|
+
IgxDirectionality.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: IgxDirectionality, providedIn: 'root' });
|
|
19110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: IgxDirectionality, decorators: [{
|
|
19111
|
+
type: Injectable,
|
|
19112
|
+
args: [{
|
|
19113
|
+
providedIn: 'root'
|
|
19114
|
+
}]
|
|
19115
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
19116
|
+
type: Inject,
|
|
19117
|
+
args: [DIR_DOCUMENT]
|
|
19118
|
+
}] }]; } });
|
|
19119
|
+
|
|
19052
19120
|
/**
|
|
19053
19121
|
* Determines the Radio Group alignment
|
|
19054
19122
|
*/
|
|
@@ -19081,7 +19149,8 @@ let nextId$2 = 0;
|
|
|
19081
19149
|
* ```
|
|
19082
19150
|
*/
|
|
19083
19151
|
class IgxRadioGroupDirective {
|
|
19084
|
-
constructor() {
|
|
19152
|
+
constructor(_directionality) {
|
|
19153
|
+
this._directionality = _directionality;
|
|
19085
19154
|
/**
|
|
19086
19155
|
* An event that is emitted after the radio group `value` is changed.
|
|
19087
19156
|
*
|
|
@@ -19223,6 +19292,44 @@ class IgxRadioGroupDirective {
|
|
|
19223
19292
|
this.value = selected ? selected.value : null;
|
|
19224
19293
|
}
|
|
19225
19294
|
}
|
|
19295
|
+
handleClick(event) {
|
|
19296
|
+
event.stopPropagation();
|
|
19297
|
+
this.selected.nativeElement.focus();
|
|
19298
|
+
}
|
|
19299
|
+
handleKeyDown(event) {
|
|
19300
|
+
const { key } = event;
|
|
19301
|
+
if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(key)) {
|
|
19302
|
+
const buttons = this.radioButtons.filter(radio => !radio.disabled);
|
|
19303
|
+
const checked = buttons.find((radio) => radio.checked);
|
|
19304
|
+
let index = checked ? buttons.indexOf(checked) : -1;
|
|
19305
|
+
const ltr = this._directionality.value === 'ltr';
|
|
19306
|
+
switch (key) {
|
|
19307
|
+
case 'ArrowUp':
|
|
19308
|
+
index += -1;
|
|
19309
|
+
break;
|
|
19310
|
+
case 'ArrowLeft':
|
|
19311
|
+
index += ltr ? -1 : 1;
|
|
19312
|
+
break;
|
|
19313
|
+
case 'ArrowRight':
|
|
19314
|
+
index += ltr ? 1 : -1;
|
|
19315
|
+
break;
|
|
19316
|
+
default:
|
|
19317
|
+
index += 1;
|
|
19318
|
+
}
|
|
19319
|
+
if (index < 0)
|
|
19320
|
+
index = buttons.length - 1;
|
|
19321
|
+
if (index > buttons.length - 1)
|
|
19322
|
+
index = 0;
|
|
19323
|
+
buttons.forEach((radio) => {
|
|
19324
|
+
radio.deselect();
|
|
19325
|
+
radio.nativeElement.blur();
|
|
19326
|
+
});
|
|
19327
|
+
buttons[index].focused = true;
|
|
19328
|
+
buttons[index].nativeElement.focus();
|
|
19329
|
+
buttons[index].select();
|
|
19330
|
+
event.preventDefault();
|
|
19331
|
+
}
|
|
19332
|
+
}
|
|
19226
19333
|
/**
|
|
19227
19334
|
* Returns the alignment of the `igx-radio-group`.
|
|
19228
19335
|
* ```typescript
|
|
@@ -19396,8 +19503,8 @@ class IgxRadioGroupDirective {
|
|
|
19396
19503
|
}
|
|
19397
19504
|
}
|
|
19398
19505
|
}
|
|
19399
|
-
IgxRadioGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: IgxRadioGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
19400
|
-
IgxRadioGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: IgxRadioGroupDirective, selector: "igx-radio-group, [igxRadioGroup]", inputs: { value: "value", name: "name", required: "required", selected: "selected", alignment: "alignment" }, outputs: { change: "change" }, host: { properties: { "class.igx-radio-group": "this.cssClass", "class.igx-radio-group--vertical": "this.vertical" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxRadioGroupDirective, multi: true }], queries: [{ propertyName: "radioButtons", predicate: IgxRadioComponent, descendants: true }], exportAs: ["igxRadioGroup"], ngImport: i0 });
|
|
19506
|
+
IgxRadioGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: IgxRadioGroupDirective, deps: [{ token: IgxDirectionality }], target: i0.ɵɵFactoryTarget.Directive });
|
|
19507
|
+
IgxRadioGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: IgxRadioGroupDirective, selector: "igx-radio-group, [igxRadioGroup]", inputs: { value: "value", name: "name", required: "required", selected: "selected", alignment: "alignment" }, outputs: { change: "change" }, host: { listeners: { "click": "handleClick($event)", "keydown": "handleKeyDown($event)" }, properties: { "class.igx-radio-group": "this.cssClass", "class.igx-radio-group--vertical": "this.vertical" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxRadioGroupDirective, multi: true }], queries: [{ propertyName: "radioButtons", predicate: IgxRadioComponent, descendants: true }], exportAs: ["igxRadioGroup"], ngImport: i0 });
|
|
19401
19508
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: IgxRadioGroupDirective, decorators: [{
|
|
19402
19509
|
type: Directive,
|
|
19403
19510
|
args: [{
|
|
@@ -19405,7 +19512,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
|
|
|
19405
19512
|
selector: 'igx-radio-group, [igxRadioGroup]',
|
|
19406
19513
|
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxRadioGroupDirective, multi: true }]
|
|
19407
19514
|
}]
|
|
19408
|
-
}], propDecorators: { radioButtons: [{
|
|
19515
|
+
}], ctorParameters: function () { return [{ type: IgxDirectionality }]; }, propDecorators: { radioButtons: [{
|
|
19409
19516
|
type: ContentChildren,
|
|
19410
19517
|
args: [IgxRadioComponent, { descendants: true }]
|
|
19411
19518
|
}], value: [{
|
|
@@ -19424,6 +19531,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
|
|
|
19424
19531
|
}], vertical: [{
|
|
19425
19532
|
type: HostBinding,
|
|
19426
19533
|
args: ['class.igx-radio-group--vertical']
|
|
19534
|
+
}], handleClick: [{
|
|
19535
|
+
type: HostListener,
|
|
19536
|
+
args: ['click', ['$event']]
|
|
19537
|
+
}], handleKeyDown: [{
|
|
19538
|
+
type: HostListener,
|
|
19539
|
+
args: ['keydown', ['$event']]
|
|
19427
19540
|
}], alignment: [{
|
|
19428
19541
|
type: Input
|
|
19429
19542
|
}] } });
|
|
@@ -45532,63 +45645,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
|
|
|
45532
45645
|
}]
|
|
45533
45646
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
45534
45647
|
|
|
45535
|
-
/**
|
|
45536
|
-
* @hidden
|
|
45537
|
-
*/
|
|
45538
|
-
function DIR_DOCUMENT_FACTORY() {
|
|
45539
|
-
return inject(DOCUMENT);
|
|
45540
|
-
}
|
|
45541
|
-
/**
|
|
45542
|
-
* Injection token is used to inject the document into Directionality
|
|
45543
|
-
* which factory could be faked for testing purposes.
|
|
45544
|
-
*
|
|
45545
|
-
* We can't provide and mock the DOCUMENT token from platform-browser because configureTestingModule
|
|
45546
|
-
* allows override of the default providers, directive, pipes, modules of the test injector
|
|
45547
|
-
* which causes errors.
|
|
45548
|
-
*
|
|
45549
|
-
* @hidden
|
|
45550
|
-
*/
|
|
45551
|
-
const DIR_DOCUMENT = new InjectionToken('dir-doc', {
|
|
45552
|
-
providedIn: 'root',
|
|
45553
|
-
factory: DIR_DOCUMENT_FACTORY
|
|
45554
|
-
});
|
|
45555
|
-
/**
|
|
45556
|
-
* @hidden
|
|
45557
|
-
*
|
|
45558
|
-
* Bidirectional service that extracts the value of the direction attribute on the body or html elements.
|
|
45559
|
-
*
|
|
45560
|
-
* The dir attribute over the body element takes precedence.
|
|
45561
|
-
*/
|
|
45562
|
-
class IgxDirectionality {
|
|
45563
|
-
constructor(document) {
|
|
45564
|
-
this._document = document;
|
|
45565
|
-
const bodyDir = this._document.body ? this._document.body.dir : null;
|
|
45566
|
-
const htmlDir = this._document.documentElement ? this._document.documentElement.dir : null;
|
|
45567
|
-
const extractedDir = bodyDir || htmlDir;
|
|
45568
|
-
this._dir = (extractedDir === 'ltr' || extractedDir === 'rtl') ? extractedDir : 'ltr';
|
|
45569
|
-
}
|
|
45570
|
-
get value() {
|
|
45571
|
-
return this._dir;
|
|
45572
|
-
}
|
|
45573
|
-
get document() {
|
|
45574
|
-
return this._document;
|
|
45575
|
-
}
|
|
45576
|
-
get rtl() {
|
|
45577
|
-
return this._dir === 'rtl';
|
|
45578
|
-
}
|
|
45579
|
-
}
|
|
45580
|
-
IgxDirectionality.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: IgxDirectionality, deps: [{ token: DIR_DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
45581
|
-
IgxDirectionality.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: IgxDirectionality, providedIn: 'root' });
|
|
45582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: IgxDirectionality, decorators: [{
|
|
45583
|
-
type: Injectable,
|
|
45584
|
-
args: [{
|
|
45585
|
-
providedIn: 'root'
|
|
45586
|
-
}]
|
|
45587
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
45588
|
-
type: Inject,
|
|
45589
|
-
args: [DIR_DOCUMENT]
|
|
45590
|
-
}] }]; } });
|
|
45591
|
-
|
|
45592
45648
|
const ONE_PERCENT = 0.01;
|
|
45593
45649
|
const MIN_VALUE = 0;
|
|
45594
45650
|
const IgxTextAlign = mkenum({
|
|
@@ -64973,8 +65029,8 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
64973
65029
|
// commit pending states prior to adding a row
|
|
64974
65030
|
this.crudService.endEdit(true);
|
|
64975
65031
|
this.gridAPI.addRowToData(data);
|
|
64976
|
-
this.rowAddedNotifier.next({ data: data, owner: this });
|
|
64977
65032
|
this.pipeTrigger++;
|
|
65033
|
+
this.rowAddedNotifier.next({ data: data, owner: this });
|
|
64978
65034
|
this.notifyChanges();
|
|
64979
65035
|
}
|
|
64980
65036
|
/**
|
|
@@ -65262,6 +65318,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
65262
65318
|
this.crudService.endEdit(true);
|
|
65263
65319
|
this.selectionService.clearHeaderCBState();
|
|
65264
65320
|
this.summaryService.clearSummaryCache();
|
|
65321
|
+
this.summaryPipeTrigger++;
|
|
65265
65322
|
this.cdr.detectChanges();
|
|
65266
65323
|
}
|
|
65267
65324
|
// TODO: We have return values here. Move them to event args ??
|