@microsoft/windows-admin-center-sdk 2.507.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.
- package/angular/bundles/microsoft-windows-admin-center-sdk-angular.umd.js +1025 -514
- package/angular/bundles/microsoft-windows-admin-center-sdk-angular.umd.js.map +1 -1
- package/angular/bundles/microsoft-windows-admin-center-sdk-angular.umd.min.js +1 -1
- package/angular/bundles/microsoft-windows-admin-center-sdk-angular.umd.min.js.map +1 -1
- package/angular/esm2015/src/controls/common/decorators/deprecation.decorators.js +1 -1
- package/angular/esm2015/src/controls/header/header.component.js +79 -32
- package/angular/esm2015/src/controls/layout/index.js +2 -1
- package/angular/esm2015/src/controls/layout/layout-config.js +69 -0
- package/angular/esm2015/src/controls/layout/layout-item.component.js +12 -4
- package/angular/esm2015/src/controls/layout/layout-responsive-window-manager.js +22 -0
- package/angular/esm2015/src/controls/layout/layout.component.js +402 -69
- package/angular/esm2015/src/controls/property-grid/property-grid.component.js +8 -2
- package/angular/esm2015/src/controls/settings/settings.component.js +9 -3
- package/angular/esm2015/src/controls/split-view/split-view.component.js +1 -1
- package/angular/fesm2015/microsoft-windows-admin-center-sdk-angular.js +950 -475
- package/angular/fesm2015/microsoft-windows-admin-center-sdk-angular.js.map +1 -1
- package/angular/src/controls/header/header.component.d.ts +17 -5
- package/angular/src/controls/layout/index.d.ts +1 -0
- package/angular/src/controls/layout/layout-config.d.ts +53 -0
- package/angular/src/controls/layout/layout-item.component.d.ts +5 -1
- package/angular/src/controls/layout/layout-responsive-window-manager.d.ts +5 -0
- package/angular/src/controls/layout/layout.component.d.ts +95 -3
- package/angular/src/controls/property-grid/property-grid.component.d.ts +5 -1
- package/angular/src/controls/settings/settings.component.d.ts +9 -0
- package/e2e/assets/strings/cs-CZ/strings.json +1 -1
- package/e2e/assets/strings/de-DE/strings.json +1 -1
- package/e2e/assets/strings/es-ES/strings.json +1 -1
- package/e2e/assets/strings/fr-FR/strings.json +1 -1
- package/e2e/assets/strings/hu-HU/strings.json +1 -1
- package/e2e/assets/strings/it-IT/strings.json +1 -1
- package/e2e/assets/strings/ja-JP/strings.json +1 -1
- package/e2e/assets/strings/ko-KR/strings.json +1 -1
- package/e2e/assets/strings/nl-NL/strings.json +1 -1
- package/e2e/assets/strings/pl-PL/strings.json +1 -1
- package/e2e/assets/strings/pt-BR/strings.json +1 -1
- package/e2e/assets/strings/pt-PT/strings.json +1 -1
- package/e2e/assets/strings/ru-RU/strings.json +1 -1
- package/e2e/assets/strings/strings.json +1 -1
- package/e2e/assets/strings/sv-SE/strings.json +1 -1
- package/e2e/assets/strings/tr-TR/strings.json +1 -1
- package/e2e/assets/strings/zh-CN/strings.json +1 -1
- package/e2e/assets/strings/zh-TW/strings.json +1 -1
- package/package.json +1 -1
- package/styles/css/main-v2.css +1 -1
|
@@ -9821,6 +9821,479 @@
|
|
|
9821
9821
|
}] });
|
|
9822
9822
|
})();
|
|
9823
9823
|
|
|
9824
|
+
(function (SmeResponsiveWindowBreakpointsValue) {
|
|
9825
|
+
SmeResponsiveWindowBreakpointsValue[SmeResponsiveWindowBreakpointsValue["Reflow"] = 399.98] = "Reflow";
|
|
9826
|
+
SmeResponsiveWindowBreakpointsValue[SmeResponsiveWindowBreakpointsValue["PhoneDown"] = 767.98] = "PhoneDown";
|
|
9827
|
+
SmeResponsiveWindowBreakpointsValue[SmeResponsiveWindowBreakpointsValue["PhoneUp"] = Number.MAX_SAFE_INTEGER] = "PhoneUp";
|
|
9828
|
+
})(exports.SmeResponsiveWindowBreakpointsValue || (exports.SmeResponsiveWindowBreakpointsValue = {}));
|
|
9829
|
+
(function (SmeResponsiveWindowBreakpoints) {
|
|
9830
|
+
SmeResponsiveWindowBreakpoints["Reflow"] = "Reflow";
|
|
9831
|
+
SmeResponsiveWindowBreakpoints["PhoneDown"] = "PhoneDown";
|
|
9832
|
+
SmeResponsiveWindowBreakpoints["PhoneUp"] = "PhoneUp";
|
|
9833
|
+
})(exports.SmeResponsiveWindowBreakpoints || (exports.SmeResponsiveWindowBreakpoints = {}));
|
|
9834
|
+
// tslint:disable-next-line: directive-class-suffix
|
|
9835
|
+
var SmeResponsiveWindowManagerComponent = /** @class */ (function () {
|
|
9836
|
+
/**
|
|
9837
|
+
* The manager supports layout component and in the meantime listening to the window size change event.
|
|
9838
|
+
* @param layout the layout component.
|
|
9839
|
+
*/
|
|
9840
|
+
function SmeResponsiveWindowManagerComponent(layout) {
|
|
9841
|
+
var _this = this;
|
|
9842
|
+
this.layout = layout;
|
|
9843
|
+
/**
|
|
9844
|
+
* It defines whether the current window size is for super small window.
|
|
9845
|
+
*/
|
|
9846
|
+
this.internalReflowMode = false;
|
|
9847
|
+
/**
|
|
9848
|
+
* It defines whether the current window size is phone down.
|
|
9849
|
+
*/
|
|
9850
|
+
this.internalPhoneDown = false;
|
|
9851
|
+
/**
|
|
9852
|
+
* It defines whether the current window size is phone up.
|
|
9853
|
+
*/
|
|
9854
|
+
this.internalPhoneUp = false;
|
|
9855
|
+
/**
|
|
9856
|
+
* It defines whether the current solution/tool is using css v2 to support responsive window.
|
|
9857
|
+
*/
|
|
9858
|
+
this.internalCssV2 = false;
|
|
9859
|
+
/**
|
|
9860
|
+
* The array for subscription.
|
|
9861
|
+
*/
|
|
9862
|
+
this.subscriptions = [];
|
|
9863
|
+
this.setIsCssV2Enabled();
|
|
9864
|
+
if (this.layout) {
|
|
9865
|
+
// on parent layout changes, re-emit the layout change to our event
|
|
9866
|
+
this.subscriptions.push(layout.layoutChanged.subscribe((function () { return _this.onLayoutChanged(); })));
|
|
9867
|
+
// on window break point changes, emit the event about critical classes and styling updates signal.
|
|
9868
|
+
this.subscriptions.push(layout.windowBreakpointChanged.subscribe(function () { return _this.onWindowBreakpointChanged(); }));
|
|
9869
|
+
this.deferredOnLayoutChanged();
|
|
9870
|
+
}
|
|
9871
|
+
}
|
|
9872
|
+
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "responsiveWindowState", {
|
|
9873
|
+
/**
|
|
9874
|
+
* Gets the current window responsive state.
|
|
9875
|
+
*/
|
|
9876
|
+
get: function () {
|
|
9877
|
+
return this.internalResponsiveWindowMode;
|
|
9878
|
+
},
|
|
9879
|
+
/**
|
|
9880
|
+
* Sets the current window responsive state.
|
|
9881
|
+
*/
|
|
9882
|
+
set: function (input) {
|
|
9883
|
+
var _a;
|
|
9884
|
+
var prevResponsiveWindowState = this.internalResponsiveWindowMode;
|
|
9885
|
+
this.internalResponsiveWindowMode = input;
|
|
9886
|
+
if (prevResponsiveWindowState !== this.internalResponsiveWindowMode) {
|
|
9887
|
+
(_a = this.layout) === null || _a === void 0 ? void 0 : _a.windowBreakpointChanged.emit();
|
|
9888
|
+
}
|
|
9889
|
+
},
|
|
9890
|
+
enumerable: false,
|
|
9891
|
+
configurable: true
|
|
9892
|
+
});
|
|
9893
|
+
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "cssV2", {
|
|
9894
|
+
/**
|
|
9895
|
+
* Gets the value indicating whether css v2 should be used.
|
|
9896
|
+
*/
|
|
9897
|
+
get: function () {
|
|
9898
|
+
return this.internalCssV2;
|
|
9899
|
+
},
|
|
9900
|
+
/**
|
|
9901
|
+
* It sets the value for whether the current tool/solution is using css v2 for window responsiveness.
|
|
9902
|
+
*/
|
|
9903
|
+
set: function (input) {
|
|
9904
|
+
this.internalCssV2 = !!input;
|
|
9905
|
+
},
|
|
9906
|
+
enumerable: false,
|
|
9907
|
+
configurable: true
|
|
9908
|
+
});
|
|
9909
|
+
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "phoneDown", {
|
|
9910
|
+
/**
|
|
9911
|
+
* Gets the phone down mode.
|
|
9912
|
+
*/
|
|
9913
|
+
get: function () {
|
|
9914
|
+
return this.internalPhoneDown;
|
|
9915
|
+
},
|
|
9916
|
+
/**
|
|
9917
|
+
* Sets the phone down mode.
|
|
9918
|
+
*/
|
|
9919
|
+
set: function (input) {
|
|
9920
|
+
this.internalPhoneDown = !!input;
|
|
9921
|
+
},
|
|
9922
|
+
enumerable: false,
|
|
9923
|
+
configurable: true
|
|
9924
|
+
});
|
|
9925
|
+
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "phoneUp", {
|
|
9926
|
+
/**
|
|
9927
|
+
* Gets the phone up mode.
|
|
9928
|
+
*/
|
|
9929
|
+
get: function () {
|
|
9930
|
+
return this.internalPhoneUp;
|
|
9931
|
+
},
|
|
9932
|
+
/**
|
|
9933
|
+
* Set the phone up mode.
|
|
9934
|
+
*/
|
|
9935
|
+
set: function (input) {
|
|
9936
|
+
this.internalPhoneUp = !!input;
|
|
9937
|
+
},
|
|
9938
|
+
enumerable: false,
|
|
9939
|
+
configurable: true
|
|
9940
|
+
});
|
|
9941
|
+
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "reflowMode", {
|
|
9942
|
+
/**
|
|
9943
|
+
* Gets the reflow mode.
|
|
9944
|
+
*/
|
|
9945
|
+
get: function () {
|
|
9946
|
+
return this.internalReflowMode;
|
|
9947
|
+
},
|
|
9948
|
+
/**
|
|
9949
|
+
* Sets the reflow mode.
|
|
9950
|
+
*/
|
|
9951
|
+
set: function (input) {
|
|
9952
|
+
this.internalReflowMode = !!input;
|
|
9953
|
+
},
|
|
9954
|
+
enumerable: false,
|
|
9955
|
+
configurable: true
|
|
9956
|
+
});
|
|
9957
|
+
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "width", {
|
|
9958
|
+
/**
|
|
9959
|
+
* Gets the width of the window from the window object.
|
|
9960
|
+
* Should only be called on layout or window size change.
|
|
9961
|
+
*/
|
|
9962
|
+
get: function () {
|
|
9963
|
+
return window === null || window === void 0 ? void 0 : window.innerWidth;
|
|
9964
|
+
},
|
|
9965
|
+
enumerable: false,
|
|
9966
|
+
configurable: true
|
|
9967
|
+
});
|
|
9968
|
+
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "height", {
|
|
9969
|
+
/**
|
|
9970
|
+
* Gets the height of the window from the window object.
|
|
9971
|
+
* Should only be called on layout or window size change.
|
|
9972
|
+
*/
|
|
9973
|
+
get: function () {
|
|
9974
|
+
return window === null || window === void 0 ? void 0 : window.innerHeight;
|
|
9975
|
+
},
|
|
9976
|
+
enumerable: false,
|
|
9977
|
+
configurable: true
|
|
9978
|
+
});
|
|
9979
|
+
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "prevSize", {
|
|
9980
|
+
/**
|
|
9981
|
+
* Gets the last known window responsive data.
|
|
9982
|
+
*/
|
|
9983
|
+
get: function () {
|
|
9984
|
+
var _a, _b;
|
|
9985
|
+
if (((_a = this.internalPrevSize) === null || _a === void 0 ? void 0 : _a.width) === this.width && ((_b = this.internalPrevSize) === null || _b === void 0 ? void 0 : _b.height) === this.height) {
|
|
9986
|
+
return this.internalPrevSize;
|
|
9987
|
+
}
|
|
9988
|
+
else {
|
|
9989
|
+
return this.getSmeResponsiveWindowData();
|
|
9990
|
+
}
|
|
9991
|
+
},
|
|
9992
|
+
enumerable: false,
|
|
9993
|
+
configurable: true
|
|
9994
|
+
});
|
|
9995
|
+
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "size", {
|
|
9996
|
+
/**
|
|
9997
|
+
* Gets the window responsive break points.
|
|
9998
|
+
*/
|
|
9999
|
+
get: function () {
|
|
10000
|
+
var width = this.width;
|
|
10001
|
+
if (width <= exports.SmeResponsiveWindowBreakpointsValue.Reflow) {
|
|
10002
|
+
this.reflowMode = true;
|
|
10003
|
+
this.phoneDown = false;
|
|
10004
|
+
this.phoneUp = false;
|
|
10005
|
+
this.responsiveWindowState = exports.SmeResponsiveWindowBreakpoints.Reflow;
|
|
10006
|
+
}
|
|
10007
|
+
else if (width <= exports.SmeResponsiveWindowBreakpointsValue.PhoneDown) {
|
|
10008
|
+
this.reflowMode = false;
|
|
10009
|
+
this.phoneDown = true;
|
|
10010
|
+
this.phoneUp = false;
|
|
10011
|
+
this.responsiveWindowState = exports.SmeResponsiveWindowBreakpoints.PhoneDown;
|
|
10012
|
+
}
|
|
10013
|
+
else {
|
|
10014
|
+
this.reflowMode = false;
|
|
10015
|
+
this.phoneDown = false;
|
|
10016
|
+
this.phoneUp = true;
|
|
10017
|
+
this.responsiveWindowState = exports.SmeResponsiveWindowBreakpoints.PhoneUp;
|
|
10018
|
+
}
|
|
10019
|
+
return this.responsiveWindowState;
|
|
10020
|
+
},
|
|
10021
|
+
enumerable: false,
|
|
10022
|
+
configurable: true
|
|
10023
|
+
});
|
|
10024
|
+
/**
|
|
10025
|
+
* It sets whether the current solution/tool is using the css v2 for window responsiveness.
|
|
10026
|
+
*/
|
|
10027
|
+
SmeResponsiveWindowManagerComponent.prototype.setIsCssV2Enabled = function () {
|
|
10028
|
+
this.cssV2 = this.isUsingCssV2();
|
|
10029
|
+
};
|
|
10030
|
+
/**
|
|
10031
|
+
* The implementation for checking whether the styles are being set.
|
|
10032
|
+
* @returns true if the current tool/solution is using css v2 for window responsiveness.
|
|
10033
|
+
*/
|
|
10034
|
+
SmeResponsiveWindowManagerComponent.prototype.isUsingCssV2 = function () {
|
|
10035
|
+
var head = document.getElementsByTagName('head')[0];
|
|
10036
|
+
var links = head.querySelectorAll('link');
|
|
10037
|
+
var cssV2 = true;
|
|
10038
|
+
// sme shell root would be containing style.css and either main.css or main-v2.css
|
|
10039
|
+
// thus as long as it is not main.css, should be using css-v2
|
|
10040
|
+
for (var i = 0; i < links.length; i++) {
|
|
10041
|
+
var link = links[i];
|
|
10042
|
+
if (link.href && link.href.includes('main.css')) {
|
|
10043
|
+
cssV2 = false;
|
|
10044
|
+
break;
|
|
10045
|
+
}
|
|
10046
|
+
}
|
|
10047
|
+
return cssV2;
|
|
10048
|
+
};
|
|
10049
|
+
/**
|
|
10050
|
+
* The functionality to update the core variables for window responsive data.
|
|
10051
|
+
* @returns The SmeResponsiveWindowData object
|
|
10052
|
+
*/
|
|
10053
|
+
SmeResponsiveWindowManagerComponent.prototype.getSmeResponsiveWindowData = function () {
|
|
10054
|
+
// on window size or layout change, gets the width and height from the window object.
|
|
10055
|
+
var width = this.width;
|
|
10056
|
+
var height = this.height;
|
|
10057
|
+
// based on the window size information, calculates the core paramters.
|
|
10058
|
+
var size = this.size;
|
|
10059
|
+
// the 3 gets above sets these following 3 parameters.
|
|
10060
|
+
var reflowMode = this.reflowMode;
|
|
10061
|
+
var phoneDown = this.phoneDown;
|
|
10062
|
+
var phoneUp = this.phoneUp;
|
|
10063
|
+
// sets the object and return.
|
|
10064
|
+
this.internalPrevSize = {
|
|
10065
|
+
width: width,
|
|
10066
|
+
height: height,
|
|
10067
|
+
size: size,
|
|
10068
|
+
reflowMode: reflowMode,
|
|
10069
|
+
phoneDown: phoneDown,
|
|
10070
|
+
phoneUp: phoneUp
|
|
10071
|
+
};
|
|
10072
|
+
return this.internalPrevSize;
|
|
10073
|
+
};
|
|
10074
|
+
/**
|
|
10075
|
+
* On layout changed event handler, occurs every time the layout has been changed.
|
|
10076
|
+
*/
|
|
10077
|
+
SmeResponsiveWindowManagerComponent.prototype.onLayoutChanged = function () {
|
|
10078
|
+
this.getSmeResponsiveWindowData();
|
|
10079
|
+
};
|
|
10080
|
+
/**
|
|
10081
|
+
* The deferred layout changed handler.
|
|
10082
|
+
*/
|
|
10083
|
+
SmeResponsiveWindowManagerComponent.prototype.deferredOnLayoutChanged = function () {
|
|
10084
|
+
this.onLayoutChanged();
|
|
10085
|
+
};
|
|
10086
|
+
/**
|
|
10087
|
+
* To respond to a layout breakpoint changed event.
|
|
10088
|
+
* @returns void
|
|
10089
|
+
*/
|
|
10090
|
+
SmeResponsiveWindowManagerComponent.prototype.onWindowBreakpointChanged = function () {
|
|
10091
|
+
return;
|
|
10092
|
+
};
|
|
10093
|
+
/**
|
|
10094
|
+
* Gets the parent element by html tag. By default, go up 10 levels for enhanced performance.
|
|
10095
|
+
* @param inputElement The input element.
|
|
10096
|
+
* @returns The targeted html element get by the html tag
|
|
10097
|
+
*/
|
|
10098
|
+
SmeResponsiveWindowManagerComponent.prototype.getParentElementByTag = function (inputElement, parentHtmlTags, levelExternal, customKeywords, untilTagName) {
|
|
10099
|
+
if (parentHtmlTags === void 0) { parentHtmlTags = ['sme-pivot', 'sme-split-view', 'sme-settings-page']; }
|
|
10100
|
+
if (levelExternal === void 0) { levelExternal = 10; }
|
|
10101
|
+
if (!inputElement) {
|
|
10102
|
+
return undefined;
|
|
10103
|
+
}
|
|
10104
|
+
var level = levelExternal;
|
|
10105
|
+
var found = false;
|
|
10106
|
+
var parent = inputElement;
|
|
10107
|
+
while (level > 0 && !found) {
|
|
10108
|
+
if (parent) {
|
|
10109
|
+
parent = parent.parentElement;
|
|
10110
|
+
}
|
|
10111
|
+
var parentTagName = parent === null || parent === void 0 ? void 0 : parent.tagName.toLocaleLowerCase();
|
|
10112
|
+
if (untilTagName) {
|
|
10113
|
+
if (parentTagName === untilTagName.toLowerCase()) {
|
|
10114
|
+
return undefined;
|
|
10115
|
+
}
|
|
10116
|
+
}
|
|
10117
|
+
if (parentHtmlTags.includes(parentTagName) || (customKeywords !== undefined && (parentTagName === null || parentTagName === void 0 ? void 0 : parentTagName.includes(customKeywords)))) {
|
|
10118
|
+
found = true;
|
|
10119
|
+
return parent;
|
|
10120
|
+
}
|
|
10121
|
+
level -= 1;
|
|
10122
|
+
}
|
|
10123
|
+
return undefined;
|
|
10124
|
+
};
|
|
10125
|
+
/**
|
|
10126
|
+
* The core algorithm for adding and removing classes based on window size and window size settings.
|
|
10127
|
+
* @param settings the settings object
|
|
10128
|
+
* @param curSettings the current setting
|
|
10129
|
+
* @param element the html element for setting up classes.
|
|
10130
|
+
* @returns void.
|
|
10131
|
+
*/
|
|
10132
|
+
SmeResponsiveWindowManagerComponent.prototype.updateClassArrayOnWindowSize = function (settings, curSettings, element) {
|
|
10133
|
+
if (!settings) {
|
|
10134
|
+
return;
|
|
10135
|
+
}
|
|
10136
|
+
settings = JSON.parse(JSON.stringify(settings));
|
|
10137
|
+
var phoneDown = JSON.parse(JSON.stringify(settings.phoneDown));
|
|
10138
|
+
var phoneUp = JSON.parse(JSON.stringify(settings.phoneUp));
|
|
10139
|
+
var reflow = JSON.parse(JSON.stringify(settings.reflow));
|
|
10140
|
+
var toBeRemovedClassList = [];
|
|
10141
|
+
var toBeAddedClassList = [];
|
|
10142
|
+
switch (curSettings) {
|
|
10143
|
+
case 'phoneUp':
|
|
10144
|
+
toBeAddedClassList = phoneUp;
|
|
10145
|
+
toBeRemovedClassList = phoneDown;
|
|
10146
|
+
toBeRemovedClassList = this.uniqueArray(toBeRemovedClassList, reflow);
|
|
10147
|
+
break;
|
|
10148
|
+
case 'phoneDown':
|
|
10149
|
+
toBeAddedClassList = phoneDown;
|
|
10150
|
+
toBeRemovedClassList = phoneUp;
|
|
10151
|
+
toBeRemovedClassList = this.uniqueArray(toBeRemovedClassList, reflow);
|
|
10152
|
+
break;
|
|
10153
|
+
case 'reflow':
|
|
10154
|
+
toBeAddedClassList = reflow;
|
|
10155
|
+
toBeRemovedClassList = phoneDown;
|
|
10156
|
+
toBeRemovedClassList = this.uniqueArray(toBeRemovedClassList, phoneUp);
|
|
10157
|
+
break;
|
|
10158
|
+
}
|
|
10159
|
+
toBeRemovedClassList = this.removeExistedItem(toBeRemovedClassList, toBeAddedClassList);
|
|
10160
|
+
for (var i = 0; i < toBeRemovedClassList.length; i++) {
|
|
10161
|
+
if (element.classList.contains(toBeRemovedClassList[i])) {
|
|
10162
|
+
element.classList.remove(toBeRemovedClassList[i]);
|
|
10163
|
+
}
|
|
10164
|
+
}
|
|
10165
|
+
for (var i = 0; i < toBeAddedClassList.length; i++) {
|
|
10166
|
+
if (!element.classList.contains(toBeAddedClassList[i])) {
|
|
10167
|
+
element.classList.add(toBeAddedClassList[i]);
|
|
10168
|
+
}
|
|
10169
|
+
}
|
|
10170
|
+
};
|
|
10171
|
+
/**
|
|
10172
|
+
* Merge two arrays with unique items.
|
|
10173
|
+
* @param arrayA the input array A
|
|
10174
|
+
* @param arrayB the input array B
|
|
10175
|
+
* @returns an array that contains unique items from array A and array B
|
|
10176
|
+
*/
|
|
10177
|
+
SmeResponsiveWindowManagerComponent.prototype.uniqueArray = function (arrayA, arrayB) {
|
|
10178
|
+
if (arrayB && arrayB.length) {
|
|
10179
|
+
for (var i = 0; i < arrayB.length; i++) {
|
|
10180
|
+
if (!arrayA.includes(arrayB[i])) {
|
|
10181
|
+
arrayA.push(arrayB[i]);
|
|
10182
|
+
}
|
|
10183
|
+
}
|
|
10184
|
+
}
|
|
10185
|
+
return arrayA;
|
|
10186
|
+
};
|
|
10187
|
+
/**
|
|
10188
|
+
* Guarantees will not remove the classes that needs to be added.
|
|
10189
|
+
* @param toBeRemovedClassList the list of classes that needs to be removed.
|
|
10190
|
+
* @param toBeAddedClassList the list of classes that needs to be added.
|
|
10191
|
+
* @returns the list of classes that needs to be removed and doesn't overlap with the classes that needs to be added.
|
|
10192
|
+
*/
|
|
10193
|
+
SmeResponsiveWindowManagerComponent.prototype.removeExistedItem = function (toBeRemovedClassList, toBeAddedClassList) {
|
|
10194
|
+
if (!toBeAddedClassList || !toBeAddedClassList.length) {
|
|
10195
|
+
return toBeRemovedClassList;
|
|
10196
|
+
}
|
|
10197
|
+
if (!toBeRemovedClassList || !toBeRemovedClassList.length) {
|
|
10198
|
+
return [];
|
|
10199
|
+
}
|
|
10200
|
+
var res = [];
|
|
10201
|
+
for (var i = 0; i < toBeRemovedClassList.length; i++) {
|
|
10202
|
+
if (!toBeAddedClassList.includes(toBeRemovedClassList[i])) {
|
|
10203
|
+
res.push(toBeRemovedClassList[i]);
|
|
10204
|
+
}
|
|
10205
|
+
}
|
|
10206
|
+
return res;
|
|
10207
|
+
};
|
|
10208
|
+
return SmeResponsiveWindowManagerComponent;
|
|
10209
|
+
}());
|
|
10210
|
+
/** @nocollapse */ SmeResponsiveWindowManagerComponent.ɵfac = function SmeResponsiveWindowManagerComponent_Factory(t) { return new (t || SmeResponsiveWindowManagerComponent)(i0.ɵɵdirectiveInject(SME_LAYOUT_PROVIDER)); };
|
|
10211
|
+
/** @nocollapse */ SmeResponsiveWindowManagerComponent.ɵdir = i0.ɵɵdefineDirective({ type: SmeResponsiveWindowManagerComponent });
|
|
10212
|
+
__decorate([
|
|
10213
|
+
debounce_decorators.Debounce(),
|
|
10214
|
+
__metadata("design:type", Function),
|
|
10215
|
+
__metadata("design:paramtypes", []),
|
|
10216
|
+
__metadata("design:returntype", void 0)
|
|
10217
|
+
], SmeResponsiveWindowManagerComponent.prototype, "deferredOnLayoutChanged", null);
|
|
10218
|
+
(function () {
|
|
10219
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SmeResponsiveWindowManagerComponent, [{
|
|
10220
|
+
type: i0.Directive
|
|
10221
|
+
}], function () {
|
|
10222
|
+
return [{ type: undefined, decorators: [{
|
|
10223
|
+
type: i0.Inject,
|
|
10224
|
+
args: [SME_LAYOUT_PROVIDER]
|
|
10225
|
+
}] }];
|
|
10226
|
+
}, { deferredOnLayoutChanged: [] });
|
|
10227
|
+
})();
|
|
10228
|
+
|
|
10229
|
+
(function (LayoutItemConfigPropertyWidthType) {
|
|
10230
|
+
LayoutItemConfigPropertyWidthType["Percentage"] = "Percentage";
|
|
10231
|
+
LayoutItemConfigPropertyWidthType["Number"] = "Number";
|
|
10232
|
+
})(exports.LayoutItemConfigPropertyWidthType || (exports.LayoutItemConfigPropertyWidthType = {}));
|
|
10233
|
+
(function (LayoutItemConfigMode) {
|
|
10234
|
+
LayoutItemConfigMode["Default"] = "Default";
|
|
10235
|
+
LayoutItemConfigMode["Custom"] = "Custom";
|
|
10236
|
+
})(exports.LayoutItemConfigMode || (exports.LayoutItemConfigMode = {}));
|
|
10237
|
+
(function (LayoutDrivenType) {
|
|
10238
|
+
LayoutDrivenType["Default"] = "Default";
|
|
10239
|
+
LayoutDrivenType["ResponsiveWindowManager"] = "ResponsiveWindowManager";
|
|
10240
|
+
})(exports.LayoutDrivenType || (exports.LayoutDrivenType = {}));
|
|
10241
|
+
/**
|
|
10242
|
+
* The layout config generator.
|
|
10243
|
+
*
|
|
10244
|
+
* It determines the configurable width for the layout item.
|
|
10245
|
+
* Usage:
|
|
10246
|
+
*
|
|
10247
|
+
* const layoutConfigGenerator = new LayoutConfigGenerator();
|
|
10248
|
+
* layoutConfigGenerator.initialize([20, '100'])
|
|
10249
|
+
*
|
|
10250
|
+
* type number is used for pixel.
|
|
10251
|
+
* type string is used for percentage.
|
|
10252
|
+
*/
|
|
10253
|
+
var LayoutConfigGenerator = /** @class */ (function () {
|
|
10254
|
+
function LayoutConfigGenerator() {
|
|
10255
|
+
}
|
|
10256
|
+
/**
|
|
10257
|
+
* It initialized the layout configs for the layout component.
|
|
10258
|
+
*
|
|
10259
|
+
* @param phoneUp the layout config array for phone-up
|
|
10260
|
+
* @param phoneDown the layout config array for phone-down
|
|
10261
|
+
* @param reflow the layout config array for reflow
|
|
10262
|
+
* @returns
|
|
10263
|
+
*/
|
|
10264
|
+
LayoutConfigGenerator.prototype.initialize = function (phoneUp, phoneDown, reflow) {
|
|
10265
|
+
var layoutConfig = {};
|
|
10266
|
+
this.parseConfig(layoutConfig, phoneUp, exports.SmeResponsiveWindowBreakpoints.PhoneUp);
|
|
10267
|
+
this.parseConfig(layoutConfig, phoneDown, exports.SmeResponsiveWindowBreakpoints.PhoneDown);
|
|
10268
|
+
this.parseConfig(layoutConfig, reflow, exports.SmeResponsiveWindowBreakpoints.Reflow);
|
|
10269
|
+
console.log(layoutConfig);
|
|
10270
|
+
return layoutConfig;
|
|
10271
|
+
};
|
|
10272
|
+
LayoutConfigGenerator.prototype.parseConfig = function (layoutConfig, config, smeResponsiveWindowBreakpoints) {
|
|
10273
|
+
if (!config) {
|
|
10274
|
+
layoutConfig[smeResponsiveWindowBreakpoints] = {
|
|
10275
|
+
mode: exports.LayoutItemConfigMode.Default
|
|
10276
|
+
};
|
|
10277
|
+
}
|
|
10278
|
+
else {
|
|
10279
|
+
layoutConfig[smeResponsiveWindowBreakpoints] = {
|
|
10280
|
+
mode: exports.LayoutItemConfigMode.Custom,
|
|
10281
|
+
config: []
|
|
10282
|
+
};
|
|
10283
|
+
for (var i = 0; i <= config.length; i++) {
|
|
10284
|
+
layoutConfig[smeResponsiveWindowBreakpoints].config.push({
|
|
10285
|
+
width: {
|
|
10286
|
+
type: typeof config[i] === 'string' ?
|
|
10287
|
+
exports.LayoutItemConfigPropertyWidthType.Percentage : exports.LayoutItemConfigPropertyWidthType.Number,
|
|
10288
|
+
value: typeof config[i] === 'string' ? parseFloat(config[i]) : config[i]
|
|
10289
|
+
}
|
|
10290
|
+
});
|
|
10291
|
+
}
|
|
10292
|
+
}
|
|
10293
|
+
};
|
|
10294
|
+
return LayoutConfigGenerator;
|
|
10295
|
+
}());
|
|
10296
|
+
|
|
9824
10297
|
var LayoutDefinitionComponent = /** @class */ (function () {
|
|
9825
10298
|
function LayoutDefinitionComponent() {
|
|
9826
10299
|
this.until = Number.MAX_VALUE;
|
|
@@ -9913,11 +10386,11 @@
|
|
|
9913
10386
|
return LayoutItemComponent;
|
|
9914
10387
|
}(CoreBaseComponent));
|
|
9915
10388
|
/** @nocollapse */ LayoutItemComponent.ɵfac = function LayoutItemComponent_Factory(t) { return new (t || LayoutItemComponent)(i0.ɵɵdirectiveInject(i0.Injector)); };
|
|
9916
|
-
/** @nocollapse */ LayoutItemComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LayoutItemComponent, selectors: [["sme-layout-item"]], hostVars:
|
|
10389
|
+
/** @nocollapse */ LayoutItemComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LayoutItemComponent, selectors: [["sme-layout-item"]], hostVars: 10, hostBindings: function LayoutItemComponent_HostBindings(rf, ctx) {
|
|
9917
10390
|
if (rf & 2) {
|
|
9918
|
-
i0.ɵɵstyleProp("width", ctx.width)("padding-right", ctx.paddingRight)("padding-bottom", ctx.paddingBottom);
|
|
10391
|
+
i0.ɵɵstyleProp("width", ctx.width)("padding-right", ctx.paddingRight)("padding-bottom", ctx.paddingBottom)("flex", ctx.flex)("min-width", ctx.minWidth);
|
|
9919
10392
|
}
|
|
9920
|
-
}, inputs: { columnSpan: "columnSpan", caption: "caption", maxWidth: "maxWidth" }, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$e, decls: 2, vars: 1, consts: [["class", "sme-font-family-bold sme-border-bottom-sm sme-border-bottom-color-base-40 sme-padding-bottom-xs sme-margin-vertical-sm", 4, "ngIf"], [1, "sme-font-family-bold", "sme-border-bottom-sm", "sme-border-bottom-color-base-40", "sme-padding-bottom-xs", "sme-margin-vertical-sm"]], template: function LayoutItemComponent_Template(rf, ctx) {
|
|
10393
|
+
}, inputs: { columnSpan: "columnSpan", caption: "caption", customConfig: "customConfig", maxWidth: "maxWidth" }, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$e, decls: 2, vars: 1, consts: [["class", "sme-font-family-bold sme-border-bottom-sm sme-border-bottom-color-base-40 sme-padding-bottom-xs sme-margin-vertical-sm", 4, "ngIf"], [1, "sme-font-family-bold", "sme-border-bottom-sm", "sme-border-bottom-color-base-40", "sme-padding-bottom-xs", "sme-margin-vertical-sm"]], template: function LayoutItemComponent_Template(rf, ctx) {
|
|
9921
10394
|
if (rf & 1) {
|
|
9922
10395
|
i0.ɵɵprojectionDef();
|
|
9923
10396
|
i0.ɵɵtemplate(0, LayoutItemComponent_div_0_Template, 2, 1, "div", 0);
|
|
@@ -9943,15 +10416,45 @@
|
|
|
9943
10416
|
}], paddingBottom: [{
|
|
9944
10417
|
type: i0.HostBinding,
|
|
9945
10418
|
args: ['style.paddingBottom']
|
|
10419
|
+
}], flex: [{
|
|
10420
|
+
type: i0.HostBinding,
|
|
10421
|
+
args: ['style.flex']
|
|
10422
|
+
}], minWidth: [{
|
|
10423
|
+
type: i0.HostBinding,
|
|
10424
|
+
args: ['style.min-width']
|
|
9946
10425
|
}], columnSpan: [{
|
|
9947
10426
|
type: i0.Input
|
|
9948
10427
|
}], caption: [{
|
|
9949
10428
|
type: i0.Input
|
|
10429
|
+
}], customConfig: [{
|
|
10430
|
+
type: i0.Input
|
|
9950
10431
|
}], maxWidth: [{
|
|
9951
10432
|
type: i0.Input
|
|
9952
10433
|
}] });
|
|
9953
10434
|
})();
|
|
9954
10435
|
|
|
10436
|
+
var LayoutResponsiveWindowManager = /** @class */ (function (_super) {
|
|
10437
|
+
__extends(LayoutResponsiveWindowManager, _super);
|
|
10438
|
+
function LayoutResponsiveWindowManager() {
|
|
10439
|
+
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
10440
|
+
_this.name = 'sme-layout';
|
|
10441
|
+
return _this;
|
|
10442
|
+
}
|
|
10443
|
+
LayoutResponsiveWindowManager.prototype.onWindowSizeChanged = function () {
|
|
10444
|
+
if (!this.cssV2) {
|
|
10445
|
+
return;
|
|
10446
|
+
}
|
|
10447
|
+
// Can handle dynamic configuration, custom styling on different size of the window later on.
|
|
10448
|
+
};
|
|
10449
|
+
return LayoutResponsiveWindowManager;
|
|
10450
|
+
}(SmeResponsiveWindowManagerComponent));
|
|
10451
|
+
__decorate([
|
|
10452
|
+
yield_decorator.Yield(),
|
|
10453
|
+
__metadata("design:type", Function),
|
|
10454
|
+
__metadata("design:paramtypes", []),
|
|
10455
|
+
__metadata("design:returntype", void 0)
|
|
10456
|
+
], LayoutResponsiveWindowManager.prototype, "onWindowSizeChanged", null);
|
|
10457
|
+
|
|
9955
10458
|
var _c0$f = [[["sme-layout-item"]]];
|
|
9956
10459
|
var _c1$6 = ["sme-layout-item"];
|
|
9957
10460
|
/**
|
|
@@ -9960,19 +10463,66 @@
|
|
|
9960
10463
|
var LayoutComponent = /** @class */ (function (_super) {
|
|
9961
10464
|
__extends(LayoutComponent, _super);
|
|
9962
10465
|
function LayoutComponent(injector, layout) {
|
|
10466
|
+
var _b;
|
|
9963
10467
|
var _this = _super.call(this, injector) || this;
|
|
9964
|
-
|
|
10468
|
+
/**
|
|
10469
|
+
* The default horizontal space in between layout items.
|
|
10470
|
+
*/
|
|
9965
10471
|
_this.itemHorizontalSpace = 32;
|
|
10472
|
+
/**
|
|
10473
|
+
* The default vertical space in between layout items.
|
|
10474
|
+
*/
|
|
9966
10475
|
_this.itemVerticalSpace = 32;
|
|
10476
|
+
/**
|
|
10477
|
+
* If true, will always try to fill the whole row for each layout item.
|
|
10478
|
+
*/
|
|
9967
10479
|
_this.tryToFillWholeRow = true;
|
|
10480
|
+
/**
|
|
10481
|
+
* The layout definition.
|
|
10482
|
+
*/
|
|
9968
10483
|
_this.definition = {};
|
|
10484
|
+
/**
|
|
10485
|
+
* If false, it will not assign extra paddings to the right for the last layout item.
|
|
10486
|
+
*/
|
|
9969
10487
|
_this.padLastItem = false;
|
|
10488
|
+
/**
|
|
10489
|
+
* If true, not extra right padding when there is only one item that uses the whole width of the row.
|
|
10490
|
+
*/
|
|
9970
10491
|
_this.noExtraRightPaddingOneItemPerRow = true;
|
|
10492
|
+
/**
|
|
10493
|
+
* It determines whether the layout is for settings where it contains a left and right layout item.
|
|
10494
|
+
* If true, will apply special design for settings layout.
|
|
10495
|
+
* On phone-up, the left side navigation layout item will be using a fixed width by default 300px,
|
|
10496
|
+
* the right side layout item will be using the remaining width by default.
|
|
10497
|
+
*
|
|
10498
|
+
* On phone-down or 400% zoom, nothing is different from the regular settings page,
|
|
10499
|
+
* the left right layout will be transformed to top bottom layout.
|
|
10500
|
+
*/
|
|
10501
|
+
_this.layoutConfig = (_b = {},
|
|
10502
|
+
_b[exports.SmeResponsiveWindowBreakpoints.PhoneUp] = { 'mode': exports.LayoutItemConfigMode.Default },
|
|
10503
|
+
_b[exports.SmeResponsiveWindowBreakpoints.PhoneDown] = { 'mode': exports.LayoutItemConfigMode.Default },
|
|
10504
|
+
_b[exports.SmeResponsiveWindowBreakpoints.Reflow] = { 'mode': exports.LayoutItemConfigMode.Default },
|
|
10505
|
+
_b);
|
|
10506
|
+
/**
|
|
10507
|
+
* Implementation of the Layout interface
|
|
10508
|
+
*/
|
|
9971
10509
|
_this.layoutChanged = new i0.EventEmitter();
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
|
|
10510
|
+
/**
|
|
10511
|
+
* Implementation of the Layout interface
|
|
10512
|
+
*/
|
|
10513
|
+
_this.windowBreakpointChanged = new i0.EventEmitter();
|
|
10514
|
+
_this.columnCount = 1;
|
|
10515
|
+
_this.columnSpanTotal = 0;
|
|
10516
|
+
_this.layoutDrivenType = exports.LayoutDrivenType.Default;
|
|
10517
|
+
_this.stylePixel = 'px';
|
|
10518
|
+
if (layout) {
|
|
10519
|
+
_this.layoutResponsiveWindowManager = new LayoutResponsiveWindowManager(layout);
|
|
10520
|
+
// on parent layout changes, re-emit the layout change to our event
|
|
10521
|
+
_this.subscriptions.push(layout.layoutChanged.subscribe((function () { return _this.onLayoutChanged(); })));
|
|
10522
|
+
// on window break point changes, emit the event about critical classes and styling updates signal.
|
|
10523
|
+
_this.subscriptions.push(layout.windowBreakpointChanged.subscribe(function () { return _this.onWindowBreakpointChanged(); }));
|
|
10524
|
+
_this.deferredOnLayoutChanged();
|
|
10525
|
+
}
|
|
9976
10526
|
return _this;
|
|
9977
10527
|
}
|
|
9978
10528
|
Object.defineProperty(LayoutComponent.prototype, "logSourceName", {
|
|
@@ -9992,16 +10542,61 @@
|
|
|
9992
10542
|
enumerable: false,
|
|
9993
10543
|
configurable: true
|
|
9994
10544
|
});
|
|
10545
|
+
Object.defineProperty(LayoutComponent.prototype, "currentLayoutDrivenType", {
|
|
10546
|
+
get: function () {
|
|
10547
|
+
return this.layoutDrivenType;
|
|
10548
|
+
},
|
|
10549
|
+
enumerable: false,
|
|
10550
|
+
configurable: true
|
|
10551
|
+
});
|
|
10552
|
+
Object.defineProperty(LayoutComponent.prototype, "currentWindowBreakpoint", {
|
|
10553
|
+
get: function () {
|
|
10554
|
+
var _a;
|
|
10555
|
+
return (_a = this.layoutResponsiveWindowManager) === null || _a === void 0 ? void 0 : _a.prevSize.size;
|
|
10556
|
+
},
|
|
10557
|
+
enumerable: false,
|
|
10558
|
+
configurable: true
|
|
10559
|
+
});
|
|
10560
|
+
Object.defineProperty(LayoutComponent.prototype, "currentLayoutItems", {
|
|
10561
|
+
get: function () {
|
|
10562
|
+
return this.layoutItems;
|
|
10563
|
+
},
|
|
10564
|
+
enumerable: false,
|
|
10565
|
+
configurable: true
|
|
10566
|
+
});
|
|
9995
10567
|
LayoutComponent.prototype.ngAfterViewInit = function () {
|
|
9996
10568
|
var _this = this;
|
|
9997
10569
|
this.subscriptions.push(this.layoutItems.changes.subscribe(function () { return _this.onLayoutChanged(); }));
|
|
9998
10570
|
};
|
|
10571
|
+
/**
|
|
10572
|
+
* The open API for refreshing the control externally.
|
|
10573
|
+
*/
|
|
10574
|
+
LayoutComponent.prototype.refresh = function () {
|
|
10575
|
+
this.resetFlex();
|
|
10576
|
+
this.onLayoutChanged();
|
|
10577
|
+
};
|
|
9999
10578
|
/**
|
|
10000
10579
|
* On layout changed event handler, occurs every time the layout has been changed.
|
|
10001
10580
|
*/
|
|
10002
10581
|
LayoutComponent.prototype.onLayoutChanged = function () {
|
|
10003
10582
|
this.updateLayout();
|
|
10004
10583
|
};
|
|
10584
|
+
/**
|
|
10585
|
+
* The deferred layout changed handler.
|
|
10586
|
+
*/
|
|
10587
|
+
LayoutComponent.prototype.deferredOnLayoutChanged = function () {
|
|
10588
|
+
this.onLayoutChanged();
|
|
10589
|
+
};
|
|
10590
|
+
/**
|
|
10591
|
+
* The on window breakpoint changed handler.
|
|
10592
|
+
* Adding yield for component to get ElementRef after initialization.
|
|
10593
|
+
*/
|
|
10594
|
+
LayoutComponent.prototype.onWindowBreakpointChanged = function () {
|
|
10595
|
+
if (!this.layoutItems || !this.layoutItems.toArray()) {
|
|
10596
|
+
return;
|
|
10597
|
+
}
|
|
10598
|
+
this.layoutResponsiveWindowManager.onWindowSizeChanged();
|
|
10599
|
+
};
|
|
10005
10600
|
// Adds classes listed to the root component
|
|
10006
10601
|
// On phone down the flex start needs to be flex start to make sure no extra space being generated.
|
|
10007
10602
|
LayoutComponent.prototype.getInitialHostClasses = function () {
|
|
@@ -10012,83 +10607,308 @@
|
|
|
10012
10607
|
LayoutComponent.prototype.updateLayout = function () {
|
|
10013
10608
|
var _this = this;
|
|
10014
10609
|
setTimeout(function () {
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10610
|
+
if (!_this.layoutItems) {
|
|
10611
|
+
return;
|
|
10612
|
+
}
|
|
10613
|
+
var layoutItems = _this.layoutItems.toArray();
|
|
10614
|
+
_this.getTotalColumnSpan(layoutItems);
|
|
10615
|
+
var currentWindowSize = _this.layoutResponsiveWindowManager.prevSize.size;
|
|
10616
|
+
_this.updateLayoutConfig(currentWindowSize);
|
|
10617
|
+
var layoutWidth = _this.hostElement.nativeElement.clientWidth || Number.MAX_VALUE;
|
|
10618
|
+
if (_this.layoutDrivenType === exports.LayoutDrivenType.Default) {
|
|
10022
10619
|
var definitions = _this.definitions.toArray().sort(function (a, b) { return a.until - b.until; });
|
|
10023
10620
|
var previousLayoutDefinition = _this.currentLayoutDefinition;
|
|
10024
|
-
_this.
|
|
10025
|
-
for (var i = definitions.length - 1; i >= 0; i--) {
|
|
10026
|
-
var definitionColumns = definitions[i].columns;
|
|
10027
|
-
if (layoutWidth <= definitions[i].until || (_this.tryToFillWholeRow && columnSpanTotal_1 <= definitionColumns)) {
|
|
10028
|
-
columnCount = definitionColumns;
|
|
10029
|
-
_this.currentLayoutDefinition = definitions[i];
|
|
10030
|
-
}
|
|
10031
|
-
}
|
|
10621
|
+
_this.updateCurrentLayoutDefinition(definitions, layoutWidth);
|
|
10032
10622
|
var itemHorizontalSpacePercentage = Math.round(_this.itemHorizontalSpace * 100 / layoutWidth);
|
|
10033
10623
|
var columnCountModifier = _this.padLastItem ? 0 : 1;
|
|
10034
|
-
var availableLayoutWidthPercentage = 100 - itemHorizontalSpacePercentage * (columnCount - columnCountModifier);
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10624
|
+
var availableLayoutWidthPercentage = 100 - itemHorizontalSpacePercentage * (_this.columnCount - columnCountModifier);
|
|
10625
|
+
_this.layoutDefinitionWithColumnSpanCalculation(layoutItems, availableLayoutWidthPercentage, itemHorizontalSpacePercentage);
|
|
10626
|
+
if (previousLayoutDefinition !== _this.currentLayoutDefinition) {
|
|
10627
|
+
setTimeout(function () {
|
|
10628
|
+
_this.layoutChanged.emit();
|
|
10629
|
+
});
|
|
10630
|
+
}
|
|
10631
|
+
}
|
|
10632
|
+
else if (_this.layoutDrivenType === exports.LayoutDrivenType.ResponsiveWindowManager) {
|
|
10633
|
+
var availableLayoutWidthInPixel = layoutWidth - _this.itemHorizontalSpace;
|
|
10634
|
+
availableLayoutWidthInPixel = availableLayoutWidthInPixel > 0 ? availableLayoutWidthInPixel : 0;
|
|
10635
|
+
if (availableLayoutWidthInPixel <= 0) {
|
|
10636
|
+
return;
|
|
10637
|
+
}
|
|
10638
|
+
_this.configDrivenCalculation(layoutItems, availableLayoutWidthInPixel);
|
|
10639
|
+
}
|
|
10640
|
+
});
|
|
10641
|
+
};
|
|
10642
|
+
LayoutComponent.prototype.updateLayoutConfig = function (currentWindowSize) {
|
|
10643
|
+
if (!currentWindowSize) {
|
|
10644
|
+
this.layoutDrivenType = exports.LayoutDrivenType.Default;
|
|
10645
|
+
return;
|
|
10646
|
+
}
|
|
10647
|
+
var phoneUp = this.layoutConfig.PhoneUp;
|
|
10648
|
+
var phoneDown = this.layoutConfig.PhoneDown;
|
|
10649
|
+
var reflow = this.layoutConfig.Reflow;
|
|
10650
|
+
if (!phoneUp || !phoneDown || !reflow) {
|
|
10651
|
+
logging.Logging.log({
|
|
10652
|
+
level: logLevel.LogLevel.Debug,
|
|
10653
|
+
message: 'Invalid layout config has been passed in',
|
|
10654
|
+
source: 'DataTableComponent.onContentTablePressed'
|
|
10655
|
+
});
|
|
10656
|
+
var defaultMode = { 'mode': exports.LayoutItemConfigMode.Default };
|
|
10657
|
+
if (!phoneUp) {
|
|
10658
|
+
this.layoutConfig.PhoneUp = defaultMode;
|
|
10659
|
+
}
|
|
10660
|
+
if (!phoneDown) {
|
|
10661
|
+
this.layoutConfig.PhoneDown = defaultMode;
|
|
10662
|
+
}
|
|
10663
|
+
if (!reflow) {
|
|
10664
|
+
this.layoutConfig.Reflow = defaultMode;
|
|
10665
|
+
}
|
|
10666
|
+
}
|
|
10667
|
+
var currentConfig = this.layoutConfig[currentWindowSize];
|
|
10668
|
+
if (currentConfig.mode === exports.LayoutItemConfigMode.Default) {
|
|
10669
|
+
this.setLayoutDrivenType(exports.LayoutDrivenType.Default);
|
|
10670
|
+
}
|
|
10671
|
+
else if (currentConfig.mode === exports.LayoutItemConfigMode.Custom && currentConfig.config && currentConfig.config.length) {
|
|
10672
|
+
this.setLayoutDrivenType(exports.LayoutDrivenType.ResponsiveWindowManager);
|
|
10673
|
+
this.currentLayoutItemConfig = currentConfig.config;
|
|
10674
|
+
}
|
|
10675
|
+
};
|
|
10676
|
+
LayoutComponent.prototype.resetFlex = function () {
|
|
10677
|
+
var layoutItems = this.layoutItems.toArray();
|
|
10678
|
+
for (var i = 0; i < layoutItems.length; i++) {
|
|
10679
|
+
var layoutItem = layoutItems[i];
|
|
10680
|
+
if (layoutItem.flex) {
|
|
10681
|
+
layoutItem.flex = undefined;
|
|
10682
|
+
}
|
|
10683
|
+
}
|
|
10684
|
+
};
|
|
10685
|
+
LayoutComponent.prototype.setLayoutDrivenType = function (layoutDrivenType) {
|
|
10686
|
+
if (this.layoutDrivenType === exports.LayoutDrivenType.ResponsiveWindowManager && layoutDrivenType === exports.LayoutDrivenType.Default) {
|
|
10687
|
+
this.resetFlex();
|
|
10688
|
+
}
|
|
10689
|
+
this.layoutDrivenType = layoutDrivenType;
|
|
10690
|
+
};
|
|
10691
|
+
LayoutComponent.prototype.getTotalColumnSpan = function (layoutItems) {
|
|
10692
|
+
var _this = this;
|
|
10693
|
+
this.columnSpanTotal = 0;
|
|
10694
|
+
layoutItems.forEach(function (item) { return _this.columnSpanTotal += item.columnSpan; });
|
|
10695
|
+
};
|
|
10696
|
+
LayoutComponent.prototype.updateCurrentLayoutDefinition = function (definitions, layoutWidth) {
|
|
10697
|
+
this.currentLayoutDefinition = undefined;
|
|
10698
|
+
for (var i = definitions.length - 1; i >= 0; i--) {
|
|
10699
|
+
var definitionColumns = definitions[i].columns;
|
|
10700
|
+
if (layoutWidth <= definitions[i].until || (this.tryToFillWholeRow && this.columnSpanTotal <= definitionColumns)) {
|
|
10701
|
+
this.columnCount = definitionColumns;
|
|
10702
|
+
this.currentLayoutDefinition = definitions[i];
|
|
10703
|
+
}
|
|
10704
|
+
}
|
|
10705
|
+
};
|
|
10706
|
+
LayoutComponent.prototype.layoutDefinitionWithColumnSpanCalculation = function (layoutItems, availableLayoutWidthPercentage, itemHorizontalSpacePercentage) {
|
|
10707
|
+
var _a;
|
|
10708
|
+
var percentageSoFar = 0;
|
|
10709
|
+
var columnIndex = 0;
|
|
10710
|
+
for (var i = 0; i < layoutItems.length; i++) {
|
|
10711
|
+
var percentage = 0;
|
|
10712
|
+
columnIndex += layoutItems[i].columnSpan;
|
|
10713
|
+
if (columnIndex === this.columnCount) {
|
|
10714
|
+
// If true, it means this layout item is the last one in the row.
|
|
10715
|
+
// It ensures the last one in the row use rest of the percentage.
|
|
10716
|
+
// Example: If it's a 3 column layout, the last one's percentage is 33.34%, not 33.33%
|
|
10717
|
+
percentage = 100 - percentageSoFar;
|
|
10718
|
+
percentageSoFar = 0;
|
|
10719
|
+
// 1 column and 1 layout item.
|
|
10720
|
+
if (columnIndex === 1 && this.columnCount === 1 && !this.noExtraRightPaddingOneItemPerRow) {
|
|
10721
|
+
layoutItems[i].paddingRight = '0px';
|
|
10722
|
+
}
|
|
10723
|
+
else {
|
|
10724
|
+
layoutItems[i].paddingRight = this.padLastItem ? this.itemHorizontalSpace + this.stylePixel : '0' + this.stylePixel;
|
|
10725
|
+
}
|
|
10726
|
+
columnIndex = 0;
|
|
10727
|
+
}
|
|
10728
|
+
else {
|
|
10729
|
+
var columnPercentage = Math.round(availableLayoutWidthPercentage * 100 / this.columnCount) / 100;
|
|
10730
|
+
percentage = layoutItems[i].columnSpan * (columnPercentage + itemHorizontalSpacePercentage);
|
|
10731
|
+
percentageSoFar += percentage;
|
|
10732
|
+
if (percentageSoFar > 100) {
|
|
10733
|
+
// put item on next row if it is too big
|
|
10734
|
+
if (percentage > 100) {
|
|
10735
|
+
percentage = 100;
|
|
10736
|
+
}
|
|
10737
|
+
percentageSoFar = 0;
|
|
10738
|
+
columnIndex = 0;
|
|
10739
|
+
layoutItems[i].paddingRight = this.padLastItem ? this.itemHorizontalSpace + this.stylePixel : '0' + this.stylePixel;
|
|
10740
|
+
}
|
|
10741
|
+
else {
|
|
10742
|
+
layoutItems[i].paddingRight = this.itemHorizontalSpace + this.stylePixel;
|
|
10743
|
+
}
|
|
10744
|
+
}
|
|
10745
|
+
if ((_a = this === null || this === void 0 ? void 0 : this.currentLayoutDefinition) === null || _a === void 0 ? void 0 : _a.addBottomPadding) {
|
|
10746
|
+
layoutItems[i].paddingBottom = this.itemVerticalSpace + this.stylePixel;
|
|
10747
|
+
}
|
|
10748
|
+
else {
|
|
10749
|
+
// If bottom padding already exists and currentLayoutDefinition.addBottomPadding is False
|
|
10750
|
+
// Remove the bottom padding.
|
|
10751
|
+
if (layoutItems[i].paddingBottom === this.itemVerticalSpace + this.stylePixel) {
|
|
10752
|
+
layoutItems[i].paddingBottom = '0' + this.stylePixel;
|
|
10753
|
+
}
|
|
10754
|
+
}
|
|
10755
|
+
layoutItems[i].width = percentage + '%';
|
|
10756
|
+
layoutItems[i].ready();
|
|
10757
|
+
}
|
|
10758
|
+
};
|
|
10759
|
+
LayoutComponent.prototype.configDrivenCalculation = function (layoutItems, availableLayoutWidthInPixel) {
|
|
10760
|
+
var isHybridMode = this.updateCustomConfig(layoutItems);
|
|
10761
|
+
if (isHybridMode) {
|
|
10762
|
+
this.configDrivenCalculationHybrid(layoutItems, availableLayoutWidthInPixel);
|
|
10763
|
+
}
|
|
10764
|
+
else {
|
|
10765
|
+
this.configDrivenCalculationDefault(layoutItems, availableLayoutWidthInPixel);
|
|
10766
|
+
}
|
|
10767
|
+
};
|
|
10768
|
+
/**
|
|
10769
|
+
* It deal with configurations that only has either percentage or number.
|
|
10770
|
+
* Aiming at performance optimization.
|
|
10771
|
+
*
|
|
10772
|
+
* @param layoutItems The layout item object array
|
|
10773
|
+
* @param availableLayoutWidthInPixel available width in pixel horizontally.
|
|
10774
|
+
*/
|
|
10775
|
+
LayoutComponent.prototype.configDrivenCalculationDefault = function (layoutItems, availableLayoutWidthInPixel) {
|
|
10776
|
+
var defaultWidthForLayoutItemInPixel = 200;
|
|
10777
|
+
var widthUsedInPixel = 0;
|
|
10778
|
+
var percentageSoFar = 0;
|
|
10779
|
+
for (var i = 0; i < layoutItems.length; i++) {
|
|
10780
|
+
if (layoutItems[i].customConfig.width) {
|
|
10781
|
+
var widthObject = layoutItems[i].customConfig.width;
|
|
10782
|
+
var remainingWidthInPixel = availableLayoutWidthInPixel - widthUsedInPixel;
|
|
10783
|
+
if (widthObject.type === exports.LayoutItemConfigPropertyWidthType.Percentage) {
|
|
10784
|
+
if (widthObject.value > 100 || widthObject.value < 0) {
|
|
10785
|
+
widthObject.value = 100;
|
|
10786
|
+
}
|
|
10787
|
+
var percentage = widthObject.value;
|
|
10788
|
+
percentageSoFar += percentage;
|
|
10789
|
+
var paddingRight = this.itemHorizontalSpace;
|
|
10790
|
+
layoutItems[i].paddingRight = paddingRight.toString().concat(this.stylePixel);
|
|
10791
|
+
layoutItems[i].width = percentage + '%';
|
|
10792
|
+
if (percentageSoFar > 100) {
|
|
10045
10793
|
percentageSoFar = 0;
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10794
|
+
}
|
|
10795
|
+
}
|
|
10796
|
+
else if (widthObject.type === exports.LayoutItemConfigPropertyWidthType.Number) {
|
|
10797
|
+
if (widthObject.value < 0) {
|
|
10798
|
+
widthObject.value =
|
|
10799
|
+
defaultWidthForLayoutItemInPixel <= remainingWidthInPixel ?
|
|
10800
|
+
defaultWidthForLayoutItemInPixel : remainingWidthInPixel;
|
|
10801
|
+
}
|
|
10802
|
+
widthUsedInPixel += widthObject.value;
|
|
10803
|
+
// how to determine if it is the last item in a row?
|
|
10804
|
+
var paddingRight = this.itemHorizontalSpace;
|
|
10805
|
+
widthUsedInPixel += paddingRight;
|
|
10806
|
+
layoutItems[i].paddingRight = paddingRight.toString().concat(this.stylePixel);
|
|
10807
|
+
layoutItems[i].width = widthObject.value + this.stylePixel;
|
|
10808
|
+
}
|
|
10809
|
+
else {
|
|
10810
|
+
logging.Logging.log({
|
|
10811
|
+
level: logLevel.LogLevel.Debug,
|
|
10812
|
+
message: 'Invalid width',
|
|
10813
|
+
source: 'LayoutComponent.configDrivenCalculationDefault'
|
|
10814
|
+
});
|
|
10815
|
+
}
|
|
10816
|
+
}
|
|
10817
|
+
else {
|
|
10818
|
+
logging.Logging.log({
|
|
10819
|
+
level: logLevel.LogLevel.Debug,
|
|
10820
|
+
message: 'Invalid width',
|
|
10821
|
+
source: 'LayoutComponent.configDrivenCalculationDefault'
|
|
10822
|
+
});
|
|
10823
|
+
}
|
|
10824
|
+
layoutItems[i].ready();
|
|
10825
|
+
}
|
|
10826
|
+
};
|
|
10827
|
+
/**
|
|
10828
|
+
* It deal with configurations that only has both percentage and number.
|
|
10829
|
+
* Aiming at performance optimization.
|
|
10830
|
+
*
|
|
10831
|
+
* @param layoutItems The layout item object array
|
|
10832
|
+
* @param availableLayoutWidthInPixel available width in pixel horizontally.
|
|
10833
|
+
*/
|
|
10834
|
+
LayoutComponent.prototype.configDrivenCalculationHybrid = function (layoutItems, availableLayoutWidthInPixel) {
|
|
10835
|
+
var defaultWidthForLayoutItemInPixel = 200;
|
|
10836
|
+
var widthUsedInPixel = 0;
|
|
10837
|
+
for (var i = 0; i < layoutItems.length; i++) {
|
|
10838
|
+
if (layoutItems[i].customConfig.width) {
|
|
10839
|
+
var widthObject = layoutItems[i].customConfig.width;
|
|
10840
|
+
var remainingWidthInPixel = availableLayoutWidthInPixel - widthUsedInPixel;
|
|
10841
|
+
if (widthObject.type === exports.LayoutItemConfigPropertyWidthType.Percentage) {
|
|
10842
|
+
if (widthObject.value > 100 || widthObject.value < 0) {
|
|
10843
|
+
widthObject.value = 100;
|
|
10844
|
+
}
|
|
10845
|
+
// how to determine if it is the last item in a row?
|
|
10846
|
+
var paddingRight = this.itemHorizontalSpace;
|
|
10847
|
+
widthUsedInPixel += paddingRight;
|
|
10848
|
+
layoutItems[i].paddingRight = paddingRight.toString().concat(this.stylePixel);
|
|
10849
|
+
var potentialWidthInPixel = (widthObject.value / 100) * remainingWidthInPixel;
|
|
10850
|
+
if (potentialWidthInPixel === 0) {
|
|
10851
|
+
widthUsedInPixel = 0;
|
|
10852
|
+
widthUsedInPixel += paddingRight;
|
|
10853
|
+
potentialWidthInPixel = (widthObject.value / 100) * (availableLayoutWidthInPixel - widthUsedInPixel);
|
|
10054
10854
|
}
|
|
10055
10855
|
else {
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
// put item on next row if it is too big
|
|
10061
|
-
if (percentage > 100) {
|
|
10062
|
-
percentage = 100;
|
|
10063
|
-
}
|
|
10064
|
-
percentageSoFar = 0;
|
|
10065
|
-
columnIndex = 0;
|
|
10066
|
-
layoutItems[i].paddingRight = _this.padLastItem ? _this.itemHorizontalSpace + 'px' : '0px';
|
|
10856
|
+
if (potentialWidthInPixel >= remainingWidthInPixel) {
|
|
10857
|
+
potentialWidthInPixel = remainingWidthInPixel;
|
|
10858
|
+
// resets the used pixel for a new row.
|
|
10859
|
+
widthUsedInPixel = 0;
|
|
10067
10860
|
}
|
|
10068
10861
|
else {
|
|
10069
|
-
|
|
10862
|
+
widthUsedInPixel += potentialWidthInPixel;
|
|
10070
10863
|
}
|
|
10864
|
+
layoutItems[i].flex = '1 0 0';
|
|
10865
|
+
layoutItems[i].minWidth = defaultWidthForLayoutItemInPixel.toString().concat(this.stylePixel);
|
|
10071
10866
|
}
|
|
10072
|
-
|
|
10073
|
-
|
|
10074
|
-
|
|
10075
|
-
|
|
10076
|
-
|
|
10077
|
-
|
|
10078
|
-
|
|
10079
|
-
layoutItems[i].paddingBottom = 0 + 'px';
|
|
10080
|
-
}
|
|
10867
|
+
layoutItems[i].width = potentialWidthInPixel + this.stylePixel;
|
|
10868
|
+
}
|
|
10869
|
+
else if (widthObject.type === exports.LayoutItemConfigPropertyWidthType.Number) {
|
|
10870
|
+
if (widthObject.value < 0) {
|
|
10871
|
+
widthObject.value =
|
|
10872
|
+
defaultWidthForLayoutItemInPixel <= remainingWidthInPixel ?
|
|
10873
|
+
defaultWidthForLayoutItemInPixel : remainingWidthInPixel;
|
|
10081
10874
|
}
|
|
10082
|
-
|
|
10083
|
-
|
|
10875
|
+
widthUsedInPixel += widthObject.value;
|
|
10876
|
+
// how to determine if it is the last item in a row?
|
|
10877
|
+
var paddingRight = this.itemHorizontalSpace;
|
|
10878
|
+
widthUsedInPixel += paddingRight;
|
|
10879
|
+
layoutItems[i].paddingRight = paddingRight.toString().concat(this.stylePixel);
|
|
10880
|
+
layoutItems[i].width = widthObject.value + this.stylePixel;
|
|
10084
10881
|
}
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
|
|
10882
|
+
else {
|
|
10883
|
+
logging.Logging.log({
|
|
10884
|
+
level: logLevel.LogLevel.Debug,
|
|
10885
|
+
message: 'Invalid width',
|
|
10886
|
+
source: 'LayoutComponent.configDrivenCalculationHybrid'
|
|
10088
10887
|
});
|
|
10089
10888
|
}
|
|
10090
10889
|
}
|
|
10091
|
-
|
|
10890
|
+
else {
|
|
10891
|
+
logging.Logging.log({
|
|
10892
|
+
level: logLevel.LogLevel.Debug,
|
|
10893
|
+
message: 'Invalid width',
|
|
10894
|
+
source: 'LayoutComponent.configDrivenCalculationHybrid'
|
|
10895
|
+
});
|
|
10896
|
+
}
|
|
10897
|
+
layoutItems[i].ready();
|
|
10898
|
+
}
|
|
10899
|
+
};
|
|
10900
|
+
LayoutComponent.prototype.updateCustomConfig = function (layoutItems) {
|
|
10901
|
+
var widthType = [];
|
|
10902
|
+
for (var i = 0; i < layoutItems.length; i++) {
|
|
10903
|
+
layoutItems[i].customConfig = this.currentLayoutItemConfig[i];
|
|
10904
|
+
if (!widthType.includes(layoutItems[i].customConfig.width.type)) {
|
|
10905
|
+
widthType.push(layoutItems[i].customConfig.width.type);
|
|
10906
|
+
}
|
|
10907
|
+
}
|
|
10908
|
+
if (widthType.length <= 1) {
|
|
10909
|
+
return false;
|
|
10910
|
+
}
|
|
10911
|
+
return true;
|
|
10092
10912
|
};
|
|
10093
10913
|
return LayoutComponent;
|
|
10094
10914
|
}(CoreBaseComponent));
|
|
@@ -10103,12 +10923,30 @@
|
|
|
10103
10923
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.layoutItems = _t);
|
|
10104
10924
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.definitions = _t);
|
|
10105
10925
|
}
|
|
10106
|
-
}, inputs: { itemHorizontalSpace: "itemHorizontalSpace", itemVerticalSpace: "itemVerticalSpace", tryToFillWholeRow: "tryToFillWholeRow", definition: "definition", padLastItem: "padLastItem", noExtraRightPaddingOneItemPerRow: "noExtraRightPaddingOneItemPerRow" }, outputs: { layoutChanged: "layoutChanged" }, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c1$6, decls: 1, vars: 0, template: function LayoutComponent_Template(rf, ctx) {
|
|
10926
|
+
}, inputs: { itemHorizontalSpace: "itemHorizontalSpace", itemVerticalSpace: "itemVerticalSpace", tryToFillWholeRow: "tryToFillWholeRow", definition: "definition", padLastItem: "padLastItem", noExtraRightPaddingOneItemPerRow: "noExtraRightPaddingOneItemPerRow", layoutConfig: "layoutConfig" }, outputs: { layoutChanged: "layoutChanged", windowBreakpointChanged: "windowBreakpointChanged" }, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c1$6, decls: 1, vars: 0, template: function LayoutComponent_Template(rf, ctx) {
|
|
10107
10927
|
if (rf & 1) {
|
|
10108
10928
|
i0.ɵɵprojectionDef(_c0$f);
|
|
10109
10929
|
i0.ɵɵprojection(0);
|
|
10110
10930
|
}
|
|
10111
10931
|
}, encapsulation: 2 });
|
|
10932
|
+
__decorate([
|
|
10933
|
+
debounce_decorators.Debounce(),
|
|
10934
|
+
__metadata("design:type", Function),
|
|
10935
|
+
__metadata("design:paramtypes", []),
|
|
10936
|
+
__metadata("design:returntype", void 0)
|
|
10937
|
+
], LayoutComponent.prototype, "refresh", null);
|
|
10938
|
+
__decorate([
|
|
10939
|
+
debounce_decorators.Debounce(),
|
|
10940
|
+
__metadata("design:type", Function),
|
|
10941
|
+
__metadata("design:paramtypes", []),
|
|
10942
|
+
__metadata("design:returntype", void 0)
|
|
10943
|
+
], LayoutComponent.prototype, "deferredOnLayoutChanged", null);
|
|
10944
|
+
__decorate([
|
|
10945
|
+
yield_decorator.Yield(),
|
|
10946
|
+
__metadata("design:type", Function),
|
|
10947
|
+
__metadata("design:paramtypes", []),
|
|
10948
|
+
__metadata("design:returntype", void 0)
|
|
10949
|
+
], LayoutComponent.prototype, "onWindowBreakpointChanged", null);
|
|
10112
10950
|
(function () {
|
|
10113
10951
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LayoutComponent, [{
|
|
10114
10952
|
type: i0.Component,
|
|
@@ -10139,9 +10977,13 @@
|
|
|
10139
10977
|
type: i0.Input
|
|
10140
10978
|
}], noExtraRightPaddingOneItemPerRow: [{
|
|
10141
10979
|
type: i0.Input
|
|
10980
|
+
}], layoutConfig: [{
|
|
10981
|
+
type: i0.Input
|
|
10142
10982
|
}], layoutChanged: [{
|
|
10143
10983
|
type: i0.Output
|
|
10144
|
-
}]
|
|
10984
|
+
}], windowBreakpointChanged: [{
|
|
10985
|
+
type: i0.Output
|
|
10986
|
+
}], refresh: [], deferredOnLayoutChanged: [], onWindowBreakpointChanged: [] });
|
|
10145
10987
|
})();
|
|
10146
10988
|
|
|
10147
10989
|
var _c0$g = [[["sme-editable-layout-item"]]];
|
|
@@ -27807,411 +28649,6 @@
|
|
|
27807
28649
|
__metadata("design:returntype", void 0)
|
|
27808
28650
|
], DataTableAccessibilityManager.prototype, "focusInTableCell", null);
|
|
27809
28651
|
|
|
27810
|
-
(function (SmeResponsiveWindowBreakpointsValue) {
|
|
27811
|
-
SmeResponsiveWindowBreakpointsValue[SmeResponsiveWindowBreakpointsValue["Reflow"] = 399.98] = "Reflow";
|
|
27812
|
-
SmeResponsiveWindowBreakpointsValue[SmeResponsiveWindowBreakpointsValue["PhoneDown"] = 767.98] = "PhoneDown";
|
|
27813
|
-
SmeResponsiveWindowBreakpointsValue[SmeResponsiveWindowBreakpointsValue["PhoneUp"] = Number.MAX_SAFE_INTEGER] = "PhoneUp";
|
|
27814
|
-
})(exports.SmeResponsiveWindowBreakpointsValue || (exports.SmeResponsiveWindowBreakpointsValue = {}));
|
|
27815
|
-
(function (SmeResponsiveWindowBreakpoints) {
|
|
27816
|
-
SmeResponsiveWindowBreakpoints["Reflow"] = "Reflow";
|
|
27817
|
-
SmeResponsiveWindowBreakpoints["PhoneDown"] = "PhoneDown";
|
|
27818
|
-
SmeResponsiveWindowBreakpoints["PhoneUp"] = "PhoneUp";
|
|
27819
|
-
})(exports.SmeResponsiveWindowBreakpoints || (exports.SmeResponsiveWindowBreakpoints = {}));
|
|
27820
|
-
// tslint:disable-next-line: directive-class-suffix
|
|
27821
|
-
var SmeResponsiveWindowManagerComponent = /** @class */ (function () {
|
|
27822
|
-
/**
|
|
27823
|
-
* The manager supports layout component and in the meantime listening to the window size change event.
|
|
27824
|
-
* @param layout the layout component.
|
|
27825
|
-
*/
|
|
27826
|
-
function SmeResponsiveWindowManagerComponent(layout) {
|
|
27827
|
-
var _this = this;
|
|
27828
|
-
this.layout = layout;
|
|
27829
|
-
/**
|
|
27830
|
-
* It defines whether the current window size is for super small window.
|
|
27831
|
-
*/
|
|
27832
|
-
this.internalReflowMode = false;
|
|
27833
|
-
/**
|
|
27834
|
-
* It defines whether the current window size is phone down.
|
|
27835
|
-
*/
|
|
27836
|
-
this.internalPhoneDown = false;
|
|
27837
|
-
/**
|
|
27838
|
-
* It defines whether the current window size is phone up.
|
|
27839
|
-
*/
|
|
27840
|
-
this.internalPhoneUp = false;
|
|
27841
|
-
/**
|
|
27842
|
-
* It defines whether the current solution/tool is using css v2 to support responsive window.
|
|
27843
|
-
*/
|
|
27844
|
-
this.internalCssV2 = false;
|
|
27845
|
-
/**
|
|
27846
|
-
* The array for subscription.
|
|
27847
|
-
*/
|
|
27848
|
-
this.subscriptions = [];
|
|
27849
|
-
this.setIsCssV2Enabled();
|
|
27850
|
-
if (this.layout) {
|
|
27851
|
-
// on parent layout changes, re-emit the layout change to our event
|
|
27852
|
-
this.subscriptions.push(layout.layoutChanged.subscribe((function () { return _this.onLayoutChanged(); })));
|
|
27853
|
-
// on window break point changes, emit the event about critical classes and styling updates signal.
|
|
27854
|
-
this.subscriptions.push(layout.windowBreakpointChanged.subscribe(function () { return _this.onWindowBreakpointChanged(); }));
|
|
27855
|
-
this.deferredOnLayoutChanged();
|
|
27856
|
-
}
|
|
27857
|
-
}
|
|
27858
|
-
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "responsiveWindowState", {
|
|
27859
|
-
/**
|
|
27860
|
-
* Gets the current window responsive state.
|
|
27861
|
-
*/
|
|
27862
|
-
get: function () {
|
|
27863
|
-
return this.internalResponsiveWindowMode;
|
|
27864
|
-
},
|
|
27865
|
-
/**
|
|
27866
|
-
* Sets the current window responsive state.
|
|
27867
|
-
*/
|
|
27868
|
-
set: function (input) {
|
|
27869
|
-
var _a;
|
|
27870
|
-
var prevResponsiveWindowState = this.internalResponsiveWindowMode;
|
|
27871
|
-
this.internalResponsiveWindowMode = input;
|
|
27872
|
-
if (prevResponsiveWindowState !== this.internalResponsiveWindowMode) {
|
|
27873
|
-
(_a = this.layout) === null || _a === void 0 ? void 0 : _a.windowBreakpointChanged.emit();
|
|
27874
|
-
}
|
|
27875
|
-
},
|
|
27876
|
-
enumerable: false,
|
|
27877
|
-
configurable: true
|
|
27878
|
-
});
|
|
27879
|
-
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "cssV2", {
|
|
27880
|
-
/**
|
|
27881
|
-
* Gets the value indicating whether css v2 should be used.
|
|
27882
|
-
*/
|
|
27883
|
-
get: function () {
|
|
27884
|
-
return this.internalCssV2;
|
|
27885
|
-
},
|
|
27886
|
-
/**
|
|
27887
|
-
* It sets the value for whether the current tool/solution is using css v2 for window responsiveness.
|
|
27888
|
-
*/
|
|
27889
|
-
set: function (input) {
|
|
27890
|
-
this.internalCssV2 = !!input;
|
|
27891
|
-
},
|
|
27892
|
-
enumerable: false,
|
|
27893
|
-
configurable: true
|
|
27894
|
-
});
|
|
27895
|
-
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "phoneDown", {
|
|
27896
|
-
/**
|
|
27897
|
-
* Gets the phone down mode.
|
|
27898
|
-
*/
|
|
27899
|
-
get: function () {
|
|
27900
|
-
return this.internalPhoneDown;
|
|
27901
|
-
},
|
|
27902
|
-
/**
|
|
27903
|
-
* Sets the phone down mode.
|
|
27904
|
-
*/
|
|
27905
|
-
set: function (input) {
|
|
27906
|
-
this.internalPhoneDown = !!input;
|
|
27907
|
-
},
|
|
27908
|
-
enumerable: false,
|
|
27909
|
-
configurable: true
|
|
27910
|
-
});
|
|
27911
|
-
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "phoneUp", {
|
|
27912
|
-
/**
|
|
27913
|
-
* Gets the phone up mode.
|
|
27914
|
-
*/
|
|
27915
|
-
get: function () {
|
|
27916
|
-
return this.internalPhoneUp;
|
|
27917
|
-
},
|
|
27918
|
-
/**
|
|
27919
|
-
* Set the phone up mode.
|
|
27920
|
-
*/
|
|
27921
|
-
set: function (input) {
|
|
27922
|
-
this.internalPhoneUp = !!input;
|
|
27923
|
-
},
|
|
27924
|
-
enumerable: false,
|
|
27925
|
-
configurable: true
|
|
27926
|
-
});
|
|
27927
|
-
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "reflowMode", {
|
|
27928
|
-
/**
|
|
27929
|
-
* Gets the reflow mode.
|
|
27930
|
-
*/
|
|
27931
|
-
get: function () {
|
|
27932
|
-
return this.internalReflowMode;
|
|
27933
|
-
},
|
|
27934
|
-
/**
|
|
27935
|
-
* Sets the reflow mode.
|
|
27936
|
-
*/
|
|
27937
|
-
set: function (input) {
|
|
27938
|
-
this.internalReflowMode = !!input;
|
|
27939
|
-
},
|
|
27940
|
-
enumerable: false,
|
|
27941
|
-
configurable: true
|
|
27942
|
-
});
|
|
27943
|
-
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "width", {
|
|
27944
|
-
/**
|
|
27945
|
-
* Gets the width of the window from the window object.
|
|
27946
|
-
* Should only be called on layout or window size change.
|
|
27947
|
-
*/
|
|
27948
|
-
get: function () {
|
|
27949
|
-
return window === null || window === void 0 ? void 0 : window.innerWidth;
|
|
27950
|
-
},
|
|
27951
|
-
enumerable: false,
|
|
27952
|
-
configurable: true
|
|
27953
|
-
});
|
|
27954
|
-
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "height", {
|
|
27955
|
-
/**
|
|
27956
|
-
* Gets the height of the window from the window object.
|
|
27957
|
-
* Should only be called on layout or window size change.
|
|
27958
|
-
*/
|
|
27959
|
-
get: function () {
|
|
27960
|
-
return window === null || window === void 0 ? void 0 : window.innerHeight;
|
|
27961
|
-
},
|
|
27962
|
-
enumerable: false,
|
|
27963
|
-
configurable: true
|
|
27964
|
-
});
|
|
27965
|
-
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "prevSize", {
|
|
27966
|
-
/**
|
|
27967
|
-
* Gets the last known window responsive data.
|
|
27968
|
-
*/
|
|
27969
|
-
get: function () {
|
|
27970
|
-
var _a, _b;
|
|
27971
|
-
if (((_a = this.internalPrevSize) === null || _a === void 0 ? void 0 : _a.width) === this.width && ((_b = this.internalPrevSize) === null || _b === void 0 ? void 0 : _b.height) === this.height) {
|
|
27972
|
-
return this.internalPrevSize;
|
|
27973
|
-
}
|
|
27974
|
-
else {
|
|
27975
|
-
return this.getSmeResponsiveWindowData();
|
|
27976
|
-
}
|
|
27977
|
-
},
|
|
27978
|
-
enumerable: false,
|
|
27979
|
-
configurable: true
|
|
27980
|
-
});
|
|
27981
|
-
Object.defineProperty(SmeResponsiveWindowManagerComponent.prototype, "size", {
|
|
27982
|
-
/**
|
|
27983
|
-
* Gets the window responsive break points.
|
|
27984
|
-
*/
|
|
27985
|
-
get: function () {
|
|
27986
|
-
var width = this.width;
|
|
27987
|
-
if (width <= exports.SmeResponsiveWindowBreakpointsValue.Reflow) {
|
|
27988
|
-
this.reflowMode = true;
|
|
27989
|
-
this.phoneDown = false;
|
|
27990
|
-
this.phoneUp = false;
|
|
27991
|
-
this.responsiveWindowState = exports.SmeResponsiveWindowBreakpoints.Reflow;
|
|
27992
|
-
}
|
|
27993
|
-
else if (width <= exports.SmeResponsiveWindowBreakpointsValue.PhoneDown) {
|
|
27994
|
-
this.reflowMode = false;
|
|
27995
|
-
this.phoneDown = true;
|
|
27996
|
-
this.phoneUp = false;
|
|
27997
|
-
this.responsiveWindowState = exports.SmeResponsiveWindowBreakpoints.PhoneDown;
|
|
27998
|
-
}
|
|
27999
|
-
else {
|
|
28000
|
-
this.reflowMode = false;
|
|
28001
|
-
this.phoneDown = false;
|
|
28002
|
-
this.phoneUp = true;
|
|
28003
|
-
this.responsiveWindowState = exports.SmeResponsiveWindowBreakpoints.PhoneUp;
|
|
28004
|
-
}
|
|
28005
|
-
return this.responsiveWindowState;
|
|
28006
|
-
},
|
|
28007
|
-
enumerable: false,
|
|
28008
|
-
configurable: true
|
|
28009
|
-
});
|
|
28010
|
-
/**
|
|
28011
|
-
* It sets whether the current solution/tool is using the css v2 for window responsiveness.
|
|
28012
|
-
*/
|
|
28013
|
-
SmeResponsiveWindowManagerComponent.prototype.setIsCssV2Enabled = function () {
|
|
28014
|
-
this.cssV2 = this.isUsingCssV2();
|
|
28015
|
-
};
|
|
28016
|
-
/**
|
|
28017
|
-
* The implementation for checking whether the styles are being set.
|
|
28018
|
-
* @returns true if the current tool/solution is using css v2 for window responsiveness.
|
|
28019
|
-
*/
|
|
28020
|
-
SmeResponsiveWindowManagerComponent.prototype.isUsingCssV2 = function () {
|
|
28021
|
-
var head = document.getElementsByTagName('head')[0];
|
|
28022
|
-
var links = head.querySelectorAll('link');
|
|
28023
|
-
var cssV2 = true;
|
|
28024
|
-
// sme shell root would be containing style.css and either main.css or main-v2.css
|
|
28025
|
-
// thus as long as it is not main.css, should be using css-v2
|
|
28026
|
-
for (var i = 0; i < links.length; i++) {
|
|
28027
|
-
var link = links[i];
|
|
28028
|
-
if (link.href && link.href.includes('main.css')) {
|
|
28029
|
-
cssV2 = false;
|
|
28030
|
-
break;
|
|
28031
|
-
}
|
|
28032
|
-
}
|
|
28033
|
-
return cssV2;
|
|
28034
|
-
};
|
|
28035
|
-
/**
|
|
28036
|
-
* The functionality to update the core variables for window responsive data.
|
|
28037
|
-
* @returns The SmeResponsiveWindowData object
|
|
28038
|
-
*/
|
|
28039
|
-
SmeResponsiveWindowManagerComponent.prototype.getSmeResponsiveWindowData = function () {
|
|
28040
|
-
// on window size or layout change, gets the width and height from the window object.
|
|
28041
|
-
var width = this.width;
|
|
28042
|
-
var height = this.height;
|
|
28043
|
-
// based on the window size information, calculates the core paramters.
|
|
28044
|
-
var size = this.size;
|
|
28045
|
-
// the 3 gets above sets these following 3 parameters.
|
|
28046
|
-
var reflowMode = this.reflowMode;
|
|
28047
|
-
var phoneDown = this.phoneDown;
|
|
28048
|
-
var phoneUp = this.phoneUp;
|
|
28049
|
-
// sets the object and return.
|
|
28050
|
-
this.internalPrevSize = {
|
|
28051
|
-
width: width,
|
|
28052
|
-
height: height,
|
|
28053
|
-
size: size,
|
|
28054
|
-
reflowMode: reflowMode,
|
|
28055
|
-
phoneDown: phoneDown,
|
|
28056
|
-
phoneUp: phoneUp
|
|
28057
|
-
};
|
|
28058
|
-
return this.internalPrevSize;
|
|
28059
|
-
};
|
|
28060
|
-
/**
|
|
28061
|
-
* On layout changed event handler, occurs every time the layout has been changed.
|
|
28062
|
-
*/
|
|
28063
|
-
SmeResponsiveWindowManagerComponent.prototype.onLayoutChanged = function () {
|
|
28064
|
-
this.getSmeResponsiveWindowData();
|
|
28065
|
-
};
|
|
28066
|
-
/**
|
|
28067
|
-
* The deferred layout changed handler.
|
|
28068
|
-
*/
|
|
28069
|
-
SmeResponsiveWindowManagerComponent.prototype.deferredOnLayoutChanged = function () {
|
|
28070
|
-
this.onLayoutChanged();
|
|
28071
|
-
};
|
|
28072
|
-
/**
|
|
28073
|
-
* To respond to a layout breakpoint changed event.
|
|
28074
|
-
* @returns void
|
|
28075
|
-
*/
|
|
28076
|
-
SmeResponsiveWindowManagerComponent.prototype.onWindowBreakpointChanged = function () {
|
|
28077
|
-
return;
|
|
28078
|
-
};
|
|
28079
|
-
/**
|
|
28080
|
-
* Gets the parent element by html tag. By default, go up 10 levels for enhanced performance.
|
|
28081
|
-
* @param inputElement The input element.
|
|
28082
|
-
* @returns The targeted html element get by the html tag
|
|
28083
|
-
*/
|
|
28084
|
-
SmeResponsiveWindowManagerComponent.prototype.getParentElementByTag = function (inputElement, parentHtmlTags, levelExternal, customKeywords, untilTagName) {
|
|
28085
|
-
if (parentHtmlTags === void 0) { parentHtmlTags = ['sme-pivot', 'sme-split-view', 'sme-settings-page']; }
|
|
28086
|
-
if (levelExternal === void 0) { levelExternal = 10; }
|
|
28087
|
-
if (!inputElement) {
|
|
28088
|
-
return undefined;
|
|
28089
|
-
}
|
|
28090
|
-
var level = levelExternal;
|
|
28091
|
-
var found = false;
|
|
28092
|
-
var parent = inputElement;
|
|
28093
|
-
while (level > 0 && !found) {
|
|
28094
|
-
if (parent) {
|
|
28095
|
-
parent = parent.parentElement;
|
|
28096
|
-
}
|
|
28097
|
-
var parentTagName = parent === null || parent === void 0 ? void 0 : parent.tagName.toLocaleLowerCase();
|
|
28098
|
-
if (untilTagName) {
|
|
28099
|
-
if (parentTagName === untilTagName.toLowerCase()) {
|
|
28100
|
-
return undefined;
|
|
28101
|
-
}
|
|
28102
|
-
}
|
|
28103
|
-
if (parentHtmlTags.includes(parentTagName) || (customKeywords !== undefined && (parentTagName === null || parentTagName === void 0 ? void 0 : parentTagName.includes(customKeywords)))) {
|
|
28104
|
-
found = true;
|
|
28105
|
-
return parent;
|
|
28106
|
-
}
|
|
28107
|
-
level -= 1;
|
|
28108
|
-
}
|
|
28109
|
-
return undefined;
|
|
28110
|
-
};
|
|
28111
|
-
/**
|
|
28112
|
-
* The core algorithm for adding and removing classes based on window size and window size settings.
|
|
28113
|
-
* @param settings the settings object
|
|
28114
|
-
* @param curSettings the current setting
|
|
28115
|
-
* @param element the html element for setting up classes.
|
|
28116
|
-
* @returns void.
|
|
28117
|
-
*/
|
|
28118
|
-
SmeResponsiveWindowManagerComponent.prototype.updateClassArrayOnWindowSize = function (settings, curSettings, element) {
|
|
28119
|
-
if (!settings) {
|
|
28120
|
-
return;
|
|
28121
|
-
}
|
|
28122
|
-
settings = JSON.parse(JSON.stringify(settings));
|
|
28123
|
-
var phoneDown = JSON.parse(JSON.stringify(settings.phoneDown));
|
|
28124
|
-
var phoneUp = JSON.parse(JSON.stringify(settings.phoneUp));
|
|
28125
|
-
var reflow = JSON.parse(JSON.stringify(settings.reflow));
|
|
28126
|
-
var toBeRemovedClassList = [];
|
|
28127
|
-
var toBeAddedClassList = [];
|
|
28128
|
-
switch (curSettings) {
|
|
28129
|
-
case 'phoneUp':
|
|
28130
|
-
toBeAddedClassList = phoneUp;
|
|
28131
|
-
toBeRemovedClassList = phoneDown;
|
|
28132
|
-
toBeRemovedClassList = this.uniqueArray(toBeRemovedClassList, reflow);
|
|
28133
|
-
break;
|
|
28134
|
-
case 'phoneDown':
|
|
28135
|
-
toBeAddedClassList = phoneDown;
|
|
28136
|
-
toBeRemovedClassList = phoneUp;
|
|
28137
|
-
toBeRemovedClassList = this.uniqueArray(toBeRemovedClassList, reflow);
|
|
28138
|
-
break;
|
|
28139
|
-
case 'reflow':
|
|
28140
|
-
toBeAddedClassList = reflow;
|
|
28141
|
-
toBeRemovedClassList = phoneDown;
|
|
28142
|
-
toBeRemovedClassList = this.uniqueArray(toBeRemovedClassList, phoneUp);
|
|
28143
|
-
break;
|
|
28144
|
-
}
|
|
28145
|
-
toBeRemovedClassList = this.removeExistedItem(toBeRemovedClassList, toBeAddedClassList);
|
|
28146
|
-
for (var i = 0; i < toBeRemovedClassList.length; i++) {
|
|
28147
|
-
if (element.classList.contains(toBeRemovedClassList[i])) {
|
|
28148
|
-
element.classList.remove(toBeRemovedClassList[i]);
|
|
28149
|
-
}
|
|
28150
|
-
}
|
|
28151
|
-
for (var i = 0; i < toBeAddedClassList.length; i++) {
|
|
28152
|
-
if (!element.classList.contains(toBeAddedClassList[i])) {
|
|
28153
|
-
element.classList.add(toBeAddedClassList[i]);
|
|
28154
|
-
}
|
|
28155
|
-
}
|
|
28156
|
-
};
|
|
28157
|
-
/**
|
|
28158
|
-
* Merge two arrays with unique items.
|
|
28159
|
-
* @param arrayA the input array A
|
|
28160
|
-
* @param arrayB the input array B
|
|
28161
|
-
* @returns an array that contains unique items from array A and array B
|
|
28162
|
-
*/
|
|
28163
|
-
SmeResponsiveWindowManagerComponent.prototype.uniqueArray = function (arrayA, arrayB) {
|
|
28164
|
-
if (arrayB && arrayB.length) {
|
|
28165
|
-
for (var i = 0; i < arrayB.length; i++) {
|
|
28166
|
-
if (!arrayA.includes(arrayB[i])) {
|
|
28167
|
-
arrayA.push(arrayB[i]);
|
|
28168
|
-
}
|
|
28169
|
-
}
|
|
28170
|
-
}
|
|
28171
|
-
return arrayA;
|
|
28172
|
-
};
|
|
28173
|
-
/**
|
|
28174
|
-
* Guarantees will not remove the classes that needs to be added.
|
|
28175
|
-
* @param toBeRemovedClassList the list of classes that needs to be removed.
|
|
28176
|
-
* @param toBeAddedClassList the list of classes that needs to be added.
|
|
28177
|
-
* @returns the list of classes that needs to be removed and doesn't overlap with the classes that needs to be added.
|
|
28178
|
-
*/
|
|
28179
|
-
SmeResponsiveWindowManagerComponent.prototype.removeExistedItem = function (toBeRemovedClassList, toBeAddedClassList) {
|
|
28180
|
-
if (!toBeAddedClassList || !toBeAddedClassList.length) {
|
|
28181
|
-
return toBeRemovedClassList;
|
|
28182
|
-
}
|
|
28183
|
-
if (!toBeRemovedClassList || !toBeRemovedClassList.length) {
|
|
28184
|
-
return [];
|
|
28185
|
-
}
|
|
28186
|
-
var res = [];
|
|
28187
|
-
for (var i = 0; i < toBeRemovedClassList.length; i++) {
|
|
28188
|
-
if (!toBeAddedClassList.includes(toBeRemovedClassList[i])) {
|
|
28189
|
-
res.push(toBeRemovedClassList[i]);
|
|
28190
|
-
}
|
|
28191
|
-
}
|
|
28192
|
-
return res;
|
|
28193
|
-
};
|
|
28194
|
-
return SmeResponsiveWindowManagerComponent;
|
|
28195
|
-
}());
|
|
28196
|
-
/** @nocollapse */ SmeResponsiveWindowManagerComponent.ɵfac = function SmeResponsiveWindowManagerComponent_Factory(t) { return new (t || SmeResponsiveWindowManagerComponent)(i0.ɵɵdirectiveInject(SME_LAYOUT_PROVIDER)); };
|
|
28197
|
-
/** @nocollapse */ SmeResponsiveWindowManagerComponent.ɵdir = i0.ɵɵdefineDirective({ type: SmeResponsiveWindowManagerComponent });
|
|
28198
|
-
__decorate([
|
|
28199
|
-
debounce_decorators.Debounce(),
|
|
28200
|
-
__metadata("design:type", Function),
|
|
28201
|
-
__metadata("design:paramtypes", []),
|
|
28202
|
-
__metadata("design:returntype", void 0)
|
|
28203
|
-
], SmeResponsiveWindowManagerComponent.prototype, "deferredOnLayoutChanged", null);
|
|
28204
|
-
(function () {
|
|
28205
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SmeResponsiveWindowManagerComponent, [{
|
|
28206
|
-
type: i0.Directive
|
|
28207
|
-
}], function () {
|
|
28208
|
-
return [{ type: undefined, decorators: [{
|
|
28209
|
-
type: i0.Inject,
|
|
28210
|
-
args: [SME_LAYOUT_PROVIDER]
|
|
28211
|
-
}] }];
|
|
28212
|
-
}, { deferredOnLayoutChanged: [] });
|
|
28213
|
-
})();
|
|
28214
|
-
|
|
28215
28652
|
var DataTableResponsiveWindowManager = /** @class */ (function (_super) {
|
|
28216
28653
|
__extends(DataTableResponsiveWindowManager, _super);
|
|
28217
28654
|
function DataTableResponsiveWindowManager() {
|
|
@@ -43777,26 +44214,60 @@
|
|
|
43777
44214
|
ConfirmationListDialogComponent], []);
|
|
43778
44215
|
i0.ɵɵsetComponentScope(DialogComponent, [i1$1.NgIf, BackdropComponent, i1$1.NgClass, TooltipDirective], []);
|
|
43779
44216
|
|
|
44217
|
+
function HeaderComponent_div_0_span_2_Template(rf, ctx) {
|
|
44218
|
+
if (rf & 1) {
|
|
44219
|
+
i0.ɵɵelement(0, "span", 11);
|
|
44220
|
+
}
|
|
44221
|
+
if (rf & 2) {
|
|
44222
|
+
var ctx_r5 = i0.ɵɵnextContext(2);
|
|
44223
|
+
i0.ɵɵclassMap(ctx_r5.smeIconClassName ? ctx_r5.smeIconClassName : "");
|
|
44224
|
+
}
|
|
44225
|
+
}
|
|
44226
|
+
function HeaderComponent_div_0_span_3_Template(rf, ctx) {
|
|
44227
|
+
if (rf & 1) {
|
|
44228
|
+
i0.ɵɵelement(0, "span", 12);
|
|
44229
|
+
}
|
|
44230
|
+
if (rf & 2) {
|
|
44231
|
+
var ctx_r6 = i0.ɵɵnextContext(2);
|
|
44232
|
+
i0.ɵɵstyleProp("background-image", ctx_r6.urlIcon);
|
|
44233
|
+
}
|
|
44234
|
+
}
|
|
44235
|
+
function HeaderComponent_div_0_ng_container_6_Template(rf, ctx) {
|
|
44236
|
+
if (rf & 1) {
|
|
44237
|
+
i0.ɵɵelementContainer(0);
|
|
44238
|
+
}
|
|
44239
|
+
}
|
|
43780
44240
|
function HeaderComponent_div_0_Template(rf, ctx) {
|
|
43781
44241
|
if (rf & 1) {
|
|
43782
|
-
i0.ɵɵelementStart(0, "div",
|
|
43783
|
-
i0.ɵɵelementStart(1, "
|
|
43784
|
-
i0.ɵɵ
|
|
44242
|
+
i0.ɵɵelementStart(0, "div", 5);
|
|
44243
|
+
i0.ɵɵelementStart(1, "span", 6);
|
|
44244
|
+
i0.ɵɵtemplate(2, HeaderComponent_div_0_span_2_Template, 1, 2, "span", 7);
|
|
44245
|
+
i0.ɵɵtemplate(3, HeaderComponent_div_0_span_3_Template, 1, 2, "span", 8);
|
|
44246
|
+
i0.ɵɵelementStart(4, "span", 9);
|
|
44247
|
+
i0.ɵɵtext(5);
|
|
43785
44248
|
i0.ɵɵelementEnd();
|
|
43786
|
-
i0.ɵɵ
|
|
44249
|
+
i0.ɵɵelementEnd();
|
|
44250
|
+
i0.ɵɵtemplate(6, HeaderComponent_div_0_ng_container_6_Template, 1, 0, "ng-container", 10);
|
|
43787
44251
|
i0.ɵɵelementEnd();
|
|
43788
44252
|
}
|
|
43789
44253
|
if (rf & 2) {
|
|
43790
44254
|
var ctx_r0 = i0.ɵɵnextContext();
|
|
44255
|
+
var _r3 = i0.ɵɵreference(4);
|
|
43791
44256
|
i0.ɵɵadvance(1);
|
|
43792
44257
|
i0.ɵɵproperty("ngClass", ctx_r0.level === "" ? "sme-font-h3" : ctx_r0.styleTo);
|
|
43793
44258
|
i0.ɵɵadvance(1);
|
|
44259
|
+
i0.ɵɵproperty("ngIf", ctx_r0.smeIconClassName);
|
|
44260
|
+
i0.ɵɵadvance(1);
|
|
44261
|
+
i0.ɵɵproperty("ngIf", ctx_r0.urlIcon);
|
|
44262
|
+
i0.ɵɵadvance(2);
|
|
43794
44263
|
i0.ɵɵtextInterpolate(ctx_r0.text);
|
|
44264
|
+
i0.ɵɵadvance(1);
|
|
44265
|
+
i0.ɵɵproperty("ngTemplateOutlet", _r3);
|
|
43795
44266
|
}
|
|
43796
44267
|
}
|
|
43797
44268
|
function HeaderComponent_h2_1_Template(rf, ctx) {
|
|
43798
44269
|
if (rf & 1) {
|
|
43799
|
-
i0.ɵɵelementStart(0, "h2",
|
|
44270
|
+
i0.ɵɵelementStart(0, "h2", 13);
|
|
43800
44271
|
i0.ɵɵtext(1);
|
|
43801
44272
|
i0.ɵɵelementEnd();
|
|
43802
44273
|
}
|
|
@@ -43804,27 +44275,40 @@
|
|
|
43804
44275
|
var ctx_r1 = i0.ɵɵnextContext();
|
|
43805
44276
|
i0.ɵɵproperty("ngClass", ctx_r1.level === "" ? "sme-font-h3" : ctx_r1.styleTo);
|
|
43806
44277
|
i0.ɵɵadvance(1);
|
|
43807
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.text, "
|
|
44278
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.text, "\n");
|
|
44279
|
+
}
|
|
44280
|
+
}
|
|
44281
|
+
function HeaderComponent_div_2_ng_container_3_Template(rf, ctx) {
|
|
44282
|
+
if (rf & 1) {
|
|
44283
|
+
i0.ɵɵelementContainer(0);
|
|
43808
44284
|
}
|
|
43809
44285
|
}
|
|
43810
44286
|
function HeaderComponent_div_2_Template(rf, ctx) {
|
|
43811
44287
|
if (rf & 1) {
|
|
43812
|
-
i0.ɵɵelementStart(0, "div",
|
|
43813
|
-
i0.ɵɵelementStart(1, "h3",
|
|
44288
|
+
i0.ɵɵelementStart(0, "div", 14);
|
|
44289
|
+
i0.ɵɵelementStart(1, "h3", 6);
|
|
43814
44290
|
i0.ɵɵtext(2);
|
|
43815
44291
|
i0.ɵɵelementEnd();
|
|
43816
|
-
i0.ɵɵ
|
|
44292
|
+
i0.ɵɵtemplate(3, HeaderComponent_div_2_ng_container_3_Template, 1, 0, "ng-container", 10);
|
|
43817
44293
|
i0.ɵɵelementEnd();
|
|
43818
44294
|
}
|
|
43819
44295
|
if (rf & 2) {
|
|
43820
44296
|
var ctx_r2 = i0.ɵɵnextContext();
|
|
44297
|
+
var _r3 = i0.ɵɵreference(4);
|
|
43821
44298
|
i0.ɵɵadvance(1);
|
|
43822
44299
|
i0.ɵɵproperty("ngClass", ctx_r2.level !== "" ? ctx_r2.styleTo : "");
|
|
43823
44300
|
i0.ɵɵadvance(1);
|
|
43824
44301
|
i0.ɵɵtextInterpolate(ctx_r2.text);
|
|
44302
|
+
i0.ɵɵadvance(1);
|
|
44303
|
+
i0.ɵɵproperty("ngTemplateOutlet", _r3);
|
|
43825
44304
|
}
|
|
43826
44305
|
}
|
|
43827
|
-
|
|
44306
|
+
function HeaderComponent_ng_template_3_Template(rf, ctx) {
|
|
44307
|
+
if (rf & 1) {
|
|
44308
|
+
i0.ɵɵprojection(0);
|
|
44309
|
+
}
|
|
44310
|
+
}
|
|
44311
|
+
var _c0$1d = ["*"];
|
|
43828
44312
|
/**
|
|
43829
44313
|
*
|
|
43830
44314
|
* @smeDoc {@label Header @id sme-header}
|
|
@@ -43837,13 +44321,33 @@
|
|
|
43837
44321
|
* @file {@filename component.html @filepath ./examples/header-example.component.html}
|
|
43838
44322
|
*
|
|
43839
44323
|
*/
|
|
43840
|
-
var HeaderComponent = /** @class */ (function () {
|
|
43841
|
-
|
|
43842
|
-
|
|
43843
|
-
|
|
43844
|
-
|
|
43845
|
-
|
|
44324
|
+
var HeaderComponent = /** @class */ (function (_super) {
|
|
44325
|
+
__extends(HeaderComponent, _super);
|
|
44326
|
+
function HeaderComponent(injector) {
|
|
44327
|
+
var _this = _super.call(this, injector) || this;
|
|
44328
|
+
_this.styleTo = '';
|
|
44329
|
+
_this.type = HeaderComponent.tool;
|
|
44330
|
+
_this.text = '';
|
|
44331
|
+
_this.level = '';
|
|
44332
|
+
if (_this.smeIconClassName && _this.urlIcon) {
|
|
44333
|
+
logging.Logging.log({
|
|
44334
|
+
level: logLevel.LogLevel.Warning,
|
|
44335
|
+
message: 'Either sme icon or url icon is accepted.',
|
|
44336
|
+
source: _this.logSourceName + ".constructor"
|
|
44337
|
+
});
|
|
44338
|
+
}
|
|
44339
|
+
return _this;
|
|
43846
44340
|
}
|
|
44341
|
+
Object.defineProperty(HeaderComponent.prototype, "logSourceName", {
|
|
44342
|
+
/**
|
|
44343
|
+
* The source name to use for logging
|
|
44344
|
+
*/
|
|
44345
|
+
get: function () {
|
|
44346
|
+
return 'HeaderComponent';
|
|
44347
|
+
},
|
|
44348
|
+
enumerable: false,
|
|
44349
|
+
configurable: true
|
|
44350
|
+
});
|
|
43847
44351
|
/**
|
|
43848
44352
|
* The method run when the component is initialized
|
|
43849
44353
|
*/
|
|
@@ -43865,35 +44369,26 @@
|
|
|
43865
44369
|
this.styleTo = HeaderComponent.h4style;
|
|
43866
44370
|
break;
|
|
43867
44371
|
}
|
|
43868
|
-
case '5': {
|
|
43869
|
-
this.styleTo = HeaderComponent.h5style;
|
|
43870
|
-
break;
|
|
43871
|
-
}
|
|
43872
|
-
case '6': {
|
|
43873
|
-
this.styleTo = HeaderComponent.h6style;
|
|
43874
|
-
break;
|
|
43875
|
-
}
|
|
43876
44372
|
default: {
|
|
43877
44373
|
this.styleTo = '';
|
|
43878
44374
|
}
|
|
43879
44375
|
}
|
|
43880
44376
|
};
|
|
43881
44377
|
return HeaderComponent;
|
|
43882
|
-
}());
|
|
44378
|
+
}(CoreBaseComponent));
|
|
43883
44379
|
HeaderComponent.tool = 'tool-header'; // default
|
|
43884
44380
|
HeaderComponent.h1style = 'sme-font-h1';
|
|
43885
44381
|
HeaderComponent.h2style = 'sme-font-h2';
|
|
43886
44382
|
HeaderComponent.h3style = 'sme-font-h3';
|
|
43887
|
-
HeaderComponent.h4style = 'sme-font-h4';
|
|
43888
|
-
HeaderComponent
|
|
43889
|
-
HeaderComponent
|
|
43890
|
-
/** @nocollapse */ HeaderComponent.ɵfac = function HeaderComponent_Factory(t) { return new (t || HeaderComponent)(); };
|
|
43891
|
-
/** @nocollapse */ HeaderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: HeaderComponent, selectors: [["sme-header"]], inputs: { type: "type", text: "text", level: "level" }, ngContentSelectors: _c0$1d, decls: 3, vars: 3, consts: [["class", "sme-position-flex-none sme-layout-tool-header", 4, "ngIf"], ["id", "sme-dialog-title", 3, "ngClass", 4, "ngIf"], ["class", "sme-position-flex-none sme-layout-settings-header", 4, "ngIf"], [1, "sme-position-flex-none", "sme-layout-tool-header"], [3, "ngClass"], ["id", "sme-dialog-title", 3, "ngClass"], [1, "sme-position-flex-none", "sme-layout-settings-header"]], template: function HeaderComponent_Template(rf, ctx) {
|
|
44383
|
+
HeaderComponent.h4style = 'sme-font-h4 sme-font-h4-no-spacing';
|
|
44384
|
+
/** @nocollapse */ HeaderComponent.ɵfac = function HeaderComponent_Factory(t) { return new (t || HeaderComponent)(i0.ɵɵdirectiveInject(i0.Injector)); };
|
|
44385
|
+
/** @nocollapse */ HeaderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: HeaderComponent, selectors: [["sme-header"]], inputs: { type: "type", text: "text", level: "level", smeIconClassName: "smeIconClassName", urlIcon: "urlIcon" }, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$1d, decls: 5, vars: 3, consts: [["class", "sme-layout-flex sme-position-flex-align-center sme-layout-tool-header", 4, "ngIf"], ["id", "sme-dialog-title", 3, "ngClass", 4, "ngIf"], ["class", "sme-position-flex-none sme-layout-settings-header", 4, "ngIf"], ["class", "sme-padding-left-xs"], ["contentTemplate", ""], [1, "sme-layout-flex", "sme-position-flex-align-center", "sme-layout-tool-header"], [3, "ngClass"], ["class", "sme-position-align-v-inline-middle sme-icon", 3, "class", 4, "ngIf"], ["class", "sme-position-align-v-inline-middle sme-url-icon", 3, "background-image", 4, "ngIf"], [1, "sme-position-align-v-inline-middle"], [4, "ngTemplateOutlet"], [1, "sme-position-align-v-inline-middle", "sme-icon"], [1, "sme-position-align-v-inline-middle", "sme-url-icon"], ["id", "sme-dialog-title", 3, "ngClass"], [1, "sme-position-flex-none", "sme-layout-settings-header"]], template: function HeaderComponent_Template(rf, ctx) {
|
|
43892
44386
|
if (rf & 1) {
|
|
43893
|
-
i0.ɵɵprojectionDef(
|
|
43894
|
-
i0.ɵɵtemplate(0, HeaderComponent_div_0_Template,
|
|
44387
|
+
i0.ɵɵprojectionDef();
|
|
44388
|
+
i0.ɵɵtemplate(0, HeaderComponent_div_0_Template, 7, 5, "div", 0);
|
|
43895
44389
|
i0.ɵɵtemplate(1, HeaderComponent_h2_1_Template, 2, 2, "h2", 1);
|
|
43896
|
-
i0.ɵɵtemplate(2, HeaderComponent_div_2_Template, 4,
|
|
44390
|
+
i0.ɵɵtemplate(2, HeaderComponent_div_2_Template, 4, 3, "div", 2);
|
|
44391
|
+
i0.ɵɵtemplate(3, HeaderComponent_ng_template_3_Template, 1, 0, "ng-template", 3, 4, i0.ɵɵtemplateRefExtractor);
|
|
43897
44392
|
}
|
|
43898
44393
|
if (rf & 2) {
|
|
43899
44394
|
i0.ɵɵproperty("ngIf", ctx.type === "tool-header");
|
|
@@ -43902,7 +44397,7 @@
|
|
|
43902
44397
|
i0.ɵɵadvance(1);
|
|
43903
44398
|
i0.ɵɵproperty("ngIf", ctx.type === "settings-page-header");
|
|
43904
44399
|
}
|
|
43905
|
-
}, directives: [i1$1.NgIf, i1$1.NgClass], encapsulation: 2 });
|
|
44400
|
+
}, directives: [i1$1.NgIf, i1$1.NgClass, i1$1.NgTemplateOutlet], encapsulation: 2 });
|
|
43906
44401
|
(function () {
|
|
43907
44402
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(HeaderComponent, [{
|
|
43908
44403
|
type: i0.Component,
|
|
@@ -43910,12 +44405,16 @@
|
|
|
43910
44405
|
selector: 'sme-header',
|
|
43911
44406
|
templateUrl: './header.component.html'
|
|
43912
44407
|
}]
|
|
43913
|
-
}],
|
|
44408
|
+
}], function () { return [{ type: i0.Injector }]; }, { type: [{
|
|
43914
44409
|
type: i0.Input
|
|
43915
44410
|
}], text: [{
|
|
43916
44411
|
type: i0.Input
|
|
43917
44412
|
}], level: [{
|
|
43918
44413
|
type: i0.Input
|
|
44414
|
+
}], smeIconClassName: [{
|
|
44415
|
+
type: i0.Input
|
|
44416
|
+
}], urlIcon: [{
|
|
44417
|
+
type: i0.Input
|
|
43919
44418
|
}] });
|
|
43920
44419
|
})();
|
|
43921
44420
|
|
|
@@ -48154,6 +48653,10 @@
|
|
|
48154
48653
|
* Implementation of the Layout interface
|
|
48155
48654
|
*/
|
|
48156
48655
|
_this.layoutChanged = new i0.EventEmitter();
|
|
48656
|
+
/**
|
|
48657
|
+
* Implementation of the Layout interface
|
|
48658
|
+
*/
|
|
48659
|
+
_this.windowBreakpointChanged = new i0.EventEmitter();
|
|
48157
48660
|
_this.propertyGridResponsiveWindowManager = new PropertyGridResponsiveWindowManager();
|
|
48158
48661
|
// old style supported sme-property-grid-arrange-vertical class. default to vertical orientation if this class is applied.
|
|
48159
48662
|
var hasVerticalClass = _this.hostElement.nativeElement.classList.contains('sme-property-grid-arrange-vertical');
|
|
@@ -48283,7 +48786,7 @@
|
|
|
48283
48786
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.internalLinkTemplate = _t.first);
|
|
48284
48787
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.externalLinkTemplate = _t.first);
|
|
48285
48788
|
}
|
|
48286
|
-
}, inputs: { orientation: "orientation" }, outputs: { layoutChanged: "layoutChanged" }, features: [i0.ɵɵProvidersFeature([
|
|
48789
|
+
}, inputs: { orientation: "orientation" }, outputs: { layoutChanged: "layoutChanged", windowBreakpointChanged: "windowBreakpointChanged" }, features: [i0.ɵɵProvidersFeature([
|
|
48287
48790
|
{ provide: SME_LAYOUT_PROVIDER, useExisting: i0.forwardRef((function () { return PropertyGridComponent; })) }
|
|
48288
48791
|
]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 16, vars: 6, consts: [[1, "sme-position-inset-none", "sme-position-stretch-h", 3, "padLastItem"], ["layout", ""], ["name", "narrow", 3, "until", "columns"], ["name", "medium", 3, "until", "columns", 4, "ngIf"], ["name", "wide", 3, "columns", 4, "ngIf"], [3, "columnSpan", "maxWidth", 4, "ngFor", "ngForOf"], ["readonlyTemplate", ""], ["actionLinkTemplate", ""], ["internalLinkTemplate", ""], ["externalLinkTemplate", ""], ["iconTemplate", ""], ["name", "medium", 3, "until", "columns"], ["name", "wide", 3, "columns"], [3, "columnSpan", "maxWidth"], ["tabindex", "0", "aria-live", "polite", "aria-atomic", "true", "smeTooltipZone", "", 1, "sme-property-grid-item"], ["zone", "smeTooltipZone"], [1, "sme-arrange-stack-h"], ["class", "sme-position-flex-none sme-icon sme-icon-info sme-info-bubble sme-margin-left-xs", "aria-hidden", "true", 3, "title", "tooltipZone", 4, "ngIf"], [1, "sme-screen-reader"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], ["aria-hidden", "true", 1, "sme-position-flex-none", "sme-icon", "sme-icon-info", "sme-info-bubble", "sme-margin-left-xs", 3, "title", "tooltipZone"], ["size", "extra-small", 3, "inline", "isBackgroundTransparent", 4, "ngIf"], [4, "ngIf"], ["size", "extra-small", 3, "inline", "isBackgroundTransparent"], [1, "read-only-template"], ["class", "sme-padding-right-xs", 4, "ngIf"], ["tabindex", "0", "role", "link", 1, "sme-link", "sme-focus-zone", "action-link-template", 3, "click"], [1, "sme-padding-right-xs"], ["role", "link", 1, "sme-link", "sme-focus-zone", 3, "routerLink"], ["role", "link", "target", "_blank", 1, "sme-link", "sme-focus-zone", 3, "href"], [1, "sme-icon", "sme-icon-openInNewWindow", "sme-margin-left-xs"], [3, "class", 4, "ngIf"], ["class", "sme-layout-inline-block sme-margin-right-xs ", "size", "16px", 3, "status", 4, "ngIf"], ["size", "16px", 1, "sme-layout-inline-block", "sme-margin-right-xs", 3, "status"]], template: function PropertyGridComponent_Template(rf, ctx) {
|
|
48289
48792
|
if (rf & 1) {
|
|
@@ -48349,6 +48852,8 @@
|
|
|
48349
48852
|
type: i0.Input
|
|
48350
48853
|
}], layoutChanged: [{
|
|
48351
48854
|
type: i0.Output
|
|
48855
|
+
}], windowBreakpointChanged: [{
|
|
48856
|
+
type: i0.Output
|
|
48352
48857
|
}] });
|
|
48353
48858
|
})();
|
|
48354
48859
|
|
|
@@ -52994,6 +53499,10 @@
|
|
|
52994
53499
|
* Separator used in sticky header on top of Settings page
|
|
52995
53500
|
*/
|
|
52996
53501
|
_this.headerSeparator = '|';
|
|
53502
|
+
/**
|
|
53503
|
+
* The generator for layout config.
|
|
53504
|
+
*/
|
|
53505
|
+
_this.layoutConfigGenerator = new LayoutConfigGenerator();
|
|
52997
53506
|
_this.autoFocus = true;
|
|
52998
53507
|
return _this;
|
|
52999
53508
|
}
|
|
@@ -53020,6 +53529,7 @@
|
|
|
53020
53529
|
_this.autoFocus = true;
|
|
53021
53530
|
}), this.settingsForms.formRemoved().subscribe(function (form) { MsftSme.remove(_this.allForms, form); }));
|
|
53022
53531
|
this.fullSettingsTitle = this.settingsTitle;
|
|
53532
|
+
this.currentLayoutConfig = this.layoutConfigGenerator.initialize([300, '100']);
|
|
53023
53533
|
};
|
|
53024
53534
|
SettingsComponent.prototype.ngOnDestroy = function () {
|
|
53025
53535
|
_super.prototype.ngOnDestroy.call(this);
|
|
@@ -53080,7 +53590,7 @@
|
|
|
53080
53590
|
return SettingsComponent;
|
|
53081
53591
|
}(CoreBaseComponent));
|
|
53082
53592
|
/** @nocollapse */ SettingsComponent.ɵfac = function SettingsComponent_Factory(t) { return new (t || SettingsComponent)(i0.ɵɵdirectiveInject(i0.Injector)); };
|
|
53083
|
-
/** @nocollapse */ SettingsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SettingsComponent, selectors: [["sme-settings"]], inputs: { addPadding: "addPadding", backRoute: "backRoute", settingsTitle: "settingsTitle", selectedSettingsTitle: "selectedSettingsTitle" }, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c1$Q, decls: 12, vars:
|
|
53593
|
+
/** @nocollapse */ SettingsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SettingsComponent, selectors: [["sme-settings"]], inputs: { addPadding: "addPadding", backRoute: "backRoute", settingsTitle: "settingsTitle", selectedSettingsTitle: "selectedSettingsTitle" }, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c1$Q, decls: 12, vars: 10, consts: [[1, "sme-arrange-stack-v", "sme-layout-relative", "sme-arrange-overflow-auto-y-phone-up", "sme-position-stretch"], ["class", "sme-layout-tool-header sme-position-flex-none sme-arrange-ellipsis sme-padding-bottom-none sme-padding-left-md", 4, "ngIf"], [1, "sme-position-flex-auto", "sme-arrange-overflow-auto", 3, "padLastItem", "layoutConfig", "itemHorizontalSpace"], ["layout", ""], ["name", "narrow", 3, "until", "columns"], ["name", "wide", 3, "columns"], [3, "columnSpan", "ngClass"], [1, "sme-position-stretch", "sme-padding-left-xl", "sme-padding-top-xs", 3, "columnSpan"], [1, "sme-layout-tool-header", "sme-position-flex-none", "sme-arrange-ellipsis", "sme-padding-bottom-none", "sme-padding-left-md"], [1, "sme-font-h3", "sme-arrange-ellipsis", "sme-position-stretch-h", 3, "title"], ["class", "sme-padding-horizontal-sm sme-font-family-normal", 4, "ngIf"], ["class", "sme-font-family-normal", 4, "ngIf"], [1, "sme-padding-horizontal-sm", "sme-font-family-normal"], [1, "sme-font-family-normal"]], template: function SettingsComponent_Template(rf, ctx) {
|
|
53084
53594
|
if (rf & 1) {
|
|
53085
53595
|
i0.ɵɵprojectionDef(_c0$1u);
|
|
53086
53596
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -53104,7 +53614,7 @@
|
|
|
53104
53614
|
i0.ɵɵadvance(1);
|
|
53105
53615
|
i0.ɵɵproperty("ngIf", ctx.settingsTitle);
|
|
53106
53616
|
i0.ɵɵadvance(1);
|
|
53107
|
-
i0.ɵɵproperty("padLastItem", false);
|
|
53617
|
+
i0.ɵɵproperty("padLastItem", false)("layoutConfig", ctx.currentLayoutConfig)("itemHorizontalSpace", 36);
|
|
53108
53618
|
i0.ɵɵadvance(2);
|
|
53109
53619
|
i0.ɵɵproperty("until", 768)("columns", 1);
|
|
53110
53620
|
i0.ɵɵadvance(1);
|
|
@@ -58815,6 +59325,7 @@
|
|
|
58815
59325
|
exports.JsonFormFieldLoaderComponent = JsonFormFieldLoaderComponent;
|
|
58816
59326
|
exports.LayeredIconComponent = LayeredIconComponent;
|
|
58817
59327
|
exports.LayoutComponent = LayoutComponent;
|
|
59328
|
+
exports.LayoutConfigGenerator = LayoutConfigGenerator;
|
|
58818
59329
|
exports.LayoutDefinitionComponent = LayoutDefinitionComponent;
|
|
58819
59330
|
exports.LayoutItemComponent = LayoutItemComponent;
|
|
58820
59331
|
exports.LayoutModule = LayoutModule;
|