@bravura/ui 3.8.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +579 -557
- package/LICENSE +6 -6
- package/README.md +56 -54
- package/alert/alert-container.component.d.ts +1 -1
- package/alert/alert-message.component.d.ts +1 -1
- package/behavior/await.directive.d.ts +1 -1
- package/behavior/observe-content-class.directive.d.ts +1 -1
- package/behavior/sizing.directive.d.ts +1 -1
- package/clip-note/clip-note.directive.d.ts +1 -1
- package/currency-input/currency-input.directive.d.ts +1 -1
- package/decimal-input/decimal-input.directive.d.ts +1 -1
- package/discrete-input/discrete-input.component.d.ts +1 -1
- package/esm2022/alert/alert-container.component.mjs +207 -0
- package/esm2022/alert/alert-message.component.mjs +101 -0
- package/esm2022/alert/alert.module.mjs +22 -0
- package/{esm2020 → esm2022}/alert/public-api.mjs +1 -1
- package/esm2022/alert/testing/test-api.mjs +44 -0
- package/{esm2020 → esm2022}/behavior/await.directive.mjs +6 -6
- package/esm2022/behavior/behavior.module.mjs +37 -0
- package/{esm2020 → esm2022}/behavior/observe-content-class.directive.mjs +5 -5
- package/{esm2020 → esm2022}/behavior/public-api.mjs +1 -1
- package/esm2022/behavior/sizing-monitor.directive.mjs +31 -0
- package/esm2022/behavior/sizing.directive.mjs +256 -0
- package/esm2022/clip-note/clip-note.component.mjs +216 -0
- package/esm2022/clip-note/clip-note.directive.mjs +141 -0
- package/esm2022/clip-note/clip-note.module.mjs +32 -0
- package/{esm2020 → esm2022}/clip-note/public-api.mjs +1 -1
- package/{esm2020 → esm2022}/common/common-utils.mjs +1 -1
- package/{esm2020 → esm2022}/common/common.module.mjs +7 -7
- package/{esm2020 → esm2022}/common/public-api.mjs +1 -1
- package/{esm2020 → esm2022}/currency-input/currency-input.directive.mjs +6 -6
- package/esm2022/currency-input/currency-input.module.mjs +19 -0
- package/{esm2020 → esm2022}/currency-input/public-api.mjs +1 -1
- package/{esm2020 → esm2022}/decimal-input/decimal-input.directive.mjs +9 -9
- package/{esm2020 → esm2022}/decimal-input/decimal-input.module.mjs +5 -5
- package/esm2022/discrete-input/discrete-input.component.mjs +337 -0
- package/esm2022/discrete-input/discrete-input.module.mjs +21 -0
- package/{esm2020 → esm2022}/discrete-input/public-api.mjs +1 -1
- package/esm2022/file-upload/file-upload.component.mjs +400 -0
- package/esm2022/file-upload/file-upload.module.mjs +44 -0
- package/esm2022/file-upload/file-upload.service.mjs +29 -0
- package/{esm2020 → esm2022}/file-upload/public-api.mjs +1 -1
- package/esm2022/form-field/form-field.component.mjs +82 -0
- package/esm2022/form-field/form-field.module.mjs +33 -0
- package/{esm2020 → esm2022}/form-field/public-api.mjs +1 -1
- package/esm2022/icon-font/icon-font.module.mjs +22 -0
- package/{esm2020 → esm2022}/icon-font/icon.directive.mjs +5 -5
- package/{esm2020 → esm2022}/icon-font/public-api.mjs +1 -1
- package/{esm2020 → esm2022}/icon-font/utilities.mjs +1 -1
- package/esm2022/panel/panel-section.component.mjs +41 -0
- package/esm2022/panel/panel.component.mjs +87 -0
- package/esm2022/panel/panel.module.mjs +23 -0
- package/{esm2020 → esm2022}/panel/public-api.mjs +1 -1
- package/esm2022/panel/tinted.directive.mjs +60 -0
- package/esm2022/phone-number/phone-number.directive.mjs +188 -0
- package/{esm2020 → esm2022}/phone-number/phone-number.module.mjs +5 -5
- package/{esm2020 → esm2022}/phone-number/phone-number.pipe.mjs +6 -6
- package/esm2022/phone-number/phone-number.validator.mjs +64 -0
- package/{esm2020 → esm2022}/phone-number/public-api.mjs +1 -1
- package/{esm2020 → esm2022}/public-api.mjs +1 -1
- package/esm2022/radio-panel/radio-panel-item.component.mjs +93 -0
- package/esm2022/radio-panel/radio-panel.component.mjs +81 -0
- package/{esm2020 → esm2022}/radio-panel/radio-panel.module.mjs +5 -5
- package/esm2022/radio-panel/testing/test-api.mjs +46 -0
- package/{esm2020 → esm2022}/selection-panel/public-api.mjs +1 -1
- package/esm2022/selection-panel/selection-panel-item.component.mjs +166 -0
- package/esm2022/selection-panel/selection-panel.directive.mjs +119 -0
- package/esm2022/selection-panel/selection-panel.module.mjs +23 -0
- package/{esm2020 → esm2022}/skeletons/public-api.mjs +1 -1
- package/esm2022/skeletons/skeleton-loader-presets.directive.mjs +83 -0
- package/{esm2020 → esm2022}/skeletons/skeleton-loader.component.mjs +5 -5
- package/esm2022/skeletons/skeletons.module.mjs +35 -0
- package/{esm2020 → esm2022}/stepper/public-api.mjs +1 -1
- package/{esm2020 → esm2022}/stepper/stepper-animation.mjs +1 -1
- package/esm2022/stepper/stepper.component.mjs +176 -0
- package/esm2022/stepper/stepper.module.mjs +52 -0
- package/{esm2020 → esm2022}/tooltip/public-api.mjs +1 -1
- package/esm2022/tooltip/tooltip.component.mjs +63 -0
- package/esm2022/tooltip/tooltip.directive.mjs +148 -0
- package/esm2022/tooltip/tooltip.module.mjs +25 -0
- package/{fesm2020 → fesm2022}/bravura-ui-alert-testing.mjs +2 -2
- package/fesm2022/bravura-ui-alert-testing.mjs.map +1 -0
- package/fesm2022/bravura-ui-alert.mjs +327 -0
- package/fesm2022/bravura-ui-alert.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-behavior.mjs +45 -45
- package/fesm2022/bravura-ui-behavior.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-clip-note.mjs +70 -70
- package/fesm2022/bravura-ui-clip-note.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-common.mjs +6 -6
- package/fesm2022/bravura-ui-common.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-currency-input.mjs +11 -11
- package/fesm2022/bravura-ui-currency-input.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-decimal-input.mjs +12 -12
- package/fesm2022/bravura-ui-decimal-input.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-discrete-input.mjs +48 -48
- package/fesm2022/bravura-ui-discrete-input.mjs.map +1 -0
- package/fesm2022/bravura-ui-file-upload.mjs +474 -0
- package/fesm2022/bravura-ui-file-upload.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-form-field.mjs +19 -19
- package/fesm2022/bravura-ui-form-field.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-icon-font.mjs +8 -8
- package/fesm2022/bravura-ui-icon-font.mjs.map +1 -0
- package/fesm2022/bravura-ui-panel.mjs +206 -0
- package/fesm2022/bravura-ui-panel.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-phone-number.mjs +30 -30
- package/fesm2022/bravura-ui-phone-number.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-radio-panel-testing.mjs +5 -6
- package/fesm2022/bravura-ui-radio-panel-testing.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-radio-panel.mjs +31 -31
- package/fesm2022/bravura-ui-radio-panel.mjs.map +1 -0
- package/fesm2022/bravura-ui-selection-panel.mjs +306 -0
- package/fesm2022/bravura-ui-selection-panel.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-skeletons.mjs +43 -43
- package/fesm2022/bravura-ui-skeletons.mjs.map +1 -0
- package/fesm2022/bravura-ui-stepper.mjs +251 -0
- package/fesm2022/bravura-ui-stepper.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-tooltip.mjs +32 -24
- package/fesm2022/bravura-ui-tooltip.mjs.map +1 -0
- package/fesm2022/bravura-ui.mjs.map +1 -0
- package/file-upload/file-upload.component.d.ts +1 -1
- package/form-field/form-field.component.d.ts +1 -1
- package/icon-font/icon.directive.d.ts +1 -1
- package/package.json +76 -120
- package/panel/panel.component.d.ts +1 -1
- package/panel/tinted.directive.d.ts +1 -1
- package/phone-number/phone-number.directive.d.ts +1 -1
- package/phone-number/phone-number.validator.d.ts +2 -2
- package/radio-panel/radio-panel-item.component.d.ts +1 -1
- package/radio-panel/radio-panel.component.d.ts +1 -1
- package/radio-panel/testing/test-api.d.ts +2 -3
- package/selection-panel/selection-panel-item.component.d.ts +1 -1
- package/selection-panel/selection-panel.directive.d.ts +1 -1
- package/skeletons/skeleton-loader-presets.directive.d.ts +3 -3
- package/stepper/stepper.component.d.ts +1 -1
- package/theme/_bui-card.scss +56 -56
- package/theme/_ui-theme.scss +112 -112
- package/theme/global-style-by-bootstrap.scss +3 -3
- package/theme/global-style-by-tailwind.scss +3 -3
- package/theme/scrollbar.scss +40 -40
- package/tooltip/tooltip.component.d.ts +2 -0
- package/tooltip/tooltip.directive.d.ts +3 -5
- package/esm2020/alert/alert-container.component.mjs +0 -207
- package/esm2020/alert/alert-message.component.mjs +0 -102
- package/esm2020/alert/alert.module.mjs +0 -22
- package/esm2020/alert/testing/test-api.mjs +0 -44
- package/esm2020/behavior/behavior.module.mjs +0 -37
- package/esm2020/behavior/sizing-monitor.directive.mjs +0 -31
- package/esm2020/behavior/sizing.directive.mjs +0 -256
- package/esm2020/clip-note/clip-note.component.mjs +0 -216
- package/esm2020/clip-note/clip-note.directive.mjs +0 -141
- package/esm2020/clip-note/clip-note.module.mjs +0 -32
- package/esm2020/currency-input/currency-input.module.mjs +0 -19
- package/esm2020/discrete-input/discrete-input.component.mjs +0 -337
- package/esm2020/discrete-input/discrete-input.module.mjs +0 -21
- package/esm2020/file-upload/file-upload.component.mjs +0 -400
- package/esm2020/file-upload/file-upload.module.mjs +0 -44
- package/esm2020/file-upload/file-upload.service.mjs +0 -29
- package/esm2020/form-field/form-field.component.mjs +0 -82
- package/esm2020/form-field/form-field.module.mjs +0 -33
- package/esm2020/icon-font/icon-font.module.mjs +0 -22
- package/esm2020/panel/panel-section.component.mjs +0 -41
- package/esm2020/panel/panel.component.mjs +0 -87
- package/esm2020/panel/panel.module.mjs +0 -23
- package/esm2020/panel/tinted.directive.mjs +0 -60
- package/esm2020/phone-number/phone-number.directive.mjs +0 -188
- package/esm2020/phone-number/phone-number.validator.mjs +0 -64
- package/esm2020/radio-panel/radio-panel-item.component.mjs +0 -93
- package/esm2020/radio-panel/radio-panel.component.mjs +0 -81
- package/esm2020/radio-panel/testing/test-api.mjs +0 -47
- package/esm2020/selection-panel/selection-panel-item.component.mjs +0 -166
- package/esm2020/selection-panel/selection-panel.directive.mjs +0 -119
- package/esm2020/selection-panel/selection-panel.module.mjs +0 -23
- package/esm2020/skeletons/skeleton-loader-presets.directive.mjs +0 -83
- package/esm2020/skeletons/skeletons.module.mjs +0 -35
- package/esm2020/stepper/stepper.component.mjs +0 -176
- package/esm2020/stepper/stepper.module.mjs +0 -52
- package/esm2020/tooltip/tooltip.component.mjs +0 -54
- package/esm2020/tooltip/tooltip.directive.mjs +0 -149
- package/esm2020/tooltip/tooltip.module.mjs +0 -25
- package/fesm2015/bravura-ui-alert-testing.mjs +0 -64
- package/fesm2015/bravura-ui-alert-testing.mjs.map +0 -1
- package/fesm2015/bravura-ui-alert.mjs +0 -340
- package/fesm2015/bravura-ui-alert.mjs.map +0 -1
- package/fesm2015/bravura-ui-behavior.mjs +0 -515
- package/fesm2015/bravura-ui-behavior.mjs.map +0 -1
- package/fesm2015/bravura-ui-clip-note.mjs +0 -393
- package/fesm2015/bravura-ui-clip-note.mjs.map +0 -1
- package/fesm2015/bravura-ui-common.mjs +0 -96
- package/fesm2015/bravura-ui-common.mjs.map +0 -1
- package/fesm2015/bravura-ui-currency-input.mjs +0 -300
- package/fesm2015/bravura-ui-currency-input.mjs.map +0 -1
- package/fesm2015/bravura-ui-decimal-input.mjs +0 -145
- package/fesm2015/bravura-ui-decimal-input.mjs.map +0 -1
- package/fesm2015/bravura-ui-discrete-input.mjs +0 -365
- package/fesm2015/bravura-ui-discrete-input.mjs.map +0 -1
- package/fesm2015/bravura-ui-file-upload.mjs +0 -478
- package/fesm2015/bravura-ui-file-upload.mjs.map +0 -1
- package/fesm2015/bravura-ui-form-field.mjs +0 -120
- package/fesm2015/bravura-ui-form-field.mjs.map +0 -1
- package/fesm2015/bravura-ui-icon-font.mjs +0 -178
- package/fesm2015/bravura-ui-icon-font.mjs.map +0 -1
- package/fesm2015/bravura-ui-panel.mjs +0 -210
- package/fesm2015/bravura-ui-panel.mjs.map +0 -1
- package/fesm2015/bravura-ui-phone-number.mjs +0 -327
- package/fesm2015/bravura-ui-phone-number.mjs.map +0 -1
- package/fesm2015/bravura-ui-radio-panel-testing.mjs +0 -63
- package/fesm2015/bravura-ui-radio-panel-testing.mjs.map +0 -1
- package/fesm2015/bravura-ui-radio-panel.mjs +0 -200
- package/fesm2015/bravura-ui-radio-panel.mjs.map +0 -1
- package/fesm2015/bravura-ui-selection-panel.mjs +0 -311
- package/fesm2015/bravura-ui-selection-panel.mjs.map +0 -1
- package/fesm2015/bravura-ui-skeletons.mjs +0 -195
- package/fesm2015/bravura-ui-skeletons.mjs.map +0 -1
- package/fesm2015/bravura-ui-stepper.mjs +0 -253
- package/fesm2015/bravura-ui-stepper.mjs.map +0 -1
- package/fesm2015/bravura-ui-tooltip.mjs +0 -229
- package/fesm2015/bravura-ui-tooltip.mjs.map +0 -1
- package/fesm2015/bravura-ui.mjs.map +0 -1
- package/fesm2020/bravura-ui-alert-testing.mjs.map +0 -1
- package/fesm2020/bravura-ui-alert.mjs +0 -328
- package/fesm2020/bravura-ui-alert.mjs.map +0 -1
- package/fesm2020/bravura-ui-behavior.mjs.map +0 -1
- package/fesm2020/bravura-ui-clip-note.mjs.map +0 -1
- package/fesm2020/bravura-ui-common.mjs.map +0 -1
- package/fesm2020/bravura-ui-currency-input.mjs.map +0 -1
- package/fesm2020/bravura-ui-decimal-input.mjs.map +0 -1
- package/fesm2020/bravura-ui-discrete-input.mjs.map +0 -1
- package/fesm2020/bravura-ui-file-upload.mjs +0 -474
- package/fesm2020/bravura-ui-file-upload.mjs.map +0 -1
- package/fesm2020/bravura-ui-form-field.mjs.map +0 -1
- package/fesm2020/bravura-ui-icon-font.mjs.map +0 -1
- package/fesm2020/bravura-ui-panel.mjs +0 -206
- package/fesm2020/bravura-ui-panel.mjs.map +0 -1
- package/fesm2020/bravura-ui-phone-number.mjs.map +0 -1
- package/fesm2020/bravura-ui-radio-panel-testing.mjs.map +0 -1
- package/fesm2020/bravura-ui-radio-panel.mjs.map +0 -1
- package/fesm2020/bravura-ui-selection-panel.mjs +0 -306
- package/fesm2020/bravura-ui-selection-panel.mjs.map +0 -1
- package/fesm2020/bravura-ui-skeletons.mjs.map +0 -1
- package/fesm2020/bravura-ui-stepper.mjs +0 -251
- package/fesm2020/bravura-ui-stepper.mjs.map +0 -1
- package/fesm2020/bravura-ui-tooltip.mjs.map +0 -1
- package/fesm2020/bravura-ui.mjs +0 -8
- package/fesm2020/bravura-ui.mjs.map +0 -1
- /package/{esm2020 → esm2022}/alert/bravura-ui-alert.mjs +0 -0
- /package/{esm2020 → esm2022}/alert/testing/bravura-ui-alert-testing.mjs +0 -0
- /package/{esm2020 → esm2022}/behavior/bravura-ui-behavior.mjs +0 -0
- /package/{esm2020 → esm2022}/bravura-ui.mjs +0 -0
- /package/{esm2020 → esm2022}/clip-note/bravura-ui-clip-note.mjs +0 -0
- /package/{esm2020 → esm2022}/common/bravura-ui-common.mjs +0 -0
- /package/{esm2020 → esm2022}/currency-input/bravura-ui-currency-input.mjs +0 -0
- /package/{esm2020 → esm2022}/decimal-input/bravura-ui-decimal-input.mjs +0 -0
- /package/{esm2020 → esm2022}/decimal-input/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/discrete-input/bravura-ui-discrete-input.mjs +0 -0
- /package/{esm2020 → esm2022}/file-upload/bravura-ui-file-upload.mjs +0 -0
- /package/{esm2020 → esm2022}/form-field/bravura-ui-form-field.mjs +0 -0
- /package/{esm2020 → esm2022}/icon-font/bravura-ui-icon-font.mjs +0 -0
- /package/{esm2020 → esm2022}/panel/bravura-ui-panel.mjs +0 -0
- /package/{esm2020 → esm2022}/phone-number/bravura-ui-phone-number.mjs +0 -0
- /package/{esm2020 → esm2022}/radio-panel/bravura-ui-radio-panel.mjs +0 -0
- /package/{esm2020 → esm2022}/radio-panel/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/radio-panel/testing/bravura-ui-radio-panel-testing.mjs +0 -0
- /package/{esm2020 → esm2022}/selection-panel/bravura-ui-selection-panel.mjs +0 -0
- /package/{esm2020 → esm2022}/skeletons/bravura-ui-skeletons.mjs +0 -0
- /package/{esm2020 → esm2022}/stepper/bravura-ui-stepper.mjs +0 -0
- /package/{esm2020 → esm2022}/tooltip/bravura-ui-tooltip.mjs +0 -0
- /package/{fesm2015 → fesm2022}/bravura-ui.mjs +0 -0
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { Component, ChangeDetectionStrategy, Optional, Inject, Attribute, Input, ContentChild, forwardRef, HostBinding, ContentChildren, NgModule } from '@angular/core';
|
|
4
|
-
import * as i6 from '@angular/material/radio';
|
|
5
|
-
import { MatRadioButton, MAT_RADIO_GROUP, MAT_RADIO_DEFAULT_OPTIONS, MatRadioGroup, MatRadioModule } from '@angular/material/radio';
|
|
6
|
-
import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
|
|
7
|
-
import * as i1 from '@angular/cdk/a11y';
|
|
8
|
-
import * as i2 from '@angular/cdk/collections';
|
|
9
|
-
import * as i3 from '@angular/common';
|
|
10
|
-
import { CommonModule } from '@angular/common';
|
|
11
|
-
import * as i4 from '@angular/material/core';
|
|
12
|
-
import { MatRippleModule } from '@angular/material/core';
|
|
13
|
-
import * as i5 from '@angular/material/icon';
|
|
14
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
15
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Use `bui-radio-panel-item` instead of `mat-radio-button` in a `bui-radio-panel` to display an option.
|
|
19
|
-
*/
|
|
20
|
-
class RadioPanelItemComponent extends MatRadioButton {
|
|
21
|
-
constructor(radioGroup, elementRef, _changeDetector, _focusMonitor, _radioDispatcher, animationMode, _providerOverride, tabIndex) {
|
|
22
|
-
super(radioGroup, elementRef, _changeDetector, _focusMonitor, _radioDispatcher, animationMode, _providerOverride, tabIndex);
|
|
23
|
-
/**
|
|
24
|
-
* This will be displayed as the panel header
|
|
25
|
-
*/
|
|
26
|
-
this.title = '';
|
|
27
|
-
}
|
|
28
|
-
get tickPosition() {
|
|
29
|
-
var _a;
|
|
30
|
-
return this._tickPosition || ((_a = this.radioGroup) === null || _a === void 0 ? void 0 : _a.tickPosition);
|
|
31
|
-
}
|
|
32
|
-
set tickPosition(pos) {
|
|
33
|
-
this._tickPosition = pos;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
RadioPanelItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", 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 });
|
|
37
|
-
RadioPanelItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", 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" }, 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;inset:0}:host .bui-radio-panel-item-overlay{background-color:#fff;opacity:0}:host .bui-radio-panel-item-circle{width:40px;height:40px;flex-shrink:0}: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:700}: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){flex-basis:var(--bui-panel-width, 300px);flex-grow:0}:host(.bui-disabled) .bui-radio-panel-item-wrapper>.bui-label-header,:host(.bui-disabled) .bui-radio-panel-item-wrapper>.bui-label-content{opacity:.5}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], animations: [
|
|
38
|
-
trigger('slideInOut', [
|
|
39
|
-
state('void', style({ height: '0px', overflow: 'hidden' })),
|
|
40
|
-
transition(':enter, :leave', animate('.25s'))
|
|
41
|
-
])
|
|
42
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: RadioPanelItemComponent, decorators: [{
|
|
44
|
-
type: Component,
|
|
45
|
-
args: [{ selector: 'bui-radio-panel-item', inputs: ['disableRipple', 'tabIndex'], exportAs: 'matRadioButton', host: {
|
|
46
|
-
class: 'bui-radio-panel-item',
|
|
47
|
-
'[class.bui-radio-checked]': 'checked',
|
|
48
|
-
'[class.bui-disabled]': 'disabled',
|
|
49
|
-
'[class._mat-animation-noopable]': '_noopAnimations',
|
|
50
|
-
'[class.mat-primary]': 'color === "primary"',
|
|
51
|
-
'[class.mat-accent]': 'color === "accent"',
|
|
52
|
-
'[class.mat-warn]': 'color === "warn"',
|
|
53
|
-
// Needs to be removed since it causes some a11y issues (see #21266).
|
|
54
|
-
'[attr.tabindex]': 'null',
|
|
55
|
-
'[attr.id]': 'id',
|
|
56
|
-
'[attr.aria-label]': 'null',
|
|
57
|
-
'[attr.aria-labelledby]': 'null',
|
|
58
|
-
'[attr.aria-describedby]': 'null',
|
|
59
|
-
// Note: under normal conditions focus shouldn't land on this element, however it may be
|
|
60
|
-
// programmatically set, for example inside of a focus trap, in this case we want to forward
|
|
61
|
-
// the focus to the native element.
|
|
62
|
-
'(focus)': '_inputElement.nativeElement.focus()'
|
|
63
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
|
64
|
-
trigger('slideInOut', [
|
|
65
|
-
state('void', style({ height: '0px', overflow: 'hidden' })),
|
|
66
|
-
transition(':enter, :leave', animate('.25s'))
|
|
67
|
-
])
|
|
68
|
-
], 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;inset:0}:host .bui-radio-panel-item-overlay{background-color:#fff;opacity:0}:host .bui-radio-panel-item-circle{width:40px;height:40px;flex-shrink:0}: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:700}: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){flex-basis:var(--bui-panel-width, 300px);flex-grow:0}:host(.bui-disabled) .bui-radio-panel-item-wrapper>.bui-label-header,:host(.bui-disabled) .bui-radio-panel-item-wrapper>.bui-label-content{opacity:.5}\n"] }]
|
|
69
|
-
}], ctorParameters: function () {
|
|
70
|
-
return [{ type: i6.MatRadioGroup, decorators: [{
|
|
71
|
-
type: Optional
|
|
72
|
-
}, {
|
|
73
|
-
type: Inject,
|
|
74
|
-
args: [MAT_RADIO_GROUP]
|
|
75
|
-
}] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.FocusMonitor }, { type: i2.UniqueSelectionDispatcher }, { type: undefined, decorators: [{
|
|
76
|
-
type: Optional
|
|
77
|
-
}, {
|
|
78
|
-
type: Inject,
|
|
79
|
-
args: [ANIMATION_MODULE_TYPE]
|
|
80
|
-
}] }, { type: undefined, decorators: [{
|
|
81
|
-
type: Optional
|
|
82
|
-
}, {
|
|
83
|
-
type: Inject,
|
|
84
|
-
args: [MAT_RADIO_DEFAULT_OPTIONS]
|
|
85
|
-
}] }, { type: undefined, decorators: [{
|
|
86
|
-
type: Attribute,
|
|
87
|
-
args: ['tabindex']
|
|
88
|
-
}] }];
|
|
89
|
-
}, propDecorators: { title: [{
|
|
90
|
-
type: Input
|
|
91
|
-
}], _tickPosition: [{
|
|
92
|
-
type: Input
|
|
93
|
-
}], tickPosition: [{
|
|
94
|
-
type: Input
|
|
95
|
-
}],
|
|
96
|
-
//@ts-ignore
|
|
97
|
-
contentOnSelect: [{
|
|
98
|
-
type: ContentChild,
|
|
99
|
-
args: ['contentOnSelect']
|
|
100
|
-
}] } });
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Radio panel is a [control value accessor](https://angular.io/api/forms/ControlValueAccessor)
|
|
104
|
-
* that extends Angular Material's [radio group component](https://material.angular.io/components/radio/overview).
|
|
105
|
-
* It inherits all the features of `MatRadioGroup`, and arranges the child items in panels,
|
|
106
|
-
* with the `title` attributes rendered as captions. The check box icon and the borders will be displayed
|
|
107
|
-
* in the color selected by the theme attribute `color`.
|
|
108
|
-
*
|
|
109
|
-
*/
|
|
110
|
-
class RadioPanelComponent extends MatRadioGroup {
|
|
111
|
-
constructor(cd) {
|
|
112
|
-
super(cd);
|
|
113
|
-
/**
|
|
114
|
-
* @ignore
|
|
115
|
-
*/
|
|
116
|
-
this.classAttr = '';
|
|
117
|
-
/**
|
|
118
|
-
* The default width of each panel when the `direction` is `row`
|
|
119
|
-
*/
|
|
120
|
-
this.panelWidth = 300;
|
|
121
|
-
/** The flow direction of the radio panel items */
|
|
122
|
-
this.direction = 'row';
|
|
123
|
-
/** The default position of the 'tick' icon relative to the title. */
|
|
124
|
-
this.tickPosition = 'start';
|
|
125
|
-
}
|
|
126
|
-
/** @ignore */
|
|
127
|
-
ngOnChanges(changes) {
|
|
128
|
-
if (['color', 'tickPosition'].some(p => changes[p]) && this._radios) {
|
|
129
|
-
this._radios.forEach(item => item._markForCheck());
|
|
130
|
-
}
|
|
131
|
-
if (this.direction === 'row') {
|
|
132
|
-
this.classAttr = 'bui-radio-panel bui-host radio-dir-row';
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
this.classAttr = 'bui-radio-panel bui-host radio-dir-column';
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
RadioPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: RadioPanelComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
140
|
-
RadioPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: RadioPanelComponent, selector: "bui-radio-panel", inputs: { panelWidth: "panelWidth", direction: "direction", color: "color", tickPosition: "tickPosition" }, host: { attributes: { "role": "radiogroup" }, properties: { "style.--bui-panel-width": "panelWidth +'px'", "attr.class": "this.classAttr" }, classAttribute: "bui-radio-panel bui-host" }, providers: [
|
|
141
|
-
{
|
|
142
|
-
provide: NG_VALUE_ACCESSOR,
|
|
143
|
-
useExisting: forwardRef(() => RadioPanelComponent),
|
|
144
|
-
multi: true
|
|
145
|
-
},
|
|
146
|
-
{ provide: MAT_RADIO_GROUP, useExisting: forwardRef(() => RadioPanelComponent) }
|
|
147
|
-
], queries: [{ propertyName: "_radios", predicate: RadioPanelItemComponent, descendants: true }], exportAs: ["buiRadioPanel"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, styles: [":host{gap:1rem}:host:not([hidden]){display:flex}:host.radio-dir-row{flex-direction:row;flex-wrap:wrap}:host.radio-dir-column{flex-direction:column}\n"] });
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: RadioPanelComponent, decorators: [{
|
|
149
|
-
type: Component,
|
|
150
|
-
args: [{ selector: 'bui-radio-panel', exportAs: 'buiRadioPanel', providers: [
|
|
151
|
-
{
|
|
152
|
-
provide: NG_VALUE_ACCESSOR,
|
|
153
|
-
useExisting: forwardRef(() => RadioPanelComponent),
|
|
154
|
-
multi: true
|
|
155
|
-
},
|
|
156
|
-
{ provide: MAT_RADIO_GROUP, useExisting: forwardRef(() => RadioPanelComponent) }
|
|
157
|
-
], host: {
|
|
158
|
-
role: 'radiogroup',
|
|
159
|
-
class: 'bui-radio-panel bui-host',
|
|
160
|
-
'[style.--bui-panel-width]': "panelWidth +'px'"
|
|
161
|
-
}, template: ` <ng-content></ng-content> `, styles: [":host{gap:1rem}:host:not([hidden]){display:flex}:host.radio-dir-row{flex-direction:row;flex-wrap:wrap}:host.radio-dir-column{flex-direction:column}\n"] }]
|
|
162
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { classAttr: [{
|
|
163
|
-
type: HostBinding,
|
|
164
|
-
args: ['attr.class']
|
|
165
|
-
}], panelWidth: [{
|
|
166
|
-
type: Input
|
|
167
|
-
}], direction: [{
|
|
168
|
-
type: Input
|
|
169
|
-
}], color: [{
|
|
170
|
-
type: Input
|
|
171
|
-
}], tickPosition: [{
|
|
172
|
-
type: Input
|
|
173
|
-
}], _radios: [{
|
|
174
|
-
type: ContentChildren,
|
|
175
|
-
args: [RadioPanelItemComponent, { descendants: true }]
|
|
176
|
-
}] } });
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Import this NgModule for the radio panel component
|
|
180
|
-
*/
|
|
181
|
-
class RadioPanelModule {
|
|
182
|
-
}
|
|
183
|
-
RadioPanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: RadioPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
184
|
-
RadioPanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.6", ngImport: i0, type: RadioPanelModule, declarations: [RadioPanelItemComponent, RadioPanelComponent], imports: [CommonModule, MatRadioModule, MatRippleModule, MatIconModule], exports: [RadioPanelItemComponent, RadioPanelComponent] });
|
|
185
|
-
RadioPanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: RadioPanelModule, imports: [CommonModule, MatRadioModule, MatRippleModule, MatIconModule] });
|
|
186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: RadioPanelModule, decorators: [{
|
|
187
|
-
type: NgModule,
|
|
188
|
-
args: [{
|
|
189
|
-
declarations: [RadioPanelItemComponent, RadioPanelComponent],
|
|
190
|
-
imports: [CommonModule, MatRadioModule, MatRippleModule, MatIconModule],
|
|
191
|
-
exports: [RadioPanelItemComponent, RadioPanelComponent]
|
|
192
|
-
}]
|
|
193
|
-
}] });
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Generated bundle index. Do not edit.
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
|
-
export { RadioPanelComponent, RadioPanelItemComponent, RadioPanelModule };
|
|
200
|
-
//# sourceMappingURL=bravura-ui-radio-panel.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bravura-ui-radio-panel.mjs","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/** 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\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 { MAT_RADIO_GROUP, MatRadioGroup } 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\t'[style.--bui-panel-width]': \"panelWidth +'px'\"\n\t},\n\ttemplate: ` <ng-content></ng-content> `,\n\tstyleUrls: ['radio-panel.component.scss']\n})\nexport class RadioPanelComponent extends MatRadioGroup implements OnChanges {\n\t/**\n\t * @ignore\n\t */\n\t@HostBinding('attr.class')\n\tclassAttr: string = '';\n\n\t/**\n\t * The default width of each panel when the `direction` is `row`\n\t */\n\t@Input()\n\tpanelWidth = 300;\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\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 b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-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, Component, ChangeDetectionStrategy, Inject, Input, ViewChild, forwardRef, Directive, ContentChildren, NgModule } from '@angular/core';
|
|
4
|
-
import * as i4 from '@angular/material/core';
|
|
5
|
-
import { MatRipple, MatRippleModule } from '@angular/material/core';
|
|
6
|
-
import * as i1 from '@angular/common';
|
|
7
|
-
import { CommonModule } from '@angular/common';
|
|
8
|
-
import * as i2 from '@angular/material/checkbox';
|
|
9
|
-
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
10
|
-
import * as i3 from '@angular/forms';
|
|
11
|
-
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
12
|
-
import * as i5 from '@angular/cdk/observers';
|
|
13
|
-
import { ObserversModule } from '@angular/cdk/observers';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @ignore
|
|
17
|
-
*/
|
|
18
|
-
const SELECTION_PANEL_GROUP = new InjectionToken('SelectionPanelItemGroup');
|
|
19
|
-
/**
|
|
20
|
-
* Use `bui-selection-panel-item` within a `bui-selection-panel` to display an option.
|
|
21
|
-
*/
|
|
22
|
-
class SelectionPanelItemComponent {
|
|
23
|
-
constructor(_group, _cd) {
|
|
24
|
-
this._group = _group;
|
|
25
|
-
this._cd = _cd;
|
|
26
|
-
/**
|
|
27
|
-
* This will be displayed as the panel header
|
|
28
|
-
*/
|
|
29
|
-
this.title = '';
|
|
30
|
-
/**
|
|
31
|
-
* Show the header in with a shaded background
|
|
32
|
-
*/
|
|
33
|
-
this.shadedHeader = false;
|
|
34
|
-
/**
|
|
35
|
-
* when false will hide the checkbox
|
|
36
|
-
*/
|
|
37
|
-
this.selectable = true;
|
|
38
|
-
this.empty = true;
|
|
39
|
-
this._disabled = false;
|
|
40
|
-
}
|
|
41
|
-
/** Whether the option is disabled. */
|
|
42
|
-
get disabled() {
|
|
43
|
-
return this._disabled || this._group._isDisabled;
|
|
44
|
-
}
|
|
45
|
-
set disabled(value) {
|
|
46
|
-
this._setDisabled(coerceBooleanProperty(value));
|
|
47
|
-
}
|
|
48
|
-
/** The value of this option. */
|
|
49
|
-
get value() {
|
|
50
|
-
return this._value;
|
|
51
|
-
}
|
|
52
|
-
set value(value) {
|
|
53
|
-
if (this._value !== value) {
|
|
54
|
-
this._value = value;
|
|
55
|
-
this._cd.markForCheck();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
/** Whether this option is checked. */
|
|
59
|
-
get checked() {
|
|
60
|
-
return this._group._selection.includes(this.value);
|
|
61
|
-
}
|
|
62
|
-
set checked(value) {
|
|
63
|
-
if (!this._group._onTouched) {
|
|
64
|
-
setTimeout(() => this._setChecked(value), 0);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
this._setChecked(value);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
/** Theme color of the radio button. */
|
|
71
|
-
get color() {
|
|
72
|
-
return this._color || this._group.color;
|
|
73
|
-
}
|
|
74
|
-
set color(newValue) {
|
|
75
|
-
this._color = newValue;
|
|
76
|
-
}
|
|
77
|
-
get _selectByHeader() {
|
|
78
|
-
return this._group.selectByHeader;
|
|
79
|
-
}
|
|
80
|
-
/** @ignore */
|
|
81
|
-
_markInteracted() {
|
|
82
|
-
if (this._group._onTouched) {
|
|
83
|
-
this._group._onTouched();
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
/** @ignore */
|
|
87
|
-
_notify() {
|
|
88
|
-
this._cd.markForCheck();
|
|
89
|
-
}
|
|
90
|
-
/** Toggle selection programmatically */
|
|
91
|
-
toggle() {
|
|
92
|
-
this.checked = !this.checked;
|
|
93
|
-
}
|
|
94
|
-
/** @ignore */
|
|
95
|
-
_contentClicked(event) {
|
|
96
|
-
var _a;
|
|
97
|
-
if (!this._selectByHeader && this.selectable) {
|
|
98
|
-
(_a = this._ripple) === null || _a === void 0 ? void 0 : _a.launch(event.clientX, event.clientY);
|
|
99
|
-
this.toggle();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
/** @ignore */
|
|
103
|
-
contentChanged() {
|
|
104
|
-
var _a;
|
|
105
|
-
const el = (_a = this._bodyContent) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
|
106
|
-
this.empty = ((el === null || el === void 0 ? void 0 : el.childElementCount) || 0) === 0 && ((el === null || el === void 0 ? void 0 : el.textContent) || '') === '';
|
|
107
|
-
}
|
|
108
|
-
/** @ignore */
|
|
109
|
-
ngAfterContentInit() {
|
|
110
|
-
this.contentChanged();
|
|
111
|
-
}
|
|
112
|
-
/** Sets the disabled state and marks for check if a change occurred. */
|
|
113
|
-
_setDisabled(value) {
|
|
114
|
-
if (this._disabled !== value) {
|
|
115
|
-
this._disabled = value;
|
|
116
|
-
this._cd.markForCheck();
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
_setChecked(value) {
|
|
120
|
-
const newCheckedState = coerceBooleanProperty(value);
|
|
121
|
-
const old = this._group._selection.includes(this.value);
|
|
122
|
-
if (old !== newCheckedState) {
|
|
123
|
-
const contained = this._group._selection.some(v => v === this._value);
|
|
124
|
-
if (newCheckedState && this._group && !contained) {
|
|
125
|
-
this._group._selection = [...this._group._selection, this._value];
|
|
126
|
-
}
|
|
127
|
-
else if (!newCheckedState && this._group && contained) {
|
|
128
|
-
// When unchecking the selected item, update the selection
|
|
129
|
-
// property on the group.
|
|
130
|
-
this._group._selection = this._group._selection.filter(v => v !== this._value);
|
|
131
|
-
}
|
|
132
|
-
this._cd.markForCheck();
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
SelectionPanelItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SelectionPanelItemComponent, deps: [{ token: SELECTION_PANEL_GROUP }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
137
|
-
SelectionPanelItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: SelectionPanelItemComponent, selector: "bui-selection-panel-item", inputs: { title: "title", shadedHeader: "shadedHeader", selectable: "selectable", disabled: "disabled", value: "value", checked: "checked", color: "color" }, host: { properties: { "class.bui-selection-checked": "checked", "class.bui-border-accent": "checked && color ==='accent'", "class.bui-border-primary": "checked && color ==='primary'", "class.bui-border-warn": "checked && color ==='warn'", "class.bui-disabled": "disabled", "class.bui-unselectable": "!selectable" }, classAttribute: "bui-selection-panel-item" }, viewQueries: [{ propertyName: "_bodyContent", first: true, predicate: ["contentBody"], descendants: true, static: true }, { propertyName: "_ripple", first: true, predicate: MatRipple, descendants: true }], ngImport: i0, template: "<div class=\"bui-selection-panel-item-wrapper\">\n\t<div\n\t\tmatRipple\n\t\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t\tclass=\"bui-ripple\"\n\t\t*ngIf=\"!disabled\"\n\t\t[matRippleTrigger]=\"toggleTrigger\"\n\t\t#ripple=\"matRipple\"\n\t\t[matRippleDisabled]=\"!selectable\"\n\t></div>\n\t<div\n\t\tclass=\"bui-selection-panel-item-header\"\n\t\t[ngClass]=\"{ 'bui-shaded': shadedHeader, 'bui-empty': empty }\"\n\t\t#toggleTrigger\n\t>\n\t\t<div\n\t\t\t*ngIf=\"shadedHeader\"\n\t\t\tclass=\"bui-selection-panel-item-header-underlay\"\n\t\t\t[ngClass]=\"{ 'bui-not-empty': !empty }\"\n\t\t></div>\n\t\t<div class=\"bui-selection-panel-item-header-container\">\n\t\t\t<mat-checkbox\n\t\t\t\t*ngIf=\"selectable; else noselectable\"\n\t\t\t\t[(ngModel)]=\"checked\"\n\t\t\t\t[color]=\"color\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(change)=\"_markInteracted()\"\n\t\t\t\tstyle=\"flex-grow: 1\"\n\t\t\t>\n\t\t\t\t<div class=\"bui-selection-panel-item-title\" [innerHTML]=\"title\"></div>\n\t\t\t</mat-checkbox>\n\t\t\t<ng-template #noselectable>\n\t\t\t\t<div style=\"flex-grow: 1\" class=\"bui-selection-panel-item-title\" [innerHTML]=\"title\"></div>\n\t\t\t</ng-template>\n\t\t\t<ng-content select=\"[buiSelectionItemHeadingEnd]\"></ng-content>\n\t\t</div>\n\t\t<ng-content select=\"[buiSelectionItemSubtitle]\"></ng-content>\n\t</div>\n\t<div\n\t\t#contentBody\n\t\tclass=\"bui-selection-panel-item-content\"\n\t\t[class.bui-empty]=\"empty\"\n\t\t[class.bui-selectable]=\"!_selectByHeader\"\n\t\t(click)=\"_contentClicked($event)\"\n\t\t(cdkObserveContent)=\"contentChanged()\"\n\t>\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"bui-selection-panel-item-bottom\"></div>\n</div>\n", styles: [":host{position:relative;border-radius:5px;border:1px solid rgba(128,128,128,.2);padding:1px}:host .bui-selection-panel-item-wrapper{padding-left:1rem;padding-right:1rem}:host .bui-ripple{position:absolute;inset:0;z-index:-1}:host .bui-selection-panel-item-header{margin-top:calc(1rem - 4px);margin-bottom:calc(1rem - 4px);align-items:center;position:relative}:host .bui-selection-panel-item-header.bui-shaded:not(.bui-empty){margin-bottom:calc(2rem + 4px)}:host .bui-selection-panel-item-header-container{display:flex}:host .bui-selection-panel-item-header-container .mat-mdc-checkbox{z-index:1}:host .bui-selection-panel-item-title{font-size:larger;font-weight:700;white-space:normal;margin-top:2px}:host .bui-selection-panel-item-content:not(.bui-empty){margin-top:calc(2px + 1rem);margin-bottom:1rem}:host .bui-selection-panel-item-header-underlay{position:absolute;top:calc(3px - 1rem);left:calc(-1px - 1rem);right:calc(-1px - 1rem);bottom:calc(-3px - 1rem);border-radius:5px;background-color:#80808026}:host .bui-selection-panel-item-header-underlay.bui-not-empty{border-bottom-left-radius:0;border-bottom-right-radius:0}:host(:not(:first-child)){margin-top:1rem}:host(:not([hidden])){display:block}:host(:not(.bui-disabled,.bui-unselectable)):hover{border-width:2px;padding:0;border-color:#8080804d}:host(:not(.bui-disabled,.bui-unselectable)) .bui-selection-panel-item-content.bui-selectable{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i5.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SelectionPanelItemComponent, decorators: [{
|
|
139
|
-
type: Component,
|
|
140
|
-
args: [{ selector: 'bui-selection-panel-item', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
141
|
-
class: 'bui-selection-panel-item',
|
|
142
|
-
'[class.bui-selection-checked]': 'checked',
|
|
143
|
-
'[class.bui-border-accent]': `checked && color ==='accent'`,
|
|
144
|
-
'[class.bui-border-primary]': `checked && color ==='primary'`,
|
|
145
|
-
'[class.bui-border-warn]': `checked && color ==='warn'`,
|
|
146
|
-
'[class.bui-disabled]': 'disabled',
|
|
147
|
-
'[class.bui-unselectable]': '!selectable'
|
|
148
|
-
}, template: "<div class=\"bui-selection-panel-item-wrapper\">\n\t<div\n\t\tmatRipple\n\t\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t\tclass=\"bui-ripple\"\n\t\t*ngIf=\"!disabled\"\n\t\t[matRippleTrigger]=\"toggleTrigger\"\n\t\t#ripple=\"matRipple\"\n\t\t[matRippleDisabled]=\"!selectable\"\n\t></div>\n\t<div\n\t\tclass=\"bui-selection-panel-item-header\"\n\t\t[ngClass]=\"{ 'bui-shaded': shadedHeader, 'bui-empty': empty }\"\n\t\t#toggleTrigger\n\t>\n\t\t<div\n\t\t\t*ngIf=\"shadedHeader\"\n\t\t\tclass=\"bui-selection-panel-item-header-underlay\"\n\t\t\t[ngClass]=\"{ 'bui-not-empty': !empty }\"\n\t\t></div>\n\t\t<div class=\"bui-selection-panel-item-header-container\">\n\t\t\t<mat-checkbox\n\t\t\t\t*ngIf=\"selectable; else noselectable\"\n\t\t\t\t[(ngModel)]=\"checked\"\n\t\t\t\t[color]=\"color\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(change)=\"_markInteracted()\"\n\t\t\t\tstyle=\"flex-grow: 1\"\n\t\t\t>\n\t\t\t\t<div class=\"bui-selection-panel-item-title\" [innerHTML]=\"title\"></div>\n\t\t\t</mat-checkbox>\n\t\t\t<ng-template #noselectable>\n\t\t\t\t<div style=\"flex-grow: 1\" class=\"bui-selection-panel-item-title\" [innerHTML]=\"title\"></div>\n\t\t\t</ng-template>\n\t\t\t<ng-content select=\"[buiSelectionItemHeadingEnd]\"></ng-content>\n\t\t</div>\n\t\t<ng-content select=\"[buiSelectionItemSubtitle]\"></ng-content>\n\t</div>\n\t<div\n\t\t#contentBody\n\t\tclass=\"bui-selection-panel-item-content\"\n\t\t[class.bui-empty]=\"empty\"\n\t\t[class.bui-selectable]=\"!_selectByHeader\"\n\t\t(click)=\"_contentClicked($event)\"\n\t\t(cdkObserveContent)=\"contentChanged()\"\n\t>\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"bui-selection-panel-item-bottom\"></div>\n</div>\n", styles: [":host{position:relative;border-radius:5px;border:1px solid rgba(128,128,128,.2);padding:1px}:host .bui-selection-panel-item-wrapper{padding-left:1rem;padding-right:1rem}:host .bui-ripple{position:absolute;inset:0;z-index:-1}:host .bui-selection-panel-item-header{margin-top:calc(1rem - 4px);margin-bottom:calc(1rem - 4px);align-items:center;position:relative}:host .bui-selection-panel-item-header.bui-shaded:not(.bui-empty){margin-bottom:calc(2rem + 4px)}:host .bui-selection-panel-item-header-container{display:flex}:host .bui-selection-panel-item-header-container .mat-mdc-checkbox{z-index:1}:host .bui-selection-panel-item-title{font-size:larger;font-weight:700;white-space:normal;margin-top:2px}:host .bui-selection-panel-item-content:not(.bui-empty){margin-top:calc(2px + 1rem);margin-bottom:1rem}:host .bui-selection-panel-item-header-underlay{position:absolute;top:calc(3px - 1rem);left:calc(-1px - 1rem);right:calc(-1px - 1rem);bottom:calc(-3px - 1rem);border-radius:5px;background-color:#80808026}:host .bui-selection-panel-item-header-underlay.bui-not-empty{border-bottom-left-radius:0;border-bottom-right-radius:0}:host(:not(:first-child)){margin-top:1rem}:host(:not([hidden])){display:block}:host(:not(.bui-disabled,.bui-unselectable)):hover{border-width:2px;padding:0;border-color:#8080804d}:host(:not(.bui-disabled,.bui-unselectable)) .bui-selection-panel-item-content.bui-selectable{cursor:pointer}\n"] }]
|
|
149
|
-
}], ctorParameters: function () {
|
|
150
|
-
return [{ type: undefined, decorators: [{
|
|
151
|
-
type: Inject,
|
|
152
|
-
args: [SELECTION_PANEL_GROUP]
|
|
153
|
-
}] }, { type: i0.ChangeDetectorRef }];
|
|
154
|
-
}, propDecorators: { title: [{
|
|
155
|
-
type: Input
|
|
156
|
-
}], shadedHeader: [{
|
|
157
|
-
type: Input
|
|
158
|
-
}], selectable: [{
|
|
159
|
-
type: Input
|
|
160
|
-
}], disabled: [{
|
|
161
|
-
type: Input
|
|
162
|
-
}], value: [{
|
|
163
|
-
type: Input
|
|
164
|
-
}], checked: [{
|
|
165
|
-
type: Input
|
|
166
|
-
}], color: [{
|
|
167
|
-
type: Input
|
|
168
|
-
}], _bodyContent: [{
|
|
169
|
-
type: ViewChild,
|
|
170
|
-
args: ['contentBody', { static: true }]
|
|
171
|
-
}], _ripple: [{
|
|
172
|
-
type: ViewChild,
|
|
173
|
-
args: [MatRipple]
|
|
174
|
-
}] } });
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Selection panel is a [control value accessor](https://angular.io/api/forms/ControlValueAccessor)
|
|
178
|
-
* that display a set of multi-selection items as bordered panels, in a similar fashion as Radio Panel `bui-radio-panel`.
|
|
179
|
-
*
|
|
180
|
-
* Accessibility features are not yet fully implemented.
|
|
181
|
-
*
|
|
182
|
-
* Example:
|
|
183
|
-
*
|
|
184
|
-
* ```html
|
|
185
|
-
* <bui-selection-panel>
|
|
186
|
-
* <bui-selection-panel-item *ngFor="let obj of objects" [value]="obj">{{obj.description}}</bui-selection-panel-item>
|
|
187
|
-
* </bui-selection-panel>
|
|
188
|
-
* ```
|
|
189
|
-
*
|
|
190
|
-
*/
|
|
191
|
-
class SelectionPanelDirective {
|
|
192
|
-
constructor(_cd) {
|
|
193
|
-
this._cd = _cd;
|
|
194
|
-
/**
|
|
195
|
-
* When set to `false`, the selection is triggered by click everywhere within the panels that is
|
|
196
|
-
* not focus-trapping; otherwise, only clicking on the header will activate the selection.
|
|
197
|
-
*
|
|
198
|
-
* @default true
|
|
199
|
-
*/
|
|
200
|
-
this.selectByHeader = true;
|
|
201
|
-
/** @ignore */
|
|
202
|
-
this._isDisabled = false;
|
|
203
|
-
this._selected = [];
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* @ignore
|
|
207
|
-
* The selected values. Used by the child elements to modify the group's value
|
|
208
|
-
*/
|
|
209
|
-
get _selection() {
|
|
210
|
-
return this._selected;
|
|
211
|
-
}
|
|
212
|
-
set _selection(value) {
|
|
213
|
-
if (value !== this._selected) {
|
|
214
|
-
this._selected = value;
|
|
215
|
-
if (this._onChange) {
|
|
216
|
-
this._onChange(this._selected);
|
|
217
|
-
}
|
|
218
|
-
this._cd.markForCheck();
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* @ignore
|
|
223
|
-
*/
|
|
224
|
-
writeValue(obj) {
|
|
225
|
-
var _a;
|
|
226
|
-
this._selected = [];
|
|
227
|
-
if (Array.isArray(obj)) {
|
|
228
|
-
this._selected.push(...obj);
|
|
229
|
-
}
|
|
230
|
-
else if (obj !== null && obj !== undefined) {
|
|
231
|
-
this._selected.push(obj);
|
|
232
|
-
}
|
|
233
|
-
(_a = this._items) === null || _a === void 0 ? void 0 : _a.forEach(it => it._notify());
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* @ignore
|
|
237
|
-
*/
|
|
238
|
-
registerOnChange(fn) {
|
|
239
|
-
this._onChange = fn;
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* @ignore
|
|
243
|
-
*/
|
|
244
|
-
registerOnTouched(fn) {
|
|
245
|
-
this._onTouched = fn;
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Sets the disabled state and marks for check if a change occurred.
|
|
249
|
-
* @ignore
|
|
250
|
-
*/
|
|
251
|
-
setDisabledState(isDisabled) {
|
|
252
|
-
if (this._isDisabled !== isDisabled) {
|
|
253
|
-
this._isDisabled = isDisabled;
|
|
254
|
-
this._cd.markForCheck();
|
|
255
|
-
this._items.forEach(it => it._notify());
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
/** @ignore */
|
|
259
|
-
ngOnChanges(changes) {
|
|
260
|
-
if (this._items) {
|
|
261
|
-
if (changes.color || changes.selectByHeader) {
|
|
262
|
-
this._items.forEach(item => item._notify());
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
SelectionPanelDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SelectionPanelDirective, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
268
|
-
SelectionPanelDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.6", type: SelectionPanelDirective, selector: "bui-selection-panel", inputs: { color: "color", selectByHeader: "selectByHeader" }, host: { classAttribute: "bui-selection-panel bui-host" }, providers: [
|
|
269
|
-
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SelectionPanelDirective), multi: true },
|
|
270
|
-
{ provide: SELECTION_PANEL_GROUP, useExisting: forwardRef(() => SelectionPanelDirective) }
|
|
271
|
-
], queries: [{ propertyName: "_items", predicate: SelectionPanelItemComponent, descendants: true }], exportAs: ["buiSelectionPanel"], usesOnChanges: true, ngImport: i0 });
|
|
272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SelectionPanelDirective, decorators: [{
|
|
273
|
-
type: Directive,
|
|
274
|
-
args: [{
|
|
275
|
-
selector: 'bui-selection-panel',
|
|
276
|
-
providers: [
|
|
277
|
-
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SelectionPanelDirective), multi: true },
|
|
278
|
-
{ provide: SELECTION_PANEL_GROUP, useExisting: forwardRef(() => SelectionPanelDirective) }
|
|
279
|
-
],
|
|
280
|
-
exportAs: 'buiSelectionPanel',
|
|
281
|
-
host: { class: 'bui-selection-panel bui-host' }
|
|
282
|
-
}]
|
|
283
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { color: [{
|
|
284
|
-
type: Input
|
|
285
|
-
}], selectByHeader: [{
|
|
286
|
-
type: Input
|
|
287
|
-
}], _items: [{
|
|
288
|
-
type: ContentChildren,
|
|
289
|
-
args: [SelectionPanelItemComponent, { descendants: true }]
|
|
290
|
-
}] } });
|
|
291
|
-
|
|
292
|
-
class SelectionPanelModule {
|
|
293
|
-
}
|
|
294
|
-
SelectionPanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SelectionPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
295
|
-
SelectionPanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.6", ngImport: i0, type: SelectionPanelModule, declarations: [SelectionPanelDirective, SelectionPanelItemComponent], imports: [CommonModule, MatCheckboxModule, FormsModule, MatRippleModule, ObserversModule], exports: [SelectionPanelDirective, SelectionPanelItemComponent] });
|
|
296
|
-
SelectionPanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SelectionPanelModule, imports: [CommonModule, MatCheckboxModule, FormsModule, MatRippleModule, ObserversModule] });
|
|
297
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SelectionPanelModule, decorators: [{
|
|
298
|
-
type: NgModule,
|
|
299
|
-
args: [{
|
|
300
|
-
declarations: [SelectionPanelDirective, SelectionPanelItemComponent],
|
|
301
|
-
imports: [CommonModule, MatCheckboxModule, FormsModule, MatRippleModule, ObserversModule],
|
|
302
|
-
exports: [SelectionPanelDirective, SelectionPanelItemComponent]
|
|
303
|
-
}]
|
|
304
|
-
}] });
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* Generated bundle index. Do not edit.
|
|
308
|
-
*/
|
|
309
|
-
|
|
310
|
-
export { SelectionPanelDirective, SelectionPanelItemComponent, SelectionPanelModule };
|
|
311
|
-
//# sourceMappingURL=bravura-ui-selection-panel.mjs.map
|