xaml-ui 1.0.30 → 1.0.34
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/fesm2022/xaml-ui.mjs +2003 -1330
- package/fesm2022/xaml-ui.mjs.map +1 -1
- package/lib/Color.d.ts +40 -16
- package/lib/Common.d.ts +3 -2
- package/lib/FrameworkElement.d.ts +3 -1
- package/lib/Math.d.ts +1 -0
- package/lib/basic-input/Button.d.ts +4 -1
- package/lib/basic-input/ColorPicker.d.ts +8 -10
- package/lib/basic-input/ComboBox.d.ts +9 -2
- package/lib/basic-input/DropDownButton.d.ts +1 -1
- package/lib/basic-input/RepeatButton.d.ts +2 -2
- package/lib/basic-input/SplitButton.d.ts +4 -1
- package/lib/layout/StackPanel.d.ts +2 -0
- package/lib/primitives/ColorSpectrum.d.ts +30 -0
- package/lib/primitives/FlyoutBase.d.ts +7 -6
- package/lib/primitives/FlyoutPresenter.d.ts +0 -1
- package/lib/primitives/Selector.d.ts +6 -2
- package/lib/scrolling/ScrollViewer.d.ts +25 -3
- package/lib/status-and-info/ToolTip.d.ts +18 -0
- package/lib/status-and-info/ToolTipService.d.ts +32 -2
- package/lib/text/NumberBox.d.ts +4 -2
- package/lib/text/TextBox.d.ts +1 -0
- package/package.json +2 -1
- package/public-api.d.ts +2 -0
package/fesm2022/xaml-ui.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { HostBinding, Input, Component, EventEmitter, HostListener, ContentChild, Output, ViewChild,
|
|
2
|
+
import { HostBinding, Input, Component, EventEmitter, HostListener, ContentChild, Output, ViewChild, Directive, NgModule, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation, Optional, ViewContainerRef, Renderer2 } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { CommonModule, NgTemplateOutlet } from '@angular/common';
|
|
5
5
|
import { CdkScrollable } from '@angular/cdk/scrolling';
|
|
6
6
|
import { trigger, transition, animate, keyframes, style } from '@angular/animations';
|
|
7
7
|
import * as i1$1 from '@angular/cdk/overlay';
|
|
8
8
|
import { OverlayConfig, Overlay } from '@angular/cdk/overlay';
|
|
9
|
-
import { TemplatePortal } from '@angular/cdk/portal';
|
|
9
|
+
import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
|
|
10
10
|
|
|
11
|
-
function
|
|
11
|
+
function ToJustification(value) {
|
|
12
12
|
return value.toLowerCase();
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function ToAlignment(value) {
|
|
15
15
|
switch (value) {
|
|
16
16
|
case 'Top':
|
|
17
17
|
return 'flex-start';
|
|
@@ -37,33 +37,33 @@ class FrameworkElementComponent {
|
|
|
37
37
|
this._id = FrameworkElementComponent._nextId++;
|
|
38
38
|
}
|
|
39
39
|
get overflow() {
|
|
40
|
-
return '
|
|
40
|
+
return undefined; //'clip';
|
|
41
41
|
}
|
|
42
42
|
get minWidth() {
|
|
43
|
-
|
|
44
|
-
return this.MinWidth;
|
|
45
|
-
return this.MaxWidth === undefined && this.HorizontalAlignment === 'Stretch' ? 'fit-content' : undefined;
|
|
43
|
+
return this.MinWidth;
|
|
46
44
|
}
|
|
47
45
|
get minHeight() {
|
|
48
|
-
|
|
49
|
-
return this.MinHeight;
|
|
50
|
-
return this.MaxHeight === undefined && this.VerticalAlignment === 'Stretch' ? 'fit-content' : undefined;
|
|
46
|
+
return this.MinHeight;
|
|
51
47
|
}
|
|
52
48
|
get width() {
|
|
53
|
-
|
|
54
|
-
return this.Width;
|
|
55
|
-
return this.HorizontalAlignment === 'Stretch' ? undefined : 'fit-content';
|
|
49
|
+
return this.Width;
|
|
56
50
|
}
|
|
57
51
|
get height() {
|
|
58
|
-
|
|
59
|
-
return this.Height;
|
|
60
|
-
return this.VerticalAlignment === 'Stretch' ? undefined : 'fit-content';
|
|
52
|
+
return this.Height;
|
|
61
53
|
}
|
|
62
54
|
get justifySelf() {
|
|
63
|
-
return
|
|
55
|
+
return ToJustification(this.HorizontalAlignment);
|
|
64
56
|
}
|
|
65
57
|
get alignSelf() {
|
|
66
|
-
return
|
|
58
|
+
return ToAlignment(this.VerticalAlignment);
|
|
59
|
+
}
|
|
60
|
+
//True on Safari and on the other WebKit based browsers of Apple platforms, which share its layout
|
|
61
|
+
//engine. Evaluated once, as host bindings are re-read on every change detection pass.
|
|
62
|
+
static get IsSafari() {
|
|
63
|
+
if (this._isSafari === undefined) {
|
|
64
|
+
this._isSafari = typeof navigator !== 'undefined' && /apple/i.test(navigator.vendor ?? '');
|
|
65
|
+
}
|
|
66
|
+
return this._isSafari;
|
|
67
67
|
}
|
|
68
68
|
static { this._nextId = 1; }
|
|
69
69
|
static { this.DefaultStyles = `:host {
|
|
@@ -251,7 +251,7 @@ class TextBlockComponent extends FrameworkElementComponent {
|
|
|
251
251
|
case 'Clip':
|
|
252
252
|
return 'clip';
|
|
253
253
|
case 'CharacterEllipsis':
|
|
254
|
-
return '
|
|
254
|
+
return 'ellipsis';
|
|
255
255
|
default:
|
|
256
256
|
return undefined;
|
|
257
257
|
}
|
|
@@ -334,8 +334,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
334
334
|
args: ['style.white-space']
|
|
335
335
|
}] } });
|
|
336
336
|
|
|
337
|
-
const ButtonTemplate = `<
|
|
338
|
-
<
|
|
337
|
+
const ButtonTemplate = `<TextBlock *ngIf="Content !== undefined" [Text]="Content"/>
|
|
338
|
+
<ng-content/>`;
|
|
339
339
|
class ButtonComponent extends BorderComponent {
|
|
340
340
|
constructor() {
|
|
341
341
|
super(...arguments);
|
|
@@ -344,12 +344,20 @@ class ButtonComponent extends BorderComponent {
|
|
|
344
344
|
this.HorizontalContentAlignment = 'Center';
|
|
345
345
|
this.VerticalContentAlignment = 'Center';
|
|
346
346
|
this.type = 'button';
|
|
347
|
+
this.isPressed = false;
|
|
347
348
|
}
|
|
348
349
|
get alignContent() {
|
|
349
|
-
return
|
|
350
|
+
return ToAlignment(this.VerticalContentAlignment);
|
|
350
351
|
}
|
|
351
352
|
get justifyContent() {
|
|
352
|
-
return
|
|
353
|
+
return ToJustification(this.HorizontalContentAlignment);
|
|
354
|
+
}
|
|
355
|
+
onPointerDown(event) {
|
|
356
|
+
if (this.IsEnabled && event.button === 0)
|
|
357
|
+
this.isPressed = true;
|
|
358
|
+
}
|
|
359
|
+
onPointerUp(event) {
|
|
360
|
+
this.isPressed = false;
|
|
353
361
|
}
|
|
354
362
|
get disabled() {
|
|
355
363
|
return this.IsEnabled ? undefined : true;
|
|
@@ -364,11 +372,11 @@ class ButtonComponent extends BorderComponent {
|
|
|
364
372
|
this._flyout?.Show();
|
|
365
373
|
}
|
|
366
374
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
367
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ButtonComponent, isStandalone: true, selector: "Button", inputs: { IsEnabled: "IsEnabled", Content: "Content", HorizontalContentAlignment: "HorizontalContentAlignment", VerticalContentAlignment: "VerticalContentAlignment" }, outputs: { Click: "Click" }, host: { listeners: { "click": "onClick($event)" }, properties: { "style.align-content": "this.alignContent", "style.justify-content": "this.justifyContent", "attr.type": "this.type", "attr.disabled": "this.disabled", "class.disabled": "this.disabled", "class.flyout-open": "this.flyoutOpen" } }, queries: [{ propertyName: "_flyout", first: true, predicate: ["xaml-flyout"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<
|
|
375
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ButtonComponent, isStandalone: true, selector: "Button", inputs: { IsEnabled: "IsEnabled", Content: "Content", HorizontalContentAlignment: "HorizontalContentAlignment", VerticalContentAlignment: "VerticalContentAlignment" }, outputs: { Click: "Click" }, host: { listeners: { "pointerdown": "onPointerDown($event)", "pointerup": "onPointerUp($event)", "pointercancel": "onPointerUp($event)", "pointerleave": "onPointerUp($event)", "click": "onClick($event)" }, properties: { "style.align-content": "this.alignContent", "style.justify-content": "this.justifyContent", "attr.type": "this.type", "class.pressed": "this.isPressed", "attr.disabled": "this.disabled", "class.disabled": "this.disabled", "class.flyout-open": "this.flyoutOpen" } }, queries: [{ propertyName: "_flyout", first: true, predicate: ["xaml-flyout"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<TextBlock *ngIf=\"Content !== undefined\" [Text]=\"Content\"/>\n <ng-content/>", isInline: true, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TextBlockComponent, selector: "TextBlock", inputs: ["FontFamily", "Text", "FontSize", "FontStyle", "FontWeight", "Foreground", "TextAlignment", "IsTextSelectionEnabled", "TextDecorations", "TextTrimming", "TextWrapping"] }] }); }
|
|
368
376
|
}
|
|
369
377
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
370
378
|
type: Component,
|
|
371
|
-
args: [{ selector: 'Button', imports: [CommonModule, TextBlockComponent], template: ButtonTemplate, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked):
|
|
379
|
+
args: [{ selector: 'Button', imports: [CommonModule, TextBlockComponent], template: ButtonTemplate, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n"] }]
|
|
372
380
|
}], propDecorators: { IsEnabled: [{
|
|
373
381
|
type: Input
|
|
374
382
|
}], Content: [{
|
|
@@ -388,6 +396,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
388
396
|
}], type: [{
|
|
389
397
|
type: HostBinding,
|
|
390
398
|
args: ['attr.type']
|
|
399
|
+
}], isPressed: [{
|
|
400
|
+
type: HostBinding,
|
|
401
|
+
args: ['class.pressed']
|
|
402
|
+
}], onPointerDown: [{
|
|
403
|
+
type: HostListener,
|
|
404
|
+
args: ['pointerdown', ['$event']]
|
|
405
|
+
}], onPointerUp: [{
|
|
406
|
+
type: HostListener,
|
|
407
|
+
args: ['pointerup', ['$event']]
|
|
408
|
+
}, {
|
|
409
|
+
type: HostListener,
|
|
410
|
+
args: ['pointercancel', ['$event']]
|
|
411
|
+
}, {
|
|
412
|
+
type: HostListener,
|
|
413
|
+
args: ['pointerleave', ['$event']]
|
|
391
414
|
}], disabled: [{
|
|
392
415
|
type: HostBinding,
|
|
393
416
|
args: ['attr.disabled']
|
|
@@ -413,13 +436,13 @@ class HyperlinkButtonComponent extends ButtonComponent {
|
|
|
413
436
|
}
|
|
414
437
|
}
|
|
415
438
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: HyperlinkButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
416
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: HyperlinkButtonComponent, isStandalone: true, selector: "HyperlinkButton", inputs: { NavigateUri: "NavigateUri" }, host: { classAttribute: "HyperlinkButtonStyle" }, usesInheritance: true, ngImport: i0, template: "<
|
|
439
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: HyperlinkButtonComponent, isStandalone: true, selector: "HyperlinkButton", inputs: { NavigateUri: "NavigateUri" }, host: { classAttribute: "HyperlinkButtonStyle" }, usesInheritance: true, ngImport: i0, template: "<TextBlock *ngIf=\"Content !== undefined\" [Text]=\"Content\"/>\n <ng-content/>", isInline: true, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TextBlockComponent, selector: "TextBlock", inputs: ["FontFamily", "Text", "FontSize", "FontStyle", "FontWeight", "Foreground", "TextAlignment", "IsTextSelectionEnabled", "TextDecorations", "TextTrimming", "TextWrapping"] }] }); }
|
|
417
440
|
}
|
|
418
441
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: HyperlinkButtonComponent, decorators: [{
|
|
419
442
|
type: Component,
|
|
420
443
|
args: [{ selector: 'HyperlinkButton', standalone: true, imports: [CommonModule, TextBlockComponent], template: ButtonTemplate, host: {
|
|
421
444
|
'class': 'HyperlinkButtonStyle'
|
|
422
|
-
}, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked):
|
|
445
|
+
}, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n"] }]
|
|
423
446
|
}], propDecorators: { NavigateUri: [{
|
|
424
447
|
type: Input
|
|
425
448
|
}] } });
|
|
@@ -465,1493 +488,1921 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
465
488
|
type: Output
|
|
466
489
|
}] } });
|
|
467
490
|
|
|
468
|
-
function
|
|
469
|
-
return
|
|
470
|
-
}
|
|
471
|
-
function stringToColor(value) {
|
|
472
|
-
return parseInt(value.replace('#', ''), 16);
|
|
473
|
-
}
|
|
474
|
-
function colorToRgb(value) {
|
|
475
|
-
return {
|
|
476
|
-
r: value >> 16 & 0xff,
|
|
477
|
-
g: value >> 8 & 0xff,
|
|
478
|
-
b: value & 0xff,
|
|
479
|
-
a: value >> 24 & 0xff
|
|
480
|
-
};
|
|
481
|
-
}
|
|
482
|
-
function rgbToHsl(rgb) {
|
|
483
|
-
const { r: r255, g: g255, b: b255, a: a255 } = rgb;
|
|
484
|
-
const r = r255 / 255;
|
|
485
|
-
const g = g255 / 255;
|
|
486
|
-
const b = b255 / 255;
|
|
487
|
-
const a = a255 / 255;
|
|
488
|
-
let max = Math.max(r, g, b);
|
|
489
|
-
let min = Math.min(r, g, b);
|
|
490
|
-
let h = (max + min) / 2;
|
|
491
|
-
let s = h;
|
|
492
|
-
let l = h;
|
|
493
|
-
if (max === min) {
|
|
494
|
-
// Achromatic
|
|
495
|
-
return { h: 0, s: 0, l: l * 100, a: a * 100 };
|
|
496
|
-
}
|
|
497
|
-
const d = max - min;
|
|
498
|
-
s = l >= 0.5 ? d / (2 - (max + min)) : d / (max + min);
|
|
499
|
-
switch (max) {
|
|
500
|
-
case r:
|
|
501
|
-
h = ((g - b) / d + 0) * 60;
|
|
502
|
-
break;
|
|
503
|
-
case g:
|
|
504
|
-
h = ((b - r) / d + 2) * 60;
|
|
505
|
-
break;
|
|
506
|
-
case b:
|
|
507
|
-
h = ((r - g) / d + 4) * 60;
|
|
508
|
-
break;
|
|
509
|
-
}
|
|
510
|
-
return { h, s: s * 100, l: l * 100, a: a * 100 };
|
|
491
|
+
function AreNearEqual(a, b, tolerance) {
|
|
492
|
+
return Math.abs(a - b) < tolerance;
|
|
511
493
|
}
|
|
512
494
|
|
|
513
|
-
|
|
495
|
+
//A Color as #aarrggbb. Unsigned first, or a colour with the top alpha bit set
|
|
496
|
+
//would format as its negative.
|
|
497
|
+
function FormatColor(value) {
|
|
498
|
+
return '#' + (value >>> 0).toString(16).padStart(8, '0');
|
|
499
|
+
}
|
|
500
|
+
function ParseColor(value) {
|
|
501
|
+
return parseInt(value.replace('#', ''), 16) >>> 0;
|
|
502
|
+
}
|
|
503
|
+
//Half a step of the 8 bit form every color ends up in: two colors closer than
|
|
504
|
+
//this round to the same bytes and so cannot be told apart once rendered.
|
|
505
|
+
const ColorTolerance = 0.5;
|
|
506
|
+
const HueTolerance = ColorTolerance / 255;
|
|
507
|
+
//Hue is an angle, so 0.999 and 0.001 are all but the same place on the wheel.
|
|
508
|
+
function AreHueNearEqual(a, b) {
|
|
509
|
+
let difference = Math.abs(a - b) % 1;
|
|
510
|
+
return Math.min(difference, 1 - difference) < HueTolerance;
|
|
511
|
+
}
|
|
512
|
+
//Color with 0..255 channels, the unpacked form of a 0xAARRGGBB Color.
|
|
513
|
+
class ColorRgba {
|
|
514
|
+
constructor(R, G, B, A) {
|
|
515
|
+
this.R = R;
|
|
516
|
+
this.G = G;
|
|
517
|
+
this.B = B;
|
|
518
|
+
this.A = A;
|
|
519
|
+
}
|
|
520
|
+
ToNumber() {
|
|
521
|
+
//Unsigned: a top bit set in the alpha byte would otherwise make this negative.
|
|
522
|
+
return ((this.A << 24) | (this.R << 16) | (this.G << 8) | this.B) >>> 0;
|
|
523
|
+
}
|
|
524
|
+
static FromNumber(value) {
|
|
525
|
+
let a = (value >> 24) & 0xff;
|
|
526
|
+
let r = (value >> 16) & 0xff;
|
|
527
|
+
let g = (value >> 8) & 0xff;
|
|
528
|
+
let b = value & 0xff;
|
|
529
|
+
return new ColorRgba(r, g, b, a);
|
|
530
|
+
}
|
|
531
|
+
Clone() {
|
|
532
|
+
return new ColorRgba(this.R, this.G, this.B, this.A);
|
|
533
|
+
}
|
|
534
|
+
static AreNearEqual(a, b) {
|
|
535
|
+
return AreNearEqual(a.R, b.R, ColorTolerance)
|
|
536
|
+
&& AreNearEqual(a.G, b.G, ColorTolerance)
|
|
537
|
+
&& AreNearEqual(a.B, b.B, ColorTolerance)
|
|
538
|
+
&& AreNearEqual(a.A, b.A, ColorTolerance);
|
|
539
|
+
}
|
|
540
|
+
ToHsla() {
|
|
541
|
+
return ColorHsla.FromRgba(this);
|
|
542
|
+
}
|
|
543
|
+
ToHsva() {
|
|
544
|
+
return ColorHsva.FromRgba(this);
|
|
545
|
+
}
|
|
546
|
+
ToString() {
|
|
547
|
+
return `rgba(${this.R}, ${this.G}, ${this.B}, ${this.A / 255})`;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
//Color in hue/saturation/lightness form; every channel, hue included, is 0..1.
|
|
551
|
+
class ColorHsla {
|
|
552
|
+
constructor(H, S, L, A) {
|
|
553
|
+
this.H = H;
|
|
554
|
+
this.S = S;
|
|
555
|
+
this.L = L;
|
|
556
|
+
this.A = A;
|
|
557
|
+
}
|
|
558
|
+
static FromRgba(rgba) {
|
|
559
|
+
let r = rgba.R / 255;
|
|
560
|
+
let g = rgba.G / 255;
|
|
561
|
+
let b = rgba.B / 255;
|
|
562
|
+
let a = rgba.A / 255;
|
|
563
|
+
let max = Math.max(r, g, b);
|
|
564
|
+
let min = Math.min(r, g, b);
|
|
565
|
+
let h = 0;
|
|
566
|
+
let s = 0;
|
|
567
|
+
let l = (max + min) / 2;
|
|
568
|
+
if (max !== min) {
|
|
569
|
+
let d = max - min;
|
|
570
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
571
|
+
switch (max) {
|
|
572
|
+
case r:
|
|
573
|
+
h = (g - b) / d + (g < b ? 6 : 0);
|
|
574
|
+
break;
|
|
575
|
+
case g:
|
|
576
|
+
h = (b - r) / d + 2;
|
|
577
|
+
break;
|
|
578
|
+
case b:
|
|
579
|
+
h = (r - g) / d + 4;
|
|
580
|
+
break;
|
|
581
|
+
}
|
|
582
|
+
h /= 6;
|
|
583
|
+
}
|
|
584
|
+
return new ColorHsla(h, s, l, a);
|
|
585
|
+
}
|
|
586
|
+
ToRgba() {
|
|
587
|
+
let h = this.H;
|
|
588
|
+
let s = this.S;
|
|
589
|
+
let l = this.L;
|
|
590
|
+
let a = this.A;
|
|
591
|
+
let r, g, b;
|
|
592
|
+
if (s === 0) {
|
|
593
|
+
r = g = b = l; //achromatic
|
|
594
|
+
}
|
|
595
|
+
else {
|
|
596
|
+
const hue2rgb = (p, q, t) => {
|
|
597
|
+
if (t < 0)
|
|
598
|
+
t += 1;
|
|
599
|
+
if (t > 1)
|
|
600
|
+
t -= 1;
|
|
601
|
+
if (t < 1 / 6)
|
|
602
|
+
return p + (q - p) * 6 * t;
|
|
603
|
+
if (t < 1 / 2)
|
|
604
|
+
return q;
|
|
605
|
+
if (t < 2 / 3)
|
|
606
|
+
return p + (q - p) * (2 / 3 - t) * 6;
|
|
607
|
+
return p;
|
|
608
|
+
};
|
|
609
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
610
|
+
const p = 2 * l - q;
|
|
611
|
+
r = hue2rgb(p, q, h + 1 / 3);
|
|
612
|
+
g = hue2rgb(p, q, h);
|
|
613
|
+
b = hue2rgb(p, q, h - 1 / 3);
|
|
614
|
+
}
|
|
615
|
+
return new ColorRgba(Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), Math.round(a * 255));
|
|
616
|
+
}
|
|
617
|
+
Clone() {
|
|
618
|
+
return new ColorHsla(this.H, this.S, this.L, this.A);
|
|
619
|
+
}
|
|
620
|
+
//Use this rather than ===; see ColorRgba.AreNearEqual.
|
|
621
|
+
static AreNearEqual(a, b) {
|
|
622
|
+
return AreHueNearEqual(a.H, b.H)
|
|
623
|
+
&& AreNearEqual(a.S, b.S, HueTolerance)
|
|
624
|
+
&& AreNearEqual(a.L, b.L, HueTolerance)
|
|
625
|
+
&& AreNearEqual(a.A, b.A, HueTolerance);
|
|
626
|
+
}
|
|
627
|
+
ToString() {
|
|
628
|
+
return `hsla(${this.H * 360}, ${this.S * 100}%, ${this.L * 100}%, ${this.A})`;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
//Color in hue/saturation/value form; every channel, hue included, is 0..1.
|
|
632
|
+
class ColorHsva {
|
|
633
|
+
constructor(H, S, V, A) {
|
|
634
|
+
this.H = H;
|
|
635
|
+
this.S = S;
|
|
636
|
+
this.V = V;
|
|
637
|
+
this.A = A;
|
|
638
|
+
}
|
|
639
|
+
static FromRgba(rgba) {
|
|
640
|
+
let r = rgba.R / 255;
|
|
641
|
+
let g = rgba.G / 255;
|
|
642
|
+
let b = rgba.B / 255;
|
|
643
|
+
let a = rgba.A / 255;
|
|
644
|
+
let max = Math.max(r, g, b);
|
|
645
|
+
let min = Math.min(r, g, b);
|
|
646
|
+
let d = max - min;
|
|
647
|
+
let h = 0;
|
|
648
|
+
if (d !== 0) {
|
|
649
|
+
switch (max) {
|
|
650
|
+
case r:
|
|
651
|
+
h = (g - b) / d + (g < b ? 6 : 0);
|
|
652
|
+
break;
|
|
653
|
+
case g:
|
|
654
|
+
h = (b - r) / d + 2;
|
|
655
|
+
break;
|
|
656
|
+
case b:
|
|
657
|
+
h = (r - g) / d + 4;
|
|
658
|
+
break;
|
|
659
|
+
}
|
|
660
|
+
h /= 6;
|
|
661
|
+
}
|
|
662
|
+
return new ColorHsva(h, max === 0 ? 0 : d / max, max, a);
|
|
663
|
+
}
|
|
664
|
+
ToRgba() {
|
|
665
|
+
let sector = this.H * 6;
|
|
666
|
+
//Wrap so a hue of exactly 1 lands back on sector 0 rather than off the end.
|
|
667
|
+
let index = Math.floor(sector) % 6;
|
|
668
|
+
let offset = sector - Math.floor(sector);
|
|
669
|
+
let v = this.V;
|
|
670
|
+
let p = v * (1 - this.S);
|
|
671
|
+
let q = v * (1 - offset * this.S);
|
|
672
|
+
let t = v * (1 - (1 - offset) * this.S);
|
|
673
|
+
let rgb = [[v, t, p], [q, v, p], [p, v, t], [p, q, v], [t, p, v], [v, p, q]][index];
|
|
674
|
+
return new ColorRgba(Math.round(rgb[0] * 255), Math.round(rgb[1] * 255), Math.round(rgb[2] * 255), Math.round(this.A * 255));
|
|
675
|
+
}
|
|
676
|
+
Clone() {
|
|
677
|
+
return new ColorHsva(this.H, this.S, this.V, this.A);
|
|
678
|
+
}
|
|
679
|
+
static AreNearEqual(a, b) {
|
|
680
|
+
return AreHueNearEqual(a.H, b.H)
|
|
681
|
+
&& AreNearEqual(a.S, b.S, HueTolerance)
|
|
682
|
+
&& AreNearEqual(a.V, b.V, HueTolerance)
|
|
683
|
+
&& AreNearEqual(a.A, b.A, HueTolerance);
|
|
684
|
+
}
|
|
685
|
+
ToString() {
|
|
686
|
+
return this.ToRgba().ToString();
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
class ColorSpectrumComponent extends FrameworkElementComponent {
|
|
514
691
|
constructor() {
|
|
515
692
|
super(...arguments);
|
|
516
|
-
this._color =
|
|
693
|
+
this._color = new ColorHsva(0, 0, 1, 1);
|
|
694
|
+
this.HsvColorChange = new EventEmitter();
|
|
517
695
|
this.ColorChange = new EventEmitter();
|
|
518
696
|
}
|
|
519
|
-
|
|
520
|
-
|
|
697
|
+
//The selected color in HSV color space, full precision floating point.
|
|
698
|
+
get HsvColor() {
|
|
699
|
+
return this._color.Clone();
|
|
521
700
|
}
|
|
522
|
-
set
|
|
523
|
-
|
|
701
|
+
set HsvColor(value) {
|
|
702
|
+
if (ColorHsva.AreNearEqual(value, this._color))
|
|
703
|
+
return;
|
|
704
|
+
let previousColor = this.Color;
|
|
705
|
+
//Cloned in both directions, so a caller cannot reach in and change the stored
|
|
706
|
+
//color afterwards without coming back through here.
|
|
707
|
+
this._color = value.Clone();
|
|
524
708
|
this.updateSelectorPosition();
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
709
|
+
this.HsvColorChange.emit(this.HsvColor);
|
|
710
|
+
//Color moves less often than HsvColor, because many HSVA states share one
|
|
711
|
+
//Color: at zero brightness every hue is black, so a drag there moves the
|
|
712
|
+
//selector and reports HsvColor, but leaves Color exactly where it was.
|
|
713
|
+
let color = this.Color;
|
|
714
|
+
if (color === previousColor)
|
|
528
715
|
return;
|
|
529
|
-
this.
|
|
530
|
-
this.ColorChange.emit(value);
|
|
716
|
+
this.ColorChange.emit(color);
|
|
531
717
|
}
|
|
718
|
+
//The selected color as 0xAARRGGBB, brightness and alpha included.
|
|
719
|
+
get Color() {
|
|
720
|
+
return this._color.ToRgba().ToNumber();
|
|
721
|
+
}
|
|
722
|
+
set Color(value) {
|
|
723
|
+
if (value === this.Color)
|
|
724
|
+
return;
|
|
725
|
+
this.HsvColor = ColorRgba.FromNumber(value).ToHsva();
|
|
726
|
+
}
|
|
727
|
+
//The value channel, 0..1. Dims the wheel, and darkens Color with it.
|
|
728
|
+
get Brightness() {
|
|
729
|
+
return this._color.V;
|
|
730
|
+
}
|
|
731
|
+
set Brightness(value) {
|
|
732
|
+
let color = this.HsvColor;
|
|
733
|
+
color.V = value;
|
|
734
|
+
this.HsvColor = color;
|
|
735
|
+
}
|
|
736
|
+
//The alpha channel, 0..1. Fades the wheel over the checkerboard, and Color with it.
|
|
737
|
+
get Alpha() {
|
|
738
|
+
return this._color.A;
|
|
739
|
+
}
|
|
740
|
+
set Alpha(value) {
|
|
741
|
+
let color = this.HsvColor;
|
|
742
|
+
color.A = value;
|
|
743
|
+
this.HsvColor = color;
|
|
744
|
+
}
|
|
745
|
+
//The wheel is inset from the control's edge by this many px. The whole square
|
|
746
|
+
//is clickable (clicks outside the wheel clamp to the rim) and the inset gives
|
|
747
|
+
//the selector room so it never spills outside the host's overflow:hidden.
|
|
748
|
+
static { this._selectorInset = 8; }
|
|
749
|
+
get selectorInset() { return ColorSpectrumComponent._selectorInset; }
|
|
750
|
+
get ringSize() { return this.Width ?? this.Height ?? '300px'; }
|
|
751
|
+
get center() { return this._ring.nativeElement.clientWidth / 2; }
|
|
752
|
+
get radius() { return this.center - ColorSpectrumComponent._selectorInset; }
|
|
532
753
|
ngAfterViewInit() {
|
|
533
|
-
let canvas = this._canvas.nativeElement;
|
|
534
|
-
canvas.width = parseInt(this.Width ?? '300');
|
|
535
|
-
canvas.height = parseInt(this.Height ?? '300');
|
|
536
|
-
let context = this._context = canvas.getContext('2d', { willReadFrequently: true });
|
|
537
|
-
let radius = canvas.width / 2;
|
|
538
|
-
// Draw hue circle
|
|
539
|
-
for (let angle = 0; angle < 360; angle++) {
|
|
540
|
-
let startAngle = (angle - 1) * (Math.PI / 180);
|
|
541
|
-
let endAngle = (angle + 1) * (Math.PI / 180);
|
|
542
|
-
context.beginPath();
|
|
543
|
-
context.moveTo(radius, radius);
|
|
544
|
-
context.arc(radius, radius, radius * 2, startAngle, endAngle);
|
|
545
|
-
context.closePath();
|
|
546
|
-
context.fillStyle = `hsl(${angle}, 100%, 50%)`;
|
|
547
|
-
context.fill();
|
|
548
|
-
}
|
|
549
|
-
// Add radial gradient for saturation
|
|
550
|
-
let gradient = context.createRadialGradient(radius, radius, 0, radius, radius, radius);
|
|
551
|
-
gradient.addColorStop(0, 'white');
|
|
552
|
-
gradient.addColorStop(1, 'transparent');
|
|
553
|
-
context.fillStyle = gradient;
|
|
554
|
-
context.fillRect(0, 0, canvas.width, canvas.height);
|
|
555
|
-
// Position sample
|
|
556
754
|
this.updateSelectorPosition();
|
|
557
755
|
}
|
|
558
756
|
onPointerDown(event) {
|
|
559
|
-
|
|
757
|
+
if (event.button !== 0)
|
|
758
|
+
return; //left button only
|
|
759
|
+
this._ring.nativeElement.setPointerCapture(event.pointerId);
|
|
560
760
|
this.onPointerMove(event);
|
|
561
761
|
}
|
|
562
762
|
onPointerMove(event) {
|
|
563
|
-
if (!this.
|
|
763
|
+
if (!this._ring.nativeElement.hasPointerCapture(event.pointerId))
|
|
564
764
|
return;
|
|
565
|
-
let
|
|
566
|
-
let
|
|
567
|
-
let
|
|
568
|
-
let
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
this._selector.nativeElement.style.left = sampleX + 'px';
|
|
573
|
-
this._selector.nativeElement.style.top = sampleY + 'px';
|
|
574
|
-
let imageData = this._context.getImageData(sampleX, sampleY, 1, 1).data;
|
|
575
|
-
let [r, g, b] = imageData;
|
|
576
|
-
let color = ((0xff << 24) + (r << 16) + (g << 8) + b) >>> 0;
|
|
577
|
-
this.setColor(color);
|
|
765
|
+
let center = this.center;
|
|
766
|
+
let x = event.offsetX - center;
|
|
767
|
+
let y = event.offsetY - center;
|
|
768
|
+
let color = this.HsvColor;
|
|
769
|
+
color.H = (Math.atan2(y, x) / (2 * Math.PI) + 1) % 1;
|
|
770
|
+
color.S = Math.min(Math.sqrt(x * x + y * y) / this.radius, 1);
|
|
771
|
+
this.HsvColor = color;
|
|
578
772
|
}
|
|
579
773
|
updateSelectorPosition() {
|
|
580
|
-
if (!this.
|
|
774
|
+
if (!this._ring)
|
|
581
775
|
return;
|
|
582
|
-
let
|
|
583
|
-
let
|
|
584
|
-
let
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
776
|
+
let center = this.center;
|
|
777
|
+
let angle = this._color.H * 2 * Math.PI;
|
|
778
|
+
let length = this._color.S * this.radius;
|
|
779
|
+
this._selector.nativeElement.style.left = center + Math.cos(angle) * length + 'px';
|
|
780
|
+
this._selector.nativeElement.style.top = center + Math.sin(angle) * length + 'px';
|
|
781
|
+
}
|
|
782
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ColorSpectrumComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
783
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ColorSpectrumComponent, isStandalone: true, selector: "ColorSpectrum", inputs: { Color: "Color", Brightness: "Brightness", Alpha: "Alpha" }, outputs: { HsvColorChange: "HsvColorChange", ColorChange: "ColorChange" }, viewQueries: [{ propertyName: "_ring", first: true, predicate: ["ring"], descendants: true }, { propertyName: "_selector", first: true, predicate: ["selector"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<div #ring class="ring" [style.width]="ringSize" [style.height]="ringSize"
|
|
784
|
+
(pointerdown)="onPointerDown($event)" (pointermove)="onPointerMove($event)">
|
|
785
|
+
<div class="checkerboard" [style.inset.px]="selectorInset"></div>
|
|
786
|
+
<div class="wheel" [style.inset.px]="selectorInset"
|
|
787
|
+
[style.opacity]="Alpha" [style.filter]="'brightness(' + Brightness + ')'"></div>
|
|
788
|
+
<div #selector class="selector"></div>
|
|
789
|
+
</div>`, isInline: true, styles: [":host{display:block;line-height:0}.ring{position:relative;touch-action:none}.checkerboard,.wheel{position:absolute;border-radius:50%;pointer-events:none}.checkerboard{background:conic-gradient(from 90deg,#ccc 25%,#fff 0 50%,#ccc 0 75%,#fff 0) 0 0/16px 16px}.wheel{background:radial-gradient(circle closest-side,#fff,#fff0),conic-gradient(from 90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.selector{position:absolute;pointer-events:none;transform:translate(-50%,-50%);width:10px;height:10px;border-color:#fff;border-width:2px;border-style:solid;border-radius:10px;mix-blend-mode:difference}\n"] }); }
|
|
790
|
+
}
|
|
791
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ColorSpectrumComponent, decorators: [{
|
|
596
792
|
type: Component,
|
|
597
|
-
args: [{ selector: '
|
|
598
|
-
|
|
793
|
+
args: [{ selector: 'ColorSpectrum', template: `<div #ring class="ring" [style.width]="ringSize" [style.height]="ringSize"
|
|
794
|
+
(pointerdown)="onPointerDown($event)" (pointermove)="onPointerMove($event)">
|
|
795
|
+
<div class="checkerboard" [style.inset.px]="selectorInset"></div>
|
|
796
|
+
<div class="wheel" [style.inset.px]="selectorInset"
|
|
797
|
+
[style.opacity]="Alpha" [style.filter]="'brightness(' + Brightness + ')'"></div>
|
|
798
|
+
<div #selector class="selector"></div>
|
|
799
|
+
</div>`, styles: [":host{display:block;line-height:0}.ring{position:relative;touch-action:none}.checkerboard,.wheel{position:absolute;border-radius:50%;pointer-events:none}.checkerboard{background:conic-gradient(from 90deg,#ccc 25%,#fff 0 50%,#ccc 0 75%,#fff 0) 0 0/16px 16px}.wheel{background:radial-gradient(circle closest-side,#fff,#fff0),conic-gradient(from 90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.selector{position:absolute;pointer-events:none;transform:translate(-50%,-50%);width:10px;height:10px;border-color:#fff;border-width:2px;border-style:solid;border-radius:10px;mix-blend-mode:difference}\n"] }]
|
|
800
|
+
}], propDecorators: { HsvColorChange: [{
|
|
801
|
+
type: Output
|
|
802
|
+
}], Color: [{
|
|
599
803
|
type: Input
|
|
600
804
|
}], ColorChange: [{
|
|
601
805
|
type: Output
|
|
602
|
-
}],
|
|
806
|
+
}], Brightness: [{
|
|
807
|
+
type: Input
|
|
808
|
+
}], Alpha: [{
|
|
809
|
+
type: Input
|
|
810
|
+
}], _ring: [{
|
|
603
811
|
type: ViewChild,
|
|
604
|
-
args: ['
|
|
812
|
+
args: ['ring']
|
|
605
813
|
}], _selector: [{
|
|
606
814
|
type: ViewChild,
|
|
607
815
|
args: ['selector']
|
|
608
816
|
}] } });
|
|
609
817
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
return !this.IsEnabled;
|
|
623
|
-
}
|
|
624
|
-
get ItemSource() {
|
|
625
|
-
return this._itemSource;
|
|
818
|
+
class SliderComponent extends FrameworkElementComponent {
|
|
819
|
+
static { this._thumbRadius = 8; }
|
|
820
|
+
constructor(_renderer) {
|
|
821
|
+
super();
|
|
822
|
+
this._renderer = _renderer;
|
|
823
|
+
this.Minimum = 0.0;
|
|
824
|
+
this.Maximum = 1.0;
|
|
825
|
+
this.StepFrequency = 0;
|
|
826
|
+
this.Value = 0.0;
|
|
827
|
+
this.ValueChange = new EventEmitter();
|
|
828
|
+
this.IsEnabled = true;
|
|
829
|
+
this.Orientation = 'Horizontal';
|
|
626
830
|
}
|
|
627
|
-
|
|
628
|
-
let
|
|
629
|
-
let
|
|
630
|
-
let
|
|
631
|
-
let
|
|
632
|
-
let
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
this.
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
if (oldValue !== newValue)
|
|
639
|
-
this.SelectedValueChange.emit(this.SelectedValue);
|
|
640
|
-
if (oldItem !== newItem)
|
|
641
|
-
this.SelectedItemChange.emit(this.SelectedItem);
|
|
831
|
+
getStyle() {
|
|
832
|
+
let style = {};
|
|
833
|
+
let minimum = this.Minimum ?? 0;
|
|
834
|
+
let maximum = this.Maximum ?? 1;
|
|
835
|
+
let range = maximum - minimum;
|
|
836
|
+
let progress = range > 0 ? (this.Value - minimum) / range : 1;
|
|
837
|
+
progress = Math.min(Math.max(progress, 0), 1);
|
|
838
|
+
let progressText = (progress * 100).toFixed(4);
|
|
839
|
+
style['--progress-size'] = progressText + (this.Orientation == 'Horizontal' ? 'cqw' : 'cqh');
|
|
840
|
+
style['--progress-percent'] = progressText + '%';
|
|
841
|
+
return style;
|
|
642
842
|
}
|
|
643
|
-
|
|
644
|
-
|
|
843
|
+
getClasses(value) {
|
|
844
|
+
var results = [value];
|
|
845
|
+
results.push(this.Orientation.toLowerCase());
|
|
846
|
+
if (this.IsEnabled !== true)
|
|
847
|
+
results.push('disabled');
|
|
848
|
+
return results;
|
|
645
849
|
}
|
|
646
|
-
|
|
647
|
-
if (this.
|
|
850
|
+
onThumbPointerDown(event) {
|
|
851
|
+
if (!this.IsEnabled)
|
|
648
852
|
return;
|
|
649
|
-
if (
|
|
650
|
-
value = -1;
|
|
651
|
-
if (value >= this.ItemSource.length)
|
|
652
|
-
value = this.ItemSource.length - 1;
|
|
653
|
-
let oldIndex = this._selectedIndex;
|
|
654
|
-
let oldValue = this.SelectedValue;
|
|
655
|
-
let oldItem = this.SelectedItem;
|
|
656
|
-
this._selectedIndex = value;
|
|
657
|
-
let newIndex = this._selectedIndex;
|
|
658
|
-
let newValue = this.SelectedValue;
|
|
659
|
-
let newItem = this.SelectedItem;
|
|
660
|
-
if (oldIndex !== newIndex)
|
|
661
|
-
this.SelectedIndexChange.emit(this.SelectedIndex);
|
|
662
|
-
if (oldValue !== newValue)
|
|
663
|
-
this.SelectedValueChange.emit(this.SelectedValue);
|
|
664
|
-
if (oldItem !== newItem)
|
|
665
|
-
this.SelectedItemChange.emit(this.SelectedItem);
|
|
666
|
-
}
|
|
667
|
-
//Selected value
|
|
668
|
-
get SelectedValue() {
|
|
669
|
-
if (this.SelectedIndex < 0 || this.SelectedIndex >= this.ItemSource.length)
|
|
670
|
-
return null;
|
|
671
|
-
return this.getValue(-1, this.ItemSource[this.SelectedIndex]);
|
|
672
|
-
}
|
|
673
|
-
set SelectedValue(value) {
|
|
674
|
-
if (this.ItemSource === undefined)
|
|
853
|
+
if (event.button !== 0)
|
|
675
854
|
return;
|
|
676
|
-
this.
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
get SelectedItem() {
|
|
680
|
-
if (this.SelectedIndex < 0 || this.SelectedIndex >= this.ItemSource.length)
|
|
681
|
-
return null;
|
|
682
|
-
return this.ItemSource[this.SelectedIndex];
|
|
855
|
+
this._thumb.nativeElement.setPointerCapture(event.pointerId);
|
|
856
|
+
this._thumbPointerMoveEventSubscription = this._renderer.listen(this._track.nativeElement, 'pointermove', p => this.onThumbPointerMove(p));
|
|
857
|
+
this.onThumbPointerMove(event);
|
|
683
858
|
}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
859
|
+
onThumbPointerMove(event) {
|
|
860
|
+
let trackRectangle = this._track.nativeElement.getBoundingClientRect();
|
|
861
|
+
let position;
|
|
862
|
+
switch (this.Orientation) {
|
|
863
|
+
case "Horizontal":
|
|
864
|
+
position = (event.clientX - trackRectangle.left - SliderComponent._thumbRadius) / (trackRectangle.width - 2 * SliderComponent._thumbRadius);
|
|
865
|
+
break;
|
|
866
|
+
case "Vertical":
|
|
867
|
+
position = 1 - (event.clientY - trackRectangle.top - SliderComponent._thumbRadius) / (trackRectangle.height - 2 * SliderComponent._thumbRadius);
|
|
868
|
+
break;
|
|
869
|
+
}
|
|
870
|
+
//Apply range
|
|
871
|
+
let value = position * (this.Maximum - this.Minimum) + this.Minimum;
|
|
872
|
+
//Apply step frequency
|
|
873
|
+
if (this.StepFrequency !== 0)
|
|
874
|
+
value = Math.trunc(value / this.StepFrequency) * this.StepFrequency;
|
|
875
|
+
//Apply min-max
|
|
876
|
+
value = Math.min(this.Maximum, Math.max(this.Minimum, value));
|
|
877
|
+
//Update value
|
|
878
|
+
this.Value = value;
|
|
879
|
+
this.ValueChange.emit(this.Value);
|
|
688
880
|
}
|
|
689
|
-
|
|
690
|
-
if (
|
|
881
|
+
onThumbPointerUp(event) {
|
|
882
|
+
if (event.button !== 0)
|
|
691
883
|
return;
|
|
692
|
-
this.
|
|
693
|
-
event.
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
return document.querySelector(`#xaml-selector-${this._id}-item-${index}`);
|
|
697
|
-
}
|
|
698
|
-
constructor() {
|
|
699
|
-
super();
|
|
700
|
-
this.IsEnabled = true;
|
|
701
|
-
this.HorizontalContentAlignment = 'Left';
|
|
702
|
-
this.VerticalContentAlignment = 'Center';
|
|
703
|
-
//ItemSource
|
|
704
|
-
this._itemSource = [];
|
|
705
|
-
//Selected index
|
|
706
|
-
this._selectedIndex = -1;
|
|
707
|
-
this.SelectedIndexChange = new EventEmitter();
|
|
708
|
-
this.SelectedValueChange = new EventEmitter();
|
|
709
|
-
this.SelectedItemChange = new EventEmitter();
|
|
710
|
-
//This is required otherwise the SelectedValuePath cannot be read
|
|
711
|
-
this.getValue = (index, item) => {
|
|
712
|
-
return this.SelectedValuePath !== undefined ? item[this.SelectedValuePath] : item;
|
|
713
|
-
};
|
|
884
|
+
this.onThumbPointerMove(event);
|
|
885
|
+
this._thumb.nativeElement.releasePointerCapture(event.pointerId);
|
|
886
|
+
if (this._thumbPointerMoveEventSubscription)
|
|
887
|
+
this._thumbPointerMoveEventSubscription();
|
|
714
888
|
}
|
|
715
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
716
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type:
|
|
889
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SliderComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
890
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: SliderComponent, isStandalone: true, selector: "Slider", inputs: { Minimum: "Minimum", Maximum: "Maximum", StepFrequency: "StepFrequency", Value: "Value", IsEnabled: "IsEnabled", Orientation: "Orientation" }, outputs: { ValueChange: "ValueChange" }, host: { listeners: { "pointerdown": "onThumbPointerDown($event)", "pointerup": "onThumbPointerUp($event)" } }, viewQueries: [{ propertyName: "_track", first: true, predicate: ["track"], descendants: true }, { propertyName: "_thumb", first: true, predicate: ["thumb"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<div #track [ngClass]="getClasses('track')" [ngStyle]="getStyle()">
|
|
891
|
+
<div class="usable-range">
|
|
892
|
+
<div #thumb [ngClass]="getClasses('thumb')">
|
|
893
|
+
<div class="handle"></div>
|
|
894
|
+
</div>
|
|
895
|
+
</div>
|
|
896
|
+
</div>`, isInline: true, styles: [":host{position:relative}:host{display:grid}.track{display:grid;background-color:var(--SliderTrackFillColor);border-radius:2px}.track>.usable-range{container-type:size}.track.horizontal{height:4px;margin:6px 0;background:linear-gradient(to right,var(--AccentFillColorDefault) 0 var(--progress-percent),var(--SliderTrackFillColor) var(--progress-percent) 100%)}.track.horizontal>.usable-range{margin:0 8px}.track.vertical{width:4px;margin:0 6px;background:linear-gradient(to top,var(--AccentFillColorDefault) 0 var(--progress-percent),var(--SliderTrackFillColor) var(--progress-percent) 100%)}.track.vertical>.usable-range{margin:8px 0}.track.disabled{background:var(--ControlStrongFillColorDisabled)}.thumb{display:grid;border-radius:50%;width:16px;height:16px;box-sizing:border-box;border:1px solid var(--ControlStrokeColorOnAccentDefaultDark);background-color:var(--ControlSolidFillColorDefault)}.thumb.horizontal{transform:translate(calc(var(--progress-size) - 8px),-6px)}.thumb.vertical{transform:translate(-6px,calc(100cqh - var(--progress-size) - 8px))}.thumb>.handle{place-self:center;background-color:var(--AccentFillColorDefault);width:8px;height:8px;border-radius:50%;transition:transform var(--ControlFastAnimationDuration),background-color var(--ControlFastAnimationDuration)}.thumb:not(.disabled):hover>.handle{transform:scale(125%);background-color:var(--AccentFillColorSecondary)}.thumb:not(.disabled):active>.handle{transform:scale(75%);background-color:var(--AccentFillColorTertiary)}.thumb.disabled>.handle{transform:scale(125%);background-color:var(--AccentFillColorDisabled)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
717
897
|
}
|
|
718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
898
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SliderComponent, decorators: [{
|
|
719
899
|
type: Component,
|
|
720
|
-
args: [{
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
type: Input
|
|
729
|
-
}], HorizontalContentAlignment: [{
|
|
730
|
-
type: Input
|
|
731
|
-
}], VerticalContentAlignment: [{
|
|
732
|
-
type: Input
|
|
733
|
-
}], disabled: [{
|
|
734
|
-
type: HostBinding,
|
|
735
|
-
args: ['class.disabled']
|
|
736
|
-
}], ItemSource: [{
|
|
900
|
+
args: [{ selector: 'Slider', template: `<div #track [ngClass]="getClasses('track')" [ngStyle]="getStyle()">
|
|
901
|
+
<div class="usable-range">
|
|
902
|
+
<div #thumb [ngClass]="getClasses('thumb')">
|
|
903
|
+
<div class="handle"></div>
|
|
904
|
+
</div>
|
|
905
|
+
</div>
|
|
906
|
+
</div>`, imports: [CommonModule], styles: [":host{position:relative}:host{display:grid}.track{display:grid;background-color:var(--SliderTrackFillColor);border-radius:2px}.track>.usable-range{container-type:size}.track.horizontal{height:4px;margin:6px 0;background:linear-gradient(to right,var(--AccentFillColorDefault) 0 var(--progress-percent),var(--SliderTrackFillColor) var(--progress-percent) 100%)}.track.horizontal>.usable-range{margin:0 8px}.track.vertical{width:4px;margin:0 6px;background:linear-gradient(to top,var(--AccentFillColorDefault) 0 var(--progress-percent),var(--SliderTrackFillColor) var(--progress-percent) 100%)}.track.vertical>.usable-range{margin:8px 0}.track.disabled{background:var(--ControlStrongFillColorDisabled)}.thumb{display:grid;border-radius:50%;width:16px;height:16px;box-sizing:border-box;border:1px solid var(--ControlStrokeColorOnAccentDefaultDark);background-color:var(--ControlSolidFillColorDefault)}.thumb.horizontal{transform:translate(calc(var(--progress-size) - 8px),-6px)}.thumb.vertical{transform:translate(-6px,calc(100cqh - var(--progress-size) - 8px))}.thumb>.handle{place-self:center;background-color:var(--AccentFillColorDefault);width:8px;height:8px;border-radius:50%;transition:transform var(--ControlFastAnimationDuration),background-color var(--ControlFastAnimationDuration)}.thumb:not(.disabled):hover>.handle{transform:scale(125%);background-color:var(--AccentFillColorSecondary)}.thumb:not(.disabled):active>.handle{transform:scale(75%);background-color:var(--AccentFillColorTertiary)}.thumb.disabled>.handle{transform:scale(125%);background-color:var(--AccentFillColorDisabled)}\n"] }]
|
|
907
|
+
}], ctorParameters: () => [{ type: i0.Renderer2 }], propDecorators: { Minimum: [{
|
|
737
908
|
type: Input
|
|
738
|
-
}],
|
|
909
|
+
}], Maximum: [{
|
|
739
910
|
type: Input
|
|
740
|
-
}],
|
|
741
|
-
type: Output
|
|
742
|
-
}], SelectedValue: [{
|
|
911
|
+
}], StepFrequency: [{
|
|
743
912
|
type: Input
|
|
744
|
-
}],
|
|
745
|
-
type: Output
|
|
746
|
-
}], SelectedItem: [{
|
|
913
|
+
}], Value: [{
|
|
747
914
|
type: Input
|
|
748
|
-
}],
|
|
915
|
+
}], ValueChange: [{
|
|
749
916
|
type: Output
|
|
750
|
-
}],
|
|
917
|
+
}], IsEnabled: [{
|
|
751
918
|
type: Input
|
|
752
|
-
}],
|
|
919
|
+
}], Orientation: [{
|
|
753
920
|
type: Input
|
|
754
|
-
}]
|
|
921
|
+
}], _track: [{
|
|
922
|
+
type: ViewChild,
|
|
923
|
+
args: ['track']
|
|
924
|
+
}], _thumb: [{
|
|
925
|
+
type: ViewChild,
|
|
926
|
+
args: ['thumb']
|
|
927
|
+
}], onThumbPointerDown: [{
|
|
928
|
+
type: HostListener,
|
|
929
|
+
args: ['pointerdown', ['$event']]
|
|
930
|
+
}], onThumbPointerUp: [{
|
|
931
|
+
type: HostListener,
|
|
932
|
+
args: ['pointerup', ['$event']]
|
|
933
|
+
}] } });
|
|
755
934
|
|
|
756
|
-
class
|
|
935
|
+
class GridComponent extends PanelComponent {
|
|
757
936
|
constructor() {
|
|
758
937
|
super(...arguments);
|
|
759
|
-
this.Orientation = '
|
|
760
|
-
this.ViewportSize = 0;
|
|
761
|
-
this.ScrollSize = 0;
|
|
762
|
-
this.StepSize = 5;
|
|
763
|
-
this._value = 0;
|
|
764
|
-
this.ValueChange = new EventEmitter();
|
|
765
|
-
this.IsEnabled = true;
|
|
766
|
-
this._isScrolling = false;
|
|
767
|
-
this._startPointerPosition = 0;
|
|
768
|
-
this._startScrollPosition = 0;
|
|
769
|
-
}
|
|
770
|
-
get Value() {
|
|
771
|
-
return this._value;
|
|
772
|
-
}
|
|
773
|
-
;
|
|
774
|
-
set Value(value) {
|
|
775
|
-
let scrollRange = this.ScrollSize - this.ViewportSize;
|
|
776
|
-
if (value > scrollRange)
|
|
777
|
-
value = scrollRange;
|
|
778
|
-
if (value < 0)
|
|
779
|
-
value = 0;
|
|
780
|
-
this._value = value;
|
|
781
|
-
this.ValueChange.emit(value);
|
|
782
|
-
}
|
|
783
|
-
get decreaseGlyph() {
|
|
784
|
-
return this.Orientation === 'Vertical' ? '\ueddb' : '\uedd9';
|
|
785
|
-
}
|
|
786
|
-
get increaseGlyph() {
|
|
787
|
-
return this.Orientation === 'Vertical' ? '\ueddc' : '\uedda';
|
|
788
|
-
}
|
|
789
|
-
get class() {
|
|
790
|
-
return this.Orientation.toLowerCase();
|
|
791
|
-
}
|
|
792
|
-
getElementSize(element) {
|
|
793
|
-
return this.Orientation === 'Vertical' ? element.offsetHeight : element.offsetWidth;
|
|
794
|
-
}
|
|
795
|
-
getPointerPosition(event) {
|
|
796
|
-
return this.Orientation === 'Vertical' ? event.clientY : event.clientX;
|
|
797
|
-
}
|
|
798
|
-
get thumbStyle() {
|
|
799
|
-
if (!this._track)
|
|
800
|
-
return {};
|
|
801
|
-
let trackLength = this.getElementSize(this._track.nativeElement);
|
|
802
|
-
let scrollPosition = this.Value / (this.ScrollSize - this.ViewportSize);
|
|
803
|
-
let size = trackLength * (this.ViewportSize / this.ScrollSize);
|
|
804
|
-
let position = scrollPosition * (trackLength - size);
|
|
805
|
-
switch (this.Orientation) {
|
|
806
|
-
case 'Vertical':
|
|
807
|
-
return {
|
|
808
|
-
'height': size + 'px',
|
|
809
|
-
'top': position + 'px'
|
|
810
|
-
};
|
|
811
|
-
case 'Horizontal':
|
|
812
|
-
return {
|
|
813
|
-
'width': size + 'px',
|
|
814
|
-
'left': position + 'px'
|
|
815
|
-
};
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
onButtonDown(event, direction) {
|
|
819
|
-
event.target.setPointerCapture(event.pointerId);
|
|
820
|
-
this._interval = setInterval(() => {
|
|
821
|
-
this.Value += direction ? this.StepSize : -this.StepSize;
|
|
822
|
-
}, 50);
|
|
823
|
-
}
|
|
824
|
-
onButtonUp(event) {
|
|
825
|
-
event.target.releasePointerCapture(event.pointerId);
|
|
826
|
-
clearInterval(this._interval);
|
|
938
|
+
this.Orientation = 'Horizontal';
|
|
827
939
|
}
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
direction = false;
|
|
833
|
-
}
|
|
834
|
-
if (this._thumb.nativeElement.offsetTop + this._thumb.nativeElement.offsetHeight < event.offsetY) {
|
|
835
|
-
direction = true;
|
|
836
|
-
}
|
|
940
|
+
get gridAutoFlow() {
|
|
941
|
+
if (this.ColumnDefinitions == undefined && this.RowDefinitions == undefined) {
|
|
942
|
+
//Make it work like equal with stack panel
|
|
943
|
+
return this.Orientation === 'Horizontal' ? 'column' : 'row';
|
|
837
944
|
}
|
|
838
945
|
else {
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
}
|
|
842
|
-
if (this._thumb.nativeElement.offsetLeft + this._thumb.nativeElement.offsetWidth < event.offsetX) {
|
|
843
|
-
direction = true;
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
if (direction === undefined)
|
|
847
|
-
return;
|
|
848
|
-
event.target.setPointerCapture(event.pointerId);
|
|
849
|
-
this.Value += direction ? this.ViewportSize : -this.ViewportSize;
|
|
850
|
-
this._interval = setInterval(() => {
|
|
851
|
-
this.Value += direction ? this.ViewportSize : -this.ViewportSize;
|
|
852
|
-
}, 250);
|
|
853
|
-
}
|
|
854
|
-
onTrackUp(event) {
|
|
855
|
-
event.target.releasePointerCapture(event.pointerId);
|
|
856
|
-
clearInterval(this._interval);
|
|
857
|
-
}
|
|
858
|
-
onPointerDown(event) {
|
|
859
|
-
if (event.buttons !== 1)
|
|
860
|
-
return;
|
|
861
|
-
this._thumb.nativeElement.setPointerCapture(event.pointerId);
|
|
862
|
-
this._isScrolling = true;
|
|
863
|
-
this._startPointerPosition = this.getPointerPosition(event);
|
|
864
|
-
this._startScrollPosition = this.Value;
|
|
865
|
-
event.stopPropagation();
|
|
866
|
-
}
|
|
867
|
-
onPointerMove(event) {
|
|
868
|
-
if (!this._isScrolling)
|
|
869
|
-
return;
|
|
870
|
-
if (event.buttons !== 1) {
|
|
871
|
-
this._isScrolling = false;
|
|
872
|
-
return;
|
|
946
|
+
//Use proper flow logic
|
|
947
|
+
return this.Orientation === 'Horizontal' ? 'row' : 'column';
|
|
873
948
|
}
|
|
874
|
-
let delta = this.getPointerPosition(event) - this._startPointerPosition;
|
|
875
|
-
let trackLength = this.getElementSize(this._track.nativeElement);
|
|
876
|
-
let thumbLength = this.getElementSize(this._thumb.nativeElement);
|
|
877
|
-
let scrollPercent = delta / (trackLength - thumbLength);
|
|
878
|
-
this.Value = this._startScrollPosition + scrollPercent * (this.ScrollSize - this.ViewportSize);
|
|
879
|
-
event.stopPropagation();
|
|
880
|
-
}
|
|
881
|
-
onPointerUp(event) {
|
|
882
|
-
if (event.buttons !== 1)
|
|
883
|
-
return;
|
|
884
|
-
this._isScrolling = false;
|
|
885
|
-
this._thumb.nativeElement.releasePointerCapture(event.pointerId);
|
|
886
|
-
event.stopPropagation();
|
|
887
949
|
}
|
|
888
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
889
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type:
|
|
890
|
-
<div #track class="track" (pointerdown)="onTrackDown($event)" (pointerup)="onTrackUp($event)">
|
|
891
|
-
<div #thumb class="thumb" [ngStyle]="thumbStyle" (pointerdown)="onPointerDown($event)" (pointermove)="onPointerMove($event)" (pointerup)="onPointerUp($event)"></div>
|
|
892
|
-
</div>
|
|
893
|
-
<div class="buttons" (pointerdown)="onButtonDown($event, true)" (pointerup)="onButtonUp($event)">{{increaseGlyph}}</div>`, isInline: true, styles: [":host{position:relative}:host{display:grid;background-color:var(--SubtleFillColorTransparent)}:host.horizontal{grid-template-columns:auto 1fr auto}:host.horizontal>.buttons{align-self:center}:host.horizontal>.track{transform:translateY(-.75px);align-self:center;margin:0 -2px 0 -3px}:host.horizontal>.track>.thumb{transform:translateY(3px)}:host.vertical{grid-template-rows:auto 1fr auto}:host.vertical>.buttons{justify-self:center}:host.vertical>.track{transform:translate(-.75px);justify-self:center;margin:-3px 0 -2px}:host.vertical>.track>.thumb{transform:translate(3px)}:host:hover>.buttons{display:grid;opacity:1}:host:hover>.track>.thumb{min-width:10px;min-height:10px;transform:translate(0)}:host>.buttons{display:hidden;font-family:var(--SymbolFontFamily);font-size:8pt;min-width:12px;min-height:12px;margin:4px;transform-origin:center;opacity:0;transition:opacity var(--ControlNormalAnimationDuration);color:var(--ControlStrongFillColorDefault)}:host>.buttons:hover{color:var(--TextFillColorSecondary)}:host>.buttons:active{color:var(--TextFillColorSecondary);transform:scale(.875)}:host>.track{display:grid;position:relative}:host>.track>.thumb{background-color:var(--ControlStrongFillColorDefault);position:relative;border-radius:3px;transition:transform var(--ControlNormalAnimationDuration),min-width var(--ControlNormalAnimationDuration),min-height var(--ControlNormalAnimationDuration);min-width:2px;min-height:2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
950
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
951
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: GridComponent, isStandalone: false, selector: "Grid", inputs: { ColumnDefinitions: "ColumnDefinitions", RowDefinitions: "RowDefinitions", AutoColumnDefinition: "AutoColumnDefinition", AutoRowDefinition: "AutoRowDefinition", ColumnSpacing: "ColumnSpacing", RowSpacing: "RowSpacing", Orientation: "Orientation" }, host: { properties: { "style.grid-template-columns": "this.ColumnDefinitions", "style.grid-template-rows": "this.RowDefinitions", "style.grid-auto-columns": "this.AutoColumnDefinition", "style.grid-auto-rows": "this.AutoRowDefinition", "style.column-gap": "this.ColumnSpacing", "style.row-gap": "this.RowSpacing", "style.grid-auto-flow": "this.gridAutoFlow" } }, usesInheritance: true, ngImport: i0, template: `<ng-content/>`, isInline: true, styles: [":host{display:grid;position:relative}\n"] }); }
|
|
894
952
|
}
|
|
895
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
953
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridComponent, decorators: [{
|
|
896
954
|
type: Component,
|
|
897
|
-
args: [{ selector: '
|
|
898
|
-
|
|
899
|
-
<div #thumb class="thumb" [ngStyle]="thumbStyle" (pointerdown)="onPointerDown($event)" (pointermove)="onPointerMove($event)" (pointerup)="onPointerUp($event)"></div>
|
|
900
|
-
</div>
|
|
901
|
-
<div class="buttons" (pointerdown)="onButtonDown($event, true)" (pointerup)="onButtonUp($event)">{{increaseGlyph}}</div>`, styles: [":host{position:relative}:host{display:grid;background-color:var(--SubtleFillColorTransparent)}:host.horizontal{grid-template-columns:auto 1fr auto}:host.horizontal>.buttons{align-self:center}:host.horizontal>.track{transform:translateY(-.75px);align-self:center;margin:0 -2px 0 -3px}:host.horizontal>.track>.thumb{transform:translateY(3px)}:host.vertical{grid-template-rows:auto 1fr auto}:host.vertical>.buttons{justify-self:center}:host.vertical>.track{transform:translate(-.75px);justify-self:center;margin:-3px 0 -2px}:host.vertical>.track>.thumb{transform:translate(3px)}:host:hover>.buttons{display:grid;opacity:1}:host:hover>.track>.thumb{min-width:10px;min-height:10px;transform:translate(0)}:host>.buttons{display:hidden;font-family:var(--SymbolFontFamily);font-size:8pt;min-width:12px;min-height:12px;margin:4px;transform-origin:center;opacity:0;transition:opacity var(--ControlNormalAnimationDuration);color:var(--ControlStrongFillColorDefault)}:host>.buttons:hover{color:var(--TextFillColorSecondary)}:host>.buttons:active{color:var(--TextFillColorSecondary);transform:scale(.875)}:host>.track{display:grid;position:relative}:host>.track>.thumb{background-color:var(--ControlStrongFillColorDefault);position:relative;border-radius:3px;transition:transform var(--ControlNormalAnimationDuration),min-width var(--ControlNormalAnimationDuration),min-height var(--ControlNormalAnimationDuration);min-width:2px;min-height:2px}\n"] }]
|
|
902
|
-
}], propDecorators: { Orientation: [{
|
|
955
|
+
args: [{ selector: 'Grid', template: `<ng-content/>`, standalone: false, styles: [":host{display:grid;position:relative}\n"] }]
|
|
956
|
+
}], propDecorators: { ColumnDefinitions: [{
|
|
903
957
|
type: Input
|
|
904
|
-
}
|
|
958
|
+
}, {
|
|
959
|
+
type: HostBinding,
|
|
960
|
+
args: ['style.grid-template-columns']
|
|
961
|
+
}], RowDefinitions: [{
|
|
905
962
|
type: Input
|
|
906
|
-
}
|
|
963
|
+
}, {
|
|
964
|
+
type: HostBinding,
|
|
965
|
+
args: ['style.grid-template-rows']
|
|
966
|
+
}], AutoColumnDefinition: [{
|
|
907
967
|
type: Input
|
|
908
|
-
}
|
|
968
|
+
}, {
|
|
969
|
+
type: HostBinding,
|
|
970
|
+
args: ['style.grid-auto-columns']
|
|
971
|
+
}], AutoRowDefinition: [{
|
|
909
972
|
type: Input
|
|
910
|
-
}
|
|
973
|
+
}, {
|
|
974
|
+
type: HostBinding,
|
|
975
|
+
args: ['style.grid-auto-rows']
|
|
976
|
+
}], ColumnSpacing: [{
|
|
911
977
|
type: Input
|
|
912
|
-
}
|
|
913
|
-
type:
|
|
914
|
-
|
|
978
|
+
}, {
|
|
979
|
+
type: HostBinding,
|
|
980
|
+
args: ['style.column-gap']
|
|
981
|
+
}], RowSpacing: [{
|
|
915
982
|
type: Input
|
|
916
|
-
}
|
|
917
|
-
type: ViewChild,
|
|
918
|
-
args: ['track']
|
|
919
|
-
}], _thumb: [{
|
|
920
|
-
type: ViewChild,
|
|
921
|
-
args: ['thumb']
|
|
922
|
-
}], class: [{
|
|
983
|
+
}, {
|
|
923
984
|
type: HostBinding,
|
|
924
|
-
args: ['
|
|
985
|
+
args: ['style.row-gap']
|
|
986
|
+
}], Orientation: [{
|
|
987
|
+
type: Input
|
|
988
|
+
}], gridAutoFlow: [{
|
|
989
|
+
type: HostBinding,
|
|
990
|
+
args: ['style.grid-auto-flow']
|
|
925
991
|
}] } });
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
return false;
|
|
932
|
-
case 'Auto':
|
|
933
|
-
return this.ViewportWidth < this.ExtentWidth;
|
|
934
|
-
case 'Enabled':
|
|
935
|
-
return true;
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
get IsVerticalScrollBarVisible() {
|
|
939
|
-
switch (this.VerticalScrollMode) {
|
|
940
|
-
case 'Disabled':
|
|
941
|
-
return false;
|
|
942
|
-
case 'Auto':
|
|
943
|
-
return this.ViewportHeight < this.ExtentHeight;
|
|
944
|
-
case 'Enabled':
|
|
945
|
-
return true;
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
get ExtentWidth() {
|
|
949
|
-
return this._content?.nativeElement.scrollWidth;
|
|
950
|
-
}
|
|
951
|
-
get ExtentHeight() {
|
|
952
|
-
return this._content?.nativeElement.scrollHeight;
|
|
953
|
-
}
|
|
954
|
-
get ViewportWidth() {
|
|
955
|
-
return this._content?.nativeElement.clientWidth;
|
|
956
|
-
}
|
|
957
|
-
get ViewportHeight() {
|
|
958
|
-
return this._content?.nativeElement.clientHeight;
|
|
992
|
+
class GridProperty {
|
|
993
|
+
}
|
|
994
|
+
class GridDirective {
|
|
995
|
+
constructor() {
|
|
996
|
+
this.Grid = new GridProperty();
|
|
959
997
|
}
|
|
960
|
-
get
|
|
961
|
-
return this.
|
|
998
|
+
get gridColumnStart() {
|
|
999
|
+
return this.Grid.Column !== undefined ? this.Grid.Column + 1 : undefined;
|
|
962
1000
|
}
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
this._content.nativeElement.scrollLeft = value;
|
|
1001
|
+
get gridRowStart() {
|
|
1002
|
+
return this.Grid.Row !== undefined ? this.Grid.Row + 1 : undefined;
|
|
966
1003
|
}
|
|
967
|
-
get
|
|
968
|
-
return this.
|
|
1004
|
+
get gridColumnEnd() {
|
|
1005
|
+
return this.Grid.ColumnSpan !== undefined ? ('span ' + this.Grid.ColumnSpan) : undefined;
|
|
969
1006
|
}
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
this._content.nativeElement.scrollTop = value;
|
|
1007
|
+
get gridRowEnd() {
|
|
1008
|
+
return this.Grid.RowSpan !== undefined ? ('span ' + this.Grid.RowSpan) : undefined;
|
|
973
1009
|
}
|
|
974
|
-
static
|
|
975
|
-
|
|
976
|
-
case 'Disabled':
|
|
977
|
-
return 'hidden';
|
|
978
|
-
case 'Enabled':
|
|
979
|
-
return 'scroll';
|
|
980
|
-
case 'Auto':
|
|
981
|
-
return 'auto';
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
get contentStyle() {
|
|
985
|
-
return {
|
|
986
|
-
'overflow-x': ScrollViewerComponent.toOverflow(this.HorizontalScrollMode),
|
|
987
|
-
'overflow-y': ScrollViewerComponent.toOverflow(this.VerticalScrollMode)
|
|
988
|
-
};
|
|
989
|
-
}
|
|
990
|
-
constructor(_changeDetector) {
|
|
991
|
-
super();
|
|
992
|
-
this._changeDetector = _changeDetector;
|
|
993
|
-
this.HorizontalScrollMode = 'Auto';
|
|
994
|
-
this.VerticalScrollMode = 'Auto';
|
|
995
|
-
}
|
|
996
|
-
onScroll() {
|
|
997
|
-
//trigger change detect on scroll
|
|
998
|
-
}
|
|
999
|
-
ngAfterViewInit() {
|
|
1000
|
-
//help the layout finish itself
|
|
1001
|
-
this._changeDetector.detectChanges();
|
|
1002
|
-
}
|
|
1003
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ScrollViewerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1004
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ScrollViewerComponent, isStandalone: true, selector: "ScrollViewer", inputs: { HorizontalScrollMode: "HorizontalScrollMode", VerticalScrollMode: "VerticalScrollMode" }, viewQueries: [{ propertyName: "_content", first: true, predicate: ["content"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<div #content class="content" [ngStyle]="contentStyle" (scroll)="onScroll()" cdkScrollable><ng-content/></div>
|
|
1005
|
-
<ScrollBar *ngIf="IsVerticalScrollBarVisible" HorizontalAlignment="Right" class="scrollbar" Orientation="Vertical" [ScrollSize]="ExtentHeight" [ViewportSize]="ViewportHeight" [(Value)]="VerticalOffset"/>
|
|
1006
|
-
<ScrollBar *ngIf="IsHorizontalScrollBarVisible" VerticalAlignment="Bottom" class="scrollbar" Orientation="Horizontal" [ScrollSize]="ExtentWidth" [ViewportSize]="ViewportWidth" [(Value)]="HorizontalOffset"/>`, isInline: true, styles: [":host{display:grid;overflow:auto;touch-action:pan-x pan-y}:host>.content{overflow:-moz-scrollbars-none;-ms-overflow-style:none;scrollbar-width:none;display:grid;grid-row-start:1;grid-column-start:1;justify-self:stretch;align-self:stretch}:host>.content::-webkit-scrollbar{display:none}:host>.scrollbar{display:grid;grid-row-start:1;grid-column-start:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ScrollBarComponent, selector: "ScrollBar", inputs: ["Orientation", "ViewportSize", "ScrollSize", "StepSize", "Value", "IsEnabled"], outputs: ["ValueChange"] }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }] }); }
|
|
1010
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1011
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.6", type: GridDirective, isStandalone: false, selector: "[Grid]", inputs: { Grid: "Grid" }, host: { properties: { "style.grid-column-start": "this.gridColumnStart", "style.grid-row-start": "this.gridRowStart", "style.grid-column-end": "this.gridColumnEnd", "style.grid-row-end": "this.gridRowEnd" } }, ngImport: i0 }); }
|
|
1007
1012
|
}
|
|
1008
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1009
|
-
type:
|
|
1010
|
-
args: [{
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
}], VerticalScrollMode: [{
|
|
1013
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridDirective, decorators: [{
|
|
1014
|
+
type: Directive,
|
|
1015
|
+
args: [{
|
|
1016
|
+
selector: '[Grid]',
|
|
1017
|
+
standalone: false
|
|
1018
|
+
}]
|
|
1019
|
+
}], propDecorators: { Grid: [{
|
|
1016
1020
|
type: Input
|
|
1017
|
-
}],
|
|
1018
|
-
type:
|
|
1019
|
-
args: ['
|
|
1021
|
+
}], gridColumnStart: [{
|
|
1022
|
+
type: HostBinding,
|
|
1023
|
+
args: ['style.grid-column-start']
|
|
1024
|
+
}], gridRowStart: [{
|
|
1025
|
+
type: HostBinding,
|
|
1026
|
+
args: ['style.grid-row-start']
|
|
1027
|
+
}], gridColumnEnd: [{
|
|
1028
|
+
type: HostBinding,
|
|
1029
|
+
args: ['style.grid-column-end']
|
|
1030
|
+
}], gridRowEnd: [{
|
|
1031
|
+
type: HostBinding,
|
|
1032
|
+
args: ['style.grid-row-end']
|
|
1020
1033
|
}] } });
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
super(...arguments);
|
|
1025
|
-
this.Orientation = 'Vertical';
|
|
1026
|
-
}
|
|
1027
|
-
get gridAutoFlow() {
|
|
1028
|
-
return this.Orientation === 'Horizontal' ? 'column' : 'row';
|
|
1029
|
-
}
|
|
1030
|
-
get gridAutoRows() {
|
|
1031
|
-
return this.Orientation === 'Vertical' ? 'min-content' : undefined;
|
|
1032
|
-
}
|
|
1033
|
-
get gridAutoColumns() {
|
|
1034
|
-
return this.Orientation === 'Horizontal' ? 'min-content' : undefined;
|
|
1034
|
+
class GridRowDirective {
|
|
1035
|
+
get gridRowStart() {
|
|
1036
|
+
return this.Row !== undefined ? parseInt(this.Row) + 1 : undefined;
|
|
1035
1037
|
}
|
|
1036
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1037
|
-
static { this.ɵ
|
|
1038
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridRowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1039
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.6", type: GridRowDirective, isStandalone: false, selector: "[Grid-Row]", inputs: { Row: ["Grid-Row", "Row"] }, host: { properties: { "style.grid-row-start": "this.gridRowStart" } }, ngImport: i0 }); }
|
|
1038
1040
|
}
|
|
1039
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1040
|
-
type:
|
|
1041
|
-
args: [{
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
}], gridAutoFlow: [{
|
|
1050
|
-
type: HostBinding,
|
|
1051
|
-
args: ['style.grid-auto-flow']
|
|
1052
|
-
}], gridAutoRows: [{
|
|
1041
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridRowDirective, decorators: [{
|
|
1042
|
+
type: Directive,
|
|
1043
|
+
args: [{
|
|
1044
|
+
selector: '[Grid-Row]',
|
|
1045
|
+
standalone: false
|
|
1046
|
+
}]
|
|
1047
|
+
}], propDecorators: { Row: [{
|
|
1048
|
+
type: Input,
|
|
1049
|
+
args: ['Grid-Row']
|
|
1050
|
+
}], gridRowStart: [{
|
|
1053
1051
|
type: HostBinding,
|
|
1054
|
-
args: ['style.grid-
|
|
1055
|
-
}]
|
|
1052
|
+
args: ['style.grid-row-start']
|
|
1053
|
+
}] } });
|
|
1054
|
+
class GridColumnDirective {
|
|
1055
|
+
get gridColumnStart() {
|
|
1056
|
+
return this.Column !== undefined ? parseInt(this.Column) + 1 : undefined;
|
|
1057
|
+
}
|
|
1058
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1059
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.6", type: GridColumnDirective, isStandalone: false, selector: "[Grid-Column]", inputs: { Column: ["Grid-Column", "Column"] }, host: { properties: { "style.grid-column-start": "this.gridColumnStart" } }, ngImport: i0 }); }
|
|
1060
|
+
}
|
|
1061
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridColumnDirective, decorators: [{
|
|
1062
|
+
type: Directive,
|
|
1063
|
+
args: [{
|
|
1064
|
+
selector: '[Grid-Column]',
|
|
1065
|
+
standalone: false
|
|
1066
|
+
}]
|
|
1067
|
+
}], propDecorators: { Column: [{
|
|
1068
|
+
type: Input,
|
|
1069
|
+
args: ['Grid-Column']
|
|
1070
|
+
}], gridColumnStart: [{
|
|
1056
1071
|
type: HostBinding,
|
|
1057
|
-
args: ['style.grid-
|
|
1072
|
+
args: ['style.grid-column-start']
|
|
1058
1073
|
}] } });
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
this.Element = Element;
|
|
1063
|
-
this.Injector = Injector;
|
|
1074
|
+
class GridRowSpanDirective {
|
|
1075
|
+
get gridRowEnd() {
|
|
1076
|
+
return this.RowSpan !== undefined ? ('span ' + this.RowSpan) : undefined;
|
|
1064
1077
|
}
|
|
1065
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1066
|
-
static { this.ɵ
|
|
1078
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridRowSpanDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1079
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.6", type: GridRowSpanDirective, isStandalone: false, selector: "[Grid-RowSpan]", inputs: { RowSpan: ["Grid-RowSpan", "RowSpan"] }, host: { properties: { "style.grid-row-end": "this.gridRowEnd" } }, ngImport: i0 }); }
|
|
1067
1080
|
}
|
|
1068
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1069
|
-
type:
|
|
1070
|
-
args: [{
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
])
|
|
1088
|
-
] }); }
|
|
1081
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridRowSpanDirective, decorators: [{
|
|
1082
|
+
type: Directive,
|
|
1083
|
+
args: [{
|
|
1084
|
+
selector: '[Grid-RowSpan]',
|
|
1085
|
+
standalone: false
|
|
1086
|
+
}]
|
|
1087
|
+
}], propDecorators: { RowSpan: [{
|
|
1088
|
+
type: Input,
|
|
1089
|
+
args: ['Grid-RowSpan']
|
|
1090
|
+
}], gridRowEnd: [{
|
|
1091
|
+
type: HostBinding,
|
|
1092
|
+
args: ['style.grid-row-end']
|
|
1093
|
+
}] } });
|
|
1094
|
+
class GridColumnSpanDirective {
|
|
1095
|
+
get gridColumnEnd() {
|
|
1096
|
+
return this.ColumnSpan !== undefined ? ('span ' + this.ColumnSpan) : undefined;
|
|
1097
|
+
}
|
|
1098
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridColumnSpanDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1099
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.6", type: GridColumnSpanDirective, isStandalone: false, selector: "[Grid-ColumnSpan]", inputs: { ColumnSpan: ["Grid-ColumnSpan", "ColumnSpan"] }, host: { properties: { "style.grid-column-end": "this.gridColumnEnd" } }, ngImport: i0 }); }
|
|
1089
1100
|
}
|
|
1090
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1091
|
-
type:
|
|
1092
|
-
args: [{
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
class DropDownButtonComponent extends ButtonComponent {
|
|
1116
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DropDownButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1117
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: DropDownButtonComponent, isStandalone: true, selector: "DropDownButton", usesInheritance: true, ngImport: i0, template: `<div class="drop-down-glyph"></div><ng-content/>`, isInline: true, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked):active:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked):active:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:active:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked:active:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle:active:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle:active:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle:active:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle:active:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked):active:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked):active:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:active:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle:active:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n", ".drop-down-glyph{display:grid;font-family:var(--SymbolFontFamily);font-size:8pt;position:absolute;right:12px;top:0;bottom:0;align-content:center;transition:transform var(--ControlNormalAnimationDuration)}:host:active:not(.flyout-open):not(.disabled) .drop-down-glyph{transform:translateY(3px)}\n"] }); }
|
|
1101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridColumnSpanDirective, decorators: [{
|
|
1102
|
+
type: Directive,
|
|
1103
|
+
args: [{
|
|
1104
|
+
selector: '[Grid-ColumnSpan]',
|
|
1105
|
+
standalone: false
|
|
1106
|
+
}]
|
|
1107
|
+
}], propDecorators: { ColumnSpan: [{
|
|
1108
|
+
type: Input,
|
|
1109
|
+
args: ['Grid-ColumnSpan']
|
|
1110
|
+
}], gridColumnEnd: [{
|
|
1111
|
+
type: HostBinding,
|
|
1112
|
+
args: ['style.grid-column-end']
|
|
1113
|
+
}] } });
|
|
1114
|
+
const GridComponents = [
|
|
1115
|
+
GridComponent,
|
|
1116
|
+
GridDirective,
|
|
1117
|
+
GridRowDirective,
|
|
1118
|
+
GridRowSpanDirective,
|
|
1119
|
+
GridColumnDirective,
|
|
1120
|
+
GridColumnSpanDirective
|
|
1121
|
+
];
|
|
1122
|
+
class GridModule {
|
|
1123
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1124
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: GridModule, declarations: [GridComponent, GridDirective, GridRowDirective, GridRowSpanDirective, GridColumnDirective, GridColumnSpanDirective], exports: [GridComponent, GridDirective, GridRowDirective, GridRowSpanDirective, GridColumnDirective, GridColumnSpanDirective] }); }
|
|
1125
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridModule }); }
|
|
1118
1126
|
}
|
|
1119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1120
|
-
type:
|
|
1121
|
-
args: [{
|
|
1127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridModule, decorators: [{
|
|
1128
|
+
type: NgModule,
|
|
1129
|
+
args: [{
|
|
1130
|
+
declarations: GridComponents,
|
|
1131
|
+
exports: GridComponents
|
|
1132
|
+
}]
|
|
1122
1133
|
}] });
|
|
1123
1134
|
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
get transitionClass() {
|
|
1131
|
-
return 'transition-' + this.TransitionAnimation.toLowerCase();
|
|
1135
|
+
//A ColorSpectrum with sliders for the two channels the wheel itself cannot show
|
|
1136
|
+
//a position for. The spectrum holds the color; this decides which channels the
|
|
1137
|
+
//user can reach and publishes the result.
|
|
1138
|
+
class ColorPickerComponent extends FrameworkElementComponent {
|
|
1139
|
+
get Color() {
|
|
1140
|
+
return this._color;
|
|
1132
1141
|
}
|
|
1133
|
-
|
|
1134
|
-
|
|
1142
|
+
set Color(value) {
|
|
1143
|
+
if (value === this.Color)
|
|
1144
|
+
return;
|
|
1145
|
+
this._color = value;
|
|
1146
|
+
this.updateChannelColors();
|
|
1147
|
+
this.ColorChange.emit(this.Color);
|
|
1135
1148
|
}
|
|
1136
|
-
|
|
1137
|
-
|
|
1149
|
+
constructor(_host) {
|
|
1150
|
+
super();
|
|
1151
|
+
this._host = _host;
|
|
1152
|
+
this.IsAlphaEnabled = false;
|
|
1153
|
+
this.IsBrightnessEnabled = false;
|
|
1154
|
+
this._color = 0xffffffff;
|
|
1155
|
+
this.ColorChange = new EventEmitter();
|
|
1138
1156
|
}
|
|
1139
|
-
|
|
1140
|
-
|
|
1157
|
+
ngAfterViewInit() {
|
|
1158
|
+
//Seed the slider track gradients; nothing has changed yet to trigger an update.
|
|
1159
|
+
this.updateChannelColors();
|
|
1160
|
+
}
|
|
1161
|
+
//Publish the selected hue and saturation, at full brightness and at the
|
|
1162
|
+
//current one, as CSS custom properties for the slider track gradients.
|
|
1163
|
+
updateChannelColors() {
|
|
1164
|
+
let hsva = ColorRgba.FromNumber(this._color).ToHsva();
|
|
1165
|
+
let full = new ColorHsva(hsva.H, hsva.S, 1, 1).ToRgba();
|
|
1166
|
+
let opaque = new ColorHsva(hsva.H, hsva.S, hsva.V, 1).ToRgba();
|
|
1167
|
+
this._host.nativeElement.style.setProperty('--full-color', full.ToString());
|
|
1168
|
+
this._host.nativeElement.style.setProperty('--opaque-color', opaque.ToString());
|
|
1169
|
+
}
|
|
1170
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ColorPickerComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1171
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ColorPickerComponent, isStandalone: true, selector: "ColorPicker", inputs: { IsAlphaEnabled: "IsAlphaEnabled", IsBrightnessEnabled: "IsBrightnessEnabled", Color: "Color" }, outputs: { ColorChange: "ColorChange" }, usesInheritance: true, ngImport: i0, template: `<Grid RowDefinitions="1fr auto auto" RowSpacing="3px">
|
|
1172
|
+
<ColorSpectrum #spectrum [(Color)]="Color" [Width]="Width" [Height]="Width"/>
|
|
1173
|
+
<Slider *ngIf="IsBrightnessEnabled" class="channel-slider brightness"
|
|
1174
|
+
[Minimum]="0" [Maximum]="1" [(Value)]="spectrum.Brightness"/>
|
|
1175
|
+
<Slider *ngIf="IsAlphaEnabled" class="channel-slider alpha"
|
|
1176
|
+
[Minimum]="0" [Maximum]="1" [(Value)]="spectrum.Alpha"/>
|
|
1177
|
+
</Grid>`, isInline: true, styles: [":host{display:grid}ColorSpectrum{align-self:center}.channel-slider.brightness ::ng-deep .track.horizontal{background:linear-gradient(to right,#000000,var(--full-color, #ffffff))}.channel-slider.alpha ::ng-deep .track.horizontal{background:linear-gradient(to right,transparent,var(--opaque-color, #ffffff)) 0 0/100% 100% no-repeat,conic-gradient(from 90deg,#ccc 25%,#fff 0 50%,#ccc 0 75%,#fff 0) 0 0/8px 8px repeat,#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ColorSpectrumComponent, selector: "ColorSpectrum", inputs: ["Color", "Brightness", "Alpha"], outputs: ["HsvColorChange", "ColorChange"] }, { kind: "component", type: SliderComponent, selector: "Slider", inputs: ["Minimum", "Maximum", "StepFrequency", "Value", "IsEnabled", "Orientation"], outputs: ["ValueChange"] }, { kind: "ngmodule", type: GridModule }, { kind: "component", type: GridComponent, selector: "Grid", inputs: ["ColumnDefinitions", "RowDefinitions", "AutoColumnDefinition", "AutoRowDefinition", "ColumnSpacing", "RowSpacing", "Orientation"] }] }); }
|
|
1141
1178
|
}
|
|
1142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1179
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ColorPickerComponent, decorators: [{
|
|
1143
1180
|
type: Component,
|
|
1144
|
-
args: [{ selector: '
|
|
1145
|
-
|
|
1181
|
+
args: [{ selector: 'ColorPicker', imports: [CommonModule, ColorSpectrumComponent, SliderComponent, GridModule], template: `<Grid RowDefinitions="1fr auto auto" RowSpacing="3px">
|
|
1182
|
+
<ColorSpectrum #spectrum [(Color)]="Color" [Width]="Width" [Height]="Width"/>
|
|
1183
|
+
<Slider *ngIf="IsBrightnessEnabled" class="channel-slider brightness"
|
|
1184
|
+
[Minimum]="0" [Maximum]="1" [(Value)]="spectrum.Brightness"/>
|
|
1185
|
+
<Slider *ngIf="IsAlphaEnabled" class="channel-slider alpha"
|
|
1186
|
+
[Minimum]="0" [Maximum]="1" [(Value)]="spectrum.Alpha"/>
|
|
1187
|
+
</Grid>`, styles: [":host{display:grid}ColorSpectrum{align-self:center}.channel-slider.brightness ::ng-deep .track.horizontal{background:linear-gradient(to right,#000000,var(--full-color, #ffffff))}.channel-slider.alpha ::ng-deep .track.horizontal{background:linear-gradient(to right,transparent,var(--opaque-color, #ffffff)) 0 0/100% 100% no-repeat,conic-gradient(from 90deg,#ccc 25%,#fff 0 50%,#ccc 0 75%,#fff 0) 0 0/8px 8px repeat,#fff}\n"] }]
|
|
1188
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { IsAlphaEnabled: [{
|
|
1146
1189
|
type: Input
|
|
1147
|
-
}],
|
|
1190
|
+
}], IsBrightnessEnabled: [{
|
|
1148
1191
|
type: Input
|
|
1149
|
-
}, {
|
|
1150
|
-
type: HostBinding,
|
|
1151
|
-
args: ['style.padding']
|
|
1152
|
-
}], IsVisible: [{
|
|
1192
|
+
}], Color: [{
|
|
1153
1193
|
type: Input
|
|
1154
|
-
}],
|
|
1155
|
-
type:
|
|
1156
|
-
args: ['class']
|
|
1157
|
-
}], visible: [{
|
|
1158
|
-
type: HostBinding,
|
|
1159
|
-
args: ['class.visible']
|
|
1160
|
-
}], onContextMenu: [{
|
|
1161
|
-
type: HostListener,
|
|
1162
|
-
args: ['contextmenu', ['$event']]
|
|
1194
|
+
}], ColorChange: [{
|
|
1195
|
+
type: Output
|
|
1163
1196
|
}] } });
|
|
1164
1197
|
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1198
|
+
const SelectorItemTemplate = `<ng-container *ngIf="ItemTemplate">
|
|
1199
|
+
<ng-container [ngTemplateOutlet]="ItemTemplate" [ngTemplateOutletContext]="{ $implicit: item }" [ngTemplateOutletInjector]="container.Injector" />
|
|
1200
|
+
</ng-container>
|
|
1201
|
+
<ng-container *ngIf="!ItemTemplate">{{ DisplayMemberPath && item !== null ? item[DisplayMemberPath] : item }}</ng-container>`;
|
|
1202
|
+
class SelectorComponent extends FrameworkElementComponent {
|
|
1203
|
+
set ItemTemplate(value) {
|
|
1204
|
+
this._inputItemTemplate = value;
|
|
1168
1205
|
}
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
}
|
|
1172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: XamlRootComponent, decorators: [{
|
|
1173
|
-
type: Component,
|
|
1174
|
-
args: [{ selector: 'XamlRoot', template: `<ng-content/>`, encapsulation: ViewEncapsulation.None, host: {
|
|
1175
|
-
'class': 'xaml-themed'
|
|
1176
|
-
}, styles: ["XamlRoot{all:initial;display:grid;overflow:hidden;-webkit-user-select:none;user-select:none;touch-action:none;box-sizing:border-box;font-family:var(--SystemFontFamily);font-size:var(--SystemFontSize);color:var(--TextFillColorPrimary);background:var(--WindowFillColorDefault)}.xaml-themed{--AcrylicBlur: var(--XamlUiOverrideAcrylicBlur, blur(12px));--ControlBorderThickness: var(--XamlUiOverrideControlBorderThickness, 1px);--ControlCornerRadius: var(--XamlUiOverrideControlCornerRadius, 4px);--OverlayCornerRadius: var(--XamlUiOverrideOverlayCornerRadius, 8px);--ButtonPadding: var(--XamlUiOverrideButtonPadding, 5px 11px);--SystemFontSize: var(--XamlUiOverrideSystemFontSize, 10pt);--SystemFontFamily: var(--XamlUiOverrideSystemFontFamily, \"Segoe UI\", Arial, sans-serif);--SymbolFontSize: var(--XamlUiOverrideSymbolFontSize, 10pt);--SymbolFontFamily: var(--XamlUiOverrideSymbolFontFamily, \"Segoe Fluent Icons\", \"Segoe MDL2 Assets\");--SystemAccentColor: var(--XamlUiOverrideSystemAccentColor, #0078d4);--SmokeFillColorDefault: var(--XamlUiOverrideSmokeFillColorDefault, #0000004D);--ControlNormalAnimationDuration: var(--XamlUiOverrideControlNormalAnimationDuration, .25s);--ControlFastAnimationDuration: var(--XamlUiOverrideControlFastAnimationDuration, .167s);--ControlFasterAnimationDuration: var(--XamlUiOverrideControlFasterAnimationDuration, 83ms);--WindowFillColorDefault: var(--XamlUiOverrideWindowFillColorDefault, #202020FF);--ControlFillColorDefault: var(--XamlUiOverrideControlFillColorDefault, #FFFFFF0F);--ControlFillColorSecondary: var(--XamlUiOverrideControlFillColorSecondary, #FFFFFF15);--ControlFillColorTertiary: var(--XamlUiOverrideControlFillColorTertiary, #FFFFFF08);--ControlFillColorDisabled: var(--XamlUiOverrideControlFillColorDisabled, #FFFFFF0B);--ControlFillColorInputActive: var(--XamlUiOverrideControlFillColorInputActive, #1E1E1EB3);--ControlSolidFillColorDefault: var(--XamlUiOverrideControlSolidFillColorDefault, #454545FF);--ControlAltFillColorSecondary: var(--XamlUiOverrideControlAltFillColorSecondary, #00000019);--ControlAltFillColorTertiary: var(--XamlUiOverrideControlAltFillColorTertiary, #FFFFFF0B);--ControlAltFillColorQuarternary: var(--XamlUiOverrideControlAltFillColorQuarternary, #FFFFFF12);--ControlAltFillColorDisabled: var(--XamlUiOverrideControlAltFillColorDisabled, #FFFFFF00);--ControlStrongFillColorDefault: var(--XamlUiOverrideControlStrongFillColorDefault, #FFFFFF8B);--ControlStrongFillColorDisabled: var(--XamlUiOverrideControlStrongFillColorDisabled, #FFFFFF3F);--ControlFillColorTransparent: var(--XamlUiOverrideControlFillColorTransparent, #FFFFFF00);--SubtleFillColorTransparent: var(--XamlUiOverrideSubtleFillColorTransparent, #FFFFFF00);--SubtleFillColorSecondary: var(--XamlUiOverrideSubtleFillColorSecondary, #FFFFFF0F);--SubtleFillColorTertiary: var(--XamlUiOverrideSubtleFillColorTertiary, #FFFFFF0A);--AccentFillColorDefault: var(--XamlUiOverrideAccentFillColorDefault, #4CC2FFFF);--AccentFillColorSecondary: var(--XamlUiOverrideAccentFillColorSecondary, #4CC2FFE6);--AccentFillColorTertiary: var(--XamlUiOverrideAccentFillColorTertiary, #4CC2FFCC);--AccentFillColorDisabled: var(--XamlUiOverrideAccentFillColorDisabled, #FFFFFF28);--SystemControlHighlightListAccentLow: var(--XamlUiOverrideSystemControlHighlightListAccentLow, #0078D499);--SystemControlHighlightListAccentMedium: var(--XamlUiOverrideSystemControlHighlightListAccentMedium, #0078D4CC);--SystemControlHighlightListAccentHigh: var(--XamlUiOverrideSystemControlHighlightListAccentHigh, #0078D4E6);--ControlStrokeColorDefault: var(--XamlUiOverrideControlStrokeColorDefault, #FFFFFF12);--ControlStrongStrokeColorDefault: var(--XamlUiOverrideControlStrongStrokeColorDefault, #FFFFFF8B);--ControlStrongStrokeColorDisabled: var(--XamlUiOverrideControlStrongStrokeColorDisabled, #FFFFFF28);--ControlStrokeColorOnAccentDefault: var(--XamlUiOverrideControlStrokeColorOnAccentDefault, #FFFFFF14);--TextFillColorPrimary: var(--XamlUiOverrideTextFillColorPrimary, #FFFFFFFF);--TextFillColorSecondary: var(--XamlUiOverrideTextFillColorSecondary, #FFFFFFC5);--TextFillColorDisabled: var(--XamlUiOverrideTextFillColorDisabled, #FFFFFF5D);--TextOnAccentFillColorSelected: var(--XamlUiOverrideTextOnAccentFillColorSelected, #FFFFFFFF);--TextOnAccentFillColorPrimary: var(--XamlUiOverrideTextOnAccentFillColorPrimary, #000000);--TextOnAccentFillColorSecondary: var(--XamlUiOverrideTextOnAccentFillColorSecondary, #00000080);--TextOnAccentFillColorDisabled: var(--XamlUiOverrideTextOnAccentFillColorDisabled, #FFFFFF87);--SurfaceStrokeColorFlyout: var(--XamlUiOverrideSurfaceStrokeColorFlyout, #00000033);--AcrylicInAppFillColorDefault: var(--XamlUiOverrideAcrylicInAppFillColorDefault, #2C2C2C26);--SystemChromeMediumLowColor: var(--XamlUiOverrideSystemChromeMediumLowColor, #2B2B2BFF);--DividerStrokeColorDefault: var(--XamlUiOverrideDividerStrokeColorDefault, #FFFFFF15);--LayerFillColorAlt: var(--XamlUiOverrideLayerFillColorAlt, #FFFFFF0D);--SurfaceStrokeColorDefault: var(--XamlUiOverrideSurfaceStrokeColorDefault, #75757566)}@media (prefers-color-scheme: light){.xaml-themed{--WindowFillColorDefault: var(--XamlUiOverrideWindowFillColorDefault, #F3F3F3FF);--ControlFillColorDefault: var(--XamlUiOverrideControlFillColorDefault, #FFFFFFB3);--ControlFillColorSecondary: var(--XamlUiOverrideControlFillColorSecondary, #F9F9F980);--ControlFillColorTertiary: var(--XamlUiOverrideControlFillColorTertiary, #F9F9F94D);--ControlFillColorDisabled: var(--XamlUiOverrideControlFillColorDisabled, #F9F9F94D);--ControlFillColorInputActive: var(--XamlUiOverrideControlFillColorInputActive, #FFFFFF);--ControlSolidFillColorDefault: var(--XamlUiOverrideControlSolidFillColorDefault, #FFFFFFFF);--ControlAltFillColorSecondary: var(--XamlUiOverrideControlAltFillColorSecondary, #00000006);--ControlAltFillColorTertiary: var(--XamlUiOverrideControlAltFillColorTertiary, #0000000F);--ControlAltFillColorQuarternary: var(--XamlUiOverrideControlAltFillColorQuarternary, #00000018);--ControlAltFillColorDisabled: var(--XamlUiOverrideControlAltFillColorDisabled, #FFFFFF00);--ControlStrongFillColorDefault: var(--XamlUiOverrideControlStrongFillColorDefault, #00000072);--ControlStrongFillColorDisabled: var(--XamlUiOverrideControlStrongFillColorDisabled, #00000051);--ControlFillColorTransparent: var(--XamlUiOverrideControlFillColorTransparent, #FFFFFF00);--SubtleFillColorTransparent: var(--XamlUiOverrideSubtleFillColorTransparent, #FFFFFF00);--SubtleFillColorSecondary: var(--XamlUiOverrideSubtleFillColorSecondary, #00000009);--SubtleFillColorTertiary: var(--XamlUiOverrideSubtleFillColorTertiary, #00000006);--AccentFillColorDefault: var(--XamlUiOverrideAccentFillColorDefault, #0067C0FF);--AccentFillColorSecondary: var(--XamlUiOverrideAccentFillColorSecondary, #0067C0E6);--AccentFillColorTertiary: var(--XamlUiOverrideAccentFillColorTertiary, #0067C0CC);--AccentFillColorDisabled: var(--XamlUiOverrideAccentFillColorDisabled, #FFFFFF37);--SystemControlHighlightListAccentLow: var(--XamlUiOverrideSystemControlHighlightListAccentLow, #0078D466);--SystemControlHighlightListAccentMedium: var(--XamlUiOverrideSystemControlHighlightListAccentMedium, #0078D499);--SystemControlHighlightListAccentHigh: var(--XamlUiOverrideSystemControlHighlightListAccentHigh, #0078D4B3);--ControlStrokeColorDefault: var(--XamlUiOverrideControlStrokeColorDefault, #0000000F);--ControlStrongStrokeColorDefault: var(--XamlUiOverrideControlStrongStrokeColorDefault, #00000072);--ControlStrongStrokeColorDisabled: var(--XamlUiOverrideControlStrongStrokeColorDisabled, #00000037);--ControlStrokeColorOnAccentDefault: var(--XamlUiOverrideControlStrokeColorOnAccentDefault, #FFFFFF14);--TextFillColorPrimary: var(--XamlUiOverrideTextFillColorPrimary, #000000E4);--TextFillColorSecondary: var(--XamlUiOverrideTextFillColorSecondary, #0000009E);--TextFillColorDisabled: var(--XamlUiOverrideTextFillColorDisabled, #0000005C);--TextOnAccentFillColorSelected: var(--XamlUiOverrideTextOnAccentFillColorSelected, #FFFFFFFF);--TextOnAccentFillColorPrimary: var(--XamlUiOverrideTextOnAccentFillColorPrimary, #FFFFFF);--TextOnAccentFillColorSecondary: var(--XamlUiOverrideTextOnAccentFillColorSecondary, #FFFFFFB3);--TextOnAccentFillColorDisabled: var(--XamlUiOverrideTextOnAccentFillColorDisabled, #FFFFFF);--SurfaceStrokeColorFlyout: var(--XamlUiOverrideSurfaceStrokeColorFlyout, #0000000F);--AcrylicInAppFillColorDefault: var(--XamlUiOverrideAcrylicInAppFillColorDefault, #FCFCFC26);--SystemChromeMediumLowColor: var(--XamlUiOverrideSystemChromeMediumLowColor, #F2F2F2FF);--DividerStrokeColorDefault: var(--XamlUiOverrideDividerStrokeColorDefault, #0000000F);--LayerFillColorAlt: var(--XamlUiOverrideLayerFillColorAlt, #FFFFFF);--SurfaceStrokeColorDefault: var(--XamlUiOverrideSurfaceStrokeColorDefault, #75757566)}}.xaml-flyout-overlay-backdrop{background:transparent}.xaml-dialog-overlay-backdrop{background:var(--SmokeFillColorDefault)}.cdk-overlay-pane.xaml-overlay-pane{display:grid!important}.cdk-overlay-pane.xaml-overlay-pane XamlRoot{overflow:visible;background:transparent}\n"] }]
|
|
1177
|
-
}], propDecorators: { onContextMenu: [{
|
|
1178
|
-
type: HostListener,
|
|
1179
|
-
args: ['contextmenu', ['$event']]
|
|
1180
|
-
}] } });
|
|
1181
|
-
|
|
1182
|
-
const PopupTemplate = `<ng-template #template><XamlRoot><FlyoutPresenter #presenter [IsVisible]="isVisible" [TransitionAnimation]="transitionAnimation" [Padding]="Padding"><ng-content/></FlyoutPresenter></XamlRoot></ng-template>`;
|
|
1183
|
-
class FlyoutBaseComponent {
|
|
1184
|
-
get IsOpen() {
|
|
1185
|
-
return this._isOpen;
|
|
1206
|
+
get ItemTemplate() {
|
|
1207
|
+
return this._inputItemTemplate ?? this._contentItemTemplate;
|
|
1186
1208
|
}
|
|
1187
|
-
|
|
1188
|
-
|
|
1209
|
+
get alignContent() {
|
|
1210
|
+
return ToAlignment(this.VerticalContentAlignment);
|
|
1211
|
+
}
|
|
1212
|
+
get justifyContent() {
|
|
1213
|
+
return ToJustification(this.HorizontalContentAlignment);
|
|
1214
|
+
}
|
|
1215
|
+
get disabled() {
|
|
1216
|
+
return !this.IsEnabled;
|
|
1217
|
+
}
|
|
1218
|
+
get ItemSource() {
|
|
1219
|
+
return this._itemSource;
|
|
1220
|
+
}
|
|
1221
|
+
set ItemSource(value) {
|
|
1222
|
+
let oldIndex = this.SelectedIndex;
|
|
1223
|
+
let oldValue = this.SelectedValue;
|
|
1224
|
+
let oldItem = this.SelectedItem;
|
|
1225
|
+
let newIndex = value.findIndex(p => this.getValue(-1, p) == oldValue);
|
|
1226
|
+
let newValue = newIndex !== -1 ? oldValue : null;
|
|
1227
|
+
let newItem = newIndex !== -1 ? value[newIndex] : null;
|
|
1228
|
+
this._itemSource = value;
|
|
1229
|
+
this._selectedIndex = newIndex;
|
|
1230
|
+
if (oldIndex !== newIndex)
|
|
1231
|
+
this.SelectedIndexChange.emit(this.SelectedIndex);
|
|
1232
|
+
if (oldValue !== newValue)
|
|
1233
|
+
this.SelectedValueChange.emit(this.SelectedValue);
|
|
1234
|
+
if (oldItem !== newItem)
|
|
1235
|
+
this.SelectedItemChange.emit(this.SelectedItem);
|
|
1236
|
+
}
|
|
1237
|
+
get SelectedIndex() {
|
|
1238
|
+
return this._selectedIndex;
|
|
1239
|
+
}
|
|
1240
|
+
set SelectedIndex(value) {
|
|
1241
|
+
if (this.ItemSource === undefined)
|
|
1189
1242
|
return;
|
|
1190
|
-
this.
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
this.
|
|
1243
|
+
if (value < 0 && this.ItemSource.length > 0)
|
|
1244
|
+
value = -1;
|
|
1245
|
+
if (value >= this.ItemSource.length)
|
|
1246
|
+
value = this.ItemSource.length - 1;
|
|
1247
|
+
let oldIndex = this._selectedIndex;
|
|
1248
|
+
let oldValue = this.SelectedValue;
|
|
1249
|
+
let oldItem = this.SelectedItem;
|
|
1250
|
+
this._selectedIndex = value;
|
|
1251
|
+
let newIndex = this._selectedIndex;
|
|
1252
|
+
let newValue = this.SelectedValue;
|
|
1253
|
+
let newItem = this.SelectedItem;
|
|
1254
|
+
if (oldIndex !== newIndex)
|
|
1255
|
+
this.SelectedIndexChange.emit(this.SelectedIndex);
|
|
1256
|
+
if (oldValue !== newValue)
|
|
1257
|
+
this.SelectedValueChange.emit(this.SelectedValue);
|
|
1258
|
+
if (oldItem !== newItem)
|
|
1259
|
+
this.SelectedItemChange.emit(this.SelectedItem);
|
|
1198
1260
|
}
|
|
1199
|
-
|
|
1200
|
-
|
|
1261
|
+
//Selected value
|
|
1262
|
+
get SelectedValue() {
|
|
1263
|
+
if (this.SelectedIndex < 0 || this.SelectedIndex >= this.ItemSource.length)
|
|
1264
|
+
return null;
|
|
1265
|
+
return this.getValue(-1, this.ItemSource[this.SelectedIndex]);
|
|
1266
|
+
}
|
|
1267
|
+
set SelectedValue(value) {
|
|
1268
|
+
if (this.ItemSource === undefined)
|
|
1201
1269
|
return;
|
|
1202
|
-
|
|
1203
|
-
let positionStrategy = this._overlay
|
|
1204
|
-
.position()
|
|
1205
|
-
.flexibleConnectedTo(target)
|
|
1206
|
-
.withPositions([this.positioning])
|
|
1207
|
-
.withGrowAfterOpen(true)
|
|
1208
|
-
.withFlexibleDimensions(true)
|
|
1209
|
-
.withPush(true);
|
|
1210
|
-
this._overlayRef.updatePositionStrategy(positionStrategy);
|
|
1211
|
-
if (this.Placement === 'Cover') {
|
|
1212
|
-
this._overlayRef.updateSize(target);
|
|
1213
|
-
}
|
|
1270
|
+
this.SelectedIndex = this.ItemSource.findIndex(p => this.getValue(-1, p) == value);
|
|
1214
1271
|
}
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
scrollStrategy: this._overlay.scrollStrategies.reposition(),
|
|
1221
|
-
backdropClass: 'xaml-flyout-overlay-backdrop'
|
|
1222
|
-
});
|
|
1223
|
-
this._overlayRef = this._overlay.create(config);
|
|
1224
|
-
this.OnOverlay(this._overlayRef);
|
|
1225
|
-
//Configure overlay placement
|
|
1226
|
-
this.updatePlacement();
|
|
1227
|
-
//Display overlay
|
|
1228
|
-
let templatePortal = new TemplatePortal(this._template, this._viewContainerRef);
|
|
1229
|
-
this._overlayRef.attach(templatePortal);
|
|
1230
|
-
//Ensure backdrop event handling
|
|
1231
|
-
this._overlayRef.backdropClick().subscribe(() => this.Hide());
|
|
1232
|
-
if (this.HasBackdrop)
|
|
1233
|
-
this._backdropContextMenuSubscription = this._renderer.listen(this._overlayRef.backdropElement, 'contextmenu', p => { p.preventDefault(); this.Hide(); });
|
|
1234
|
-
//Make content visible - after next layout
|
|
1235
|
-
await resume_after(0);
|
|
1236
|
-
this.isVisible = true;
|
|
1272
|
+
//Selected item
|
|
1273
|
+
get SelectedItem() {
|
|
1274
|
+
if (this.SelectedIndex < 0 || this.SelectedIndex >= this.ItemSource.length)
|
|
1275
|
+
return null;
|
|
1276
|
+
return this.ItemSource[this.SelectedIndex];
|
|
1237
1277
|
}
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
this.isVisible = false;
|
|
1241
|
-
//Remove event handlers
|
|
1242
|
-
if (this._backdropContextMenuSubscription)
|
|
1243
|
-
this._backdropContextMenuSubscription();
|
|
1244
|
-
//Dispose overlay after hidden
|
|
1245
|
-
if (this._overlayRef === undefined)
|
|
1278
|
+
set SelectedItem(value) {
|
|
1279
|
+
if (this.ItemSource === undefined)
|
|
1246
1280
|
return;
|
|
1247
|
-
|
|
1248
|
-
this._overlayRef.detach();
|
|
1249
|
-
this._overlayRef.dispose();
|
|
1250
|
-
this._overlayRef = undefined;
|
|
1281
|
+
this.SelectedIndex = this.ItemSource.findIndex(value);
|
|
1251
1282
|
}
|
|
1252
|
-
|
|
1253
|
-
|
|
1283
|
+
onItemClick(event, index, item) {
|
|
1284
|
+
if (!this.IsEnabled)
|
|
1285
|
+
return;
|
|
1286
|
+
if (this.SelectedIndex !== index) {
|
|
1287
|
+
this.SelectedIndex = index;
|
|
1288
|
+
event.stopPropagation();
|
|
1289
|
+
}
|
|
1290
|
+
this.ItemClick.emit(index);
|
|
1254
1291
|
}
|
|
1255
|
-
|
|
1256
|
-
this.
|
|
1257
|
-
this.updatePlacement();
|
|
1292
|
+
GetElement(index) {
|
|
1293
|
+
return document.querySelector(`#xaml-selector-${this._id}-item-${index}`);
|
|
1258
1294
|
}
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1295
|
+
constructor() {
|
|
1296
|
+
super();
|
|
1297
|
+
this.IsEnabled = true;
|
|
1298
|
+
this.HorizontalContentAlignment = 'Left';
|
|
1299
|
+
this.VerticalContentAlignment = 'Center';
|
|
1300
|
+
//ItemSource
|
|
1301
|
+
this._itemSource = [];
|
|
1302
|
+
//Selected index
|
|
1303
|
+
this._selectedIndex = -1;
|
|
1304
|
+
this.SelectedIndexChange = new EventEmitter();
|
|
1305
|
+
this.SelectedValueChange = new EventEmitter();
|
|
1306
|
+
this.SelectedItemChange = new EventEmitter();
|
|
1307
|
+
this.ItemClick = new EventEmitter();
|
|
1308
|
+
//This is required otherwise the SelectedValuePath cannot be read
|
|
1309
|
+
this.getValue = (index, item) => {
|
|
1310
|
+
return this.SelectedValuePath !== undefined ? item[this.SelectedValuePath] : item;
|
|
1264
1311
|
};
|
|
1265
1312
|
}
|
|
1266
|
-
|
|
1267
|
-
|
|
1313
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1314
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: SelectorComponent, isStandalone: true, selector: "Selector", inputs: { ItemTemplate: "ItemTemplate", IsEnabled: "IsEnabled", HorizontalContentAlignment: "HorizontalContentAlignment", VerticalContentAlignment: "VerticalContentAlignment", ItemSource: "ItemSource", SelectedIndex: "SelectedIndex", SelectedValue: "SelectedValue", SelectedItem: "SelectedItem", DisplayMemberPath: "DisplayMemberPath", SelectedValuePath: "SelectedValuePath" }, outputs: { SelectedIndexChange: "SelectedIndexChange", SelectedValueChange: "SelectedValueChange", SelectedItemChange: "SelectedItemChange", ItemClick: "ItemClick" }, host: { properties: { "class.disabled": "this.disabled" } }, queries: [{ propertyName: "_contentItemTemplate", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
1315
|
+
}
|
|
1316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SelectorComponent, decorators: [{
|
|
1317
|
+
type: Component,
|
|
1318
|
+
args: [{
|
|
1319
|
+
selector: 'Selector',
|
|
1320
|
+
template: '',
|
|
1321
|
+
}]
|
|
1322
|
+
}], ctorParameters: () => [], propDecorators: { _contentItemTemplate: [{
|
|
1323
|
+
type: ContentChild,
|
|
1324
|
+
args: [TemplateRef]
|
|
1325
|
+
}], ItemTemplate: [{
|
|
1326
|
+
type: Input
|
|
1327
|
+
}], IsEnabled: [{
|
|
1328
|
+
type: Input
|
|
1329
|
+
}], HorizontalContentAlignment: [{
|
|
1330
|
+
type: Input
|
|
1331
|
+
}], VerticalContentAlignment: [{
|
|
1332
|
+
type: Input
|
|
1333
|
+
}], disabled: [{
|
|
1334
|
+
type: HostBinding,
|
|
1335
|
+
args: ['class.disabled']
|
|
1336
|
+
}], ItemSource: [{
|
|
1337
|
+
type: Input
|
|
1338
|
+
}], SelectedIndex: [{
|
|
1339
|
+
type: Input
|
|
1340
|
+
}], SelectedIndexChange: [{
|
|
1341
|
+
type: Output
|
|
1342
|
+
}], SelectedValue: [{
|
|
1343
|
+
type: Input
|
|
1344
|
+
}], SelectedValueChange: [{
|
|
1345
|
+
type: Output
|
|
1346
|
+
}], SelectedItem: [{
|
|
1347
|
+
type: Input
|
|
1348
|
+
}], SelectedItemChange: [{
|
|
1349
|
+
type: Output
|
|
1350
|
+
}], DisplayMemberPath: [{
|
|
1351
|
+
type: Input
|
|
1352
|
+
}], SelectedValuePath: [{
|
|
1353
|
+
type: Input
|
|
1354
|
+
}], ItemClick: [{
|
|
1355
|
+
type: Output
|
|
1356
|
+
}] } });
|
|
1357
|
+
|
|
1358
|
+
class ScrollBarComponent extends FrameworkElementComponent {
|
|
1359
|
+
constructor() {
|
|
1360
|
+
super(...arguments);
|
|
1361
|
+
this.Orientation = 'Vertical';
|
|
1362
|
+
this.ViewportSize = 0;
|
|
1363
|
+
this.ScrollSize = 0;
|
|
1364
|
+
this.StepSize = 5;
|
|
1365
|
+
this._value = 0;
|
|
1366
|
+
this.ValueChange = new EventEmitter();
|
|
1367
|
+
this.IsEnabled = true;
|
|
1368
|
+
this._isScrolling = false;
|
|
1369
|
+
this._startPointerPosition = 0;
|
|
1370
|
+
this._startScrollPosition = 0;
|
|
1268
1371
|
}
|
|
1269
|
-
get
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
case "LeftEdgeAlignedTop":
|
|
1307
|
-
return {
|
|
1308
|
-
originX: 'start', originY: 'top',
|
|
1309
|
-
overlayX: 'end', overlayY: 'top'
|
|
1310
|
-
};
|
|
1311
|
-
case "LeftEdgeAlignedBottom":
|
|
1312
|
-
return {
|
|
1313
|
-
originX: 'start', originY: 'bottom',
|
|
1314
|
-
overlayX: 'end', overlayY: 'bottom'
|
|
1315
|
-
};
|
|
1316
|
-
case "Right":
|
|
1317
|
-
return {
|
|
1318
|
-
originX: 'end', originY: 'center',
|
|
1319
|
-
overlayX: 'start', overlayY: 'center'
|
|
1320
|
-
};
|
|
1321
|
-
case "RightEdgeAlignedTop":
|
|
1322
|
-
return {
|
|
1323
|
-
originX: 'end', originY: 'top',
|
|
1324
|
-
overlayX: 'start', overlayY: 'top'
|
|
1325
|
-
};
|
|
1326
|
-
case "RightEdgeAlignedBottom":
|
|
1372
|
+
get Value() {
|
|
1373
|
+
return this._value;
|
|
1374
|
+
}
|
|
1375
|
+
;
|
|
1376
|
+
set Value(value) {
|
|
1377
|
+
let scrollRange = this.ScrollSize - this.ViewportSize;
|
|
1378
|
+
if (value > scrollRange)
|
|
1379
|
+
value = scrollRange;
|
|
1380
|
+
if (value < 0)
|
|
1381
|
+
value = 0;
|
|
1382
|
+
this._value = value;
|
|
1383
|
+
this.ValueChange.emit(value);
|
|
1384
|
+
}
|
|
1385
|
+
get decreaseGlyph() {
|
|
1386
|
+
return this.Orientation === 'Vertical' ? '\ueddb' : '\uedd9';
|
|
1387
|
+
}
|
|
1388
|
+
get increaseGlyph() {
|
|
1389
|
+
return this.Orientation === 'Vertical' ? '\ueddc' : '\uedda';
|
|
1390
|
+
}
|
|
1391
|
+
get class() {
|
|
1392
|
+
return this.Orientation.toLowerCase();
|
|
1393
|
+
}
|
|
1394
|
+
getElementSize(element) {
|
|
1395
|
+
return this.Orientation === 'Vertical' ? element.offsetHeight : element.offsetWidth;
|
|
1396
|
+
}
|
|
1397
|
+
getPointerPosition(event) {
|
|
1398
|
+
return this.Orientation === 'Vertical' ? event.clientY : event.clientX;
|
|
1399
|
+
}
|
|
1400
|
+
get thumbStyle() {
|
|
1401
|
+
if (!this._track)
|
|
1402
|
+
return {};
|
|
1403
|
+
let trackLength = this.getElementSize(this._track.nativeElement);
|
|
1404
|
+
let scrollPosition = this.Value / (this.ScrollSize - this.ViewportSize);
|
|
1405
|
+
let size = trackLength * (this.ViewportSize / this.ScrollSize);
|
|
1406
|
+
let position = scrollPosition * (trackLength - size);
|
|
1407
|
+
switch (this.Orientation) {
|
|
1408
|
+
case 'Vertical':
|
|
1327
1409
|
return {
|
|
1328
|
-
|
|
1329
|
-
|
|
1410
|
+
'height': size + 'px',
|
|
1411
|
+
'top': position + 'px'
|
|
1330
1412
|
};
|
|
1331
|
-
case
|
|
1413
|
+
case 'Horizontal':
|
|
1332
1414
|
return {
|
|
1333
|
-
|
|
1334
|
-
|
|
1415
|
+
'width': size + 'px',
|
|
1416
|
+
'left': position + 'px'
|
|
1335
1417
|
};
|
|
1336
1418
|
}
|
|
1337
1419
|
}
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
this.
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
this._renderer = _renderer;
|
|
1344
|
-
this.Placement = 'Top';
|
|
1345
|
-
this.HasBackdrop = true;
|
|
1346
|
-
this._isOpen = false;
|
|
1347
|
-
this.IsOpenChange = new EventEmitter();
|
|
1348
|
-
this.isVisible = false;
|
|
1349
|
-
this._target = null;
|
|
1420
|
+
onButtonDown(event, direction) {
|
|
1421
|
+
event.target.setPointerCapture(event.pointerId);
|
|
1422
|
+
this._interval = setInterval(() => {
|
|
1423
|
+
this.Value += direction ? this.StepSize : -this.StepSize;
|
|
1424
|
+
}, 50);
|
|
1350
1425
|
}
|
|
1351
|
-
|
|
1352
|
-
|
|
1426
|
+
onButtonUp(event) {
|
|
1427
|
+
event.target.releasePointerCapture(event.pointerId);
|
|
1428
|
+
clearInterval(this._interval);
|
|
1353
1429
|
}
|
|
1354
|
-
|
|
1430
|
+
onTrackDown(event) {
|
|
1431
|
+
let direction;
|
|
1432
|
+
if (this.Orientation === 'Vertical') {
|
|
1433
|
+
if (event.offsetY < this._thumb.nativeElement.offsetTop) {
|
|
1434
|
+
direction = false;
|
|
1435
|
+
}
|
|
1436
|
+
if (this._thumb.nativeElement.offsetTop + this._thumb.nativeElement.offsetHeight < event.offsetY) {
|
|
1437
|
+
direction = true;
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
else {
|
|
1441
|
+
if (event.offsetX < this._thumb.nativeElement.offsetLeft) {
|
|
1442
|
+
direction = false;
|
|
1443
|
+
}
|
|
1444
|
+
if (this._thumb.nativeElement.offsetLeft + this._thumb.nativeElement.offsetWidth < event.offsetX) {
|
|
1445
|
+
direction = true;
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
if (direction === undefined)
|
|
1449
|
+
return;
|
|
1450
|
+
event.target.setPointerCapture(event.pointerId);
|
|
1451
|
+
this.Value += direction ? this.ViewportSize : -this.ViewportSize;
|
|
1452
|
+
this._interval = setInterval(() => {
|
|
1453
|
+
this.Value += direction ? this.ViewportSize : -this.ViewportSize;
|
|
1454
|
+
}, 250);
|
|
1355
1455
|
}
|
|
1356
|
-
|
|
1357
|
-
|
|
1456
|
+
onTrackUp(event) {
|
|
1457
|
+
event.target.releasePointerCapture(event.pointerId);
|
|
1458
|
+
clearInterval(this._interval);
|
|
1358
1459
|
}
|
|
1359
|
-
|
|
1360
|
-
|
|
1460
|
+
onPointerDown(event) {
|
|
1461
|
+
if (event.buttons !== 1)
|
|
1462
|
+
return;
|
|
1463
|
+
this._thumb.nativeElement.setPointerCapture(event.pointerId);
|
|
1464
|
+
this._isScrolling = true;
|
|
1465
|
+
this._startPointerPosition = this.getPointerPosition(event);
|
|
1466
|
+
this._startScrollPosition = this.Value;
|
|
1467
|
+
event.stopPropagation();
|
|
1361
1468
|
}
|
|
1362
|
-
|
|
1363
|
-
|
|
1469
|
+
onPointerMove(event) {
|
|
1470
|
+
if (!this._isScrolling)
|
|
1471
|
+
return;
|
|
1472
|
+
if (event.buttons !== 1) {
|
|
1473
|
+
this._isScrolling = false;
|
|
1474
|
+
return;
|
|
1475
|
+
}
|
|
1476
|
+
let delta = this.getPointerPosition(event) - this._startPointerPosition;
|
|
1477
|
+
let trackLength = this.getElementSize(this._track.nativeElement);
|
|
1478
|
+
let thumbLength = this.getElementSize(this._thumb.nativeElement);
|
|
1479
|
+
let scrollPercent = delta / (trackLength - thumbLength);
|
|
1480
|
+
this.Value = this._startScrollPosition + scrollPercent * (this.ScrollSize - this.ViewportSize);
|
|
1481
|
+
event.stopPropagation();
|
|
1482
|
+
}
|
|
1483
|
+
onPointerUp(event) {
|
|
1484
|
+
if (event.buttons !== 1)
|
|
1485
|
+
return;
|
|
1486
|
+
this._isScrolling = false;
|
|
1487
|
+
this._thumb.nativeElement.releasePointerCapture(event.pointerId);
|
|
1488
|
+
event.stopPropagation();
|
|
1489
|
+
}
|
|
1490
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ScrollBarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1491
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ScrollBarComponent, isStandalone: true, selector: "ScrollBar", inputs: { Orientation: "Orientation", ViewportSize: "ViewportSize", ScrollSize: "ScrollSize", StepSize: "StepSize", Value: "Value", IsEnabled: "IsEnabled" }, outputs: { ValueChange: "ValueChange" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "_track", first: true, predicate: ["track"], descendants: true }, { propertyName: "_thumb", first: true, predicate: ["thumb"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<div class="buttons" (pointerdown)="onButtonDown($event, false)" (pointerup)="onButtonUp($event)">{{decreaseGlyph}}</div>
|
|
1492
|
+
<div #track class="track" (pointerdown)="onTrackDown($event)" (pointerup)="onTrackUp($event)">
|
|
1493
|
+
<div #thumb class="thumb" [ngStyle]="thumbStyle" (pointerdown)="onPointerDown($event)" (pointermove)="onPointerMove($event)" (pointerup)="onPointerUp($event)"></div>
|
|
1494
|
+
</div>
|
|
1495
|
+
<div class="buttons" (pointerdown)="onButtonDown($event, true)" (pointerup)="onButtonUp($event)">{{increaseGlyph}}</div>`, isInline: true, styles: [":host{position:relative}:host{display:grid;background-color:var(--SubtleFillColorTransparent)}:host.horizontal{grid-template-columns:auto 1fr auto}:host.horizontal>.buttons{align-self:center}:host.horizontal>.track{transform:translateY(-.75px);align-self:center;margin:0 -2px 0 -3px}:host.horizontal>.track>.thumb{transform:translateY(3px)}:host.vertical{grid-template-rows:auto 1fr auto}:host.vertical>.buttons{justify-self:center}:host.vertical>.track{transform:translate(-.75px);justify-self:center;margin:-3px 0 -2px}:host.vertical>.track>.thumb{transform:translate(3px)}:host:hover>.buttons{display:grid;opacity:1}:host:hover>.track>.thumb{min-width:10px;min-height:10px;transform:translate(0)}:host>.buttons{display:hidden;font-family:var(--SymbolFontFamily);font-size:8pt;min-width:12px;min-height:12px;margin:4px;transform-origin:center;opacity:0;transition:opacity var(--ControlNormalAnimationDuration);color:var(--ControlStrongFillColorDefault)}:host>.buttons:hover{color:var(--TextFillColorSecondary)}:host>.buttons:active{color:var(--TextFillColorSecondary);transform:scale(.875)}:host>.track{display:grid;position:relative}:host>.track>.thumb{background-color:var(--ControlStrongFillColorDefault);position:relative;border-radius:3px;transition:transform var(--ControlNormalAnimationDuration),min-width var(--ControlNormalAnimationDuration),min-height var(--ControlNormalAnimationDuration);min-width:2px;min-height:2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
1364
1496
|
}
|
|
1365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ScrollBarComponent, decorators: [{
|
|
1366
1498
|
type: Component,
|
|
1367
|
-
args: [{
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
}], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { Placement: [{
|
|
1499
|
+
args: [{ selector: 'ScrollBar', imports: [CommonModule], template: `<div class="buttons" (pointerdown)="onButtonDown($event, false)" (pointerup)="onButtonUp($event)">{{decreaseGlyph}}</div>
|
|
1500
|
+
<div #track class="track" (pointerdown)="onTrackDown($event)" (pointerup)="onTrackUp($event)">
|
|
1501
|
+
<div #thumb class="thumb" [ngStyle]="thumbStyle" (pointerdown)="onPointerDown($event)" (pointermove)="onPointerMove($event)" (pointerup)="onPointerUp($event)"></div>
|
|
1502
|
+
</div>
|
|
1503
|
+
<div class="buttons" (pointerdown)="onButtonDown($event, true)" (pointerup)="onButtonUp($event)">{{increaseGlyph}}</div>`, styles: [":host{position:relative}:host{display:grid;background-color:var(--SubtleFillColorTransparent)}:host.horizontal{grid-template-columns:auto 1fr auto}:host.horizontal>.buttons{align-self:center}:host.horizontal>.track{transform:translateY(-.75px);align-self:center;margin:0 -2px 0 -3px}:host.horizontal>.track>.thumb{transform:translateY(3px)}:host.vertical{grid-template-rows:auto 1fr auto}:host.vertical>.buttons{justify-self:center}:host.vertical>.track{transform:translate(-.75px);justify-self:center;margin:-3px 0 -2px}:host.vertical>.track>.thumb{transform:translate(3px)}:host:hover>.buttons{display:grid;opacity:1}:host:hover>.track>.thumb{min-width:10px;min-height:10px;transform:translate(0)}:host>.buttons{display:hidden;font-family:var(--SymbolFontFamily);font-size:8pt;min-width:12px;min-height:12px;margin:4px;transform-origin:center;opacity:0;transition:opacity var(--ControlNormalAnimationDuration);color:var(--ControlStrongFillColorDefault)}:host>.buttons:hover{color:var(--TextFillColorSecondary)}:host>.buttons:active{color:var(--TextFillColorSecondary);transform:scale(.875)}:host>.track{display:grid;position:relative}:host>.track>.thumb{background-color:var(--ControlStrongFillColorDefault);position:relative;border-radius:3px;transition:transform var(--ControlNormalAnimationDuration),min-width var(--ControlNormalAnimationDuration),min-height var(--ControlNormalAnimationDuration);min-width:2px;min-height:2px}\n"] }]
|
|
1504
|
+
}], propDecorators: { Orientation: [{
|
|
1374
1505
|
type: Input
|
|
1375
|
-
}],
|
|
1506
|
+
}], ViewportSize: [{
|
|
1376
1507
|
type: Input
|
|
1377
|
-
}],
|
|
1508
|
+
}], ScrollSize: [{
|
|
1378
1509
|
type: Input
|
|
1379
|
-
}],
|
|
1510
|
+
}], StepSize: [{
|
|
1380
1511
|
type: Input
|
|
1381
|
-
}],
|
|
1512
|
+
}], Value: [{
|
|
1513
|
+
type: Input
|
|
1514
|
+
}], ValueChange: [{
|
|
1382
1515
|
type: Output
|
|
1383
|
-
}],
|
|
1516
|
+
}], IsEnabled: [{
|
|
1384
1517
|
type: Input
|
|
1385
|
-
}],
|
|
1518
|
+
}], _track: [{
|
|
1386
1519
|
type: ViewChild,
|
|
1387
|
-
args: ['
|
|
1388
|
-
}],
|
|
1520
|
+
args: ['track']
|
|
1521
|
+
}], _thumb: [{
|
|
1522
|
+
type: ViewChild,
|
|
1523
|
+
args: ['thumb']
|
|
1524
|
+
}], class: [{
|
|
1389
1525
|
type: HostBinding,
|
|
1390
|
-
args: ['
|
|
1526
|
+
args: ['class']
|
|
1391
1527
|
}] } });
|
|
1392
1528
|
|
|
1393
|
-
class
|
|
1394
|
-
get
|
|
1395
|
-
switch (this.
|
|
1396
|
-
case
|
|
1397
|
-
|
|
1398
|
-
case
|
|
1399
|
-
return
|
|
1400
|
-
case
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
return 'SlideDown';
|
|
1404
|
-
case "Left":
|
|
1405
|
-
case "LeftEdgeAlignedTop":
|
|
1406
|
-
case "LeftEdgeAlignedBottom":
|
|
1407
|
-
return 'SlideLeft';
|
|
1408
|
-
case "Right":
|
|
1409
|
-
case "RightEdgeAlignedTop":
|
|
1410
|
-
case "RightEdgeAlignedBottom":
|
|
1411
|
-
return 'SlideRight';
|
|
1412
|
-
default:
|
|
1413
|
-
return 'Default';
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FlyoutComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1417
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: FlyoutComponent, isStandalone: true, selector: "Flyout", providers: [{ provide: 'xaml-flyout', useExisting: FlyoutComponent }], usesInheritance: true, ngImport: i0, template: "<ng-template #template><XamlRoot><FlyoutPresenter #presenter [IsVisible]=\"isVisible\" [TransitionAnimation]=\"transitionAnimation\" [Padding]=\"Padding\"><ng-content/></FlyoutPresenter></XamlRoot></ng-template>", isInline: true, styles: ["FlyoutPresenter{padding:16px}\n"], dependencies: [{ kind: "component", type: FlyoutPresenter, selector: "FlyoutPresenter", inputs: ["TransitionAnimation", "Padding", "IsVisible"] }, { kind: "component", type: XamlRootComponent, selector: "XamlRoot" }] }); }
|
|
1418
|
-
}
|
|
1419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FlyoutComponent, decorators: [{
|
|
1420
|
-
type: Component,
|
|
1421
|
-
args: [{ selector: 'Flyout', imports: [FlyoutPresenter, XamlRootComponent], template: PopupTemplate, providers: [{ provide: 'xaml-flyout', useExisting: FlyoutComponent }], styles: ["FlyoutPresenter{padding:16px}\n"] }]
|
|
1422
|
-
}] });
|
|
1423
|
-
|
|
1424
|
-
class ComboBoxComponent extends SelectorComponent {
|
|
1425
|
-
get item() {
|
|
1426
|
-
return this.SelectedItem;
|
|
1529
|
+
class ScrollViewerComponent extends FrameworkElementComponent {
|
|
1530
|
+
get IsHorizontalScrollBarVisible() {
|
|
1531
|
+
switch (this.HorizontalScrollMode) {
|
|
1532
|
+
case 'Disabled':
|
|
1533
|
+
return false;
|
|
1534
|
+
case 'Auto':
|
|
1535
|
+
return this.ViewportWidth < this.ExtentWidth;
|
|
1536
|
+
case 'Enabled':
|
|
1537
|
+
return true;
|
|
1538
|
+
}
|
|
1427
1539
|
}
|
|
1428
|
-
get
|
|
1429
|
-
|
|
1540
|
+
get IsVerticalScrollBarVisible() {
|
|
1541
|
+
switch (this.VerticalScrollMode) {
|
|
1542
|
+
case 'Disabled':
|
|
1543
|
+
return false;
|
|
1544
|
+
case 'Auto':
|
|
1545
|
+
return this.ViewportHeight < this.ExtentHeight;
|
|
1546
|
+
case 'Enabled':
|
|
1547
|
+
return true;
|
|
1548
|
+
}
|
|
1430
1549
|
}
|
|
1431
|
-
|
|
1550
|
+
get ExtentWidth() {
|
|
1551
|
+
return this._extentWidth;
|
|
1552
|
+
}
|
|
1553
|
+
get ExtentHeight() {
|
|
1554
|
+
return this._extentHeight;
|
|
1555
|
+
}
|
|
1556
|
+
get ViewportWidth() {
|
|
1557
|
+
return this._viewportWidth;
|
|
1558
|
+
}
|
|
1559
|
+
get ViewportHeight() {
|
|
1560
|
+
return this._viewportHeight;
|
|
1561
|
+
}
|
|
1562
|
+
get HorizontalOffset() {
|
|
1563
|
+
return this._horizontalOffset;
|
|
1564
|
+
}
|
|
1565
|
+
set HorizontalOffset(value) {
|
|
1566
|
+
const element = this._content?.nativeElement;
|
|
1567
|
+
if (element) {
|
|
1568
|
+
element.scrollLeft = value;
|
|
1569
|
+
this._horizontalOffset = element.scrollLeft;
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
get VerticalOffset() {
|
|
1573
|
+
return this._verticalOffset;
|
|
1574
|
+
}
|
|
1575
|
+
set VerticalOffset(value) {
|
|
1576
|
+
const element = this._content?.nativeElement;
|
|
1577
|
+
if (element) {
|
|
1578
|
+
element.scrollTop = value;
|
|
1579
|
+
this._verticalOffset = element.scrollTop;
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
get overflow() {
|
|
1583
|
+
return "hidden";
|
|
1584
|
+
}
|
|
1585
|
+
static toOverflow(value) {
|
|
1586
|
+
switch (value) {
|
|
1587
|
+
case 'Disabled':
|
|
1588
|
+
return 'hidden';
|
|
1589
|
+
case 'Enabled':
|
|
1590
|
+
return 'scroll';
|
|
1591
|
+
case 'Auto':
|
|
1592
|
+
return 'auto';
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
get contentStyle() {
|
|
1596
|
+
return {
|
|
1597
|
+
'overflow-x': ScrollViewerComponent.toOverflow(this.HorizontalScrollMode),
|
|
1598
|
+
'overflow-y': ScrollViewerComponent.toOverflow(this.VerticalScrollMode)
|
|
1599
|
+
};
|
|
1600
|
+
}
|
|
1601
|
+
constructor(_changeDetector, _zone) {
|
|
1432
1602
|
super();
|
|
1433
1603
|
this._changeDetector = _changeDetector;
|
|
1434
|
-
this.
|
|
1435
|
-
this.
|
|
1436
|
-
this.
|
|
1604
|
+
this._zone = _zone;
|
|
1605
|
+
this.HorizontalScrollMode = 'Auto';
|
|
1606
|
+
this.VerticalScrollMode = 'Auto';
|
|
1607
|
+
//Cached scroll metrics, refreshed by measure() on scroll and resize, so the template can bind them
|
|
1608
|
+
//without touching layout
|
|
1609
|
+
this._extentWidth = 0;
|
|
1610
|
+
this._extentHeight = 0;
|
|
1611
|
+
this._viewportWidth = 0;
|
|
1612
|
+
this._viewportHeight = 0;
|
|
1613
|
+
this._horizontalOffset = 0;
|
|
1614
|
+
this._verticalOffset = 0;
|
|
1615
|
+
this._isDestroyed = false;
|
|
1616
|
+
}
|
|
1617
|
+
/** Scrolls to an absolute offset, leaving omitted axes where they are. */
|
|
1618
|
+
ScrollTo(horizontalOffset, verticalOffset) {
|
|
1619
|
+
if (horizontalOffset !== undefined)
|
|
1620
|
+
this.HorizontalOffset = horizontalOffset;
|
|
1621
|
+
if (verticalOffset !== undefined)
|
|
1622
|
+
this.VerticalOffset = verticalOffset;
|
|
1623
|
+
}
|
|
1624
|
+
/** Scrolls by an offset relative to the current position. */
|
|
1625
|
+
ScrollBy(horizontalDelta, verticalDelta) {
|
|
1626
|
+
this.ScrollTo(this.HorizontalOffset + horizontalDelta, this.VerticalOffset + verticalDelta);
|
|
1627
|
+
}
|
|
1628
|
+
/** Scrolls an element of the content into view. */
|
|
1629
|
+
ScrollToElement(element, options = { block: 'nearest' }) {
|
|
1630
|
+
element.scrollIntoView(options);
|
|
1631
|
+
this.measure();
|
|
1437
1632
|
}
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
let rect = this._host.nativeElement.getBoundingClientRect();
|
|
1442
|
-
let popupOffset = -(this._selector?.GetElement(this.SelectedIndex)?.offsetTop ?? 0);
|
|
1443
|
-
this.target = { x: rect.left + 3, y: rect.top + popupOffset - 4, width: rect.width };
|
|
1633
|
+
onScroll() {
|
|
1634
|
+
//the scroll event already marks this component for check, just refresh the cached offsets
|
|
1635
|
+
this.measure();
|
|
1444
1636
|
}
|
|
1445
1637
|
ngAfterViewInit() {
|
|
1638
|
+
this.measure();
|
|
1639
|
+
this.observe();
|
|
1446
1640
|
//help the layout finish itself
|
|
1447
1641
|
this._changeDetector.detectChanges();
|
|
1448
1642
|
}
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1643
|
+
ngOnDestroy() {
|
|
1644
|
+
this._isDestroyed = true;
|
|
1645
|
+
this._resizeObserver?.disconnect();
|
|
1646
|
+
this._mutationObserver?.disconnect();
|
|
1647
|
+
}
|
|
1648
|
+
//Reads the live geometry of the content into the cached fields, called from scroll and observer
|
|
1649
|
+
//callbacks only, where the layout has already settled
|
|
1650
|
+
measure() {
|
|
1651
|
+
const element = this._content?.nativeElement;
|
|
1652
|
+
if (!element)
|
|
1653
|
+
return;
|
|
1654
|
+
this._extentWidth = element.scrollWidth;
|
|
1655
|
+
this._extentHeight = element.scrollHeight;
|
|
1656
|
+
this._viewportWidth = element.clientWidth;
|
|
1657
|
+
this._viewportHeight = element.clientHeight;
|
|
1658
|
+
this._horizontalOffset = element.scrollLeft;
|
|
1659
|
+
this._verticalOffset = element.scrollTop;
|
|
1660
|
+
}
|
|
1661
|
+
//Watches the content for size changes - the viewport resized, the content grown or shrunk - so the
|
|
1662
|
+
//scrollbars stay correct without polling layout on every change detection cycle
|
|
1663
|
+
observe() {
|
|
1664
|
+
const element = this._content?.nativeElement;
|
|
1665
|
+
if (!element || typeof ResizeObserver === 'undefined')
|
|
1666
|
+
return;
|
|
1667
|
+
this._zone.runOutsideAngular(() => {
|
|
1668
|
+
this._resizeObserver = new ResizeObserver(() => this.refresh());
|
|
1669
|
+
this.observeContent(element);
|
|
1670
|
+
if (typeof MutationObserver === 'undefined')
|
|
1671
|
+
return;
|
|
1672
|
+
//Children come and go as the projected content renders, and adding or removing one changes the
|
|
1673
|
+
//extent without resizing anything the ResizeObserver watches, so keep the watched set in sync
|
|
1674
|
+
this._mutationObserver = new MutationObserver(() => {
|
|
1675
|
+
if (this._isDestroyed)
|
|
1676
|
+
return;
|
|
1677
|
+
this.observeContent(element);
|
|
1678
|
+
this.refresh();
|
|
1679
|
+
});
|
|
1680
|
+
this._mutationObserver.observe(element, { childList: true });
|
|
1681
|
+
});
|
|
1477
1682
|
}
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
this.
|
|
1482
|
-
|
|
1483
|
-
this.
|
|
1484
|
-
this.
|
|
1485
|
-
|
|
1486
|
-
this.
|
|
1683
|
+
//The content element gives the viewport size and its children give the extent - any of them can be
|
|
1684
|
+
//the one which grows, so all of them are watched
|
|
1685
|
+
observeContent(element) {
|
|
1686
|
+
if (!this._resizeObserver)
|
|
1687
|
+
return;
|
|
1688
|
+
this._resizeObserver.disconnect();
|
|
1689
|
+
this._resizeObserver.observe(element);
|
|
1690
|
+
for (const child of Array.from(element.children))
|
|
1691
|
+
this._resizeObserver.observe(child);
|
|
1692
|
+
}
|
|
1693
|
+
//Refreshes the cached metrics and renders just this view - the observers run outside the zone, so
|
|
1694
|
+
//nothing else would pick the change up, and a scrollbar is not worth a global tick
|
|
1695
|
+
refresh() {
|
|
1696
|
+
if (this._isDestroyed)
|
|
1697
|
+
return;
|
|
1698
|
+
this.measure();
|
|
1699
|
+
this._changeDetector.detectChanges();
|
|
1487
1700
|
}
|
|
1488
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1489
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type:
|
|
1490
|
-
<
|
|
1491
|
-
<
|
|
1492
|
-
<div class="circle"></div>
|
|
1493
|
-
</div>
|
|
1494
|
-
<div class="content">
|
|
1495
|
-
<ng-content/>
|
|
1496
|
-
</div>
|
|
1497
|
-
</label>`, isInline: true, styles: [":host{position:relative}.container{display:grid;grid-template-columns:auto 1fr;column-gap:6px}input{display:none}input[type=radio]:checked+.radioButton>.circle{display:grid}input[type=radio]:not(:checked):not(:hover):not(:active):not(:disabled)+.radioButton{background-color:var(--ControlAltFillColorSecondary);border-color:var(--ControlStrongStrokeColorDefault)}input[type=radio]:not(:checked):hover:not(:active):not(:disabled)+.radioButton{background-color:var(--ControlAltFillColorTertiary);border-color:var(--ControlStrongStrokeColorDefault)}input[type=radio]:not(:checked):active:not(:disabled)+.radioButton{background-color:var(--SubtleFillColorTransparent);border-color:var(--ControlStrongStrokeColorDisabled)}input[type=radio]:not(:checked):active:not(:disabled)+.radioButton>.circle{transform:scale(1)}input[type=radio]:checked:not(:hover):not(:active):not(:disabled)+.radioButton{background-color:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault)}input[type=radio]:checked:not(:hover):not(:active):not(:disabled)+.radioButton>.circle{transform:scale(1)}input[type=radio]:checked:hover:not(:active):not(:disabled)+.radioButton{background-color:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary)}input[type=radio]:checked:hover:not(:active):not(:disabled)+.radioButton>.circle{transform:scale(1.2)}input[type=radio]:checked:active:not(:disabled)+.radioButton{background-color:var(--AccentFillColorTertiary);border-color:var(--AccentFillColorTertiary)}input[type=radio]:checked:active:not(:disabled)+.radioButton>.circle{transform:scale(1)}input[type=radio]:not(:checked):disabled+.radioButton{background-color:var(--ControlAltFillColorDisabled);border-color:var(--ControlStrongStrokeColorDisabled)}input[type=radio]:checked:disabled+.radioButton{background-color:var(--AccentFillColorDisabled);border-color:var(--ControlStrongStrokeColorDisabled)}.radioButton{display:grid;width:20px;height:20px;border-radius:11px;border-style:solid;border-width:var(--ControlBorderThickness);place-items:center;transition:border-color var(--ControlFastAnimationDuration);transition:background-color var(--ControlFastAnimationDuration)}.circle{width:10px;height:10px;border-radius:5px;background-color:var(--TextOnAccentFillColorPrimary);transition:transform var(--ControlNormalAnimationDuration);transform:scale(0)}.content{align-self:center}\n"] }); }
|
|
1701
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ScrollViewerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1702
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ScrollViewerComponent, isStandalone: true, selector: "ScrollViewer", inputs: { HorizontalScrollMode: "HorizontalScrollMode", VerticalScrollMode: "VerticalScrollMode" }, viewQueries: [{ propertyName: "_content", first: true, predicate: ["content"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<div #content class="content" [ngStyle]="contentStyle" (scroll)="onScroll()" cdkScrollable><ng-content/></div>
|
|
1703
|
+
<ScrollBar *ngIf="IsVerticalScrollBarVisible" HorizontalAlignment="Right" class="scrollbar" Orientation="Vertical" [ScrollSize]="ExtentHeight" [ViewportSize]="ViewportHeight" [(Value)]="VerticalOffset"/>
|
|
1704
|
+
<ScrollBar *ngIf="IsHorizontalScrollBarVisible" VerticalAlignment="Bottom" class="scrollbar" Orientation="Horizontal" [ScrollSize]="ExtentWidth" [ViewportSize]="ViewportWidth" [(Value)]="HorizontalOffset"/>`, isInline: true, styles: [":host{display:grid;overflow:auto;touch-action:pan-x pan-y}:host>.content{touch-action:pan-x pan-y;overscroll-behavior:contain;overflow:-moz-scrollbars-none;-ms-overflow-style:none;scrollbar-width:none;display:grid;grid-row-start:1;grid-column-start:1;justify-self:stretch;align-self:stretch}:host>.content::-webkit-scrollbar{display:none}:host>.scrollbar{display:grid;grid-row-start:1;grid-column-start:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ScrollBarComponent, selector: "ScrollBar", inputs: ["Orientation", "ViewportSize", "ScrollSize", "StepSize", "Value", "IsEnabled"], outputs: ["ValueChange"] }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1498
1705
|
}
|
|
1499
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ScrollViewerComponent, decorators: [{
|
|
1500
1707
|
type: Component,
|
|
1501
|
-
args: [{ selector: '
|
|
1502
|
-
<
|
|
1503
|
-
<
|
|
1504
|
-
|
|
1505
|
-
</div>
|
|
1506
|
-
<div class="content">
|
|
1507
|
-
<ng-content/>
|
|
1508
|
-
</div>
|
|
1509
|
-
</label>`, styles: [":host{position:relative}.container{display:grid;grid-template-columns:auto 1fr;column-gap:6px}input{display:none}input[type=radio]:checked+.radioButton>.circle{display:grid}input[type=radio]:not(:checked):not(:hover):not(:active):not(:disabled)+.radioButton{background-color:var(--ControlAltFillColorSecondary);border-color:var(--ControlStrongStrokeColorDefault)}input[type=radio]:not(:checked):hover:not(:active):not(:disabled)+.radioButton{background-color:var(--ControlAltFillColorTertiary);border-color:var(--ControlStrongStrokeColorDefault)}input[type=radio]:not(:checked):active:not(:disabled)+.radioButton{background-color:var(--SubtleFillColorTransparent);border-color:var(--ControlStrongStrokeColorDisabled)}input[type=radio]:not(:checked):active:not(:disabled)+.radioButton>.circle{transform:scale(1)}input[type=radio]:checked:not(:hover):not(:active):not(:disabled)+.radioButton{background-color:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault)}input[type=radio]:checked:not(:hover):not(:active):not(:disabled)+.radioButton>.circle{transform:scale(1)}input[type=radio]:checked:hover:not(:active):not(:disabled)+.radioButton{background-color:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary)}input[type=radio]:checked:hover:not(:active):not(:disabled)+.radioButton>.circle{transform:scale(1.2)}input[type=radio]:checked:active:not(:disabled)+.radioButton{background-color:var(--AccentFillColorTertiary);border-color:var(--AccentFillColorTertiary)}input[type=radio]:checked:active:not(:disabled)+.radioButton>.circle{transform:scale(1)}input[type=radio]:not(:checked):disabled+.radioButton{background-color:var(--ControlAltFillColorDisabled);border-color:var(--ControlStrongStrokeColorDisabled)}input[type=radio]:checked:disabled+.radioButton{background-color:var(--AccentFillColorDisabled);border-color:var(--ControlStrongStrokeColorDisabled)}.radioButton{display:grid;width:20px;height:20px;border-radius:11px;border-style:solid;border-width:var(--ControlBorderThickness);place-items:center;transition:border-color var(--ControlFastAnimationDuration);transition:background-color var(--ControlFastAnimationDuration)}.circle{width:10px;height:10px;border-radius:5px;background-color:var(--TextOnAccentFillColorPrimary);transition:transform var(--ControlNormalAnimationDuration);transform:scale(0)}.content{align-self:center}\n"] }]
|
|
1510
|
-
}], ctorParameters: () => [{ type: RadioButtonGroupComponent, decorators: [{
|
|
1511
|
-
type: Optional
|
|
1512
|
-
}] }], propDecorators: { IsEnabled: [{
|
|
1513
|
-
type: Input
|
|
1514
|
-
}], IsChecked: [{
|
|
1515
|
-
type: Input
|
|
1516
|
-
}], IsCheckedChange: [{
|
|
1517
|
-
type: Output
|
|
1518
|
-
}], Group: [{
|
|
1708
|
+
args: [{ selector: 'ScrollViewer', imports: [CommonModule, ScrollBarComponent, CdkScrollable], template: `<div #content class="content" [ngStyle]="contentStyle" (scroll)="onScroll()" cdkScrollable><ng-content/></div>
|
|
1709
|
+
<ScrollBar *ngIf="IsVerticalScrollBarVisible" HorizontalAlignment="Right" class="scrollbar" Orientation="Vertical" [ScrollSize]="ExtentHeight" [ViewportSize]="ViewportHeight" [(Value)]="VerticalOffset"/>
|
|
1710
|
+
<ScrollBar *ngIf="IsHorizontalScrollBarVisible" VerticalAlignment="Bottom" class="scrollbar" Orientation="Horizontal" [ScrollSize]="ExtentWidth" [ViewportSize]="ViewportWidth" [(Value)]="HorizontalOffset"/>`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:grid;overflow:auto;touch-action:pan-x pan-y}:host>.content{touch-action:pan-x pan-y;overscroll-behavior:contain;overflow:-moz-scrollbars-none;-ms-overflow-style:none;scrollbar-width:none;display:grid;grid-row-start:1;grid-column-start:1;justify-self:stretch;align-self:stretch}:host>.content::-webkit-scrollbar{display:none}:host>.scrollbar{display:grid;grid-row-start:1;grid-column-start:1}\n"] }]
|
|
1711
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { HorizontalScrollMode: [{
|
|
1519
1712
|
type: Input
|
|
1520
|
-
}],
|
|
1713
|
+
}], VerticalScrollMode: [{
|
|
1521
1714
|
type: Input
|
|
1715
|
+
}], _content: [{
|
|
1716
|
+
type: ViewChild,
|
|
1717
|
+
args: ['content']
|
|
1522
1718
|
}] } });
|
|
1523
|
-
|
|
1719
|
+
|
|
1720
|
+
class StackPanelComponent extends PanelComponent {
|
|
1524
1721
|
constructor() {
|
|
1525
1722
|
super(...arguments);
|
|
1526
|
-
this.
|
|
1527
|
-
this._children = [];
|
|
1723
|
+
this.Orientation = 'Vertical';
|
|
1528
1724
|
}
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
for (let item of this._children) {
|
|
1532
|
-
item.IsChecked = item.Value === value;
|
|
1533
|
-
}
|
|
1534
|
-
}
|
|
1535
|
-
if (this._value === value)
|
|
1536
|
-
return;
|
|
1537
|
-
this._value = value;
|
|
1538
|
-
this.ValueChange.emit(value);
|
|
1725
|
+
get gridAutoFlow() {
|
|
1726
|
+
return this.Orientation === 'Horizontal' ? 'column' : 'row';
|
|
1539
1727
|
}
|
|
1540
|
-
get
|
|
1541
|
-
return this.
|
|
1728
|
+
get gridAutoRows() {
|
|
1729
|
+
return this.Orientation === 'Vertical' ? 'auto' : undefined;
|
|
1542
1730
|
}
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
if (child.Value === undefined)
|
|
1546
|
-
child.Value = this._children.length;
|
|
1547
|
-
if (child.Value === this.Value)
|
|
1548
|
-
child.IsChecked = true;
|
|
1549
|
-
child.IsCheckedChange.subscribe(p => {
|
|
1550
|
-
this.Value = child.Value;
|
|
1551
|
-
});
|
|
1552
|
-
this._children.push(child);
|
|
1731
|
+
get gridAutoColumns() {
|
|
1732
|
+
return this.Orientation === 'Horizontal' ? 'auto' : undefined;
|
|
1553
1733
|
}
|
|
1554
|
-
|
|
1555
|
-
|
|
1734
|
+
get alignContent() {
|
|
1735
|
+
return this.Orientation === 'Vertical' ? 'start' : undefined;
|
|
1736
|
+
}
|
|
1737
|
+
get justifyContent() {
|
|
1738
|
+
return this.Orientation === 'Horizontal' ? 'start' : undefined;
|
|
1739
|
+
}
|
|
1740
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: StackPanelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1741
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: StackPanelComponent, isStandalone: true, selector: "StackPanel", inputs: { Orientation: "Orientation", Spacing: "Spacing" }, host: { properties: { "style.gap": "this.Spacing", "style.grid-auto-flow": "this.gridAutoFlow", "style.grid-auto-rows": "this.gridAutoRows", "style.grid-auto-columns": "this.gridAutoColumns", "style.align-content": "this.alignContent", "style.justify-content": "this.justifyContent" } }, usesInheritance: true, ngImport: i0, template: `<ng-content/>`, isInline: true, styles: [":host{display:grid;position:relative}\n"] }); }
|
|
1556
1742
|
}
|
|
1557
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1743
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: StackPanelComponent, decorators: [{
|
|
1558
1744
|
type: Component,
|
|
1559
|
-
args: [{ selector: '
|
|
1560
|
-
}], propDecorators: {
|
|
1745
|
+
args: [{ selector: 'StackPanel', template: `<ng-content/>`, styles: [":host{display:grid;position:relative}\n"] }]
|
|
1746
|
+
}], propDecorators: { Orientation: [{
|
|
1561
1747
|
type: Input
|
|
1562
|
-
}],
|
|
1563
|
-
type:
|
|
1748
|
+
}], Spacing: [{
|
|
1749
|
+
type: Input
|
|
1750
|
+
}, {
|
|
1751
|
+
type: HostBinding,
|
|
1752
|
+
args: ['style.gap']
|
|
1753
|
+
}], gridAutoFlow: [{
|
|
1754
|
+
type: HostBinding,
|
|
1755
|
+
args: ['style.grid-auto-flow']
|
|
1756
|
+
}], gridAutoRows: [{
|
|
1757
|
+
type: HostBinding,
|
|
1758
|
+
args: ['style.grid-auto-rows']
|
|
1759
|
+
}], gridAutoColumns: [{
|
|
1760
|
+
type: HostBinding,
|
|
1761
|
+
args: ['style.grid-auto-columns']
|
|
1762
|
+
}], alignContent: [{
|
|
1763
|
+
type: HostBinding,
|
|
1764
|
+
args: ['style.align-content']
|
|
1765
|
+
}], justifyContent: [{
|
|
1766
|
+
type: HostBinding,
|
|
1767
|
+
args: ['style.justify-content']
|
|
1564
1768
|
}] } });
|
|
1565
1769
|
|
|
1566
|
-
class
|
|
1567
|
-
|
|
1568
|
-
|
|
1770
|
+
class ItemContainerComponent {
|
|
1771
|
+
constructor(Element, Injector) {
|
|
1772
|
+
this.Element = Element;
|
|
1773
|
+
this.Injector = Injector;
|
|
1569
1774
|
}
|
|
1570
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1571
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type:
|
|
1572
|
-
<input type="radio" [name]="Group" [value]="Value" [checked]="IsChecked" (change)="onChange($event)" [disabled]="!IsEnabled">
|
|
1573
|
-
<ng-content/>
|
|
1574
|
-
</label>`, isInline: true, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked):active:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked):active:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:active:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked:active:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle:active:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle:active:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle:active:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle:active:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked):active:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked):active:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:active:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle:active:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n", ":host{padding:0}input{display:none}label{padding:var(--ButtonPadding)}\n"] }); }
|
|
1775
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ItemContainerComponent, deps: [{ token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1776
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ItemContainerComponent, isStandalone: true, selector: "ItemContainer", ngImport: i0, template: `<ng-content/>`, isInline: true, styles: [":host{display:grid;position:relative}\n"] }); }
|
|
1575
1777
|
}
|
|
1576
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1778
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ItemContainerComponent, decorators: [{
|
|
1577
1779
|
type: Component,
|
|
1578
|
-
args: [{ selector: '
|
|
1579
|
-
|
|
1580
|
-
<ng-content/>
|
|
1581
|
-
</label>`, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked):active:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked):active:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:active:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked:active:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle:active:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle:active:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle:active:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle:active:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked):active:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked):active:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:active:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle:active:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n", ":host{padding:0}input{display:none}label{padding:var(--ButtonPadding)}\n"] }]
|
|
1582
|
-
}], propDecorators: { checked: [{
|
|
1583
|
-
type: HostBinding,
|
|
1584
|
-
args: ['class.checked']
|
|
1585
|
-
}] } });
|
|
1780
|
+
args: [{ selector: 'ItemContainer', template: `<ng-content/>`, styles: [":host{display:grid;position:relative}\n"] }]
|
|
1781
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Injector }] });
|
|
1586
1782
|
|
|
1587
|
-
class
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1783
|
+
class ListViewComponent extends SelectorComponent {
|
|
1784
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ListViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1785
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ListViewComponent, isStandalone: true, selector: "ListView", usesInheritance: true, ngImport: i0, template: "<ScrollViewer>\n <StackPanel Padding=\"2px 0\">\n <ItemContainer #container *ngFor=\"let item of ItemSource; index as index; trackBy: getValue\" class=\"item\" [ngClass]=\"{'selected': index == SelectedIndex}\" (click)=\"onItemClick($event, index, item)\" [id]=\"'xaml-selector-'+_id+'-item-'+index\" @itemFading>\n <div class=\"item-selector\"></div>\n <div class=\"item-content\" [ngStyle]=\"{'align-content': alignContent, 'justify-content': justifyContent}\"><ng-container *ngIf=\"ItemTemplate\">\n <ng-container [ngTemplateOutlet]=\"ItemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: item }\" [ngTemplateOutletInjector]=\"container.Injector\" />\n </ng-container>\n <ng-container *ngIf=\"!ItemTemplate\">{{ DisplayMemberPath && item !== null ? item[DisplayMemberPath] : item }}</ng-container></div>\n </ItemContainer>\n </StackPanel>\n </ScrollViewer>", isInline: true, styles: [":host{position:relative}:host{display:grid}:host .item{display:grid;margin:2px 4px;border-radius:4px}:host .item>.item-selector,:host .item>.item-content{display:grid;grid-row-start:1;grid-column-start:1;justify-self:stretch}:host .item>.item-selector{justify-self:left;align-self:center;width:4px;height:12px;border-radius:2px;transition:height var(--ControlNormalAnimationDuration)}:host .item>.item-content{padding:8px 12px}:host .item.selected>.item-selector{height:18px}:host:not(.disabled) .item:not(:hover):not(:active):not(.selected){background-color:transparent;color:var(--TextFillColorPrimary)}:host:not(.disabled) .item:hover:not(.active):not(.selected){background-color:var(--SubtleFillColorSecondary)}:host:not(.disabled) .item:active:not(.selected){background-color:var(--SubtleFillColorTertiary)}:host:not(.disabled) .item:not(:hover):not(:active).selected{background-color:var(--SubtleFillColorSecondary)}:host:not(.disabled) .item:hover:not(:active).selected{background-color:var(--SubtleFillColorTertiary)}:host:not(.disabled) .item:active.selected{background-color:var(--SubtleFillColorSecondary)}:host:not(.disabled) .item.selected>.item-selector{background-color:var(--AccentFillColorDefault)}:host.disabled .item>.item-content{color:var(--TextFillColorDisabled)}:host.disabled .item:not(.selected){background-color:transparent}:host.disabled .item.selected{background-color:var(--SubtleFillColorSecondary)}:host.disabled .item.selected>.item-selector{background-color:var(--AccentFillColorDisabled)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ScrollViewerComponent, selector: "ScrollViewer", inputs: ["HorizontalScrollMode", "VerticalScrollMode"] }, { kind: "component", type: StackPanelComponent, selector: "StackPanel", inputs: ["Orientation", "Spacing"] }, { kind: "component", type: ItemContainerComponent, selector: "ItemContainer" }], animations: [
|
|
1786
|
+
trigger('itemFading', [
|
|
1787
|
+
transition(':enter', [animate('500ms ease-in', keyframes([
|
|
1788
|
+
style({ opacity: 0, height: 0 }),
|
|
1789
|
+
style({ opacity: 0, height: '*' }),
|
|
1790
|
+
style({ opacity: 1, height: '*' }),
|
|
1791
|
+
]))]),
|
|
1792
|
+
transition(':leave', [animate('500ms ease-out', keyframes([
|
|
1793
|
+
style({ opacity: 1, height: '*' }),
|
|
1794
|
+
style({ opacity: 0, height: '*' }),
|
|
1795
|
+
style({ opacity: 0, height: 0 }),
|
|
1796
|
+
]))]),
|
|
1797
|
+
])
|
|
1798
|
+
] }); }
|
|
1799
|
+
}
|
|
1800
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ListViewComponent, decorators: [{
|
|
1801
|
+
type: Component,
|
|
1802
|
+
args: [{ selector: 'ListView', imports: [CommonModule, ScrollViewerComponent, StackPanelComponent, ItemContainerComponent], template: `<ScrollViewer>
|
|
1803
|
+
<StackPanel Padding="2px 0">
|
|
1804
|
+
<ItemContainer #container *ngFor="let item of ItemSource; index as index; trackBy: getValue" class="item" [ngClass]="{'selected': index == SelectedIndex}" (click)="onItemClick($event, index, item)" [id]="'xaml-selector-'+_id+'-item-'+index" @itemFading>
|
|
1805
|
+
<div class="item-selector"></div>
|
|
1806
|
+
<div class="item-content" [ngStyle]="{'align-content': alignContent, 'justify-content': justifyContent}">${SelectorItemTemplate}</div>
|
|
1807
|
+
</ItemContainer>
|
|
1808
|
+
</StackPanel>
|
|
1809
|
+
</ScrollViewer>`, animations: [
|
|
1810
|
+
trigger('itemFading', [
|
|
1811
|
+
transition(':enter', [animate('500ms ease-in', keyframes([
|
|
1812
|
+
style({ opacity: 0, height: 0 }),
|
|
1813
|
+
style({ opacity: 0, height: '*' }),
|
|
1814
|
+
style({ opacity: 1, height: '*' }),
|
|
1815
|
+
]))]),
|
|
1816
|
+
transition(':leave', [animate('500ms ease-out', keyframes([
|
|
1817
|
+
style({ opacity: 1, height: '*' }),
|
|
1818
|
+
style({ opacity: 0, height: '*' }),
|
|
1819
|
+
style({ opacity: 0, height: 0 }),
|
|
1820
|
+
]))]),
|
|
1821
|
+
])
|
|
1822
|
+
], styles: [":host{position:relative}:host{display:grid}:host .item{display:grid;margin:2px 4px;border-radius:4px}:host .item>.item-selector,:host .item>.item-content{display:grid;grid-row-start:1;grid-column-start:1;justify-self:stretch}:host .item>.item-selector{justify-self:left;align-self:center;width:4px;height:12px;border-radius:2px;transition:height var(--ControlNormalAnimationDuration)}:host .item>.item-content{padding:8px 12px}:host .item.selected>.item-selector{height:18px}:host:not(.disabled) .item:not(:hover):not(:active):not(.selected){background-color:transparent;color:var(--TextFillColorPrimary)}:host:not(.disabled) .item:hover:not(.active):not(.selected){background-color:var(--SubtleFillColorSecondary)}:host:not(.disabled) .item:active:not(.selected){background-color:var(--SubtleFillColorTertiary)}:host:not(.disabled) .item:not(:hover):not(:active).selected{background-color:var(--SubtleFillColorSecondary)}:host:not(.disabled) .item:hover:not(:active).selected{background-color:var(--SubtleFillColorTertiary)}:host:not(.disabled) .item:active.selected{background-color:var(--SubtleFillColorSecondary)}:host:not(.disabled) .item.selected>.item-selector{background-color:var(--AccentFillColorDefault)}:host.disabled .item>.item-content{color:var(--TextFillColorDisabled)}:host.disabled .item:not(.selected){background-color:transparent}:host.disabled .item.selected{background-color:var(--SubtleFillColorSecondary)}:host.disabled .item.selected>.item-selector{background-color:var(--AccentFillColorDisabled)}\n"] }]
|
|
1823
|
+
}] });
|
|
1824
|
+
|
|
1825
|
+
class DropDownButtonComponent extends ButtonComponent {
|
|
1826
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DropDownButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1827
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: DropDownButtonComponent, isStandalone: true, selector: "DropDownButton", usesInheritance: true, ngImport: i0, template: `<div class="content"><TextBlock *ngIf="Content !== undefined" [Text]="Content"/><ng-content select=":not(Flyout):not(MenuFlyout)"/></div>
|
|
1828
|
+
<div class="drop-down-glyph"></div>
|
|
1829
|
+
<ng-content select="Flyout, MenuFlyout"/>`, isInline: true, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n", ":host{grid-template-columns:1fr auto;align-items:center}.content{display:grid;justify-content:inherit;align-content:inherit;min-width:0}.content:not(:empty){margin-right:8px}.drop-down-glyph{display:grid;font-family:var(--SymbolFontFamily);font-size:8pt;width:12px;justify-content:center;align-content:center;grid-column:2;transition:transform var(--ControlNormalAnimationDuration)}:host.pressed:not(.flyout-open):not(.disabled) .drop-down-glyph{transform:translateY(3px)}\n"], dependencies: [{ kind: "component", type: TextBlockComponent, selector: "TextBlock", inputs: ["FontFamily", "Text", "FontSize", "FontStyle", "FontWeight", "Foreground", "TextAlignment", "IsTextSelectionEnabled", "TextDecorations", "TextTrimming", "TextWrapping"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
1830
|
+
}
|
|
1831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DropDownButtonComponent, decorators: [{
|
|
1832
|
+
type: Component,
|
|
1833
|
+
args: [{ selector: 'DropDownButton', imports: [TextBlockComponent, CommonModule], template: `<div class="content"><TextBlock *ngIf="Content !== undefined" [Text]="Content"/><ng-content select=":not(Flyout):not(MenuFlyout)"/></div>
|
|
1834
|
+
<div class="drop-down-glyph"></div>
|
|
1835
|
+
<ng-content select="Flyout, MenuFlyout"/>`, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n", ":host{grid-template-columns:1fr auto;align-items:center}.content{display:grid;justify-content:inherit;align-content:inherit;min-width:0}.content:not(:empty){margin-right:8px}.drop-down-glyph{display:grid;font-family:var(--SymbolFontFamily);font-size:8pt;width:12px;justify-content:center;align-content:center;grid-column:2;transition:transform var(--ControlNormalAnimationDuration)}:host.pressed:not(.flyout-open):not(.disabled) .drop-down-glyph{transform:translateY(3px)}\n"] }]
|
|
1836
|
+
}] });
|
|
1837
|
+
|
|
1838
|
+
class FlyoutPresenter {
|
|
1839
|
+
constructor() {
|
|
1840
|
+
this.TransitionAnimation = 'Default';
|
|
1841
|
+
this.IsVisible = false;
|
|
1613
1842
|
}
|
|
1614
|
-
|
|
1615
|
-
|
|
1843
|
+
static { this.TransitionDuration = 250; }
|
|
1844
|
+
get transitionClass() {
|
|
1845
|
+
return 'transition-' + this.TransitionAnimation.toLowerCase();
|
|
1616
1846
|
}
|
|
1617
|
-
|
|
1618
|
-
|
|
1847
|
+
onContextMenu(event) {
|
|
1848
|
+
event.preventDefault();
|
|
1619
1849
|
}
|
|
1620
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1621
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type:
|
|
1850
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FlyoutPresenter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1851
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: FlyoutPresenter, isStandalone: true, selector: "FlyoutPresenter", inputs: { TransitionAnimation: "TransitionAnimation", Padding: "Padding", IsVisible: "IsVisible" }, host: { listeners: { "contextmenu": "onContextMenu($event)" }, properties: { "style.padding": "this.Padding", "class.visible": "this.IsVisible", "class": "this.transitionClass" } }, ngImport: i0, template: `<ng-content/>`, isInline: true, styles: [":host{--FlyoutSlideInLength: 10px;display:grid;overflow:hidden;-webkit-user-select:none;user-select:none;border-width:1px;border-style:solid;border-radius:var(--OverlayCornerRadius);-webkit-backdrop-filter:var(--AcrylicBlur);backdrop-filter:var(--AcrylicBlur);box-shadow:0 0 15px #00000080;border-color:var(--SurfaceStrokeColorFlyout);background-color:var(--AcrylicInAppFillColorDefault);transition:opacity var(--ControlNormalAnimationDuration),transform var(--ControlNormalAnimationDuration);opacity:0;max-width:calc(100dvw - 32px);max-height:calc(100dvh - 32px)}:host.transition-slideup{transform:translateY(var(--FlyoutSlideInLength))}:host.transition-slidedown{transform:translateY(calc(-1 * var(--FlyoutSlideInLength)))}:host.transition-slideleft{transform:translate(var(--FlyoutSlideInLength))}:host.transition-slideright{transform:translate(calc(-1 * var(--FlyoutSlideInLength)))}:host.visible{opacity:1;transform:translate(0)}\n"] }); }
|
|
1622
1852
|
}
|
|
1623
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1853
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FlyoutPresenter, decorators: [{
|
|
1624
1854
|
type: Component,
|
|
1625
|
-
args: [{ selector: '
|
|
1626
|
-
}], propDecorators: {
|
|
1855
|
+
args: [{ selector: 'FlyoutPresenter', template: `<ng-content/>`, styles: [":host{--FlyoutSlideInLength: 10px;display:grid;overflow:hidden;-webkit-user-select:none;user-select:none;border-width:1px;border-style:solid;border-radius:var(--OverlayCornerRadius);-webkit-backdrop-filter:var(--AcrylicBlur);backdrop-filter:var(--AcrylicBlur);box-shadow:0 0 15px #00000080;border-color:var(--SurfaceStrokeColorFlyout);background-color:var(--AcrylicInAppFillColorDefault);transition:opacity var(--ControlNormalAnimationDuration),transform var(--ControlNormalAnimationDuration);opacity:0;max-width:calc(100dvw - 32px);max-height:calc(100dvh - 32px)}:host.transition-slideup{transform:translateY(var(--FlyoutSlideInLength))}:host.transition-slidedown{transform:translateY(calc(-1 * var(--FlyoutSlideInLength)))}:host.transition-slideleft{transform:translate(var(--FlyoutSlideInLength))}:host.transition-slideright{transform:translate(calc(-1 * var(--FlyoutSlideInLength)))}:host.visible{opacity:1;transform:translate(0)}\n"] }]
|
|
1856
|
+
}], propDecorators: { TransitionAnimation: [{
|
|
1627
1857
|
type: Input
|
|
1628
|
-
}],
|
|
1858
|
+
}], Padding: [{
|
|
1629
1859
|
type: Input
|
|
1630
|
-
}
|
|
1860
|
+
}, {
|
|
1861
|
+
type: HostBinding,
|
|
1862
|
+
args: ['style.padding']
|
|
1863
|
+
}], IsVisible: [{
|
|
1864
|
+
type: Input
|
|
1865
|
+
}, {
|
|
1866
|
+
type: HostBinding,
|
|
1867
|
+
args: ['class.visible']
|
|
1868
|
+
}], transitionClass: [{
|
|
1869
|
+
type: HostBinding,
|
|
1870
|
+
args: ['class']
|
|
1871
|
+
}], onContextMenu: [{
|
|
1631
1872
|
type: HostListener,
|
|
1632
|
-
args: ['
|
|
1633
|
-
}]
|
|
1873
|
+
args: ['contextmenu', ['$event']]
|
|
1874
|
+
}] } });
|
|
1875
|
+
|
|
1876
|
+
class XamlRootComponent {
|
|
1877
|
+
onContextMenu(event) {
|
|
1878
|
+
event.preventDefault();
|
|
1879
|
+
}
|
|
1880
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: XamlRootComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1881
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: XamlRootComponent, isStandalone: true, selector: "XamlRoot", host: { listeners: { "contextmenu": "onContextMenu($event)" }, classAttribute: "xaml-themed" }, ngImport: i0, template: `<ng-content/>`, isInline: true, styles: ["XamlRoot{all:initial;display:grid;overflow:hidden;-webkit-user-select:none;user-select:none;touch-action:none;box-sizing:border-box;font-family:var(--SystemFontFamily);font-size:var(--SystemFontSize);color:var(--TextFillColorPrimary);background:var(--WindowFillColorDefault)}.xaml-themed{--AcrylicBlur: var(--XamlUiOverrideAcrylicBlur, blur(12px));--ControlBorderThickness: var(--XamlUiOverrideControlBorderThickness, 1px);--ControlCornerRadius: var(--XamlUiOverrideControlCornerRadius, 4px);--OverlayCornerRadius: var(--XamlUiOverrideOverlayCornerRadius, 8px);--ButtonVerticalPadding: var(--XamlUiOverrideButtonVerticalPadding, 5px);--ButtonHorizontalPadding: var(--XamlUiOverrideButtonHorizontalPadding, 11px);--ButtonPadding: var(--XamlUiOverrideButtonPadding, var(--ButtonVerticalPadding) var(--ButtonHorizontalPadding));--SystemFontSize: var(--XamlUiOverrideSystemFontSize, 10pt);--SystemFontFamily: var(--XamlUiOverrideSystemFontFamily, \"Segoe UI\", Arial, sans-serif);--SymbolFontSize: var(--XamlUiOverrideSymbolFontSize, 10pt);--SymbolFontFamily: var(--XamlUiOverrideSymbolFontFamily, \"Segoe Fluent Icons\", \"Segoe MDL2 Assets\");--SystemAccentColor: var(--XamlUiOverrideSystemAccentColor, #0078d4);--SmokeFillColorDefault: var(--XamlUiOverrideSmokeFillColorDefault, #0000004D);--ControlNormalAnimationDuration: var(--XamlUiOverrideControlNormalAnimationDuration, .25s);--ControlFastAnimationDuration: var(--XamlUiOverrideControlFastAnimationDuration, .167s);--ControlFasterAnimationDuration: var(--XamlUiOverrideControlFasterAnimationDuration, 83ms);--WindowFillColorDefault: var(--XamlUiOverrideWindowFillColorDefault, #202020FF);--ControlFillColorDefault: var(--XamlUiOverrideControlFillColorDefault, #FFFFFF0F);--ControlFillColorSecondary: var(--XamlUiOverrideControlFillColorSecondary, #FFFFFF15);--ControlFillColorTertiary: var(--XamlUiOverrideControlFillColorTertiary, #FFFFFF08);--ControlFillColorDisabled: var(--XamlUiOverrideControlFillColorDisabled, #FFFFFF0B);--ControlFillColorInputActive: var(--XamlUiOverrideControlFillColorInputActive, #1E1E1EB3);--ControlSolidFillColorDefault: var(--XamlUiOverrideControlSolidFillColorDefault, #454545FF);--ControlAltFillColorSecondary: var(--XamlUiOverrideControlAltFillColorSecondary, #00000019);--ControlAltFillColorTertiary: var(--XamlUiOverrideControlAltFillColorTertiary, #FFFFFF0B);--ControlAltFillColorQuarternary: var(--XamlUiOverrideControlAltFillColorQuarternary, #FFFFFF12);--ControlAltFillColorDisabled: var(--XamlUiOverrideControlAltFillColorDisabled, #FFFFFF00);--ControlStrongFillColorDefault: var(--XamlUiOverrideControlStrongFillColorDefault, #FFFFFF8B);--ControlStrongFillColorDisabled: var(--XamlUiOverrideControlStrongFillColorDisabled, #FFFFFF3F);--ControlFillColorTransparent: var(--XamlUiOverrideControlFillColorTransparent, #FFFFFF00);--SubtleFillColorTransparent: var(--XamlUiOverrideSubtleFillColorTransparent, #FFFFFF00);--SubtleFillColorSecondary: var(--XamlUiOverrideSubtleFillColorSecondary, #FFFFFF0F);--SubtleFillColorTertiary: var(--XamlUiOverrideSubtleFillColorTertiary, #FFFFFF0A);--AccentFillColorDefault: var(--XamlUiOverrideAccentFillColorDefault, #4CC2FFFF);--AccentFillColorSecondary: var(--XamlUiOverrideAccentFillColorSecondary, #4CC2FFE6);--AccentFillColorTertiary: var(--XamlUiOverrideAccentFillColorTertiary, #4CC2FFCC);--AccentFillColorDisabled: var(--XamlUiOverrideAccentFillColorDisabled, #FFFFFF28);--SystemControlHighlightListAccentLow: var(--XamlUiOverrideSystemControlHighlightListAccentLow, #0078D499);--SystemControlHighlightListAccentMedium: var(--XamlUiOverrideSystemControlHighlightListAccentMedium, #0078D4CC);--SystemControlHighlightListAccentHigh: var(--XamlUiOverrideSystemControlHighlightListAccentHigh, #0078D4E6);--ControlStrokeColorDefault: var(--XamlUiOverrideControlStrokeColorDefault, #FFFFFF12);--ControlStrongStrokeColorDefault: var(--XamlUiOverrideControlStrongStrokeColorDefault, #FFFFFF8B);--ControlStrongStrokeColorDisabled: var(--XamlUiOverrideControlStrongStrokeColorDisabled, #FFFFFF28);--ControlStrokeColorOnAccentDefault: var(--XamlUiOverrideControlStrokeColorOnAccentDefault, #FFFFFF14);--TextFillColorPrimary: var(--XamlUiOverrideTextFillColorPrimary, #FFFFFFFF);--TextFillColorSecondary: var(--XamlUiOverrideTextFillColorSecondary, #FFFFFFC5);--TextFillColorDisabled: var(--XamlUiOverrideTextFillColorDisabled, #FFFFFF5D);--TextOnAccentFillColorSelected: var(--XamlUiOverrideTextOnAccentFillColorSelected, #FFFFFFFF);--TextOnAccentFillColorPrimary: var(--XamlUiOverrideTextOnAccentFillColorPrimary, #000000);--TextOnAccentFillColorSecondary: var(--XamlUiOverrideTextOnAccentFillColorSecondary, #00000080);--TextOnAccentFillColorDisabled: var(--XamlUiOverrideTextOnAccentFillColorDisabled, #FFFFFF87);--SurfaceStrokeColorFlyout: var(--XamlUiOverrideSurfaceStrokeColorFlyout, #00000033);--AcrylicInAppFillColorDefault: var(--XamlUiOverrideAcrylicInAppFillColorDefault, #2C2C2C26);--SystemChromeMediumLowColor: var(--XamlUiOverrideSystemChromeMediumLowColor, #2B2B2BFF);--DividerStrokeColorDefault: var(--XamlUiOverrideDividerStrokeColorDefault, #FFFFFF15);--LayerFillColorAlt: var(--XamlUiOverrideLayerFillColorAlt, #FFFFFF0D);--SurfaceStrokeColorDefault: var(--XamlUiOverrideSurfaceStrokeColorDefault, #75757566);--TextControlPadding: var(--XamlUiOverrideTextControlPadding, 6px);--TextControlBorderThickness: var(--XamlUiOverrideTextControlBorderThickness, var(--ControlBorderThickness));--TextControlBorderThicknessFocused: var(--XamlUiOverrideTextControlBorderThicknessFocused, 2px);--TextControlBackgroundColor: var(--XamlUiOverrideTextControlBackgroundColor, var(--ControlFillColorDefault));--TextControlBackgroundColorPointerOver: var(--XamlUiOverrideTextControlBackgroundColorPointerOver, var(--ControlFillColorSecondary));--TextControlBackgroundColorFocused: var(--XamlUiOverrideTextControlBackgroundColorFocused, var(--ControlFillColorInputActive));--TextControlBackgroundColorDisabled: var(--XamlUiOverrideTextControlBackgroundColorDisabled, var(--ControlFillColorDisabled));--TextControlElevationBorderColor: var(--XamlUiOverrideTextControlElevationBorderColor, var(--ControlStrokeColorDefault));--TextControlElevationBorderColorStrong: var(--XamlUiOverrideTextControlElevationBorderColorStrong, var(--ControlStrongStrokeColorDefault));--TextControlElevationBorderColorFocused: var(--XamlUiOverrideTextControlElevationBorderColorFocused, var(--AccentFillColorDefault));--TextControlElevationBorderColorDisabled: var(--XamlUiOverrideTextControlElevationBorderColorDisabled, var(--ControlStrokeColorDefault));--SliderTrackFillColor: var(--XamlUiOverrideSliderTrackFillColor, var(--ControlStrongFillColorDefault));--AppBarButtonForegroundColor: var(--XamlUiOverrideAppBarButtonForegroundColor, var(--TextFillColorPrimary))}@media (prefers-color-scheme: light){.xaml-themed{--WindowFillColorDefault: var(--XamlUiOverrideWindowFillColorDefault, #F3F3F3FF);--ControlFillColorDefault: var(--XamlUiOverrideControlFillColorDefault, #FFFFFFB3);--ControlFillColorSecondary: var(--XamlUiOverrideControlFillColorSecondary, #F9F9F980);--ControlFillColorTertiary: var(--XamlUiOverrideControlFillColorTertiary, #F9F9F94D);--ControlFillColorDisabled: var(--XamlUiOverrideControlFillColorDisabled, #F9F9F94D);--ControlFillColorInputActive: var(--XamlUiOverrideControlFillColorInputActive, #FFFFFF);--ControlSolidFillColorDefault: var(--XamlUiOverrideControlSolidFillColorDefault, #FFFFFFFF);--ControlAltFillColorSecondary: var(--XamlUiOverrideControlAltFillColorSecondary, #00000006);--ControlAltFillColorTertiary: var(--XamlUiOverrideControlAltFillColorTertiary, #0000000F);--ControlAltFillColorQuarternary: var(--XamlUiOverrideControlAltFillColorQuarternary, #00000018);--ControlAltFillColorDisabled: var(--XamlUiOverrideControlAltFillColorDisabled, #FFFFFF00);--ControlStrongFillColorDefault: var(--XamlUiOverrideControlStrongFillColorDefault, #00000072);--ControlStrongFillColorDisabled: var(--XamlUiOverrideControlStrongFillColorDisabled, #00000051);--ControlFillColorTransparent: var(--XamlUiOverrideControlFillColorTransparent, #FFFFFF00);--SubtleFillColorTransparent: var(--XamlUiOverrideSubtleFillColorTransparent, #FFFFFF00);--SubtleFillColorSecondary: var(--XamlUiOverrideSubtleFillColorSecondary, #00000009);--SubtleFillColorTertiary: var(--XamlUiOverrideSubtleFillColorTertiary, #00000006);--AccentFillColorDefault: var(--XamlUiOverrideAccentFillColorDefault, #0067C0FF);--AccentFillColorSecondary: var(--XamlUiOverrideAccentFillColorSecondary, #0067C0E6);--AccentFillColorTertiary: var(--XamlUiOverrideAccentFillColorTertiary, #0067C0CC);--AccentFillColorDisabled: var(--XamlUiOverrideAccentFillColorDisabled, #FFFFFF37);--SystemControlHighlightListAccentLow: var(--XamlUiOverrideSystemControlHighlightListAccentLow, #0078D466);--SystemControlHighlightListAccentMedium: var(--XamlUiOverrideSystemControlHighlightListAccentMedium, #0078D499);--SystemControlHighlightListAccentHigh: var(--XamlUiOverrideSystemControlHighlightListAccentHigh, #0078D4B3);--ControlStrokeColorDefault: var(--XamlUiOverrideControlStrokeColorDefault, #0000000F);--ControlStrongStrokeColorDefault: var(--XamlUiOverrideControlStrongStrokeColorDefault, #00000072);--ControlStrongStrokeColorDisabled: var(--XamlUiOverrideControlStrongStrokeColorDisabled, #00000037);--ControlStrokeColorOnAccentDefault: var(--XamlUiOverrideControlStrokeColorOnAccentDefault, #FFFFFF14);--TextFillColorPrimary: var(--XamlUiOverrideTextFillColorPrimary, #000000E4);--TextFillColorSecondary: var(--XamlUiOverrideTextFillColorSecondary, #0000009E);--TextFillColorDisabled: var(--XamlUiOverrideTextFillColorDisabled, #0000005C);--TextOnAccentFillColorSelected: var(--XamlUiOverrideTextOnAccentFillColorSelected, #FFFFFFFF);--TextOnAccentFillColorPrimary: var(--XamlUiOverrideTextOnAccentFillColorPrimary, #FFFFFF);--TextOnAccentFillColorSecondary: var(--XamlUiOverrideTextOnAccentFillColorSecondary, #FFFFFFB3);--TextOnAccentFillColorDisabled: var(--XamlUiOverrideTextOnAccentFillColorDisabled, #FFFFFF);--SurfaceStrokeColorFlyout: var(--XamlUiOverrideSurfaceStrokeColorFlyout, #0000000F);--AcrylicInAppFillColorDefault: var(--XamlUiOverrideAcrylicInAppFillColorDefault, #FCFCFC26);--SystemChromeMediumLowColor: var(--XamlUiOverrideSystemChromeMediumLowColor, #F2F2F2FF);--DividerStrokeColorDefault: var(--XamlUiOverrideDividerStrokeColorDefault, #0000000F);--LayerFillColorAlt: var(--XamlUiOverrideLayerFillColorAlt, #FFFFFF);--SurfaceStrokeColorDefault: var(--XamlUiOverrideSurfaceStrokeColorDefault, #75757566)}}.xaml-flyout-overlay-backdrop{background:transparent}.xaml-dialog-overlay-backdrop{background:var(--SmokeFillColorDefault)}.cdk-overlay-pane.xaml-overlay-pane{display:grid!important}.cdk-overlay-pane.xaml-overlay-pane XamlRoot{overflow:visible;background:transparent}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1882
|
+
}
|
|
1883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: XamlRootComponent, decorators: [{
|
|
1884
|
+
type: Component,
|
|
1885
|
+
args: [{ selector: 'XamlRoot', template: `<ng-content/>`, encapsulation: ViewEncapsulation.None, host: {
|
|
1886
|
+
'class': 'xaml-themed'
|
|
1887
|
+
}, styles: ["XamlRoot{all:initial;display:grid;overflow:hidden;-webkit-user-select:none;user-select:none;touch-action:none;box-sizing:border-box;font-family:var(--SystemFontFamily);font-size:var(--SystemFontSize);color:var(--TextFillColorPrimary);background:var(--WindowFillColorDefault)}.xaml-themed{--AcrylicBlur: var(--XamlUiOverrideAcrylicBlur, blur(12px));--ControlBorderThickness: var(--XamlUiOverrideControlBorderThickness, 1px);--ControlCornerRadius: var(--XamlUiOverrideControlCornerRadius, 4px);--OverlayCornerRadius: var(--XamlUiOverrideOverlayCornerRadius, 8px);--ButtonVerticalPadding: var(--XamlUiOverrideButtonVerticalPadding, 5px);--ButtonHorizontalPadding: var(--XamlUiOverrideButtonHorizontalPadding, 11px);--ButtonPadding: var(--XamlUiOverrideButtonPadding, var(--ButtonVerticalPadding) var(--ButtonHorizontalPadding));--SystemFontSize: var(--XamlUiOverrideSystemFontSize, 10pt);--SystemFontFamily: var(--XamlUiOverrideSystemFontFamily, \"Segoe UI\", Arial, sans-serif);--SymbolFontSize: var(--XamlUiOverrideSymbolFontSize, 10pt);--SymbolFontFamily: var(--XamlUiOverrideSymbolFontFamily, \"Segoe Fluent Icons\", \"Segoe MDL2 Assets\");--SystemAccentColor: var(--XamlUiOverrideSystemAccentColor, #0078d4);--SmokeFillColorDefault: var(--XamlUiOverrideSmokeFillColorDefault, #0000004D);--ControlNormalAnimationDuration: var(--XamlUiOverrideControlNormalAnimationDuration, .25s);--ControlFastAnimationDuration: var(--XamlUiOverrideControlFastAnimationDuration, .167s);--ControlFasterAnimationDuration: var(--XamlUiOverrideControlFasterAnimationDuration, 83ms);--WindowFillColorDefault: var(--XamlUiOverrideWindowFillColorDefault, #202020FF);--ControlFillColorDefault: var(--XamlUiOverrideControlFillColorDefault, #FFFFFF0F);--ControlFillColorSecondary: var(--XamlUiOverrideControlFillColorSecondary, #FFFFFF15);--ControlFillColorTertiary: var(--XamlUiOverrideControlFillColorTertiary, #FFFFFF08);--ControlFillColorDisabled: var(--XamlUiOverrideControlFillColorDisabled, #FFFFFF0B);--ControlFillColorInputActive: var(--XamlUiOverrideControlFillColorInputActive, #1E1E1EB3);--ControlSolidFillColorDefault: var(--XamlUiOverrideControlSolidFillColorDefault, #454545FF);--ControlAltFillColorSecondary: var(--XamlUiOverrideControlAltFillColorSecondary, #00000019);--ControlAltFillColorTertiary: var(--XamlUiOverrideControlAltFillColorTertiary, #FFFFFF0B);--ControlAltFillColorQuarternary: var(--XamlUiOverrideControlAltFillColorQuarternary, #FFFFFF12);--ControlAltFillColorDisabled: var(--XamlUiOverrideControlAltFillColorDisabled, #FFFFFF00);--ControlStrongFillColorDefault: var(--XamlUiOverrideControlStrongFillColorDefault, #FFFFFF8B);--ControlStrongFillColorDisabled: var(--XamlUiOverrideControlStrongFillColorDisabled, #FFFFFF3F);--ControlFillColorTransparent: var(--XamlUiOverrideControlFillColorTransparent, #FFFFFF00);--SubtleFillColorTransparent: var(--XamlUiOverrideSubtleFillColorTransparent, #FFFFFF00);--SubtleFillColorSecondary: var(--XamlUiOverrideSubtleFillColorSecondary, #FFFFFF0F);--SubtleFillColorTertiary: var(--XamlUiOverrideSubtleFillColorTertiary, #FFFFFF0A);--AccentFillColorDefault: var(--XamlUiOverrideAccentFillColorDefault, #4CC2FFFF);--AccentFillColorSecondary: var(--XamlUiOverrideAccentFillColorSecondary, #4CC2FFE6);--AccentFillColorTertiary: var(--XamlUiOverrideAccentFillColorTertiary, #4CC2FFCC);--AccentFillColorDisabled: var(--XamlUiOverrideAccentFillColorDisabled, #FFFFFF28);--SystemControlHighlightListAccentLow: var(--XamlUiOverrideSystemControlHighlightListAccentLow, #0078D499);--SystemControlHighlightListAccentMedium: var(--XamlUiOverrideSystemControlHighlightListAccentMedium, #0078D4CC);--SystemControlHighlightListAccentHigh: var(--XamlUiOverrideSystemControlHighlightListAccentHigh, #0078D4E6);--ControlStrokeColorDefault: var(--XamlUiOverrideControlStrokeColorDefault, #FFFFFF12);--ControlStrongStrokeColorDefault: var(--XamlUiOverrideControlStrongStrokeColorDefault, #FFFFFF8B);--ControlStrongStrokeColorDisabled: var(--XamlUiOverrideControlStrongStrokeColorDisabled, #FFFFFF28);--ControlStrokeColorOnAccentDefault: var(--XamlUiOverrideControlStrokeColorOnAccentDefault, #FFFFFF14);--TextFillColorPrimary: var(--XamlUiOverrideTextFillColorPrimary, #FFFFFFFF);--TextFillColorSecondary: var(--XamlUiOverrideTextFillColorSecondary, #FFFFFFC5);--TextFillColorDisabled: var(--XamlUiOverrideTextFillColorDisabled, #FFFFFF5D);--TextOnAccentFillColorSelected: var(--XamlUiOverrideTextOnAccentFillColorSelected, #FFFFFFFF);--TextOnAccentFillColorPrimary: var(--XamlUiOverrideTextOnAccentFillColorPrimary, #000000);--TextOnAccentFillColorSecondary: var(--XamlUiOverrideTextOnAccentFillColorSecondary, #00000080);--TextOnAccentFillColorDisabled: var(--XamlUiOverrideTextOnAccentFillColorDisabled, #FFFFFF87);--SurfaceStrokeColorFlyout: var(--XamlUiOverrideSurfaceStrokeColorFlyout, #00000033);--AcrylicInAppFillColorDefault: var(--XamlUiOverrideAcrylicInAppFillColorDefault, #2C2C2C26);--SystemChromeMediumLowColor: var(--XamlUiOverrideSystemChromeMediumLowColor, #2B2B2BFF);--DividerStrokeColorDefault: var(--XamlUiOverrideDividerStrokeColorDefault, #FFFFFF15);--LayerFillColorAlt: var(--XamlUiOverrideLayerFillColorAlt, #FFFFFF0D);--SurfaceStrokeColorDefault: var(--XamlUiOverrideSurfaceStrokeColorDefault, #75757566);--TextControlPadding: var(--XamlUiOverrideTextControlPadding, 6px);--TextControlBorderThickness: var(--XamlUiOverrideTextControlBorderThickness, var(--ControlBorderThickness));--TextControlBorderThicknessFocused: var(--XamlUiOverrideTextControlBorderThicknessFocused, 2px);--TextControlBackgroundColor: var(--XamlUiOverrideTextControlBackgroundColor, var(--ControlFillColorDefault));--TextControlBackgroundColorPointerOver: var(--XamlUiOverrideTextControlBackgroundColorPointerOver, var(--ControlFillColorSecondary));--TextControlBackgroundColorFocused: var(--XamlUiOverrideTextControlBackgroundColorFocused, var(--ControlFillColorInputActive));--TextControlBackgroundColorDisabled: var(--XamlUiOverrideTextControlBackgroundColorDisabled, var(--ControlFillColorDisabled));--TextControlElevationBorderColor: var(--XamlUiOverrideTextControlElevationBorderColor, var(--ControlStrokeColorDefault));--TextControlElevationBorderColorStrong: var(--XamlUiOverrideTextControlElevationBorderColorStrong, var(--ControlStrongStrokeColorDefault));--TextControlElevationBorderColorFocused: var(--XamlUiOverrideTextControlElevationBorderColorFocused, var(--AccentFillColorDefault));--TextControlElevationBorderColorDisabled: var(--XamlUiOverrideTextControlElevationBorderColorDisabled, var(--ControlStrokeColorDefault));--SliderTrackFillColor: var(--XamlUiOverrideSliderTrackFillColor, var(--ControlStrongFillColorDefault));--AppBarButtonForegroundColor: var(--XamlUiOverrideAppBarButtonForegroundColor, var(--TextFillColorPrimary))}@media (prefers-color-scheme: light){.xaml-themed{--WindowFillColorDefault: var(--XamlUiOverrideWindowFillColorDefault, #F3F3F3FF);--ControlFillColorDefault: var(--XamlUiOverrideControlFillColorDefault, #FFFFFFB3);--ControlFillColorSecondary: var(--XamlUiOverrideControlFillColorSecondary, #F9F9F980);--ControlFillColorTertiary: var(--XamlUiOverrideControlFillColorTertiary, #F9F9F94D);--ControlFillColorDisabled: var(--XamlUiOverrideControlFillColorDisabled, #F9F9F94D);--ControlFillColorInputActive: var(--XamlUiOverrideControlFillColorInputActive, #FFFFFF);--ControlSolidFillColorDefault: var(--XamlUiOverrideControlSolidFillColorDefault, #FFFFFFFF);--ControlAltFillColorSecondary: var(--XamlUiOverrideControlAltFillColorSecondary, #00000006);--ControlAltFillColorTertiary: var(--XamlUiOverrideControlAltFillColorTertiary, #0000000F);--ControlAltFillColorQuarternary: var(--XamlUiOverrideControlAltFillColorQuarternary, #00000018);--ControlAltFillColorDisabled: var(--XamlUiOverrideControlAltFillColorDisabled, #FFFFFF00);--ControlStrongFillColorDefault: var(--XamlUiOverrideControlStrongFillColorDefault, #00000072);--ControlStrongFillColorDisabled: var(--XamlUiOverrideControlStrongFillColorDisabled, #00000051);--ControlFillColorTransparent: var(--XamlUiOverrideControlFillColorTransparent, #FFFFFF00);--SubtleFillColorTransparent: var(--XamlUiOverrideSubtleFillColorTransparent, #FFFFFF00);--SubtleFillColorSecondary: var(--XamlUiOverrideSubtleFillColorSecondary, #00000009);--SubtleFillColorTertiary: var(--XamlUiOverrideSubtleFillColorTertiary, #00000006);--AccentFillColorDefault: var(--XamlUiOverrideAccentFillColorDefault, #0067C0FF);--AccentFillColorSecondary: var(--XamlUiOverrideAccentFillColorSecondary, #0067C0E6);--AccentFillColorTertiary: var(--XamlUiOverrideAccentFillColorTertiary, #0067C0CC);--AccentFillColorDisabled: var(--XamlUiOverrideAccentFillColorDisabled, #FFFFFF37);--SystemControlHighlightListAccentLow: var(--XamlUiOverrideSystemControlHighlightListAccentLow, #0078D466);--SystemControlHighlightListAccentMedium: var(--XamlUiOverrideSystemControlHighlightListAccentMedium, #0078D499);--SystemControlHighlightListAccentHigh: var(--XamlUiOverrideSystemControlHighlightListAccentHigh, #0078D4B3);--ControlStrokeColorDefault: var(--XamlUiOverrideControlStrokeColorDefault, #0000000F);--ControlStrongStrokeColorDefault: var(--XamlUiOverrideControlStrongStrokeColorDefault, #00000072);--ControlStrongStrokeColorDisabled: var(--XamlUiOverrideControlStrongStrokeColorDisabled, #00000037);--ControlStrokeColorOnAccentDefault: var(--XamlUiOverrideControlStrokeColorOnAccentDefault, #FFFFFF14);--TextFillColorPrimary: var(--XamlUiOverrideTextFillColorPrimary, #000000E4);--TextFillColorSecondary: var(--XamlUiOverrideTextFillColorSecondary, #0000009E);--TextFillColorDisabled: var(--XamlUiOverrideTextFillColorDisabled, #0000005C);--TextOnAccentFillColorSelected: var(--XamlUiOverrideTextOnAccentFillColorSelected, #FFFFFFFF);--TextOnAccentFillColorPrimary: var(--XamlUiOverrideTextOnAccentFillColorPrimary, #FFFFFF);--TextOnAccentFillColorSecondary: var(--XamlUiOverrideTextOnAccentFillColorSecondary, #FFFFFFB3);--TextOnAccentFillColorDisabled: var(--XamlUiOverrideTextOnAccentFillColorDisabled, #FFFFFF);--SurfaceStrokeColorFlyout: var(--XamlUiOverrideSurfaceStrokeColorFlyout, #0000000F);--AcrylicInAppFillColorDefault: var(--XamlUiOverrideAcrylicInAppFillColorDefault, #FCFCFC26);--SystemChromeMediumLowColor: var(--XamlUiOverrideSystemChromeMediumLowColor, #F2F2F2FF);--DividerStrokeColorDefault: var(--XamlUiOverrideDividerStrokeColorDefault, #0000000F);--LayerFillColorAlt: var(--XamlUiOverrideLayerFillColorAlt, #FFFFFF);--SurfaceStrokeColorDefault: var(--XamlUiOverrideSurfaceStrokeColorDefault, #75757566)}}.xaml-flyout-overlay-backdrop{background:transparent}.xaml-dialog-overlay-backdrop{background:var(--SmokeFillColorDefault)}.cdk-overlay-pane.xaml-overlay-pane{display:grid!important}.cdk-overlay-pane.xaml-overlay-pane XamlRoot{overflow:visible;background:transparent}\n"] }]
|
|
1888
|
+
}], propDecorators: { onContextMenu: [{
|
|
1634
1889
|
type: HostListener,
|
|
1635
|
-
args: ['
|
|
1890
|
+
args: ['contextmenu', ['$event']]
|
|
1636
1891
|
}] } });
|
|
1637
1892
|
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
this._renderer = _renderer;
|
|
1643
|
-
this.Minimum = 0.0;
|
|
1644
|
-
this.Maximum = 1.0;
|
|
1645
|
-
this.StepFrequency = 0;
|
|
1646
|
-
this.Value = 0.0;
|
|
1647
|
-
this.ValueChange = new EventEmitter();
|
|
1648
|
-
this.IsEnabled = true;
|
|
1649
|
-
this.Orientation = 'Horizontal';
|
|
1893
|
+
const PopupTemplate = `<ng-template #template><XamlRoot><FlyoutPresenter #presenter [IsVisible]="isVisible" [TransitionAnimation]="transitionAnimation" [Padding]="Padding"><ng-content/></FlyoutPresenter></XamlRoot></ng-template>`;
|
|
1894
|
+
class FlyoutBaseComponent {
|
|
1895
|
+
get IsOpen() {
|
|
1896
|
+
return this._isOpen;
|
|
1650
1897
|
}
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1898
|
+
set IsOpen(value) {
|
|
1899
|
+
if (value === this._isOpen)
|
|
1900
|
+
return;
|
|
1901
|
+
this._isOpen = value;
|
|
1902
|
+
if (value) {
|
|
1903
|
+
this.showOverlay();
|
|
1904
|
+
}
|
|
1905
|
+
else {
|
|
1906
|
+
this.hideOverlay();
|
|
1907
|
+
}
|
|
1908
|
+
this.IsOpenChange.emit(value);
|
|
1662
1909
|
}
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1910
|
+
updatePlacement() {
|
|
1911
|
+
if (!this._overlayRef)
|
|
1912
|
+
return;
|
|
1913
|
+
let target = this.Target ?? this._hostElement;
|
|
1914
|
+
let positionStrategy = this._overlay
|
|
1915
|
+
.position()
|
|
1916
|
+
.flexibleConnectedTo(target)
|
|
1917
|
+
.withPositions([this.positioning])
|
|
1918
|
+
.withGrowAfterOpen(true)
|
|
1919
|
+
.withFlexibleDimensions(true)
|
|
1920
|
+
.withPush(true);
|
|
1921
|
+
this._overlayRef.updatePositionStrategy(positionStrategy);
|
|
1922
|
+
if (this.Placement === 'Cover') {
|
|
1923
|
+
this._overlayRef.updateSize(target);
|
|
1924
|
+
}
|
|
1669
1925
|
}
|
|
1670
|
-
|
|
1671
|
-
|
|
1926
|
+
async showOverlay() {
|
|
1927
|
+
//Create overlay
|
|
1928
|
+
let config = new OverlayConfig({
|
|
1929
|
+
hasBackdrop: this.HasBackdrop,
|
|
1930
|
+
panelClass: 'xaml-overlay-pane',
|
|
1931
|
+
scrollStrategy: this._overlay.scrollStrategies.reposition(),
|
|
1932
|
+
backdropClass: 'xaml-flyout-overlay-backdrop'
|
|
1933
|
+
});
|
|
1934
|
+
this._overlayRef = this._overlay.create(config);
|
|
1935
|
+
this.OnOverlay(this._overlayRef);
|
|
1936
|
+
//Configure overlay placement
|
|
1937
|
+
this.updatePlacement();
|
|
1938
|
+
//Display overlay
|
|
1939
|
+
let templatePortal = new TemplatePortal(this._template, this._viewContainerRef);
|
|
1940
|
+
this._overlayRef.attach(templatePortal);
|
|
1941
|
+
//Ensure backdrop event handling
|
|
1942
|
+
this._overlayRef.backdropClick().subscribe(() => this.Hide());
|
|
1943
|
+
if (this.HasBackdrop)
|
|
1944
|
+
this._backdropContextMenuSubscription = this._renderer.listen(this._overlayRef.backdropElement, 'contextmenu', p => { p.preventDefault(); this.Hide(); });
|
|
1945
|
+
//Make content visible - after next layout
|
|
1946
|
+
await resume_after(0);
|
|
1947
|
+
this.isVisible = true;
|
|
1948
|
+
this._changeDetector.markForCheck();
|
|
1949
|
+
}
|
|
1950
|
+
async hideOverlay() {
|
|
1951
|
+
//Start hide animation
|
|
1952
|
+
this.isVisible = false;
|
|
1953
|
+
//Remove event handlers
|
|
1954
|
+
if (this._backdropContextMenuSubscription)
|
|
1955
|
+
this._backdropContextMenuSubscription();
|
|
1956
|
+
//Dispose overlay after hidden
|
|
1957
|
+
if (!this._overlayRef)
|
|
1672
1958
|
return;
|
|
1673
|
-
|
|
1674
|
-
this.
|
|
1675
|
-
this.
|
|
1959
|
+
await resume_after(FlyoutPresenter.TransitionDuration);
|
|
1960
|
+
this._overlayRef.detach();
|
|
1961
|
+
this._overlayRef.dispose();
|
|
1962
|
+
this._overlayRef = undefined;
|
|
1676
1963
|
}
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1964
|
+
get Target() {
|
|
1965
|
+
return this._target;
|
|
1966
|
+
}
|
|
1967
|
+
set Target(value) {
|
|
1968
|
+
this._target = value;
|
|
1969
|
+
this.updatePlacement();
|
|
1970
|
+
}
|
|
1971
|
+
get style() {
|
|
1972
|
+
return {
|
|
1973
|
+
'position': 'absolute',
|
|
1974
|
+
'inset': 0,
|
|
1975
|
+
'pointer-events': 'none'
|
|
1976
|
+
};
|
|
1977
|
+
}
|
|
1978
|
+
get transitionAnimation() {
|
|
1979
|
+
return 'Default';
|
|
1980
|
+
}
|
|
1981
|
+
get positioning() {
|
|
1982
|
+
switch (this.Placement) {
|
|
1983
|
+
case "Top":
|
|
1984
|
+
return {
|
|
1985
|
+
originX: 'center', originY: 'top',
|
|
1986
|
+
overlayX: 'center', overlayY: 'bottom'
|
|
1987
|
+
};
|
|
1988
|
+
case "TopEdgeAlignedLeft":
|
|
1989
|
+
return {
|
|
1990
|
+
originX: 'start', originY: 'top',
|
|
1991
|
+
overlayX: 'start', overlayY: 'bottom'
|
|
1992
|
+
};
|
|
1993
|
+
case "TopEdgeAlignedRight":
|
|
1994
|
+
return {
|
|
1995
|
+
originX: 'end', originY: 'top',
|
|
1996
|
+
overlayX: 'end', overlayY: 'bottom'
|
|
1997
|
+
};
|
|
1998
|
+
case "Bottom":
|
|
1999
|
+
return {
|
|
2000
|
+
originX: 'center', originY: 'bottom',
|
|
2001
|
+
overlayX: 'center', overlayY: 'top'
|
|
2002
|
+
};
|
|
2003
|
+
case "BottomEdgeAlignedLeft":
|
|
2004
|
+
return {
|
|
2005
|
+
originX: 'start', originY: 'bottom',
|
|
2006
|
+
overlayX: 'start', overlayY: 'top'
|
|
2007
|
+
};
|
|
2008
|
+
case "BottomEdgeAlignedRight":
|
|
2009
|
+
return {
|
|
2010
|
+
originX: 'end', originY: 'bottom',
|
|
2011
|
+
overlayX: 'end', overlayY: 'top'
|
|
2012
|
+
};
|
|
2013
|
+
case "Left":
|
|
2014
|
+
return {
|
|
2015
|
+
originX: 'start', originY: 'center',
|
|
2016
|
+
overlayX: 'end', overlayY: 'center'
|
|
2017
|
+
};
|
|
2018
|
+
case "LeftEdgeAlignedTop":
|
|
2019
|
+
return {
|
|
2020
|
+
originX: 'start', originY: 'top',
|
|
2021
|
+
overlayX: 'end', overlayY: 'top'
|
|
2022
|
+
};
|
|
2023
|
+
case "LeftEdgeAlignedBottom":
|
|
2024
|
+
return {
|
|
2025
|
+
originX: 'start', originY: 'bottom',
|
|
2026
|
+
overlayX: 'end', overlayY: 'bottom'
|
|
2027
|
+
};
|
|
2028
|
+
case "Right":
|
|
2029
|
+
return {
|
|
2030
|
+
originX: 'end', originY: 'center',
|
|
2031
|
+
overlayX: 'start', overlayY: 'center'
|
|
2032
|
+
};
|
|
2033
|
+
case "RightEdgeAlignedTop":
|
|
2034
|
+
return {
|
|
2035
|
+
originX: 'end', originY: 'top',
|
|
2036
|
+
overlayX: 'start', overlayY: 'top'
|
|
2037
|
+
};
|
|
2038
|
+
case "RightEdgeAlignedBottom":
|
|
2039
|
+
return {
|
|
2040
|
+
originX: 'end', originY: 'bottom',
|
|
2041
|
+
overlayX: 'start', overlayY: 'bottom'
|
|
2042
|
+
};
|
|
2043
|
+
case "Cover":
|
|
2044
|
+
return {
|
|
2045
|
+
originX: 'start', originY: 'top',
|
|
2046
|
+
overlayX: 'start', overlayY: 'top'
|
|
2047
|
+
};
|
|
1687
2048
|
}
|
|
1688
|
-
//Apply range
|
|
1689
|
-
let value = position * (this.Maximum - this.Minimum) + this.Minimum;
|
|
1690
|
-
//Apply step frequency
|
|
1691
|
-
if (this.StepFrequency !== 0)
|
|
1692
|
-
value = Math.trunc(value / this.StepFrequency) * this.StepFrequency;
|
|
1693
|
-
//Apply min-max
|
|
1694
|
-
value = Math.min(this.Maximum, Math.max(this.Minimum, value));
|
|
1695
|
-
//Update value
|
|
1696
|
-
this.Value = value;
|
|
1697
|
-
this.ValueChange.emit(this.Value);
|
|
1698
2049
|
}
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
this.
|
|
1702
|
-
|
|
1703
|
-
|
|
2050
|
+
;
|
|
2051
|
+
constructor(_viewContainerRef, _overlay, _hostElement, _changeDetector, _renderer) {
|
|
2052
|
+
this._viewContainerRef = _viewContainerRef;
|
|
2053
|
+
this._overlay = _overlay;
|
|
2054
|
+
this._hostElement = _hostElement;
|
|
2055
|
+
this._changeDetector = _changeDetector;
|
|
2056
|
+
this._renderer = _renderer;
|
|
2057
|
+
this.Placement = 'Top';
|
|
2058
|
+
this.HasBackdrop = true;
|
|
2059
|
+
this._isOpen = false;
|
|
2060
|
+
this.IsOpenChange = new EventEmitter();
|
|
2061
|
+
this.isVisible = false;
|
|
2062
|
+
this._target = null;
|
|
1704
2063
|
}
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
2064
|
+
ngOnDestroy() {
|
|
2065
|
+
this.hideOverlay();
|
|
2066
|
+
}
|
|
2067
|
+
OnOverlay(overlay) {
|
|
2068
|
+
}
|
|
2069
|
+
Show() {
|
|
2070
|
+
this.IsOpen = true;
|
|
2071
|
+
}
|
|
2072
|
+
Hide() {
|
|
2073
|
+
this.IsOpen = false;
|
|
2074
|
+
}
|
|
2075
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FlyoutBaseComponent, deps: [{ token: i0.ViewContainerRef }, { token: i1$1.Overlay }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2076
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: FlyoutBaseComponent, isStandalone: true, selector: "FlyoutBase", inputs: { Placement: "Placement", Padding: "Padding", HasBackdrop: "HasBackdrop", IsOpen: "IsOpen", Target: "Target" }, outputs: { IsOpenChange: "IsOpenChange" }, host: { properties: { "style": "this.style" } }, providers: [{ provide: 'xaml-flyout', useExisting: FlyoutBaseComponent }], viewQueries: [{ propertyName: "_template", first: true, predicate: ["template"], descendants: true }], ngImport: i0, template: "<ng-template #template><XamlRoot><FlyoutPresenter #presenter [IsVisible]=\"isVisible\" [TransitionAnimation]=\"transitionAnimation\" [Padding]=\"Padding\"><ng-content/></FlyoutPresenter></XamlRoot></ng-template>", isInline: true, dependencies: [{ kind: "component", type: FlyoutPresenter, selector: "FlyoutPresenter", inputs: ["TransitionAnimation", "Padding", "IsVisible"] }, { kind: "component", type: XamlRootComponent, selector: "XamlRoot" }] }); }
|
|
1713
2077
|
}
|
|
1714
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
2078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FlyoutBaseComponent, decorators: [{
|
|
1715
2079
|
type: Component,
|
|
1716
|
-
args: [{
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
}], ctorParameters: () => [{ type: i0.Renderer2 }], propDecorators: { Minimum: [{
|
|
2080
|
+
args: [{
|
|
2081
|
+
imports: [FlyoutPresenter, XamlRootComponent],
|
|
2082
|
+
selector: 'FlyoutBase',
|
|
2083
|
+
template: PopupTemplate,
|
|
2084
|
+
providers: [{ provide: 'xaml-flyout', useExisting: FlyoutBaseComponent }]
|
|
2085
|
+
}]
|
|
2086
|
+
}], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }], propDecorators: { Placement: [{
|
|
1724
2087
|
type: Input
|
|
1725
|
-
}],
|
|
2088
|
+
}], Padding: [{
|
|
1726
2089
|
type: Input
|
|
1727
|
-
}],
|
|
2090
|
+
}], HasBackdrop: [{
|
|
1728
2091
|
type: Input
|
|
1729
|
-
}],
|
|
2092
|
+
}], IsOpen: [{
|
|
1730
2093
|
type: Input
|
|
1731
|
-
}],
|
|
2094
|
+
}], IsOpenChange: [{
|
|
1732
2095
|
type: Output
|
|
1733
|
-
}],
|
|
1734
|
-
type: Input
|
|
1735
|
-
}], Orientation: [{
|
|
2096
|
+
}], Target: [{
|
|
1736
2097
|
type: Input
|
|
1737
|
-
}],
|
|
1738
|
-
type: ViewChild,
|
|
1739
|
-
args: ['track']
|
|
1740
|
-
}], _thumb: [{
|
|
2098
|
+
}], _template: [{
|
|
1741
2099
|
type: ViewChild,
|
|
1742
|
-
args: ['
|
|
1743
|
-
}],
|
|
1744
|
-
type:
|
|
1745
|
-
args: ['
|
|
1746
|
-
}], onThumbPointerUp: [{
|
|
1747
|
-
type: HostListener,
|
|
1748
|
-
args: ['pointerup', ['$event']]
|
|
2100
|
+
args: ['template']
|
|
2101
|
+
}], style: [{
|
|
2102
|
+
type: HostBinding,
|
|
2103
|
+
args: ['style']
|
|
1749
2104
|
}] } });
|
|
1750
2105
|
|
|
1751
|
-
class
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
2106
|
+
class FlyoutComponent extends FlyoutBaseComponent {
|
|
2107
|
+
get transitionAnimation() {
|
|
2108
|
+
switch (this.Placement) {
|
|
2109
|
+
case "Top":
|
|
2110
|
+
case "TopEdgeAlignedLeft":
|
|
2111
|
+
case "TopEdgeAlignedRight":
|
|
2112
|
+
return 'SlideUp';
|
|
2113
|
+
case "Bottom":
|
|
2114
|
+
case "BottomEdgeAlignedLeft":
|
|
2115
|
+
case "BottomEdgeAlignedRight":
|
|
2116
|
+
return 'SlideDown';
|
|
2117
|
+
case "Left":
|
|
2118
|
+
case "LeftEdgeAlignedTop":
|
|
2119
|
+
case "LeftEdgeAlignedBottom":
|
|
2120
|
+
return 'SlideLeft';
|
|
2121
|
+
case "Right":
|
|
2122
|
+
case "RightEdgeAlignedTop":
|
|
2123
|
+
case "RightEdgeAlignedBottom":
|
|
2124
|
+
return 'SlideRight';
|
|
2125
|
+
default:
|
|
2126
|
+
return 'Default';
|
|
2127
|
+
}
|
|
1755
2128
|
}
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
2129
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FlyoutComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2130
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: FlyoutComponent, isStandalone: true, selector: "Flyout", providers: [{ provide: 'xaml-flyout', useExisting: FlyoutComponent }], usesInheritance: true, ngImport: i0, template: "<ng-template #template><XamlRoot><FlyoutPresenter #presenter [IsVisible]=\"isVisible\" [TransitionAnimation]=\"transitionAnimation\" [Padding]=\"Padding\"><ng-content/></FlyoutPresenter></XamlRoot></ng-template>", isInline: true, styles: ["FlyoutPresenter{padding:16px}\n"], dependencies: [{ kind: "component", type: FlyoutPresenter, selector: "FlyoutPresenter", inputs: ["TransitionAnimation", "Padding", "IsVisible"] }, { kind: "component", type: XamlRootComponent, selector: "XamlRoot" }] }); }
|
|
2131
|
+
}
|
|
2132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FlyoutComponent, decorators: [{
|
|
2133
|
+
type: Component,
|
|
2134
|
+
args: [{ selector: 'Flyout', imports: [FlyoutPresenter, XamlRootComponent], template: PopupTemplate, providers: [{ provide: 'xaml-flyout', useExisting: FlyoutComponent }], styles: ["FlyoutPresenter{padding:16px}\n"] }]
|
|
2135
|
+
}] });
|
|
2136
|
+
|
|
2137
|
+
class ComboBoxComponent extends SelectorComponent {
|
|
2138
|
+
get tabIndex() {
|
|
2139
|
+
return this.IsEnabled ? '0' : null;
|
|
2140
|
+
}
|
|
2141
|
+
onKeyDown(event) {
|
|
2142
|
+
if (!this.IsEnabled)
|
|
2143
|
+
return;
|
|
2144
|
+
//Type-ahead has already applied its match to the selection, so both keys
|
|
2145
|
+
//just dismiss the open list.
|
|
2146
|
+
if (event.key === 'Enter' || event.key === 'Escape') {
|
|
2147
|
+
if (this._popup?.IsOpen) {
|
|
2148
|
+
this._popup.IsOpen = false;
|
|
2149
|
+
event.preventDefault();
|
|
2150
|
+
}
|
|
2151
|
+
return;
|
|
1760
2152
|
}
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
2153
|
+
if (!this.IsTextSearchEnabled)
|
|
2154
|
+
return;
|
|
2155
|
+
//Only printable single characters contribute; ignore arrows, shortcuts, etc.
|
|
2156
|
+
if (event.key.length !== 1 || event.ctrlKey || event.altKey || event.metaKey)
|
|
2157
|
+
return;
|
|
2158
|
+
//Append while typing is fast; a long-enough pause resets to a new search.
|
|
2159
|
+
let now = Date.now();
|
|
2160
|
+
if (now - this._lastSearchTime > this._textSearchTimeout)
|
|
2161
|
+
this._searchText = '';
|
|
2162
|
+
this._lastSearchTime = now;
|
|
2163
|
+
this._searchText += event.key;
|
|
2164
|
+
let query = this._searchText.toLowerCase();
|
|
2165
|
+
let index = this.ItemSource.findIndex(item => this.getDisplayText(item).toLowerCase().includes(query));
|
|
2166
|
+
if (index >= 0) {
|
|
2167
|
+
this.SelectedIndex = index;
|
|
2168
|
+
setTimeout(() => this._selector?.GetElement(index)?.scrollIntoView({ block: 'nearest' }));
|
|
2169
|
+
event.preventDefault();
|
|
1764
2170
|
}
|
|
1765
2171
|
}
|
|
1766
|
-
|
|
1767
|
-
|
|
2172
|
+
getDisplayText(item) {
|
|
2173
|
+
if (item == null)
|
|
2174
|
+
return '';
|
|
2175
|
+
let value = this.DisplayMemberPath ? item[this.DisplayMemberPath] : item;
|
|
2176
|
+
return value == null ? '' : String(value);
|
|
2177
|
+
}
|
|
2178
|
+
get item() {
|
|
2179
|
+
return this.SelectedItem;
|
|
2180
|
+
}
|
|
2181
|
+
get index() {
|
|
2182
|
+
return this.SelectedIndex;
|
|
2183
|
+
}
|
|
2184
|
+
constructor(_changeDetector, _host) {
|
|
2185
|
+
super();
|
|
2186
|
+
this._changeDetector = _changeDetector;
|
|
2187
|
+
this._host = _host;
|
|
2188
|
+
this.IsTextSearchEnabled = true;
|
|
2189
|
+
this._textSearchTimeout = 1000;
|
|
2190
|
+
this._searchText = '';
|
|
2191
|
+
this._lastSearchTime = 0;
|
|
2192
|
+
this.target = null;
|
|
2193
|
+
}
|
|
2194
|
+
onIsOpenChanged(value) {
|
|
2195
|
+
if (!value)
|
|
2196
|
+
return;
|
|
2197
|
+
let rect = this._host.nativeElement.getBoundingClientRect();
|
|
2198
|
+
let popupOffset = -(this._selector?.GetElement(this.SelectedIndex)?.offsetTop ?? 0);
|
|
2199
|
+
this.target = { x: rect.left + 3, y: rect.top + popupOffset - 4, width: rect.width };
|
|
2200
|
+
}
|
|
2201
|
+
ngAfterViewInit() {
|
|
2202
|
+
//help the layout finish itself
|
|
2203
|
+
this._changeDetector.detectChanges();
|
|
2204
|
+
}
|
|
2205
|
+
onItemClicked() {
|
|
2206
|
+
if (this._popup)
|
|
2207
|
+
this._popup.IsOpen = false;
|
|
2208
|
+
}
|
|
2209
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ComboBoxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2210
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ComboBoxComponent, isStandalone: true, selector: "ComboBox", inputs: { IsTextSearchEnabled: "IsTextSearchEnabled" }, host: { listeners: { "keydown": "onKeyDown($event)" }, properties: { "attr.tabindex": "this.tabIndex" } }, viewQueries: [{ propertyName: "_selector", first: true, predicate: ListViewComponent, descendants: true }, { propertyName: "_popup", first: true, predicate: ["xaml-flyout"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<DropDownButton [Height]=\"Height\" [Width]=\"Width\" [HorizontalContentAlignment]=\"HorizontalContentAlignment\" [VerticalContentAlignment]=\"VerticalContentAlignment\" [IsEnabled]=\"IsEnabled\">\n <ItemContainer #container><ng-container *ngIf=\"ItemTemplate\">\n <ng-container [ngTemplateOutlet]=\"ItemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: item }\" [ngTemplateOutletInjector]=\"container.Injector\" />\n </ng-container>\n <ng-container *ngIf=\"!ItemTemplate\">{{ DisplayMemberPath && item !== null ? item[DisplayMemberPath] : item }}</ng-container></ItemContainer>\n <Flyout Placement=\"Cover\" Padding=\"0\" [Target]=\"target\" (IsOpenChange)=\"onIsOpenChanged($event)\">\n <ListView [ItemSource]=\"ItemSource\" [(SelectedIndex)]=\"SelectedIndex\" [HorizontalContentAlignment]=\"HorizontalContentAlignment\" [VerticalContentAlignment]=\"VerticalContentAlignment\"\n [ItemTemplate]=\"ItemTemplate\" [DisplayMemberPath]=\"DisplayMemberPath\" [SelectedValuePath]=\"SelectedValuePath\" (ItemClick)=\"onItemClicked()\"/>\n </Flyout>\n </DropDownButton>", isInline: true, styles: [":host ::ng-deep .popup>.popup-container{left:0;right:0;top:0}:host ::ng-deep .popup>.popup-container>.popup-content{padding:0!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DropDownButtonComponent, selector: "DropDownButton" }, { kind: "component", type: FlyoutComponent, selector: "Flyout" }, { kind: "component", type: ListViewComponent, selector: "ListView" }, { kind: "component", type: ItemContainerComponent, selector: "ItemContainer" }] }); }
|
|
1768
2211
|
}
|
|
1769
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
2212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ComboBoxComponent, decorators: [{
|
|
1770
2213
|
type: Component,
|
|
1771
|
-
args: [{ selector: '
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
}, {
|
|
1780
|
-
type: HostBinding,
|
|
1781
|
-
args: ['style.grid-template-rows']
|
|
1782
|
-
}], AutoColumnDefinition: [{
|
|
2214
|
+
args: [{ selector: 'ComboBox', imports: [CommonModule, DropDownButtonComponent, FlyoutComponent, ListViewComponent, ItemContainerComponent], template: `<DropDownButton [Height]="Height" [Width]="Width" [HorizontalContentAlignment]="HorizontalContentAlignment" [VerticalContentAlignment]="VerticalContentAlignment" [IsEnabled]="IsEnabled">
|
|
2215
|
+
<ItemContainer #container>${SelectorItemTemplate}</ItemContainer>
|
|
2216
|
+
<Flyout Placement="Cover" Padding="0" [Target]="target" (IsOpenChange)="onIsOpenChanged($event)">
|
|
2217
|
+
<ListView [ItemSource]="ItemSource" [(SelectedIndex)]="SelectedIndex" [HorizontalContentAlignment]="HorizontalContentAlignment" [VerticalContentAlignment]="VerticalContentAlignment"
|
|
2218
|
+
[ItemTemplate]="ItemTemplate" [DisplayMemberPath]="DisplayMemberPath" [SelectedValuePath]="SelectedValuePath" (ItemClick)="onItemClicked()"/>
|
|
2219
|
+
</Flyout>
|
|
2220
|
+
</DropDownButton>`, styles: [":host ::ng-deep .popup>.popup-container{left:0;right:0;top:0}:host ::ng-deep .popup>.popup-container>.popup-content{padding:0!important}\n"] }]
|
|
2221
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { IsTextSearchEnabled: [{
|
|
1783
2222
|
type: Input
|
|
1784
|
-
}, {
|
|
2223
|
+
}], tabIndex: [{
|
|
1785
2224
|
type: HostBinding,
|
|
1786
|
-
args: ['
|
|
1787
|
-
}],
|
|
2225
|
+
args: ['attr.tabindex']
|
|
2226
|
+
}], onKeyDown: [{
|
|
2227
|
+
type: HostListener,
|
|
2228
|
+
args: ['keydown', ['$event']]
|
|
2229
|
+
}], _selector: [{
|
|
2230
|
+
type: ViewChild,
|
|
2231
|
+
args: [ListViewComponent]
|
|
2232
|
+
}], _popup: [{
|
|
2233
|
+
type: ViewChild,
|
|
2234
|
+
args: ['xaml-flyout']
|
|
2235
|
+
}] } });
|
|
2236
|
+
|
|
2237
|
+
class RadioButtonComponent extends BorderComponent {
|
|
2238
|
+
onChange(event) {
|
|
2239
|
+
this.IsChecked = (event.target).checked;
|
|
2240
|
+
this.IsCheckedChange.emit(this.IsChecked);
|
|
2241
|
+
}
|
|
2242
|
+
constructor(_group) {
|
|
2243
|
+
super();
|
|
2244
|
+
this._group = _group;
|
|
2245
|
+
this.IsEnabled = true;
|
|
2246
|
+
this.IsChecked = false;
|
|
2247
|
+
this.IsCheckedChange = new EventEmitter();
|
|
2248
|
+
this.Group = "";
|
|
2249
|
+
if (this._group)
|
|
2250
|
+
this._group.registerOption(this);
|
|
2251
|
+
}
|
|
2252
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RadioButtonComponent, deps: [{ token: RadioButtonGroupComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2253
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: RadioButtonComponent, isStandalone: true, selector: "RadioButton", inputs: { IsEnabled: "IsEnabled", IsChecked: "IsChecked", Group: "Group", Value: "Value" }, outputs: { IsCheckedChange: "IsCheckedChange" }, usesInheritance: true, ngImport: i0, template: `<label class="container">
|
|
2254
|
+
<input type="radio" [name]="Group" [value]="Value" [checked]="IsChecked" (change)="onChange($event)" [disabled]="!IsEnabled">
|
|
2255
|
+
<div class="radioButton">
|
|
2256
|
+
<div class="circle"></div>
|
|
2257
|
+
</div>
|
|
2258
|
+
<div class="content">
|
|
2259
|
+
<ng-content/>
|
|
2260
|
+
</div>
|
|
2261
|
+
</label>`, isInline: true, styles: [":host{position:relative}.container{display:grid;grid-template-columns:auto 1fr;column-gap:6px}input{display:none}input[type=radio]:checked+.radioButton>.circle{display:grid}input[type=radio]:not(:checked):not(:hover):not(:active):not(:disabled)+.radioButton{background-color:var(--ControlAltFillColorSecondary);border-color:var(--ControlStrongStrokeColorDefault)}input[type=radio]:not(:checked):hover:not(:active):not(:disabled)+.radioButton{background-color:var(--ControlAltFillColorTertiary);border-color:var(--ControlStrongStrokeColorDefault)}input[type=radio]:not(:checked):active:not(:disabled)+.radioButton{background-color:var(--SubtleFillColorTransparent);border-color:var(--ControlStrongStrokeColorDisabled)}input[type=radio]:not(:checked):active:not(:disabled)+.radioButton>.circle{transform:scale(1)}input[type=radio]:checked:not(:hover):not(:active):not(:disabled)+.radioButton{background-color:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault)}input[type=radio]:checked:not(:hover):not(:active):not(:disabled)+.radioButton>.circle{transform:scale(1)}input[type=radio]:checked:hover:not(:active):not(:disabled)+.radioButton{background-color:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary)}input[type=radio]:checked:hover:not(:active):not(:disabled)+.radioButton>.circle{transform:scale(1.2)}input[type=radio]:checked:active:not(:disabled)+.radioButton{background-color:var(--AccentFillColorTertiary);border-color:var(--AccentFillColorTertiary)}input[type=radio]:checked:active:not(:disabled)+.radioButton>.circle{transform:scale(1)}input[type=radio]:not(:checked):disabled+.radioButton{background-color:var(--ControlAltFillColorDisabled);border-color:var(--ControlStrongStrokeColorDisabled)}input[type=radio]:checked:disabled+.radioButton{background-color:var(--AccentFillColorDisabled);border-color:var(--ControlStrongStrokeColorDisabled)}.radioButton{display:grid;width:20px;height:20px;border-radius:11px;border-style:solid;border-width:var(--ControlBorderThickness);place-items:center;transition:border-color var(--ControlFastAnimationDuration);transition:background-color var(--ControlFastAnimationDuration)}.circle{width:10px;height:10px;border-radius:5px;background-color:var(--TextOnAccentFillColorPrimary);transition:transform var(--ControlNormalAnimationDuration);transform:scale(0)}.content{align-self:center}\n"] }); }
|
|
2262
|
+
}
|
|
2263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RadioButtonComponent, decorators: [{
|
|
2264
|
+
type: Component,
|
|
2265
|
+
args: [{ selector: 'RadioButton', template: `<label class="container">
|
|
2266
|
+
<input type="radio" [name]="Group" [value]="Value" [checked]="IsChecked" (change)="onChange($event)" [disabled]="!IsEnabled">
|
|
2267
|
+
<div class="radioButton">
|
|
2268
|
+
<div class="circle"></div>
|
|
2269
|
+
</div>
|
|
2270
|
+
<div class="content">
|
|
2271
|
+
<ng-content/>
|
|
2272
|
+
</div>
|
|
2273
|
+
</label>`, styles: [":host{position:relative}.container{display:grid;grid-template-columns:auto 1fr;column-gap:6px}input{display:none}input[type=radio]:checked+.radioButton>.circle{display:grid}input[type=radio]:not(:checked):not(:hover):not(:active):not(:disabled)+.radioButton{background-color:var(--ControlAltFillColorSecondary);border-color:var(--ControlStrongStrokeColorDefault)}input[type=radio]:not(:checked):hover:not(:active):not(:disabled)+.radioButton{background-color:var(--ControlAltFillColorTertiary);border-color:var(--ControlStrongStrokeColorDefault)}input[type=radio]:not(:checked):active:not(:disabled)+.radioButton{background-color:var(--SubtleFillColorTransparent);border-color:var(--ControlStrongStrokeColorDisabled)}input[type=radio]:not(:checked):active:not(:disabled)+.radioButton>.circle{transform:scale(1)}input[type=radio]:checked:not(:hover):not(:active):not(:disabled)+.radioButton{background-color:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault)}input[type=radio]:checked:not(:hover):not(:active):not(:disabled)+.radioButton>.circle{transform:scale(1)}input[type=radio]:checked:hover:not(:active):not(:disabled)+.radioButton{background-color:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary)}input[type=radio]:checked:hover:not(:active):not(:disabled)+.radioButton>.circle{transform:scale(1.2)}input[type=radio]:checked:active:not(:disabled)+.radioButton{background-color:var(--AccentFillColorTertiary);border-color:var(--AccentFillColorTertiary)}input[type=radio]:checked:active:not(:disabled)+.radioButton>.circle{transform:scale(1)}input[type=radio]:not(:checked):disabled+.radioButton{background-color:var(--ControlAltFillColorDisabled);border-color:var(--ControlStrongStrokeColorDisabled)}input[type=radio]:checked:disabled+.radioButton{background-color:var(--AccentFillColorDisabled);border-color:var(--ControlStrongStrokeColorDisabled)}.radioButton{display:grid;width:20px;height:20px;border-radius:11px;border-style:solid;border-width:var(--ControlBorderThickness);place-items:center;transition:border-color var(--ControlFastAnimationDuration);transition:background-color var(--ControlFastAnimationDuration)}.circle{width:10px;height:10px;border-radius:5px;background-color:var(--TextOnAccentFillColorPrimary);transition:transform var(--ControlNormalAnimationDuration);transform:scale(0)}.content{align-self:center}\n"] }]
|
|
2274
|
+
}], ctorParameters: () => [{ type: RadioButtonGroupComponent, decorators: [{
|
|
2275
|
+
type: Optional
|
|
2276
|
+
}] }], propDecorators: { IsEnabled: [{
|
|
1788
2277
|
type: Input
|
|
1789
|
-
}, {
|
|
1790
|
-
type: HostBinding,
|
|
1791
|
-
args: ['style.grid-auto-rows']
|
|
1792
|
-
}], ColumnSpacing: [{
|
|
2278
|
+
}], IsChecked: [{
|
|
1793
2279
|
type: Input
|
|
1794
|
-
}, {
|
|
1795
|
-
type:
|
|
1796
|
-
|
|
1797
|
-
}], RowSpacing: [{
|
|
2280
|
+
}], IsCheckedChange: [{
|
|
2281
|
+
type: Output
|
|
2282
|
+
}], Group: [{
|
|
1798
2283
|
type: Input
|
|
1799
|
-
}, {
|
|
1800
|
-
type: HostBinding,
|
|
1801
|
-
args: ['style.row-gap']
|
|
1802
|
-
}], Orientation: [{
|
|
2284
|
+
}], Value: [{
|
|
1803
2285
|
type: Input
|
|
1804
|
-
}], gridAutoFlow: [{
|
|
1805
|
-
type: HostBinding,
|
|
1806
|
-
args: ['style.grid-auto-flow']
|
|
1807
2286
|
}] } });
|
|
1808
|
-
class
|
|
1809
|
-
}
|
|
1810
|
-
class GridDirective {
|
|
2287
|
+
class RadioButtonGroupComponent extends StackPanelComponent {
|
|
1811
2288
|
constructor() {
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
return this.Grid.Column !== undefined ? this.Grid.Column + 1 : undefined;
|
|
2289
|
+
super(...arguments);
|
|
2290
|
+
this.ValueChange = new EventEmitter();
|
|
2291
|
+
this._children = [];
|
|
1816
2292
|
}
|
|
1817
|
-
|
|
1818
|
-
|
|
2293
|
+
set Value(value) {
|
|
2294
|
+
if (this._children) {
|
|
2295
|
+
for (let item of this._children) {
|
|
2296
|
+
item.IsChecked = item.Value === value;
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
if (this._value === value)
|
|
2300
|
+
return;
|
|
2301
|
+
this._value = value;
|
|
2302
|
+
this.ValueChange.emit(value);
|
|
1819
2303
|
}
|
|
1820
|
-
get
|
|
1821
|
-
return this.
|
|
2304
|
+
get Value() {
|
|
2305
|
+
return this._value;
|
|
1822
2306
|
}
|
|
1823
|
-
|
|
1824
|
-
|
|
2307
|
+
registerOption(child) {
|
|
2308
|
+
child.Group = 'xaml-radio-button-group-' + this._id;
|
|
2309
|
+
if (child.Value === undefined)
|
|
2310
|
+
child.Value = this._children.length;
|
|
2311
|
+
if (child.Value === this.Value)
|
|
2312
|
+
child.IsChecked = true;
|
|
2313
|
+
child.IsCheckedChange.subscribe(p => {
|
|
2314
|
+
this.Value = child.Value;
|
|
2315
|
+
});
|
|
2316
|
+
this._children.push(child);
|
|
1825
2317
|
}
|
|
1826
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1827
|
-
static { this.ɵ
|
|
2318
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RadioButtonGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2319
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: RadioButtonGroupComponent, isStandalone: true, selector: "RadioButtonGroup", inputs: { Value: "Value" }, outputs: { ValueChange: "ValueChange" }, usesInheritance: true, ngImport: i0, template: `<ng-content/>`, isInline: true, styles: [":host{display:grid;position:relative}\n"] }); }
|
|
1828
2320
|
}
|
|
1829
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1830
|
-
type:
|
|
1831
|
-
args: [{
|
|
1832
|
-
|
|
1833
|
-
standalone: false
|
|
1834
|
-
}]
|
|
1835
|
-
}], propDecorators: { Grid: [{
|
|
2321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RadioButtonGroupComponent, decorators: [{
|
|
2322
|
+
type: Component,
|
|
2323
|
+
args: [{ selector: 'RadioButtonGroup', template: `<ng-content/>`, styles: [":host{display:grid;position:relative}\n"] }]
|
|
2324
|
+
}], propDecorators: { Value: [{
|
|
1836
2325
|
type: Input
|
|
1837
|
-
}],
|
|
1838
|
-
type:
|
|
1839
|
-
args: ['style.grid-column-start']
|
|
1840
|
-
}], gridRowStart: [{
|
|
1841
|
-
type: HostBinding,
|
|
1842
|
-
args: ['style.grid-row-start']
|
|
1843
|
-
}], gridColumnEnd: [{
|
|
1844
|
-
type: HostBinding,
|
|
1845
|
-
args: ['style.grid-column-end']
|
|
1846
|
-
}], gridRowEnd: [{
|
|
1847
|
-
type: HostBinding,
|
|
1848
|
-
args: ['style.grid-row-end']
|
|
2326
|
+
}], ValueChange: [{
|
|
2327
|
+
type: Output
|
|
1849
2328
|
}] } });
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
2329
|
+
|
|
2330
|
+
class RadioToggleButtonComponent extends RadioButtonComponent {
|
|
2331
|
+
get checked() {
|
|
2332
|
+
return this.IsChecked;
|
|
1853
2333
|
}
|
|
1854
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1855
|
-
static { this.ɵ
|
|
2334
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RadioToggleButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2335
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: RadioToggleButtonComponent, isStandalone: true, selector: "RadioToggleButton", host: { properties: { "class.checked": "this.checked" } }, usesInheritance: true, ngImport: i0, template: `<label>
|
|
2336
|
+
<input type="radio" [name]="Group" [value]="Value" [checked]="IsChecked" (change)="onChange($event)" [disabled]="!IsEnabled">
|
|
2337
|
+
<ng-content/>
|
|
2338
|
+
</label>`, isInline: true, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n", ":host{padding:0}input{display:none}label{padding:var(--ButtonPadding)}\n"] }); }
|
|
1856
2339
|
}
|
|
1857
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1858
|
-
type:
|
|
1859
|
-
args: [{
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
}], propDecorators: {
|
|
1864
|
-
type: Input,
|
|
1865
|
-
args: ['Grid-Row']
|
|
1866
|
-
}], gridRowStart: [{
|
|
2340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RadioToggleButtonComponent, decorators: [{
|
|
2341
|
+
type: Component,
|
|
2342
|
+
args: [{ selector: 'RadioToggleButton', template: `<label>
|
|
2343
|
+
<input type="radio" [name]="Group" [value]="Value" [checked]="IsChecked" (change)="onChange($event)" [disabled]="!IsEnabled">
|
|
2344
|
+
<ng-content/>
|
|
2345
|
+
</label>`, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n", ":host{padding:0}input{display:none}label{padding:var(--ButtonPadding)}\n"] }]
|
|
2346
|
+
}], propDecorators: { checked: [{
|
|
1867
2347
|
type: HostBinding,
|
|
1868
|
-
args: ['
|
|
2348
|
+
args: ['class.checked']
|
|
1869
2349
|
}] } });
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
2350
|
+
|
|
2351
|
+
class RepeatButtonComponent extends ButtonComponent {
|
|
2352
|
+
constructor() {
|
|
2353
|
+
super(...arguments);
|
|
2354
|
+
this.Delay = 250;
|
|
2355
|
+
this.Interval = 250;
|
|
1873
2356
|
}
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
type: HostBinding,
|
|
1888
|
-
args: ['style.grid-column-start']
|
|
1889
|
-
}] } });
|
|
1890
|
-
class GridRowSpanDirective {
|
|
1891
|
-
get gridRowEnd() {
|
|
1892
|
-
return this.RowSpan !== undefined ? ('span ' + this.RowSpan) : undefined;
|
|
2357
|
+
onPointerDown(event) {
|
|
2358
|
+
if (!this.IsEnabled)
|
|
2359
|
+
return;
|
|
2360
|
+
if (event.button !== 0)
|
|
2361
|
+
return;
|
|
2362
|
+
event.target.setPointerCapture(event.pointerId);
|
|
2363
|
+
this.Click.emit();
|
|
2364
|
+
this._delayTimer = setTimeout(() => {
|
|
2365
|
+
this.Click.emit();
|
|
2366
|
+
this._intervalTimer = setInterval(() => {
|
|
2367
|
+
this.Click.emit();
|
|
2368
|
+
}, this.Interval);
|
|
2369
|
+
}, this.Delay);
|
|
1893
2370
|
}
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
type: Directive,
|
|
1899
|
-
args: [{
|
|
1900
|
-
selector: '[Grid-RowSpan]',
|
|
1901
|
-
standalone: false
|
|
1902
|
-
}]
|
|
1903
|
-
}], propDecorators: { RowSpan: [{
|
|
1904
|
-
type: Input,
|
|
1905
|
-
args: ['Grid-RowSpan']
|
|
1906
|
-
}], gridRowEnd: [{
|
|
1907
|
-
type: HostBinding,
|
|
1908
|
-
args: ['style.grid-row-end']
|
|
1909
|
-
}] } });
|
|
1910
|
-
class GridColumnSpanDirective {
|
|
1911
|
-
get gridColumnEnd() {
|
|
1912
|
-
return this.ColumnSpan !== undefined ? ('span ' + this.ColumnSpan) : undefined;
|
|
2371
|
+
onPointerUp(event) {
|
|
2372
|
+
if (event.button !== 0)
|
|
2373
|
+
return;
|
|
2374
|
+
this.clearTimers();
|
|
1913
2375
|
}
|
|
1914
|
-
|
|
1915
|
-
|
|
2376
|
+
clearTimers() {
|
|
2377
|
+
if (this._delayTimer !== undefined)
|
|
2378
|
+
clearTimeout(this._delayTimer);
|
|
2379
|
+
if (this._intervalTimer !== undefined)
|
|
2380
|
+
clearInterval(this._intervalTimer);
|
|
2381
|
+
}
|
|
2382
|
+
onClick(event) {
|
|
2383
|
+
//Disable pointer event handling on the base button
|
|
2384
|
+
}
|
|
2385
|
+
ngOnDestroy() {
|
|
2386
|
+
this.clearTimers();
|
|
2387
|
+
}
|
|
2388
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RepeatButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2389
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: RepeatButtonComponent, isStandalone: true, selector: "RepeatButton", inputs: { Delay: "Delay", Interval: "Interval" }, usesInheritance: true, ngImport: i0, template: "<TextBlock *ngIf=\"Content !== undefined\" [Text]=\"Content\"/>\n <ng-content/>", isInline: true, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TextBlockComponent, selector: "TextBlock", inputs: ["FontFamily", "Text", "FontSize", "FontStyle", "FontWeight", "Foreground", "TextAlignment", "IsTextSelectionEnabled", "TextDecorations", "TextTrimming", "TextWrapping"] }] }); }
|
|
1916
2390
|
}
|
|
1917
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1918
|
-
type:
|
|
1919
|
-
args: [{
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
type: Input,
|
|
1925
|
-
args: ['Grid-ColumnSpan']
|
|
1926
|
-
}], gridColumnEnd: [{
|
|
1927
|
-
type: HostBinding,
|
|
1928
|
-
args: ['style.grid-column-end']
|
|
2391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RepeatButtonComponent, decorators: [{
|
|
2392
|
+
type: Component,
|
|
2393
|
+
args: [{ selector: 'RepeatButton', imports: [CommonModule, TextBlockComponent], template: ButtonTemplate, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n"] }]
|
|
2394
|
+
}], propDecorators: { Delay: [{
|
|
2395
|
+
type: Input
|
|
2396
|
+
}], Interval: [{
|
|
2397
|
+
type: Input
|
|
1929
2398
|
}] } });
|
|
1930
|
-
const GridComponents = [
|
|
1931
|
-
GridComponent,
|
|
1932
|
-
GridDirective,
|
|
1933
|
-
GridRowDirective,
|
|
1934
|
-
GridRowSpanDirective,
|
|
1935
|
-
GridColumnDirective,
|
|
1936
|
-
GridColumnSpanDirective
|
|
1937
|
-
];
|
|
1938
|
-
class GridModule {
|
|
1939
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1940
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: GridModule, declarations: [GridComponent, GridDirective, GridRowDirective, GridRowSpanDirective, GridColumnDirective, GridColumnSpanDirective], exports: [GridComponent, GridDirective, GridRowDirective, GridRowSpanDirective, GridColumnDirective, GridColumnSpanDirective] }); }
|
|
1941
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridModule }); }
|
|
1942
|
-
}
|
|
1943
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridModule, decorators: [{
|
|
1944
|
-
type: NgModule,
|
|
1945
|
-
args: [{
|
|
1946
|
-
declarations: GridComponents,
|
|
1947
|
-
exports: GridComponents
|
|
1948
|
-
}]
|
|
1949
|
-
}] });
|
|
1950
2399
|
|
|
1951
2400
|
class SplitButtonComponent extends FrameworkElementComponent {
|
|
1952
2401
|
constructor() {
|
|
1953
2402
|
super(...arguments);
|
|
1954
2403
|
this.IsEnabled = true;
|
|
2404
|
+
this.HorizontalContentAlignment = 'Center';
|
|
2405
|
+
this.VerticalContentAlignment = 'Center';
|
|
1955
2406
|
this.Click = new EventEmitter();
|
|
1956
2407
|
}
|
|
1957
2408
|
get buttonClass() {
|
|
@@ -1968,23 +2419,29 @@ class SplitButtonComponent extends FrameworkElementComponent {
|
|
|
1968
2419
|
this._popup.IsOpen = true;
|
|
1969
2420
|
}
|
|
1970
2421
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SplitButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1971
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: SplitButtonComponent, isStandalone: true, selector: "SplitButton", inputs: { IsEnabled: "IsEnabled" }, outputs: { Click: "Click" }, queries: [{ propertyName: "_popup", first: true, predicate: ["xaml-flyout"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<Grid ColumnDefinitions="1fr auto">
|
|
1972
|
-
<Button CornerRadius="4px 0 0 4px" [IsEnabled]="IsEnabled" (Click)="onButtonClick()" [ngClass]="buttonClass"
|
|
1973
|
-
|
|
2422
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: SplitButtonComponent, isStandalone: true, selector: "SplitButton", inputs: { IsEnabled: "IsEnabled", HorizontalContentAlignment: "HorizontalContentAlignment", VerticalContentAlignment: "VerticalContentAlignment" }, outputs: { Click: "Click" }, queries: [{ propertyName: "_popup", first: true, predicate: ["xaml-flyout"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<Grid [Height]="Height" [Width]="Width" [MinWidth]="MinWidth" [MinHeight]="MinHeight" ColumnDefinitions="1fr auto">
|
|
2423
|
+
<Button [Padding]="Padding" CornerRadius="4px 0 0 4px" [IsEnabled]="IsEnabled" (Click)="onButtonClick()" [ngClass]="buttonClass"
|
|
2424
|
+
[HorizontalContentAlignment]="HorizontalContentAlignment" [VerticalContentAlignment]="VerticalContentAlignment"><ng-content/></Button>
|
|
2425
|
+
<DropDownButton CornerRadius="0 4px 4px 0" (Click)="onDropDownClick()" [IsEnabled]="IsEnabled"/>
|
|
1974
2426
|
</Grid>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ButtonComponent, selector: "Button", inputs: ["IsEnabled", "Content", "HorizontalContentAlignment", "VerticalContentAlignment"], outputs: ["Click"] }, { kind: "component", type: DropDownButtonComponent, selector: "DropDownButton" }, { kind: "ngmodule", type: GridModule }, { kind: "component", type: GridComponent, selector: "Grid", inputs: ["ColumnDefinitions", "RowDefinitions", "AutoColumnDefinition", "AutoRowDefinition", "ColumnSpacing", "RowSpacing", "Orientation"] }] }); }
|
|
1975
2427
|
}
|
|
1976
2428
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SplitButtonComponent, decorators: [{
|
|
1977
2429
|
type: Component,
|
|
1978
2430
|
args: [{
|
|
1979
2431
|
selector: 'SplitButton',
|
|
1980
|
-
template: `<Grid ColumnDefinitions="1fr auto">
|
|
1981
|
-
<Button CornerRadius="4px 0 0 4px" [IsEnabled]="IsEnabled" (Click)="onButtonClick()" [ngClass]="buttonClass"
|
|
1982
|
-
|
|
2432
|
+
template: `<Grid [Height]="Height" [Width]="Width" [MinWidth]="MinWidth" [MinHeight]="MinHeight" ColumnDefinitions="1fr auto">
|
|
2433
|
+
<Button [Padding]="Padding" CornerRadius="4px 0 0 4px" [IsEnabled]="IsEnabled" (Click)="onButtonClick()" [ngClass]="buttonClass"
|
|
2434
|
+
[HorizontalContentAlignment]="HorizontalContentAlignment" [VerticalContentAlignment]="VerticalContentAlignment"><ng-content/></Button>
|
|
2435
|
+
<DropDownButton CornerRadius="0 4px 4px 0" (Click)="onDropDownClick()" [IsEnabled]="IsEnabled"/>
|
|
1983
2436
|
</Grid>`,
|
|
1984
2437
|
imports: [CommonModule, ButtonComponent, DropDownButtonComponent, GridModule]
|
|
1985
2438
|
}]
|
|
1986
2439
|
}], propDecorators: { IsEnabled: [{
|
|
1987
2440
|
type: Input
|
|
2441
|
+
}], HorizontalContentAlignment: [{
|
|
2442
|
+
type: Input
|
|
2443
|
+
}], VerticalContentAlignment: [{
|
|
2444
|
+
type: Input
|
|
1988
2445
|
}], Click: [{
|
|
1989
2446
|
type: Output
|
|
1990
2447
|
}], _popup: [{
|
|
@@ -2006,11 +2463,11 @@ class ToggleButtonComponent extends ButtonComponent {
|
|
|
2006
2463
|
this.IsCheckedChange.emit(this.IsChecked);
|
|
2007
2464
|
}
|
|
2008
2465
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ToggleButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2009
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ToggleButtonComponent, isStandalone: true, selector: "ToggleButton", inputs: { IsChecked: "IsChecked" }, outputs: { IsCheckedChange: "IsCheckedChange" }, host: { properties: { "class.checked": "this.IsChecked" } }, usesInheritance: true, ngImport: i0, template: "<
|
|
2466
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ToggleButtonComponent, isStandalone: true, selector: "ToggleButton", inputs: { IsChecked: "IsChecked" }, outputs: { IsCheckedChange: "IsCheckedChange" }, host: { properties: { "class.checked": "this.IsChecked" } }, usesInheritance: true, ngImport: i0, template: "<TextBlock *ngIf=\"Content !== undefined\" [Text]=\"Content\"/>\n <ng-content/>", isInline: true, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TextBlockComponent, selector: "TextBlock", inputs: ["FontFamily", "Text", "FontSize", "FontStyle", "FontWeight", "Foreground", "TextAlignment", "IsTextSelectionEnabled", "TextDecorations", "TextTrimming", "TextWrapping"] }] }); }
|
|
2010
2467
|
}
|
|
2011
2468
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ToggleButtonComponent, decorators: [{
|
|
2012
2469
|
type: Component,
|
|
2013
|
-
args: [{ selector: 'ToggleButton', imports: [CommonModule, TextBlockComponent], template: ButtonTemplate, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked):
|
|
2470
|
+
args: [{ selector: 'ToggleButton', imports: [CommonModule, TextBlockComponent], template: ButtonTemplate, styles: [":host{position:relative}:host{display:grid;padding:var(--ButtonPadding);border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;box-sizing:border-box;font-size:var(--SystemFontSize);font-family:var(--SystemFontFamily);background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:not(.checked):hover:not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host:not(.checked).disabled{background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled);pointer-events:none}:host:not(.checked).disabled::ng-deep *{color:var(--TextFillColorDisabled)}:host.checked:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.checked:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.checked:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.checked.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.checked.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.checked.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.checked.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}:host.InlineButtonStyle{border-style:none;border-width:0;background-color:transparent}:host.InlineButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.InlineButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.InlineButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle{border-style:none;border-width:0;background-color:transparent;color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled){background:var(--SubtleFillColorTertiary);color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.pressed:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.HyperlinkButtonStyle.disabled:not(.checked){background:var(--SubtleFillColorDisabled);color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle.disabled:not(.checked)::ng-deep *{color:var(--TextFillColorDisabled)}:host.HyperlinkButtonStyle:not(.disabled){cursor:pointer}:host.HyperlinkButtonStyle::ng-deep *{color:var(--AccentFillColorDefault)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled){color:var(--AccentFillColorSecondary)}:host.HyperlinkButtonStyle:not(.checked).pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--AccentFillColorSecondary)}:host.AccentButtonStyle:not(.disabled){background:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle:hover:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.pressed:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorSecondary)}:host.AccentButtonStyle.disabled{background:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled);color:var(--TextOnAccentFillColorDisabled)}:host.AccentButtonStyle.disabled::ng-deep *{color:var(--TextOnAccentFillColorDisabled)}\n"] }]
|
|
2014
2471
|
}], propDecorators: { IsChecked: [{
|
|
2015
2472
|
type: Input
|
|
2016
2473
|
}, {
|
|
@@ -2532,19 +2989,17 @@ class OpenFilePicker {
|
|
|
2532
2989
|
class FontIconComponent extends FrameworkElementComponent {
|
|
2533
2990
|
constructor() {
|
|
2534
2991
|
super(...arguments);
|
|
2535
|
-
this.FontFamily = 'var(--SymbolFontFamily)';
|
|
2536
|
-
this.FontSize = 'var(--SymbolFontSize)';
|
|
2537
2992
|
this.FontWeight = 'Normal';
|
|
2538
2993
|
}
|
|
2539
2994
|
get fontWeight() {
|
|
2540
2995
|
return TextBlockComponent.ToFontWeight(this.FontWeight);
|
|
2541
2996
|
}
|
|
2542
2997
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FontIconComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2543
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: FontIconComponent, isStandalone: true, selector: "FontIcon", inputs: { FontFamily: "FontFamily", FontSize: "FontSize", FontStyle: "FontStyle", Foreground: "Foreground", FontWeight: "FontWeight", Glyph: "Glyph" }, host: { properties: { "style.font-family": "this.FontFamily", "style.font-size": "this.FontSize", "style.font-style": "this.FontStyle", "style.color": "this.Foreground", "style.font-weight": "this.fontWeight" } }, usesInheritance: true, ngImport: i0, template: `{{Glyph}}`, isInline: true, styles: [":host{align-content:center}\n"] }); }
|
|
2998
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: FontIconComponent, isStandalone: true, selector: "FontIcon", inputs: { FontFamily: "FontFamily", FontSize: "FontSize", FontStyle: "FontStyle", Foreground: "Foreground", FontWeight: "FontWeight", Glyph: "Glyph" }, host: { properties: { "style.font-family": "this.FontFamily", "style.font-size": "this.FontSize", "style.font-style": "this.FontStyle", "style.color": "this.Foreground", "style.font-weight": "this.fontWeight" } }, usesInheritance: true, ngImport: i0, template: `{{Glyph}}`, isInline: true, styles: [":host{align-content:center;font-size:var(--SymbolFontSize);font-family:var(--SymbolFontFamily)}\n"] }); }
|
|
2544
2999
|
}
|
|
2545
3000
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FontIconComponent, decorators: [{
|
|
2546
3001
|
type: Component,
|
|
2547
|
-
args: [{ selector: 'FontIcon', template: `{{Glyph}}`, styles: [":host{align-content:center}\n"] }]
|
|
3002
|
+
args: [{ selector: 'FontIcon', template: `{{Glyph}}`, styles: [":host{align-content:center;font-size:var(--SymbolFontSize);font-family:var(--SymbolFontFamily)}\n"] }]
|
|
2548
3003
|
}], propDecorators: { FontFamily: [{
|
|
2549
3004
|
type: Input
|
|
2550
3005
|
}, {
|
|
@@ -2602,11 +3057,11 @@ class ImageComponent extends FrameworkElementComponent {
|
|
|
2602
3057
|
};
|
|
2603
3058
|
}
|
|
2604
3059
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ImageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2605
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ImageComponent, isStandalone: true, selector: "Image", inputs: { Source: "Source", Stretch: "Stretch" }, usesInheritance: true, ngImport: i0, template: `<img [src]="Source" [class]="Stretch" [ngStyle]="imageStyle" [alt]="">`, isInline: true, styles: [":host{display:grid;overflow:hidden}img{place-self:stretch}img.None{object-fit:none}img.Fill{object-fit:fill}img.Uniform{object-fit:contain}img.UniformToFill{object-fit:cover}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
3060
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ImageComponent, isStandalone: true, selector: "Image", inputs: { Source: "Source", Stretch: "Stretch" }, usesInheritance: true, ngImport: i0, template: `<img [src]="Source" [class]="Stretch" [ngStyle]="imageStyle" [alt]="">`, isInline: true, styles: [":host{display:grid;overflow:hidden}img{place-self:stretch}img.None{object-fit:none}img.Fill{object-fit:fill}img.Uniform{object-fit:contain;place-self:center}img.UniformToFill{object-fit:cover}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
2606
3061
|
}
|
|
2607
3062
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ImageComponent, decorators: [{
|
|
2608
3063
|
type: Component,
|
|
2609
|
-
args: [{ selector: 'Image', template: `<img [src]="Source" [class]="Stretch" [ngStyle]="imageStyle" [alt]="">`, imports: [CommonModule], styles: [":host{display:grid;overflow:hidden}img{place-self:stretch}img.None{object-fit:none}img.Fill{object-fit:fill}img.Uniform{object-fit:contain}img.UniformToFill{object-fit:cover}\n"] }]
|
|
3064
|
+
args: [{ selector: 'Image', template: `<img [src]="Source" [class]="Stretch" [ngStyle]="imageStyle" [alt]="">`, imports: [CommonModule], styles: [":host{display:grid;overflow:hidden}img{place-self:stretch}img.None{object-fit:none}img.Fill{object-fit:fill}img.Uniform{object-fit:contain;place-self:center}img.UniformToFill{object-fit:cover}\n"] }]
|
|
2610
3065
|
}], propDecorators: { Source: [{
|
|
2611
3066
|
type: Input
|
|
2612
3067
|
}], Stretch: [{
|
|
@@ -2693,11 +3148,11 @@ class AppBarButtonComponent extends FrameworkElementComponent {
|
|
|
2693
3148
|
this._flyout?.Show();
|
|
2694
3149
|
}
|
|
2695
3150
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AppBarButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2696
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: AppBarButtonComponent, isStandalone: true, selector: "AppBarButton", inputs: { IsEnabled: "IsEnabled", Text: "Text", Icon: "Icon" }, outputs: { Click: "Click" }, host: { listeners: { "click": "onHostPointerEvent($event)" }, properties: { "class.disabled": "this.disabled" } }, queries: [{ propertyName: "_flyout", first: true, predicate: ["xaml-flyout"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<div class="icon">{{Icon}}<ng-content select="[Icon]"/></div><div class="text">{{Text}}</div><ng-content/>`, isInline: true, styles: [":host{position:relative}:host{display:flex;flex-direction:row;align-items:center;transition:background-color var(--ControlNormalAnimationDuration);border-radius:var(--ControlCornerRadius);gap:4px;padding:6px;background-color:var(--SubtleFillColorTransparent)}:host *{color:var(--
|
|
3151
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: AppBarButtonComponent, isStandalone: true, selector: "AppBarButton", inputs: { IsEnabled: "IsEnabled", Text: "Text", Icon: "Icon" }, outputs: { Click: "Click" }, host: { listeners: { "click": "onHostPointerEvent($event)" }, properties: { "class.disabled": "this.disabled" } }, queries: [{ propertyName: "_flyout", first: true, predicate: ["xaml-flyout"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<div class="icon">{{Icon}}<ng-content select="[Icon]"/></div><div class="text">{{Text}}</div><ng-content/>`, isInline: true, styles: [":host{position:relative}:host{display:flex;flex-direction:row;align-items:center;transition:background-color var(--ControlNormalAnimationDuration);border-radius:var(--ControlCornerRadius);gap:4px;padding:6px;background-color:var(--SubtleFillColorTransparent)}:host *{color:var(--AppBarButtonForegroundColor)}:host:hover{background-color:var(--SubtleFillColorSecondary)}:host:hover *{color:var(--AppBarButtonForegroundColor)}:host:active{background-color:var(--SubtleFillColorTertiary)}:host:active *{color:var(--TextFillColorSecondary)}:host.disabled{background-color:var(--SubtleFillColorDisabled)}:host.disabled *{color:var(--TextFillColorDisabled)}:host .icon{padding-top:2px;font-family:var(--SymbolFontFamily)}:host .text{white-space:nowrap}\n"] }); }
|
|
2697
3152
|
}
|
|
2698
3153
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AppBarButtonComponent, decorators: [{
|
|
2699
3154
|
type: Component,
|
|
2700
|
-
args: [{ selector: 'AppBarButton', template: `<div class="icon">{{Icon}}<ng-content select="[Icon]"/></div><div class="text">{{Text}}</div><ng-content/>`, styles: [":host{position:relative}:host{display:flex;flex-direction:row;align-items:center;transition:background-color var(--ControlNormalAnimationDuration);border-radius:var(--ControlCornerRadius);gap:4px;padding:6px;background-color:var(--SubtleFillColorTransparent)}:host *{color:var(--
|
|
3155
|
+
args: [{ selector: 'AppBarButton', template: `<div class="icon">{{Icon}}<ng-content select="[Icon]"/></div><div class="text">{{Text}}</div><ng-content/>`, styles: [":host{position:relative}:host{display:flex;flex-direction:row;align-items:center;transition:background-color var(--ControlNormalAnimationDuration);border-radius:var(--ControlCornerRadius);gap:4px;padding:6px;background-color:var(--SubtleFillColorTransparent)}:host *{color:var(--AppBarButtonForegroundColor)}:host:hover{background-color:var(--SubtleFillColorSecondary)}:host:hover *{color:var(--AppBarButtonForegroundColor)}:host:active{background-color:var(--SubtleFillColorTertiary)}:host:active *{color:var(--TextFillColorSecondary)}:host.disabled{background-color:var(--SubtleFillColorDisabled)}:host.disabled *{color:var(--TextFillColorDisabled)}:host .icon{padding-top:2px;font-family:var(--SymbolFontFamily)}:host .text{white-space:nowrap}\n"] }]
|
|
2701
3156
|
}], propDecorators: { IsEnabled: [{
|
|
2702
3157
|
type: Input
|
|
2703
3158
|
}], Text: [{
|
|
@@ -2747,13 +3202,13 @@ class MenuFlyoutItemComponent extends MenuFlyoutItemBase {
|
|
|
2747
3202
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MenuFlyoutItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2748
3203
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: MenuFlyoutItemComponent, isStandalone: true, selector: "MenuFlyoutItem", inputs: { IsEnabled: "IsEnabled", Text: "Text", Icon: "Icon" }, outputs: { Click: "Click" }, host: { listeners: { "click": "onClick()" }, properties: { "class.disabled": "this.disabled" } }, usesInheritance: true, ngImport: i0, template: `<div class="icon">{{Icon}}<ng-content select="[Icon]"/></div>
|
|
2749
3204
|
<div class="text">{{Text}}</div>
|
|
2750
|
-
<div class="submenu-indicator"></div>`, isInline: true, styles: [":host{position:relative}:host{display:table-row}:host:hover:not(.disabled)>*{background-color:var(--SubtleFillColorSecondary)}:host.disabled>*{color:var(--TextFillColorDisabled)}.icon{display:table-cell;padding:
|
|
3205
|
+
<div class="submenu-indicator"></div>`, isInline: true, styles: [":host{position:relative}:host{display:table-row}:host:hover:not(.disabled)>*{background-color:var(--SubtleFillColorSecondary)}:host.disabled>*{color:var(--TextFillColorDisabled)}.icon{display:table-cell;padding-left:6px;padding-top:3px;padding-bottom:3px;border-radius:var(--ControlCornerRadius) 0 0 var(--ControlCornerRadius);font-family:var(--SymbolFontFamily);vertical-align:middle}.icon:not(:empty){padding-right:6px}.icon.hidden{color:transparent}.text{display:table-cell;padding-top:3px;padding-bottom:3px;white-space:nowrap}.submenu-indicator{display:table-cell;padding-right:6px;padding-top:3px;padding-bottom:3px;border-radius:0 var(--ControlCornerRadius) var(--ControlCornerRadius) 0}.submenu-indicator:not(:empty){padding-left:6px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
2751
3206
|
}
|
|
2752
3207
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MenuFlyoutItemComponent, decorators: [{
|
|
2753
3208
|
type: Component,
|
|
2754
3209
|
args: [{ selector: 'MenuFlyoutItem', imports: [CommonModule], template: `<div class="icon">{{Icon}}<ng-content select="[Icon]"/></div>
|
|
2755
3210
|
<div class="text">{{Text}}</div>
|
|
2756
|
-
<div class="submenu-indicator"></div>`, styles: [":host{position:relative}:host{display:table-row}:host:hover:not(.disabled)>*{background-color:var(--SubtleFillColorSecondary)}:host.disabled>*{color:var(--TextFillColorDisabled)}.icon{display:table-cell;padding:
|
|
3211
|
+
<div class="submenu-indicator"></div>`, styles: [":host{position:relative}:host{display:table-row}:host:hover:not(.disabled)>*{background-color:var(--SubtleFillColorSecondary)}:host.disabled>*{color:var(--TextFillColorDisabled)}.icon{display:table-cell;padding-left:6px;padding-top:3px;padding-bottom:3px;border-radius:var(--ControlCornerRadius) 0 0 var(--ControlCornerRadius);font-family:var(--SymbolFontFamily);vertical-align:middle}.icon:not(:empty){padding-right:6px}.icon.hidden{color:transparent}.text{display:table-cell;padding-top:3px;padding-bottom:3px;white-space:nowrap}.submenu-indicator{display:table-cell;padding-right:6px;padding-top:3px;padding-bottom:3px;border-radius:0 var(--ControlCornerRadius) var(--ControlCornerRadius) 0}.submenu-indicator:not(:empty){padding-left:6px}\n"] }]
|
|
2757
3212
|
}], propDecorators: { IsEnabled: [{
|
|
2758
3213
|
type: Input
|
|
2759
3214
|
}], Text: [{
|
|
@@ -2784,17 +3239,21 @@ class ToggleMenuFlyoutItemComponent extends MenuFlyoutItemBase {
|
|
|
2784
3239
|
onPointerUp(event) {
|
|
2785
3240
|
if (!this.IsEnabled)
|
|
2786
3241
|
return;
|
|
3242
|
+
if (event.button !== 0)
|
|
3243
|
+
return;
|
|
2787
3244
|
this.IsChecked = !this.IsChecked;
|
|
2788
3245
|
this.IsCheckedChange.emit(this.IsChecked);
|
|
2789
3246
|
}
|
|
2790
3247
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ToggleMenuFlyoutItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2791
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ToggleMenuFlyoutItemComponent, isStandalone: true, selector: "ToggleMenuFlyoutItem", inputs: { IsEnabled: "IsEnabled", Text: "Text", IsChecked: "IsChecked" }, outputs: { IsCheckedChange: "IsCheckedChange" }, host: { listeners: { "pointerup": "onPointerUp($event)" }, properties: { "class.checked": "this.IsChecked", "class.disabled": "this.disabled" } }, usesInheritance: true, ngImport: i0, template: `<div class="icon"
|
|
2792
|
-
<div class="text">{{Text}}</div
|
|
3248
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ToggleMenuFlyoutItemComponent, isStandalone: true, selector: "ToggleMenuFlyoutItem", inputs: { IsEnabled: "IsEnabled", Text: "Text", IsChecked: "IsChecked" }, outputs: { IsCheckedChange: "IsCheckedChange" }, host: { listeners: { "pointerup": "onPointerUp($event)" }, properties: { "class.checked": "this.IsChecked", "class.disabled": "this.disabled" } }, usesInheritance: true, ngImport: i0, template: `<div class="icon" [class.hidden]="!IsChecked">\uE73E</div>
|
|
3249
|
+
<div class="text">{{Text}}</div>
|
|
3250
|
+
<div class="submenu-indicator"></div>`, isInline: true, styles: [":host{position:relative}:host{display:table-row}:host:hover:not(.disabled)>*{background-color:var(--SubtleFillColorSecondary)}:host.disabled>*{color:var(--TextFillColorDisabled)}.icon{display:table-cell;padding-left:6px;padding-top:3px;padding-bottom:3px;border-radius:var(--ControlCornerRadius) 0 0 var(--ControlCornerRadius);font-family:var(--SymbolFontFamily);vertical-align:middle}.icon:not(:empty){padding-right:6px}.icon.hidden{color:transparent}.text{display:table-cell;padding-top:3px;padding-bottom:3px;white-space:nowrap}.submenu-indicator{display:table-cell;padding-right:6px;padding-top:3px;padding-bottom:3px;border-radius:0 var(--ControlCornerRadius) var(--ControlCornerRadius) 0}.submenu-indicator:not(:empty){padding-left:6px}\n"] }); }
|
|
2793
3251
|
}
|
|
2794
3252
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ToggleMenuFlyoutItemComponent, decorators: [{
|
|
2795
3253
|
type: Component,
|
|
2796
|
-
args: [{ selector: 'ToggleMenuFlyoutItem', template: `<div class="icon"
|
|
2797
|
-
<div class="text">{{Text}}</div
|
|
3254
|
+
args: [{ selector: 'ToggleMenuFlyoutItem', template: `<div class="icon" [class.hidden]="!IsChecked">\uE73E</div>
|
|
3255
|
+
<div class="text">{{Text}}</div>
|
|
3256
|
+
<div class="submenu-indicator"></div>`, styles: [":host{position:relative}:host{display:table-row}:host:hover:not(.disabled)>*{background-color:var(--SubtleFillColorSecondary)}:host.disabled>*{color:var(--TextFillColorDisabled)}.icon{display:table-cell;padding-left:6px;padding-top:3px;padding-bottom:3px;border-radius:var(--ControlCornerRadius) 0 0 var(--ControlCornerRadius);font-family:var(--SymbolFontFamily);vertical-align:middle}.icon:not(:empty){padding-right:6px}.icon.hidden{color:transparent}.text{display:table-cell;padding-top:3px;padding-bottom:3px;white-space:nowrap}.submenu-indicator{display:table-cell;padding-right:6px;padding-top:3px;padding-bottom:3px;border-radius:0 var(--ControlCornerRadius) var(--ControlCornerRadius) 0}.submenu-indicator:not(:empty){padding-left:6px}\n"] }]
|
|
2798
3257
|
}], propDecorators: { IsEnabled: [{
|
|
2799
3258
|
type: Input
|
|
2800
3259
|
}], Text: [{
|
|
@@ -2847,22 +3306,227 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
2847
3306
|
args: ['style.border-width']
|
|
2848
3307
|
}] } });
|
|
2849
3308
|
|
|
3309
|
+
/**
|
|
3310
|
+
* Presenter for {@link ToolTipDirective}. Rendered inside a CDK overlay at body level, so it carries
|
|
3311
|
+
* the `xaml-themed` class itself to pull in the theme tokens, and wraps its content in its own
|
|
3312
|
+
* `XamlRoot` — like a flyout does — so the host app's cascade cannot reach the tip.
|
|
3313
|
+
* Shows either plain {@link Content} text or, for rich tips, a projected {@link ContentTemplate}
|
|
3314
|
+
* (mirrors `ToolTip.Content` accepting arbitrary content). The directive drives {@link IsVisible} for the
|
|
3315
|
+
* fade reveal.
|
|
3316
|
+
*/
|
|
3317
|
+
class ToolTipComponent {
|
|
3318
|
+
constructor() {
|
|
3319
|
+
this.IsVisible = false;
|
|
3320
|
+
}
|
|
3321
|
+
//Matches the `--ControlFastAnimationDuration` fade in the styles (ms).
|
|
3322
|
+
static { this.TransitionDuration = 167; }
|
|
3323
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ToolTipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3324
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: ToolTipComponent, isStandalone: true, selector: "ToolTip", inputs: { Content: "Content", ContentTemplate: "ContentTemplate", IsVisible: "IsVisible" }, host: { attributes: { "role": "tooltip" }, properties: { "class.visible": "this.IsVisible" }, classAttribute: "xaml-themed" }, ngImport: i0, template: `<XamlRoot>@if (ContentTemplate) { <ng-container [ngTemplateOutlet]="ContentTemplate" /> } @else { {{ Content }} }</XamlRoot>`, isInline: true, styles: [":host{display:grid;-webkit-user-select:none;user-select:none;padding:5px 8px;max-width:320px;border:1px solid var(--SurfaceStrokeColorFlyout);border-radius:var(--OverlayCornerRadius);background-color:var(--AcrylicInAppFillColorDefault);-webkit-backdrop-filter:var(--AcrylicBlur);backdrop-filter:var(--AcrylicBlur);box-shadow:0 0 15px #00000080;color:var(--TextFillColorPrimary);font-family:var(--SystemFontFamily);font-size:var(--SystemFontSize);opacity:0;transition:opacity var(--ControlFastAnimationDuration) ease-out}:host.visible{opacity:1}:host XamlRoot{background:transparent;overflow:visible;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: XamlRootComponent, selector: "XamlRoot" }] }); }
|
|
3325
|
+
}
|
|
3326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ToolTipComponent, decorators: [{
|
|
3327
|
+
type: Component,
|
|
3328
|
+
args: [{ selector: 'ToolTip', imports: [NgTemplateOutlet, XamlRootComponent], template: `<XamlRoot>@if (ContentTemplate) { <ng-container [ngTemplateOutlet]="ContentTemplate" /> } @else { {{ Content }} }</XamlRoot>`, host: { 'class': 'xaml-themed', 'role': 'tooltip' }, styles: [":host{display:grid;-webkit-user-select:none;user-select:none;padding:5px 8px;max-width:320px;border:1px solid var(--SurfaceStrokeColorFlyout);border-radius:var(--OverlayCornerRadius);background-color:var(--AcrylicInAppFillColorDefault);-webkit-backdrop-filter:var(--AcrylicBlur);backdrop-filter:var(--AcrylicBlur);box-shadow:0 0 15px #00000080;color:var(--TextFillColorPrimary);font-family:var(--SystemFontFamily);font-size:var(--SystemFontSize);opacity:0;transition:opacity var(--ControlFastAnimationDuration) ease-out}:host.visible{opacity:1}:host XamlRoot{background:transparent;overflow:visible;pointer-events:none}\n"] }]
|
|
3329
|
+
}], propDecorators: { Content: [{
|
|
3330
|
+
type: Input
|
|
3331
|
+
}], ContentTemplate: [{
|
|
3332
|
+
type: Input
|
|
3333
|
+
}], IsVisible: [{
|
|
3334
|
+
type: Input
|
|
3335
|
+
}, {
|
|
3336
|
+
type: HostBinding,
|
|
3337
|
+
args: ['class.visible']
|
|
3338
|
+
}] } });
|
|
3339
|
+
|
|
2850
3340
|
class ToolTipDirective {
|
|
2851
|
-
static { this
|
|
2852
|
-
|
|
3341
|
+
static { this._nextToolTipId = 1; }
|
|
3342
|
+
//Delay before a hovered/focused tip appears
|
|
3343
|
+
static { this._revealDelay = 400; }
|
|
3344
|
+
//Gap between the target and the tool tip
|
|
3345
|
+
static { this._targetElementSpacing = 8; }
|
|
3346
|
+
//Vertical clearance below the pointer for `Mouse` placement, so the tip clears the cursor glyph.
|
|
3347
|
+
static { this._cursorSpacing = 20; }
|
|
3348
|
+
constructor(_hostElement, _overlay, _changeDetector) {
|
|
3349
|
+
this._hostElement = _hostElement;
|
|
3350
|
+
this._overlay = _overlay;
|
|
3351
|
+
this._changeDetector = _changeDetector;
|
|
3352
|
+
this._id = `xaml-tooltip-${ToolTipDirective._nextToolTipId++}`;
|
|
3353
|
+
this.Placement = 'Mouse';
|
|
3354
|
+
}
|
|
3355
|
+
//Tags this host as a tooltip owner so ancestors can detect that a nested tip should win (see below).
|
|
3356
|
+
get marker() {
|
|
3357
|
+
return this.ToolTip || this.ToolTipTemplate ? '' : null;
|
|
3358
|
+
}
|
|
3359
|
+
onFocusIn(event) {
|
|
3360
|
+
this.scheduleShow(event);
|
|
3361
|
+
}
|
|
3362
|
+
onPointerOver(event) {
|
|
3363
|
+
this.updatePointerPosition(event);
|
|
3364
|
+
this.scheduleShow(event);
|
|
3365
|
+
}
|
|
3366
|
+
updatePointerPosition(event) {
|
|
3367
|
+
if (!this._overlayRef) {
|
|
3368
|
+
this._pointerPosition = { x: event.clientX, y: event.clientY };
|
|
3369
|
+
}
|
|
3370
|
+
}
|
|
3371
|
+
scheduleShow(event) {
|
|
3372
|
+
//If the tooltip is already open or scheduled to open, do nothing
|
|
3373
|
+
if (this._overlayRef || this._revealTimer)
|
|
3374
|
+
return;
|
|
3375
|
+
//If we have no tooltip content, then nothing to show
|
|
3376
|
+
if (!this.ToolTip && !this.ToolTipTemplate)
|
|
3377
|
+
return;
|
|
3378
|
+
//If this is not the top-most tool-tip, then return and let that show
|
|
3379
|
+
const target = event.target;
|
|
3380
|
+
if (target?.closest?.('[xaml-tooltip]') !== this._hostElement.nativeElement) {
|
|
3381
|
+
this.hideOverlay();
|
|
3382
|
+
return;
|
|
3383
|
+
}
|
|
3384
|
+
//Otherwise, schedule the tooltip to show after a delay
|
|
3385
|
+
this._revealTimer = setTimeout(() => {
|
|
3386
|
+
this._revealTimer = undefined;
|
|
3387
|
+
this.showOverlay();
|
|
3388
|
+
}, ToolTipDirective._revealDelay);
|
|
3389
|
+
}
|
|
3390
|
+
//Track the cursor until the tooltip opens
|
|
3391
|
+
onPointerMove(event) {
|
|
3392
|
+
this.updatePointerPosition(event);
|
|
3393
|
+
}
|
|
3394
|
+
onPointerDown() {
|
|
3395
|
+
this.hideOverlay();
|
|
3396
|
+
}
|
|
3397
|
+
onPointerOut(event) {
|
|
3398
|
+
//These events also fire when crossing between descendants — only dismiss on a real exit.
|
|
3399
|
+
const related = event.relatedTarget;
|
|
3400
|
+
if (related && this._hostElement.nativeElement.contains(related))
|
|
3401
|
+
return;
|
|
3402
|
+
this.hideOverlay();
|
|
3403
|
+
}
|
|
3404
|
+
async showOverlay() {
|
|
3405
|
+
//If the tooltip is already open, or if there is no content, do nothing
|
|
3406
|
+
if ((!this.ToolTip && !this.ToolTipTemplate) || this._overlayRef)
|
|
3407
|
+
return;
|
|
3408
|
+
//Define placement
|
|
3409
|
+
const placement = this.Placement !== 'Mouse' || this._pointerPosition !== undefined ? this.Placement : 'Top';
|
|
3410
|
+
this._overlayRef = this._overlay.create(new OverlayConfig({
|
|
3411
|
+
positionStrategy: this._overlay.position()
|
|
3412
|
+
.flexibleConnectedTo(placement === 'Mouse' ? this._pointerPosition : this._hostElement)
|
|
3413
|
+
.withPositions(ToolTipDirective.getPositionCandidates(placement))
|
|
3414
|
+
.withPush(true),
|
|
3415
|
+
scrollStrategy: this._overlay.scrollStrategies.close()
|
|
3416
|
+
}));
|
|
3417
|
+
//The tip is presentation only — never let it capture the pointer or block what's beneath it.
|
|
3418
|
+
this._overlayRef.overlayElement.style.pointerEvents = 'none';
|
|
3419
|
+
//Show tooltip
|
|
3420
|
+
this._toolTip = this._overlayRef.attach(new ComponentPortal(ToolTipComponent));
|
|
3421
|
+
//Set content
|
|
3422
|
+
const element = this._toolTip.location.nativeElement;
|
|
3423
|
+
if (this.ToolTipTemplate) {
|
|
3424
|
+
this._toolTip.setInput('ContentTemplate', this.ToolTipTemplate);
|
|
3425
|
+
}
|
|
3426
|
+
else {
|
|
3427
|
+
this._toolTip.setInput('Content', this.ToolTip);
|
|
3428
|
+
}
|
|
3429
|
+
//Add accessibility info
|
|
3430
|
+
element.id = this._id;
|
|
3431
|
+
this._hostElement.nativeElement.setAttribute('aria-describedby', this._id);
|
|
3432
|
+
//Make content visible - after next layout
|
|
3433
|
+
await resume_after(0);
|
|
3434
|
+
this._toolTip.setInput('IsVisible', true);
|
|
3435
|
+
this._changeDetector.markForCheck();
|
|
3436
|
+
}
|
|
3437
|
+
async hideOverlay() {
|
|
3438
|
+
//Cancel any pending show
|
|
3439
|
+
if (this._revealTimer) {
|
|
3440
|
+
clearTimeout(this._revealTimer);
|
|
3441
|
+
this._revealTimer = undefined;
|
|
3442
|
+
}
|
|
3443
|
+
//Start hide animation
|
|
3444
|
+
this._toolTip?.setInput('IsVisible', false);
|
|
3445
|
+
//Dispose overlay after hidden
|
|
3446
|
+
if (!this._overlayRef)
|
|
3447
|
+
return;
|
|
3448
|
+
await resume_after(ToolTipComponent.TransitionDuration);
|
|
3449
|
+
this._hostElement.nativeElement.removeAttribute('aria-describedby');
|
|
3450
|
+
this._toolTip = undefined;
|
|
3451
|
+
this._overlayRef.detach();
|
|
3452
|
+
this._overlayRef.dispose();
|
|
3453
|
+
this._overlayRef = undefined;
|
|
3454
|
+
}
|
|
3455
|
+
static getPositionCandidates(placement) {
|
|
3456
|
+
//Primary placement plus the opposite side as a fallback, so the tip flips when it would clip.
|
|
3457
|
+
switch (placement) {
|
|
3458
|
+
case 'Mouse':
|
|
3459
|
+
return [
|
|
3460
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: ToolTipDirective._cursorSpacing },
|
|
3461
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -ToolTipDirective._targetElementSpacing }
|
|
3462
|
+
];
|
|
3463
|
+
case 'Bottom':
|
|
3464
|
+
return [
|
|
3465
|
+
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: ToolTipDirective._targetElementSpacing },
|
|
3466
|
+
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -ToolTipDirective._targetElementSpacing }
|
|
3467
|
+
];
|
|
3468
|
+
case 'Left':
|
|
3469
|
+
return [
|
|
3470
|
+
{ originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -ToolTipDirective._targetElementSpacing },
|
|
3471
|
+
{ originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: ToolTipDirective._targetElementSpacing }
|
|
3472
|
+
];
|
|
3473
|
+
case 'Right':
|
|
3474
|
+
return [
|
|
3475
|
+
{ originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: ToolTipDirective._targetElementSpacing },
|
|
3476
|
+
{ originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -ToolTipDirective._targetElementSpacing }
|
|
3477
|
+
];
|
|
3478
|
+
case 'Top':
|
|
3479
|
+
default:
|
|
3480
|
+
return [
|
|
3481
|
+
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -ToolTipDirective._targetElementSpacing },
|
|
3482
|
+
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: ToolTipDirective._targetElementSpacing }
|
|
3483
|
+
];
|
|
3484
|
+
}
|
|
3485
|
+
}
|
|
3486
|
+
ngOnDestroy() {
|
|
3487
|
+
if (this._revealTimer)
|
|
3488
|
+
clearTimeout(this._revealTimer);
|
|
3489
|
+
this._overlayRef?.dispose();
|
|
3490
|
+
}
|
|
3491
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ToolTipDirective, deps: [{ token: i0.ElementRef }, { token: i1$1.Overlay }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3492
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.6", type: ToolTipDirective, isStandalone: false, selector: "[ToolTipService-ToolTip], [ToolTipService-ToolTipTemplate]", inputs: { ToolTip: ["ToolTipService-ToolTip", "ToolTip"], ToolTipTemplate: ["ToolTipService-ToolTipTemplate", "ToolTipTemplate"], Placement: ["ToolTipService-Placement", "Placement"] }, host: { listeners: { "focusin": "onFocusIn($event)", "pointerover": "onPointerOver($event)", "pointermove": "onPointerMove($event)", "pointerdown": "onPointerDown()", "pointerout": "onPointerOut($event)", "focusout": "onPointerOut($event)" }, properties: { "attr.xaml-tooltip": "this.marker" } }, ngImport: i0 }); }
|
|
2853
3493
|
}
|
|
2854
3494
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ToolTipDirective, decorators: [{
|
|
2855
3495
|
type: Directive,
|
|
2856
3496
|
args: [{
|
|
2857
|
-
selector: '[ToolTipService-ToolTip]',
|
|
3497
|
+
selector: '[ToolTipService-ToolTip], [ToolTipService-ToolTipTemplate]',
|
|
2858
3498
|
standalone: false
|
|
2859
3499
|
}]
|
|
2860
|
-
}], propDecorators: { ToolTip: [{
|
|
3500
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.Overlay }, { type: i0.ChangeDetectorRef }], propDecorators: { ToolTip: [{
|
|
2861
3501
|
type: Input,
|
|
2862
3502
|
args: ['ToolTipService-ToolTip']
|
|
2863
|
-
}, {
|
|
3503
|
+
}], ToolTipTemplate: [{
|
|
3504
|
+
type: Input,
|
|
3505
|
+
args: ['ToolTipService-ToolTipTemplate']
|
|
3506
|
+
}], Placement: [{
|
|
3507
|
+
type: Input,
|
|
3508
|
+
args: ['ToolTipService-Placement']
|
|
3509
|
+
}], marker: [{
|
|
2864
3510
|
type: HostBinding,
|
|
2865
|
-
args: ['attr.
|
|
3511
|
+
args: ['attr.xaml-tooltip']
|
|
3512
|
+
}], onFocusIn: [{
|
|
3513
|
+
type: HostListener,
|
|
3514
|
+
args: ['focusin', ['$event']]
|
|
3515
|
+
}], onPointerOver: [{
|
|
3516
|
+
type: HostListener,
|
|
3517
|
+
args: ['pointerover', ['$event']]
|
|
3518
|
+
}], onPointerMove: [{
|
|
3519
|
+
type: HostListener,
|
|
3520
|
+
args: ['pointermove', ['$event']]
|
|
3521
|
+
}], onPointerDown: [{
|
|
3522
|
+
type: HostListener,
|
|
3523
|
+
args: ['pointerdown']
|
|
3524
|
+
}], onPointerOut: [{
|
|
3525
|
+
type: HostListener,
|
|
3526
|
+
args: ['pointerout', ['$event']]
|
|
3527
|
+
}, {
|
|
3528
|
+
type: HostListener,
|
|
3529
|
+
args: ['focusout', ['$event']]
|
|
2866
3530
|
}] } });
|
|
2867
3531
|
class ToolTipServiceModule {
|
|
2868
3532
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ToolTipServiceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -3018,6 +3682,7 @@ class NumberBoxComponent extends FrameworkElementComponent {
|
|
|
3018
3682
|
this.Maximum = Infinity;
|
|
3019
3683
|
this.SmallChange = 1;
|
|
3020
3684
|
this.LargeChange = 10;
|
|
3685
|
+
this.SpinButtonPlacementMode = 'Compact';
|
|
3021
3686
|
this.ValueChange = new EventEmitter();
|
|
3022
3687
|
this._numberFormatter = (value) => value.toString();
|
|
3023
3688
|
this._text = '';
|
|
@@ -3065,7 +3730,7 @@ class NumberBoxComponent extends FrameworkElementComponent {
|
|
|
3065
3730
|
scheduleFlyoutDismiss() {
|
|
3066
3731
|
this.cancelFlyoutDismiss();
|
|
3067
3732
|
this._blurTimeout = setTimeout(() => {
|
|
3068
|
-
this._flyout
|
|
3733
|
+
this._flyout?.Hide();
|
|
3069
3734
|
}, 0);
|
|
3070
3735
|
}
|
|
3071
3736
|
onBlur() {
|
|
@@ -3101,7 +3766,7 @@ class NumberBoxComponent extends FrameworkElementComponent {
|
|
|
3101
3766
|
this._input.nativeElement.value = this.PlaceholderText;
|
|
3102
3767
|
this.onChange();
|
|
3103
3768
|
}
|
|
3104
|
-
this._flyout
|
|
3769
|
+
this._flyout?.Show();
|
|
3105
3770
|
this._input.nativeElement.select();
|
|
3106
3771
|
}
|
|
3107
3772
|
updateText() {
|
|
@@ -3114,27 +3779,27 @@ class NumberBoxComponent extends FrameworkElementComponent {
|
|
|
3114
3779
|
return !this.IsEnabled;
|
|
3115
3780
|
}
|
|
3116
3781
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NumberBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3117
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: NumberBoxComponent, isStandalone: true, selector: "NumberBox", inputs: { IsEnabled: "IsEnabled", PlaceholderText: "PlaceholderText", IsPlaceholderEditable: "IsPlaceholderEditable", TextAlignment: "TextAlignment", InputMode: "InputMode", Minimum: "Minimum", Maximum: "Maximum", SmallChange: "SmallChange", LargeChange: "LargeChange", Unit: "Unit", NumberFormatter: "NumberFormatter", Value: "Value" }, outputs: { ValueChange: "ValueChange" }, host: { listeners: { "click": "onClick()", "focusin": "onFocusIn()", "contextmenu": "onContextMenu($event)" }, properties: { "class.disabled": "this.disabled" } }, viewQueries: [{ propertyName: "_input", first: true, predicate: ["input"], descendants: true }, { propertyName: "_flyout", first: true, predicate: ["flyout"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<label>
|
|
3118
|
-
<div class="
|
|
3782
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: NumberBoxComponent, isStandalone: true, selector: "NumberBox", inputs: { IsEnabled: "IsEnabled", PlaceholderText: "PlaceholderText", IsPlaceholderEditable: "IsPlaceholderEditable", TextAlignment: "TextAlignment", InputMode: "InputMode", Minimum: "Minimum", Maximum: "Maximum", SmallChange: "SmallChange", LargeChange: "LargeChange", Unit: "Unit", SpinButtonPlacementMode: "SpinButtonPlacementMode", NumberFormatter: "NumberFormatter", Value: "Value" }, outputs: { ValueChange: "ValueChange" }, host: { listeners: { "click": "onClick()", "focusin": "onFocusIn()", "contextmenu": "onContextMenu($event)" }, properties: { "class.disabled": "this.disabled" } }, viewQueries: [{ propertyName: "_input", first: true, predicate: ["input"], descendants: true }, { propertyName: "_flyout", first: true, predicate: ["flyout"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<label>
|
|
3783
|
+
<div *ngIf="SpinButtonPlacementMode !== 'None'" class="spin-button"></div>
|
|
3119
3784
|
<input class="text-box" #input size="1" type="text" [disabled]="!IsEnabled" [value]="Text" (change)="onChange()" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}" (blur)="onBlur()" (keydown)="onKeyDown($event)"/>
|
|
3120
|
-
<Flyout #flyout Padding="2px" Placement="Left" [HasBackdrop]="false" [Target]="flyoutTarget">
|
|
3785
|
+
<Flyout *ngIf="SpinButtonPlacementMode !== 'None'" #flyout Padding="2px" Placement="Left" [HasBackdrop]="false" [Target]="flyoutTarget">
|
|
3121
3786
|
<RepeatButton Class="InlineButtonStyle" (Click)="onIncreaseClick()" [Delay]="500" [Interval]="50" (pointerdown)="onButtonPress()" (pointerup)="onButtonPress()"><FontIcon Glyph=""/></RepeatButton>
|
|
3122
3787
|
<RepeatButton Class="InlineButtonStyle" (Click)="onDecreaseClick()" [Delay]="500" [Interval]="50" (pointerdown)="onButtonPress()" (pointerup)="onButtonPress()"><FontIcon Glyph=""/></RepeatButton>
|
|
3123
3788
|
</Flyout>
|
|
3124
|
-
<div
|
|
3125
|
-
</label>`, isInline: true, styles: [":host{position:relative}:host{display:grid;cursor:text;outline-style:none;border-style:solid;border-width:
|
|
3789
|
+
<div *ngIf="Unit !== undefined" class="unit">{{Unit}}</div>
|
|
3790
|
+
</label>`, isInline: true, styles: [":host{position:relative}:host{display:grid;cursor:text;outline-style:none;border-style:solid;box-sizing:border-box;border-width:var(--TextControlBorderThickness);border-radius:var(--ControlCornerRadius);padding:var(--TextControlPadding);background-color:var(--TextControlBackgroundColor);border-color:var(--TextControlElevationBorderColor);border-bottom-color:var(--TextControlElevationBorderColorStrong)}:host:hover{background-color:var(--TextControlBackgroundColorPointerOver)}:host:focus-within{border-bottom-width:var(--TextControlBorderThicknessFocused);background-color:var(--TextControlBackgroundColorFocused);border-bottom-color:var(--TextControlElevationBorderColorFocused);padding-bottom:calc(var(--TextControlPadding) + var(--TextControlBorderThickness) - var(--TextControlBorderThicknessFocused))}:host.disabled{background-color:var(--TextControlBackgroundColorDisabled);border-bottom-color:var(--TextControlElevationBorderColorDisabled);pointer-events:none}textarea{resize:none}.text-box{background-color:transparent;border:0 none transparent;outline:0 none transparent;color:var(--TextFillColorPrimary);font-family:var(--SystemFontFamily);font-size:var(--SystemFontSize)}.text-box::placeholder{color:var(--TextFillColorSecondary)}.text-box:disabled{color:var(--TextFillColorDisabled)}.text-box:disabled::placeholder{color:var(--TextFillColorDisabled)}::selection{background-color:var(--SystemAccentColor);color:var(--TextOnAccentFillColorSelected)}\n", "label{display:grid;position:relative;grid-template-columns:auto 1fr auto auto}.spin-button{grid-column:1;align-self:center;font-family:var(--SymbolFontFamily);color:var(--TextFillColorSecondary);pointer-events:none}.unit{grid-column:4;align-self:center;pointer-events:none}Flyout{grid-column:3}.InlineButtonStyle{padding:5px}input{grid-column:2}input:focus+.popup,input:active+.popup{display:flex}input:disabled~.unit{color:var(--TextFillColorDisabled)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: RepeatButtonComponent, selector: "RepeatButton", inputs: ["Delay", "Interval"] }, { kind: "component", type: FontIconComponent, selector: "FontIcon", inputs: ["FontFamily", "FontSize", "FontStyle", "Foreground", "FontWeight", "Glyph"] }, { kind: "component", type: FlyoutComponent, selector: "Flyout" }] }); }
|
|
3126
3791
|
}
|
|
3127
3792
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NumberBoxComponent, decorators: [{
|
|
3128
3793
|
type: Component,
|
|
3129
3794
|
args: [{ selector: 'NumberBox', template: `<label>
|
|
3130
|
-
<div class="
|
|
3795
|
+
<div *ngIf="SpinButtonPlacementMode !== 'None'" class="spin-button"></div>
|
|
3131
3796
|
<input class="text-box" #input size="1" type="text" [disabled]="!IsEnabled" [value]="Text" (change)="onChange()" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}" (blur)="onBlur()" (keydown)="onKeyDown($event)"/>
|
|
3132
|
-
<Flyout #flyout Padding="2px" Placement="Left" [HasBackdrop]="false" [Target]="flyoutTarget">
|
|
3797
|
+
<Flyout *ngIf="SpinButtonPlacementMode !== 'None'" #flyout Padding="2px" Placement="Left" [HasBackdrop]="false" [Target]="flyoutTarget">
|
|
3133
3798
|
<RepeatButton Class="InlineButtonStyle" (Click)="onIncreaseClick()" [Delay]="500" [Interval]="50" (pointerdown)="onButtonPress()" (pointerup)="onButtonPress()"><FontIcon Glyph=""/></RepeatButton>
|
|
3134
3799
|
<RepeatButton Class="InlineButtonStyle" (Click)="onDecreaseClick()" [Delay]="500" [Interval]="50" (pointerdown)="onButtonPress()" (pointerup)="onButtonPress()"><FontIcon Glyph=""/></RepeatButton>
|
|
3135
3800
|
</Flyout>
|
|
3136
|
-
<div
|
|
3137
|
-
</label>`, imports: [CommonModule, RepeatButtonComponent, FontIconComponent, FlyoutComponent], styles: [":host{position:relative}:host{display:grid;cursor:text;outline-style:none;border-style:solid;border-width:
|
|
3801
|
+
<div *ngIf="Unit !== undefined" class="unit">{{Unit}}</div>
|
|
3802
|
+
</label>`, imports: [CommonModule, RepeatButtonComponent, FontIconComponent, FlyoutComponent], styles: [":host{position:relative}:host{display:grid;cursor:text;outline-style:none;border-style:solid;box-sizing:border-box;border-width:var(--TextControlBorderThickness);border-radius:var(--ControlCornerRadius);padding:var(--TextControlPadding);background-color:var(--TextControlBackgroundColor);border-color:var(--TextControlElevationBorderColor);border-bottom-color:var(--TextControlElevationBorderColorStrong)}:host:hover{background-color:var(--TextControlBackgroundColorPointerOver)}:host:focus-within{border-bottom-width:var(--TextControlBorderThicknessFocused);background-color:var(--TextControlBackgroundColorFocused);border-bottom-color:var(--TextControlElevationBorderColorFocused);padding-bottom:calc(var(--TextControlPadding) + var(--TextControlBorderThickness) - var(--TextControlBorderThicknessFocused))}:host.disabled{background-color:var(--TextControlBackgroundColorDisabled);border-bottom-color:var(--TextControlElevationBorderColorDisabled);pointer-events:none}textarea{resize:none}.text-box{background-color:transparent;border:0 none transparent;outline:0 none transparent;color:var(--TextFillColorPrimary);font-family:var(--SystemFontFamily);font-size:var(--SystemFontSize)}.text-box::placeholder{color:var(--TextFillColorSecondary)}.text-box:disabled{color:var(--TextFillColorDisabled)}.text-box:disabled::placeholder{color:var(--TextFillColorDisabled)}::selection{background-color:var(--SystemAccentColor);color:var(--TextOnAccentFillColorSelected)}\n", "label{display:grid;position:relative;grid-template-columns:auto 1fr auto auto}.spin-button{grid-column:1;align-self:center;font-family:var(--SymbolFontFamily);color:var(--TextFillColorSecondary);pointer-events:none}.unit{grid-column:4;align-self:center;pointer-events:none}Flyout{grid-column:3}.InlineButtonStyle{padding:5px}input{grid-column:2}input:focus+.popup,input:active+.popup{display:flex}input:disabled~.unit{color:var(--TextFillColorDisabled)}\n"] }]
|
|
3138
3803
|
}], ctorParameters: () => [], propDecorators: { IsEnabled: [{
|
|
3139
3804
|
type: Input
|
|
3140
3805
|
}], PlaceholderText: [{
|
|
@@ -3155,6 +3820,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
3155
3820
|
type: Input
|
|
3156
3821
|
}], Unit: [{
|
|
3157
3822
|
type: Input
|
|
3823
|
+
}], SpinButtonPlacementMode: [{
|
|
3824
|
+
type: Input
|
|
3158
3825
|
}], ValueChange: [{
|
|
3159
3826
|
type: Output
|
|
3160
3827
|
}], NumberFormatter: [{
|
|
@@ -3226,6 +3893,12 @@ class TextBoxComponent extends FrameworkElementComponent {
|
|
|
3226
3893
|
if (this.UpdateTrigger == 'LostFocus')
|
|
3227
3894
|
this.update();
|
|
3228
3895
|
}
|
|
3896
|
+
onReturn() {
|
|
3897
|
+
//Enter commits the current value (like losing focus), regardless of UpdateTrigger — so e.g. a
|
|
3898
|
+
//LostFocus field applies on Enter without having to blur first. Multiline (textarea) keeps Enter as
|
|
3899
|
+
//a newline, so it isn't wired there.
|
|
3900
|
+
this.update();
|
|
3901
|
+
}
|
|
3229
3902
|
update() {
|
|
3230
3903
|
this.Text = this._input.nativeElement.value;
|
|
3231
3904
|
}
|
|
@@ -3250,13 +3923,13 @@ class TextBoxComponent extends FrameworkElementComponent {
|
|
|
3250
3923
|
}
|
|
3251
3924
|
}
|
|
3252
3925
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TextBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3253
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: TextBoxComponent, isStandalone: true, selector: "TextBox", inputs: { IsEnabled: "IsEnabled", PlaceholderText: "PlaceholderText", IsPlaceholderEditable: "IsPlaceholderEditable", TextAlignment: "TextAlignment", TextWrapping: "TextWrapping", UpdateTrigger: "UpdateTrigger", Pattern: "Pattern", Text: "Text" }, outputs: { TextChange: "TextChange" }, host: { listeners: { "click": "onClick()", "contextmenu": "onContextMenu($event)", "focusin": "onFocusIn()" }, properties: { "class.disabled": "this.disabled" } }, viewQueries: [{ propertyName: "_input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<input class="text-box" #input *ngIf="TextWrapping === 'NoWrap'" type="text" size="1" [disabled]="!IsEnabled" [value]="Text" (input)="onInput()" (blur)="onBlur()" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}"/>
|
|
3254
|
-
<textarea class="text-box" #input *ngIf="TextWrapping === 'Wrap'" [disabled]="!IsEnabled" [value]="Text" (input)="onInput()" (blur)="onBlur()" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}"></textarea>`, isInline: true, styles: [":host{position:relative}:host{display:grid;cursor:text;outline-style:none;border-style:solid;border-width:
|
|
3926
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: TextBoxComponent, isStandalone: true, selector: "TextBox", inputs: { IsEnabled: "IsEnabled", PlaceholderText: "PlaceholderText", IsPlaceholderEditable: "IsPlaceholderEditable", TextAlignment: "TextAlignment", TextWrapping: "TextWrapping", UpdateTrigger: "UpdateTrigger", Pattern: "Pattern", Text: "Text" }, outputs: { TextChange: "TextChange" }, host: { listeners: { "click": "onClick()", "contextmenu": "onContextMenu($event)", "focusin": "onFocusIn()" }, properties: { "class.disabled": "this.disabled" } }, viewQueries: [{ propertyName: "_input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<input class="text-box" #input *ngIf="TextWrapping === 'NoWrap'" type="text" size="1" [disabled]="!IsEnabled" [value]="Text" (input)="onInput()" (keydown.enter)="onReturn()" (blur)="onBlur()" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}"/>
|
|
3927
|
+
<textarea class="text-box" #input *ngIf="TextWrapping === 'Wrap'" [disabled]="!IsEnabled" [value]="Text" (input)="onInput()" (blur)="onBlur()" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}"></textarea>`, isInline: true, styles: [":host{position:relative}:host{display:grid;cursor:text;outline-style:none;border-style:solid;box-sizing:border-box;border-width:var(--TextControlBorderThickness);border-radius:var(--ControlCornerRadius);padding:var(--TextControlPadding);background-color:var(--TextControlBackgroundColor);border-color:var(--TextControlElevationBorderColor);border-bottom-color:var(--TextControlElevationBorderColorStrong)}:host:hover{background-color:var(--TextControlBackgroundColorPointerOver)}:host:focus-within{border-bottom-width:var(--TextControlBorderThicknessFocused);background-color:var(--TextControlBackgroundColorFocused);border-bottom-color:var(--TextControlElevationBorderColorFocused);padding-bottom:calc(var(--TextControlPadding) + var(--TextControlBorderThickness) - var(--TextControlBorderThicknessFocused))}:host.disabled{background-color:var(--TextControlBackgroundColorDisabled);border-bottom-color:var(--TextControlElevationBorderColorDisabled);pointer-events:none}textarea{resize:none}.text-box{background-color:transparent;border:0 none transparent;outline:0 none transparent;color:var(--TextFillColorPrimary);font-family:var(--SystemFontFamily);font-size:var(--SystemFontSize)}.text-box::placeholder{color:var(--TextFillColorSecondary)}.text-box:disabled{color:var(--TextFillColorDisabled)}.text-box:disabled::placeholder{color:var(--TextFillColorDisabled)}::selection{background-color:var(--SystemAccentColor);color:var(--TextOnAccentFillColorSelected)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
3255
3928
|
}
|
|
3256
3929
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TextBoxComponent, decorators: [{
|
|
3257
3930
|
type: Component,
|
|
3258
|
-
args: [{ selector: 'TextBox', imports: [CommonModule], template: `<input class="text-box" #input *ngIf="TextWrapping === 'NoWrap'" type="text" size="1" [disabled]="!IsEnabled" [value]="Text" (input)="onInput()" (blur)="onBlur()" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}"/>
|
|
3259
|
-
<textarea class="text-box" #input *ngIf="TextWrapping === 'Wrap'" [disabled]="!IsEnabled" [value]="Text" (input)="onInput()" (blur)="onBlur()" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}"></textarea>`, styles: [":host{position:relative}:host{display:grid;cursor:text;outline-style:none;border-style:solid;border-width:
|
|
3931
|
+
args: [{ selector: 'TextBox', imports: [CommonModule], template: `<input class="text-box" #input *ngIf="TextWrapping === 'NoWrap'" type="text" size="1" [disabled]="!IsEnabled" [value]="Text" (input)="onInput()" (keydown.enter)="onReturn()" (blur)="onBlur()" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}"/>
|
|
3932
|
+
<textarea class="text-box" #input *ngIf="TextWrapping === 'Wrap'" [disabled]="!IsEnabled" [value]="Text" (input)="onInput()" (blur)="onBlur()" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}"></textarea>`, styles: [":host{position:relative}:host{display:grid;cursor:text;outline-style:none;border-style:solid;box-sizing:border-box;border-width:var(--TextControlBorderThickness);border-radius:var(--ControlCornerRadius);padding:var(--TextControlPadding);background-color:var(--TextControlBackgroundColor);border-color:var(--TextControlElevationBorderColor);border-bottom-color:var(--TextControlElevationBorderColorStrong)}:host:hover{background-color:var(--TextControlBackgroundColorPointerOver)}:host:focus-within{border-bottom-width:var(--TextControlBorderThicknessFocused);background-color:var(--TextControlBackgroundColorFocused);border-bottom-color:var(--TextControlElevationBorderColorFocused);padding-bottom:calc(var(--TextControlPadding) + var(--TextControlBorderThickness) - var(--TextControlBorderThicknessFocused))}:host.disabled{background-color:var(--TextControlBackgroundColorDisabled);border-bottom-color:var(--TextControlElevationBorderColorDisabled);pointer-events:none}textarea{resize:none}.text-box{background-color:transparent;border:0 none transparent;outline:0 none transparent;color:var(--TextFillColorPrimary);font-family:var(--SystemFontFamily);font-size:var(--SystemFontSize)}.text-box::placeholder{color:var(--TextFillColorSecondary)}.text-box:disabled{color:var(--TextFillColorDisabled)}.text-box:disabled::placeholder{color:var(--TextFillColorDisabled)}::selection{background-color:var(--SystemAccentColor);color:var(--TextOnAccentFillColorSelected)}\n"] }]
|
|
3260
3933
|
}], propDecorators: { IsEnabled: [{
|
|
3261
3934
|
type: Input
|
|
3262
3935
|
}], PlaceholderText: [{
|
|
@@ -3301,5 +3974,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
3301
3974
|
* Generated bundle index. Do not edit.
|
|
3302
3975
|
*/
|
|
3303
3976
|
|
|
3304
|
-
export { AppBarButtonComponent, BorderComponent, ButtonComponent, ButtonTemplate, CheckBoxComponent, ColorPickerComponent, ComboBoxComponent, CommandBarComponent, ContentDialog, ContentDialogButton, ContentDialogPresenter, ContentDialogResult, ContextFlyoutDirective, Dialog, DialogPresenter, DropDownButtonComponent, EllipseComponent, FlyoutBaseComponent, FlyoutComponent, FlyoutDirective, FlyoutPresenter, FontIconComponent, FrameworkElementComponent, GridColumnDirective, GridColumnSpanDirective, GridComponent, GridDirective, GridModule, GridProperty, GridRowDirective, GridRowSpanDirective, GridViewComponent, HyperlinkButtonComponent, ImageComponent, ItemFlyoutDirective, ListBoxComponent, ListViewComponent, MenuFlyoutComponent, MenuFlyoutItemBase, MenuFlyoutItemComponent, MenuFlyoutSeparator, NumberBoxComponent, OpenFilePicker, PanelComponent, PersonPictureComponent, PopupTemplate, ProgressBarComponent, ProgressRingComponent, RadioButtonComponent, RadioButtonGroupComponent, RadioToggleButtonComponent, RepeatButtonComponent, ScrollBarComponent, ScrollViewerComponent, SelectorComponent, SelectorItemTemplate, SeparatorComponent, SliderComponent, SplitButtonComponent, StackPanelComponent, TextBlockComponent, TextBoxComponent, ToggleButtonComponent, ToggleMenuFlyoutItemComponent, ToggleSwitchComponent, ToolTipDirective, ToolTipServiceModule, XamlRootComponent,
|
|
3977
|
+
export { AppBarButtonComponent, BorderComponent, ButtonComponent, ButtonTemplate, CheckBoxComponent, ColorHsla, ColorHsva, ColorPickerComponent, ColorRgba, ColorSpectrumComponent, ComboBoxComponent, CommandBarComponent, ContentDialog, ContentDialogButton, ContentDialogPresenter, ContentDialogResult, ContextFlyoutDirective, Dialog, DialogPresenter, DropDownButtonComponent, EllipseComponent, FlyoutBaseComponent, FlyoutComponent, FlyoutDirective, FlyoutPresenter, FontIconComponent, FormatColor, FrameworkElementComponent, GridColumnDirective, GridColumnSpanDirective, GridComponent, GridDirective, GridModule, GridProperty, GridRowDirective, GridRowSpanDirective, GridViewComponent, HyperlinkButtonComponent, ImageComponent, ItemFlyoutDirective, ListBoxComponent, ListViewComponent, MenuFlyoutComponent, MenuFlyoutItemBase, MenuFlyoutItemComponent, MenuFlyoutSeparator, NumberBoxComponent, OpenFilePicker, PanelComponent, ParseColor, PersonPictureComponent, PopupTemplate, ProgressBarComponent, ProgressRingComponent, RadioButtonComponent, RadioButtonGroupComponent, RadioToggleButtonComponent, RepeatButtonComponent, ScrollBarComponent, ScrollViewerComponent, SelectorComponent, SelectorItemTemplate, SeparatorComponent, SliderComponent, SplitButtonComponent, StackPanelComponent, TextBlockComponent, TextBoxComponent, ToAlignment, ToJustification, ToggleButtonComponent, ToggleMenuFlyoutItemComponent, ToggleSwitchComponent, ToolTipComponent, ToolTipDirective, ToolTipServiceModule, XamlRootComponent, resume_after, resume_on_event };
|
|
3305
3978
|
//# sourceMappingURL=xaml-ui.mjs.map
|