angular-material-wrap 0.1.0-beta.11 → 0.1.0-beta.12
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.
|
@@ -2728,7 +2728,7 @@ class AmwTimepickerComponent extends BaseComponent {
|
|
|
2728
2728
|
}
|
|
2729
2729
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: AmwTimepickerComponent, decorators: [{
|
|
2730
2730
|
type: Component,
|
|
2731
|
-
args: [{ selector: 'amw-timepicker', standalone: true, imports: [FormsModule, MatFormFieldModule, MatInputModule,
|
|
2731
|
+
args: [{ selector: 'amw-timepicker', standalone: true, imports: [FormsModule, MatFormFieldModule, MatInputModule, AmwButtonComponent], encapsulation: ViewEncapsulation.None, host: { 'data-amw-id': 'amw-timepicker' }, providers: [
|
|
2732
2732
|
{
|
|
2733
2733
|
provide: NG_VALUE_ACCESSOR,
|
|
2734
2734
|
useExisting: AmwTimepickerComponent,
|
|
@@ -2788,9 +2788,43 @@ class AmwColorPickerComponent extends BaseComponent {
|
|
|
2788
2788
|
});
|
|
2789
2789
|
}
|
|
2790
2790
|
ngOnInit() {
|
|
2791
|
+
// Inject CDK overlay styles if not already present
|
|
2792
|
+
this.injectCdkOverlayStyles();
|
|
2791
2793
|
this.selectedColor.set(this.value() || '');
|
|
2792
2794
|
this.updateColorFromValue();
|
|
2793
2795
|
}
|
|
2796
|
+
/**
|
|
2797
|
+
* Injects CDK overlay styles into the document head if not already present.
|
|
2798
|
+
* This ensures the overlay works correctly even if consumers don't import
|
|
2799
|
+
* the library's global styles or @angular/cdk/overlay-prebuilt.css.
|
|
2800
|
+
*/
|
|
2801
|
+
injectCdkOverlayStyles() {
|
|
2802
|
+
const styleId = 'amw-cdk-overlay-styles';
|
|
2803
|
+
if (document.getElementById(styleId)) {
|
|
2804
|
+
return;
|
|
2805
|
+
}
|
|
2806
|
+
const styles = `
|
|
2807
|
+
.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}
|
|
2808
|
+
.cdk-overlay-container{position:fixed;z-index:1000}
|
|
2809
|
+
.cdk-overlay-container:empty{display:none}
|
|
2810
|
+
.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}
|
|
2811
|
+
.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%;z-index:1000}
|
|
2812
|
+
.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:transparent;opacity:0;touch-action:manipulation;z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}
|
|
2813
|
+
@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}
|
|
2814
|
+
.cdk-overlay-backdrop-showing{opacity:1}
|
|
2815
|
+
@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}
|
|
2816
|
+
.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}
|
|
2817
|
+
.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}
|
|
2818
|
+
.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}
|
|
2819
|
+
.cdk-overlay-backdrop-noop-animation{transition:none}
|
|
2820
|
+
.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px;z-index:1000}
|
|
2821
|
+
.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
|
|
2822
|
+
`;
|
|
2823
|
+
const styleElement = document.createElement('style');
|
|
2824
|
+
styleElement.id = styleId;
|
|
2825
|
+
styleElement.textContent = styles;
|
|
2826
|
+
document.head.appendChild(styleElement);
|
|
2827
|
+
}
|
|
2794
2828
|
ngOnChanges() {
|
|
2795
2829
|
if (this.value() !== this.selectedColor()) {
|
|
2796
2830
|
this.selectedColor.set(this.value() || '');
|
|
@@ -3116,6 +3150,40 @@ class AmwTooltipDirective {
|
|
|
3116
3150
|
this.elementRef = elementRef;
|
|
3117
3151
|
this.overlay = overlay;
|
|
3118
3152
|
this.injector = injector;
|
|
3153
|
+
// Inject CDK overlay styles if not already present
|
|
3154
|
+
this.injectCdkOverlayStyles();
|
|
3155
|
+
}
|
|
3156
|
+
/**
|
|
3157
|
+
* Injects CDK overlay styles into the document head if not already present.
|
|
3158
|
+
* This ensures the overlay works correctly even if consumers don't import
|
|
3159
|
+
* the library's global styles or @angular/cdk/overlay-prebuilt.css.
|
|
3160
|
+
*/
|
|
3161
|
+
injectCdkOverlayStyles() {
|
|
3162
|
+
const styleId = 'amw-cdk-overlay-styles';
|
|
3163
|
+
if (document.getElementById(styleId)) {
|
|
3164
|
+
return;
|
|
3165
|
+
}
|
|
3166
|
+
const styles = `
|
|
3167
|
+
.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}
|
|
3168
|
+
.cdk-overlay-container{position:fixed;z-index:1000}
|
|
3169
|
+
.cdk-overlay-container:empty{display:none}
|
|
3170
|
+
.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}
|
|
3171
|
+
.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%;z-index:1000}
|
|
3172
|
+
.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:transparent;opacity:0;touch-action:manipulation;z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}
|
|
3173
|
+
@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}
|
|
3174
|
+
.cdk-overlay-backdrop-showing{opacity:1}
|
|
3175
|
+
@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}
|
|
3176
|
+
.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}
|
|
3177
|
+
.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}
|
|
3178
|
+
.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}
|
|
3179
|
+
.cdk-overlay-backdrop-noop-animation{transition:none}
|
|
3180
|
+
.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px;z-index:1000}
|
|
3181
|
+
.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
|
|
3182
|
+
`;
|
|
3183
|
+
const styleElement = document.createElement('style');
|
|
3184
|
+
styleElement.id = styleId;
|
|
3185
|
+
styleElement.textContent = styles;
|
|
3186
|
+
document.head.appendChild(styleElement);
|
|
3119
3187
|
}
|
|
3120
3188
|
ngOnDestroy() {
|
|
3121
3189
|
this.clearTimeouts();
|
|
@@ -6213,7 +6281,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
6213
6281
|
CommonModule,
|
|
6214
6282
|
FormsModule,
|
|
6215
6283
|
AmwButtonComponent,
|
|
6216
|
-
AmwIconComponent,
|
|
6217
6284
|
MatFormFieldModule,
|
|
6218
6285
|
MatInputModule,
|
|
6219
6286
|
MatSelectModule,
|
|
@@ -7670,7 +7737,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
7670
7737
|
CommonModule,
|
|
7671
7738
|
FormsModule,
|
|
7672
7739
|
AmwButtonComponent,
|
|
7673
|
-
AmwIconComponent,
|
|
7674
7740
|
AmwTooltipDirective,
|
|
7675
7741
|
MatMenuModule,
|
|
7676
7742
|
MatCardModule,
|
|
@@ -10598,8 +10664,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
10598
10664
|
type: Component,
|
|
10599
10665
|
args: [{ selector: 'amw-accordion-panel', standalone: true, imports: [
|
|
10600
10666
|
NgTemplateOutlet,
|
|
10601
|
-
MatExpansionModule
|
|
10602
|
-
AmwIconComponent
|
|
10667
|
+
MatExpansionModule
|
|
10603
10668
|
], encapsulation: ViewEncapsulation.None, template: `
|
|
10604
10669
|
<mat-expansion-panel
|
|
10605
10670
|
[expanded]="expanded()"
|
|
@@ -10909,8 +10974,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
10909
10974
|
args: [{ selector: 'amw-menu', standalone: true, imports: [
|
|
10910
10975
|
NgTemplateOutlet,
|
|
10911
10976
|
MatMenuModule,
|
|
10912
|
-
AmwButtonComponent
|
|
10913
|
-
AmwIconComponent
|
|
10977
|
+
AmwButtonComponent
|
|
10914
10978
|
], encapsulation: ViewEncapsulation.None, template: "<div class=\"amw-menu-container\">\n <!-- Custom trigger template -->\n @if (triggerTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"triggerTemplate()!\"\n [matMenuTriggerFor]=\"menu\"\n (menuOpened)=\"onMenuOpened()\"\n (menuClosed)=\"onMenuClosed()\">\n </ng-container>\n } @else {\n <!-- Default trigger button -->\n <amw-button\n [appearance]=\"triggerAppearance()\"\n [icon]=\"triggerIcon()\"\n [iconPosition]=\"triggerLabel() && triggerIcon() ? 'left' : 'left'\"\n [class]=\"triggerButtonClasses()\"\n [color]=\"triggerColor()\"\n [disabled]=\"disabled()\"\n [matMenuTriggerFor]=\"menu\"\n (menuOpened)=\"onMenuOpened()\"\n (menuClosed)=\"onMenuClosed()\">\n @if (triggerLabel()) {\n <span>{{ triggerLabel() }}</span>\n }\n </amw-button>\n }\n\n <!-- Menu content -->\n <mat-menu\n #menu=\"matMenu\"\n [class]=\"menuClasses()\"\n [xPosition]=\"xPosition()\"\n [yPosition]=\"yPosition()\"\n [hasBackdrop]=\"hasBackdrop()\"\n [overlapTrigger]=\"overlapTrigger()\">\n <ng-content></ng-content>\n </mat-menu>\n</div>\n", styles: [".amw-menu-container{display:inline-block}:root{--amw-menu-background: var(--mat-menu-container-color, #ffffff);--amw-menu-text-color: var(--mat-menu-item-label-text-color, rgba(0, 0, 0, .87));--amw-menu-hover-background: var(--mat-menu-item-hover-state-layer-color, rgba(0, 0, 0, .04))}\n"] }]
|
|
10915
10979
|
}], propDecorators: { triggerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerLabel", required: false }] }], triggerIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerIcon", required: false }] }], triggerAppearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerAppearance", required: false }] }], triggerColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerColor", required: false }] }], xPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "xPosition", required: false }] }], yPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "yPosition", required: false }] }], closeOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnClick", required: false }] }], menuClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuClass", required: false }] }], hasBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBackdrop", required: false }] }], overlapTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlapTrigger", required: false }] }], triggerTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerTemplate", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], menuOpened: [{ type: i0.Output, args: ["menuOpened"] }], menuClosed: [{ type: i0.Output, args: ["menuClosed"] }], menuTrigger: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatMenuTrigger), { isSignal: true }] }], menuItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AmwMenuItemComponent), { isSignal: true }] }], matMenu: [{ type: i0.ViewChild, args: ['menu', { isSignal: true }] }] } });
|
|
10916
10980
|
|
|
@@ -11354,12 +11418,49 @@ class AmwPopoverComponent {
|
|
|
11354
11418
|
this.viewContainerRef = viewContainerRef;
|
|
11355
11419
|
}
|
|
11356
11420
|
ngOnInit() {
|
|
11421
|
+
// Inject CDK overlay styles if not already present (fallback for consumers who don't import library styles)
|
|
11422
|
+
this.injectCdkOverlayStyles();
|
|
11357
11423
|
this.initializeConfig();
|
|
11358
11424
|
// Generate unique ID if not provided
|
|
11359
11425
|
if (!this.popoverId()) {
|
|
11360
11426
|
this.generatedPopoverId.set(`amw-popover-${Math.random().toString(36).substr(2, 9)}`);
|
|
11361
11427
|
}
|
|
11362
11428
|
}
|
|
11429
|
+
/**
|
|
11430
|
+
* Injects CDK overlay styles into the document head if not already present.
|
|
11431
|
+
* This ensures the overlay works correctly even if consumers don't import
|
|
11432
|
+
* the library's global styles or @angular/cdk/overlay-prebuilt.css.
|
|
11433
|
+
*/
|
|
11434
|
+
injectCdkOverlayStyles() {
|
|
11435
|
+
const styleId = 'amw-cdk-overlay-styles';
|
|
11436
|
+
if (document.getElementById(styleId)) {
|
|
11437
|
+
return;
|
|
11438
|
+
}
|
|
11439
|
+
const styles = `
|
|
11440
|
+
.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}
|
|
11441
|
+
.cdk-overlay-container{position:fixed;z-index:1000}
|
|
11442
|
+
.cdk-overlay-container:empty{display:none}
|
|
11443
|
+
.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}
|
|
11444
|
+
.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%;z-index:1000}
|
|
11445
|
+
.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:transparent;opacity:0;touch-action:manipulation;z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}
|
|
11446
|
+
@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}
|
|
11447
|
+
.cdk-overlay-backdrop-showing{opacity:1}
|
|
11448
|
+
@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}
|
|
11449
|
+
.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}
|
|
11450
|
+
.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}
|
|
11451
|
+
.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}
|
|
11452
|
+
.cdk-overlay-backdrop-noop-animation{transition:none}
|
|
11453
|
+
.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px;z-index:1000}
|
|
11454
|
+
.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
|
|
11455
|
+
.cdk-overlay-popover{background:none;border:none;padding:0;outline:0;overflow:visible;position:fixed;pointer-events:none;white-space:normal;color:inherit;text-decoration:none;width:100%;height:100%;inset:auto;top:0;left:0}
|
|
11456
|
+
.cdk-overlay-popover::backdrop{display:none}
|
|
11457
|
+
.cdk-overlay-popover .cdk-overlay-backdrop{position:fixed;z-index:auto}
|
|
11458
|
+
`;
|
|
11459
|
+
const styleElement = document.createElement('style');
|
|
11460
|
+
styleElement.id = styleId;
|
|
11461
|
+
styleElement.textContent = styles;
|
|
11462
|
+
document.head.appendChild(styleElement);
|
|
11463
|
+
}
|
|
11363
11464
|
ngAfterContentInit() {
|
|
11364
11465
|
// Use projected templates if input templates are not provided
|
|
11365
11466
|
this.resolvedTriggerTemplate.set(this.triggerTemplate() || this.projectedTriggerTemplate());
|
|
@@ -12091,7 +12192,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
12091
12192
|
args: [{ selector: 'amw-popover', standalone: true, imports: [
|
|
12092
12193
|
CommonModule,
|
|
12093
12194
|
AmwButtonComponent,
|
|
12094
|
-
AmwIconComponent,
|
|
12095
12195
|
MatCardModule,
|
|
12096
12196
|
MatDividerModule,
|
|
12097
12197
|
MatRippleModule,
|