Bump version to 1.1.2 and update TaxonomyNavigationService to hide tags not available for tagging
- Updated TaxonomyNavigationService to set hideTagsNotAvailableForTagging to true. - Modified getAllTerms call to include the updated parameter for hiding unavailable tags. - Removed external CSS loading functionality from MegaMenuApplicationCustomizer. - Updated cache prefixes in SPTermStorePickerService for versioning. - Bumped version in package.json and package-lock.json to 1.1.2. - Updated deployment manifest files to reflect the new version.
This commit is contained in:
@@ -72,10 +72,6 @@ var MegaMenuApplicationCustomizer = (function (_super) {
|
||||
_this._renderer.dispose();
|
||||
_this._renderer = undefined;
|
||||
}
|
||||
var externalCssLink = document.getElementById('mega-menu-additional-css-34FAB720');
|
||||
if (externalCssLink) {
|
||||
externalCssLink.remove();
|
||||
}
|
||||
_this._menuContainer = undefined;
|
||||
_this._topPlaceholder = undefined;
|
||||
debugLog(_this._isDebugEnabled(), LOG_SOURCE, 'Disposed custom top placeholder.');
|
||||
@@ -84,9 +80,6 @@ var MegaMenuApplicationCustomizer = (function (_super) {
|
||||
}
|
||||
MegaMenuApplicationCustomizer.prototype.onInit = function () {
|
||||
debugLog(this._isDebugEnabled(), LOG_SOURCE, 'Initialized ' + strings.Title);
|
||||
if (this.properties.cssUrl) {
|
||||
this._loadExternalCss(this.properties.cssUrl);
|
||||
}
|
||||
this.context.placeholderProvider.changedEvent.add(this, this._renderPlaceHolders);
|
||||
this._renderPlaceHolders();
|
||||
return Promise.resolve();
|
||||
@@ -164,39 +157,6 @@ var MegaMenuApplicationCustomizer = (function (_super) {
|
||||
}
|
||||
return placeholder.domElement;
|
||||
};
|
||||
MegaMenuApplicationCustomizer.prototype._loadExternalCss = function (cssUrl, debug) {
|
||||
if (debug === void 0) { debug = this._isDebugEnabled(); }
|
||||
var externalCssLinkId = 'mega-menu-additional-css-34FAB720';
|
||||
var link = document.getElementById(externalCssLinkId);
|
||||
if (cssUrl && cssUrl.trim() !== '') {
|
||||
var validatedUrl = this._validateCssUrl(cssUrl);
|
||||
if (!validatedUrl) {
|
||||
debugWarn(debug, LOG_SOURCE, 'Rejected unsafe external CSS URL:', cssUrl);
|
||||
if (link) {
|
||||
link.remove();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!link) {
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.type = 'text/css';
|
||||
link.id = externalCssLinkId;
|
||||
link.onload = function () {
|
||||
debugLog(debug, LOG_SOURCE, 'External CSS loaded successfully from:', cssUrl);
|
||||
};
|
||||
link.onerror = function () {
|
||||
debugWarn(debug, LOG_SOURCE, 'Failed to load external CSS from:', cssUrl);
|
||||
};
|
||||
head.appendChild(link);
|
||||
}
|
||||
link.href = validatedUrl;
|
||||
}
|
||||
else if (link) {
|
||||
link.remove();
|
||||
}
|
||||
};
|
||||
MegaMenuApplicationCustomizer.prototype._getTermSetIdentifier = function () {
|
||||
var termSetId = this.properties && this.properties.termSetId
|
||||
? this.properties.termSetId.trim()
|
||||
@@ -212,20 +172,6 @@ var MegaMenuApplicationCustomizer = (function (_super) {
|
||||
var value = this.properties ? Number(this.properties.cacheMinutes) : 15;
|
||||
return isFinite(value) ? Math.min(Math.max(Math.floor(value), 1), 1440) : 15;
|
||||
};
|
||||
MegaMenuApplicationCustomizer.prototype._validateCssUrl = function (cssUrl) {
|
||||
try {
|
||||
var parsed = new URL(cssUrl.trim(), window.location.origin);
|
||||
var isHttp = parsed.protocol === 'http:' || parsed.protocol === 'https:';
|
||||
var isSameOrigin = parsed.origin === window.location.origin;
|
||||
if (!isHttp || (!isSameOrigin && parsed.protocol !== 'https:')) {
|
||||
return undefined;
|
||||
}
|
||||
return parsed.href;
|
||||
}
|
||||
catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
MegaMenuApplicationCustomizer.prototype._renderStatus = function (message) {
|
||||
if (!this._topPlaceholder) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user