@bravura/ui 2.4.0 → 2.5.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 (108) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/alert/alert-container.component.d.ts +3 -1
  3. package/clip-note/clip-note.component.d.ts +45 -0
  4. package/clip-note/clip-note.directive.d.ts +69 -0
  5. package/clip-note/clip-note.module.d.ts +19 -0
  6. package/clip-note/index.d.ts +5 -0
  7. package/clip-note/public-api.d.ts +1 -0
  8. package/discrete-input/discrete-input.component.d.ts +4 -2
  9. package/esm2020/alert/alert-container.component.mjs +14 -8
  10. package/esm2020/alert/alert-message.component.mjs +4 -4
  11. package/esm2020/alert/alert.module.mjs +4 -4
  12. package/esm2020/behavior/await.directive.mjs +4 -4
  13. package/esm2020/behavior/behavior.module.mjs +4 -4
  14. package/esm2020/behavior/sizing-monitor.directive.mjs +3 -3
  15. package/esm2020/behavior/sizing.directive.mjs +4 -4
  16. package/esm2020/clip-note/bravura-ui-clip-note.mjs +5 -0
  17. package/esm2020/clip-note/clip-note.component.mjs +216 -0
  18. package/esm2020/clip-note/clip-note.directive.mjs +141 -0
  19. package/esm2020/clip-note/clip-note.module.mjs +32 -0
  20. package/esm2020/clip-note/public-api.mjs +2 -0
  21. package/esm2020/common/common.module.mjs +5 -5
  22. package/esm2020/currency-input/currency-input.directive.mjs +3 -3
  23. package/esm2020/currency-input/currency-input.module.mjs +4 -4
  24. package/esm2020/decimal-input/decimal-input.directive.mjs +3 -3
  25. package/esm2020/decimal-input/decimal-input.module.mjs +4 -4
  26. package/esm2020/discrete-input/discrete-input.component.mjs +26 -15
  27. package/esm2020/discrete-input/discrete-input.module.mjs +4 -4
  28. package/esm2020/file-upload/file-upload.component.mjs +3 -3
  29. package/esm2020/file-upload/file-upload.module.mjs +4 -4
  30. package/esm2020/file-upload/file-upload.service.mjs +3 -3
  31. package/esm2020/form-field/form-field.component.mjs +6 -6
  32. package/esm2020/form-field/form-field.module.mjs +4 -4
  33. package/esm2020/icon-font/icon-font.module.mjs +4 -4
  34. package/esm2020/icon-font/icon.directive.mjs +3 -3
  35. package/esm2020/panel/panel-section.component.mjs +3 -3
  36. package/esm2020/panel/panel.component.mjs +4 -4
  37. package/esm2020/panel/panel.module.mjs +4 -4
  38. package/esm2020/phone-number/phone-number.directive.mjs +3 -3
  39. package/esm2020/phone-number/phone-number.module.mjs +4 -4
  40. package/esm2020/phone-number/phone-number.pipe.mjs +3 -3
  41. package/esm2020/phone-number/phone-number.validator.mjs +3 -3
  42. package/esm2020/radio-panel/radio-panel-item.component.mjs +5 -5
  43. package/esm2020/radio-panel/radio-panel.component.mjs +3 -3
  44. package/esm2020/radio-panel/radio-panel.module.mjs +4 -4
  45. package/esm2020/selection-panel/selection-panel-item.component.mjs +4 -4
  46. package/esm2020/selection-panel/selection-panel.directive.mjs +3 -3
  47. package/esm2020/selection-panel/selection-panel.module.mjs +4 -4
  48. package/esm2020/skeletons/skeleton-loader-presets.directive.mjs +3 -3
  49. package/esm2020/skeletons/skeleton-loader.component.mjs +3 -3
  50. package/esm2020/skeletons/skeletons.module.mjs +4 -4
  51. package/esm2020/stepper/stepper.component.mjs +3 -3
  52. package/esm2020/stepper/stepper.module.mjs +4 -4
  53. package/esm2020/tooltip/tooltip.component.mjs +3 -3
  54. package/esm2020/tooltip/tooltip.directive.mjs +3 -3
  55. package/esm2020/tooltip/tooltip.module.mjs +4 -4
  56. package/fesm2015/bravura-ui-alert.mjs +20 -14
  57. package/fesm2015/bravura-ui-alert.mjs.map +1 -1
  58. package/fesm2015/bravura-ui-behavior.mjs +13 -13
  59. package/fesm2015/bravura-ui-behavior.mjs.map +1 -1
  60. package/fesm2015/bravura-ui-clip-note.mjs +393 -0
  61. package/fesm2015/bravura-ui-clip-note.mjs.map +1 -0
  62. package/fesm2015/bravura-ui-common.mjs +4 -4
  63. package/fesm2015/bravura-ui-common.mjs.map +1 -1
  64. package/fesm2015/bravura-ui-currency-input.mjs +7 -7
  65. package/fesm2015/bravura-ui-decimal-input.mjs +7 -7
  66. package/fesm2015/bravura-ui-discrete-input.mjs +29 -18
  67. package/fesm2015/bravura-ui-discrete-input.mjs.map +1 -1
  68. package/fesm2015/bravura-ui-file-upload.mjs +10 -10
  69. package/fesm2015/bravura-ui-form-field.mjs +9 -9
  70. package/fesm2015/bravura-ui-form-field.mjs.map +1 -1
  71. package/fesm2015/bravura-ui-icon-font.mjs +7 -7
  72. package/fesm2015/bravura-ui-panel.mjs +11 -11
  73. package/fesm2015/bravura-ui-panel.mjs.map +1 -1
  74. package/fesm2015/bravura-ui-phone-number.mjs +13 -13
  75. package/fesm2015/bravura-ui-radio-panel.mjs +11 -11
  76. package/fesm2015/bravura-ui-radio-panel.mjs.map +1 -1
  77. package/fesm2015/bravura-ui-selection-panel.mjs +11 -11
  78. package/fesm2015/bravura-ui-selection-panel.mjs.map +1 -1
  79. package/fesm2015/bravura-ui-skeletons.mjs +10 -10
  80. package/fesm2015/bravura-ui-stepper.mjs +7 -7
  81. package/fesm2015/bravura-ui-tooltip.mjs +10 -10
  82. package/fesm2020/bravura-ui-alert.mjs +20 -14
  83. package/fesm2020/bravura-ui-alert.mjs.map +1 -1
  84. package/fesm2020/bravura-ui-behavior.mjs +13 -13
  85. package/fesm2020/bravura-ui-behavior.mjs.map +1 -1
  86. package/fesm2020/bravura-ui-clip-note.mjs +388 -0
  87. package/fesm2020/bravura-ui-clip-note.mjs.map +1 -0
  88. package/fesm2020/bravura-ui-common.mjs +4 -4
  89. package/fesm2020/bravura-ui-common.mjs.map +1 -1
  90. package/fesm2020/bravura-ui-currency-input.mjs +7 -7
  91. package/fesm2020/bravura-ui-decimal-input.mjs +7 -7
  92. package/fesm2020/bravura-ui-discrete-input.mjs +29 -18
  93. package/fesm2020/bravura-ui-discrete-input.mjs.map +1 -1
  94. package/fesm2020/bravura-ui-file-upload.mjs +10 -10
  95. package/fesm2020/bravura-ui-form-field.mjs +9 -9
  96. package/fesm2020/bravura-ui-form-field.mjs.map +1 -1
  97. package/fesm2020/bravura-ui-icon-font.mjs +7 -7
  98. package/fesm2020/bravura-ui-panel.mjs +11 -11
  99. package/fesm2020/bravura-ui-panel.mjs.map +1 -1
  100. package/fesm2020/bravura-ui-phone-number.mjs +13 -13
  101. package/fesm2020/bravura-ui-radio-panel.mjs +11 -11
  102. package/fesm2020/bravura-ui-radio-panel.mjs.map +1 -1
  103. package/fesm2020/bravura-ui-selection-panel.mjs +11 -11
  104. package/fesm2020/bravura-ui-selection-panel.mjs.map +1 -1
  105. package/fesm2020/bravura-ui-skeletons.mjs +10 -10
  106. package/fesm2020/bravura-ui-stepper.mjs +7 -7
  107. package/fesm2020/bravura-ui-tooltip.mjs +10 -10
  108. package/package.json +9 -1
@@ -27,9 +27,9 @@ class SizingMonitorDirective {
27
27
  this.element = element;
28
28
  }
29
29
  }
30
- SizingMonitorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SizingMonitorDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
31
- SizingMonitorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: SizingMonitorDirective, selector: "[buiSizingMonitor]", ngImport: i0 });
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SizingMonitorDirective, decorators: [{
30
+ SizingMonitorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: SizingMonitorDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
31
+ SizingMonitorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: SizingMonitorDirective, selector: "[buiSizingMonitor]", ngImport: i0 });
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: SizingMonitorDirective, decorators: [{
33
33
  type: Directive,
34
34
  args: [{
35
35
  selector: '[buiSizingMonitor]'
@@ -253,9 +253,9 @@ class SizingDirective {
253
253
  * @ignore
254
254
  */
255
255
  SizingDirective.defaultSizingBreakpoints = ['400', '800', '~'];
256
- SizingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SizingDirective, deps: [{ token: DOCUMENT }, { token: SizingMonitorDirective, optional: true }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
257
- SizingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: SizingDirective, selector: "[buiSizing],[buiResized],[buiSizingBy],[buiFixedHeight]", inputs: { buiSizing: "buiSizing", sizingBy: "sizingBy", buiSizingBy: "buiSizingBy", buiFixedHeight: "buiFixedHeight" }, outputs: { buiResized: "buiResized" }, usesOnChanges: true, ngImport: i0 });
258
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SizingDirective, decorators: [{
256
+ SizingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: SizingDirective, deps: [{ token: DOCUMENT }, { token: SizingMonitorDirective, optional: true }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
257
+ SizingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: SizingDirective, selector: "[buiSizing],[buiResized],[buiSizingBy],[buiFixedHeight]", inputs: { buiSizing: "buiSizing", sizingBy: "sizingBy", buiSizingBy: "buiSizingBy", buiFixedHeight: "buiFixedHeight" }, outputs: { buiResized: "buiResized" }, usesOnChanges: true, ngImport: i0 });
258
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: SizingDirective, decorators: [{
259
259
  type: Directive,
260
260
  args: [{
261
261
  selector: '[buiSizing],[buiResized],[buiSizingBy],[buiFixedHeight]'
@@ -360,9 +360,9 @@ class AwaitDirective {
360
360
  }
361
361
  }
362
362
  }
363
- AwaitDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AwaitDirective, deps: [{ token: i0.ElementRef }, { token: i1.MatButton, optional: true }, { token: DOCUMENT }, { token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
364
- AwaitDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: AwaitDirective, selector: "[buiAwait]", inputs: { buiAwait: "buiAwait", buiAwaitAriaLabel: "buiAwaitAriaLabel", buiAwaitDiameter: "buiAwaitDiameter" }, ngImport: i0 });
365
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AwaitDirective, decorators: [{
363
+ AwaitDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: AwaitDirective, deps: [{ token: i0.ElementRef }, { token: i1.MatButton, optional: true }, { token: DOCUMENT }, { token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
364
+ AwaitDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: AwaitDirective, selector: "[buiAwait]", inputs: { buiAwait: "buiAwait", buiAwaitAriaLabel: "buiAwaitAriaLabel", buiAwaitDiameter: "buiAwaitDiameter" }, ngImport: i0 });
365
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: AwaitDirective, decorators: [{
366
366
  type: Directive,
367
367
  args: [{
368
368
  selector: '[buiAwait]'
@@ -387,10 +387,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
387
387
  */
388
388
  class BehaviorModule {
389
389
  }
390
- BehaviorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: BehaviorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
391
- BehaviorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: BehaviorModule, declarations: [SizingDirective, SizingMonitorDirective, AwaitDirective], imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule], exports: [SizingDirective, SizingMonitorDirective, AwaitDirective, MatProgressSpinnerModule] });
392
- BehaviorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: BehaviorModule, imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule, MatProgressSpinnerModule] });
393
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: BehaviorModule, decorators: [{
390
+ BehaviorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: BehaviorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
391
+ BehaviorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: BehaviorModule, declarations: [SizingDirective, SizingMonitorDirective, AwaitDirective], imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule], exports: [SizingDirective, SizingMonitorDirective, AwaitDirective, MatProgressSpinnerModule] });
392
+ BehaviorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: BehaviorModule, imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule, MatProgressSpinnerModule] });
393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: BehaviorModule, decorators: [{
394
394
  type: NgModule,
395
395
  args: [{
396
396
  declarations: [SizingDirective, SizingMonitorDirective, AwaitDirective],
@@ -1 +1 @@
1
- {"version":3,"file":"bravura-ui-behavior.mjs","sources":["../../../projects/ui/behavior/sizing-monitor.directive.ts","../../../projects/ui/behavior/sizing.directive.ts","../../../projects/ui/behavior/await.directive.ts","../../../projects/ui/behavior/behavior.module.ts","../../../projects/ui/behavior/bravura-ui-behavior.ts"],"sourcesContent":["import { Directive, ElementRef } from '@angular/core';\n\n/**\n * Use this directive to designate a target HTML element, based on which the child elements'\n * `[buiSizing]` directives will calculate the sizes.\n *\n * ```html\n * <div [buiSizingMonitor]>\n * <div [buiSizing]=\"...\">\n * </div>\n * <div>\n * <div [buiSizing]=\"...\">\n * </div>\n * </div>\n * <div>\n * ```\n */\n@Directive({\n\tselector: '[buiSizingMonitor]'\n})\nexport class SizingMonitorDirective {\n\tconstructor(public readonly element: ElementRef<HTMLElement>) {}\n}\n","import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DOCUMENT } from '@angular/common';\nimport {\n\tDirective,\n\tElementRef,\n\tEventEmitter,\n\tInject,\n\tInput,\n\tNgZone,\n\tOnChanges,\n\tOnDestroy,\n\tOptional,\n\tOutput,\n\tSimpleChanges\n} from '@angular/core';\nimport { debounceTime, take } from 'rxjs/operators';\nimport { SizingMonitorDirective } from './sizing-monitor.directive';\n\n/**\n * This directive monitors the changes in the width of the `sizingBy` target, and apply specified style\n * classes and/or inline styles to the current element dynamically.\n *\n * In order for the layout engine to efficiently calculate and stabilize the dimensions, the effective style property\n * `box-sizing` of the `sizingBy` target element must be set to `border-box`.\n *\n * The directive uses [ResizeObserver API](https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API)\n * to capture the events of element resizing. Please use a polyfill if you want to support older browsers\n * that do not implement ResizeObserver API.\n *\n * Examples:\n *\n * ```html\n * <div #parentElement>\n * <div [buiSizing]=\"{'400': 'small', '800': 'medium', '~': 'large'}\" [buiSizingBy]=\"parentElement\"></div>\n * <div [buiSizing]=\"['small', 'medium', 'large']\" [buiSizingBy]=\"'root'\"></div>\n * <div [buiSizing]=\"{'650': 'border-color: #28569', '~': 'bg-muted; border-style: dotted'}\" [buiSizingBy]=\"parentElement\"></div>\n * </div>\n * ```\n */\n@Directive({\n\tselector: '[buiSizing],[buiResized],[buiSizingBy],[buiFixedHeight]'\n})\nexport class SizingDirective implements OnChanges, OnDestroy {\n\t/**\n\t * @ignore\n\t */\n\tstatic defaultSizingBreakpoints = ['400', '800', '~'];\n\n\t/**\n\t * Specifies the breakpoint widths and the style classes.\n\t *\n\t * The sizing spec `{\"400\": \"small\", \"800\": \"medium\", \"~\": \"large\"}` tells the directive to apply\n\t * a style class `small` when the width of the monitored target is smaller than 400 pixels,\n\t * `medium` when the width is between 400 and 800 pixels, and `large` when above.\n\t *\n\t * @example {'400': 'small', '800': 'medium', '~': 'large'}\n\t */\n\t@Input()\n\tbuiSizing: string | Array<string> | { [key: string]: string } = {};\n\n\t/**\n\t * The alias of `buiSizingBy`.\n\t * @default 'root'\n\t * @deprecated\n\t * @ignore\n\t */\n\t@Input()\n\tsizingBy: 'root' | 'parent' | HTMLElement = 'root';\n\n\t/**\n\t * Designate an element to be monitored for recalculating the style classes of the current element.\n\t *\n\t * - `root` specifies the document root or the enclosing shadow host. This is the default value.\n\t * - `parent` specifies the parent element.\n\t *\n\t * @default 'root'\n\t * @alias sizingBy\n\t */\n\t@Input()\n\tget buiSizingBy(): 'root' | 'parent' | HTMLElement {\n\t\treturn this.sizingBy;\n\t}\n\tset buiSizingBy(target: 'root' | 'parent' | HTMLElement) {\n\t\tthis.sizingBy = target;\n\t}\n\n\t/**\n\t * Emits `{width, height}` when the monitor target element resizes.\n\t *\n\t * Note that the dimensions emitted are of the [sizingBy] target, but not the current element.\n\t */\n\t@Output()\n\tbuiResized = new EventEmitter<{ width: number; height: number }>();\n\n\t/**\n\t * Recalculate the height of this element according to the height of the monitored target.\n\t */\n\t@Input()\n\tbuiFixedHeight = false;\n\n\tprivate _monitorTarget: HTMLElement;\n\tprivate _observer: ResizeObserver | undefined;\n\tprivate _sizingSpec: { [key: string]: string } = {};\n\tprivate _width = 0;\n\tprivate _height = 0;\n\tprivate _reflowFrameCount = 0;\n\tprivate _element: HTMLElement;\n\n\tconstructor(\n\t\t@Inject(DOCUMENT) private _doc: Document,\n\t\t@Optional() private _defaultTarget: SizingMonitorDirective,\n\t\telemRef: ElementRef<HTMLElement>,\n\t\tprivate _zone: NgZone\n\t) {\n\t\tthis._element = elemRef.nativeElement;\n\t\tthis._monitorTarget = this._element;\n\t}\n\n\tngOnChanges(_: SimpleChanges): void {\n\t\tconst disconnected = this._element.getRootNode() instanceof HTMLElement;\n\t\tif (disconnected) {\n\t\t\t// defer shadow detection till dom connection event\n\t\t\tthis._zone.onStable.pipe(debounceTime(10), take(1)).subscribe(() => this._initOrReset());\n\t\t} else {\n\t\t\tthis._initOrReset();\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._tearDownNodeMonitor();\n\t}\n\n\tprivate _initOrReset() {\n\t\tconst originalTarget = this._monitorTarget;\n\t\tif (this.buiSizingBy instanceof HTMLElement) {\n\t\t\tthis._monitorTarget = this.buiSizingBy;\n\t\t} else if (this._defaultTarget) {\n\t\t\tthis._monitorTarget = this._defaultTarget.element.nativeElement;\n\t\t} else if (this.buiSizingBy === 'root') {\n\t\t\tconst root = this._element.getRootNode();\n\t\t\tif (root instanceof ShadowRoot) {\n\t\t\t\tthis._monitorTarget = root.host as HTMLElement;\n\t\t\t} else {\n\t\t\t\tthis._monitorTarget = this._doc.documentElement;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._monitorTarget = this._element.parentElement as any;\n\t\t}\n\n\t\tif (this._monitorTarget != originalTarget) {\n\t\t\tthis._setUpNodeMonitor();\n\t\t}\n\n\t\tthis._sizingSpec = {};\n\t\tlet spec = this.buiSizing;\n\t\tif (typeof spec === 'string') {\n\t\t\tspec = spec.split(',').map(k => k.trim());\n\t\t}\n\n\t\tif (Array.isArray(spec)) {\n\t\t\tspec.forEach((c, i) => {\n\t\t\t\tthis._sizingSpec[SizingDirective.defaultSizingBreakpoints[i] || '~'] = c;\n\t\t\t});\n\t\t} else if (spec) {\n\t\t\tthis._sizingSpec = spec;\n\t\t}\n\n\t\tthis.buiFixedHeight = coerceBooleanProperty(this.buiFixedHeight);\n\n\t\tthis._calculateSize();\n\t}\n\n\tprivate _setUpNodeMonitor() {\n\t\tthis._tearDownNodeMonitor();\n\t\tif (this._monitorTarget) {\n\t\t\tthis._observer = new ResizeObserver(() => this._calculateSize());\n\n\t\t\tthis._observer.observe(this._monitorTarget, { box: 'border-box' });\n\t\t}\n\t}\n\n\tprivate _tearDownNodeMonitor() {\n\t\tif (this._observer) {\n\t\t\tthis._observer.disconnect();\n\t\t\tthis._observer = undefined;\n\t\t}\n\t}\n\n\tprivate _calculateSize() {\n\t\tconst widthChanged = this._width !== this._monitorTarget.clientWidth;\n\t\tconst heightChanged = this._height !== this._monitorTarget.clientHeight;\n\t\tif (widthChanged) {\n\t\t\tthis._width = this._monitorTarget.clientWidth;\n\n\t\t\tconst bks = Object.keys(this._sizingSpec).sort((a, b) => this._toNumber(a) - this._toNumber(b));\n\t\t\tlet found = false;\n\t\t\tfor (const key of bks) {\n\t\t\t\tconst classesOrStyles = this._sizingSpec[key].split(/;+/).filter(c => c);\n\t\t\t\tthis._removeClassesOrStyles(classesOrStyles);\n\t\t\t\tconst expectedWidth = this._toNumber(key);\n\t\t\t\tif (this._width <= expectedWidth && !found) {\n\t\t\t\t\tthis._applyClassesOrStyles(classesOrStyles);\n\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (widthChanged || heightChanged) {\n\t\t\tthis._height = this._monitorTarget.clientHeight;\n\t\t\tif (this.buiFixedHeight) {\n\t\t\t\tthis._reflowFrameCount = 0;\n\t\t\t\tthis._reflowHeight();\n\t\t\t}\n\t\t\tsetTimeout(() => this._zone.run(() => this.buiResized.emit({ width: this._width, height: this._height })));\n\t\t}\n\t}\n\n\tprivate _applyClassesOrStyles(clsOrStyles: string[]) {\n\t\tclsOrStyles.forEach(s => {\n\t\t\tif (s.includes(':')) {\n\t\t\t\tconst [prop, val] = s.split(':');\n\t\t\t\tthis._element.style.setProperty(prop.trim(), val.trim());\n\t\t\t} else {\n\t\t\t\tconst classes = s.split(/\\s+/).filter(c => c);\n\t\t\t\tif (classes.length) {\n\t\t\t\t\tthis._element.classList.add(...classes);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _removeClassesOrStyles(clsOrStyles: string[]) {\n\t\tclsOrStyles.forEach(s => {\n\t\t\tif (s.includes(':')) {\n\t\t\t\tconst [prop] = s.split(':');\n\t\t\t\tthis._element.style.removeProperty(prop);\n\t\t\t} else {\n\t\t\t\tconst classes = s.split(/\\s+/).filter(c => c);\n\t\t\t\tif (classes.length) {\n\t\t\t\t\tthis._element.classList.remove(...classes);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _reflowHeight() {\n\t\tconst cnt = this._reflowFrameCount;\n\t\tif (cnt < 15) {\n\t\t\trequestAnimationFrame(this._reflowHeight.bind(this));\n\n\t\t\tif (cnt === 0) {\n\t\t\t\tthis._element.style.height = '0';\n\t\t\t} else if (cnt === 14) {\n\t\t\t\tconst gt = parseInt(\n\t\t\t\t\tgetComputedStyle(this._monitorTarget).getPropertyValue('padding-top').replace(/px$/, '') || '0',\n\t\t\t\t\t10\n\t\t\t\t);\n\t\t\t\tconst gb = parseInt(\n\t\t\t\t\tgetComputedStyle(this._monitorTarget).getPropertyValue('padding-bottom').replace(/px$/, '') || '0',\n\t\t\t\t\t10\n\t\t\t\t);\n\t\t\t\tthis._element.style.height = `${this._height - gt - gb - 5}px`;\n\t\t\t}\n\t\t}\n\t\tthis._reflowFrameCount++;\n\t}\n\n\tprivate _toNumber(s: string) {\n\t\treturn (s === '~' ? Infinity : Number(s)) || -Infinity;\n\t}\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n\tAfterViewInit,\n\tComponentFactory,\n\tComponentFactoryResolver,\n\tComponentRef,\n\tDirective,\n\tDoCheck,\n\tElementRef,\n\tInject,\n\tInput,\n\tOptional,\n\tViewContainerRef\n} from '@angular/core';\nimport { MatButton } from '@angular/material/button';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\nimport { Subscription } from 'rxjs';\n\n/**\n * Use this directive on a `MatButton` element to provide an alternative view when an sync operation is in progress.\n *\n * For example:\n *\n * ```\n * <button (click)=\"submit();\" [buiAwait]=\"submitSubscription\" buiAwaitAriaLabel=\"submitting\">Submit</button>\n * ```\n *\n * Please refer to [Material Design](https://material.io/components/progress-indicators#circular-progress-indicators)\n * for more details of integrating circular spinner component with action buttons.\n *\n * The operation is considered 'in progress' when the bound property `buiAwait` evaluates to\n *\n * - `true`; or\n * - an instance of `rxjs/Subscription` and `buiAwait.closed` is falsy\n *\n * When in progress\n *\n * - the button's caption will be hidden;\n * - a `<mat-progress-spinner>` will be displayed in place of the caption;\n * - the button will be disabled by setting the property `disabled` of the `MatButton` instance.\n */\n@Directive({\n\tselector: '[buiAwait]'\n})\nexport class AwaitDirective implements AfterViewInit, DoCheck {\n\t/**\n\t * Indicates the `in progress` status of an async operation.\n\t *\n\t * The operation is considered 'in progress' when the property evaluates to\n\t *\n\t * - `true`; or\n\t * - an instance of `rxjs/Subscription` and `buiAwait.closed` is falsy\n\t *\n\t */\n\t@Input()\n\tbuiAwait: null | undefined | boolean | Subscription;\n\n\t/** The ARIA label to be put on the spinner. The default value is `\"In progress\"`. */\n\t@Input()\n\tbuiAwaitAriaLabel = 'In progress';\n\n\t/** The diameter of the in-progress spinner. The default value is `20`. */\n\t@Input()\n\tbuiAwaitDiameter = 20;\n\n\tprivate _overlayEl: HTMLDivElement | undefined;\n\tprivate _processing = false;\n\tprivate _factory: ComponentFactory<MatProgressSpinner> | undefined;\n\tprivate _spinnerRef: ComponentRef<MatProgressSpinner> | undefined;\n\tprivate _captionWrapper: HTMLElement | undefined;\n\n\tconstructor(\n\t\tprivate readonly _eRef: ElementRef<HTMLElement>,\n\t\t@Optional() private readonly button: MatButton,\n\t\t@Inject(DOCUMENT) private readonly doc: Document,\n\t\tfactoryResolver: ComponentFactoryResolver,\n\t\tprivate _viewCont: ViewContainerRef\n\t) {\n\t\tif (!button) {\n\t\t\tconsole.error('[buiAwait] can only be used on a MatButton');\n\t\t\treturn;\n\t\t}\n\t\tthis._factory = factoryResolver.resolveComponentFactory(MatProgressSpinner);\n\t}\n\n\t/** @ignore */\n\tngAfterViewInit(): void {\n\t\tif (this.button) {\n\t\t\tthis._overlayEl = this.doc.createElement('div');\n\t\t\tthis._eRef.nativeElement.appendChild(this._overlayEl);\n\t\t\tthis._overlayEl.classList.add('bui-await-overlay');\n\t\t\tthis._overlayEl.style.cssText =\n\t\t\t\t'display:flex; position:absolute; top:0; right:0; bottom:0; left:0; align-items: center; justify-content: center';\n\t\t\tthis._captionWrapper = this._eRef.nativeElement.querySelector('.mat-button-wrapper') as HTMLElement;\n\t\t}\n\t}\n\n\t/** @ignore */\n\tngDoCheck(): void {\n\t\tconst inProgress = this.buiAwait === true || (typeof this.buiAwait === 'object' && !this.buiAwait!.closed);\n\t\tif (inProgress !== this._processing) {\n\t\t\tthis._processing = inProgress;\n\t\t\tthis._statusChanged();\n\t\t}\n\t}\n\n\tprivate _statusChanged() {\n\t\tif (this.button) {\n\t\t\tthis.button.disabled = this._processing;\n\n\t\t\tif (this._processing) {\n\t\t\t\tthis._spinnerRef = this._viewCont.createComponent(this._factory!);\n\t\t\t\tconst c = this._spinnerRef.instance;\n\t\t\t\tc.diameter = this.buiAwaitDiameter;\n\t\t\t\tc.mode = 'indeterminate';\n\t\t\t\tc.color = this.button.color;\n\t\t\t\tconst e: HTMLElement = this._spinnerRef.location.nativeElement;\n\t\t\t\te.setAttribute('aria-label', this.buiAwaitAriaLabel);\n\t\t\t\tthis._overlayEl!.appendChild(e);\n\t\t\t\tthis._captionWrapper!.style.visibility = 'hidden';\n\t\t\t} else {\n\t\t\t\tthis._captionWrapper!.style.visibility = '';\n\t\t\t\tthis._spinnerRef!.destroy();\n\t\t\t\tthis._overlayEl!.innerHTML = '';\n\t\t\t}\n\t\t}\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SizingDirective } from './sizing.directive';\nimport { SizingMonitorDirective } from './sizing-monitor.directive';\nimport { AwaitDirective } from './await.directive';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\n/**\n * For functionality that cannot be easily achieved via CSS.\n */\n@NgModule({\n\tdeclarations: [SizingDirective, SizingMonitorDirective, AwaitDirective],\n\timports: [CommonModule, MatButtonModule, MatProgressSpinnerModule],\n\texports: [SizingDirective, SizingMonitorDirective, AwaitDirective, MatProgressSpinnerModule]\n})\nexport class BehaviorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SizingMonitorDirective"],"mappings":";;;;;;;;;AAEA;;;;;;;;;;;;;;AAcG;MAIU,sBAAsB,CAAA;AAClC,IAAA,WAAA,CAA4B,OAAgC,EAAA;AAAhC,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAyB;KAAI;;mHADpD,sBAAsB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;uGAAtB,sBAAsB,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,oBAAoB;iBAC9B,CAAA;;;ACDD;;;;;;;;;;;;;;;;;;;;AAoBG;MAIU,eAAe,CAAA;AAkE3B,IAAA,WAAA,CAC2B,IAAc,EACpB,cAAsC,EAC1D,OAAgC,EAC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,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,iBAJX,eAAe,EAAE,sBAAsB,EAAE,cAAc,aAC5D,YAAY,EAAE,eAAe,EAAE,wBAAwB,aACvD,eAAe,EAAE,sBAAsB,EAAE,cAAc,EAAE,wBAAwB,CAAA,EAAA,CAAA,CAAA;AAE/E,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHhB,YAAY,EAAE,eAAe,EAAE,wBAAwB,EACE,wBAAwB,CAAA,EAAA,CAAA,CAAA;2FAE/E,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,CAAC,eAAe,EAAE,sBAAsB,EAAE,cAAc,CAAC;AACvE,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,wBAAwB,CAAC;oBAClE,OAAO,EAAE,CAAC,eAAe,EAAE,sBAAsB,EAAE,cAAc,EAAE,wBAAwB,CAAC;iBAC5F,CAAA;;;ACfD;;AAEG;;;;"}
1
+ {"version":3,"file":"bravura-ui-behavior.mjs","sources":["../../../projects/ui/behavior/sizing-monitor.directive.ts","../../../projects/ui/behavior/sizing.directive.ts","../../../projects/ui/behavior/await.directive.ts","../../../projects/ui/behavior/behavior.module.ts","../../../projects/ui/behavior/bravura-ui-behavior.ts"],"sourcesContent":["import { Directive, ElementRef } from '@angular/core';\n\n/**\n * Use this directive to designate a target HTML element, based on which the child elements'\n * `[buiSizing]` directives will calculate the sizes.\n *\n * ```html\n * <div [buiSizingMonitor]>\n * <div [buiSizing]=\"...\">\n * </div>\n * <div>\n * <div [buiSizing]=\"...\">\n * </div>\n * </div>\n * <div>\n * ```\n */\n@Directive({\n\tselector: '[buiSizingMonitor]'\n})\nexport class SizingMonitorDirective {\n\tconstructor(public readonly element: ElementRef<HTMLElement>) {}\n}\n","import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DOCUMENT } from '@angular/common';\nimport {\n\tDirective,\n\tElementRef,\n\tEventEmitter,\n\tInject,\n\tInput,\n\tNgZone,\n\tOnChanges,\n\tOnDestroy,\n\tOptional,\n\tOutput,\n\tSimpleChanges\n} from '@angular/core';\nimport { debounceTime, take } from 'rxjs/operators';\nimport { SizingMonitorDirective } from './sizing-monitor.directive';\n\n/**\n * This directive monitors the changes in the width of the `sizingBy` target, and apply specified style\n * classes and/or inline styles to the current element dynamically.\n *\n * In order for the layout engine to efficiently calculate and stabilize the dimensions, the effective style property\n * `box-sizing` of the `sizingBy` target element must be set to `border-box`.\n *\n * The directive uses [ResizeObserver API](https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API)\n * to capture the events of element resizing. Please use a polyfill if you want to support older browsers\n * that do not implement ResizeObserver API.\n *\n * Examples:\n *\n * ```html\n * <div #parentElement>\n * <div [buiSizing]=\"{'400': 'small', '800': 'medium', '~': 'large'}\" [buiSizingBy]=\"parentElement\"></div>\n * <div [buiSizing]=\"['small', 'medium', 'large']\" [buiSizingBy]=\"'root'\"></div>\n * <div [buiSizing]=\"{'650': 'border-color: #28569', '~': 'bg-muted; border-style: dotted'}\" [buiSizingBy]=\"parentElement\"></div>\n * </div>\n * ```\n */\n@Directive({\n\tselector: '[buiSizing],[buiResized],[buiSizingBy],[buiFixedHeight]'\n})\nexport class SizingDirective implements OnChanges, OnDestroy {\n\t/**\n\t * @ignore\n\t */\n\tstatic defaultSizingBreakpoints = ['400', '800', '~'];\n\n\t/**\n\t * Specifies the breakpoint widths and the style classes.\n\t *\n\t * The sizing spec `{\"400\": \"small\", \"800\": \"medium\", \"~\": \"large\"}` tells the directive to apply\n\t * a style class `small` when the width of the monitored target is smaller than 400 pixels,\n\t * `medium` when the width is between 400 and 800 pixels, and `large` when above.\n\t *\n\t * @example {'400': 'small', '800': 'medium', '~': 'large'}\n\t */\n\t@Input()\n\tbuiSizing: string | Array<string> | { [key: string]: string } = {};\n\n\t/**\n\t * The alias of `buiSizingBy`.\n\t * @default 'root'\n\t * @deprecated\n\t * @ignore\n\t */\n\t@Input()\n\tsizingBy: 'root' | 'parent' | HTMLElement = 'root';\n\n\t/**\n\t * Designate an element to be monitored for recalculating the style classes of the current element.\n\t *\n\t * - `root` specifies the document root or the enclosing shadow host. This is the default value.\n\t * - `parent` specifies the parent element.\n\t *\n\t * @default 'root'\n\t * @alias sizingBy\n\t */\n\t@Input()\n\tget buiSizingBy(): 'root' | 'parent' | HTMLElement {\n\t\treturn this.sizingBy;\n\t}\n\tset buiSizingBy(target: 'root' | 'parent' | HTMLElement) {\n\t\tthis.sizingBy = target;\n\t}\n\n\t/**\n\t * Emits `{width, height}` when the monitor target element resizes.\n\t *\n\t * Note that the dimensions emitted are of the [sizingBy] target, but not the current element.\n\t */\n\t@Output()\n\tbuiResized = new EventEmitter<{ width: number; height: number }>();\n\n\t/**\n\t * Recalculate the height of this element according to the height of the monitored target.\n\t */\n\t@Input()\n\tbuiFixedHeight = false;\n\n\tprivate _monitorTarget: HTMLElement;\n\tprivate _observer: ResizeObserver | undefined;\n\tprivate _sizingSpec: { [key: string]: string } = {};\n\tprivate _width = 0;\n\tprivate _height = 0;\n\tprivate _reflowFrameCount = 0;\n\tprivate _element: HTMLElement;\n\n\tconstructor(\n\t\t@Inject(DOCUMENT) private _doc: Document,\n\t\t@Optional() private _defaultTarget: SizingMonitorDirective,\n\t\telemRef: ElementRef<HTMLElement>,\n\t\tprivate _zone: NgZone\n\t) {\n\t\tthis._element = elemRef.nativeElement;\n\t\tthis._monitorTarget = this._element;\n\t}\n\n\tngOnChanges(_: SimpleChanges): void {\n\t\tconst disconnected = this._element.getRootNode() instanceof HTMLElement;\n\t\tif (disconnected) {\n\t\t\t// defer shadow detection till dom connection event\n\t\t\tthis._zone.onStable.pipe(debounceTime(10), take(1)).subscribe(() => this._initOrReset());\n\t\t} else {\n\t\t\tthis._initOrReset();\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._tearDownNodeMonitor();\n\t}\n\n\tprivate _initOrReset() {\n\t\tconst originalTarget = this._monitorTarget;\n\t\tif (this.buiSizingBy instanceof HTMLElement) {\n\t\t\tthis._monitorTarget = this.buiSizingBy;\n\t\t} else if (this._defaultTarget) {\n\t\t\tthis._monitorTarget = this._defaultTarget.element.nativeElement;\n\t\t} else if (this.buiSizingBy === 'root') {\n\t\t\tconst root = this._element.getRootNode();\n\t\t\tif (root instanceof ShadowRoot) {\n\t\t\t\tthis._monitorTarget = root.host as HTMLElement;\n\t\t\t} else {\n\t\t\t\tthis._monitorTarget = this._doc.documentElement;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._monitorTarget = this._element.parentElement as any;\n\t\t}\n\n\t\tif (this._monitorTarget != originalTarget) {\n\t\t\tthis._setUpNodeMonitor();\n\t\t}\n\n\t\tthis._sizingSpec = {};\n\t\tlet spec = this.buiSizing;\n\t\tif (typeof spec === 'string') {\n\t\t\tspec = spec.split(',').map(k => k.trim());\n\t\t}\n\n\t\tif (Array.isArray(spec)) {\n\t\t\tspec.forEach((c, i) => {\n\t\t\t\tthis._sizingSpec[SizingDirective.defaultSizingBreakpoints[i] || '~'] = c;\n\t\t\t});\n\t\t} else if (spec) {\n\t\t\tthis._sizingSpec = spec;\n\t\t}\n\n\t\tthis.buiFixedHeight = coerceBooleanProperty(this.buiFixedHeight);\n\n\t\tthis._calculateSize();\n\t}\n\n\tprivate _setUpNodeMonitor() {\n\t\tthis._tearDownNodeMonitor();\n\t\tif (this._monitorTarget) {\n\t\t\tthis._observer = new ResizeObserver(() => this._calculateSize());\n\n\t\t\tthis._observer.observe(this._monitorTarget, { box: 'border-box' });\n\t\t}\n\t}\n\n\tprivate _tearDownNodeMonitor() {\n\t\tif (this._observer) {\n\t\t\tthis._observer.disconnect();\n\t\t\tthis._observer = undefined;\n\t\t}\n\t}\n\n\tprivate _calculateSize() {\n\t\tconst widthChanged = this._width !== this._monitorTarget.clientWidth;\n\t\tconst heightChanged = this._height !== this._monitorTarget.clientHeight;\n\t\tif (widthChanged) {\n\t\t\tthis._width = this._monitorTarget.clientWidth;\n\n\t\t\tconst bks = Object.keys(this._sizingSpec).sort((a, b) => this._toNumber(a) - this._toNumber(b));\n\t\t\tlet found = false;\n\t\t\tfor (const key of bks) {\n\t\t\t\tconst classesOrStyles = this._sizingSpec[key].split(/;+/).filter(c => c);\n\t\t\t\tthis._removeClassesOrStyles(classesOrStyles);\n\t\t\t\tconst expectedWidth = this._toNumber(key);\n\t\t\t\tif (this._width <= expectedWidth && !found) {\n\t\t\t\t\tthis._applyClassesOrStyles(classesOrStyles);\n\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (widthChanged || heightChanged) {\n\t\t\tthis._height = this._monitorTarget.clientHeight;\n\t\t\tif (this.buiFixedHeight) {\n\t\t\t\tthis._reflowFrameCount = 0;\n\t\t\t\tthis._reflowHeight();\n\t\t\t}\n\t\t\tsetTimeout(() => this._zone.run(() => this.buiResized.emit({ width: this._width, height: this._height })));\n\t\t}\n\t}\n\n\tprivate _applyClassesOrStyles(clsOrStyles: string[]) {\n\t\tclsOrStyles.forEach(s => {\n\t\t\tif (s.includes(':')) {\n\t\t\t\tconst [prop, val] = s.split(':');\n\t\t\t\tthis._element.style.setProperty(prop.trim(), val.trim());\n\t\t\t} else {\n\t\t\t\tconst classes = s.split(/\\s+/).filter(c => c);\n\t\t\t\tif (classes.length) {\n\t\t\t\t\tthis._element.classList.add(...classes);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _removeClassesOrStyles(clsOrStyles: string[]) {\n\t\tclsOrStyles.forEach(s => {\n\t\t\tif (s.includes(':')) {\n\t\t\t\tconst [prop] = s.split(':');\n\t\t\t\tthis._element.style.removeProperty(prop);\n\t\t\t} else {\n\t\t\t\tconst classes = s.split(/\\s+/).filter(c => c);\n\t\t\t\tif (classes.length) {\n\t\t\t\t\tthis._element.classList.remove(...classes);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _reflowHeight() {\n\t\tconst cnt = this._reflowFrameCount;\n\t\tif (cnt < 15) {\n\t\t\trequestAnimationFrame(this._reflowHeight.bind(this));\n\n\t\t\tif (cnt === 0) {\n\t\t\t\tthis._element.style.height = '0';\n\t\t\t} else if (cnt === 14) {\n\t\t\t\tconst gt = parseInt(\n\t\t\t\t\tgetComputedStyle(this._monitorTarget).getPropertyValue('padding-top').replace(/px$/, '') || '0',\n\t\t\t\t\t10\n\t\t\t\t);\n\t\t\t\tconst gb = parseInt(\n\t\t\t\t\tgetComputedStyle(this._monitorTarget).getPropertyValue('padding-bottom').replace(/px$/, '') || '0',\n\t\t\t\t\t10\n\t\t\t\t);\n\t\t\t\tthis._element.style.height = `${this._height - gt - gb - 5}px`;\n\t\t\t}\n\t\t}\n\t\tthis._reflowFrameCount++;\n\t}\n\n\tprivate _toNumber(s: string) {\n\t\treturn (s === '~' ? Infinity : Number(s)) || -Infinity;\n\t}\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n\tAfterViewInit,\n\tComponentFactory,\n\tComponentFactoryResolver,\n\tComponentRef,\n\tDirective,\n\tDoCheck,\n\tElementRef,\n\tInject,\n\tInput,\n\tOptional,\n\tViewContainerRef\n} from '@angular/core';\nimport { MatButton } from '@angular/material/button';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\nimport { Subscription } from 'rxjs';\n\n/**\n * Use this directive on a `MatButton` element to provide an alternative view when an sync operation is in progress.\n *\n * For example:\n *\n * ```\n * <button (click)=\"submit();\" [buiAwait]=\"submitSubscription\" buiAwaitAriaLabel=\"submitting\">Submit</button>\n * ```\n *\n * Please refer to [Material Design](https://material.io/components/progress-indicators#circular-progress-indicators)\n * for more details of integrating circular spinner component with action buttons.\n *\n * The operation is considered 'in progress' when the bound property `buiAwait` evaluates to\n *\n * - `true`; or\n * - an instance of `rxjs/Subscription` and `buiAwait.closed` is falsy\n *\n * When in progress\n *\n * - the button's caption will be hidden;\n * - a `<mat-progress-spinner>` will be displayed in place of the caption;\n * - the button will be disabled by setting the property `disabled` of the `MatButton` instance.\n */\n@Directive({\n\tselector: '[buiAwait]'\n})\nexport class AwaitDirective implements AfterViewInit, DoCheck {\n\t/**\n\t * Indicates the `in progress` status of an async operation.\n\t *\n\t * The operation is considered 'in progress' when the property evaluates to\n\t *\n\t * - `true`; or\n\t * - an instance of `rxjs/Subscription` and `buiAwait.closed` is falsy\n\t *\n\t */\n\t@Input()\n\tbuiAwait: null | undefined | boolean | Subscription;\n\n\t/** The ARIA label to be put on the spinner. The default value is `\"In progress\"`. */\n\t@Input()\n\tbuiAwaitAriaLabel = 'In progress';\n\n\t/** The diameter of the in-progress spinner. The default value is `20`. */\n\t@Input()\n\tbuiAwaitDiameter = 20;\n\n\tprivate _overlayEl: HTMLDivElement | undefined;\n\tprivate _processing = false;\n\tprivate _factory: ComponentFactory<MatProgressSpinner> | undefined;\n\tprivate _spinnerRef: ComponentRef<MatProgressSpinner> | undefined;\n\tprivate _captionWrapper: HTMLElement | undefined;\n\n\tconstructor(\n\t\tprivate readonly _eRef: ElementRef<HTMLElement>,\n\t\t@Optional() private readonly button: MatButton,\n\t\t@Inject(DOCUMENT) private readonly doc: Document,\n\t\tfactoryResolver: ComponentFactoryResolver,\n\t\tprivate _viewCont: ViewContainerRef\n\t) {\n\t\tif (!button) {\n\t\t\tconsole.error('[buiAwait] can only be used on a MatButton');\n\t\t\treturn;\n\t\t}\n\t\tthis._factory = factoryResolver.resolveComponentFactory(MatProgressSpinner);\n\t}\n\n\t/** @ignore */\n\tngAfterViewInit(): void {\n\t\tif (this.button) {\n\t\t\tthis._overlayEl = this.doc.createElement('div');\n\t\t\tthis._eRef.nativeElement.appendChild(this._overlayEl);\n\t\t\tthis._overlayEl.classList.add('bui-await-overlay');\n\t\t\tthis._overlayEl.style.cssText =\n\t\t\t\t'display:flex; position:absolute; top:0; right:0; bottom:0; left:0; align-items: center; justify-content: center';\n\t\t\tthis._captionWrapper = this._eRef.nativeElement.querySelector('.mat-button-wrapper') as HTMLElement;\n\t\t}\n\t}\n\n\t/** @ignore */\n\tngDoCheck(): void {\n\t\tconst inProgress = this.buiAwait === true || (typeof this.buiAwait === 'object' && !this.buiAwait!.closed);\n\t\tif (inProgress !== this._processing) {\n\t\t\tthis._processing = inProgress;\n\t\t\tthis._statusChanged();\n\t\t}\n\t}\n\n\tprivate _statusChanged() {\n\t\tif (this.button) {\n\t\t\tthis.button.disabled = this._processing;\n\n\t\t\tif (this._processing) {\n\t\t\t\tthis._spinnerRef = this._viewCont.createComponent(this._factory!);\n\t\t\t\tconst c = this._spinnerRef.instance;\n\t\t\t\tc.diameter = this.buiAwaitDiameter;\n\t\t\t\tc.mode = 'indeterminate';\n\t\t\t\tc.color = this.button.color;\n\t\t\t\tconst e: HTMLElement = this._spinnerRef.location.nativeElement;\n\t\t\t\te.setAttribute('aria-label', this.buiAwaitAriaLabel);\n\t\t\t\tthis._overlayEl!.appendChild(e);\n\t\t\t\tthis._captionWrapper!.style.visibility = 'hidden';\n\t\t\t} else {\n\t\t\t\tthis._captionWrapper!.style.visibility = '';\n\t\t\t\tthis._spinnerRef!.destroy();\n\t\t\t\tthis._overlayEl!.innerHTML = '';\n\t\t\t}\n\t\t}\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SizingDirective } from './sizing.directive';\nimport { SizingMonitorDirective } from './sizing-monitor.directive';\nimport { AwaitDirective } from './await.directive';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\n/**\n * For functionality that cannot be easily achieved via CSS.\n */\n@NgModule({\n\tdeclarations: [SizingDirective, SizingMonitorDirective, AwaitDirective],\n\timports: [CommonModule, MatButtonModule, MatProgressSpinnerModule],\n\texports: [SizingDirective, SizingMonitorDirective, AwaitDirective, MatProgressSpinnerModule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EAAE,cAAc,CAAC;AACvE,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,wBAAwB,CAAC;oBAClE,OAAO,EAAE,CAAC,eAAe,EAAE,sBAAsB,EAAE,cAAc,EAAE,wBAAwB,CAAC;iBAC5F,CAAA;;;ACfD;;AAEG;;;;"}
@@ -0,0 +1,393 @@
1
+ import * as i1 from '@angular/cdk/bidi';
2
+ import { BidiModule } from '@angular/cdk/bidi';
3
+ import * as i4 from '@angular/cdk/observers';
4
+ import { ObserversModule } from '@angular/cdk/observers';
5
+ import { CommonModule } from '@angular/common';
6
+ import * as i0 from '@angular/core';
7
+ import { EventEmitter, TemplateRef, ElementRef, ViewContainerRef, Component, ChangeDetectionStrategy, Host, ViewChild, InjectionToken, Directive, Inject, Input, Output, NgModule } from '@angular/core';
8
+ import * as i2 from '@angular/material/button';
9
+ import { MatButtonModule } from '@angular/material/button';
10
+ import * as i3 from '@angular/material/icon';
11
+ import { MatIconModule } from '@angular/material/icon';
12
+ import { BuiCommonModule } from '@bravura/ui/common';
13
+ import * as i5 from '@bravura/ui/icon-font';
14
+ import { IconFontModule } from '@bravura/ui/icon-font';
15
+ import { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';
16
+ import { Subject, takeUntil } from 'rxjs';
17
+
18
+ class ClipNoteComponent {
19
+ constructor(_cd, _dir, _elemRef) {
20
+ this._cd = _cd;
21
+ this._dir = _dir;
22
+ this._elemRef = _elemRef;
23
+ this.buttonText = '';
24
+ this.panelState = 'closed-ltr';
25
+ this.direction = 'ltr';
26
+ this._buttonAnimating = false;
27
+ this._hasContent = false;
28
+ this.opened = new EventEmitter();
29
+ this.closed = new EventEmitter();
30
+ this._hovering = false;
31
+ this._destroyed$ = new Subject();
32
+ this._toggleQueue = [];
33
+ }
34
+ get buttonState() {
35
+ if (this._hovering || this.panelState === 'open') {
36
+ return 'active';
37
+ }
38
+ return 'inactive';
39
+ }
40
+ get buttonIconState() {
41
+ if (this.panelState === 'open') {
42
+ return `open-${this.direction}`;
43
+ }
44
+ if (this.buttonState === 'active') {
45
+ return `active-${this.direction}`;
46
+ }
47
+ return 'inactive';
48
+ }
49
+ ngOnInit() {
50
+ const changeDir = () => {
51
+ this.direction = this._dir.value;
52
+ this.panelState = `closed-${this.direction}`;
53
+ this._cd.markForCheck();
54
+ };
55
+ this._dir.change.pipe(takeUntil(this._destroyed$)).subscribe(changeDir);
56
+ changeDir();
57
+ }
58
+ ngOnDestroy() {
59
+ this._destroyed$.next();
60
+ this._destroyed$.complete();
61
+ }
62
+ _mouseOverButton(hovering) {
63
+ if (this._hovering !== hovering) {
64
+ this._hovering = hovering;
65
+ this._cd.markForCheck();
66
+ }
67
+ }
68
+ toggle() {
69
+ this.panelState = this.panelState === `closed-${this.direction}` ? 'open' : `closed-${this.direction}`;
70
+ this._cd.markForCheck();
71
+ }
72
+ _scheduleToggle() {
73
+ if (this._buttonAnimating) {
74
+ this._toggleQueue.push(true);
75
+ }
76
+ else {
77
+ this.toggle();
78
+ }
79
+ }
80
+ _checkToggle() {
81
+ if (this._toggleQueue.pop()) {
82
+ this.toggle();
83
+ }
84
+ }
85
+ open() {
86
+ this.panelState = 'open';
87
+ this._cd.markForCheck();
88
+ this._emit();
89
+ }
90
+ close() {
91
+ this.panelState = `closed-${this.direction}`;
92
+ this._cd.markForCheck();
93
+ this._emit();
94
+ }
95
+ _emit() {
96
+ if (this.panelState === 'open') {
97
+ this.opened.emit();
98
+ }
99
+ else {
100
+ this.closed.emit();
101
+ }
102
+ }
103
+ _contentChanged(content) {
104
+ let template;
105
+ if (content instanceof TemplateRef) {
106
+ template = content;
107
+ }
108
+ else {
109
+ template = this._fallbackTemplate;
110
+ this._content = content;
111
+ }
112
+ this._noteViewRef.clear();
113
+ const context = {};
114
+ this._contentView = this._noteViewRef.createEmbeddedView(template, context);
115
+ this._checkContent(true);
116
+ }
117
+ _checkContent(initial) {
118
+ var _a, _b;
119
+ (_a = this._contentView) === null || _a === void 0 ? void 0 : _a.detectChanges();
120
+ this._hasContent = !!((_b = this._viewDiv.nativeElement.textContent) === null || _b === void 0 ? void 0 : _b.trim());
121
+ const classList = this._elemRef.nativeElement.classList;
122
+ const cls = 'bui-clip-note-hidden';
123
+ const cls1 = 'bui-clip-note-reveal';
124
+ if (this._hasContent) {
125
+ classList.remove(cls);
126
+ if (!initial && this.panelState !== 'open') {
127
+ classList.add(cls1);
128
+ }
129
+ this._elemRef.nativeElement.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
130
+ }
131
+ else {
132
+ classList.add(cls);
133
+ classList.remove(cls1);
134
+ this.close();
135
+ }
136
+ }
137
+ _assignColor(color) {
138
+ this._color = color;
139
+ this._cd.markForCheck();
140
+ }
141
+ _assignButtonText(text) {
142
+ this.buttonText = text;
143
+ this._cd.markForCheck();
144
+ }
145
+ _assignButtonIcon(icon) {
146
+ this._icon = icon;
147
+ this._cd.markForCheck();
148
+ }
149
+ }
150
+ ClipNoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: ClipNoteComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Directionality }, { token: i0.ElementRef, host: true }], target: i0.ɵɵFactoryTarget.Component });
151
+ ClipNoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: ClipNoteComponent, selector: "bui-clip-note", host: { classAttribute: "bui-clip-note bui-host" }, viewQueries: [{ propertyName: "_viewDiv", first: true, predicate: ["viewDiv"], descendants: true, read: ElementRef, static: true }, { propertyName: "_noteViewRef", first: true, predicate: ["noteViewRef"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "_fallbackTemplate", first: true, predicate: ["fallbackTemplate"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"bui-clip-note-wrapper\">\n\t<div\n\t\tclass=\"bui-clip-note-content bui-border-{{ _color }} mat-elevation-z3\"\n\t\t[@panelAnimation]=\"panelState\"\n\t\t#viewDiv\n\t\t(cdkObserveContent)=\"_checkContent()\"\n\t>\n\t\t<ng-container #noteViewRef></ng-container>\n\t</div>\n\n\t<button\n\t\tmat-raised-button\n\t\tclass=\"bui-clip-note-trigger bui-clip-note-trigger-{{ buttonIconState }}\"\n\t\t[color]=\"_color\"\n\t\t[@buttonAnimation]=\"buttonState\"\n\t\t(mouseenter)=\"_mouseOverButton(true)\"\n\t\t(mouseleave)=\"_mouseOverButton(false)\"\n\t\t(click)=\"_scheduleToggle()\"\n\t>\n\t\t<mat-icon\n\t\t\t[@buttonIconAnimation]=\"_icon ? 'disabled' : buttonIconState\"\n\t\t\t(@buttonIconAnimation.start)=\"_buttonAnimating = true\"\n\t\t\t(@buttonIconAnimation.done)=\"_buttonAnimating = false; _checkToggle()\"\n\t\t\t[buiIcon]=\"_icon || (direction === 'rtl' ? 'chevron_right' : 'chevron_left')\"\n\t\t>\n\t\t</mat-icon>\n\t\t<span [@buttonTextAnimation]=\"buttonState\" class=\"bui-clip-note-button-text\">&nbsp; {{ buttonText }}</span>\n\t</button>\n</div>\n\n<ng-template #fallbackTemplate>\n\t<div [innerHTML]=\"_content\"></div>\n</ng-template>\n", styles: [":host{position:absolute;top:2rem;box-sizing:border-box;z-index:var(--bui-clip-note-z-index, 100)}:host(.bui-clip-note-hidden){display:none}:host-context(:not([dir=rtl])){right:0}:host-context(:not([dir=rtl])) .bui-clip-note-trigger{right:-18px}:host-context([dir=rtl]){left:0;right:unset}:host-context([dir=rtl]) .bui-clip-note-trigger{left:-18px;right:unset}.bui-clip-note-trigger{border-radius:18px;overflow:hidden;position:absolute;top:-1rem}.bui-clip-note-button-text{display:inline-block;overflow-x:hidden}.bui-clip-note-wrapper{position:relative}.bui-clip-note-content{max-width:320px;min-width:150px;background-color:var(--bui-bg-body);border-radius:6px;border-width:1px;border-style:solid;padding:1rem;overflow-y:hidden}@keyframes rubber-band{0%{transform:scaleZ(1)}30%{transform:scale3d(1.25,.75,1)}40%{transform:scale3d(.75,1.25,1)}50%{transform:scale3d(1.15,.85,1)}65%{transform:scale3d(.95,1.05,1)}75%{transform:scale3d(1.05,.95,1)}to{transform:scaleZ(1)}}:host(.bui-clip-note-reveal) .bui-clip-note-trigger{animation:rubber-band .8s ease}\n"], dependencies: [{ kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }, { kind: "directive", type: i5.IconDirective, selector: "[buiIcon]", inputs: ["buiIcon", "size", "variant"] }], animations: [
152
+ trigger('buttonAnimation', [
153
+ state('*', style({ width: '36px', minWidth: 0, padding: 0 })),
154
+ state('active', style({})),
155
+ transition('inactive <=> active', [
156
+ group([animate('250ms cubic-bezier(.56,.14,.18,.91)'), query('@buttonTextAnimation', animateChild())]),
157
+ query('@buttonIconAnimation', animateChild())
158
+ ])
159
+ ]),
160
+ trigger('buttonTextAnimation', [
161
+ state('inactive', style({ opacity: 0, width: 0 })),
162
+ state('active', style({ opacity: 1 })),
163
+ transition('inactive => active', animate('250ms cubic-bezier(.88,.15,.63,.61)')),
164
+ transition('active => inactive', animate('250ms cubic-bezier(.05,.72,.44,.92)'))
165
+ ]),
166
+ trigger('buttonIconAnimation', [
167
+ state('active-ltr', style({ transform: 'rotate(-90deg)' })),
168
+ state('active-rtl', style({ transform: 'rotate(90deg)' })),
169
+ state('open-ltr', style({ transform: 'rotate(90deg)' })),
170
+ state('open-rtl', style({ transform: 'rotate(270deg)' })),
171
+ state('inactive', style({})),
172
+ transition('inactive <=> *, * <=> open-ltr, * <=> open-rtl', animate('250ms cubic-bezier(0.25, 0.8, 0.25, 1)'))
173
+ ]),
174
+ trigger('panelAnimation', [
175
+ state('open', style({})),
176
+ state('closed-rtl', style({ transform: 'scale(0) translate(-80%, -100%)', padding: 0, opacity: 0 })),
177
+ state('closed-ltr', style({ transform: 'scale(0) translate(80%, -100%)', padding: 0, opacity: 0 })),
178
+ transition('open <=> *', animate('300ms cubic-bezier(.69,.12,.6,.62)'))
179
+ ])
180
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: ClipNoteComponent, decorators: [{
182
+ type: Component,
183
+ args: [{ selector: 'bui-clip-note', host: { class: 'bui-clip-note bui-host' }, animations: [
184
+ trigger('buttonAnimation', [
185
+ state('*', style({ width: '36px', minWidth: 0, padding: 0 })),
186
+ state('active', style({})),
187
+ transition('inactive <=> active', [
188
+ group([animate('250ms cubic-bezier(.56,.14,.18,.91)'), query('@buttonTextAnimation', animateChild())]),
189
+ query('@buttonIconAnimation', animateChild())
190
+ ])
191
+ ]),
192
+ trigger('buttonTextAnimation', [
193
+ state('inactive', style({ opacity: 0, width: 0 })),
194
+ state('active', style({ opacity: 1 })),
195
+ transition('inactive => active', animate('250ms cubic-bezier(.88,.15,.63,.61)')),
196
+ transition('active => inactive', animate('250ms cubic-bezier(.05,.72,.44,.92)'))
197
+ ]),
198
+ trigger('buttonIconAnimation', [
199
+ state('active-ltr', style({ transform: 'rotate(-90deg)' })),
200
+ state('active-rtl', style({ transform: 'rotate(90deg)' })),
201
+ state('open-ltr', style({ transform: 'rotate(90deg)' })),
202
+ state('open-rtl', style({ transform: 'rotate(270deg)' })),
203
+ state('inactive', style({})),
204
+ transition('inactive <=> *, * <=> open-ltr, * <=> open-rtl', animate('250ms cubic-bezier(0.25, 0.8, 0.25, 1)'))
205
+ ]),
206
+ trigger('panelAnimation', [
207
+ state('open', style({})),
208
+ state('closed-rtl', style({ transform: 'scale(0) translate(-80%, -100%)', padding: 0, opacity: 0 })),
209
+ state('closed-ltr', style({ transform: 'scale(0) translate(80%, -100%)', padding: 0, opacity: 0 })),
210
+ transition('open <=> *', animate('300ms cubic-bezier(.69,.12,.6,.62)'))
211
+ ])
212
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"bui-clip-note-wrapper\">\n\t<div\n\t\tclass=\"bui-clip-note-content bui-border-{{ _color }} mat-elevation-z3\"\n\t\t[@panelAnimation]=\"panelState\"\n\t\t#viewDiv\n\t\t(cdkObserveContent)=\"_checkContent()\"\n\t>\n\t\t<ng-container #noteViewRef></ng-container>\n\t</div>\n\n\t<button\n\t\tmat-raised-button\n\t\tclass=\"bui-clip-note-trigger bui-clip-note-trigger-{{ buttonIconState }}\"\n\t\t[color]=\"_color\"\n\t\t[@buttonAnimation]=\"buttonState\"\n\t\t(mouseenter)=\"_mouseOverButton(true)\"\n\t\t(mouseleave)=\"_mouseOverButton(false)\"\n\t\t(click)=\"_scheduleToggle()\"\n\t>\n\t\t<mat-icon\n\t\t\t[@buttonIconAnimation]=\"_icon ? 'disabled' : buttonIconState\"\n\t\t\t(@buttonIconAnimation.start)=\"_buttonAnimating = true\"\n\t\t\t(@buttonIconAnimation.done)=\"_buttonAnimating = false; _checkToggle()\"\n\t\t\t[buiIcon]=\"_icon || (direction === 'rtl' ? 'chevron_right' : 'chevron_left')\"\n\t\t>\n\t\t</mat-icon>\n\t\t<span [@buttonTextAnimation]=\"buttonState\" class=\"bui-clip-note-button-text\">&nbsp; {{ buttonText }}</span>\n\t</button>\n</div>\n\n<ng-template #fallbackTemplate>\n\t<div [innerHTML]=\"_content\"></div>\n</ng-template>\n", styles: [":host{position:absolute;top:2rem;box-sizing:border-box;z-index:var(--bui-clip-note-z-index, 100)}:host(.bui-clip-note-hidden){display:none}:host-context(:not([dir=rtl])){right:0}:host-context(:not([dir=rtl])) .bui-clip-note-trigger{right:-18px}:host-context([dir=rtl]){left:0;right:unset}:host-context([dir=rtl]) .bui-clip-note-trigger{left:-18px;right:unset}.bui-clip-note-trigger{border-radius:18px;overflow:hidden;position:absolute;top:-1rem}.bui-clip-note-button-text{display:inline-block;overflow-x:hidden}.bui-clip-note-wrapper{position:relative}.bui-clip-note-content{max-width:320px;min-width:150px;background-color:var(--bui-bg-body);border-radius:6px;border-width:1px;border-style:solid;padding:1rem;overflow-y:hidden}@keyframes rubber-band{0%{transform:scaleZ(1)}30%{transform:scale3d(1.25,.75,1)}40%{transform:scale3d(.75,1.25,1)}50%{transform:scale3d(1.15,.85,1)}65%{transform:scale3d(.95,1.05,1)}75%{transform:scale3d(1.05,.95,1)}to{transform:scaleZ(1)}}:host(.bui-clip-note-reveal) .bui-clip-note-trigger{animation:rubber-band .8s ease}\n"] }]
213
+ }], ctorParameters: function () {
214
+ return [{ type: i0.ChangeDetectorRef }, { type: i1.Directionality }, { type: i0.ElementRef, decorators: [{
215
+ type: Host
216
+ }] }];
217
+ }, propDecorators: { _viewDiv: [{
218
+ type: ViewChild,
219
+ args: ['viewDiv', { static: true, read: ElementRef }]
220
+ }], _noteViewRef: [{
221
+ type: ViewChild,
222
+ args: ['noteViewRef', { static: true, read: ViewContainerRef }]
223
+ }], _fallbackTemplate: [{
224
+ type: ViewChild,
225
+ args: ['fallbackTemplate', { static: true }]
226
+ }] } });
227
+
228
+ /** Used to provide default config for clip notes. */
229
+ const CLIP_NOTE_DEFAULT_CONFIG = new InjectionToken('bui-clip-note.default-config', {
230
+ factory: () => ({ color: 'primary', caption: 'More info' })
231
+ });
232
+ /**
233
+ * A clip note consists of a toggle button and a floating 'notepad' element, attached to the top end of the host element's
234
+ * viewable area. The 'notepad' normally collapses away and only reveals itself when the toggle button is active.
235
+ *
236
+ * The toggle button clips on the edge of the host element and expands to display the full caption when hovered. It hides itself
237
+ * automatically when there is no content provided via the `buiClipNote` property of the directive.
238
+ *
239
+ * The clip note component is suitable for large page container elements with visible boundaries. It can present contextual
240
+ * information regarding and in addition to the content displayed in the main view area.
241
+ *
242
+ * The properties `buiClipNoteColor` and `buiClipNoteCaption` customise the appearance of the clip note, the default values of which
243
+ * can optionally be provided by the `ClipNoteModule.forConfig()` method.
244
+ *
245
+ */
246
+ class ClipNoteDirective {
247
+ constructor(_elementRef, _vc, _config) {
248
+ this._elementRef = _elementRef;
249
+ this._vc = _vc;
250
+ /** Emits when the panel opens */
251
+ this.buiClipNoteOpened = new EventEmitter();
252
+ /** Emits when the panel closes */
253
+ this.buiClipNoteClosed = new EventEmitter();
254
+ this._color = 'primary';
255
+ this._caption = _config.caption;
256
+ this._color = _config.color;
257
+ }
258
+ /**
259
+ * Provide content to the clip note's floating notepad element.
260
+ * It accepts a `string` of HTML content or a `TemplateRef` object.
261
+ */
262
+ get buiClipNote() {
263
+ return this._content;
264
+ }
265
+ set buiClipNote(note) {
266
+ this._content = note;
267
+ if (this._compRef) {
268
+ this._processContent();
269
+ }
270
+ }
271
+ /**
272
+ * Customise the theme color alias.
273
+ * @default 'primary'
274
+ */
275
+ get buiClipNoteColor() {
276
+ return this._color;
277
+ }
278
+ set buiClipNoteColor(color) {
279
+ this._color = color;
280
+ if (this._compRef) {
281
+ this._compRef.instance._assignColor(this._color);
282
+ }
283
+ }
284
+ /**
285
+ * Customise the icon on the toggle button. With this property specified, the animation on the icon
286
+ * will not be active.
287
+ */
288
+ get buiClipNoteIcon() {
289
+ return this._icon;
290
+ }
291
+ set buiClipNoteIcon(icon) {
292
+ this._icon = icon;
293
+ if (this._compRef) {
294
+ this._compRef.instance._assignButtonIcon(this._icon);
295
+ }
296
+ }
297
+ /**
298
+ * The caption of the toggle button when expanded.
299
+ */
300
+ get buiClipNoteCaption() {
301
+ return this._caption;
302
+ }
303
+ set buiClipNoteCaption(text) {
304
+ this._caption = text;
305
+ if (this._compRef) {
306
+ this._compRef.instance._assignButtonText(this._caption);
307
+ }
308
+ }
309
+ ngAfterViewInit() {
310
+ setTimeout(() => {
311
+ this._compRef = this._vc.createComponent(ClipNoteComponent);
312
+ const childElement = this._compRef.location.nativeElement;
313
+ const element = this._elementRef.nativeElement;
314
+ element.style.position = 'relative';
315
+ element.appendChild(childElement);
316
+ this._compRef.instance._assignColor(this._color);
317
+ this._compRef.instance._assignButtonText(this._caption);
318
+ this._compRef.instance._assignButtonIcon(this._icon);
319
+ this._compRef.instance.opened.subscribe(this.buiClipNoteOpened.next.bind(this.buiClipNoteOpened));
320
+ this._compRef.instance.closed.subscribe(this.buiClipNoteClosed.next.bind(this.buiClipNoteClosed));
321
+ this._processContent();
322
+ });
323
+ }
324
+ ngOnDestroy() {
325
+ this._compRef.destroy();
326
+ }
327
+ /** Open the note panel */
328
+ open() {
329
+ this._compRef.instance.open();
330
+ }
331
+ /** Close the note panel */
332
+ close() {
333
+ this._compRef.instance.close();
334
+ }
335
+ _processContent() {
336
+ this._compRef.instance._contentChanged(this._content);
337
+ }
338
+ }
339
+ ClipNoteDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: ClipNoteDirective, deps: [{ token: i0.ElementRef, host: true }, { token: i0.ViewContainerRef }, { token: CLIP_NOTE_DEFAULT_CONFIG }], target: i0.ɵɵFactoryTarget.Directive });
340
+ ClipNoteDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: ClipNoteDirective, selector: "[buiClipNote]", inputs: { buiClipNote: "buiClipNote", buiClipNoteColor: "buiClipNoteColor", buiClipNoteIcon: "buiClipNoteIcon", buiClipNoteCaption: "buiClipNoteCaption" }, outputs: { buiClipNoteOpened: "buiClipNoteOpened", buiClipNoteClosed: "buiClipNoteClosed" }, exportAs: ["buiClipNote"], ngImport: i0 });
341
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: ClipNoteDirective, decorators: [{
342
+ type: Directive,
343
+ args: [{
344
+ selector: '[buiClipNote]',
345
+ exportAs: 'buiClipNote'
346
+ }]
347
+ }], ctorParameters: function () {
348
+ return [{ type: i0.ElementRef, decorators: [{
349
+ type: Host
350
+ }] }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
351
+ type: Inject,
352
+ args: [CLIP_NOTE_DEFAULT_CONFIG]
353
+ }] }];
354
+ }, propDecorators: { buiClipNote: [{
355
+ type: Input
356
+ }], buiClipNoteColor: [{
357
+ type: Input
358
+ }], buiClipNoteIcon: [{
359
+ type: Input
360
+ }], buiClipNoteCaption: [{
361
+ type: Input
362
+ }], buiClipNoteOpened: [{
363
+ type: Output
364
+ }], buiClipNoteClosed: [{
365
+ type: Output
366
+ }] } });
367
+
368
+ class ClipNoteModule {
369
+ static forConfig(config) {
370
+ return {
371
+ ngModule: ClipNoteModule,
372
+ providers: [{ provide: CLIP_NOTE_DEFAULT_CONFIG, useValue: config }]
373
+ };
374
+ }
375
+ }
376
+ ClipNoteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: ClipNoteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
377
+ ClipNoteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: ClipNoteModule, declarations: [ClipNoteComponent, ClipNoteDirective], imports: [CommonModule, MatButtonModule, MatIconModule, BidiModule, BuiCommonModule, ObserversModule, IconFontModule], exports: [ClipNoteDirective] });
378
+ ClipNoteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: ClipNoteModule, imports: [CommonModule, MatButtonModule, MatIconModule, BidiModule, BuiCommonModule, ObserversModule, IconFontModule] });
379
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: ClipNoteModule, decorators: [{
380
+ type: NgModule,
381
+ args: [{
382
+ declarations: [ClipNoteComponent, ClipNoteDirective],
383
+ imports: [CommonModule, MatButtonModule, MatIconModule, BidiModule, BuiCommonModule, ObserversModule, IconFontModule],
384
+ exports: [ClipNoteDirective]
385
+ }]
386
+ }] });
387
+
388
+ /**
389
+ * Generated bundle index. Do not edit.
390
+ */
391
+
392
+ export { ClipNoteDirective, ClipNoteModule };
393
+ //# sourceMappingURL=bravura-ui-clip-note.mjs.map