@microsoft/windows-admin-center-sdk 2.508.0 → 2.510.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/angular/bundles/microsoft-windows-admin-center-sdk-angular.umd.js +1025 -514
  2. package/angular/bundles/microsoft-windows-admin-center-sdk-angular.umd.js.map +1 -1
  3. package/angular/bundles/microsoft-windows-admin-center-sdk-angular.umd.min.js +1 -1
  4. package/angular/bundles/microsoft-windows-admin-center-sdk-angular.umd.min.js.map +1 -1
  5. package/angular/esm2015/src/controls/common/decorators/deprecation.decorators.js +1 -1
  6. package/angular/esm2015/src/controls/header/header.component.js +79 -32
  7. package/angular/esm2015/src/controls/layout/index.js +2 -1
  8. package/angular/esm2015/src/controls/layout/layout-config.js +69 -0
  9. package/angular/esm2015/src/controls/layout/layout-item.component.js +12 -4
  10. package/angular/esm2015/src/controls/layout/layout-responsive-window-manager.js +22 -0
  11. package/angular/esm2015/src/controls/layout/layout.component.js +402 -69
  12. package/angular/esm2015/src/controls/property-grid/property-grid.component.js +8 -2
  13. package/angular/esm2015/src/controls/settings/settings.component.js +9 -3
  14. package/angular/esm2015/src/controls/split-view/split-view.component.js +1 -1
  15. package/angular/fesm2015/microsoft-windows-admin-center-sdk-angular.js +950 -475
  16. package/angular/fesm2015/microsoft-windows-admin-center-sdk-angular.js.map +1 -1
  17. package/angular/src/controls/header/header.component.d.ts +17 -5
  18. package/angular/src/controls/layout/index.d.ts +1 -0
  19. package/angular/src/controls/layout/layout-config.d.ts +53 -0
  20. package/angular/src/controls/layout/layout-item.component.d.ts +5 -1
  21. package/angular/src/controls/layout/layout-responsive-window-manager.d.ts +5 -0
  22. package/angular/src/controls/layout/layout.component.d.ts +95 -3
  23. package/angular/src/controls/property-grid/property-grid.component.d.ts +5 -1
  24. package/angular/src/controls/settings/settings.component.d.ts +9 -0
  25. package/e2e/assets/strings/cs-CZ/strings.json +1 -1
  26. package/e2e/assets/strings/de-DE/strings.json +1 -1
  27. package/e2e/assets/strings/es-ES/strings.json +1 -1
  28. package/e2e/assets/strings/fr-FR/strings.json +1 -1
  29. package/e2e/assets/strings/hu-HU/strings.json +1 -1
  30. package/e2e/assets/strings/it-IT/strings.json +1 -1
  31. package/e2e/assets/strings/ja-JP/strings.json +1 -1
  32. package/e2e/assets/strings/ko-KR/strings.json +1 -1
  33. package/e2e/assets/strings/nl-NL/strings.json +1 -1
  34. package/e2e/assets/strings/pl-PL/strings.json +1 -1
  35. package/e2e/assets/strings/pt-BR/strings.json +1 -1
  36. package/e2e/assets/strings/pt-PT/strings.json +1 -1
  37. package/e2e/assets/strings/ru-RU/strings.json +1 -1
  38. package/e2e/assets/strings/strings.json +1 -1
  39. package/e2e/assets/strings/sv-SE/strings.json +1 -1
  40. package/e2e/assets/strings/tr-TR/strings.json +1 -1
  41. package/e2e/assets/strings/zh-CN/strings.json +1 -1
  42. package/e2e/assets/strings/zh-TW/strings.json +1 -1
  43. package/package.json +1 -1
  44. package/styles/css/main-v2.css +1 -1
@@ -1,4 +1,5 @@
1
- import { OnInit } from '@angular/core';
1
+ import { Injector, OnInit } from '@angular/core';
2
+ import { CoreBaseComponent } from '../common/base.component';
2
3
  import * as i0 from "@angular/core";
3
4
  /**
4
5
  *
@@ -12,22 +13,33 @@ import * as i0 from "@angular/core";
12
13
  * @file {@filename component.html @filepath ./examples/header-example.component.html}
13
14
  *
14
15
  */
15
- export declare class HeaderComponent implements OnInit {
16
+ export declare class HeaderComponent extends CoreBaseComponent implements OnInit {
17
+ /**
18
+ * The source name to use for logging
19
+ */
20
+ protected get logSourceName(): string;
16
21
  private static tool;
17
22
  private static h1style;
18
23
  private static h2style;
19
24
  private static h3style;
20
25
  private static h4style;
21
- private static h5style;
22
- private static h6style;
23
26
  styleTo: string;
24
27
  type: string;
25
28
  text: string;
26
29
  level: string;
30
+ /**
31
+ * The sme icon class for MDL icons
32
+ */
33
+ smeIconClassName: string;
34
+ /**
35
+ * The sme icon class for URL icons
36
+ */
37
+ urlIcon: string;
38
+ constructor(injector: Injector);
27
39
  /**
28
40
  * The method run when the component is initialized
29
41
  */
30
42
  ngOnInit(): void;
31
43
  static ɵfac: i0.ɵɵFactoryDef<HeaderComponent, never>;
32
- static ɵcmp: i0.ɵɵComponentDefWithMeta<HeaderComponent, "sme-header", never, { "type": "type"; "text": "text"; "level": "level"; }, {}, never, ["*", "*"]>;
44
+ static ɵcmp: i0.ɵɵComponentDefWithMeta<HeaderComponent, "sme-header", never, { "type": "type"; "text": "text"; "level": "level"; "smeIconClassName": "smeIconClassName"; "urlIcon": "urlIcon"; }, {}, never, ["*"]>;
33
45
  }
@@ -1,3 +1,4 @@
1
+ export { LayoutItemConfig, LayoutItemConfigPropertyWidth, LayoutItemConfigPropertyWidthType, LayoutConfig, LayoutConfigItem, LayoutItemConfigMode, LayoutDrivenType, LayoutConfigGenerator } from './layout-config';
1
2
  export { EditableLayoutItemComponent } from './editable-layout-item.component';
2
3
  export { EditableLayoutComponent } from './editable-layout.component';
3
4
  export { LayoutComponent } from './layout.component';
@@ -0,0 +1,53 @@
1
+ import { SmeResponsiveWindowBreakpoints } from '../common/sme-responsive-window-manager.component';
2
+ export interface LayoutItemConfig {
3
+ width: LayoutItemConfigPropertyWidth;
4
+ }
5
+ export interface LayoutItemConfigPropertyWidth {
6
+ type: LayoutItemConfigPropertyWidthType;
7
+ value: number;
8
+ }
9
+ export declare enum LayoutItemConfigPropertyWidthType {
10
+ Percentage = "Percentage",
11
+ Number = "Number"
12
+ }
13
+ export interface LayoutConfig {
14
+ [SmeResponsiveWindowBreakpoints.PhoneUp]?: LayoutConfigItem;
15
+ [SmeResponsiveWindowBreakpoints.PhoneDown]?: LayoutConfigItem;
16
+ [SmeResponsiveWindowBreakpoints.Reflow]?: LayoutConfigItem;
17
+ }
18
+ export interface LayoutConfigItem {
19
+ mode?: LayoutItemConfigMode;
20
+ config?: LayoutItemConfig[];
21
+ }
22
+ export declare enum LayoutItemConfigMode {
23
+ Default = "Default",
24
+ Custom = "Custom"
25
+ }
26
+ export declare enum LayoutDrivenType {
27
+ Default = "Default",
28
+ ResponsiveWindowManager = "ResponsiveWindowManager"
29
+ }
30
+ /**
31
+ * The layout config generator.
32
+ *
33
+ * It determines the configurable width for the layout item.
34
+ * Usage:
35
+ *
36
+ * const layoutConfigGenerator = new LayoutConfigGenerator();
37
+ * layoutConfigGenerator.initialize([20, '100'])
38
+ *
39
+ * type number is used for pixel.
40
+ * type string is used for percentage.
41
+ */
42
+ export declare class LayoutConfigGenerator {
43
+ /**
44
+ * It initialized the layout configs for the layout component.
45
+ *
46
+ * @param phoneUp the layout config array for phone-up
47
+ * @param phoneDown the layout config array for phone-down
48
+ * @param reflow the layout config array for reflow
49
+ * @returns
50
+ */
51
+ initialize(phoneUp: any[], phoneDown?: any[], reflow?: any[]): LayoutConfig;
52
+ private parseConfig;
53
+ }
@@ -1,5 +1,6 @@
1
1
  import { Injector, OnInit } from '@angular/core';
2
2
  import { CoreBaseComponent } from '../common/base.component';
3
+ import { LayoutItemConfig } from './layout-config';
3
4
  import * as i0 from "@angular/core";
4
5
  /**
5
6
  * Layout component
@@ -13,16 +14,19 @@ export declare class LayoutItemComponent extends CoreBaseComponent implements On
13
14
  width: string;
14
15
  paddingRight: string;
15
16
  paddingBottom: string;
17
+ flex: string;
18
+ minWidth: string;
16
19
  /**
17
20
  * The number of columns that this item should span at maximum
18
21
  */
19
22
  columnSpan: number;
20
23
  caption: string;
21
24
  get maxWidth(): number;
25
+ customConfig: LayoutItemConfig;
22
26
  set maxWidth(value: number);
23
27
  constructor(injector: Injector);
24
28
  ngOnInit(): void;
25
29
  ready(): void;
26
30
  static ɵfac: i0.ɵɵFactoryDef<LayoutItemComponent, never>;
27
- static ɵcmp: i0.ɵɵComponentDefWithMeta<LayoutItemComponent, "sme-layout-item", never, { "columnSpan": "columnSpan"; "caption": "caption"; "maxWidth": "maxWidth"; }, {}, never, ["*"]>;
31
+ static ɵcmp: i0.ɵɵComponentDefWithMeta<LayoutItemComponent, "sme-layout-item", never, { "columnSpan": "columnSpan"; "caption": "caption"; "customConfig": "customConfig"; "maxWidth": "maxWidth"; }, {}, never, ["*"]>;
28
32
  }
@@ -0,0 +1,5 @@
1
+ import { SmeResponsiveWindowManagerComponent } from '../common/sme-responsive-window-manager.component';
2
+ export declare class LayoutResponsiveWindowManager extends SmeResponsiveWindowManagerComponent {
3
+ readonly name = "sme-layout";
4
+ onWindowSizeChanged(): void;
5
+ }
@@ -1,41 +1,133 @@
1
- import { AfterViewInit, EventEmitter, Injector } from '@angular/core';
1
+ import { AfterViewInit, EventEmitter, Injector, QueryList } from '@angular/core';
2
2
  import { CoreBaseComponent } from '../common/base.component';
3
3
  import { Layout } from '../common/layout';
4
+ import { SmeResponsiveWindowBreakpoints } from '../common/sme-responsive-window-manager.component';
5
+ import { LayoutConfig, LayoutDrivenType } from './layout-config';
4
6
  import { LayoutDefinitionComponent } from './layout-definition.component';
7
+ import { LayoutItemComponent } from './layout-item.component';
5
8
  import * as i0 from "@angular/core";
6
9
  /**
7
10
  * Layout component
8
11
  */
9
12
  export declare class LayoutComponent extends CoreBaseComponent implements AfterViewInit {
10
- private layout;
11
13
  /**
12
14
  * The source name to use for logging
13
15
  */
14
16
  protected get logSourceName(): string;
17
+ /**
18
+ * The layout items content children.
19
+ */
15
20
  private layoutItems;
21
+ /**
22
+ * The layout definition content children.
23
+ */
16
24
  private definitions;
25
+ /**
26
+ * The current layout definition value based on custom layout definition and the browser window size.
27
+ */
17
28
  currentLayoutDefinition: LayoutDefinitionComponent;
29
+ /**
30
+ * The default horizontal space in between layout items.
31
+ */
18
32
  itemHorizontalSpace: number;
33
+ /**
34
+ * The default vertical space in between layout items.
35
+ */
19
36
  itemVerticalSpace: number;
37
+ /**
38
+ * If true, will always try to fill the whole row for each layout item.
39
+ */
20
40
  tryToFillWholeRow: boolean;
41
+ /**
42
+ * The layout definition.
43
+ */
21
44
  definition: {
22
45
  [columnCount: number]: {
23
46
  lowerWidth?: number;
24
47
  upperWidth?: number;
25
48
  };
26
49
  };
50
+ /**
51
+ * If false, it will not assign extra paddings to the right for the last layout item.
52
+ */
27
53
  padLastItem: boolean;
54
+ /**
55
+ * If true, not extra right padding when there is only one item that uses the whole width of the row.
56
+ */
28
57
  noExtraRightPaddingOneItemPerRow: boolean;
58
+ /**
59
+ * It determines whether the layout is for settings where it contains a left and right layout item.
60
+ * If true, will apply special design for settings layout.
61
+ * On phone-up, the left side navigation layout item will be using a fixed width by default 300px,
62
+ * the right side layout item will be using the remaining width by default.
63
+ *
64
+ * On phone-down or 400% zoom, nothing is different from the regular settings page,
65
+ * the left right layout will be transformed to top bottom layout.
66
+ */
67
+ layoutConfig: LayoutConfig;
68
+ /**
69
+ * Implementation of the Layout interface
70
+ */
29
71
  layoutChanged: EventEmitter<void>;
72
+ /**
73
+ * Implementation of the Layout interface
74
+ */
75
+ windowBreakpointChanged: EventEmitter<void>;
76
+ private columnCount;
77
+ private columnSpanTotal;
78
+ private layoutResponsiveWindowManager;
79
+ private layoutDrivenType;
80
+ private currentLayoutItemConfig;
81
+ private readonly stylePixel;
30
82
  get currentLayoutDefinitionName(): string;
83
+ get currentLayoutDrivenType(): LayoutDrivenType;
84
+ get currentWindowBreakpoint(): SmeResponsiveWindowBreakpoints;
85
+ get currentLayoutItems(): QueryList<LayoutItemComponent>;
31
86
  constructor(injector: Injector, layout: Layout);
32
87
  ngAfterViewInit(): void;
88
+ /**
89
+ * The open API for refreshing the control externally.
90
+ */
91
+ refresh(): void;
33
92
  /**
34
93
  * On layout changed event handler, occurs every time the layout has been changed.
35
94
  */
36
95
  onLayoutChanged(): void;
96
+ /**
97
+ * The deferred layout changed handler.
98
+ */
99
+ private deferredOnLayoutChanged;
100
+ /**
101
+ * The on window breakpoint changed handler.
102
+ * Adding yield for component to get ElementRef after initialization.
103
+ */
104
+ onWindowBreakpointChanged(): void;
37
105
  protected getInitialHostClasses(): string[];
38
106
  protected updateLayout(): void;
107
+ private updateLayoutConfig;
108
+ private resetFlex;
109
+ private setLayoutDrivenType;
110
+ private getTotalColumnSpan;
111
+ private updateCurrentLayoutDefinition;
112
+ private layoutDefinitionWithColumnSpanCalculation;
113
+ private configDrivenCalculation;
114
+ /**
115
+ * It deal with configurations that only has either percentage or number.
116
+ * Aiming at performance optimization.
117
+ *
118
+ * @param layoutItems The layout item object array
119
+ * @param availableLayoutWidthInPixel available width in pixel horizontally.
120
+ */
121
+ private configDrivenCalculationDefault;
122
+ /**
123
+ * It deal with configurations that only has both percentage and number.
124
+ * Aiming at performance optimization.
125
+ *
126
+ * @param layoutItems The layout item object array
127
+ * @param availableLayoutWidthInPixel available width in pixel horizontally.
128
+ */
129
+ private configDrivenCalculationHybrid;
130
+ private updateCustomConfig;
39
131
  static ɵfac: i0.ɵɵFactoryDef<LayoutComponent, never>;
40
- static ɵcmp: i0.ɵɵComponentDefWithMeta<LayoutComponent, "sme-layout", never, { "itemHorizontalSpace": "itemHorizontalSpace"; "itemVerticalSpace": "itemVerticalSpace"; "tryToFillWholeRow": "tryToFillWholeRow"; "definition": "definition"; "padLastItem": "padLastItem"; "noExtraRightPaddingOneItemPerRow": "noExtraRightPaddingOneItemPerRow"; }, { "layoutChanged": "layoutChanged"; }, ["layoutItems", "definitions"], ["sme-layout-item"]>;
132
+ static ɵcmp: i0.ɵɵComponentDefWithMeta<LayoutComponent, "sme-layout", never, { "itemHorizontalSpace": "itemHorizontalSpace"; "itemVerticalSpace": "itemVerticalSpace"; "tryToFillWholeRow": "tryToFillWholeRow"; "definition": "definition"; "padLastItem": "padLastItem"; "noExtraRightPaddingOneItemPerRow": "noExtraRightPaddingOneItemPerRow"; "layoutConfig": "layoutConfig"; }, { "layoutChanged": "layoutChanged"; "windowBreakpointChanged": "windowBreakpointChanged"; }, ["layoutItems", "definitions"], ["sme-layout-item"]>;
41
133
  }
@@ -62,6 +62,10 @@ export declare class PropertyGridComponent extends CoreBaseComponent implements
62
62
  * Implementation of the Layout interface
63
63
  */
64
64
  layoutChanged: EventEmitter<void>;
65
+ /**
66
+ * Implementation of the Layout interface
67
+ */
68
+ windowBreakpointChanged: EventEmitter<void>;
65
69
  private propertyGridResponsiveWindowManager;
66
70
  constructor(injector: Injector, layout: Layout);
67
71
  stringifyValue(value: any): any;
@@ -85,5 +89,5 @@ export declare class PropertyGridComponent extends CoreBaseComponent implements
85
89
  */
86
90
  protected getInitialHostClasses(): string[];
87
91
  static ɵfac: i0.ɵɵFactoryDef<PropertyGridComponent, [null, { optional: true; skipSelf: true; }]>;
88
- static ɵcmp: i0.ɵɵComponentDefWithMeta<PropertyGridComponent, "sme-property-grid", never, { "orientation": "orientation"; }, { "layoutChanged": "layoutChanged"; }, ["items"], never>;
92
+ static ɵcmp: i0.ɵɵComponentDefWithMeta<PropertyGridComponent, "sme-property-grid", never, { "orientation": "orientation"; }, { "layoutChanged": "layoutChanged"; "windowBreakpointChanged": "windowBreakpointChanged"; }, ["items"], never>;
89
93
  }
@@ -4,6 +4,7 @@ import { ActivatedRouteSnapshot, NavigationExtras, RouterStateSnapshot } from '@
4
4
  import { Observable } from 'rxjs';
5
5
  import { CoreBaseComponent } from '../common/base.component';
6
6
  import { DialogService } from '../dialog/dialog.service';
7
+ import { LayoutConfig, LayoutConfigGenerator } from '../layout/layout-config';
7
8
  import { CanComponentDeactivate } from './settings-can-deactivate-guard.service';
8
9
  import { SettingsFormService } from './settings-form.service';
9
10
  import * as i0 from "@angular/core";
@@ -67,6 +68,14 @@ export declare class SettingsComponent extends CoreBaseComponent implements OnIn
67
68
  fullSettingsTitle: string;
68
69
  settingsForms: SettingsFormService;
69
70
  dialogService: DialogService;
71
+ /**
72
+ * The current layout config for custom config 1.
73
+ */
74
+ currentLayoutConfig: LayoutConfig;
75
+ /**
76
+ * The generator for layout config.
77
+ */
78
+ layoutConfigGenerator: LayoutConfigGenerator;
70
79
  private autoFocus;
71
80
  constructor(injector: Injector);
72
81
  ngOnInit(): void;