xaml-ui 1.0.12 → 1.0.13

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.
@@ -1921,6 +1921,157 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
1921
1921
  args: ['xaml-dialog-presenter']
1922
1922
  }] } });
1923
1923
 
1924
+ class TextBlockComponent extends FrameworkElementComponent {
1925
+ constructor() {
1926
+ super(...arguments);
1927
+ this.FontWeight = 'Normal';
1928
+ this.TextAlignment = 'Left';
1929
+ this.TextTrimming = 'None';
1930
+ this.TextWrapping = 'NoWrap';
1931
+ }
1932
+ get width() {
1933
+ if (this.Width !== undefined)
1934
+ return this.Width;
1935
+ return this.HorizontalAlignment === 'Stretch' || this.TextTrimming !== 'None' ? undefined : 'min-content';
1936
+ }
1937
+ get minWidth() {
1938
+ if (this.MinWidth !== undefined)
1939
+ return this.MinWidth;
1940
+ return this.MaxWidth === undefined && this.HorizontalAlignment === 'Stretch' && this.TextTrimming === 'None' ? 'min-content' : undefined;
1941
+ }
1942
+ get fontWeight() {
1943
+ return TextBlockComponent.ToFontWeight(this.FontWeight);
1944
+ }
1945
+ static ToFontWeight(value) {
1946
+ switch (value) {
1947
+ case 'Black':
1948
+ return 900;
1949
+ case 'Bold':
1950
+ return 700;
1951
+ case 'ExtraBlack':
1952
+ return 950;
1953
+ case 'ExtraBold':
1954
+ return 800;
1955
+ case 'ExtraLight':
1956
+ return 200;
1957
+ case 'Light':
1958
+ return 300;
1959
+ case 'Medium':
1960
+ return 500;
1961
+ case 'Normal':
1962
+ return 400;
1963
+ case 'SemiBold':
1964
+ return 600;
1965
+ case 'SemiLight':
1966
+ return 350;
1967
+ case 'Thin':
1968
+ return 100;
1969
+ }
1970
+ }
1971
+ get userSelect() {
1972
+ return this.IsTextSelectionEnabled === 'True' ? 'text' : 'none';
1973
+ }
1974
+ get textDecorationLine() {
1975
+ switch (this.TextDecorations) {
1976
+ case 'None':
1977
+ return 'none';
1978
+ case 'Strikethrough':
1979
+ return 'line-through';
1980
+ case 'Underline':
1981
+ return 'underline';
1982
+ default:
1983
+ return undefined;
1984
+ }
1985
+ }
1986
+ get textOverflow() {
1987
+ switch (this.TextTrimming) {
1988
+ case 'None':
1989
+ case 'Clip':
1990
+ return 'clip';
1991
+ case 'CharacterEllipsis':
1992
+ return 'Ellipsis';
1993
+ default:
1994
+ return undefined;
1995
+ }
1996
+ }
1997
+ get whiteSpace() {
1998
+ switch (this.TextWrapping) {
1999
+ case 'NoWrap':
2000
+ return 'nowrap';
2001
+ case 'Wrap':
2002
+ return 'pre-line';
2003
+ }
2004
+ }
2005
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TextBlockComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2006
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: TextBlockComponent, isStandalone: true, selector: "TextBlock", inputs: { FontFamily: "FontFamily", Text: "Text", FontSize: "FontSize", FontStyle: "FontStyle", FontWeight: "FontWeight", Foreground: "Foreground", TextAlignment: "TextAlignment", IsTextSelectionEnabled: "IsTextSelectionEnabled", TextDecorations: "TextDecorations", TextTrimming: "TextTrimming", TextWrapping: "TextWrapping" }, host: { properties: { "style.font-family": "this.FontFamily", "style.font-size": "this.FontSize", "style.font-style": "this.FontStyle", "style.color": "this.Foreground", "style.text-align": "this.TextAlignment", "style.font-weight": "this.fontWeight", "style.user-select": "this.userSelect", "style.text-decoration-line": "this.textDecorationLine", "style.text-overflow": "this.textOverflow", "style.white-space": "this.whiteSpace" } }, usesInheritance: true, ngImport: i0, template: `<ng-container>
2007
+ <ng-content *ngIf="Text === undefined"/>
2008
+ <ng-container *ngIf="Text !== undefined">{{Text}}</ng-container>
2009
+ </ng-container>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
2010
+ }
2011
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TextBlockComponent, decorators: [{
2012
+ type: Component,
2013
+ args: [{
2014
+ selector: 'TextBlock',
2015
+ imports: [CommonModule],
2016
+ template: `<ng-container>
2017
+ <ng-content *ngIf="Text === undefined"/>
2018
+ <ng-container *ngIf="Text !== undefined">{{Text}}</ng-container>
2019
+ </ng-container>`
2020
+ }]
2021
+ }], propDecorators: { FontFamily: [{
2022
+ type: Input
2023
+ }, {
2024
+ type: HostBinding,
2025
+ args: ['style.font-family']
2026
+ }], Text: [{
2027
+ type: Input
2028
+ }], FontSize: [{
2029
+ type: Input
2030
+ }, {
2031
+ type: HostBinding,
2032
+ args: ['style.font-size']
2033
+ }], FontStyle: [{
2034
+ type: Input
2035
+ }, {
2036
+ type: HostBinding,
2037
+ args: ['style.font-style']
2038
+ }], FontWeight: [{
2039
+ type: Input
2040
+ }], Foreground: [{
2041
+ type: Input
2042
+ }, {
2043
+ type: HostBinding,
2044
+ args: ['style.color']
2045
+ }], TextAlignment: [{
2046
+ type: Input
2047
+ }, {
2048
+ type: HostBinding,
2049
+ args: ['style.text-align']
2050
+ }], IsTextSelectionEnabled: [{
2051
+ type: Input
2052
+ }], TextDecorations: [{
2053
+ type: Input
2054
+ }], TextTrimming: [{
2055
+ type: Input
2056
+ }], TextWrapping: [{
2057
+ type: Input
2058
+ }], fontWeight: [{
2059
+ type: HostBinding,
2060
+ args: ['style.font-weight']
2061
+ }], userSelect: [{
2062
+ type: HostBinding,
2063
+ args: ['style.user-select']
2064
+ }], textDecorationLine: [{
2065
+ type: HostBinding,
2066
+ args: ['style.text-decoration-line']
2067
+ }], textOverflow: [{
2068
+ type: HostBinding,
2069
+ args: ['style.text-overflow']
2070
+ }], whiteSpace: [{
2071
+ type: HostBinding,
2072
+ args: ['style.white-space']
2073
+ }] } });
2074
+
1924
2075
  var ContentDialogResult;
1925
2076
  (function (ContentDialogResult) {
1926
2077
  ContentDialogResult[ContentDialogResult["None"] = 0] = "None";
@@ -1981,7 +2132,7 @@ class ContentDialog extends Dialog {
1981
2132
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ContentDialog, isStandalone: true, selector: "ContentDialog", inputs: { Title: "Title", PrimaryButtonText: "PrimaryButtonText", IsPrimaryButtonEnabled: "IsPrimaryButtonEnabled", SecondaryButtonText: "SecondaryButtonText", IsSecondaryButtonEnabled: "IsSecondaryButtonEnabled", CloseButtonText: "CloseButtonText", Content: "Content", DefaultButton: "DefaultButton" }, outputs: { PrimaryButtonClicked: "PrimaryButtonClicked", SecondaryButtonClicked: "SecondaryButtonClicked", CloseButtonClicked: "CloseButtonClicked" }, usesInheritance: true, ngImport: i0, template: `<ng-template #template>
1982
2133
  <DialogPresenter>
1983
2134
  <div Header>{{Title}}</div>
1984
- {{Content}}
2135
+ <TextBlock TextWrapping="Wrap">{{Content}}</TextBlock>
1985
2136
  <ng-content/>
1986
2137
  <Grid RowDefinitions="auto" Orientation="Horizontal" ColumnSpacing="6px" AutoColumnDefinition="minmax(0, 1fr)" Footer>
1987
2138
  <Button *ngIf="PrimaryButtonText !== undefined" [IsEnabled]="IsPrimaryButtonEnabled" (Click)="onPrimaryButtonClicked()" [class.AccentButtonStyle]="isPrimaryButtonDefault">{{PrimaryButtonText}}</Button>
@@ -1989,14 +2140,14 @@ class ContentDialog extends Dialog {
1989
2140
  <Button *ngIf="CloseButtonText !== undefined" (Click)="onCloseButtonClicked()" [class.AccentButtonStyle]="isCloseButtonDefault">{{CloseButtonText}}</Button>
1990
2141
  </Grid>
1991
2142
  </DialogPresenter>
1992
- </ng-template>`, isInline: true, styles: [""], dependencies: [{ kind: "component", type: DialogPresenter, selector: "DialogPresenter", inputs: ["IsVisible"] }, { kind: "ngmodule", type: GridModule }, { kind: "component", type: GridComponent, selector: "Grid", inputs: ["ColumnDefinitions", "RowDefinitions", "AutoColumnDefinition", "AutoRowDefinition", "ColumnSpacing", "RowSpacing", "Orientation"] }, { kind: "component", type: ButtonComponent, selector: "Button", inputs: ["IsEnabled", "HorizontalContentAlignment", "VerticalContentAlignment"], outputs: ["Click"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
2143
+ </ng-template>`, isInline: true, styles: [""], dependencies: [{ kind: "component", type: DialogPresenter, selector: "DialogPresenter", inputs: ["IsVisible"] }, { kind: "ngmodule", type: GridModule }, { kind: "component", type: GridComponent, selector: "Grid", inputs: ["ColumnDefinitions", "RowDefinitions", "AutoColumnDefinition", "AutoRowDefinition", "ColumnSpacing", "RowSpacing", "Orientation"] }, { kind: "component", type: ButtonComponent, selector: "Button", inputs: ["IsEnabled", "HorizontalContentAlignment", "VerticalContentAlignment"], outputs: ["Click"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TextBlockComponent, selector: "TextBlock", inputs: ["FontFamily", "Text", "FontSize", "FontStyle", "FontWeight", "Foreground", "TextAlignment", "IsTextSelectionEnabled", "TextDecorations", "TextTrimming", "TextWrapping"] }] }); }
1993
2144
  }
1994
2145
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ContentDialog, decorators: [{
1995
2146
  type: Component,
1996
2147
  args: [{ selector: 'ContentDialog', template: `<ng-template #template>
1997
2148
  <DialogPresenter>
1998
2149
  <div Header>{{Title}}</div>
1999
- {{Content}}
2150
+ <TextBlock TextWrapping="Wrap">{{Content}}</TextBlock>
2000
2151
  <ng-content/>
2001
2152
  <Grid RowDefinitions="auto" Orientation="Horizontal" ColumnSpacing="6px" AutoColumnDefinition="minmax(0, 1fr)" Footer>
2002
2153
  <Button *ngIf="PrimaryButtonText !== undefined" [IsEnabled]="IsPrimaryButtonEnabled" (Click)="onPrimaryButtonClicked()" [class.AccentButtonStyle]="isPrimaryButtonDefault">{{PrimaryButtonText}}</Button>
@@ -2004,7 +2155,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
2004
2155
  <Button *ngIf="CloseButtonText !== undefined" (Click)="onCloseButtonClicked()" [class.AccentButtonStyle]="isCloseButtonDefault">{{CloseButtonText}}</Button>
2005
2156
  </Grid>
2006
2157
  </DialogPresenter>
2007
- </ng-template>`, imports: [DialogPresenter, GridModule, ButtonComponent, CommonModule] }]
2158
+ </ng-template>`, imports: [DialogPresenter, GridModule, ButtonComponent, CommonModule, TextBlockComponent] }]
2008
2159
  }], propDecorators: { Title: [{
2009
2160
  type: Input
2010
2161
  }], PrimaryButtonText: [{
@@ -2127,157 +2278,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
2127
2278
  }]
2128
2279
  }], ctorParameters: () => [{ type: ItemContainerComponent }, { type: i0.ViewContainerRef }] });
2129
2280
 
2130
- class TextBlockComponent extends FrameworkElementComponent {
2131
- constructor() {
2132
- super(...arguments);
2133
- this.FontWeight = 'Normal';
2134
- this.TextAlignment = 'Left';
2135
- this.TextTrimming = 'None';
2136
- this.TextWrapping = 'NoWrap';
2137
- }
2138
- get width() {
2139
- if (this.Width !== undefined)
2140
- return this.Width;
2141
- return this.HorizontalAlignment === 'Stretch' || this.TextTrimming !== 'None' ? undefined : 'min-content';
2142
- }
2143
- get minWidth() {
2144
- if (this.MinWidth !== undefined)
2145
- return this.MinWidth;
2146
- return this.MaxWidth === undefined && this.HorizontalAlignment === 'Stretch' && this.TextTrimming === 'None' ? 'min-content' : undefined;
2147
- }
2148
- get fontWeight() {
2149
- return TextBlockComponent.ToFontWeight(this.FontWeight);
2150
- }
2151
- static ToFontWeight(value) {
2152
- switch (value) {
2153
- case 'Black':
2154
- return 900;
2155
- case 'Bold':
2156
- return 700;
2157
- case 'ExtraBlack':
2158
- return 950;
2159
- case 'ExtraBold':
2160
- return 800;
2161
- case 'ExtraLight':
2162
- return 200;
2163
- case 'Light':
2164
- return 300;
2165
- case 'Medium':
2166
- return 500;
2167
- case 'Normal':
2168
- return 400;
2169
- case 'SemiBold':
2170
- return 600;
2171
- case 'SemiLight':
2172
- return 350;
2173
- case 'Thin':
2174
- return 100;
2175
- }
2176
- }
2177
- get userSelect() {
2178
- return this.IsTextSelectionEnabled === 'True' ? 'text' : 'none';
2179
- }
2180
- get textDecorationLine() {
2181
- switch (this.TextDecorations) {
2182
- case 'None':
2183
- return 'none';
2184
- case 'Strikethrough':
2185
- return 'line-through';
2186
- case 'Underline':
2187
- return 'underline';
2188
- default:
2189
- return undefined;
2190
- }
2191
- }
2192
- get textOverflow() {
2193
- switch (this.TextTrimming) {
2194
- case 'None':
2195
- case 'Clip':
2196
- return 'clip';
2197
- case 'CharacterEllipsis':
2198
- return 'Ellipsis';
2199
- default:
2200
- return undefined;
2201
- }
2202
- }
2203
- get whiteSpace() {
2204
- switch (this.TextWrapping) {
2205
- case 'NoWrap':
2206
- return 'nowrap';
2207
- case 'Wrap':
2208
- return 'normal';
2209
- }
2210
- }
2211
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TextBlockComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2212
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: TextBlockComponent, isStandalone: true, selector: "TextBlock", inputs: { FontFamily: "FontFamily", Text: "Text", FontSize: "FontSize", FontStyle: "FontStyle", FontWeight: "FontWeight", Foreground: "Foreground", TextAlignment: "TextAlignment", IsTextSelectionEnabled: "IsTextSelectionEnabled", TextDecorations: "TextDecorations", TextTrimming: "TextTrimming", TextWrapping: "TextWrapping" }, host: { properties: { "style.font-family": "this.FontFamily", "style.font-size": "this.FontSize", "style.font-style": "this.FontStyle", "style.color": "this.Foreground", "style.text-align": "this.TextAlignment", "style.font-weight": "this.fontWeight", "style.user-select": "this.userSelect", "style.text-decoration-line": "this.textDecorationLine", "style.text-overflow": "this.textOverflow", "style.white-space": "this.whiteSpace" } }, usesInheritance: true, ngImport: i0, template: `<ng-container>
2213
- <ng-content *ngIf="Text === undefined"/>
2214
- <ng-container *ngIf="Text !== undefined">{{Text}}</ng-container>
2215
- </ng-container>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
2216
- }
2217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TextBlockComponent, decorators: [{
2218
- type: Component,
2219
- args: [{
2220
- selector: 'TextBlock',
2221
- imports: [CommonModule],
2222
- template: `<ng-container>
2223
- <ng-content *ngIf="Text === undefined"/>
2224
- <ng-container *ngIf="Text !== undefined">{{Text}}</ng-container>
2225
- </ng-container>`
2226
- }]
2227
- }], propDecorators: { FontFamily: [{
2228
- type: Input
2229
- }, {
2230
- type: HostBinding,
2231
- args: ['style.font-family']
2232
- }], Text: [{
2233
- type: Input
2234
- }], FontSize: [{
2235
- type: Input
2236
- }, {
2237
- type: HostBinding,
2238
- args: ['style.font-size']
2239
- }], FontStyle: [{
2240
- type: Input
2241
- }, {
2242
- type: HostBinding,
2243
- args: ['style.font-style']
2244
- }], FontWeight: [{
2245
- type: Input
2246
- }], Foreground: [{
2247
- type: Input
2248
- }, {
2249
- type: HostBinding,
2250
- args: ['style.color']
2251
- }], TextAlignment: [{
2252
- type: Input
2253
- }, {
2254
- type: HostBinding,
2255
- args: ['style.text-align']
2256
- }], IsTextSelectionEnabled: [{
2257
- type: Input
2258
- }], TextDecorations: [{
2259
- type: Input
2260
- }], TextTrimming: [{
2261
- type: Input
2262
- }], TextWrapping: [{
2263
- type: Input
2264
- }], fontWeight: [{
2265
- type: HostBinding,
2266
- args: ['style.font-weight']
2267
- }], userSelect: [{
2268
- type: HostBinding,
2269
- args: ['style.user-select']
2270
- }], textDecorationLine: [{
2271
- type: HostBinding,
2272
- args: ['style.text-decoration-line']
2273
- }], textOverflow: [{
2274
- type: HostBinding,
2275
- args: ['style.text-overflow']
2276
- }], whiteSpace: [{
2277
- type: HostBinding,
2278
- args: ['style.white-space']
2279
- }] } });
2280
-
2281
2281
  class FontIconComponent extends FrameworkElementComponent {
2282
2282
  constructor() {
2283
2283
  super(...arguments);