Bump version to 1.1.4, remove unnecessary external dependency, and update term sorting logic

This commit is contained in:
Torsten Brendgen
2026-07-19 22:54:29 +02:00
parent 2d723da5a2
commit 07583b8122
6 changed files with 23 additions and 8 deletions

View File

@@ -4,7 +4,7 @@ Barrierearme, dreistufige Portalnavigation auf Basis von SharePoint Managed Meta
| Eigenschaft | Wert | | Eigenschaft | Wert |
|---|---| |---|---|
| Version | 1.1.3 | | Version | 1.1.4 |
| SharePoint Framework | SPFx 1.4.1 | | SharePoint Framework | SPFx 1.4.1 |
| Node.js | 8.17.0 | | Node.js | 8.17.0 |
| Zieloberfläche | Moderne SharePoint-Seiten | | Zieloberfläche | Moderne SharePoint-Seiten |
@@ -261,6 +261,12 @@ MegaMenu/
## Versionshistorie ## Versionshistorie
### 1.1.4
- Unnötige externe Abhängigkeit zu `@microsoft/sp-lodash-subset` entfernt.
- Terms werden beim Sortieren über eine lokale, SPFx-1.4.1-kompatible Pfadsuche zugeordnet.
- Verhindert, dass der Application Customizer bereits bei der Systemkomponenten-Auflösung übersprungen wird.
### 1.1.3 ### 1.1.3
- Ausführliches, ausschließlich über `debug: true` aktiviertes Lifecycle-Logging ergänzt. - Ausführliches, ausschließlich über `debug: true` aktiviertes Lifecycle-Logging ergänzt.

View File

@@ -3,7 +3,7 @@
"solution": { "solution": {
"name": "mega-menu-client-side-solution", "name": "mega-menu-client-side-solution",
"id": "f4660e06-ce08-43ee-bfb7-5c4464e01133", "id": "f4660e06-ce08-43ee-bfb7-5c4464e01133",
"version": "1.1.3.0", "version": "1.1.4.0",
"includeClientSideAssets": true, "includeClientSideAssets": true,
"skipFeatureDeployment": false, "skipFeatureDeployment": false,
"features": [ "features": [
@@ -11,7 +11,7 @@
"title": "MegaMenu extension registration", "title": "MegaMenu extension registration",
"description": "Registers the MegaMenu Application Customizer in the host web.", "description": "Registers the MegaMenu Application Customizer in the host web.",
"id": "1e4fdc74-8053-48b2-a15b-e975d61eb71f", "id": "1e4fdc74-8053-48b2-a15b-e975d61eb71f",
"version": "1.1.3.0", "version": "1.1.4.0",
"assets": { "assets": {
"elementManifests": [ "elementManifests": [
"elements.xml" "elements.xml"

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "mega-menu", "name": "mega-menu",
"version": "1.1.3", "version": "1.1.4",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "mega-menu", "name": "mega-menu",
"version": "1.1.3", "version": "1.1.4",
"private": true, "private": true,
"main": "lib/index.js", "main": "lib/index.js",
"engines": { "engines": {

View File

@@ -40,7 +40,7 @@ export default class MegaMenuApplicationCustomizer
const debug: boolean = this._isDebugEnabled(); const debug: boolean = this._isDebugEnabled();
debugLog(debug, LOG_SOURCE, 'onInit started.', { debugLog(debug, LOG_SOURCE, 'onInit started.', {
componentId: UserCustomActionMegaMenuId, componentId: UserCustomActionMegaMenuId,
version: '1.1.3', version: '1.1.4',
properties: this.properties || {}, properties: this.properties || {},
pageUrl: window.location.href, pageUrl: window.location.href,
webUrl: this.context.pageContext.web.absoluteUrl, webUrl: this.context.pageContext.web.absoluteUrl,

View File

@@ -5,7 +5,6 @@
import { SPHttpClient, SPHttpClientResponse, ISPHttpClientOptions } from '@microsoft/sp-http'; import { SPHttpClient, SPHttpClientResponse, ISPHttpClientOptions } from '@microsoft/sp-http';
import { ITermStore, ITerms, ITerm, IGroup, ITermSet, ISuggestTerm } from './ISPTermStorePickerService'; import { ITermStore, ITerms, ITerm, IGroup, ITermSet, ISuggestTerm } from './ISPTermStorePickerService';
import { findIndex } from '@microsoft/sp-lodash-subset';
import { ISPTermStorePickerServiceProps } from './ISPTermStorePickerServiceProps'; import { ISPTermStorePickerServiceProps } from './ISPTermStorePickerServiceProps';
import { IPickerTerm } from './IPickerTerm'; import { IPickerTerm } from './IPickerTerm';
import { ApplicationCustomizerContext } from '@microsoft/sp-application-base'; import { ApplicationCustomizerContext } from '@microsoft/sp-application-base';
@@ -587,7 +586,7 @@ export default class SPTermStorePickerService {
// Last item is not needed for parent path // Last item is not needed for parent path
pathElms.pop(); pathElms.pop();
// Find the parent item and add the new item // Find the parent item and add the new item
const idx: number = findIndex(newTermsOrder, term => term.PathOfTerm === pathElms.join(';')); const idx: number = this.findTermIndexByPath(newTermsOrder, pathElms.join(';'));
if (idx !== -1) { if (idx !== -1) {
newTermsOrder.splice(idx + 1, 0, crntTerm); newTermsOrder.splice(idx + 1, 0, crntTerm);
} else { } else {
@@ -607,6 +606,16 @@ export default class SPTermStorePickerService {
return newTermsOrder; return newTermsOrder;
} }
private findTermIndexByPath(terms: ITerm[], path: string): number {
for (let index: number = 0; index < terms.length; index++) {
if (terms[index].PathOfTerm === path) {
return index;
}
}
return -1;
}
/** /**
* Sort the terms by their path * Sort the terms by their path
* *