xaml-ui 1.0.4 → 1.0.6
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 +1251 -493
- package/fesm2022/xaml-ui.mjs.map +1 -1
- package/lib/Color.d.ts +17 -0
- package/lib/Common.d.ts +1 -1
- package/lib/FrameworkElement.d.ts +3 -0
- package/lib/basic-input/Button.d.ts +2 -2
- package/lib/basic-input/ColorPicker.d.ts +20 -0
- package/lib/basic-input/ComboBox.d.ts +6 -4
- package/lib/basic-input/RepeatButton.d.ts +16 -0
- package/lib/basic-input/Slider.d.ts +1 -1
- package/lib/basic-input/SplitButton.d.ts +13 -0
- package/lib/dialogs-and-flyouts/ContextFlyout.d.ts +12 -0
- package/lib/dialogs-and-flyouts/Flyout.d.ts +5 -18
- package/lib/layout/StackPanel.d.ts +4 -2
- package/lib/media/Image.d.ts +13 -0
- package/lib/menus-and-toolbars/AppBarButton.d.ts +14 -0
- package/lib/menus-and-toolbars/CommandBar.d.ts +6 -0
- package/lib/menus-and-toolbars/MenuFlyout.d.ts +14 -0
- package/lib/menus-and-toolbars/MenuFlyoutItem.d.ts +13 -0
- package/lib/menus-and-toolbars/MenuFlyoutItemBase.d.ts +2 -0
- package/lib/menus-and-toolbars/MenuFlyoutSeparator.d.ts +6 -0
- package/lib/primitives/FlyoutBase.d.ts +39 -0
- package/lib/primitives/FlyoutPresenter.d.ts +13 -0
- package/lib/primitives/Selector.d.ts +2 -1
- package/lib/scrolling/ScrollBar.d.ts +1 -1
- package/lib/text/NumberBox.d.ts +45 -0
- package/lib/text/TextBlock.d.ts +1 -1
- package/lib/text/TextBox.d.ts +6 -2
- package/package.json +1 -1
- package/public-api.d.ts +15 -1
- package/styles/XamlGlobals.css +14 -0
- package/lib/primitives/Popup.d.ts +0 -19
package/fesm2022/xaml-ui.mjs
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { HostBinding, Input, Component, EventEmitter, HostListener, ContentChild, Output,
|
|
2
|
+
import { HostBinding, Input, Component, EventEmitter, HostListener, ContentChild, Output, ViewChild, TemplateRef, Optional, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { CdkScrollable } from '@angular/cdk/scrolling';
|
|
6
|
+
import { trigger, transition, animate, keyframes, style } from '@angular/animations';
|
|
7
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
|
8
|
+
import { OverlayConfig } from '@angular/cdk/overlay';
|
|
9
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
|
5
10
|
|
|
6
11
|
function toJustification(value) {
|
|
7
12
|
return value.toLowerCase();
|
|
@@ -25,6 +30,19 @@ class FrameworkElementComponent {
|
|
|
25
30
|
this.VerticalAlignment = 'Stretch';
|
|
26
31
|
this._id = FrameworkElementComponent._nextId++;
|
|
27
32
|
}
|
|
33
|
+
get overflow() {
|
|
34
|
+
return 'hidden';
|
|
35
|
+
}
|
|
36
|
+
get minWidth() {
|
|
37
|
+
if (this.MinWidth !== undefined)
|
|
38
|
+
return this.MinWidth;
|
|
39
|
+
return this.MaxWidth === undefined && this.HorizontalAlignment === 'Stretch' ? 'min-content' : undefined;
|
|
40
|
+
}
|
|
41
|
+
get minHeight() {
|
|
42
|
+
if (this.MinHeight !== undefined)
|
|
43
|
+
return this.MinHeight;
|
|
44
|
+
return this.MaxHeight === undefined && this.VerticalAlignment === 'Stretch' ? 'min-content' : undefined;
|
|
45
|
+
}
|
|
28
46
|
get width() {
|
|
29
47
|
if (this.Width !== undefined)
|
|
30
48
|
return this.Width;
|
|
@@ -43,7 +61,7 @@ class FrameworkElementComponent {
|
|
|
43
61
|
}
|
|
44
62
|
static { this._nextId = 1; }
|
|
45
63
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FrameworkElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
46
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: FrameworkElementComponent, isStandalone: true, selector: "FrameworkElement", inputs: { Width: "Width", MinWidth: "MinWidth", MaxWidth: "MaxWidth", Height: "Height", MinHeight: "MinHeight", MaxHeight: "MaxHeight", HorizontalAlignment: "HorizontalAlignment", VerticalAlignment: "VerticalAlignment", Margin: "Margin", Padding: "Padding" }, host: { properties: { "style.
|
|
64
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: FrameworkElementComponent, isStandalone: true, selector: "FrameworkElement", inputs: { Width: "Width", MinWidth: "MinWidth", MaxWidth: "MaxWidth", Height: "Height", MinHeight: "MinHeight", MaxHeight: "MaxHeight", HorizontalAlignment: "HorizontalAlignment", VerticalAlignment: "VerticalAlignment", Margin: "Margin", Padding: "Padding" }, host: { properties: { "style.max-width": "this.MaxWidth", "style.max-height": "this.MaxHeight", "style.margin": "this.Margin", "style.padding": "this.Padding", "style.overflow": "this.overflow", "style.min-width": "this.minWidth", "style.min-height": "this.minHeight", "style.width": "this.width", "style.height": "this.height", "style.justify-self": "this.justifySelf", "style.align-self": "this.alignSelf" } }, ngImport: i0, template: `<ng-container/>`, isInline: true }); }
|
|
47
65
|
}
|
|
48
66
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FrameworkElementComponent, decorators: [{
|
|
49
67
|
type: Component,
|
|
@@ -55,9 +73,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
55
73
|
type: Input
|
|
56
74
|
}], MinWidth: [{
|
|
57
75
|
type: Input
|
|
58
|
-
}, {
|
|
59
|
-
type: HostBinding,
|
|
60
|
-
args: ['style.min-width']
|
|
61
76
|
}], MaxWidth: [{
|
|
62
77
|
type: Input
|
|
63
78
|
}, {
|
|
@@ -67,9 +82,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
67
82
|
type: Input
|
|
68
83
|
}], MinHeight: [{
|
|
69
84
|
type: Input
|
|
70
|
-
}, {
|
|
71
|
-
type: HostBinding,
|
|
72
|
-
args: ['style.min-height']
|
|
73
85
|
}], MaxHeight: [{
|
|
74
86
|
type: Input
|
|
75
87
|
}, {
|
|
@@ -89,6 +101,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
89
101
|
}, {
|
|
90
102
|
type: HostBinding,
|
|
91
103
|
args: ['style.padding']
|
|
104
|
+
}], overflow: [{
|
|
105
|
+
type: HostBinding,
|
|
106
|
+
args: ['style.overflow']
|
|
107
|
+
}], minWidth: [{
|
|
108
|
+
type: HostBinding,
|
|
109
|
+
args: ['style.min-width']
|
|
110
|
+
}], minHeight: [{
|
|
111
|
+
type: HostBinding,
|
|
112
|
+
args: ['style.min-height']
|
|
92
113
|
}], width: [{
|
|
93
114
|
type: HostBinding,
|
|
94
115
|
args: ['style.width']
|
|
@@ -166,20 +187,20 @@ class ButtonComponent extends BorderComponent {
|
|
|
166
187
|
return this.IsEnabled ? undefined : true;
|
|
167
188
|
}
|
|
168
189
|
get flyoutOpen() {
|
|
169
|
-
return this.
|
|
190
|
+
return this._flyout?.IsOpen;
|
|
170
191
|
}
|
|
171
192
|
onHostPointerEvent(event) {
|
|
172
193
|
if (!this.IsEnabled)
|
|
173
194
|
return;
|
|
174
|
-
this.Click.emit();
|
|
175
|
-
this.
|
|
195
|
+
this.Click.emit(event);
|
|
196
|
+
this._flyout?.Show();
|
|
176
197
|
}
|
|
177
198
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
178
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ButtonComponent, isStandalone: true, selector: "Button", inputs: { IsEnabled: "IsEnabled", HorizontalContentAlignment: "HorizontalContentAlignment", VerticalContentAlignment: "VerticalContentAlignment" }, outputs: { Click: "Click" }, host: { listeners: { "click": "onHostPointerEvent($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.
|
|
199
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ButtonComponent, isStandalone: true, selector: "Button", inputs: { IsEnabled: "IsEnabled", HorizontalContentAlignment: "HorizontalContentAlignment", VerticalContentAlignment: "VerticalContentAlignment" }, outputs: { Click: "Click" }, host: { listeners: { "click": "onHostPointerEvent($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: `<ng-content/>`, isInline: true, styles: [":host{position:relative}:host{display:grid;padding:5px 11px;border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.disabled:not(.checked){background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled)}:host.disabled:not(.checked)::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:hover.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host:hover.checked:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host:active.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host:active.checked: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)}\n"] }); }
|
|
179
200
|
}
|
|
180
201
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
181
202
|
type: Component,
|
|
182
|
-
args: [{ selector: 'Button', template: `<ng-content/>`, styles: [":host{position:relative}:host{display:grid;padding:5px 11px;border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:hover:not(.checked):not(.
|
|
203
|
+
args: [{ selector: 'Button', template: `<ng-content/>`, styles: [":host{position:relative}:host{display:grid;padding:5px 11px;border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.disabled:not(.checked){background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled)}:host.disabled:not(.checked)::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:hover.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host:hover.checked:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host:active.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host:active.checked: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)}\n"] }]
|
|
183
204
|
}], propDecorators: { IsEnabled: [{
|
|
184
205
|
type: Input
|
|
185
206
|
}], Click: [{
|
|
@@ -205,10 +226,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
205
226
|
args: ['class.disabled']
|
|
206
227
|
}], flyoutOpen: [{
|
|
207
228
|
type: HostBinding,
|
|
208
|
-
args: ['class.
|
|
209
|
-
}],
|
|
229
|
+
args: ['class.flyout-open']
|
|
230
|
+
}], _flyout: [{
|
|
210
231
|
type: ContentChild,
|
|
211
|
-
args: ['
|
|
232
|
+
args: ['xaml-flyout']
|
|
212
233
|
}], onHostPointerEvent: [{
|
|
213
234
|
type: HostListener,
|
|
214
235
|
args: ['click', ['$event']]
|
|
@@ -255,24 +276,153 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
255
276
|
type: Output
|
|
256
277
|
}] } });
|
|
257
278
|
|
|
279
|
+
function colorToString(value) {
|
|
280
|
+
return '#' + value.toString(16).padStart(8, '0');
|
|
281
|
+
}
|
|
282
|
+
function stringToColor(value) {
|
|
283
|
+
return parseInt(value.replace('#', ''), 16);
|
|
284
|
+
}
|
|
285
|
+
function colorToRgb(value) {
|
|
286
|
+
return {
|
|
287
|
+
r: value >> 16 & 0xff,
|
|
288
|
+
g: value >> 8 & 0xff,
|
|
289
|
+
b: value & 0xff,
|
|
290
|
+
a: value >> 24 & 0xff
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
function rgbToHsl(rgb) {
|
|
294
|
+
const { r: r255, g: g255, b: b255, a: a255 } = rgb;
|
|
295
|
+
const r = r255 / 255;
|
|
296
|
+
const g = g255 / 255;
|
|
297
|
+
const b = b255 / 255;
|
|
298
|
+
const a = a255 / 255;
|
|
299
|
+
let max = Math.max(r, g, b);
|
|
300
|
+
let min = Math.min(r, g, b);
|
|
301
|
+
let h = (max + min) / 2;
|
|
302
|
+
let s = h;
|
|
303
|
+
let l = h;
|
|
304
|
+
if (max === min) {
|
|
305
|
+
// Achromatic
|
|
306
|
+
return { h: 0, s: 0, l: l * 100, a: a * 100 };
|
|
307
|
+
}
|
|
308
|
+
const d = max - min;
|
|
309
|
+
s = l >= 0.5 ? d / (2 - (max + min)) : d / (max + min);
|
|
310
|
+
switch (max) {
|
|
311
|
+
case r:
|
|
312
|
+
h = ((g - b) / d + 0) * 60;
|
|
313
|
+
break;
|
|
314
|
+
case g:
|
|
315
|
+
h = ((b - r) / d + 2) * 60;
|
|
316
|
+
break;
|
|
317
|
+
case b:
|
|
318
|
+
h = ((r - g) / d + 4) * 60;
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
return { h, s: s * 100, l: l * 100, a: a * 100 };
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
class ColorPickerComponent extends FrameworkElementComponent {
|
|
325
|
+
constructor() {
|
|
326
|
+
super(...arguments);
|
|
327
|
+
this._color = 0xffffffff;
|
|
328
|
+
this.ColorChange = new EventEmitter();
|
|
329
|
+
}
|
|
330
|
+
get Color() {
|
|
331
|
+
return this._color;
|
|
332
|
+
}
|
|
333
|
+
set Color(value) {
|
|
334
|
+
this.setColor(value);
|
|
335
|
+
this.updateSelectorPosition();
|
|
336
|
+
}
|
|
337
|
+
setColor(value) {
|
|
338
|
+
if (this._color === value)
|
|
339
|
+
return;
|
|
340
|
+
this._color = value;
|
|
341
|
+
this.ColorChange.emit(value);
|
|
342
|
+
}
|
|
343
|
+
ngAfterViewInit() {
|
|
344
|
+
let canvas = this._canvas.nativeElement;
|
|
345
|
+
canvas.width = parseInt(this.Width ?? '300');
|
|
346
|
+
canvas.height = parseInt(this.Height ?? '300');
|
|
347
|
+
let context = this._context = canvas.getContext('2d', { willReadFrequently: true });
|
|
348
|
+
let radius = canvas.width / 2;
|
|
349
|
+
// Draw hue circle
|
|
350
|
+
for (let angle = 0; angle < 360; angle++) {
|
|
351
|
+
let startAngle = (angle - 1) * (Math.PI / 180);
|
|
352
|
+
let endAngle = (angle + 1) * (Math.PI / 180);
|
|
353
|
+
context.beginPath();
|
|
354
|
+
context.moveTo(radius, radius);
|
|
355
|
+
context.arc(radius, radius, radius * 2, startAngle, endAngle);
|
|
356
|
+
context.closePath();
|
|
357
|
+
context.fillStyle = `hsl(${angle}, 100%, 50%)`;
|
|
358
|
+
context.fill();
|
|
359
|
+
}
|
|
360
|
+
// Add radial gradient for saturation
|
|
361
|
+
let gradient = context.createRadialGradient(radius, radius, 0, radius, radius, radius);
|
|
362
|
+
gradient.addColorStop(0, 'white');
|
|
363
|
+
gradient.addColorStop(1, 'transparent');
|
|
364
|
+
context.fillStyle = gradient;
|
|
365
|
+
context.fillRect(0, 0, canvas.width, canvas.height);
|
|
366
|
+
// Position sample
|
|
367
|
+
this.updateSelectorPosition();
|
|
368
|
+
}
|
|
369
|
+
onPointerDown(event) {
|
|
370
|
+
this._canvas.nativeElement.setPointerCapture(event.pointerId);
|
|
371
|
+
this.onPointerMove(event);
|
|
372
|
+
}
|
|
373
|
+
onPointerMove(event) {
|
|
374
|
+
if (!this._canvas.nativeElement.hasPointerCapture(event.pointerId))
|
|
375
|
+
return;
|
|
376
|
+
let radius = this._canvas.nativeElement.width / 2;
|
|
377
|
+
let rawX = event.offsetX - radius;
|
|
378
|
+
let rawY = event.offsetY - radius;
|
|
379
|
+
let length = Math.sqrt(rawX * rawX + rawY * rawY);
|
|
380
|
+
let scale = length < radius ? 1 : radius / Math.sqrt(rawX * rawX + rawY * rawY);
|
|
381
|
+
let sampleX = radius + rawX * scale;
|
|
382
|
+
let sampleY = radius + rawY * scale;
|
|
383
|
+
this._selector.nativeElement.style.left = sampleX + 'px';
|
|
384
|
+
this._selector.nativeElement.style.top = sampleY + 'px';
|
|
385
|
+
let imageData = this._context.getImageData(sampleX, sampleY, 1, 1).data;
|
|
386
|
+
let [r, g, b] = imageData;
|
|
387
|
+
let color = ((0xff << 24) + (r << 16) + (g << 8) + b) >>> 0;
|
|
388
|
+
this.setColor(color);
|
|
389
|
+
}
|
|
390
|
+
updateSelectorPosition() {
|
|
391
|
+
if (!this._canvas)
|
|
392
|
+
return;
|
|
393
|
+
let rgb = colorToRgb(this.Color);
|
|
394
|
+
let hsl = rgbToHsl(rgb);
|
|
395
|
+
let radius = this._canvas.nativeElement.width / 2;
|
|
396
|
+
let angle = hsl.h / 180 * Math.PI;
|
|
397
|
+
let length = hsl.s / 100 * radius;
|
|
398
|
+
let x = radius + Math.cos(angle) * length;
|
|
399
|
+
let y = radius + Math.sin(angle) * length;
|
|
400
|
+
this._selector.nativeElement.style.left = x + 'px';
|
|
401
|
+
this._selector.nativeElement.style.top = y + 'px';
|
|
402
|
+
}
|
|
403
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ColorPickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
404
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ColorPickerComponent, isStandalone: true, selector: "ColorPicker", inputs: { Color: "Color" }, outputs: { ColorChange: "ColorChange" }, viewQueries: [{ propertyName: "_canvas", first: true, predicate: ["canvas"], descendants: true }, { propertyName: "_selector", first: true, predicate: ["selector"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<canvas #canvas (pointerdown)="onPointerDown($event)" (pointermove)="onPointerMove($event)"></canvas><div #selector class="selector"></div>`, isInline: true, styles: [":host{position:relative}canvas{clip-path:circle(50%);position:relative}.selector{position:absolute;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"] }); }
|
|
405
|
+
}
|
|
406
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ColorPickerComponent, decorators: [{
|
|
407
|
+
type: Component,
|
|
408
|
+
args: [{ selector: 'ColorPicker', template: `<canvas #canvas (pointerdown)="onPointerDown($event)" (pointermove)="onPointerMove($event)"></canvas><div #selector class="selector"></div>`, styles: [":host{position:relative}canvas{clip-path:circle(50%);position:relative}.selector{position:absolute;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"] }]
|
|
409
|
+
}], propDecorators: { Color: [{
|
|
410
|
+
type: Input
|
|
411
|
+
}], ColorChange: [{
|
|
412
|
+
type: Output
|
|
413
|
+
}], _canvas: [{
|
|
414
|
+
type: ViewChild,
|
|
415
|
+
args: ['canvas']
|
|
416
|
+
}], _selector: [{
|
|
417
|
+
type: ViewChild,
|
|
418
|
+
args: ['selector']
|
|
419
|
+
}] } });
|
|
420
|
+
|
|
258
421
|
const SelectorItemTemplate = `<ng-container *ngIf="ItemTemplate">
|
|
259
422
|
<ng-container *ngTemplateOutlet="ItemTemplate; context: { $implicit: item }"/>
|
|
260
423
|
</ng-container>
|
|
261
424
|
<ng-container *ngIf="!ItemTemplate">{{ DisplayMemberPath ? item[DisplayMemberPath] : item }}</ng-container>`;
|
|
262
425
|
class SelectorComponent extends FrameworkElementComponent {
|
|
263
|
-
constructor() {
|
|
264
|
-
super(...arguments);
|
|
265
|
-
this.IsEnabled = true;
|
|
266
|
-
this.HorizontalContentAlignment = 'Left';
|
|
267
|
-
this.VerticalContentAlignment = 'Center';
|
|
268
|
-
//ItemSource
|
|
269
|
-
this._itemSource = [];
|
|
270
|
-
//Selected index
|
|
271
|
-
this._selectedIndex = -1;
|
|
272
|
-
this.SelectedIndexChange = new EventEmitter();
|
|
273
|
-
this.SelectedValueChange = new EventEmitter();
|
|
274
|
-
this.SelectedItemChange = new EventEmitter();
|
|
275
|
-
}
|
|
276
426
|
get alignContent() {
|
|
277
427
|
return toAlignment(this.VerticalContentAlignment);
|
|
278
428
|
}
|
|
@@ -286,23 +436,44 @@ class SelectorComponent extends FrameworkElementComponent {
|
|
|
286
436
|
return this._itemSource;
|
|
287
437
|
}
|
|
288
438
|
set ItemSource(value) {
|
|
439
|
+
let oldIndex = this.SelectedIndex;
|
|
440
|
+
let oldValue = this.SelectedValue;
|
|
441
|
+
let oldItem = this.SelectedItem;
|
|
442
|
+
let newIndex = value.findIndex(p => this.getValue(-1, p) == oldValue);
|
|
443
|
+
let newValue = newIndex !== -1 ? oldValue : null;
|
|
444
|
+
let newItem = newIndex !== -1 ? value[newIndex] : null;
|
|
289
445
|
this._itemSource = value;
|
|
290
|
-
this.
|
|
446
|
+
this._selectedIndex = newIndex;
|
|
447
|
+
if (oldIndex !== newIndex)
|
|
448
|
+
this.SelectedIndexChange.emit(this.SelectedIndex);
|
|
449
|
+
if (oldValue !== newValue)
|
|
450
|
+
this.SelectedValueChange.emit(this.SelectedValue);
|
|
451
|
+
if (oldItem !== newItem)
|
|
452
|
+
this.SelectedItemChange.emit(this.SelectedItem);
|
|
291
453
|
}
|
|
292
454
|
get SelectedIndex() {
|
|
293
455
|
return this._selectedIndex;
|
|
294
456
|
}
|
|
295
457
|
set SelectedIndex(value) {
|
|
458
|
+
if (this.ItemSource === undefined)
|
|
459
|
+
return;
|
|
296
460
|
if (value < 0 && this.ItemSource.length > 0)
|
|
297
|
-
value =
|
|
461
|
+
value = -1;
|
|
298
462
|
if (value >= this.ItemSource.length)
|
|
299
463
|
value = this.ItemSource.length - 1;
|
|
300
|
-
|
|
301
|
-
|
|
464
|
+
let oldIndex = this._selectedIndex;
|
|
465
|
+
let oldValue = this.SelectedValue;
|
|
466
|
+
let oldItem = this.SelectedItem;
|
|
302
467
|
this._selectedIndex = value;
|
|
303
|
-
this.
|
|
304
|
-
this.
|
|
305
|
-
this.
|
|
468
|
+
let newIndex = this._selectedIndex;
|
|
469
|
+
let newValue = this.SelectedValue;
|
|
470
|
+
let newItem = this.SelectedItem;
|
|
471
|
+
if (oldIndex !== newIndex)
|
|
472
|
+
this.SelectedIndexChange.emit(this.SelectedIndex);
|
|
473
|
+
if (oldValue !== newValue)
|
|
474
|
+
this.SelectedValueChange.emit(this.SelectedValue);
|
|
475
|
+
if (oldItem !== newItem)
|
|
476
|
+
this.SelectedItemChange.emit(this.SelectedItem);
|
|
306
477
|
}
|
|
307
478
|
//Selected value
|
|
308
479
|
get SelectedValue() {
|
|
@@ -311,6 +482,8 @@ class SelectorComponent extends FrameworkElementComponent {
|
|
|
311
482
|
return this.getValue(-1, this.ItemSource[this.SelectedIndex]);
|
|
312
483
|
}
|
|
313
484
|
set SelectedValue(value) {
|
|
485
|
+
if (this.ItemSource === undefined)
|
|
486
|
+
return;
|
|
314
487
|
this.SelectedIndex = this.ItemSource.findIndex(p => this.getValue(-1, p) == value);
|
|
315
488
|
}
|
|
316
489
|
//Selected item
|
|
@@ -320,11 +493,10 @@ class SelectorComponent extends FrameworkElementComponent {
|
|
|
320
493
|
return this.ItemSource[this.SelectedIndex];
|
|
321
494
|
}
|
|
322
495
|
set SelectedItem(value) {
|
|
496
|
+
if (this.ItemSource === undefined)
|
|
497
|
+
return;
|
|
323
498
|
this.SelectedIndex = this.ItemSource.findIndex(value);
|
|
324
499
|
}
|
|
325
|
-
getValue(index, item) {
|
|
326
|
-
return this.SelectedValuePath ? item[this.SelectedValuePath] : item;
|
|
327
|
-
}
|
|
328
500
|
onItemClick(event, index, item) {
|
|
329
501
|
if (this.SelectedIndex === index || !this.IsEnabled)
|
|
330
502
|
return;
|
|
@@ -334,7 +506,24 @@ class SelectorComponent extends FrameworkElementComponent {
|
|
|
334
506
|
GetElement(index) {
|
|
335
507
|
return document.querySelector(`#xaml-selector-${this._id}-item-${index}`);
|
|
336
508
|
}
|
|
337
|
-
|
|
509
|
+
constructor() {
|
|
510
|
+
super();
|
|
511
|
+
this.IsEnabled = true;
|
|
512
|
+
this.HorizontalContentAlignment = 'Left';
|
|
513
|
+
this.VerticalContentAlignment = 'Center';
|
|
514
|
+
//ItemSource
|
|
515
|
+
this._itemSource = [];
|
|
516
|
+
//Selected index
|
|
517
|
+
this._selectedIndex = -1;
|
|
518
|
+
this.SelectedIndexChange = new EventEmitter();
|
|
519
|
+
this.SelectedValueChange = new EventEmitter();
|
|
520
|
+
this.SelectedItemChange = new EventEmitter();
|
|
521
|
+
//This is required otherwise the SelectedValuePath cannot be read
|
|
522
|
+
this.getValue = (index, item) => {
|
|
523
|
+
return this.SelectedValuePath !== undefined ? item[this.SelectedValuePath] : item;
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
338
527
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: SelectorComponent, isStandalone: true, selector: "Selector", inputs: { 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" }, host: { properties: { "class.disabled": "this.disabled" } }, queries: [{ propertyName: "ItemTemplate", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
339
528
|
}
|
|
340
529
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SelectorComponent, decorators: [{
|
|
@@ -343,7 +532,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
343
532
|
selector: 'Selector',
|
|
344
533
|
template: '',
|
|
345
534
|
}]
|
|
346
|
-
}], propDecorators: { ItemTemplate: [{
|
|
535
|
+
}], ctorParameters: () => [], propDecorators: { ItemTemplate: [{
|
|
347
536
|
type: ContentChild,
|
|
348
537
|
args: [TemplateRef]
|
|
349
538
|
}], IsEnabled: [{
|
|
@@ -512,7 +701,7 @@ class ScrollBarComponent extends FrameworkElementComponent {
|
|
|
512
701
|
<div #track class="track" (pointerdown)="onTrackDown($event)" (pointerup)="onTrackUp($event)">
|
|
513
702
|
<div #thumb class="thumb" [ngStyle]="thumbStyle" (pointerdown)="onPointerDown($event)" (pointermove)="onPointerMove($event)" (pointerup)="onPointerUp($event)"></div>
|
|
514
703
|
</div>
|
|
515
|
-
<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
|
|
704
|
+
<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"] }] }); }
|
|
516
705
|
}
|
|
517
706
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ScrollBarComponent, decorators: [{
|
|
518
707
|
type: Component,
|
|
@@ -520,7 +709,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
520
709
|
<div #track class="track" (pointerdown)="onTrackDown($event)" (pointerup)="onTrackUp($event)">
|
|
521
710
|
<div #thumb class="thumb" [ngStyle]="thumbStyle" (pointerdown)="onPointerDown($event)" (pointermove)="onPointerMove($event)" (pointerup)="onPointerUp($event)"></div>
|
|
522
711
|
</div>
|
|
523
|
-
<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
|
|
712
|
+
<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"] }]
|
|
524
713
|
}], propDecorators: { Orientation: [{
|
|
525
714
|
type: Input
|
|
526
715
|
}], ViewportSize: [{
|
|
@@ -623,13 +812,13 @@ class ScrollViewerComponent extends FrameworkElementComponent {
|
|
|
623
812
|
this._changeDetector.detectChanges();
|
|
624
813
|
}
|
|
625
814
|
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 }); }
|
|
626
|
-
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()"><ng-content/></div>
|
|
815
|
+
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>
|
|
627
816
|
<ScrollBar *ngIf="IsVerticalScrollBarVisible" HorizontalAlignment="Right" class="scrollbar" Orientation="Vertical" [ScrollSize]="ExtentHeight" [ViewportSize]="ViewportHeight" [(Value)]="VerticalOffset"/>
|
|
628
|
-
<ScrollBar *ngIf="IsHorizontalScrollBarVisible" VerticalAlignment="Bottom" class="scrollbar" Orientation="Horizontal" [ScrollSize]="ExtentWidth" [ViewportSize]="ViewportWidth" [(Value)]="HorizontalOffset"/>`, isInline: true, styles: [":host{display:grid;overflow:auto}: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"] }] }); }
|
|
817
|
+
<ScrollBar *ngIf="IsHorizontalScrollBarVisible" VerticalAlignment="Bottom" class="scrollbar" Orientation="Horizontal" [ScrollSize]="ExtentWidth" [ViewportSize]="ViewportWidth" [(Value)]="HorizontalOffset"/>`, isInline: true, styles: [":host{display:grid;overflow:auto}: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]" }] }); }
|
|
629
818
|
}
|
|
630
819
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ScrollViewerComponent, decorators: [{
|
|
631
820
|
type: Component,
|
|
632
|
-
args: [{ selector: 'ScrollViewer', imports: [CommonModule, ScrollBarComponent], template: `<div #content class="content" [ngStyle]="contentStyle" (scroll)="onScroll()"><ng-content/></div>
|
|
821
|
+
args: [{ selector: 'ScrollViewer', imports: [CommonModule, ScrollBarComponent, CdkScrollable], template: `<div #content class="content" [ngStyle]="contentStyle" (scroll)="onScroll()" cdkScrollable><ng-content/></div>
|
|
633
822
|
<ScrollBar *ngIf="IsVerticalScrollBarVisible" HorizontalAlignment="Right" class="scrollbar" Orientation="Vertical" [ScrollSize]="ExtentHeight" [ViewportSize]="ViewportHeight" [(Value)]="VerticalOffset"/>
|
|
634
823
|
<ScrollBar *ngIf="IsHorizontalScrollBarVisible" VerticalAlignment="Bottom" class="scrollbar" Orientation="Horizontal" [ScrollSize]="ExtentWidth" [ViewportSize]="ViewportWidth" [(Value)]="HorizontalOffset"/>`, styles: [":host{display:grid;overflow:auto}: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"] }]
|
|
635
824
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { HorizontalScrollMode: [{
|
|
@@ -645,17 +834,22 @@ class StackPanelComponent extends PanelComponent {
|
|
|
645
834
|
constructor() {
|
|
646
835
|
super(...arguments);
|
|
647
836
|
this.Orientation = 'Vertical';
|
|
648
|
-
this.Spacing = 0;
|
|
649
837
|
}
|
|
650
|
-
get
|
|
651
|
-
return this.Orientation === 'Horizontal' ? '
|
|
838
|
+
get gridAutoFlow() {
|
|
839
|
+
return this.Orientation === 'Horizontal' ? 'column' : 'row';
|
|
840
|
+
}
|
|
841
|
+
get gridAutoRows() {
|
|
842
|
+
return this.Orientation === 'Vertical' ? 'min-content' : undefined;
|
|
843
|
+
}
|
|
844
|
+
get gridAutoColumns() {
|
|
845
|
+
return this.Orientation === 'Horizontal' ? 'min-content' : undefined;
|
|
652
846
|
}
|
|
653
847
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: StackPanelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
654
|
-
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.
|
|
848
|
+
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" } }, usesInheritance: true, ngImport: i0, template: `<ng-content/>`, isInline: true, styles: [":host{display:grid;position:relative}\n"] }); }
|
|
655
849
|
}
|
|
656
850
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: StackPanelComponent, decorators: [{
|
|
657
851
|
type: Component,
|
|
658
|
-
args: [{ selector: 'StackPanel', template: `<ng-content/>`, styles: [":host{display:
|
|
852
|
+
args: [{ selector: 'StackPanel', template: `<ng-content/>`, styles: [":host{display:grid;position:relative}\n"] }]
|
|
659
853
|
}], propDecorators: { Orientation: [{
|
|
660
854
|
type: Input
|
|
661
855
|
}], Spacing: [{
|
|
@@ -663,104 +857,330 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
663
857
|
}, {
|
|
664
858
|
type: HostBinding,
|
|
665
859
|
args: ['style.gap']
|
|
666
|
-
}],
|
|
860
|
+
}], gridAutoFlow: [{
|
|
861
|
+
type: HostBinding,
|
|
862
|
+
args: ['style.grid-auto-flow']
|
|
863
|
+
}], gridAutoRows: [{
|
|
864
|
+
type: HostBinding,
|
|
865
|
+
args: ['style.grid-auto-rows']
|
|
866
|
+
}], gridAutoColumns: [{
|
|
667
867
|
type: HostBinding,
|
|
668
|
-
args: ['style.
|
|
868
|
+
args: ['style.grid-auto-columns']
|
|
669
869
|
}] } });
|
|
670
870
|
|
|
671
871
|
class ListViewComponent extends SelectorComponent {
|
|
672
872
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ListViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
673
|
-
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 <div *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\">\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; context: { $implicit: item }\"/>\n </ng-container>\n <ng-container *ngIf=\"!ItemTemplate\">{{ DisplayMemberPath ? item[DisplayMemberPath] : item }}</ng-container></div>\n </div>\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"] }]
|
|
873
|
+
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 <div *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; context: { $implicit: item }\"/>\n </ng-container>\n <ng-container *ngIf=\"!ItemTemplate\">{{ DisplayMemberPath ? item[DisplayMemberPath] : item }}</ng-container></div>\n </div>\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"] }], animations: [
|
|
874
|
+
trigger('itemFading', [
|
|
875
|
+
transition(':enter', [animate('500ms ease-in', keyframes([
|
|
876
|
+
style({ opacity: 0, height: 0 }),
|
|
877
|
+
style({ opacity: 0, height: '*' }),
|
|
878
|
+
style({ opacity: 1, height: '*' }),
|
|
879
|
+
]))]),
|
|
880
|
+
transition(':leave', [animate('500ms ease-out', keyframes([
|
|
881
|
+
style({ opacity: 1, height: '*' }),
|
|
882
|
+
style({ opacity: 0, height: '*' }),
|
|
883
|
+
style({ opacity: 0, height: 0 }),
|
|
884
|
+
]))]),
|
|
885
|
+
])
|
|
886
|
+
] }); }
|
|
674
887
|
}
|
|
675
888
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ListViewComponent, decorators: [{
|
|
676
889
|
type: Component,
|
|
677
890
|
args: [{ selector: 'ListView', imports: [CommonModule, ScrollViewerComponent, StackPanelComponent], template: `<ScrollViewer>
|
|
678
891
|
<StackPanel Padding="2px 0">
|
|
679
|
-
<div *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">
|
|
892
|
+
<div *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>
|
|
680
893
|
<div class="item-selector"></div>
|
|
681
894
|
<div class="item-content" [ngStyle]="{'align-content': alignContent, 'justify-content': justifyContent}">${SelectorItemTemplate}</div>
|
|
682
895
|
</div>
|
|
683
896
|
</StackPanel>
|
|
684
|
-
</ScrollViewer>`,
|
|
897
|
+
</ScrollViewer>`, animations: [
|
|
898
|
+
trigger('itemFading', [
|
|
899
|
+
transition(':enter', [animate('500ms ease-in', keyframes([
|
|
900
|
+
style({ opacity: 0, height: 0 }),
|
|
901
|
+
style({ opacity: 0, height: '*' }),
|
|
902
|
+
style({ opacity: 1, height: '*' }),
|
|
903
|
+
]))]),
|
|
904
|
+
transition(':leave', [animate('500ms ease-out', keyframes([
|
|
905
|
+
style({ opacity: 1, height: '*' }),
|
|
906
|
+
style({ opacity: 0, height: '*' }),
|
|
907
|
+
style({ opacity: 0, height: 0 }),
|
|
908
|
+
]))]),
|
|
909
|
+
])
|
|
910
|
+
], 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"] }]
|
|
911
|
+
}] });
|
|
912
|
+
|
|
913
|
+
class DropDownButtonComponent extends ButtonComponent {
|
|
914
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DropDownButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
915
|
+
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:5px 11px;border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.disabled:not(.checked){background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled)}:host.disabled:not(.checked)::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:hover.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host:hover.checked:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host:active.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host:active.checked: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)}\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"] }); }
|
|
916
|
+
}
|
|
917
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DropDownButtonComponent, decorators: [{
|
|
918
|
+
type: Component,
|
|
919
|
+
args: [{ selector: 'DropDownButton', template: `<div class="drop-down-glyph"></div><ng-content/>`, styles: [":host{position:relative}:host{display:grid;padding:5px 11px;border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.disabled:not(.checked){background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled)}:host.disabled:not(.checked)::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:hover.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host:hover.checked:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host:active.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host:active.checked: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)}\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"] }]
|
|
685
920
|
}] });
|
|
686
921
|
|
|
687
|
-
class
|
|
922
|
+
class FlyoutPresenter {
|
|
688
923
|
constructor() {
|
|
689
|
-
this.
|
|
690
|
-
this.
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
924
|
+
this.TransitionAnimation = 'Default';
|
|
925
|
+
this.IsVisible = false;
|
|
926
|
+
}
|
|
927
|
+
static { this.TransitionDuration = 250; }
|
|
928
|
+
get transitionClass() {
|
|
929
|
+
return 'transition-' + this.TransitionAnimation.toLowerCase();
|
|
930
|
+
}
|
|
931
|
+
get visible() {
|
|
932
|
+
return this.IsVisible;
|
|
933
|
+
}
|
|
934
|
+
onContextMenu(event) {
|
|
935
|
+
event.preventDefault();
|
|
694
936
|
}
|
|
937
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FlyoutPresenter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
938
|
+
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": "this.transitionClass", "class.visible": "this.visible" } }, ngImport: i0, template: `<ng-content/>`, isInline: true, styles: [":host{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(100vw - 32px);max-height:calc(100vh - 32px)}:host.transition-slideup{transform:translateY(10px)}:host.transition-slidedown{transform:translateY(-10px)}:host.transition-slideleft{transform:translate(10px)}:host.transition-slideright{transform:translate(-10px)}:host.visible{opacity:1;transform:translate(0)}\n"] }); }
|
|
939
|
+
}
|
|
940
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FlyoutPresenter, decorators: [{
|
|
941
|
+
type: Component,
|
|
942
|
+
args: [{ selector: 'FlyoutPresenter', template: `<ng-content/>`, styles: [":host{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(100vw - 32px);max-height:calc(100vh - 32px)}:host.transition-slideup{transform:translateY(10px)}:host.transition-slidedown{transform:translateY(-10px)}:host.transition-slideleft{transform:translate(10px)}:host.transition-slideright{transform:translate(-10px)}:host.visible{opacity:1;transform:translate(0)}\n"] }]
|
|
943
|
+
}], propDecorators: { TransitionAnimation: [{
|
|
944
|
+
type: Input
|
|
945
|
+
}], Padding: [{
|
|
946
|
+
type: Input
|
|
947
|
+
}, {
|
|
948
|
+
type: HostBinding,
|
|
949
|
+
args: ['style.padding']
|
|
950
|
+
}], IsVisible: [{
|
|
951
|
+
type: Input
|
|
952
|
+
}], transitionClass: [{
|
|
953
|
+
type: HostBinding,
|
|
954
|
+
args: ['class']
|
|
955
|
+
}], visible: [{
|
|
956
|
+
type: HostBinding,
|
|
957
|
+
args: ['class.visible']
|
|
958
|
+
}], onContextMenu: [{
|
|
959
|
+
type: HostListener,
|
|
960
|
+
args: ['contextmenu', ['$event']]
|
|
961
|
+
}] } });
|
|
962
|
+
|
|
963
|
+
const PopupTemplate = `<ng-template #template><FlyoutPresenter #presenter [IsVisible]="isVisible" [TransitionAnimation]="transitionAnimation" [Padding]="Padding"><ng-content/></FlyoutPresenter></ng-template>`;
|
|
964
|
+
class FlyoutBaseComponent {
|
|
695
965
|
get IsOpen() {
|
|
696
966
|
return this._isOpen;
|
|
697
967
|
}
|
|
698
|
-
;
|
|
699
968
|
set IsOpen(value) {
|
|
969
|
+
if (value === this._isOpen)
|
|
970
|
+
return;
|
|
700
971
|
this._isOpen = value;
|
|
701
|
-
if (this._isRenderedTimeout !== undefined) {
|
|
702
|
-
clearTimeout(this._isRenderedTimeout);
|
|
703
|
-
}
|
|
704
972
|
if (value) {
|
|
705
|
-
this.
|
|
973
|
+
this.updatePlacement();
|
|
974
|
+
this._overlayRef.attach(this._templatePortal);
|
|
975
|
+
if (this.HasBackdrop)
|
|
976
|
+
this._backdropContextMenuSubscription = this._renderer.listen(this._overlayRef.backdropElement, 'contextmenu', p => { p.preventDefault(); this.Hide(); });
|
|
977
|
+
setTimeout(() => this.isVisible = true, 0);
|
|
706
978
|
}
|
|
707
979
|
else {
|
|
708
|
-
this.
|
|
709
|
-
|
|
710
|
-
|
|
980
|
+
this.isVisible = false;
|
|
981
|
+
setTimeout(() => this._overlayRef.detach(), FlyoutPresenter.TransitionDuration);
|
|
982
|
+
if (this._backdropContextMenuSubscription)
|
|
983
|
+
this._backdropContextMenuSubscription();
|
|
984
|
+
}
|
|
985
|
+
this.IsOpenChange.emit(value);
|
|
986
|
+
}
|
|
987
|
+
updatePlacement() {
|
|
988
|
+
if (!this._overlayRef)
|
|
989
|
+
return;
|
|
990
|
+
let target = this.Target ?? this._hostElement;
|
|
991
|
+
let positionStrategy = this._overlay
|
|
992
|
+
.position()
|
|
993
|
+
.flexibleConnectedTo(target)
|
|
994
|
+
.withPositions([this.positioning])
|
|
995
|
+
.withGrowAfterOpen(true)
|
|
996
|
+
.withFlexibleDimensions(true)
|
|
997
|
+
.withPush(true);
|
|
998
|
+
this._overlayRef.updatePositionStrategy(positionStrategy);
|
|
999
|
+
if (this.Placement === 'Cover') {
|
|
1000
|
+
this._overlayRef.updateSize(target);
|
|
711
1001
|
}
|
|
712
|
-
|
|
713
|
-
|
|
1002
|
+
}
|
|
1003
|
+
get Target() {
|
|
1004
|
+
return this._target;
|
|
1005
|
+
}
|
|
1006
|
+
set Target(value) {
|
|
1007
|
+
this._target = value;
|
|
1008
|
+
this.updatePlacement();
|
|
1009
|
+
}
|
|
1010
|
+
get style() {
|
|
1011
|
+
return {
|
|
1012
|
+
'position': 'absolute',
|
|
1013
|
+
'inset': 0,
|
|
1014
|
+
'pointer-events': 'none'
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
get transitionAnimation() {
|
|
1018
|
+
return 'Default';
|
|
1019
|
+
}
|
|
1020
|
+
get positioning() {
|
|
1021
|
+
switch (this.Placement) {
|
|
1022
|
+
case "Top":
|
|
1023
|
+
return {
|
|
1024
|
+
originX: 'center', originY: 'top',
|
|
1025
|
+
overlayX: 'center', overlayY: 'bottom'
|
|
1026
|
+
};
|
|
1027
|
+
case "TopEdgeAlignedLeft":
|
|
1028
|
+
return {
|
|
1029
|
+
originX: 'start', originY: 'top',
|
|
1030
|
+
overlayX: 'start', overlayY: 'bottom'
|
|
1031
|
+
};
|
|
1032
|
+
case "TopEdgeAlignedRight":
|
|
1033
|
+
return {
|
|
1034
|
+
originX: 'end', originY: 'top',
|
|
1035
|
+
overlayX: 'end', overlayY: 'bottom'
|
|
1036
|
+
};
|
|
1037
|
+
case "Bottom":
|
|
1038
|
+
return {
|
|
1039
|
+
originX: 'center', originY: 'bottom',
|
|
1040
|
+
overlayX: 'center', overlayY: 'top'
|
|
1041
|
+
};
|
|
1042
|
+
case "BottomEdgeAlignedLeft":
|
|
1043
|
+
return {
|
|
1044
|
+
originX: 'start', originY: 'bottom',
|
|
1045
|
+
overlayX: 'start', overlayY: 'top'
|
|
1046
|
+
};
|
|
1047
|
+
case "BottomEdgeAlignedRight":
|
|
1048
|
+
return {
|
|
1049
|
+
originX: 'end', originY: 'bottom',
|
|
1050
|
+
overlayX: 'end', overlayY: 'top'
|
|
1051
|
+
};
|
|
1052
|
+
case "Left":
|
|
1053
|
+
return {
|
|
1054
|
+
originX: 'start', originY: 'center',
|
|
1055
|
+
overlayX: 'end', overlayY: 'center'
|
|
1056
|
+
};
|
|
1057
|
+
case "LeftEdgeAlignedTop":
|
|
1058
|
+
return {
|
|
1059
|
+
originX: 'start', originY: 'top',
|
|
1060
|
+
overlayX: 'end', overlayY: 'top'
|
|
1061
|
+
};
|
|
1062
|
+
case "LeftEdgeAlignedBottom":
|
|
1063
|
+
return {
|
|
1064
|
+
originX: 'start', originY: 'bottom',
|
|
1065
|
+
overlayX: 'end', overlayY: 'bottom'
|
|
1066
|
+
};
|
|
1067
|
+
case "Right":
|
|
1068
|
+
return {
|
|
1069
|
+
originX: 'end', originY: 'center',
|
|
1070
|
+
overlayX: 'start', overlayY: 'center'
|
|
1071
|
+
};
|
|
1072
|
+
case "RightEdgeAlignedTop":
|
|
1073
|
+
return {
|
|
1074
|
+
originX: 'end', originY: 'top',
|
|
1075
|
+
overlayX: 'start', overlayY: 'top'
|
|
1076
|
+
};
|
|
1077
|
+
case "RightEdgeAlignedBottom":
|
|
1078
|
+
return {
|
|
1079
|
+
originX: 'end', originY: 'bottom',
|
|
1080
|
+
overlayX: 'start', overlayY: 'bottom'
|
|
1081
|
+
};
|
|
1082
|
+
case "Cover":
|
|
1083
|
+
return {
|
|
1084
|
+
originX: 'start', originY: 'top',
|
|
1085
|
+
overlayX: 'start', overlayY: 'top'
|
|
1086
|
+
};
|
|
714
1087
|
}
|
|
715
1088
|
}
|
|
716
1089
|
;
|
|
1090
|
+
constructor(_viewContainerRef, _overlay, _hostElement, _renderer) {
|
|
1091
|
+
this._viewContainerRef = _viewContainerRef;
|
|
1092
|
+
this._overlay = _overlay;
|
|
1093
|
+
this._hostElement = _hostElement;
|
|
1094
|
+
this._renderer = _renderer;
|
|
1095
|
+
this.Placement = 'Top';
|
|
1096
|
+
this.HasBackdrop = true;
|
|
1097
|
+
this._isOpen = false;
|
|
1098
|
+
this.isVisible = false;
|
|
1099
|
+
this.IsOpenChange = new EventEmitter();
|
|
1100
|
+
this._target = null;
|
|
1101
|
+
}
|
|
1102
|
+
ngOnDestroy() {
|
|
1103
|
+
if (this._backdropContextMenuSubscription)
|
|
1104
|
+
this._backdropContextMenuSubscription();
|
|
1105
|
+
}
|
|
1106
|
+
ngAfterViewInit() {
|
|
1107
|
+
this._templatePortal = new TemplatePortal(this._template, this._viewContainerRef);
|
|
1108
|
+
let config = new OverlayConfig({
|
|
1109
|
+
hasBackdrop: this.HasBackdrop,
|
|
1110
|
+
scrollStrategy: this._overlay.scrollStrategies.reposition()
|
|
1111
|
+
});
|
|
1112
|
+
this._overlayRef = this._overlay.create(config);
|
|
1113
|
+
this._overlayRef.backdropClick().subscribe(() => this.Hide());
|
|
1114
|
+
this.OnOverlay(this._overlayRef);
|
|
1115
|
+
}
|
|
1116
|
+
OnOverlay(overlay) {
|
|
1117
|
+
}
|
|
717
1118
|
Show() {
|
|
718
1119
|
this.IsOpen = true;
|
|
719
1120
|
}
|
|
720
1121
|
Hide() {
|
|
721
1122
|
this.IsOpen = false;
|
|
722
1123
|
}
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
}
|
|
726
|
-
onBackdropClick(event) {
|
|
727
|
-
this.Hide();
|
|
728
|
-
event.stopPropagation();
|
|
729
|
-
}
|
|
730
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
731
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: PopupComponent, isStandalone: true, selector: "Popup", inputs: { IsOpen: "IsOpen", VerticalOffset: "VerticalOffset", HorizontalOffset: "HorizontalOffset" }, outputs: { IsOpenChange: "IsOpenChange" }, host: { classAttribute: "popup" }, viewQueries: [{ propertyName: "_container", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: `<div class="popup-backdrop" (click)="onBackdropClick($event)" (contextmenu)="onBackdropClick($event)" *ngIf="IsOpen"></div>
|
|
732
|
-
<div #container class="popup-container" [ngClass]="containerClass">
|
|
733
|
-
<div class="popup-content" *ngIf="isRendered"><ng-content/></div>
|
|
734
|
-
</div>`, isInline: true, styles: [":host{position:relative}:host{z-index:900}.popup-container{background-color:transparent;display:grid;padding:0;margin:0;border:0;position:absolute;pointer-events:none;z-index:1000}.popup-container>.popup-content{display:grid;padding:16px;border-width:1px;border-style:solid;border-radius:var(--OverlayCornerRadius);opacity:0;transition:opacity var(--ControlNormalAnimationDuration);-webkit-backdrop-filter:var(--AcrylicBlur);backdrop-filter:var(--AcrylicBlur);box-shadow:0 0 15px #0000001a;border-color:var(--SurfaceStrokeColorFlyout);background-color:var(--AcrylicInAppFillColorDefault)}.popup-container.popup-open>.popup-content{opacity:1;pointer-events:all}.popup-backdrop{position:fixed;inset:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
1124
|
+
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.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1125
|
+
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><FlyoutPresenter #presenter [IsVisible]=\"isVisible\" [TransitionAnimation]=\"transitionAnimation\" [Padding]=\"Padding\"><ng-content/></FlyoutPresenter></ng-template>", isInline: true, dependencies: [{ kind: "component", type: FlyoutPresenter, selector: "FlyoutPresenter", inputs: ["TransitionAnimation", "Padding", "IsVisible"] }] }); }
|
|
735
1126
|
}
|
|
736
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FlyoutBaseComponent, decorators: [{
|
|
737
1128
|
type: Component,
|
|
738
|
-
args: [{
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
}], propDecorators: {
|
|
1129
|
+
args: [{
|
|
1130
|
+
imports: [FlyoutPresenter],
|
|
1131
|
+
selector: 'FlyoutBase',
|
|
1132
|
+
template: PopupTemplate,
|
|
1133
|
+
providers: [{ provide: 'xaml-flyout', useExisting: FlyoutBaseComponent }]
|
|
1134
|
+
}]
|
|
1135
|
+
}], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { Placement: [{
|
|
1136
|
+
type: Input
|
|
1137
|
+
}], Padding: [{
|
|
1138
|
+
type: Input
|
|
1139
|
+
}], HasBackdrop: [{
|
|
1140
|
+
type: Input
|
|
1141
|
+
}], IsOpen: [{
|
|
745
1142
|
type: Input
|
|
746
1143
|
}], IsOpenChange: [{
|
|
747
1144
|
type: Output
|
|
748
|
-
}],
|
|
749
|
-
type: Input
|
|
750
|
-
}], HorizontalOffset: [{
|
|
1145
|
+
}], Target: [{
|
|
751
1146
|
type: Input
|
|
752
|
-
}],
|
|
1147
|
+
}], _template: [{
|
|
753
1148
|
type: ViewChild,
|
|
754
|
-
args: ['
|
|
1149
|
+
args: ['template']
|
|
1150
|
+
}], style: [{
|
|
1151
|
+
type: HostBinding,
|
|
1152
|
+
args: ['style']
|
|
755
1153
|
}] } });
|
|
756
1154
|
|
|
757
|
-
class
|
|
758
|
-
|
|
759
|
-
|
|
1155
|
+
class FlyoutComponent extends FlyoutBaseComponent {
|
|
1156
|
+
get transitionAnimation() {
|
|
1157
|
+
switch (this.Placement) {
|
|
1158
|
+
case "Top":
|
|
1159
|
+
case "TopEdgeAlignedLeft":
|
|
1160
|
+
case "TopEdgeAlignedRight":
|
|
1161
|
+
return 'SlideUp';
|
|
1162
|
+
case "Bottom":
|
|
1163
|
+
case "BottomEdgeAlignedLeft":
|
|
1164
|
+
case "BottomEdgeAlignedRight":
|
|
1165
|
+
return 'SlideDown';
|
|
1166
|
+
case "Left":
|
|
1167
|
+
case "LeftEdgeAlignedTop":
|
|
1168
|
+
case "LeftEdgeAlignedBottom":
|
|
1169
|
+
return 'SlideLeft';
|
|
1170
|
+
case "Right":
|
|
1171
|
+
case "RightEdgeAlignedTop":
|
|
1172
|
+
case "RightEdgeAlignedBottom":
|
|
1173
|
+
return 'SlideRight';
|
|
1174
|
+
default:
|
|
1175
|
+
return 'Default';
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FlyoutComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1179
|
+
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><FlyoutPresenter #presenter [IsVisible]=\"isVisible\" [TransitionAnimation]=\"transitionAnimation\" [Padding]=\"Padding\"><ng-content/></FlyoutPresenter></ng-template>", isInline: true, styles: ["FlyoutPresenter{padding:16px}\n"], dependencies: [{ kind: "component", type: FlyoutPresenter, selector: "FlyoutPresenter", inputs: ["TransitionAnimation", "Padding", "IsVisible"] }] }); }
|
|
760
1180
|
}
|
|
761
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FlyoutComponent, decorators: [{
|
|
762
1182
|
type: Component,
|
|
763
|
-
args: [{ selector: '
|
|
1183
|
+
args: [{ selector: 'Flyout', imports: [FlyoutPresenter], template: PopupTemplate, providers: [{ provide: 'xaml-flyout', useExisting: FlyoutComponent }], styles: ["FlyoutPresenter{padding:16px}\n"] }]
|
|
764
1184
|
}] });
|
|
765
1185
|
|
|
766
1186
|
class ComboBoxComponent extends SelectorComponent {
|
|
@@ -770,44 +1190,45 @@ class ComboBoxComponent extends SelectorComponent {
|
|
|
770
1190
|
get index() {
|
|
771
1191
|
return this.SelectedIndex;
|
|
772
1192
|
}
|
|
773
|
-
constructor(_changeDetector) {
|
|
1193
|
+
constructor(_changeDetector, _host) {
|
|
774
1194
|
super();
|
|
775
1195
|
this._changeDetector = _changeDetector;
|
|
776
|
-
this.
|
|
1196
|
+
this._host = _host;
|
|
1197
|
+
this.target = null;
|
|
777
1198
|
this.SelectedIndexChange.subscribe(() => this.onSelectionChanged());
|
|
778
1199
|
}
|
|
1200
|
+
onIsOpenChanged(value) {
|
|
1201
|
+
if (!value)
|
|
1202
|
+
return;
|
|
1203
|
+
let rect = this._host.nativeElement.getBoundingClientRect();
|
|
1204
|
+
let popupOffset = -(this._selector?.GetElement(this.SelectedIndex)?.offsetTop ?? 0);
|
|
1205
|
+
this.target = { x: rect.left, y: rect.top + popupOffset - 4, width: rect.width };
|
|
1206
|
+
}
|
|
779
1207
|
ngAfterViewInit() {
|
|
780
1208
|
//help the layout finish itself
|
|
781
1209
|
this._changeDetector.detectChanges();
|
|
782
1210
|
}
|
|
783
|
-
get popupOffset() {
|
|
784
|
-
//Cache the value so the change detector will not complain
|
|
785
|
-
let popupOffset = -(this._selector?.GetElement(this.SelectedIndex)?.offsetTop ?? 0);
|
|
786
|
-
if (popupOffset !== 0)
|
|
787
|
-
this._popupOffset = popupOffset;
|
|
788
|
-
return this._popupOffset;
|
|
789
|
-
}
|
|
790
1211
|
onSelectionChanged() {
|
|
791
1212
|
if (this._popup)
|
|
792
1213
|
this._popup.IsOpen = false;
|
|
793
1214
|
}
|
|
794
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ComboBoxComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
795
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ComboBoxComponent, isStandalone: true, selector: "ComboBox", viewQueries: [{ propertyName: "_selector", first: true, predicate: ListViewComponent, descendants: true }, { propertyName: "_popup", first: true, predicate:
|
|
1215
|
+
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 }); }
|
|
1216
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ComboBoxComponent, isStandalone: true, selector: "ComboBox", viewQueries: [{ propertyName: "_selector", first: true, predicate: ListViewComponent, descendants: true }, { propertyName: "_popup", first: true, predicate: ["xaml-flyout"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<DropDownButton [HorizontalContentAlignment]=\"HorizontalContentAlignment\" [VerticalContentAlignment]=\"VerticalContentAlignment\" [IsEnabled]=\"IsEnabled\">\n <ng-container *ngIf=\"ItemTemplate\">\n <ng-container *ngTemplateOutlet=\"ItemTemplate; context: { $implicit: item }\"/>\n </ng-container>\n <ng-container *ngIf=\"!ItemTemplate\">{{ DisplayMemberPath ? item[DisplayMemberPath] : item }}</ng-container>\n <Flyout Placement=\"Cover\" Padding=\"0\" [Target]=\"target\" (IsOpenChange)=\"onIsOpenChanged($event)\">\n <ListView [ItemSource]=\"ItemSource\" [(SelectedIndex)]=\"SelectedIndex\" [HorizontalContentAlignment]=\"HorizontalContentAlignment\" [VerticalContentAlignment]=\"VerticalContentAlignment\"/>\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" }] }); }
|
|
796
1217
|
}
|
|
797
1218
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ComboBoxComponent, decorators: [{
|
|
798
1219
|
type: Component,
|
|
799
|
-
args: [{ selector: 'ComboBox', imports: [CommonModule, DropDownButtonComponent,
|
|
1220
|
+
args: [{ selector: 'ComboBox', imports: [CommonModule, DropDownButtonComponent, FlyoutComponent, ListViewComponent], template: `<DropDownButton [HorizontalContentAlignment]="HorizontalContentAlignment" [VerticalContentAlignment]="VerticalContentAlignment" [IsEnabled]="IsEnabled">
|
|
800
1221
|
${SelectorItemTemplate}
|
|
801
|
-
<
|
|
1222
|
+
<Flyout Placement="Cover" Padding="0" [Target]="target" (IsOpenChange)="onIsOpenChanged($event)">
|
|
802
1223
|
<ListView [ItemSource]="ItemSource" [(SelectedIndex)]="SelectedIndex" [HorizontalContentAlignment]="HorizontalContentAlignment" [VerticalContentAlignment]="VerticalContentAlignment"/>
|
|
803
|
-
</
|
|
1224
|
+
</Flyout>
|
|
804
1225
|
</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"] }]
|
|
805
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { _selector: [{
|
|
1226
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { _selector: [{
|
|
806
1227
|
type: ViewChild,
|
|
807
1228
|
args: [ListViewComponent]
|
|
808
1229
|
}], _popup: [{
|
|
809
1230
|
type: ViewChild,
|
|
810
|
-
args: [
|
|
1231
|
+
args: ['xaml-flyout']
|
|
811
1232
|
}] } });
|
|
812
1233
|
|
|
813
1234
|
class RadioButtonComponent extends BorderComponent {
|
|
@@ -906,6 +1327,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
906
1327
|
type: Output
|
|
907
1328
|
}] } });
|
|
908
1329
|
|
|
1330
|
+
class RepeatButtonComponent extends ButtonComponent {
|
|
1331
|
+
constructor() {
|
|
1332
|
+
super(...arguments);
|
|
1333
|
+
this.Delay = 250;
|
|
1334
|
+
this.Interval = 250;
|
|
1335
|
+
}
|
|
1336
|
+
onPointerDown(event) {
|
|
1337
|
+
if (!this.IsEnabled)
|
|
1338
|
+
return;
|
|
1339
|
+
event.target.setPointerCapture(event.pointerId);
|
|
1340
|
+
this.Click.emit();
|
|
1341
|
+
this._delayTimer = setTimeout(() => {
|
|
1342
|
+
this.Click.emit();
|
|
1343
|
+
this._intervalTimer = setInterval(() => {
|
|
1344
|
+
this.Click.emit();
|
|
1345
|
+
}, this.Interval);
|
|
1346
|
+
}, this.Delay);
|
|
1347
|
+
}
|
|
1348
|
+
onPointerUp() {
|
|
1349
|
+
this.clearTimers();
|
|
1350
|
+
}
|
|
1351
|
+
clearTimers() {
|
|
1352
|
+
if (this._delayTimer !== undefined)
|
|
1353
|
+
clearTimeout(this._delayTimer);
|
|
1354
|
+
if (this._intervalTimer !== undefined)
|
|
1355
|
+
clearInterval(this._intervalTimer);
|
|
1356
|
+
}
|
|
1357
|
+
onHostPointerEvent(event) {
|
|
1358
|
+
//Disable pointer event handling on the base button
|
|
1359
|
+
}
|
|
1360
|
+
ngOnDestroy() {
|
|
1361
|
+
this.clearTimers();
|
|
1362
|
+
}
|
|
1363
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RepeatButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1364
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: RepeatButtonComponent, isStandalone: true, selector: "RepeatButton", inputs: { Delay: "Delay", Interval: "Interval" }, host: { listeners: { "pointerdown": "onPointerDown($event)", "pointerup": "onPointerUp($event)" } }, usesInheritance: true, ngImport: i0, template: `<ng-content/>`, isInline: true, styles: [":host{position:relative}:host{display:grid;padding:5px 11px;border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.disabled:not(.checked){background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled)}:host.disabled:not(.checked)::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:hover.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host:hover.checked:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host:active.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host:active.checked: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)}\n"] }); }
|
|
1365
|
+
}
|
|
1366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RepeatButtonComponent, decorators: [{
|
|
1367
|
+
type: Component,
|
|
1368
|
+
args: [{ selector: 'RepeatButton', template: `<ng-content/>`, styles: [":host{position:relative}:host{display:grid;padding:5px 11px;border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.disabled:not(.checked){background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled)}:host.disabled:not(.checked)::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:hover.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host:hover.checked:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host:active.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host:active.checked: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)}\n"] }]
|
|
1369
|
+
}], propDecorators: { Delay: [{
|
|
1370
|
+
type: Input
|
|
1371
|
+
}], Interval: [{
|
|
1372
|
+
type: Input
|
|
1373
|
+
}], onPointerDown: [{
|
|
1374
|
+
type: HostListener,
|
|
1375
|
+
args: ['pointerdown', ['$event']]
|
|
1376
|
+
}], onPointerUp: [{
|
|
1377
|
+
type: HostListener,
|
|
1378
|
+
args: ['pointerup', ['$event']]
|
|
1379
|
+
}] } });
|
|
1380
|
+
|
|
909
1381
|
class SliderComponent extends FrameworkElementComponent {
|
|
910
1382
|
constructor() {
|
|
911
1383
|
super(...arguments);
|
|
@@ -917,28 +1389,28 @@ class SliderComponent extends FrameworkElementComponent {
|
|
|
917
1389
|
this.IsEnabled = true;
|
|
918
1390
|
this.Orientation = 'Horizontal';
|
|
919
1391
|
}
|
|
920
|
-
|
|
1392
|
+
onInput(event) {
|
|
921
1393
|
this.Value = parseFloat(event.target.value);
|
|
922
1394
|
this.ValueChange.emit(this.Value);
|
|
923
1395
|
}
|
|
924
1396
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SliderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
925
1397
|
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" }, usesInheritance: true, ngImport: i0, template: `<input type="range"
|
|
1398
|
+
[step]="StepFrequency"
|
|
926
1399
|
[min]="Minimum"
|
|
927
1400
|
[max]="Maximum"
|
|
928
1401
|
[value]="Value"
|
|
929
|
-
|
|
930
|
-
(change)="onChange($event)"
|
|
1402
|
+
(input)="onInput($event)"
|
|
931
1403
|
[disabled]="!IsEnabled"
|
|
932
1404
|
[className]="Orientation.toLowerCase()">`, isInline: true, styles: [":host{position:relative}:host{display:grid}input{display:grid;-webkit-appearance:none;appearance:none;background-color:var(--ControlStrongFillColorDefault);border-radius:2px;outline:none}input.horizontal{height:4px;margin:7px 0}input.vertical{width:4px;margin:0 7px;writing-mode:vertical-lr;direction:rtl;vertical-align:middle}input::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;box-sizing:border-box;border-radius:50%;width:16px;height:16px;border-style:solid;border-width:4px;outline:1px solid var(--ControlStrokeColorOnAccentDefaultDark);border-color:var(--ControlSolidFillColorDefault);background-color:var(--AccentFillColorDefault);transition:border-width var(--ControlFastAnimationDuration)}input::-moz-range-thumb{-webkit-appearance:none;appearance:none;box-sizing:border-box;border-radius:50%;width:16px;height:16px;border-style:solid;border-width:4px;outline:1px solid var(--ControlStrokeColorOnAccentDefaultDark);border-color:var(--ControlSolidFillColorDefault);background-color:var(--AccentFillColorDefault);transition:border-width var(--ControlFastAnimationDuration)}input:not(:disabled)::-webkit-slider-thumb:hover{border-width:3px;background-color:var(--AccentFillColorSecondary)}input:not(:disabled)::-webkit-slider-thumb:active{border-width:5px;background-color:var(--AccentFillColorTertiary)}input:not(:disabled)::-moz-range-thumb:hover{border-width:3px;background-color:var(--AccentFillColorSecondary)}input:not(:disabled)::-moz-range-thumb:active{border-width:5px;background-color:var(--AccentFillColorTertiary)}input:disabled{background-color:var(--ControlStrongFillColorDisabled)}input:disabled::-webkit-slider-thumb{border-width:2px;background-color:var(--AccentFillColorDisabled)}input:disabled::-moz-range-thumb{border-width:2px;background-color:var(--AccentFillColorDisabled)}\n"] }); }
|
|
933
1405
|
}
|
|
934
1406
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SliderComponent, decorators: [{
|
|
935
1407
|
type: Component,
|
|
936
1408
|
args: [{ selector: 'Slider', template: `<input type="range"
|
|
1409
|
+
[step]="StepFrequency"
|
|
937
1410
|
[min]="Minimum"
|
|
938
1411
|
[max]="Maximum"
|
|
939
1412
|
[value]="Value"
|
|
940
|
-
|
|
941
|
-
(change)="onChange($event)"
|
|
1413
|
+
(input)="onInput($event)"
|
|
942
1414
|
[disabled]="!IsEnabled"
|
|
943
1415
|
[className]="Orientation.toLowerCase()">`, styles: [":host{position:relative}:host{display:grid}input{display:grid;-webkit-appearance:none;appearance:none;background-color:var(--ControlStrongFillColorDefault);border-radius:2px;outline:none}input.horizontal{height:4px;margin:7px 0}input.vertical{width:4px;margin:0 7px;writing-mode:vertical-lr;direction:rtl;vertical-align:middle}input::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;box-sizing:border-box;border-radius:50%;width:16px;height:16px;border-style:solid;border-width:4px;outline:1px solid var(--ControlStrokeColorOnAccentDefaultDark);border-color:var(--ControlSolidFillColorDefault);background-color:var(--AccentFillColorDefault);transition:border-width var(--ControlFastAnimationDuration)}input::-moz-range-thumb{-webkit-appearance:none;appearance:none;box-sizing:border-box;border-radius:50%;width:16px;height:16px;border-style:solid;border-width:4px;outline:1px solid var(--ControlStrokeColorOnAccentDefaultDark);border-color:var(--ControlSolidFillColorDefault);background-color:var(--AccentFillColorDefault);transition:border-width var(--ControlFastAnimationDuration)}input:not(:disabled)::-webkit-slider-thumb:hover{border-width:3px;background-color:var(--AccentFillColorSecondary)}input:not(:disabled)::-webkit-slider-thumb:active{border-width:5px;background-color:var(--AccentFillColorTertiary)}input:not(:disabled)::-moz-range-thumb:hover{border-width:3px;background-color:var(--AccentFillColorSecondary)}input:not(:disabled)::-moz-range-thumb:active{border-width:5px;background-color:var(--AccentFillColorTertiary)}input:disabled{background-color:var(--ControlStrongFillColorDisabled)}input:disabled::-webkit-slider-thumb{border-width:2px;background-color:var(--AccentFillColorDisabled)}input:disabled::-moz-range-thumb{border-width:2px;background-color:var(--AccentFillColorDisabled)}\n"] }]
|
|
944
1416
|
}], propDecorators: { Minimum: [{
|
|
@@ -957,55 +1429,282 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
957
1429
|
type: Input
|
|
958
1430
|
}] } });
|
|
959
1431
|
|
|
960
|
-
class
|
|
1432
|
+
class GridComponent extends PanelComponent {
|
|
961
1433
|
constructor() {
|
|
962
1434
|
super(...arguments);
|
|
963
|
-
this.
|
|
964
|
-
this.IsCheckedChange = new EventEmitter();
|
|
1435
|
+
this.Orientation = 'Horizontal';
|
|
965
1436
|
}
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
return;
|
|
969
|
-
this.IsChecked = !this.IsChecked;
|
|
970
|
-
this.IsCheckedChange.emit(this.IsChecked);
|
|
1437
|
+
get gridAutoFlow() {
|
|
1438
|
+
return this.Orientation == 'Horizontal' ? 'row' : 'column';
|
|
971
1439
|
}
|
|
972
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
973
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type:
|
|
1440
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1441
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: GridComponent, isStandalone: false, selector: "Grid", inputs: { ColumnDefinitions: "ColumnDefinitions", RowDefinitions: "RowDefinitions", ColumnSpacing: "ColumnSpacing", RowSpacing: "RowSpacing", Orientation: "Orientation" }, host: { properties: { "style.grid-template-columns": "this.ColumnDefinitions", "style.grid-template-rows": "this.RowDefinitions", "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"] }); }
|
|
974
1442
|
}
|
|
975
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridComponent, decorators: [{
|
|
976
1444
|
type: Component,
|
|
977
|
-
args: [{ selector: '
|
|
978
|
-
}], propDecorators: {
|
|
1445
|
+
args: [{ selector: 'Grid', template: `<ng-content/>`, standalone: false, styles: [":host{display:grid;position:relative}\n"] }]
|
|
1446
|
+
}], propDecorators: { ColumnDefinitions: [{
|
|
979
1447
|
type: Input
|
|
980
1448
|
}, {
|
|
981
1449
|
type: HostBinding,
|
|
982
|
-
args: ['
|
|
983
|
-
}],
|
|
984
|
-
type:
|
|
985
|
-
}
|
|
986
|
-
type:
|
|
987
|
-
args: ['
|
|
988
|
-
}]
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1450
|
+
args: ['style.grid-template-columns']
|
|
1451
|
+
}], RowDefinitions: [{
|
|
1452
|
+
type: Input
|
|
1453
|
+
}, {
|
|
1454
|
+
type: HostBinding,
|
|
1455
|
+
args: ['style.grid-template-rows']
|
|
1456
|
+
}], ColumnSpacing: [{
|
|
1457
|
+
type: Input
|
|
1458
|
+
}, {
|
|
1459
|
+
type: HostBinding,
|
|
1460
|
+
args: ['style.column-gap']
|
|
1461
|
+
}], RowSpacing: [{
|
|
1462
|
+
type: Input
|
|
1463
|
+
}, {
|
|
1464
|
+
type: HostBinding,
|
|
1465
|
+
args: ['style.row-gap']
|
|
1466
|
+
}], Orientation: [{
|
|
1467
|
+
type: Input
|
|
1468
|
+
}], gridAutoFlow: [{
|
|
1469
|
+
type: HostBinding,
|
|
1470
|
+
args: ['style.grid-auto-flow']
|
|
1471
|
+
}] } });
|
|
1472
|
+
class GridProperty {
|
|
1473
|
+
}
|
|
1474
|
+
class GridDirective {
|
|
1475
|
+
constructor() {
|
|
1476
|
+
this.Grid = new GridProperty();
|
|
1477
|
+
}
|
|
1478
|
+
get gridColumnStart() {
|
|
1479
|
+
return this.Grid.Column !== undefined ? this.Grid.Column + 1 : undefined;
|
|
1480
|
+
}
|
|
1481
|
+
get gridRowStart() {
|
|
1482
|
+
return this.Grid.Row !== undefined ? this.Grid.Row + 1 : undefined;
|
|
1483
|
+
}
|
|
1484
|
+
get gridColumnEnd() {
|
|
1485
|
+
return this.Grid.ColumnSpan !== undefined ? ('span ' + this.Grid.ColumnSpan) : undefined;
|
|
1486
|
+
}
|
|
1487
|
+
get gridRowEnd() {
|
|
1488
|
+
return this.Grid.RowSpan !== undefined ? ('span ' + this.Grid.RowSpan) : undefined;
|
|
1489
|
+
}
|
|
1490
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1491
|
+
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 }); }
|
|
1492
|
+
}
|
|
1493
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridDirective, decorators: [{
|
|
1494
|
+
type: Directive,
|
|
1495
|
+
args: [{
|
|
1496
|
+
selector: '[Grid]',
|
|
1497
|
+
standalone: false
|
|
1498
|
+
}]
|
|
1499
|
+
}], propDecorators: { Grid: [{
|
|
1500
|
+
type: Input
|
|
1501
|
+
}], gridColumnStart: [{
|
|
1502
|
+
type: HostBinding,
|
|
1503
|
+
args: ['style.grid-column-start']
|
|
1504
|
+
}], gridRowStart: [{
|
|
1505
|
+
type: HostBinding,
|
|
1506
|
+
args: ['style.grid-row-start']
|
|
1507
|
+
}], gridColumnEnd: [{
|
|
1508
|
+
type: HostBinding,
|
|
1509
|
+
args: ['style.grid-column-end']
|
|
1510
|
+
}], gridRowEnd: [{
|
|
1511
|
+
type: HostBinding,
|
|
1512
|
+
args: ['style.grid-row-end']
|
|
1513
|
+
}] } });
|
|
1514
|
+
class GridRowDirective {
|
|
1515
|
+
get gridRowStart() {
|
|
1516
|
+
return this.Row !== undefined ? parseInt(this.Row) + 1 : undefined;
|
|
1517
|
+
}
|
|
1518
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridRowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1519
|
+
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 }); }
|
|
1520
|
+
}
|
|
1521
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridRowDirective, decorators: [{
|
|
1522
|
+
type: Directive,
|
|
1523
|
+
args: [{
|
|
1524
|
+
selector: '[Grid-Row]',
|
|
1525
|
+
standalone: false
|
|
1526
|
+
}]
|
|
1527
|
+
}], propDecorators: { Row: [{
|
|
1528
|
+
type: Input,
|
|
1529
|
+
args: ['Grid-Row']
|
|
1530
|
+
}], gridRowStart: [{
|
|
1531
|
+
type: HostBinding,
|
|
1532
|
+
args: ['style.grid-row-start']
|
|
1533
|
+
}] } });
|
|
1534
|
+
class GridColumnDirective {
|
|
1535
|
+
get gridColumnStart() {
|
|
1536
|
+
return this.Column !== undefined ? parseInt(this.Column) + 1 : undefined;
|
|
1537
|
+
}
|
|
1538
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1539
|
+
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 }); }
|
|
1540
|
+
}
|
|
1541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridColumnDirective, decorators: [{
|
|
1542
|
+
type: Directive,
|
|
1543
|
+
args: [{
|
|
1544
|
+
selector: '[Grid-Column]',
|
|
1545
|
+
standalone: false
|
|
1546
|
+
}]
|
|
1547
|
+
}], propDecorators: { Column: [{
|
|
1548
|
+
type: Input,
|
|
1549
|
+
args: ['Grid-Column']
|
|
1550
|
+
}], gridColumnStart: [{
|
|
1551
|
+
type: HostBinding,
|
|
1552
|
+
args: ['style.grid-column-start']
|
|
1553
|
+
}] } });
|
|
1554
|
+
class GridRowSpanDirective {
|
|
1555
|
+
get gridRowEnd() {
|
|
1556
|
+
return this.RowSpan !== undefined ? ('span ' + this.RowSpan) : undefined;
|
|
1557
|
+
}
|
|
1558
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridRowSpanDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1559
|
+
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 }); }
|
|
1560
|
+
}
|
|
1561
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridRowSpanDirective, decorators: [{
|
|
1562
|
+
type: Directive,
|
|
1563
|
+
args: [{
|
|
1564
|
+
selector: '[Grid-RowSpan]',
|
|
1565
|
+
standalone: false
|
|
1566
|
+
}]
|
|
1567
|
+
}], propDecorators: { RowSpan: [{
|
|
1568
|
+
type: Input,
|
|
1569
|
+
args: ['Grid-RowSpan']
|
|
1570
|
+
}], gridRowEnd: [{
|
|
1571
|
+
type: HostBinding,
|
|
1572
|
+
args: ['style.grid-row-end']
|
|
1573
|
+
}] } });
|
|
1574
|
+
class GridColumnSpanDirective {
|
|
1575
|
+
get gridColumnEnd() {
|
|
1576
|
+
return this.ColumnSpan !== undefined ? ('span ' + this.ColumnSpan) : undefined;
|
|
1577
|
+
}
|
|
1578
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridColumnSpanDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1579
|
+
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 }); }
|
|
1580
|
+
}
|
|
1581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridColumnSpanDirective, decorators: [{
|
|
1582
|
+
type: Directive,
|
|
1583
|
+
args: [{
|
|
1584
|
+
selector: '[Grid-ColumnSpan]',
|
|
1585
|
+
standalone: false
|
|
1586
|
+
}]
|
|
1587
|
+
}], propDecorators: { ColumnSpan: [{
|
|
1588
|
+
type: Input,
|
|
1589
|
+
args: ['Grid-ColumnSpan']
|
|
1590
|
+
}], gridColumnEnd: [{
|
|
1591
|
+
type: HostBinding,
|
|
1592
|
+
args: ['style.grid-column-end']
|
|
1593
|
+
}] } });
|
|
1594
|
+
const GridComponents = [
|
|
1595
|
+
GridComponent,
|
|
1596
|
+
GridDirective,
|
|
1597
|
+
GridRowDirective,
|
|
1598
|
+
GridRowSpanDirective,
|
|
1599
|
+
GridColumnDirective,
|
|
1600
|
+
GridColumnSpanDirective
|
|
1601
|
+
];
|
|
1602
|
+
class GridModule {
|
|
1603
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1604
|
+
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] }); }
|
|
1605
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridModule }); }
|
|
1606
|
+
}
|
|
1607
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridModule, decorators: [{
|
|
1608
|
+
type: NgModule,
|
|
1609
|
+
args: [{
|
|
1610
|
+
declarations: GridComponents,
|
|
1611
|
+
exports: GridComponents
|
|
1612
|
+
}]
|
|
1613
|
+
}] });
|
|
1614
|
+
|
|
1615
|
+
class SplitButtonComponent extends FrameworkElementComponent {
|
|
1616
|
+
constructor() {
|
|
1617
|
+
super(...arguments);
|
|
1618
|
+
this.IsEnabled = true;
|
|
1619
|
+
this.Click = new EventEmitter();
|
|
1620
|
+
}
|
|
1621
|
+
get buttonClass() {
|
|
1622
|
+
return this._popup?.IsOpen ? 'flyout-open' : undefined;
|
|
1623
|
+
}
|
|
1624
|
+
onButtonClick() {
|
|
1625
|
+
if (!this.IsEnabled)
|
|
1626
|
+
return;
|
|
1627
|
+
this.Click.emit();
|
|
1628
|
+
}
|
|
1629
|
+
onDropDownClick() {
|
|
1630
|
+
if (!this._popup || !this.IsEnabled)
|
|
1631
|
+
return;
|
|
1632
|
+
this._popup.IsOpen = true;
|
|
1633
|
+
}
|
|
1634
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SplitButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1635
|
+
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">
|
|
1636
|
+
<Button CornerRadius="4px 0 0 4px" [IsEnabled]="IsEnabled" (Click)="onButtonClick()" [ngClass]="buttonClass"><ng-content/></Button>
|
|
1637
|
+
<DropDownButton CornerRadius="0 4px 4px 0" Width="12px" (Click)="onDropDownClick()" [IsEnabled]="IsEnabled"/>
|
|
1638
|
+
</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", "HorizontalContentAlignment", "VerticalContentAlignment"], outputs: ["Click"] }, { kind: "component", type: DropDownButtonComponent, selector: "DropDownButton" }, { kind: "ngmodule", type: GridModule }, { kind: "component", type: GridComponent, selector: "Grid", inputs: ["ColumnDefinitions", "RowDefinitions", "ColumnSpacing", "RowSpacing", "Orientation"] }] }); }
|
|
1639
|
+
}
|
|
1640
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SplitButtonComponent, decorators: [{
|
|
1641
|
+
type: Component,
|
|
1642
|
+
args: [{
|
|
1643
|
+
selector: 'SplitButton',
|
|
1644
|
+
template: `<Grid ColumnDefinitions="1fr auto">
|
|
1645
|
+
<Button CornerRadius="4px 0 0 4px" [IsEnabled]="IsEnabled" (Click)="onButtonClick()" [ngClass]="buttonClass"><ng-content/></Button>
|
|
1646
|
+
<DropDownButton CornerRadius="0 4px 4px 0" Width="12px" (Click)="onDropDownClick()" [IsEnabled]="IsEnabled"/>
|
|
1647
|
+
</Grid>`,
|
|
1648
|
+
imports: [CommonModule, ButtonComponent, DropDownButtonComponent, GridModule]
|
|
1649
|
+
}]
|
|
1650
|
+
}], propDecorators: { IsEnabled: [{
|
|
1651
|
+
type: Input
|
|
1652
|
+
}], Click: [{
|
|
1653
|
+
type: Output
|
|
1654
|
+
}], _popup: [{
|
|
1655
|
+
type: ContentChild,
|
|
1656
|
+
args: ['xaml-flyout']
|
|
1657
|
+
}] } });
|
|
1658
|
+
|
|
1659
|
+
class ToggleButtonComponent extends ButtonComponent {
|
|
1660
|
+
constructor() {
|
|
1661
|
+
super(...arguments);
|
|
1662
|
+
this.IsChecked = false;
|
|
1663
|
+
this.IsCheckedChange = new EventEmitter();
|
|
1664
|
+
}
|
|
1665
|
+
onPointerUp(event) {
|
|
1666
|
+
if (!this.IsEnabled)
|
|
1667
|
+
return;
|
|
1668
|
+
this.IsChecked = !this.IsChecked;
|
|
1669
|
+
this.IsCheckedChange.emit(this.IsChecked);
|
|
1670
|
+
}
|
|
1671
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ToggleButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1672
|
+
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: { listeners: { "pointerup": "onPointerUp($event)" }, properties: { "class.checked": "this.IsChecked" } }, usesInheritance: true, ngImport: i0, template: `<ng-content/>`, isInline: true, styles: [":host{position:relative}:host{display:grid;padding:5px 11px;border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.disabled:not(.checked){background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled)}:host.disabled:not(.checked)::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:hover.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host:hover.checked:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host:active.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host:active.checked: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)}\n"] }); }
|
|
1673
|
+
}
|
|
1674
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ToggleButtonComponent, decorators: [{
|
|
1675
|
+
type: Component,
|
|
1676
|
+
args: [{ selector: 'ToggleButton', template: `<ng-content/>`, styles: [":host{position:relative}:host{display:grid;padding:5px 11px;border-width:var(--ControlBorderThickness);border-style:solid;border-radius:var(--ControlCornerRadius);position:relative;background:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);color:var(--TextFillColorPrimary);transition:all var(--ControlFastAnimationDuration)}:host::ng-deep *{color:var(--TextFillColorPrimary)}:host:hover:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled){background:var(--ControlFillColorTertiary);color:var(--TextFillColorSecondary)}:host:active:not(.checked):not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextFillColorSecondary)}:host.disabled:not(.checked){background:var(--ControlFillColorDisabled);color:var(--TextFillColorDisabled)}:host.disabled:not(.checked)::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:hover.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary);color:var(--TextOnAccentFillColorPrimary)}:host:hover.checked:not(.flyout-open):not(.disabled)::ng-deep *{color:var(--TextOnAccentFillColorPrimary)}:host:active.checked:not(.flyout-open):not(.disabled){background:var(--AccentFillColorTertiary);border-color:var(--ControlFillColorTransparent);color:var(--TextOnAccentFillColorSecondary)}:host:active.checked: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)}\n"] }]
|
|
1677
|
+
}], propDecorators: { IsChecked: [{
|
|
1678
|
+
type: Input
|
|
1679
|
+
}, {
|
|
1680
|
+
type: HostBinding,
|
|
1681
|
+
args: ['class.checked']
|
|
1682
|
+
}], IsCheckedChange: [{
|
|
1683
|
+
type: Output
|
|
1684
|
+
}], onPointerUp: [{
|
|
1685
|
+
type: HostListener,
|
|
1686
|
+
args: ['pointerup', ['$event']]
|
|
1687
|
+
}] } });
|
|
1688
|
+
|
|
1689
|
+
class ToggleSwitchComponent extends CheckBoxComponent {
|
|
1690
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ToggleSwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1691
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ToggleSwitchComponent, isStandalone: true, selector: "ToggleSwitch", usesInheritance: true, ngImport: i0, template: `<label class="container">
|
|
1692
|
+
<input type="checkbox" [checked]="IsChecked" (change)="onChange($event)" [disabled]="!IsEnabled">
|
|
1693
|
+
<div class="slider">
|
|
1694
|
+
<div class="thumb"></div>
|
|
1695
|
+
</div>
|
|
1696
|
+
<div class="content"><ng-content/></div>
|
|
1697
|
+
</label>`, isInline: true, styles: [":host{position:relative}.container{display:grid;grid-template-columns:auto 1fr;column-gap:6px}.content{display:grid}input{display:none}input:not(:checked):not(:active):not(:disabled)+.slider:not(:hover){background-color:var(--ControlAltFillColorSecondary);border-color:var(--ControlStrongStrokeColorDefault)}input:not(:checked):not(:active):not(:disabled)+.slider:not(:hover)>.thumb{background-color:var(--TextFillColorSecondary)}input:not(:checked):not(:active):not(:disabled)+.slider:hover{background-color:var(--ControlAltFillColorTertiary);border-color:var(--ControlStrongStrokeColorDefault)}input:not(:checked):not(:active):not(:disabled)+.slider:hover>.thumb{background-color:var(--TextFillColorSecondary)}input:not(:checked):active:not(:disabled)+.slider{background-color:var(--ControlAltFillColorQuarternary);border-color:var(--ControlStrongStrokeColorDefault)}input:not(:checked):active:not(:disabled)+.slider>.thumb{background-color:var(--TextFillColorSecondary)}input:not(:checked):disabled+.slider{background-color:var(--ControlAltFillColorDisabled);border-color:var(--ControlStrongStrokeColorDisabled)}input:not(:checked):disabled+.slider>.thumb{background-color:var(--TextFillColorDisabled)}input:checked:not(:active):not(:disabled)+.slider:not(:hover){background-color:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault)}input:checked:not(:active):not(:disabled)+.slider:not(:hover)>.thumb{background-color:var(--TextOnAccentFillColorPrimary)}input:checked:not(:active):not(:disabled)+.slider:hover{background-color:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary)}input:checked:not(:active):not(:disabled)+.slider:hover>.thumb{background-color:var(--TextOnAccentFillColorPrimary)}input:checked:active:not(:disabled)+.slider{background-color:var(--AccentFillColorTertiary);border-color:var(--AccentFillColorTertiary)}input:checked:active:not(:disabled)+.slider>.thumb{background-color:var(--TextOnAccentFillColorPrimary)}input:checked:disabled+.slider{background-color:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled)}input:checked:disabled+.slider>.thumb{background-color:var(--TextOnAccentFillColorDisabled)}input:checked+.slider>.thumb{transform:translate(22px)}input:not(:disabled):active+.slider>.thumb{width:17px;height:14px;transform:translate(-1px)}input:not(:disabled):not(:active):hover+.slider>.thumb{width:14px;height:14px;transform:translate(-1px)}input:not(:disabled):not(:active):checked:hover+.slider>.thumb{transform:translate(21px)}input:not(:disabled):checked:active+.slider>.thumb{transform:translate(18px);width:17px;height:14px}.slider{display:grid;width:40px;height:18px;border-radius:10px;border-style:solid;border-width:1.5px;transition:background-color var(--ControlNormalAnimationDuration);background-color:var(--ControlAltFillColorSecondary)}.thumb{display:grid;width:12px;height:12px;border-radius:7px;align-self:center;margin:0 3px;transition:transform var(--ControlNormalAnimationDuration);transition:width var(--ControlFastAnimationDuration);transition:margin-left var(--ControlFastAnimationDuration)}\n"] }); }
|
|
1698
|
+
}
|
|
1699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ToggleSwitchComponent, decorators: [{
|
|
1700
|
+
type: Component,
|
|
1002
1701
|
args: [{ selector: 'ToggleSwitch', template: `<label class="container">
|
|
1003
1702
|
<input type="checkbox" [checked]="IsChecked" (change)="onChange($event)" [disabled]="!IsEnabled">
|
|
1004
1703
|
<div class="slider">
|
|
1005
1704
|
<div class="thumb"></div>
|
|
1006
1705
|
</div>
|
|
1007
1706
|
<div class="content"><ng-content/></div>
|
|
1008
|
-
</label>`, styles: [":host{position:relative}.container{display:grid;grid-template-columns:auto 1fr;column-gap:6px}input{display:none}input:not(:checked):not(:active):not(:disabled)+.slider:not(:hover){background-color:var(--ControlAltFillColorSecondary);border-color:var(--ControlStrongStrokeColorDefault)}input:not(:checked):not(:active):not(:disabled)+.slider:not(:hover)>.thumb{background-color:var(--TextFillColorSecondary)}input:not(:checked):not(:active):not(:disabled)+.slider:hover{background-color:var(--ControlAltFillColorTertiary);border-color:var(--ControlStrongStrokeColorDefault)}input:not(:checked):not(:active):not(:disabled)+.slider:hover>.thumb{background-color:var(--TextFillColorSecondary)}input:not(:checked):active:not(:disabled)+.slider{background-color:var(--ControlAltFillColorQuarternary);border-color:var(--ControlStrongStrokeColorDefault)}input:not(:checked):active:not(:disabled)+.slider>.thumb{background-color:var(--TextFillColorSecondary)}input:not(:checked):disabled+.slider{background-color:var(--ControlAltFillColorDisabled);border-color:var(--ControlStrongStrokeColorDisabled)}input:not(:checked):disabled+.slider>.thumb{background-color:var(--TextFillColorDisabled)}input:checked:not(:active):not(:disabled)+.slider:not(:hover){background-color:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault)}input:checked:not(:active):not(:disabled)+.slider:not(:hover)>.thumb{background-color:var(--TextOnAccentFillColorPrimary)}input:checked:not(:active):not(:disabled)+.slider:hover{background-color:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary)}input:checked:not(:active):not(:disabled)+.slider:hover>.thumb{background-color:var(--TextOnAccentFillColorPrimary)}input:checked:active:not(:disabled)+.slider{background-color:var(--AccentFillColorTertiary);border-color:var(--AccentFillColorTertiary)}input:checked:active:not(:disabled)+.slider>.thumb{background-color:var(--TextOnAccentFillColorPrimary)}input:checked:disabled+.slider{background-color:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled)}input:checked:disabled+.slider>.thumb{background-color:var(--TextOnAccentFillColorDisabled)}input:checked+.slider>.thumb{transform:translate(22px)}input:not(:disabled):active+.slider>.thumb{width:17px;height:14px;transform:translate(-1px)}input:not(:disabled):not(:active):hover+.slider>.thumb{width:14px;height:14px;transform:translate(-1px)}input:not(:disabled):not(:active):checked:hover+.slider>.thumb{transform:translate(21px)}input:not(:disabled):checked:active+.slider>.thumb{transform:translate(18px);width:17px;height:14px}.slider{display:grid;width:40px;height:18px;border-radius:10px;border-style:solid;border-width:1.5px;transition:background-color var(--ControlNormalAnimationDuration);background-color:var(--ControlAltFillColorSecondary)}.thumb{display:grid;width:12px;height:12px;border-radius:7px;align-self:center;margin:0 3px;transition:transform var(--ControlNormalAnimationDuration);transition:width var(--ControlFastAnimationDuration);transition:margin-left var(--ControlFastAnimationDuration)}\n"] }]
|
|
1707
|
+
</label>`, styles: [":host{position:relative}.container{display:grid;grid-template-columns:auto 1fr;column-gap:6px}.content{display:grid}input{display:none}input:not(:checked):not(:active):not(:disabled)+.slider:not(:hover){background-color:var(--ControlAltFillColorSecondary);border-color:var(--ControlStrongStrokeColorDefault)}input:not(:checked):not(:active):not(:disabled)+.slider:not(:hover)>.thumb{background-color:var(--TextFillColorSecondary)}input:not(:checked):not(:active):not(:disabled)+.slider:hover{background-color:var(--ControlAltFillColorTertiary);border-color:var(--ControlStrongStrokeColorDefault)}input:not(:checked):not(:active):not(:disabled)+.slider:hover>.thumb{background-color:var(--TextFillColorSecondary)}input:not(:checked):active:not(:disabled)+.slider{background-color:var(--ControlAltFillColorQuarternary);border-color:var(--ControlStrongStrokeColorDefault)}input:not(:checked):active:not(:disabled)+.slider>.thumb{background-color:var(--TextFillColorSecondary)}input:not(:checked):disabled+.slider{background-color:var(--ControlAltFillColorDisabled);border-color:var(--ControlStrongStrokeColorDisabled)}input:not(:checked):disabled+.slider>.thumb{background-color:var(--TextFillColorDisabled)}input:checked:not(:active):not(:disabled)+.slider:not(:hover){background-color:var(--AccentFillColorDefault);border-color:var(--AccentFillColorDefault)}input:checked:not(:active):not(:disabled)+.slider:not(:hover)>.thumb{background-color:var(--TextOnAccentFillColorPrimary)}input:checked:not(:active):not(:disabled)+.slider:hover{background-color:var(--AccentFillColorSecondary);border-color:var(--AccentFillColorSecondary)}input:checked:not(:active):not(:disabled)+.slider:hover>.thumb{background-color:var(--TextOnAccentFillColorPrimary)}input:checked:active:not(:disabled)+.slider{background-color:var(--AccentFillColorTertiary);border-color:var(--AccentFillColorTertiary)}input:checked:active:not(:disabled)+.slider>.thumb{background-color:var(--TextOnAccentFillColorPrimary)}input:checked:disabled+.slider{background-color:var(--AccentFillColorDisabled);border-color:var(--AccentFillColorDisabled)}input:checked:disabled+.slider>.thumb{background-color:var(--TextOnAccentFillColorDisabled)}input:checked+.slider>.thumb{transform:translate(22px)}input:not(:disabled):active+.slider>.thumb{width:17px;height:14px;transform:translate(-1px)}input:not(:disabled):not(:active):hover+.slider>.thumb{width:14px;height:14px;transform:translate(-1px)}input:not(:disabled):not(:active):checked:hover+.slider>.thumb{transform:translate(21px)}input:not(:disabled):checked:active+.slider>.thumb{transform:translate(18px);width:17px;height:14px}.slider{display:grid;width:40px;height:18px;border-radius:10px;border-style:solid;border-width:1.5px;transition:background-color var(--ControlNormalAnimationDuration);background-color:var(--ControlAltFillColorSecondary)}.thumb{display:grid;width:12px;height:12px;border-radius:7px;align-self:center;margin:0 3px;transition:transform var(--ControlNormalAnimationDuration);transition:width var(--ControlFastAnimationDuration);transition:margin-left var(--ControlFastAnimationDuration)}\n"] }]
|
|
1009
1708
|
}] });
|
|
1010
1709
|
|
|
1011
1710
|
class ListBoxComponent extends SelectorComponent {
|
|
@@ -1019,157 +1718,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
1019
1718
|
</div>`, styles: [":host{position:relative}:host{display:flex;flex-direction:column;background-color:var(--SystemChromeMediumLowColor)}:host .item{display:grid;padding:12px;margin:0}:host:not(.disabled) .item:not(:hover):not(:active):not(.selected){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(--SystemControlHighlightListAccentLow)}:host:not(.disabled) .item:hover:not(:active).selected{background-color:var(--SystemControlHighlightListAccentMedium)}:host:not(.disabled) .item:active.selected{background-color:var(--SystemControlHighlightListAccentHigh)}:host.disabled .item:not(.selected){color:var(--TextFillColorDisabled)}:host.disabled .item.selected{background-color:var(--SubtleFillColorSecondary);color:var(--AccentFillColorDisabled)}\n"] }]
|
|
1020
1719
|
}] });
|
|
1021
1720
|
|
|
1022
|
-
class
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
this.Placement = 'Top';
|
|
1721
|
+
class MenuFlyoutComponent extends FlyoutComponent {
|
|
1722
|
+
get transitionAnimation() {
|
|
1723
|
+
return 'Default';
|
|
1026
1724
|
}
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
case 'Top':
|
|
1032
|
-
case 'Bottom':
|
|
1033
|
-
justifySelf = 'center';
|
|
1034
|
-
break;
|
|
1035
|
-
case 'TopEdgeAlignedLeft':
|
|
1036
|
-
case 'BottomEdgeAlignedLeft':
|
|
1037
|
-
justifySelf = 'left';
|
|
1038
|
-
break;
|
|
1039
|
-
case 'TopEdgeAlignedRight':
|
|
1040
|
-
case 'BottomEdgeAlignedRight':
|
|
1041
|
-
justifySelf = 'right';
|
|
1042
|
-
break;
|
|
1043
|
-
case 'Left':
|
|
1044
|
-
case 'Right':
|
|
1045
|
-
alignSelf = 'center';
|
|
1046
|
-
break;
|
|
1047
|
-
case 'LeftEdgeAlignedTop':
|
|
1048
|
-
case 'RightEdgeAlignedTop':
|
|
1049
|
-
alignSelf = 'flex-start';
|
|
1050
|
-
break;
|
|
1051
|
-
case 'LeftEdgeAlignedBottom':
|
|
1052
|
-
case 'RightEdgeAlignedBottom':
|
|
1053
|
-
alignSelf = 'flex-end';
|
|
1054
|
-
break;
|
|
1055
|
-
}
|
|
1056
|
-
return {
|
|
1057
|
-
'align-self': alignSelf,
|
|
1058
|
-
'justify-self': justifySelf,
|
|
1059
|
-
};
|
|
1725
|
+
OnOverlay(overlay) {
|
|
1726
|
+
if (this._menuClickSubscription)
|
|
1727
|
+
this._menuClickSubscription();
|
|
1728
|
+
this._menuClickSubscription = this._renderer.listen(overlay.overlayElement, 'click', p => this.onMenuClick(p));
|
|
1060
1729
|
}
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1730
|
+
onMenuClick(event) {
|
|
1731
|
+
this.IsOpen = false;
|
|
1732
|
+
event.stopPropagation();
|
|
1733
|
+
}
|
|
1734
|
+
ngOnDestroy() {
|
|
1735
|
+
super.ngOnDestroy();
|
|
1736
|
+
if (this._menuClickSubscription)
|
|
1737
|
+
this._menuClickSubscription();
|
|
1738
|
+
}
|
|
1739
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MenuFlyoutComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1740
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: MenuFlyoutComponent, isStandalone: true, selector: "MenuFlyout", providers: [{ provide: 'xaml-flyout', useExisting: MenuFlyoutComponent }], usesInheritance: true, ngImport: i0, template: "<ng-template #template><FlyoutPresenter #presenter [IsVisible]=\"isVisible\" [TransitionAnimation]=\"transitionAnimation\" [Padding]=\"Padding\"><ng-content/></FlyoutPresenter></ng-template>", isInline: true, styles: [".popup-container{left:0;right:0;top:0}.popup-container>.popup-content{padding:2px}.popup-container>.popup-content>.menu-container{margin:-3px 0;display:table;border-spacing:0 3px}FlyoutPresenter{padding:0 2px;display:table;border-spacing:0 3px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: FlyoutPresenter, selector: "FlyoutPresenter", inputs: ["TransitionAnimation", "Padding", "IsVisible"] }] }); }
|
|
1741
|
+
}
|
|
1742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MenuFlyoutComponent, decorators: [{
|
|
1743
|
+
type: Component,
|
|
1744
|
+
args: [{ selector: 'MenuFlyout', imports: [CommonModule, FlyoutPresenter], template: PopupTemplate, providers: [{ provide: 'xaml-flyout', useExisting: MenuFlyoutComponent }], styles: [".popup-container{left:0;right:0;top:0}.popup-container>.popup-content{padding:2px}.popup-container>.popup-content>.menu-container{margin:-3px 0;display:table;border-spacing:0 3px}FlyoutPresenter{padding:0 2px;display:table;border-spacing:0 3px}\n"] }]
|
|
1745
|
+
}] });
|
|
1746
|
+
|
|
1747
|
+
class ContextFlyoutDirective {
|
|
1748
|
+
constructor(_hostComponent, _viewContainer) {
|
|
1749
|
+
this._hostComponent = _hostComponent;
|
|
1750
|
+
this._viewContainer = _viewContainer;
|
|
1751
|
+
}
|
|
1752
|
+
ngAfterViewInit() {
|
|
1753
|
+
this._flyout = this._viewContainer.injector.get(FlyoutComponent, null) ||
|
|
1754
|
+
this._viewContainer.injector.get(MenuFlyoutComponent, null);
|
|
1755
|
+
if (this._flyout) {
|
|
1756
|
+
this._flyout.Placement = 'BottomEdgeAlignedLeft';
|
|
1082
1757
|
}
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
case 'TopEdgeAlignedRight':
|
|
1087
|
-
bottom = undefined;
|
|
1088
|
-
transform = translate(0, -1, this.IsOpen);
|
|
1089
|
-
break;
|
|
1090
|
-
case 'Bottom':
|
|
1091
|
-
case 'BottomEdgeAlignedLeft':
|
|
1092
|
-
case 'BottomEdgeAlignedRight':
|
|
1093
|
-
top = undefined;
|
|
1094
|
-
transform = translate(0, 1, this.IsOpen);
|
|
1095
|
-
break;
|
|
1096
|
-
case 'Left':
|
|
1097
|
-
case 'LeftEdgeAlignedBottom':
|
|
1098
|
-
case 'LeftEdgeAlignedTop':
|
|
1099
|
-
right = undefined;
|
|
1100
|
-
transform = translate(-1, 0, this.IsOpen);
|
|
1101
|
-
break;
|
|
1102
|
-
case 'Right':
|
|
1103
|
-
case 'RightEdgeAlignedBottom':
|
|
1104
|
-
case 'RightEdgeAlignedTop':
|
|
1105
|
-
left = undefined;
|
|
1106
|
-
transform = translate(1, 0, this.IsOpen);
|
|
1107
|
-
break;
|
|
1758
|
+
let parentElement = this._hostComponent.nativeElement.parentElement;
|
|
1759
|
+
if (parentElement) {
|
|
1760
|
+
parentElement.oncontextmenu = p => this.onContextMenu(p);
|
|
1108
1761
|
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
break;
|
|
1117
|
-
case 'TopEdgeAlignedRight':
|
|
1118
|
-
margin = '0 0 -100vh -100vw';
|
|
1119
|
-
break;
|
|
1120
|
-
case 'Bottom':
|
|
1121
|
-
margin = '-100vh -100vw 0 -100vw';
|
|
1122
|
-
break;
|
|
1123
|
-
case 'BottomEdgeAlignedLeft':
|
|
1124
|
-
margin = '0 -100vw 0 0';
|
|
1125
|
-
break;
|
|
1126
|
-
case 'BottomEdgeAlignedRight':
|
|
1127
|
-
margin = '0 0 0 -100vw';
|
|
1128
|
-
break;
|
|
1129
|
-
case 'Left':
|
|
1130
|
-
margin = '-100vh -100vw -100vh 0';
|
|
1131
|
-
break;
|
|
1132
|
-
case 'LeftEdgeAlignedTop':
|
|
1133
|
-
margin = '0 -100vw -100vh 0';
|
|
1134
|
-
break;
|
|
1135
|
-
case 'LeftEdgeAlignedBottom':
|
|
1136
|
-
margin = '-100vh -100vw 0 0';
|
|
1137
|
-
break;
|
|
1138
|
-
case 'Right':
|
|
1139
|
-
margin = '-100vh 0 -100vh -100vw';
|
|
1140
|
-
break;
|
|
1141
|
-
case 'RightEdgeAlignedTop':
|
|
1142
|
-
margin = '0 0 -100vh -100vw';
|
|
1143
|
-
break;
|
|
1144
|
-
case 'RightEdgeAlignedBottom':
|
|
1145
|
-
margin = '-100vh 0 0 -100vw';
|
|
1146
|
-
break;
|
|
1762
|
+
}
|
|
1763
|
+
onContextMenu(event) {
|
|
1764
|
+
if (!this._flyout)
|
|
1765
|
+
return;
|
|
1766
|
+
if (!this._flyout.IsOpen) {
|
|
1767
|
+
this._flyout.Target = { x: event.clientX, y: event.clientY };
|
|
1768
|
+
this._flyout.IsOpen = true;
|
|
1147
1769
|
}
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
'transform': transform,
|
|
1154
|
-
'margin': margin,
|
|
1155
|
-
'transition': 'transform var(--ControlNormalAnimationDuration)'
|
|
1156
|
-
};
|
|
1770
|
+
else {
|
|
1771
|
+
this._flyout.IsOpen = false;
|
|
1772
|
+
}
|
|
1773
|
+
event.preventDefault();
|
|
1774
|
+
event.stopPropagation();
|
|
1157
1775
|
}
|
|
1158
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1159
|
-
static { this.ɵ
|
|
1160
|
-
<div class="popup-container" [ngStyle]="containerStyle" [ngClass]="containerClass">
|
|
1161
|
-
<div class="popup-content" [ngStyle]="contentStyle" *ngIf="isRendered"><ng-content/></div>
|
|
1162
|
-
</div>`, isInline: true, styles: [":host{position:relative}:host{z-index:900}.popup-container{background-color:transparent;display:grid;padding:0;margin:0;border:0;position:absolute;pointer-events:none;z-index:1000}.popup-container>.popup-content{display:grid;padding:16px;border-width:1px;border-style:solid;border-radius:var(--OverlayCornerRadius);opacity:0;transition:opacity var(--ControlNormalAnimationDuration);-webkit-backdrop-filter:var(--AcrylicBlur);backdrop-filter:var(--AcrylicBlur);box-shadow:0 0 15px #0000001a;border-color:var(--SurfaceStrokeColorFlyout);background-color:var(--AcrylicInAppFillColorDefault)}.popup-container.popup-open>.popup-content{opacity:1;pointer-events:all}.popup-backdrop{position:fixed;inset:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
1776
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ContextFlyoutDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1777
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.6", type: ContextFlyoutDirective, isStandalone: true, selector: "[ContextFlyout]", ngImport: i0 }); }
|
|
1163
1778
|
}
|
|
1164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1165
|
-
type:
|
|
1166
|
-
args: [{
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
}], propDecorators: { Placement: [{
|
|
1171
|
-
type: Input
|
|
1172
|
-
}] } });
|
|
1779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ContextFlyoutDirective, decorators: [{
|
|
1780
|
+
type: Directive,
|
|
1781
|
+
args: [{
|
|
1782
|
+
selector: '[ContextFlyout]'
|
|
1783
|
+
}]
|
|
1784
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }] });
|
|
1173
1785
|
|
|
1174
1786
|
class TextBlockComponent extends FrameworkElementComponent {
|
|
1175
1787
|
constructor() {
|
|
@@ -1332,204 +1944,144 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
1332
1944
|
args: ['style.font-family']
|
|
1333
1945
|
}], FontSize: [{
|
|
1334
1946
|
type: Input
|
|
1335
|
-
}, {
|
|
1336
|
-
type: HostBinding,
|
|
1337
|
-
args: ['style.font-size']
|
|
1338
|
-
}], FontStyle: [{
|
|
1339
|
-
type: Input
|
|
1340
|
-
}, {
|
|
1341
|
-
type: HostBinding,
|
|
1342
|
-
args: ['style.font-style']
|
|
1343
|
-
}], FontWeight: [{
|
|
1344
|
-
type: Input
|
|
1345
|
-
}], Glyph: [{
|
|
1346
|
-
type: Input
|
|
1347
|
-
}], fontWeight: [{
|
|
1348
|
-
type: HostBinding,
|
|
1349
|
-
args: ['style.font-weight']
|
|
1350
|
-
}] } });
|
|
1351
|
-
|
|
1352
|
-
class GridComponent extends PanelComponent {
|
|
1353
|
-
constructor() {
|
|
1354
|
-
super(...arguments);
|
|
1355
|
-
this.Orientation = 'Horizontal';
|
|
1356
|
-
}
|
|
1357
|
-
get gridAutoFlow() {
|
|
1358
|
-
return this.Orientation == 'Horizontal' ? 'row' : 'column';
|
|
1359
|
-
}
|
|
1360
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1361
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: GridComponent, isStandalone: false, selector: "Grid", inputs: { ColumnDefinitions: "ColumnDefinitions", RowDefinitions: "RowDefinitions", ColumnSpacing: "ColumnSpacing", RowSpacing: "RowSpacing", Orientation: "Orientation" }, host: { properties: { "style.grid-template-columns": "this.ColumnDefinitions", "style.grid-template-rows": "this.RowDefinitions", "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"] }); }
|
|
1362
|
-
}
|
|
1363
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridComponent, decorators: [{
|
|
1364
|
-
type: Component,
|
|
1365
|
-
args: [{ selector: 'Grid', template: `<ng-content/>`, standalone: false, styles: [":host{display:grid;position:relative}\n"] }]
|
|
1366
|
-
}], propDecorators: { ColumnDefinitions: [{
|
|
1367
|
-
type: Input
|
|
1368
|
-
}, {
|
|
1369
|
-
type: HostBinding,
|
|
1370
|
-
args: ['style.grid-template-columns']
|
|
1371
|
-
}], RowDefinitions: [{
|
|
1372
|
-
type: Input
|
|
1373
|
-
}, {
|
|
1374
|
-
type: HostBinding,
|
|
1375
|
-
args: ['style.grid-template-rows']
|
|
1376
|
-
}], ColumnSpacing: [{
|
|
1377
|
-
type: Input
|
|
1378
|
-
}, {
|
|
1379
|
-
type: HostBinding,
|
|
1380
|
-
args: ['style.column-gap']
|
|
1381
|
-
}], RowSpacing: [{
|
|
1382
|
-
type: Input
|
|
1383
|
-
}, {
|
|
1384
|
-
type: HostBinding,
|
|
1385
|
-
args: ['style.row-gap']
|
|
1386
|
-
}], Orientation: [{
|
|
1387
|
-
type: Input
|
|
1388
|
-
}], gridAutoFlow: [{
|
|
1389
|
-
type: HostBinding,
|
|
1390
|
-
args: ['style.grid-auto-flow']
|
|
1391
|
-
}] } });
|
|
1392
|
-
class GridProperty {
|
|
1393
|
-
}
|
|
1394
|
-
class GridDirective {
|
|
1395
|
-
constructor() {
|
|
1396
|
-
this.Grid = new GridProperty();
|
|
1397
|
-
}
|
|
1398
|
-
get gridColumnStart() {
|
|
1399
|
-
return this.Grid.Column !== undefined ? this.Grid.Column + 1 : undefined;
|
|
1400
|
-
}
|
|
1401
|
-
get gridRowStart() {
|
|
1402
|
-
return this.Grid.Row !== undefined ? this.Grid.Row + 1 : undefined;
|
|
1403
|
-
}
|
|
1404
|
-
get gridColumnEnd() {
|
|
1405
|
-
return this.Grid.ColumnSpan !== undefined ? ('span ' + this.Grid.ColumnSpan) : undefined;
|
|
1406
|
-
}
|
|
1407
|
-
get gridRowEnd() {
|
|
1408
|
-
return this.Grid.RowSpan !== undefined ? ('span ' + this.Grid.RowSpan) : undefined;
|
|
1409
|
-
}
|
|
1410
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1411
|
-
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 }); }
|
|
1412
|
-
}
|
|
1413
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridDirective, decorators: [{
|
|
1414
|
-
type: Directive,
|
|
1415
|
-
args: [{
|
|
1416
|
-
selector: '[Grid]',
|
|
1417
|
-
standalone: false
|
|
1418
|
-
}]
|
|
1419
|
-
}], propDecorators: { Grid: [{
|
|
1420
|
-
type: Input
|
|
1421
|
-
}], gridColumnStart: [{
|
|
1422
|
-
type: HostBinding,
|
|
1423
|
-
args: ['style.grid-column-start']
|
|
1424
|
-
}], gridRowStart: [{
|
|
1947
|
+
}, {
|
|
1425
1948
|
type: HostBinding,
|
|
1426
|
-
args: ['style.
|
|
1427
|
-
}],
|
|
1949
|
+
args: ['style.font-size']
|
|
1950
|
+
}], FontStyle: [{
|
|
1951
|
+
type: Input
|
|
1952
|
+
}, {
|
|
1428
1953
|
type: HostBinding,
|
|
1429
|
-
args: ['style.
|
|
1430
|
-
}],
|
|
1954
|
+
args: ['style.font-style']
|
|
1955
|
+
}], FontWeight: [{
|
|
1956
|
+
type: Input
|
|
1957
|
+
}], Glyph: [{
|
|
1958
|
+
type: Input
|
|
1959
|
+
}], fontWeight: [{
|
|
1431
1960
|
type: HostBinding,
|
|
1432
|
-
args: ['style.
|
|
1961
|
+
args: ['style.font-weight']
|
|
1433
1962
|
}] } });
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1963
|
+
|
|
1964
|
+
class ImageComponent extends FrameworkElementComponent {
|
|
1965
|
+
constructor() {
|
|
1966
|
+
super(...arguments);
|
|
1967
|
+
this.Stretch = 'Uniform';
|
|
1437
1968
|
}
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
args: [{
|
|
1444
|
-
selector: '[Grid-Row]',
|
|
1445
|
-
standalone: false
|
|
1446
|
-
}]
|
|
1447
|
-
}], propDecorators: { Row: [{
|
|
1448
|
-
type: Input,
|
|
1449
|
-
args: ['Grid-Row']
|
|
1450
|
-
}], gridRowStart: [{
|
|
1451
|
-
type: HostBinding,
|
|
1452
|
-
args: ['style.grid-row-start']
|
|
1453
|
-
}] } });
|
|
1454
|
-
class GridColumnDirective {
|
|
1455
|
-
get gridColumnStart() {
|
|
1456
|
-
return this.Column !== undefined ? parseInt(this.Column) + 1 : undefined;
|
|
1969
|
+
get imageStyle() {
|
|
1970
|
+
return {
|
|
1971
|
+
width: this.Width,
|
|
1972
|
+
height: this.Height
|
|
1973
|
+
};
|
|
1457
1974
|
}
|
|
1458
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1459
|
-
static { this.ɵ
|
|
1975
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ImageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1976
|
+
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"] }] }); }
|
|
1460
1977
|
}
|
|
1461
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1462
|
-
type:
|
|
1463
|
-
args: [{
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
type: Input,
|
|
1469
|
-
args: ['Grid-Column']
|
|
1470
|
-
}], gridColumnStart: [{
|
|
1471
|
-
type: HostBinding,
|
|
1472
|
-
args: ['style.grid-column-start']
|
|
1978
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ImageComponent, decorators: [{
|
|
1979
|
+
type: Component,
|
|
1980
|
+
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"] }]
|
|
1981
|
+
}], propDecorators: { Source: [{
|
|
1982
|
+
type: Input
|
|
1983
|
+
}], Stretch: [{
|
|
1984
|
+
type: Input
|
|
1473
1985
|
}] } });
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1986
|
+
|
|
1987
|
+
class AppBarButtonComponent extends FrameworkElementComponent {
|
|
1988
|
+
constructor() {
|
|
1989
|
+
super(...arguments);
|
|
1990
|
+
this.IsEnabled = true;
|
|
1991
|
+
this.Click = new EventEmitter();
|
|
1477
1992
|
}
|
|
1478
|
-
|
|
1479
|
-
|
|
1993
|
+
get disabled() {
|
|
1994
|
+
return !this.IsEnabled;
|
|
1995
|
+
}
|
|
1996
|
+
onHostPointerEvent(event) {
|
|
1997
|
+
if (!this.IsEnabled)
|
|
1998
|
+
return;
|
|
1999
|
+
this.Click.emit(event);
|
|
2000
|
+
this._flyout?.Show();
|
|
2001
|
+
}
|
|
2002
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AppBarButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2003
|
+
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}}</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(--TextFillColorPrimary)}:host:hover{background-color:var(--SubtleFillColorSecondary)}:host:hover *{color:var(--TextFillColorPrimary)}: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)}\n"] }); }
|
|
1480
2004
|
}
|
|
1481
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1482
|
-
type:
|
|
1483
|
-
args: [{
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
}],
|
|
2005
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AppBarButtonComponent, decorators: [{
|
|
2006
|
+
type: Component,
|
|
2007
|
+
args: [{ selector: 'AppBarButton', template: `<div class="icon">{{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(--TextFillColorPrimary)}:host:hover{background-color:var(--SubtleFillColorSecondary)}:host:hover *{color:var(--TextFillColorPrimary)}: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)}\n"] }]
|
|
2008
|
+
}], propDecorators: { IsEnabled: [{
|
|
2009
|
+
type: Input
|
|
2010
|
+
}], Text: [{
|
|
2011
|
+
type: Input
|
|
2012
|
+
}], Icon: [{
|
|
2013
|
+
type: Input
|
|
2014
|
+
}], Click: [{
|
|
2015
|
+
type: Output
|
|
2016
|
+
}], disabled: [{
|
|
1491
2017
|
type: HostBinding,
|
|
1492
|
-
args: ['
|
|
2018
|
+
args: ['class.disabled']
|
|
2019
|
+
}], _flyout: [{
|
|
2020
|
+
type: ContentChild,
|
|
2021
|
+
args: ['xaml-flyout']
|
|
2022
|
+
}], onHostPointerEvent: [{
|
|
2023
|
+
type: HostListener,
|
|
2024
|
+
args: ['click', ['$event']]
|
|
1493
2025
|
}] } });
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
2026
|
+
|
|
2027
|
+
class CommandBarComponent extends FrameworkElementComponent {
|
|
2028
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CommandBarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2029
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: CommandBarComponent, isStandalone: true, selector: "CommandBar", usesInheritance: true, ngImport: i0, template: `<ng-content/>`, isInline: true, styles: [":host{display:flex;flex-direction:row;align-items:stretch;justify-content:flex-start;padding:3px;gap:3px}\n"] }); }
|
|
2030
|
+
}
|
|
2031
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CommandBarComponent, decorators: [{
|
|
2032
|
+
type: Component,
|
|
2033
|
+
args: [{ selector: 'CommandBar', template: `<ng-content/>`, styles: [":host{display:flex;flex-direction:row;align-items:stretch;justify-content:flex-start;padding:3px;gap:3px}\n"] }]
|
|
2034
|
+
}] });
|
|
2035
|
+
|
|
2036
|
+
class MenuFlyoutItemBase {
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
class MenuFlyoutItemComponent extends MenuFlyoutItemBase {
|
|
2040
|
+
constructor() {
|
|
2041
|
+
super(...arguments);
|
|
2042
|
+
this.IsEnabled = true;
|
|
2043
|
+
this.Text = '';
|
|
2044
|
+
this.Click = new EventEmitter();
|
|
1497
2045
|
}
|
|
1498
|
-
|
|
1499
|
-
|
|
2046
|
+
get disabled() {
|
|
2047
|
+
return !this.IsEnabled;
|
|
2048
|
+
}
|
|
2049
|
+
onClick() {
|
|
2050
|
+
this.Click.emit();
|
|
2051
|
+
}
|
|
2052
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MenuFlyoutItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2053
|
+
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}}</div>
|
|
2054
|
+
<div class="text">{{Text}}</div>
|
|
2055
|
+
<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:3px 6px;border-radius:var(--ControlCornerRadius) 0 0 var(--ControlCornerRadius);font-family:var(--SymbolFontFamily)}.text{display:table-cell;padding:3px;margin:6px 0;white-space:nowrap}.submenu-indicator{display:table-cell;padding:3px 6px;border-radius:0 var(--ControlCornerRadius) var(--ControlCornerRadius) 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
1500
2056
|
}
|
|
1501
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1502
|
-
type:
|
|
1503
|
-
args: [{
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
}],
|
|
2057
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MenuFlyoutItemComponent, decorators: [{
|
|
2058
|
+
type: Component,
|
|
2059
|
+
args: [{ selector: 'MenuFlyoutItem', imports: [CommonModule], template: `<div class="icon">{{Icon}}</div>
|
|
2060
|
+
<div class="text">{{Text}}</div>
|
|
2061
|
+
<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:3px 6px;border-radius:var(--ControlCornerRadius) 0 0 var(--ControlCornerRadius);font-family:var(--SymbolFontFamily)}.text{display:table-cell;padding:3px;margin:6px 0;white-space:nowrap}.submenu-indicator{display:table-cell;padding:3px 6px;border-radius:0 var(--ControlCornerRadius) var(--ControlCornerRadius) 0}\n"] }]
|
|
2062
|
+
}], propDecorators: { IsEnabled: [{
|
|
2063
|
+
type: Input
|
|
2064
|
+
}], Text: [{
|
|
2065
|
+
type: Input
|
|
2066
|
+
}], Icon: [{
|
|
2067
|
+
type: Input
|
|
2068
|
+
}], Click: [{
|
|
2069
|
+
type: Output
|
|
2070
|
+
}], disabled: [{
|
|
1511
2071
|
type: HostBinding,
|
|
1512
|
-
args: ['
|
|
2072
|
+
args: ['class.disabled']
|
|
2073
|
+
}], onClick: [{
|
|
2074
|
+
type: HostListener,
|
|
2075
|
+
args: ['click', []]
|
|
1513
2076
|
}] } });
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
GridRowSpanDirective,
|
|
1519
|
-
GridColumnDirective,
|
|
1520
|
-
GridColumnSpanDirective
|
|
1521
|
-
];
|
|
1522
|
-
class GridModule {
|
|
1523
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1524
|
-
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] }); }
|
|
1525
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GridModule }); }
|
|
2077
|
+
|
|
2078
|
+
class MenuFlyoutSeparator extends MenuFlyoutItemBase {
|
|
2079
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MenuFlyoutSeparator, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2080
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: MenuFlyoutSeparator, isStandalone: true, selector: "MenuFlyoutSeparator", usesInheritance: true, ngImport: i0, template: `<div class="separator"></div>`, isInline: true, styles: [":host{position:relative}:host{display:table-row;position:relative}:host>.separator{position:absolute;display:block;inset:-.5px -2px;background-color:var(--DividerStrokeColorDefault)}\n"] }); }
|
|
1526
2081
|
}
|
|
1527
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type:
|
|
1528
|
-
type:
|
|
1529
|
-
args: [{
|
|
1530
|
-
declarations: GridComponents,
|
|
1531
|
-
exports: GridComponents
|
|
1532
|
-
}]
|
|
2082
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MenuFlyoutSeparator, decorators: [{
|
|
2083
|
+
type: Component,
|
|
2084
|
+
args: [{ selector: 'MenuFlyoutSeparator', template: `<div class="separator"></div>`, styles: [":host{position:relative}:host{display:table-row;position:relative}:host>.separator{position:absolute;display:block;inset:-.5px -2px;background-color:var(--DividerStrokeColorDefault)}\n"] }]
|
|
1533
2085
|
}] });
|
|
1534
2086
|
|
|
1535
2087
|
class ToolTipDirective {
|
|
@@ -1562,15 +2114,201 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
1562
2114
|
}]
|
|
1563
2115
|
}] });
|
|
1564
2116
|
|
|
2117
|
+
class NumberBoxComponent extends FrameworkElementComponent {
|
|
2118
|
+
get Text() {
|
|
2119
|
+
return this._text;
|
|
2120
|
+
}
|
|
2121
|
+
get Value() {
|
|
2122
|
+
return this._value;
|
|
2123
|
+
}
|
|
2124
|
+
set Value(value) {
|
|
2125
|
+
this.setValue(value);
|
|
2126
|
+
this.updateText();
|
|
2127
|
+
}
|
|
2128
|
+
setValue(value) {
|
|
2129
|
+
value = this.clampValue(value);
|
|
2130
|
+
if (value == this.Value)
|
|
2131
|
+
return;
|
|
2132
|
+
this._value = value;
|
|
2133
|
+
this.ValueChange.emit(value);
|
|
2134
|
+
}
|
|
2135
|
+
constructor() {
|
|
2136
|
+
super();
|
|
2137
|
+
this.IsEnabled = true;
|
|
2138
|
+
this.PlaceholderText = '';
|
|
2139
|
+
this.IsPlaceholderEditable = false;
|
|
2140
|
+
this.TextAlignment = 'Left';
|
|
2141
|
+
this.InputMode = 'Float';
|
|
2142
|
+
this.Minimum = -Infinity;
|
|
2143
|
+
this.Maximum = Infinity;
|
|
2144
|
+
this.SmallChange = 1;
|
|
2145
|
+
this.LargeChange = 10;
|
|
2146
|
+
this.NumberFormatter = (value) => value.toString();
|
|
2147
|
+
this.ValueChange = new EventEmitter();
|
|
2148
|
+
this._text = '';
|
|
2149
|
+
this._value = NaN;
|
|
2150
|
+
this.TextAlignment = 'Right';
|
|
2151
|
+
}
|
|
2152
|
+
onChange() {
|
|
2153
|
+
this._text = this._input.nativeElement.value;
|
|
2154
|
+
let value;
|
|
2155
|
+
switch (this.InputMode) {
|
|
2156
|
+
case 'Float':
|
|
2157
|
+
value = parseFloat(this._text);
|
|
2158
|
+
break;
|
|
2159
|
+
case 'Integer':
|
|
2160
|
+
value = parseInt(this._text);
|
|
2161
|
+
break;
|
|
2162
|
+
}
|
|
2163
|
+
this.setValue(value);
|
|
2164
|
+
}
|
|
2165
|
+
clampValue(value) {
|
|
2166
|
+
if (!Number.isNaN(value)) {
|
|
2167
|
+
if (this.Minimum !== undefined && value < this.Minimum)
|
|
2168
|
+
value = this.Minimum;
|
|
2169
|
+
if (this.Maximum !== undefined && value > this.Maximum)
|
|
2170
|
+
value = this.Maximum;
|
|
2171
|
+
}
|
|
2172
|
+
return value;
|
|
2173
|
+
}
|
|
2174
|
+
onIncreaseClick() {
|
|
2175
|
+
this.Value += this.SmallChange;
|
|
2176
|
+
}
|
|
2177
|
+
onDecreaseClick() {
|
|
2178
|
+
this.Value -= this.SmallChange;
|
|
2179
|
+
}
|
|
2180
|
+
onButtonPress() {
|
|
2181
|
+
this._input.nativeElement.focus();
|
|
2182
|
+
setTimeout(() => this.cancelFlyoutDismiss(), 0);
|
|
2183
|
+
}
|
|
2184
|
+
cancelFlyoutDismiss() {
|
|
2185
|
+
if (this._blurTimeout) {
|
|
2186
|
+
clearTimeout(this._blurTimeout);
|
|
2187
|
+
this._blurTimeout = undefined;
|
|
2188
|
+
}
|
|
2189
|
+
}
|
|
2190
|
+
scheduleFlyoutDismiss() {
|
|
2191
|
+
this.cancelFlyoutDismiss();
|
|
2192
|
+
this._blurTimeout = setTimeout(() => {
|
|
2193
|
+
this._flyout.Hide();
|
|
2194
|
+
}, 0);
|
|
2195
|
+
}
|
|
2196
|
+
onBlur() {
|
|
2197
|
+
this.updateText();
|
|
2198
|
+
this._input.nativeElement.value = this._text;
|
|
2199
|
+
if (this.IsPlaceholderEditable && this._input.nativeElement.value === this.PlaceholderText) {
|
|
2200
|
+
this._input.nativeElement.value = '';
|
|
2201
|
+
this.onChange();
|
|
2202
|
+
}
|
|
2203
|
+
this.scheduleFlyoutDismiss();
|
|
2204
|
+
}
|
|
2205
|
+
onKeyDown(event) {
|
|
2206
|
+
switch (event.key) {
|
|
2207
|
+
case 'ArrowUp':
|
|
2208
|
+
this.Value += this.SmallChange;
|
|
2209
|
+
break;
|
|
2210
|
+
case 'ArrowDown':
|
|
2211
|
+
this.Value -= this.SmallChange;
|
|
2212
|
+
break;
|
|
2213
|
+
case 'PageUp':
|
|
2214
|
+
this.Value += this.LargeChange;
|
|
2215
|
+
break;
|
|
2216
|
+
case 'PageDown':
|
|
2217
|
+
this.Value -= this.LargeChange;
|
|
2218
|
+
break;
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
onClick() {
|
|
2222
|
+
this._input.nativeElement.focus();
|
|
2223
|
+
}
|
|
2224
|
+
onFocusIn() {
|
|
2225
|
+
if (this.IsPlaceholderEditable && Number.isNaN(this.Value)) {
|
|
2226
|
+
this._input.nativeElement.value = this.PlaceholderText;
|
|
2227
|
+
this.onChange();
|
|
2228
|
+
}
|
|
2229
|
+
this._flyout.Show();
|
|
2230
|
+
this._input.nativeElement.select();
|
|
2231
|
+
}
|
|
2232
|
+
updateText() {
|
|
2233
|
+
this._text = Number.isNaN(this.Value) ? '' : this.NumberFormatter(this.Value);
|
|
2234
|
+
}
|
|
2235
|
+
onContextMenu(event) {
|
|
2236
|
+
event.stopPropagation();
|
|
2237
|
+
}
|
|
2238
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NumberBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2239
|
+
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", NumberFormatter: "NumberFormatter", Unit: "Unit", Value: "Value" }, outputs: { ValueChange: "ValueChange" }, host: { listeners: { "click": "onClick()", "focusin": "onFocusIn()", "contextmenu": "onContextMenu($event)" } }, viewQueries: [{ propertyName: "_input", first: true, predicate: ["input"], descendants: true }, { propertyName: "_flyout", first: true, predicate: ["flyout"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<label>
|
|
2240
|
+
<div class="icon"></div>
|
|
2241
|
+
<input #input type="text" [disabled]="!IsEnabled" [value]="Text" (change)="onChange()" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}" (blur)="onBlur()" (keydown)="onKeyDown($event)"/>
|
|
2242
|
+
<Flyout #flyout Padding="2px" Placement="Left" [HasBackdrop]="false">
|
|
2243
|
+
<RepeatButton Class="InlineButtonStyle" (Click)="onIncreaseClick()" [Delay]="500" [Interval]="50" (pointerdown)="onButtonPress()" (pointerup)="onButtonPress()"><FontIcon Glyph=""/></RepeatButton>
|
|
2244
|
+
<RepeatButton Class="InlineButtonStyle" (Click)="onDecreaseClick()" [Delay]="500" [Interval]="50" (pointerdown)="onButtonPress()" (pointerup)="onButtonPress()"><FontIcon Glyph=""/></RepeatButton>
|
|
2245
|
+
</Flyout>
|
|
2246
|
+
<div class="unit" *ngIf="Unit !== undefined">{{Unit}}</div>
|
|
2247
|
+
</label>`, isInline: true, styles: [":host{position:relative}:host{display:grid;cursor:text;outline-style:none;border-style:solid;border-width:1px;border-radius:var(--ControlCornerRadius);padding:6px;background-color:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);border-bottom-color:var(--ControlStrongStrokeColorDefault)}:host:hover{background-color:var(--ControlFillColorSecondary)}:host:focus-within,:host:active{background-color:var(--ControlFillColorInputActive);border-bottom-color:var(--AccentFillColorDefault)}:host.disabled{background-color:var(--ControlFillColorDisabled);border-bottom-color:var(--ControlStrokeColorDefault)}textarea{resize:none}input,textarea{background-color:transparent;border:0 none transparent;outline:0 none transparent;color:var(--TextFillColorPrimary)}input::placeholder,textarea::placeholder{color:var(--TextFillColorSecondary)}input:disabled,textarea:disabled{color:var(--TextFillColorDisabled)}::selection{background-color:var(--SystemAccentColor)}\n", "label{display:grid;position:relative;grid-template-columns:auto 1fr auto auto}.icon{align-self:center;font-family:var(--SymbolFontFamily);color:var(--TextFillColorSecondary);pointer-events:none}.unit{align-self:center;color:var(--TextFillColorSecondary);pointer-events:none}.InlineButtonStyle{padding:5px}input:focus+.popup,input:active+.popup{display:flex}\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", "FontWeight", "Glyph"] }, { kind: "component", type: FlyoutComponent, selector: "Flyout" }] }); }
|
|
2248
|
+
}
|
|
2249
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NumberBoxComponent, decorators: [{
|
|
2250
|
+
type: Component,
|
|
2251
|
+
args: [{ selector: 'NumberBox', template: `<label>
|
|
2252
|
+
<div class="icon"></div>
|
|
2253
|
+
<input #input type="text" [disabled]="!IsEnabled" [value]="Text" (change)="onChange()" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}" (blur)="onBlur()" (keydown)="onKeyDown($event)"/>
|
|
2254
|
+
<Flyout #flyout Padding="2px" Placement="Left" [HasBackdrop]="false">
|
|
2255
|
+
<RepeatButton Class="InlineButtonStyle" (Click)="onIncreaseClick()" [Delay]="500" [Interval]="50" (pointerdown)="onButtonPress()" (pointerup)="onButtonPress()"><FontIcon Glyph=""/></RepeatButton>
|
|
2256
|
+
<RepeatButton Class="InlineButtonStyle" (Click)="onDecreaseClick()" [Delay]="500" [Interval]="50" (pointerdown)="onButtonPress()" (pointerup)="onButtonPress()"><FontIcon Glyph=""/></RepeatButton>
|
|
2257
|
+
</Flyout>
|
|
2258
|
+
<div class="unit" *ngIf="Unit !== undefined">{{Unit}}</div>
|
|
2259
|
+
</label>`, imports: [CommonModule, RepeatButtonComponent, FontIconComponent, FlyoutComponent], styles: [":host{position:relative}:host{display:grid;cursor:text;outline-style:none;border-style:solid;border-width:1px;border-radius:var(--ControlCornerRadius);padding:6px;background-color:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);border-bottom-color:var(--ControlStrongStrokeColorDefault)}:host:hover{background-color:var(--ControlFillColorSecondary)}:host:focus-within,:host:active{background-color:var(--ControlFillColorInputActive);border-bottom-color:var(--AccentFillColorDefault)}:host.disabled{background-color:var(--ControlFillColorDisabled);border-bottom-color:var(--ControlStrokeColorDefault)}textarea{resize:none}input,textarea{background-color:transparent;border:0 none transparent;outline:0 none transparent;color:var(--TextFillColorPrimary)}input::placeholder,textarea::placeholder{color:var(--TextFillColorSecondary)}input:disabled,textarea:disabled{color:var(--TextFillColorDisabled)}::selection{background-color:var(--SystemAccentColor)}\n", "label{display:grid;position:relative;grid-template-columns:auto 1fr auto auto}.icon{align-self:center;font-family:var(--SymbolFontFamily);color:var(--TextFillColorSecondary);pointer-events:none}.unit{align-self:center;color:var(--TextFillColorSecondary);pointer-events:none}.InlineButtonStyle{padding:5px}input:focus+.popup,input:active+.popup{display:flex}\n"] }]
|
|
2260
|
+
}], ctorParameters: () => [], propDecorators: { IsEnabled: [{
|
|
2261
|
+
type: Input
|
|
2262
|
+
}], PlaceholderText: [{
|
|
2263
|
+
type: Input
|
|
2264
|
+
}], IsPlaceholderEditable: [{
|
|
2265
|
+
type: Input
|
|
2266
|
+
}], TextAlignment: [{
|
|
2267
|
+
type: Input
|
|
2268
|
+
}], InputMode: [{
|
|
2269
|
+
type: Input
|
|
2270
|
+
}], Minimum: [{
|
|
2271
|
+
type: Input
|
|
2272
|
+
}], Maximum: [{
|
|
2273
|
+
type: Input
|
|
2274
|
+
}], SmallChange: [{
|
|
2275
|
+
type: Input
|
|
2276
|
+
}], LargeChange: [{
|
|
2277
|
+
type: Input
|
|
2278
|
+
}], NumberFormatter: [{
|
|
2279
|
+
type: Input
|
|
2280
|
+
}], Unit: [{
|
|
2281
|
+
type: Input
|
|
2282
|
+
}], ValueChange: [{
|
|
2283
|
+
type: Output
|
|
2284
|
+
}], _input: [{
|
|
2285
|
+
type: ViewChild,
|
|
2286
|
+
args: ['input']
|
|
2287
|
+
}], _flyout: [{
|
|
2288
|
+
type: ViewChild,
|
|
2289
|
+
args: ['flyout']
|
|
2290
|
+
}], Value: [{
|
|
2291
|
+
type: Input
|
|
2292
|
+
}], onClick: [{
|
|
2293
|
+
type: HostListener,
|
|
2294
|
+
args: ['click', []]
|
|
2295
|
+
}], onFocusIn: [{
|
|
2296
|
+
type: HostListener,
|
|
2297
|
+
args: ['focusin', []]
|
|
2298
|
+
}], onContextMenu: [{
|
|
2299
|
+
type: HostListener,
|
|
2300
|
+
args: ['contextmenu', ['$event']]
|
|
2301
|
+
}] } });
|
|
2302
|
+
|
|
1565
2303
|
class TextBoxComponent extends FrameworkElementComponent {
|
|
1566
2304
|
constructor() {
|
|
1567
2305
|
super(...arguments);
|
|
1568
2306
|
this.IsEnabled = true;
|
|
1569
2307
|
this.PlaceholderText = '';
|
|
1570
|
-
this.TextChange = new EventEmitter();
|
|
1571
2308
|
this.TextAlignment = 'Left';
|
|
1572
2309
|
this.TextWrapping = 'NoWrap';
|
|
1573
2310
|
this._text = '';
|
|
2311
|
+
this.TextChange = new EventEmitter();
|
|
1574
2312
|
}
|
|
1575
2313
|
get Text() {
|
|
1576
2314
|
return this._text;
|
|
@@ -1581,32 +2319,52 @@ class TextBoxComponent extends FrameworkElementComponent {
|
|
|
1581
2319
|
this._text = value;
|
|
1582
2320
|
this.TextChange.emit(value);
|
|
1583
2321
|
}
|
|
1584
|
-
|
|
2322
|
+
onInput(event) {
|
|
1585
2323
|
this.Text = (event.target).value;
|
|
1586
2324
|
}
|
|
2325
|
+
get disabled() {
|
|
2326
|
+
return !this.IsEnabled;
|
|
2327
|
+
}
|
|
2328
|
+
onClick() {
|
|
2329
|
+
this._input.nativeElement.focus();
|
|
2330
|
+
}
|
|
1587
2331
|
onContextMenu(event) {
|
|
1588
2332
|
event.stopPropagation();
|
|
1589
2333
|
}
|
|
2334
|
+
Focus() {
|
|
2335
|
+
setTimeout(() => {
|
|
2336
|
+
this._input.nativeElement.focus();
|
|
2337
|
+
}, 0);
|
|
2338
|
+
}
|
|
1590
2339
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TextBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1591
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: TextBoxComponent, isStandalone: true, selector: "TextBox", inputs: { IsEnabled: "IsEnabled", PlaceholderText: "PlaceholderText", TextAlignment: "TextAlignment", TextWrapping: "TextWrapping", Text: "Text" }, outputs: { TextChange: "TextChange" }, host: { listeners: { "contextmenu": "onContextMenu($event)" } }, usesInheritance: true, ngImport: i0, template: `<input *ngIf="TextWrapping === 'NoWrap'" type="text" [disabled]="!IsEnabled" [value]="Text" (
|
|
1592
|
-
<textarea *ngIf="TextWrapping === 'Wrap'" [disabled]="!IsEnabled" [value]="Text" (change)="
|
|
2340
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: TextBoxComponent, isStandalone: true, selector: "TextBox", inputs: { IsEnabled: "IsEnabled", PlaceholderText: "PlaceholderText", TextAlignment: "TextAlignment", TextWrapping: "TextWrapping", Text: "Text" }, outputs: { TextChange: "TextChange" }, host: { listeners: { "click": "onClick()", "contextmenu": "onContextMenu($event)" }, properties: { "class.disabled": "this.disabled" } }, viewQueries: [{ propertyName: "_input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<input #input *ngIf="TextWrapping === 'NoWrap'" type="text" [disabled]="!IsEnabled" [value]="Text" (input)="onInput($event)" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}"/>
|
|
2341
|
+
<textarea *ngIf="TextWrapping === 'Wrap'" [disabled]="!IsEnabled" [value]="Text" (change)="onInput($event)" [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:1px;border-radius:var(--ControlCornerRadius);padding:6px;background-color:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);border-bottom-color:var(--ControlStrongStrokeColorDefault)}:host:hover{background-color:var(--ControlFillColorSecondary)}:host:focus-within,:host:active{background-color:var(--ControlFillColorInputActive);border-bottom-color:var(--AccentFillColorDefault)}:host.disabled{background-color:var(--ControlFillColorDisabled);border-bottom-color:var(--ControlStrokeColorDefault)}textarea{resize:none}input,textarea{background-color:transparent;border:0 none transparent;outline:0 none transparent;color:var(--TextFillColorPrimary)}input::placeholder,textarea::placeholder{color:var(--TextFillColorSecondary)}input:disabled,textarea:disabled{color:var(--TextFillColorDisabled)}::selection{background-color:var(--SystemAccentColor)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
1593
2342
|
}
|
|
1594
2343
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TextBoxComponent, decorators: [{
|
|
1595
2344
|
type: Component,
|
|
1596
|
-
args: [{ selector: 'TextBox', imports: [CommonModule], template: `<input *ngIf="TextWrapping === 'NoWrap'" type="text" [disabled]="!IsEnabled" [value]="Text" (
|
|
1597
|
-
<textarea *ngIf="TextWrapping === 'Wrap'" [disabled]="!IsEnabled" [value]="Text" (change)="
|
|
2345
|
+
args: [{ selector: 'TextBox', imports: [CommonModule], template: `<input #input *ngIf="TextWrapping === 'NoWrap'" type="text" [disabled]="!IsEnabled" [value]="Text" (input)="onInput($event)" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}"/>
|
|
2346
|
+
<textarea *ngIf="TextWrapping === 'Wrap'" [disabled]="!IsEnabled" [value]="Text" (change)="onInput($event)" [placeholder]="PlaceholderText" [style]="{'text-align': TextAlignment}"></textarea>`, styles: [":host{position:relative}:host{display:grid;cursor:text;outline-style:none;border-style:solid;border-width:1px;border-radius:var(--ControlCornerRadius);padding:6px;background-color:var(--ControlFillColorDefault);border-color:var(--ControlStrokeColorDefault);border-bottom-color:var(--ControlStrongStrokeColorDefault)}:host:hover{background-color:var(--ControlFillColorSecondary)}:host:focus-within,:host:active{background-color:var(--ControlFillColorInputActive);border-bottom-color:var(--AccentFillColorDefault)}:host.disabled{background-color:var(--ControlFillColorDisabled);border-bottom-color:var(--ControlStrokeColorDefault)}textarea{resize:none}input,textarea{background-color:transparent;border:0 none transparent;outline:0 none transparent;color:var(--TextFillColorPrimary)}input::placeholder,textarea::placeholder{color:var(--TextFillColorSecondary)}input:disabled,textarea:disabled{color:var(--TextFillColorDisabled)}::selection{background-color:var(--SystemAccentColor)}\n"] }]
|
|
1598
2347
|
}], propDecorators: { IsEnabled: [{
|
|
1599
2348
|
type: Input
|
|
1600
2349
|
}], PlaceholderText: [{
|
|
1601
2350
|
type: Input
|
|
1602
|
-
}], TextChange: [{
|
|
1603
|
-
type: Output
|
|
1604
2351
|
}], TextAlignment: [{
|
|
1605
2352
|
type: Input
|
|
1606
2353
|
}], TextWrapping: [{
|
|
1607
2354
|
type: Input
|
|
2355
|
+
}], _input: [{
|
|
2356
|
+
type: ViewChild,
|
|
2357
|
+
args: ['input']
|
|
1608
2358
|
}], Text: [{
|
|
1609
2359
|
type: Input
|
|
2360
|
+
}], TextChange: [{
|
|
2361
|
+
type: Output
|
|
2362
|
+
}], disabled: [{
|
|
2363
|
+
type: HostBinding,
|
|
2364
|
+
args: ['class.disabled']
|
|
2365
|
+
}], onClick: [{
|
|
2366
|
+
type: HostListener,
|
|
2367
|
+
args: ['click', []]
|
|
1610
2368
|
}], onContextMenu: [{
|
|
1611
2369
|
type: HostListener,
|
|
1612
2370
|
args: ['contextmenu', ['$event']]
|
|
@@ -1617,11 +2375,11 @@ class XamlRootComponent {
|
|
|
1617
2375
|
event.preventDefault();
|
|
1618
2376
|
}
|
|
1619
2377
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: XamlRootComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1620
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: XamlRootComponent, isStandalone: true, selector: "XamlRoot", host: { listeners: { "contextmenu": "onContextMenu($event)" } }, ngImport: i0, template: `<ng-content/>`, isInline: true, styles: [":host{display:grid;
|
|
2378
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: XamlRootComponent, isStandalone: true, selector: "XamlRoot", host: { listeners: { "contextmenu": "onContextMenu($event)" } }, ngImport: i0, template: `<ng-content/>`, isInline: true, styles: [":host{display:grid;overflow:hidden;-webkit-user-select:none;user-select:none;background-color:#f3f3f3}@media (prefers-color-scheme: dark){:host{background-color:#202020}}\n"] }); }
|
|
1621
2379
|
}
|
|
1622
2380
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: XamlRootComponent, decorators: [{
|
|
1623
2381
|
type: Component,
|
|
1624
|
-
args: [{ selector: 'XamlRoot', template: `<ng-content/>`, styles: [":host{display:grid;
|
|
2382
|
+
args: [{ selector: 'XamlRoot', template: `<ng-content/>`, styles: [":host{display:grid;overflow:hidden;-webkit-user-select:none;user-select:none;background-color:#f3f3f3}@media (prefers-color-scheme: dark){:host{background-color:#202020}}\n"] }]
|
|
1625
2383
|
}], propDecorators: { onContextMenu: [{
|
|
1626
2384
|
type: HostListener,
|
|
1627
2385
|
args: ['contextmenu', ['$event']]
|
|
@@ -1636,5 +2394,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
1636
2394
|
* Generated bundle index. Do not edit.
|
|
1637
2395
|
*/
|
|
1638
2396
|
|
|
1639
|
-
export { BorderComponent, ButtonComponent, CheckBoxComponent, ComboBoxComponent, DropDownButtonComponent, FlyoutComponent, FontIconComponent, FrameworkElementComponent, GridColumnDirective, GridColumnSpanDirective, GridComponent, GridDirective, GridModule, GridProperty, GridRowDirective, GridRowSpanDirective, ListBoxComponent, ListViewComponent, PanelComponent,
|
|
2397
|
+
export { AppBarButtonComponent, BorderComponent, ButtonComponent, CheckBoxComponent, ColorPickerComponent, ComboBoxComponent, CommandBarComponent, ContextFlyoutDirective, DropDownButtonComponent, FlyoutBaseComponent, FlyoutComponent, FlyoutPresenter, FontIconComponent, FrameworkElementComponent, GridColumnDirective, GridColumnSpanDirective, GridComponent, GridDirective, GridModule, GridProperty, GridRowDirective, GridRowSpanDirective, ImageComponent, ListBoxComponent, ListViewComponent, MenuFlyoutComponent, MenuFlyoutItemBase, MenuFlyoutItemComponent, MenuFlyoutSeparator, NumberBoxComponent, PanelComponent, PopupTemplate, RadioButtonComponent, RadioButtonGroup, RepeatButtonComponent, ScrollBarComponent, ScrollViewerComponent, SelectorComponent, SelectorItemTemplate, SliderComponent, SplitButtonComponent, StackPanelComponent, TextBlockComponent, TextBoxComponent, ToggleButtonComponent, ToggleSwitchComponent, ToolTipDirective, ToolTipServiceModule, XamlRootComponent, colorToRgb, colorToString, rgbToHsl, stringToColor, toAlignment, toJustification };
|
|
1640
2398
|
//# sourceMappingURL=xaml-ui.mjs.map
|