@bravura/ui 1.17.2 → 1.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/bundles/bravura-ui-currency-input.umd.js +317 -0
  3. package/bundles/bravura-ui-currency-input.umd.js.map +1 -0
  4. package/bundles/bravura-ui-file-upload.umd.js +12 -1
  5. package/bundles/bravura-ui-file-upload.umd.js.map +1 -1
  6. package/bundles/bravura-ui-radio-panel.umd.js +81 -26
  7. package/bundles/bravura-ui-radio-panel.umd.js.map +1 -1
  8. package/currency-input/bravura-ui-currency-input.d.ts +5 -0
  9. package/currency-input/currency-input.directive.d.ts +57 -0
  10. package/currency-input/currency-input.module.d.ts +10 -0
  11. package/currency-input/package.json +10 -0
  12. package/currency-input/public-api.d.ts +1 -0
  13. package/esm2015/currency-input/bravura-ui-currency-input.js +5 -0
  14. package/esm2015/currency-input/currency-input.directive.js +260 -0
  15. package/esm2015/currency-input/currency-input.module.js +19 -0
  16. package/esm2015/currency-input/public-api.js +2 -0
  17. package/esm2015/file-upload/file-upload.component.js +13 -3
  18. package/esm2015/radio-panel/public-api.js +3 -3
  19. package/esm2015/radio-panel/radio-panel-item.component.js +25 -4
  20. package/esm2015/radio-panel/radio-panel.component.js +98 -0
  21. package/esm2015/radio-panel/radio-panel.module.js +9 -9
  22. package/fesm2015/bravura-ui-currency-input.js +281 -0
  23. package/fesm2015/bravura-ui-currency-input.js.map +1 -0
  24. package/fesm2015/bravura-ui-file-upload.js +12 -2
  25. package/fesm2015/bravura-ui-file-upload.js.map +1 -1
  26. package/fesm2015/bravura-ui-radio-panel.js +74 -19
  27. package/fesm2015/bravura-ui-radio-panel.js.map +1 -1
  28. package/file-upload/file-upload.component.d.ts +7 -1
  29. package/package.json +1 -1
  30. package/radio-panel/public-api.d.ts +2 -2
  31. package/radio-panel/radio-panel-item.component.d.ts +4 -2
  32. package/radio-panel/{radio-panel.directive.d.ts → radio-panel.component.d.ts} +13 -4
  33. package/radio-panel/radio-panel.module.d.ts +2 -2
  34. package/esm2015/radio-panel/radio-panel.directive.js +0 -64
@@ -1,5 +1,6 @@
1
+ import { trigger, state, style, transition, animate } from '@angular/animations';
1
2
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Optional, Inject, Attribute, Input, forwardRef, Directive, ContentChildren, NgModule } from '@angular/core';
3
+ import { Component, ChangeDetectionStrategy, Optional, Inject, Attribute, Input, HostBinding, ContentChild, forwardRef, ContentChildren, NgModule } from '@angular/core';
3
4
  import * as i6 from '@angular/material/radio';
4
5
  import { MatRadioButton, MAT_RADIO_GROUP, MAT_RADIO_DEFAULT_OPTIONS, MatRadioGroup, MatRadioModule } from '@angular/material/radio';
5
6
  import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
@@ -23,6 +24,7 @@ class RadioPanelItemComponent extends MatRadioButton {
23
24
  * This will be displayed as the panel header
24
25
  */
25
26
  this.title = '';
27
+ this.panelWidth = '280px';
26
28
  }
27
29
  get tickPosition() {
28
30
  var _a;
@@ -33,7 +35,12 @@ class RadioPanelItemComponent extends MatRadioButton {
33
35
  }
34
36
  }
35
37
  RadioPanelItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: RadioPanelItemComponent, deps: [{ token: MAT_RADIO_GROUP, optional: true }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FocusMonitor }, { token: i2.UniqueSelectionDispatcher }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: MAT_RADIO_DEFAULT_OPTIONS, optional: true }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component });
36
- RadioPanelItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: RadioPanelItemComponent, selector: "bui-radio-panel-item", inputs: { disableRipple: "disableRipple", tabIndex: "tabIndex", title: "title", _tickPosition: "_tickPosition", tickPosition: "tickPosition" }, host: { listeners: { "focus": "_inputElement.nativeElement.focus()" }, properties: { "class.bui-radio-checked": "checked", "class.bui-disabled": "disabled", "class._mat-animation-noopable": "_noopAnimations", "class.mat-primary": "color === \"primary\"", "class.mat-accent": "color === \"accent\"", "class.mat-warn": "color === \"warn\"", "attr.tabindex": "null", "attr.id": "id", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" }, classAttribute: "bui-radio-panel-item" }, exportAs: ["matRadioButton"], usesInheritance: true, ngImport: i0, template: "<label\n\tmatRipple\n\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t[matRippleDisabled]=\"disabled\"\n\t[attr.for]=\"inputId\"\n\t#label\n\tclass=\"bui-radio-panel-item-label bui-border-{{ checked ? color : 'default' }}\"\n>\n\t<div class=\"bui-radio-panel-item-wrapper\" [class.bui-radio-tick-at-end]=\"tickPosition === 'end'\">\n\t\t<div class=\"bui-label-header\">\n\t\t\t<span class=\"bui-label-title\" [innerHTML]=\"title\"></span>\n\t\t\t<ng-content select=\"[buiRadioItemHeadingEnd]\"></ng-content>\n\t\t\t<span class=\"bui-radio-panel-item-circle\">\n\t\t\t\t<span\n\t\t\t\t\tclass=\"bui-persistent-ripple\"\n\t\t\t\t\tmatRipple\n\t\t\t\t\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t\t\t\t\t[matRippleCentered]=\"true\"\n\t\t\t\t\t[matRippleUnbounded]=\"true\"\n\t\t\t\t\t[matRippleTrigger]=\"label\"\n\t\t\t\t\t[matRippleRadius]=\"20\"\n\t\t\t\t\t*ngIf=\"!disabled\"\n\t\t\t\t></span>\n\t\t\t\t<mat-icon [color]=\"color\" *ngIf=\"checked\">check_circle</mat-icon>\n\t\t\t\t<mat-icon *ngIf=\"!checked\" class=\"bui-radio-panel-item-circle-unchecked\">radio_button_unchecked</mat-icon>\n\t\t\t</span>\n\t\t</div>\n\t\t<!-- The actual 'radio' part of the control. -->\n\t\t<span class=\"radio-container\">\n\t\t\t<input\n\t\t\t\t#input\n\t\t\t\tclass=\"mat-radio-input cdk-visually-hidden\"\n\t\t\t\ttype=\"radio\"\n\t\t\t\t[id]=\"inputId\"\n\t\t\t\t[checked]=\"checked\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[tabIndex]=\"tabIndex\"\n\t\t\t\t[attr.name]=\"name\"\n\t\t\t\t[attr.value]=\"value\"\n\t\t\t\t[required]=\"required\"\n\t\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t\t[attr.aria-labelledby]=\"ariaLabelledby\"\n\t\t\t\t[attr.aria-describedby]=\"ariaDescribedby\"\n\t\t\t\t(change)=\"_onInputInteraction($event)\"\n\t\t\t\t(click)=\"_onInputClick($event)\"\n\t\t\t/>\n\t\t</span>\n\n\t\t<div class=\"bui-label-content-gap\"></div>\n\t\t<!-- The label content for radio control. -->\n\t\t<div class=\"bui-label-content\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t</div>\n</label>\n", styles: [":host .bui-ripple,:host .bui-persistent-ripple{position:absolute;top:0;right:0;bottom:0;left:0}:host .bui-radio-panel-item-overlay{background-color:#fff;opacity:0}:host .bui-radio-panel-item-circle{width:40px;height:40px}:host .bui-radio-panel-item-label{display:block;border-radius:5px;border:1px solid rgba(128,128,128,.2);padding:1px;position:relative}:host .bui-radio-panel-item-label .bui-radio-panel-item-circle-unchecked{color:#80808066}:host .bui-radio-panel-item-wrapper.bui-radio-tick-at-end .bui-label-header{padding:calc(1rem - 10px) calc(1rem - 10px) 0 1rem;justify-content:space-between}:host .bui-radio-panel-item-wrapper:not(.bui-radio-tick-at-end) .bui-label-header{padding:calc(1rem - 10px) 1rem 0 calc(1rem - 10px)}:host .bui-radio-panel-item-wrapper:not(.bui-radio-tick-at-end) .bui-radio-panel-item-circle{order:-1}:host .bui-label-header,:host .bui-radio-panel-item-circle{display:flex;align-items:center}:host .bui-label-header{margin-bottom:calc(1rem - 10px)}:host .bui-label-title{font-size:larger;font-weight:bold}:host .bui-radio-panel-item-circle{justify-content:center;position:relative}:host .bui-label-content:not(:empty){margin:0 1rem 1rem}:host .bui-label-content-gap{margin-top:calc(1rem - 10px)}@polyfill-unscoped-rule{content: \".bui-radio-panel-item-wrapper .bui-label-header [buiRadioItemHeadingEnd]\"; margin-left: auto;}:host(:not([hidden])){display:block}:host(:not(.bui-disabled)):not(.bui-radio-checked) .bui-radio-panel-item-label{cursor:pointer}:host(:not(.bui-disabled)) .bui-radio-panel-item-label:hover{border-width:2px;padding:0;border-color:#8080804d}:host(:not(.bui-disabled)).cdk-keyboard-focused .bui-persistent-ripple,:host(:not(.bui-disabled)).cdk-program-focused .bui-persistent-ripple{background-color:#80808033;border-radius:50%}:host(.bui-disabled) .bui-radio-panel-item-wrapper>.bui-label-header,:host(.bui-disabled) .bui-radio-panel-item-wrapper>.bui-label-content{opacity:.5}:host(:not(:first-child)){margin-top:1rem}\n"], components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleRadius", "matRippleDisabled", "matRippleTrigger", "matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleAnimation"], exportAs: ["matRipple"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
38
+ RadioPanelItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: RadioPanelItemComponent, selector: "bui-radio-panel-item", inputs: { disableRipple: "disableRipple", tabIndex: "tabIndex", title: "title", _tickPosition: "_tickPosition", tickPosition: "tickPosition" }, host: { listeners: { "focus": "_inputElement.nativeElement.focus()" }, properties: { "class.bui-radio-checked": "checked", "class.bui-disabled": "disabled", "class._mat-animation-noopable": "_noopAnimations", "class.mat-primary": "color === \"primary\"", "class.mat-accent": "color === \"accent\"", "class.mat-warn": "color === \"warn\"", "attr.tabindex": "null", "attr.id": "id", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null", "style.--panel-width": "this.panelWidth" }, classAttribute: "bui-radio-panel-item" }, queries: [{ propertyName: "contentOnSelect", first: true, predicate: ["contentOnSelect"], descendants: true }], exportAs: ["matRadioButton"], usesInheritance: true, ngImport: i0, template: "<label\n\tmatRipple\n\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t[matRippleDisabled]=\"disabled || checked\"\n\t[attr.for]=\"inputId\"\n\t#label\n\tclass=\"bui-radio-panel-item-label bui-border-{{ checked ? color : 'default' }}\"\n>\n\t<div class=\"bui-radio-panel-item-wrapper\" [class.bui-radio-tick-at-end]=\"tickPosition === 'end'\">\n\t\t<div class=\"bui-label-header\">\n\t\t\t<span class=\"bui-label-title\" [innerHTML]=\"title\"></span>\n\t\t\t<ng-content select=\"[buiRadioItemHeadingEnd]\"></ng-content>\n\t\t\t<span class=\"bui-radio-panel-item-circle\">\n\t\t\t\t<span\n\t\t\t\t\tclass=\"bui-persistent-ripple\"\n\t\t\t\t\tmatRipple\n\t\t\t\t\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t\t\t\t\t[matRippleCentered]=\"true\"\n\t\t\t\t\t[matRippleUnbounded]=\"true\"\n\t\t\t\t\t[matRippleTrigger]=\"label\"\n\t\t\t\t\t[matRippleRadius]=\"20\"\n\t\t\t\t\t*ngIf=\"!disabled\"\n\t\t\t\t></span>\n\t\t\t\t<mat-icon [color]=\"color\" *ngIf=\"checked\">check_circle</mat-icon>\n\t\t\t\t<mat-icon *ngIf=\"!checked\" class=\"bui-radio-panel-item-circle-unchecked\">radio_button_unchecked</mat-icon>\n\t\t\t</span>\n\t\t</div>\n\t\t<!-- The actual 'radio' part of the control. -->\n\t\t<span class=\"radio-container\">\n\t\t\t<input\n\t\t\t\t#input\n\t\t\t\tclass=\"mat-radio-input cdk-visually-hidden\"\n\t\t\t\ttype=\"radio\"\n\t\t\t\t[id]=\"inputId\"\n\t\t\t\t[checked]=\"checked\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[tabIndex]=\"tabIndex\"\n\t\t\t\t[attr.name]=\"name\"\n\t\t\t\t[attr.value]=\"value\"\n\t\t\t\t[required]=\"required\"\n\t\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t\t[attr.aria-labelledby]=\"ariaLabelledby\"\n\t\t\t\t[attr.aria-describedby]=\"ariaDescribedby\"\n\t\t\t\t(change)=\"_onInputInteraction($event)\"\n\t\t\t\t(click)=\"_onInputClick($event)\"\n\t\t\t/>\n\t\t</span>\n\n\t\t<div class=\"bui-label-content-gap\"></div>\n\t\t<!-- The label content for radio control. -->\n\t\t<div class=\"bui-label-content\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t<div class=\"bui-label-content\" *ngIf=\"contentOnSelect && checked\" @slideInOut>\n\t\t\t<ng-container *ngTemplateOutlet=\"contentOnSelect\"></ng-container>\n\t\t</div>\n\t</div>\n</label>\n", styles: [":host .bui-ripple,:host .bui-persistent-ripple{position:absolute;top:0;right:0;bottom:0;left:0}:host .bui-radio-panel-item-overlay{background-color:#fff;opacity:0}:host .bui-radio-panel-item-circle{width:40px;height:40px}:host .bui-radio-panel-item-label{display:block;border-radius:5px;border:1px solid rgba(128,128,128,.2);padding:1px;position:relative;height:100%}:host .bui-radio-panel-item-label .bui-radio-panel-item-circle-unchecked{color:#80808066}:host .bui-radio-panel-item-wrapper.bui-radio-tick-at-end .bui-label-header{padding:calc(1rem - 10px) calc(1rem - 10px) 0 1rem;justify-content:space-between}:host .bui-radio-panel-item-wrapper:not(.bui-radio-tick-at-end) .bui-label-header{padding:calc(1rem - 10px) calc(1rem - 10px) 0 calc(1rem - 10px)}:host .bui-radio-panel-item-wrapper:not(.bui-radio-tick-at-end) .bui-radio-panel-item-circle{order:-1}:host .bui-label-header,:host .bui-radio-panel-item-circle{display:flex;align-items:center}:host .bui-label-header{margin-bottom:calc(1rem - 10px)}:host .bui-label-title{font-size:larger;font-weight:bold}:host .bui-radio-panel-item-circle{justify-content:center;position:relative}:host .bui-label-content:not(:empty){margin:0 1rem 1rem}:host .bui-label-content-gap{margin-top:calc(1rem - 10px)}@polyfill-unscoped-rule{content: \".bui-radio-panel-item-wrapper .bui-label-header [buiRadioItemHeadingEnd]\"; margin-left: auto;}:host(:not([hidden])){display:block}:host(:not(.bui-disabled)):not(.bui-radio-checked) .bui-radio-panel-item-label{cursor:pointer}:host(:not(.bui-disabled)) .bui-radio-panel-item-label:hover{border-width:2px;padding:0;border-color:#8080804d}:host(:not(.bui-disabled)).cdk-keyboard-focused .bui-persistent-ripple,:host(:not(.bui-disabled)).cdk-program-focused .bui-persistent-ripple{background-color:#80808033;border-radius:50%}:host-context(.radio-dir-row){--panel-width: 280px;margin-right:1rem;width:var(--panel-width);margin-bottom:1rem}:host(.bui-disabled) .bui-radio-panel-item-wrapper>.bui-label-header,:host(.bui-disabled) .bui-radio-panel-item-wrapper>.bui-label-content{opacity:.5}:host-context(.radio-dir-row):not(:last-child){margin-right:1rem;margin-bottom:1rem}:host-context(.radio-dir-column):not(:last-child){margin-bottom:1rem}\n"], components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleRadius", "matRippleDisabled", "matRippleTrigger", "matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleAnimation"], exportAs: ["matRipple"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [
39
+ trigger('slideInOut', [
40
+ state('void', style({ height: '0px', overflow: 'hidden' })),
41
+ transition(':enter, :leave', animate('.25s'))
42
+ ])
43
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
37
44
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: RadioPanelItemComponent, decorators: [{
38
45
  type: Component,
39
46
  args: [{
@@ -63,7 +70,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
63
70
  // the focus to the native element.
64
71
  '(focus)': '_inputElement.nativeElement.focus()'
65
72
  },
66
- changeDetection: ChangeDetectionStrategy.OnPush
73
+ changeDetection: ChangeDetectionStrategy.OnPush,
74
+ animations: [
75
+ trigger('slideInOut', [
76
+ state('void', style({ height: '0px', overflow: 'hidden' })),
77
+ transition(':enter, :leave', animate('.25s'))
78
+ ])
79
+ ]
67
80
  }]
68
81
  }], ctorParameters: function () { return [{ type: i6.MatRadioGroup, decorators: [{
69
82
  type: Optional
@@ -85,10 +98,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
85
98
  args: ['tabindex']
86
99
  }] }]; }, propDecorators: { title: [{
87
100
  type: Input
101
+ }], panelWidth: [{
102
+ type: HostBinding,
103
+ args: ['style.--panel-width']
88
104
  }], _tickPosition: [{
89
105
  type: Input
90
106
  }], tickPosition: [{
91
107
  type: Input
108
+ }],
109
+ //@ts-ignore
110
+ contentOnSelect: [{
111
+ type: ContentChild,
112
+ args: ['contentOnSelect']
92
113
  }] } });
93
114
 
94
115
  /**
@@ -99,9 +120,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
99
120
  * in the color selected by the theme attribute `color`.
100
121
  *
101
122
  */
102
- class RadioPanelDirective extends MatRadioGroup {
123
+ class RadioPanelComponent extends MatRadioGroup {
103
124
  constructor(cd) {
104
125
  super(cd);
126
+ /**
127
+ * @ignore
128
+ */
129
+ this.classAttr = '';
130
+ this.panelWidth = 280;
131
+ /** The flow direction of the radio panel items */
132
+ this.direction = 'row';
105
133
  /** The default position of the 'tick' icon relative to the title. */
106
134
  this.tickPosition = 'start';
107
135
  }
@@ -110,19 +138,37 @@ class RadioPanelDirective extends MatRadioGroup {
110
138
  if (['color', 'tickPosition'].some(p => changes[p]) && this._radios) {
111
139
  this._radios.forEach(item => item._markForCheck());
112
140
  }
141
+ if (this.direction === 'row') {
142
+ this.classAttr = 'bui-radio-panel bui-host radio-dir-row';
143
+ }
144
+ else {
145
+ this.classAttr = 'bui-radio-panel bui-host radio-dir-column';
146
+ }
147
+ if (changes.panelWidth && this._radios) {
148
+ this._updatePanelWidth();
149
+ }
150
+ }
151
+ ngAfterContentInit() {
152
+ this._updatePanelWidth();
153
+ }
154
+ _updatePanelWidth() {
155
+ this._radios.forEach(item => {
156
+ item.panelWidth = this.panelWidth + 'px';
157
+ item._markForCheck();
158
+ });
113
159
  }
114
160
  }
115
- RadioPanelDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: RadioPanelDirective, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
116
- RadioPanelDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.7", type: RadioPanelDirective, selector: "bui-radio-panel", inputs: { color: "color", tickPosition: "tickPosition" }, host: { attributes: { "role": "radiogroup" }, classAttribute: "bui-radio-panel bui-host" }, providers: [
161
+ RadioPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: RadioPanelComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
162
+ RadioPanelComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: RadioPanelComponent, selector: "bui-radio-panel", inputs: { panelWidth: "panelWidth", direction: "direction", color: "color", tickPosition: "tickPosition" }, host: { attributes: { "role": "radiogroup" }, properties: { "attr.class": "this.classAttr" }, classAttribute: "bui-radio-panel bui-host" }, providers: [
117
163
  {
118
164
  provide: NG_VALUE_ACCESSOR,
119
- useExisting: forwardRef(() => RadioPanelDirective),
165
+ useExisting: forwardRef(() => RadioPanelComponent),
120
166
  multi: true
121
167
  },
122
- { provide: MAT_RADIO_GROUP, useExisting: forwardRef(() => RadioPanelDirective) }
123
- ], queries: [{ propertyName: "_radios", predicate: RadioPanelItemComponent, descendants: true }], exportAs: ["buiRadioPanel"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: RadioPanelDirective, decorators: [{
125
- type: Directive,
168
+ { provide: MAT_RADIO_GROUP, useExisting: forwardRef(() => RadioPanelComponent) }
169
+ ], queries: [{ propertyName: "_radios", predicate: RadioPanelItemComponent, descendants: true }], exportAs: ["buiRadioPanel"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, styles: [":host{display:flex}:host.radio-dir-row{flex-direction:row;flex-wrap:wrap}:host.radio-dir-column{flex-direction:column}\n"] });
170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: RadioPanelComponent, decorators: [{
171
+ type: Component,
126
172
  args: [{
127
173
  // tslint:disable-next-line: directive-selector
128
174
  selector: 'bui-radio-panel',
@@ -130,18 +176,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
130
176
  providers: [
131
177
  {
132
178
  provide: NG_VALUE_ACCESSOR,
133
- useExisting: forwardRef(() => RadioPanelDirective),
179
+ useExisting: forwardRef(() => RadioPanelComponent),
134
180
  multi: true
135
181
  },
136
- { provide: MAT_RADIO_GROUP, useExisting: forwardRef(() => RadioPanelDirective) }
182
+ { provide: MAT_RADIO_GROUP, useExisting: forwardRef(() => RadioPanelComponent) }
137
183
  ],
138
184
  // tslint:disable-next-line: no-host-metadata-property
139
185
  host: {
140
186
  role: 'radiogroup',
141
187
  class: 'bui-radio-panel bui-host'
142
- }
188
+ },
189
+ template: ` <ng-content></ng-content> `,
190
+ styleUrls: ['radio-panel.component.scss']
143
191
  }]
144
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { color: [{
192
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { classAttr: [{
193
+ type: HostBinding,
194
+ args: ['attr.class']
195
+ }], panelWidth: [{
196
+ type: Input
197
+ }], direction: [{
198
+ type: Input
199
+ }], color: [{
145
200
  type: Input
146
201
  }], tickPosition: [{
147
202
  type: Input
@@ -156,14 +211,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
156
211
  class RadioPanelModule {
157
212
  }
158
213
  RadioPanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: RadioPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
159
- RadioPanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: RadioPanelModule, declarations: [RadioPanelItemComponent, RadioPanelDirective], imports: [CommonModule, MatRadioModule, MatRippleModule, MatIconModule], exports: [RadioPanelItemComponent, RadioPanelDirective] });
214
+ RadioPanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: RadioPanelModule, declarations: [RadioPanelItemComponent, RadioPanelComponent], imports: [CommonModule, MatRadioModule, MatRippleModule, MatIconModule], exports: [RadioPanelItemComponent, RadioPanelComponent] });
160
215
  RadioPanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: RadioPanelModule, imports: [[CommonModule, MatRadioModule, MatRippleModule, MatIconModule]] });
161
216
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: RadioPanelModule, decorators: [{
162
217
  type: NgModule,
163
218
  args: [{
164
- declarations: [RadioPanelItemComponent, RadioPanelDirective],
219
+ declarations: [RadioPanelItemComponent, RadioPanelComponent],
165
220
  imports: [CommonModule, MatRadioModule, MatRippleModule, MatIconModule],
166
- exports: [RadioPanelItemComponent, RadioPanelDirective]
221
+ exports: [RadioPanelItemComponent, RadioPanelComponent]
167
222
  }]
168
223
  }] });
169
224
 
@@ -171,5 +226,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
171
226
  * Generated bundle index. Do not edit.
172
227
  */
173
228
 
174
- export { RadioPanelDirective, RadioPanelItemComponent, RadioPanelModule };
229
+ export { RadioPanelComponent, RadioPanelItemComponent, RadioPanelModule };
175
230
  //# sourceMappingURL=bravura-ui-radio-panel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bravura-ui-radio-panel.js","sources":["../../../projects/ui/radio-panel/radio-panel-item.component.ts","../../../projects/ui/radio-panel/radio-panel-item.component.html","../../../projects/ui/radio-panel/radio-panel.directive.ts","../../../projects/ui/radio-panel/radio-panel.module.ts","../../../projects/ui/radio-panel/bravura-ui-radio-panel.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport {\n\tAttribute,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tInject,\n\tInput,\n\tOptional\n} from '@angular/core';\nimport {\n\tMatRadioButton,\n\tMatRadioDefaultOptions,\n\tMatRadioGroup,\n\tMAT_RADIO_DEFAULT_OPTIONS,\n\tMAT_RADIO_GROUP\n} from '@angular/material/radio';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\n/**\n * Use `bui-radio-panel-item` instead of `mat-radio-button` in a `bui-radio-panel` to display an option.\n */\n@Component({\n\tselector: 'bui-radio-panel-item',\n\ttemplateUrl: './radio-panel-item.component.html',\n\tstyleUrls: ['./radio-panel-item.component.scss'],\n\t// tslint:disable-next-line: no-inputs-metadata-property\n\tinputs: ['disableRipple', 'tabIndex'],\n\texportAs: 'matRadioButton',\n\t// tslint:disable-next-line: no-host-metadata-property\n\thost: {\n\t\tclass: 'bui-radio-panel-item',\n\t\t'[class.bui-radio-checked]': 'checked',\n\t\t'[class.bui-disabled]': 'disabled',\n\t\t'[class._mat-animation-noopable]': '_noopAnimations',\n\t\t'[class.mat-primary]': 'color === \"primary\"',\n\t\t'[class.mat-accent]': 'color === \"accent\"',\n\t\t'[class.mat-warn]': 'color === \"warn\"',\n\t\t// Needs to be removed since it causes some a11y issues (see #21266).\n\t\t'[attr.tabindex]': 'null',\n\t\t'[attr.id]': 'id',\n\t\t'[attr.aria-label]': 'null',\n\t\t'[attr.aria-labelledby]': 'null',\n\t\t'[attr.aria-describedby]': 'null',\n\t\t// Note: under normal conditions focus shouldn't land on this element, however it may be\n\t\t// programmatically set, for example inside of a focus trap, in this case we want to forward\n\t\t// the focus to the native element.\n\t\t'(focus)': '_inputElement.nativeElement.focus()'\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class RadioPanelItemComponent extends MatRadioButton {\n\t/**\n\t * This will be displayed as the panel header\n\t */\n\t@Input()\n\ttitle = '';\n\n\t/** The default position of the 'tick' icon relative to the title. */\n\t@Input() private _tickPosition: 'start' | 'end' | undefined;\n\n\t@Input()\n\tget tickPosition(): 'start' | 'end' {\n\t\treturn this._tickPosition || (this.radioGroup as any)?.tickPosition;\n\t}\n\tset tickPosition(pos: 'start' | 'end') {\n\t\tthis._tickPosition = pos;\n\t}\n\n\tconstructor(\n\t\t@Optional() @Inject(MAT_RADIO_GROUP) radioGroup: MatRadioGroup,\n\t\telementRef: ElementRef,\n\t\t_changeDetector: ChangeDetectorRef,\n\t\t_focusMonitor: FocusMonitor,\n\t\t_radioDispatcher: UniqueSelectionDispatcher,\n\t\t@Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string,\n\t\t@Optional()\n\t\t@Inject(MAT_RADIO_DEFAULT_OPTIONS)\n\t\t_providerOverride?: MatRadioDefaultOptions,\n\t\t@Attribute('tabindex') tabIndex?: string\n\t) {\n\t\tsuper(\n\t\t\tradioGroup,\n\t\t\telementRef,\n\t\t\t_changeDetector,\n\t\t\t_focusMonitor,\n\t\t\t_radioDispatcher,\n\t\t\tanimationMode,\n\t\t\t_providerOverride,\n\t\t\ttabIndex\n\t\t);\n\t}\n}\n","<label\n\tmatRipple\n\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t[matRippleDisabled]=\"disabled\"\n\t[attr.for]=\"inputId\"\n\t#label\n\tclass=\"bui-radio-panel-item-label bui-border-{{ checked ? color : 'default' }}\"\n>\n\t<div class=\"bui-radio-panel-item-wrapper\" [class.bui-radio-tick-at-end]=\"tickPosition === 'end'\">\n\t\t<div class=\"bui-label-header\">\n\t\t\t<span class=\"bui-label-title\" [innerHTML]=\"title\"></span>\n\t\t\t<ng-content select=\"[buiRadioItemHeadingEnd]\"></ng-content>\n\t\t\t<span class=\"bui-radio-panel-item-circle\">\n\t\t\t\t<span\n\t\t\t\t\tclass=\"bui-persistent-ripple\"\n\t\t\t\t\tmatRipple\n\t\t\t\t\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t\t\t\t\t[matRippleCentered]=\"true\"\n\t\t\t\t\t[matRippleUnbounded]=\"true\"\n\t\t\t\t\t[matRippleTrigger]=\"label\"\n\t\t\t\t\t[matRippleRadius]=\"20\"\n\t\t\t\t\t*ngIf=\"!disabled\"\n\t\t\t\t></span>\n\t\t\t\t<mat-icon [color]=\"color\" *ngIf=\"checked\">check_circle</mat-icon>\n\t\t\t\t<mat-icon *ngIf=\"!checked\" class=\"bui-radio-panel-item-circle-unchecked\">radio_button_unchecked</mat-icon>\n\t\t\t</span>\n\t\t</div>\n\t\t<!-- The actual 'radio' part of the control. -->\n\t\t<span class=\"radio-container\">\n\t\t\t<input\n\t\t\t\t#input\n\t\t\t\tclass=\"mat-radio-input cdk-visually-hidden\"\n\t\t\t\ttype=\"radio\"\n\t\t\t\t[id]=\"inputId\"\n\t\t\t\t[checked]=\"checked\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[tabIndex]=\"tabIndex\"\n\t\t\t\t[attr.name]=\"name\"\n\t\t\t\t[attr.value]=\"value\"\n\t\t\t\t[required]=\"required\"\n\t\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t\t[attr.aria-labelledby]=\"ariaLabelledby\"\n\t\t\t\t[attr.aria-describedby]=\"ariaDescribedby\"\n\t\t\t\t(change)=\"_onInputInteraction($event)\"\n\t\t\t\t(click)=\"_onInputClick($event)\"\n\t\t\t/>\n\t\t</span>\n\n\t\t<div class=\"bui-label-content-gap\"></div>\n\t\t<!-- The label content for radio control. -->\n\t\t<div class=\"bui-label-content\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t</div>\n</label>\n","import {\n\tChangeDetectorRef,\n\tContentChildren,\n\tDirective,\n\tforwardRef,\n\tInput,\n\tOnChanges,\n\tQueryList,\n\tSimpleChanges\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ThemePalette } from '@angular/material/core';\nimport { MatRadioGroup, MAT_RADIO_GROUP } from '@angular/material/radio';\nimport { RadioPanelItemComponent } from './radio-panel-item.component';\n/**\n * Radio panel is a [control value accessor](https://angular.io/api/forms/ControlValueAccessor)\n * that extends Angular Material's [radio group component](https://material.angular.io/components/radio/overview).\n * It inherits all the features of `MatRadioGroup`, and arranges the child items in panels,\n * with the `title` attributes rendered as captions. The check box icon and the borders will be displayed\n * in the color selected by the theme attribute `color`.\n *\n */\n@Directive({\n\t// tslint:disable-next-line: directive-selector\n\tselector: 'bui-radio-panel',\n\texportAs: 'buiRadioPanel',\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => RadioPanelDirective),\n\t\t\tmulti: true\n\t\t},\n\t\t{ provide: MAT_RADIO_GROUP, useExisting: forwardRef(() => RadioPanelDirective) }\n\t],\n\t// tslint:disable-next-line: no-host-metadata-property\n\thost: {\n\t\trole: 'radiogroup',\n\t\tclass: 'bui-radio-panel bui-host'\n\t}\n})\nexport class RadioPanelDirective extends MatRadioGroup implements OnChanges {\n\t/** Theme color for all of the radio panels in the group. */\n\t@Input() color: ThemePalette;\n\n\t/** The default position of the 'tick' icon relative to the title. */\n\t@Input() tickPosition: 'start' | 'end' = 'start';\n\n\t/**\n\t * @ignore\n\t */\n\t@ContentChildren(RadioPanelItemComponent, { descendants: true })\n\t_radios!: QueryList<RadioPanelItemComponent>;\n\n\tconstructor(cd: ChangeDetectorRef) {\n\t\tsuper(cd);\n\t}\n\n\t/** @ignore */\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tif (['color', 'tickPosition'].some(p => changes[p]) && this._radios) {\n\t\t\tthis._radios.forEach(item => item._markForCheck());\n\t\t}\n\t}\n}\n","import { RadioPanelItemComponent } from './radio-panel-item.component';\nimport { RadioPanelDirective } from './radio-panel.directive';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatIconModule } from '@angular/material/icon';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\n/**\n * Import this NgModule for the radio panel component\n */\n@NgModule({\n\tdeclarations: [RadioPanelItemComponent, RadioPanelDirective],\n\timports: [CommonModule, MatRadioModule, MatRippleModule, MatIconModule],\n\texports: [RadioPanelItemComponent, RadioPanelDirective]\n})\nexport class RadioPanelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAqBA;;;MAgCa,uBAAwB,SAAQ,cAAc;IAkB1D,YACsC,UAAyB,EAC9D,UAAsB,EACtB,eAAkC,EAClC,aAA2B,EAC3B,gBAA2C,EACA,aAAsB,EAGjE,iBAA0C,EACnB,QAAiB;QAExC,KAAK,CACJ,UAAU,EACV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,KAAK;gBAMN,OAAO;sBADN,eAAe;uBAAC,uBAAuB,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;;;AC1ChE;;;MAQa,gBAAgB;;6GAAhB,gBAAgB;8GAAhB,gBAAgB,iBAJb,uBAAuB,EAAE,mBAAmB,aACjD,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,aAC5D,uBAAuB,EAAE,mBAAmB;8GAE1C,gBAAgB,YAHnB,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,CAAC;2FAG3D,gBAAgB;kBAL5B,QAAQ;mBAAC;oBACT,YAAY,EAAE,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;oBAC5D,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,CAAC;oBACvE,OAAO,EAAE,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;iBACvD;;;ACfD;;;;;;"}
1
+ {"version":3,"file":"bravura-ui-radio-panel.js","sources":["../../../projects/ui/radio-panel/radio-panel-item.component.ts","../../../projects/ui/radio-panel/radio-panel-item.component.html","../../../projects/ui/radio-panel/radio-panel.component.ts","../../../projects/ui/radio-panel/radio-panel.module.ts","../../../projects/ui/radio-panel/bravura-ui-radio-panel.ts"],"sourcesContent":["import { animate, state, style, transition, trigger } from '@angular/animations';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport {\n\tAttribute,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tContentChild,\n\tElementRef,\n\tHostBinding,\n\tInject,\n\tInput,\n\tOptional,\n\tTemplateRef\n} from '@angular/core';\nimport {\n\tMatRadioButton,\n\tMatRadioDefaultOptions,\n\tMatRadioGroup,\n\tMAT_RADIO_DEFAULT_OPTIONS,\n\tMAT_RADIO_GROUP\n} from '@angular/material/radio';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\n/**\n * Use `bui-radio-panel-item` instead of `mat-radio-button` in a `bui-radio-panel` to display an option.\n */\n@Component({\n\tselector: 'bui-radio-panel-item',\n\ttemplateUrl: './radio-panel-item.component.html',\n\tstyleUrls: ['./radio-panel-item.component.scss'],\n\t// tslint:disable-next-line: no-inputs-metadata-property\n\tinputs: ['disableRipple', 'tabIndex'],\n\texportAs: 'matRadioButton',\n\t// tslint:disable-next-line: no-host-metadata-property\n\thost: {\n\t\tclass: 'bui-radio-panel-item',\n\t\t'[class.bui-radio-checked]': 'checked',\n\t\t'[class.bui-disabled]': 'disabled',\n\t\t'[class._mat-animation-noopable]': '_noopAnimations',\n\t\t'[class.mat-primary]': 'color === \"primary\"',\n\t\t'[class.mat-accent]': 'color === \"accent\"',\n\t\t'[class.mat-warn]': 'color === \"warn\"',\n\t\t// Needs to be removed since it causes some a11y issues (see #21266).\n\t\t'[attr.tabindex]': 'null',\n\t\t'[attr.id]': 'id',\n\t\t'[attr.aria-label]': 'null',\n\t\t'[attr.aria-labelledby]': 'null',\n\t\t'[attr.aria-describedby]': 'null',\n\t\t// Note: under normal conditions focus shouldn't land on this element, however it may be\n\t\t// programmatically set, for example inside of a focus trap, in this case we want to forward\n\t\t// the focus to the native element.\n\t\t'(focus)': '_inputElement.nativeElement.focus()'\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tanimations: [\n\t\ttrigger('slideInOut', [\n\t\t\tstate('void', style({ height: '0px', overflow: 'hidden' })),\n\t\t\ttransition(':enter, :leave', animate('.25s'))\n\t\t])\n\t]\n})\nexport class RadioPanelItemComponent extends MatRadioButton {\n\t/**\n\t * This will be displayed as the panel header\n\t */\n\t@Input()\n\ttitle = '';\n\n\t@HostBinding('style.--panel-width')\n\tpanelWidth = '280px';\n\n\t/** The default position of the 'tick' icon relative to the title. */\n\t@Input() private _tickPosition: 'start' | 'end' | undefined;\n\n\t@Input()\n\tget tickPosition(): 'start' | 'end' {\n\t\treturn this._tickPosition || (this.radioGroup as any)?.tickPosition;\n\t}\n\tset tickPosition(pos: 'start' | 'end') {\n\t\tthis._tickPosition = pos;\n\t}\n\n\t@ContentChild('contentOnSelect')\n\t//@ts-ignore\n\tcontentOnSelect: TemplateRef<any>;\n\n\tconstructor(\n\t\t@Optional() @Inject(MAT_RADIO_GROUP) radioGroup: MatRadioGroup,\n\t\telementRef: ElementRef,\n\t\t_changeDetector: ChangeDetectorRef,\n\t\t_focusMonitor: FocusMonitor,\n\t\t_radioDispatcher: UniqueSelectionDispatcher,\n\t\t@Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string,\n\t\t@Optional()\n\t\t@Inject(MAT_RADIO_DEFAULT_OPTIONS)\n\t\t_providerOverride?: MatRadioDefaultOptions,\n\t\t@Attribute('tabindex') tabIndex?: string\n\t) {\n\t\tsuper(\n\t\t\tradioGroup,\n\t\t\telementRef,\n\t\t\t_changeDetector,\n\t\t\t_focusMonitor,\n\t\t\t_radioDispatcher,\n\t\t\tanimationMode,\n\t\t\t_providerOverride,\n\t\t\ttabIndex\n\t\t);\n\t}\n}\n","<label\n\tmatRipple\n\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t[matRippleDisabled]=\"disabled || checked\"\n\t[attr.for]=\"inputId\"\n\t#label\n\tclass=\"bui-radio-panel-item-label bui-border-{{ checked ? color : 'default' }}\"\n>\n\t<div class=\"bui-radio-panel-item-wrapper\" [class.bui-radio-tick-at-end]=\"tickPosition === 'end'\">\n\t\t<div class=\"bui-label-header\">\n\t\t\t<span class=\"bui-label-title\" [innerHTML]=\"title\"></span>\n\t\t\t<ng-content select=\"[buiRadioItemHeadingEnd]\"></ng-content>\n\t\t\t<span class=\"bui-radio-panel-item-circle\">\n\t\t\t\t<span\n\t\t\t\t\tclass=\"bui-persistent-ripple\"\n\t\t\t\t\tmatRipple\n\t\t\t\t\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t\t\t\t\t[matRippleCentered]=\"true\"\n\t\t\t\t\t[matRippleUnbounded]=\"true\"\n\t\t\t\t\t[matRippleTrigger]=\"label\"\n\t\t\t\t\t[matRippleRadius]=\"20\"\n\t\t\t\t\t*ngIf=\"!disabled\"\n\t\t\t\t></span>\n\t\t\t\t<mat-icon [color]=\"color\" *ngIf=\"checked\">check_circle</mat-icon>\n\t\t\t\t<mat-icon *ngIf=\"!checked\" class=\"bui-radio-panel-item-circle-unchecked\">radio_button_unchecked</mat-icon>\n\t\t\t</span>\n\t\t</div>\n\t\t<!-- The actual 'radio' part of the control. -->\n\t\t<span class=\"radio-container\">\n\t\t\t<input\n\t\t\t\t#input\n\t\t\t\tclass=\"mat-radio-input cdk-visually-hidden\"\n\t\t\t\ttype=\"radio\"\n\t\t\t\t[id]=\"inputId\"\n\t\t\t\t[checked]=\"checked\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[tabIndex]=\"tabIndex\"\n\t\t\t\t[attr.name]=\"name\"\n\t\t\t\t[attr.value]=\"value\"\n\t\t\t\t[required]=\"required\"\n\t\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t\t[attr.aria-labelledby]=\"ariaLabelledby\"\n\t\t\t\t[attr.aria-describedby]=\"ariaDescribedby\"\n\t\t\t\t(change)=\"_onInputInteraction($event)\"\n\t\t\t\t(click)=\"_onInputClick($event)\"\n\t\t\t/>\n\t\t</span>\n\n\t\t<div class=\"bui-label-content-gap\"></div>\n\t\t<!-- The label content for radio control. -->\n\t\t<div class=\"bui-label-content\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t<div class=\"bui-label-content\" *ngIf=\"contentOnSelect && checked\" @slideInOut>\n\t\t\t<ng-container *ngTemplateOutlet=\"contentOnSelect\"></ng-container>\n\t\t</div>\n\t</div>\n</label>\n","import {\n\tAfterContentInit,\n\tChangeDetectorRef,\n\tComponent,\n\tContentChildren,\n\tforwardRef,\n\tHostBinding,\n\tInput,\n\tOnChanges,\n\tQueryList,\n\tSimpleChanges\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ThemePalette } from '@angular/material/core';\nimport { MatRadioGroup, MAT_RADIO_GROUP } from '@angular/material/radio';\nimport { RadioPanelItemComponent } from './radio-panel-item.component';\n/**\n * Radio panel is a [control value accessor](https://angular.io/api/forms/ControlValueAccessor)\n * that extends Angular Material's [radio group component](https://material.angular.io/components/radio/overview).\n * It inherits all the features of `MatRadioGroup`, and arranges the child items in panels,\n * with the `title` attributes rendered as captions. The check box icon and the borders will be displayed\n * in the color selected by the theme attribute `color`.\n *\n */\n@Component({\n\t// tslint:disable-next-line: directive-selector\n\tselector: 'bui-radio-panel',\n\texportAs: 'buiRadioPanel',\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => RadioPanelComponent),\n\t\t\tmulti: true\n\t\t},\n\t\t{ provide: MAT_RADIO_GROUP, useExisting: forwardRef(() => RadioPanelComponent) }\n\t],\n\t// tslint:disable-next-line: no-host-metadata-property\n\thost: {\n\t\trole: 'radiogroup',\n\t\tclass: 'bui-radio-panel bui-host'\n\t},\n\ttemplate: ` <ng-content></ng-content> `,\n\tstyleUrls: ['radio-panel.component.scss']\n})\nexport class RadioPanelComponent extends MatRadioGroup implements OnChanges, AfterContentInit {\n\t/**\n\t * @ignore\n\t */\n\t@HostBinding('attr.class')\n\tclassAttr: string = '';\n\n\t@Input()\n\tpanelWidth = 280;\n\n\t/** The flow direction of the radio panel items */\n\t@Input()\n\tdirection: 'row' | 'column' = 'row';\n\n\t/** Theme color for all of the radio panels in the group. */\n\t@Input() color: ThemePalette;\n\n\t/** The default position of the 'tick' icon relative to the title. */\n\t@Input() tickPosition: 'start' | 'end' = 'start';\n\n\t/**\n\t * @ignore\n\t */\n\t@ContentChildren(RadioPanelItemComponent, { descendants: true })\n\t_radios!: QueryList<RadioPanelItemComponent>;\n\n\tconstructor(cd: ChangeDetectorRef) {\n\t\tsuper(cd);\n\t}\n\n\t/** @ignore */\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tif (['color', 'tickPosition'].some(p => changes[p]) && this._radios) {\n\t\t\tthis._radios.forEach(item => item._markForCheck());\n\t\t}\n\n\t\tif (this.direction === 'row') {\n\t\t\tthis.classAttr = 'bui-radio-panel bui-host radio-dir-row';\n\t\t} else {\n\t\t\tthis.classAttr = 'bui-radio-panel bui-host radio-dir-column';\n\t\t}\n\n\t\tif (changes.panelWidth && this._radios) {\n\t\t\tthis._updatePanelWidth();\n\t\t}\n\t}\n\n\tngAfterContentInit(): void {\n\t\tthis._updatePanelWidth();\n\t}\n\n\tprivate _updatePanelWidth() {\n\t\tthis._radios.forEach(item => {\n\t\t\titem.panelWidth = this.panelWidth + 'px';\n\t\t\titem._markForCheck();\n\t\t});\n\t}\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { RadioPanelItemComponent } from './radio-panel-item.component';\nimport { RadioPanelComponent } from './radio-panel.component';\n\n/**\n * Import this NgModule for the radio panel component\n */\n@NgModule({\n\tdeclarations: [RadioPanelItemComponent, RadioPanelComponent],\n\timports: [CommonModule, MatRadioModule, MatRippleModule, MatIconModule],\n\texports: [RadioPanelItemComponent, RadioPanelComponent]\n})\nexport class RadioPanelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAyBA;;;MAsCa,uBAAwB,SAAQ,cAAc;IAyB1D,YACsC,UAAyB,EAC9D,UAAsB,EACtB,eAAkC,EAClC,aAA2B,EAC3B,gBAA2C,EACA,aAAsB,EAGjE,iBAA0C,EACnB,QAAiB;QAExC,KAAK,CACJ,UAAU,EACV,UAAU,EACV,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,QAAQ,CACR,CAAC;;;;QAzCH,UAAK,GAAG,EAAE,CAAC;QAGX,eAAU,G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AAY;sBAApB,KAAK;gBAMN,OAAO;sBADN,eAAe;uBAAC,uBAAuB,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;;;AC3DhE;;;MAQa,gBAAgB;;6GAAhB,gBAAgB;8GAAhB,gBAAgB,iBAJb,uBAAuB,EAAE,mBAAmB,aACjD,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,aAC5D,uBAAuB,EAAE,mBAAmB;8GAE1C,gBAAgB,YAHnB,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,CAAC;2FAG3D,gBAAgB;kBAL5B,QAAQ;mBAAC;oBACT,YAAY,EAAE,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;oBAC5D,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,CAAC;oBACvE,OAAO,EAAE,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;iBACvD;;;ACfD;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { HttpEvent } from '@angular/common/http';
2
2
  import { OnDestroy, OnInit } from '@angular/core';
3
3
  import { ControlValueAccessor } from '@angular/forms';
4
- import { Observable, Subscription } from 'rxjs';
4
+ import { Observable, Subject, Subscription } from 'rxjs';
5
5
  import { FileUploadItem, FileUploadService } from './file-upload.service';
6
6
  import * as i0 from "@angular/core";
7
7
  /** @ignore */
@@ -69,6 +69,12 @@ export declare class FileUploadComponent implements OnInit, OnDestroy, ControlVa
69
69
  _uploadingItems: UploadingItem[];
70
70
  /** @ignore */
71
71
  _accept: string;
72
+ /** @ignore */
73
+ _itemAnimationStart: Subject<void>;
74
+ /** @ignore */
75
+ _itemAnimationDone: Subject<void>;
76
+ /** @ignore */
77
+ _itemAnimationInProgress: boolean;
72
78
  private _onChange;
73
79
  private _onTouch;
74
80
  private _frameDndEnter;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bravura/ui",
3
3
  "description": "Bravura UI Components for Angular applications",
4
- "version": "1.17.2",
4
+ "version": "1.19.1",
5
5
  "keywords": [
6
6
  "Angular",
7
7
  "Angular Material",
@@ -1,3 +1,3 @@
1
- export * from './radio-panel.module';
2
- export * from './radio-panel.directive';
3
1
  export * from './radio-panel-item.component';
2
+ export * from './radio-panel.component';
3
+ export * from './radio-panel.module';
@@ -1,6 +1,6 @@
1
1
  import { FocusMonitor } from '@angular/cdk/a11y';
2
2
  import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
3
- import { ChangeDetectorRef, ElementRef } from '@angular/core';
3
+ import { ChangeDetectorRef, ElementRef, TemplateRef } from '@angular/core';
4
4
  import { MatRadioButton, MatRadioDefaultOptions, MatRadioGroup } from '@angular/material/radio';
5
5
  import * as i0 from "@angular/core";
6
6
  /**
@@ -11,11 +11,13 @@ export declare class RadioPanelItemComponent extends MatRadioButton {
11
11
  * This will be displayed as the panel header
12
12
  */
13
13
  title: string;
14
+ panelWidth: string;
14
15
  /** The default position of the 'tick' icon relative to the title. */
15
16
  private _tickPosition;
16
17
  get tickPosition(): 'start' | 'end';
17
18
  set tickPosition(pos: 'start' | 'end');
19
+ contentOnSelect: TemplateRef<any>;
18
20
  constructor(radioGroup: MatRadioGroup, elementRef: ElementRef, _changeDetector: ChangeDetectorRef, _focusMonitor: FocusMonitor, _radioDispatcher: UniqueSelectionDispatcher, animationMode?: string, _providerOverride?: MatRadioDefaultOptions, tabIndex?: string);
19
21
  static ɵfac: i0.ɵɵFactoryDeclaration<RadioPanelItemComponent, [{ optional: true; }, null, null, null, null, { optional: true; }, { optional: true; }, { attribute: "tabindex"; }]>;
20
- static ɵcmp: i0.ɵɵComponentDeclaration<RadioPanelItemComponent, "bui-radio-panel-item", ["matRadioButton"], { "disableRipple": "disableRipple"; "tabIndex": "tabIndex"; "title": "title"; "_tickPosition": "_tickPosition"; "tickPosition": "tickPosition"; }, {}, never, ["[buiRadioItemHeadingEnd]", "*"]>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<RadioPanelItemComponent, "bui-radio-panel-item", ["matRadioButton"], { "disableRipple": "disableRipple"; "tabIndex": "tabIndex"; "title": "title"; "_tickPosition": "_tickPosition"; "tickPosition": "tickPosition"; }, {}, ["contentOnSelect"], ["[buiRadioItemHeadingEnd]", "*"]>;
21
23
  }
@@ -1,4 +1,4 @@
1
- import { ChangeDetectorRef, OnChanges, QueryList, SimpleChanges } from '@angular/core';
1
+ import { AfterContentInit, ChangeDetectorRef, OnChanges, QueryList, SimpleChanges } from '@angular/core';
2
2
  import { ThemePalette } from '@angular/material/core';
3
3
  import { MatRadioGroup } from '@angular/material/radio';
4
4
  import { RadioPanelItemComponent } from './radio-panel-item.component';
@@ -11,7 +11,14 @@ import * as i0 from "@angular/core";
11
11
  * in the color selected by the theme attribute `color`.
12
12
  *
13
13
  */
14
- export declare class RadioPanelDirective extends MatRadioGroup implements OnChanges {
14
+ export declare class RadioPanelComponent extends MatRadioGroup implements OnChanges, AfterContentInit {
15
+ /**
16
+ * @ignore
17
+ */
18
+ classAttr: string;
19
+ panelWidth: number;
20
+ /** The flow direction of the radio panel items */
21
+ direction: 'row' | 'column';
15
22
  /** Theme color for all of the radio panels in the group. */
16
23
  color: ThemePalette;
17
24
  /** The default position of the 'tick' icon relative to the title. */
@@ -23,6 +30,8 @@ export declare class RadioPanelDirective extends MatRadioGroup implements OnChan
23
30
  constructor(cd: ChangeDetectorRef);
24
31
  /** @ignore */
25
32
  ngOnChanges(changes: SimpleChanges): void;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<RadioPanelDirective, never>;
27
- static ɵdir: i0.ɵɵDirectiveDeclaration<RadioPanelDirective, "bui-radio-panel", ["buiRadioPanel"], { "color": "color"; "tickPosition": "tickPosition"; }, {}, ["_radios"]>;
33
+ ngAfterContentInit(): void;
34
+ private _updatePanelWidth;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<RadioPanelComponent, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<RadioPanelComponent, "bui-radio-panel", ["buiRadioPanel"], { "panelWidth": "panelWidth"; "direction": "direction"; "color": "color"; "tickPosition": "tickPosition"; }, {}, ["_radios"], ["*"]>;
28
37
  }
@@ -1,6 +1,6 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./radio-panel-item.component";
3
- import * as i2 from "./radio-panel.directive";
3
+ import * as i2 from "./radio-panel.component";
4
4
  import * as i3 from "@angular/common";
5
5
  import * as i4 from "@angular/material/radio";
6
6
  import * as i5 from "@angular/material/core";
@@ -10,6 +10,6 @@ import * as i6 from "@angular/material/icon";
10
10
  */
11
11
  export declare class RadioPanelModule {
12
12
  static ɵfac: i0.ɵɵFactoryDeclaration<RadioPanelModule, never>;
13
- static ɵmod: i0.ɵɵNgModuleDeclaration<RadioPanelModule, [typeof i1.RadioPanelItemComponent, typeof i2.RadioPanelDirective], [typeof i3.CommonModule, typeof i4.MatRadioModule, typeof i5.MatRippleModule, typeof i6.MatIconModule], [typeof i1.RadioPanelItemComponent, typeof i2.RadioPanelDirective]>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RadioPanelModule, [typeof i1.RadioPanelItemComponent, typeof i2.RadioPanelComponent], [typeof i3.CommonModule, typeof i4.MatRadioModule, typeof i5.MatRippleModule, typeof i6.MatIconModule], [typeof i1.RadioPanelItemComponent, typeof i2.RadioPanelComponent]>;
14
14
  static ɵinj: i0.ɵɵInjectorDeclaration<RadioPanelModule>;
15
15
  }
@@ -1,64 +0,0 @@
1
- import { ContentChildren, Directive, forwardRef, Input } from '@angular/core';
2
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
- import { MatRadioGroup, MAT_RADIO_GROUP } from '@angular/material/radio';
4
- import { RadioPanelItemComponent } from './radio-panel-item.component';
5
- import * as i0 from "@angular/core";
6
- /**
7
- * Radio panel is a [control value accessor](https://angular.io/api/forms/ControlValueAccessor)
8
- * that extends Angular Material's [radio group component](https://material.angular.io/components/radio/overview).
9
- * It inherits all the features of `MatRadioGroup`, and arranges the child items in panels,
10
- * with the `title` attributes rendered as captions. The check box icon and the borders will be displayed
11
- * in the color selected by the theme attribute `color`.
12
- *
13
- */
14
- export class RadioPanelDirective extends MatRadioGroup {
15
- constructor(cd) {
16
- super(cd);
17
- /** The default position of the 'tick' icon relative to the title. */
18
- this.tickPosition = 'start';
19
- }
20
- /** @ignore */
21
- ngOnChanges(changes) {
22
- if (['color', 'tickPosition'].some(p => changes[p]) && this._radios) {
23
- this._radios.forEach(item => item._markForCheck());
24
- }
25
- }
26
- }
27
- RadioPanelDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: RadioPanelDirective, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
28
- RadioPanelDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.7", type: RadioPanelDirective, selector: "bui-radio-panel", inputs: { color: "color", tickPosition: "tickPosition" }, host: { attributes: { "role": "radiogroup" }, classAttribute: "bui-radio-panel bui-host" }, providers: [
29
- {
30
- provide: NG_VALUE_ACCESSOR,
31
- useExisting: forwardRef(() => RadioPanelDirective),
32
- multi: true
33
- },
34
- { provide: MAT_RADIO_GROUP, useExisting: forwardRef(() => RadioPanelDirective) }
35
- ], queries: [{ propertyName: "_radios", predicate: RadioPanelItemComponent, descendants: true }], exportAs: ["buiRadioPanel"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: RadioPanelDirective, decorators: [{
37
- type: Directive,
38
- args: [{
39
- // tslint:disable-next-line: directive-selector
40
- selector: 'bui-radio-panel',
41
- exportAs: 'buiRadioPanel',
42
- providers: [
43
- {
44
- provide: NG_VALUE_ACCESSOR,
45
- useExisting: forwardRef(() => RadioPanelDirective),
46
- multi: true
47
- },
48
- { provide: MAT_RADIO_GROUP, useExisting: forwardRef(() => RadioPanelDirective) }
49
- ],
50
- // tslint:disable-next-line: no-host-metadata-property
51
- host: {
52
- role: 'radiogroup',
53
- class: 'bui-radio-panel bui-host'
54
- }
55
- }]
56
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { color: [{
57
- type: Input
58
- }], tickPosition: [{
59
- type: Input
60
- }], _radios: [{
61
- type: ContentChildren,
62
- args: [RadioPanelItemComponent, { descendants: true }]
63
- }] } });
64
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaW8tcGFuZWwuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvdWkvcmFkaW8tcGFuZWwvcmFkaW8tcGFuZWwuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFTixlQUFlLEVBQ2YsU0FBUyxFQUNULFVBQVUsRUFDVixLQUFLLEVBSUwsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFbkQsT0FBTyxFQUFFLGFBQWEsRUFBRSxlQUFlLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUN6RSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQzs7QUFDdkU7Ozs7Ozs7R0FPRztBQW1CSCxNQUFNLE9BQU8sbUJBQW9CLFNBQVEsYUFBYTtJQWFyRCxZQUFZLEVBQXFCO1FBQ2hDLEtBQUssQ0FBQyxFQUFFLENBQUMsQ0FBQztRQVZYLHFFQUFxRTtRQUM1RCxpQkFBWSxHQUFvQixPQUFPLENBQUM7SUFVakQsQ0FBQztJQUVELGNBQWM7SUFDZCxXQUFXLENBQUMsT0FBc0I7UUFDakMsSUFBSSxDQUFDLE9BQU8sRUFBRSxjQUFjLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FB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