Aktualisiere Versionsnummern auf 1.0.11 in package.json, package-solution.json, ExpiryIndicatorFieldCustomizer.manifest.json, ExpiryIndicatorApplicationCustomizer.manifest.json und ExpiryIndicatorCommandSet.manifest.json; verbessere die Unterstützung für SharePoint-Taxonomiewerte in der Logik zur Wertübereinstimmung in ExpiryModels.ts und aktualisiere die README.md mit neuen Informationen zu Managed-Metadata-Feldern.
This commit is contained in:
13
README.md
13
README.md
@@ -217,6 +217,19 @@ Die Regeln werden von oben nach unten geprüft. Dabei gilt:
|
|||||||
3. Die erste passende Regel liefert Laufzeit und Farbregeln.
|
3. Die erste passende Regel liefert Laufzeit und Farbregeln.
|
||||||
4. Existiert das Feld nicht oder passt kein Wert, werden Standardlaufzeit und Standard-Farbregeln verwendet.
|
4. Existiert das Feld nicht oder passt kein Wert, werden Standardlaufzeit und Standard-Farbregeln verwendet.
|
||||||
|
|
||||||
|
Bei Managed-Metadata-Feldern sollte `columnValue` die Term-GUID enthalten. SharePoint Server liefert im
|
||||||
|
REST-Ergebnis teilweise die WssId anstelle der lesbaren Bezeichnung im Feld `Label`; die Term-GUID bleibt
|
||||||
|
dagegen stabil. Der Vergleich der GUID erfolgt ohne Beachtung der Groß-/Kleinschreibung. Beispiel:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"columnName": "eGovPersDat",
|
||||||
|
"columnValue": "0d19386a-ebe1-4955-ad12-164d7846bca6",
|
||||||
|
"lifeTime": { "value": 1, "unit": "years" },
|
||||||
|
"columnRule": []
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Nach **Speichern** wird die Konfiguration als JSON direkt in `ClientSideComponentProperties` des mit dem
|
Nach **Speichern** wird die Konfiguration als JSON direkt in `ClientSideComponentProperties` des mit dem
|
||||||
ExpiryIndicator gebundenen lokalen Listenfeldes gespeichert. Damit verwendet die App denselben
|
ExpiryIndicator gebundenen lokalen Listenfeldes gespeichert. Damit verwendet die App denselben
|
||||||
Konfigurationsmechanismus wie andere SPFx-Extensions und benötigt keine zusätzliche Konfigurationsliste.
|
Konfigurationsmechanismus wie andere SPFx-Extensions und benötigt keine zusätzliche Konfigurationsliste.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"solution": {
|
"solution": {
|
||||||
"name": "expiry-indicator-client-side-solution",
|
"name": "expiry-indicator-client-side-solution",
|
||||||
"id": "68bb6d2d-9895-45b4-88e8-b98835faa981",
|
"id": "68bb6d2d-9895-45b4-88e8-b98835faa981",
|
||||||
"version": "1.0.10.0",
|
"version": "1.0.11.0",
|
||||||
"includeClientSideAssets": true,
|
"includeClientSideAssets": true,
|
||||||
"skipFeatureDeployment": false,
|
"skipFeatureDeployment": false,
|
||||||
"features": [
|
"features": [
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
"title": "ExpiryIndicator extension registration",
|
"title": "ExpiryIndicator extension registration",
|
||||||
"description": "Registers ExpiryIndicator commands and its settings Application Customizer. Does not provision ExpiryDate.",
|
"description": "Registers ExpiryIndicator commands and its settings Application Customizer. Does not provision ExpiryDate.",
|
||||||
"id": "913402af-ab9a-4974-9f86-5c2159ae41db",
|
"id": "913402af-ab9a-4974-9f86-5c2159ae41db",
|
||||||
"version": "1.0.10.0",
|
"version": "1.0.11.0",
|
||||||
"assets": {
|
"assets": {
|
||||||
"elementManifests": [
|
"elementManifests": [
|
||||||
"elements.xml"
|
"elements.xml"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "expiry-indicator",
|
"name": "expiry-indicator",
|
||||||
"version": "1.0.10",
|
"version": "1.0.11",
|
||||||
"private": true,
|
"private": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0 <9.0.0"
|
"node": ">=6.9.0 <9.0.0"
|
||||||
|
|||||||
@@ -218,12 +218,32 @@ function valueMatches(rawValue: any, configuredValue: string): boolean {
|
|||||||
|
|
||||||
return values.some((value: any): boolean => {
|
return values.some((value: any): boolean => {
|
||||||
if (value && typeof value === 'object') {
|
if (value && typeof value === 'object') {
|
||||||
|
// SharePoint taxonomy values are not consistent across REST versions. In
|
||||||
|
// SharePoint Server the Label may contain the WssId instead of the term
|
||||||
|
// label, whereas TermGuid remains stable.
|
||||||
|
if (typeof value.TermGuid === 'string' && equalsIgnoreCase(value.TermGuid, configuredValue)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return String(value.Title || value.LookupValue || value.Label || value.Value || '') === configuredValue;
|
return String(value.Title || value.LookupValue || value.Label || value.Value || '') === configuredValue;
|
||||||
}
|
}
|
||||||
return String(value) === configuredValue;
|
|
||||||
|
const textValue: string = String(value);
|
||||||
|
if (textValue === configuredValue) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Also support serialized taxonomy values such as "Label|TermGuid" and
|
||||||
|
// "-1;#Label|TermGuid".
|
||||||
|
const separatorIndex: number = textValue.lastIndexOf('|');
|
||||||
|
return separatorIndex >= 0 && equalsIgnoreCase(textValue.substring(separatorIndex + 1), configuredValue);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function equalsIgnoreCase(left: string, right: string): boolean {
|
||||||
|
return left.toLowerCase() === right.toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
function isColumnRuleOperator(value: string): boolean {
|
function isColumnRuleOperator(value: string): boolean {
|
||||||
return value === 'lessThan' || value === 'lessOrEqual' || value === 'equal' ||
|
return value === 'lessThan' || value === 'lessOrEqual' || value === 'equal' ||
|
||||||
value === 'greaterOrEqual' || value === 'greaterThan';
|
value === 'greaterOrEqual' || value === 'greaterThan';
|
||||||
@@ -237,4 +257,3 @@ function isColor(value: string): boolean {
|
|||||||
/^[a-zA-Z]+$/.test(value)
|
/^[a-zA-Z]+$/.test(value)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"alias": "ExpiryIndicatorFieldCustomizer",
|
"alias": "ExpiryIndicatorFieldCustomizer",
|
||||||
"componentType": "Extension",
|
"componentType": "Extension",
|
||||||
"extensionType": "FieldCustomizer",
|
"extensionType": "FieldCustomizer",
|
||||||
"version": "1.0.10",
|
"version": "1.0.11",
|
||||||
"manifestVersion": 2,
|
"manifestVersion": 2,
|
||||||
"requiresCustomScript": false
|
"requiresCustomScript": false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"alias": "ExpiryIndicatorApplicationCustomizer",
|
"alias": "ExpiryIndicatorApplicationCustomizer",
|
||||||
"componentType": "Extension",
|
"componentType": "Extension",
|
||||||
"extensionType": "ApplicationCustomizer",
|
"extensionType": "ApplicationCustomizer",
|
||||||
"version": "1.0.10",
|
"version": "1.0.11",
|
||||||
"manifestVersion": 2,
|
"manifestVersion": 2,
|
||||||
"requiresCustomScript": false
|
"requiresCustomScript": false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"alias": "ExpiryIndicatorCommandSet",
|
"alias": "ExpiryIndicatorCommandSet",
|
||||||
"componentType": "Extension",
|
"componentType": "Extension",
|
||||||
"extensionType": "ListViewCommandSet",
|
"extensionType": "ListViewCommandSet",
|
||||||
"version": "1.0.10",
|
"version": "1.0.11",
|
||||||
"manifestVersion": 2,
|
"manifestVersion": 2,
|
||||||
"requiresCustomScript": false,
|
"requiresCustomScript": false,
|
||||||
"items": {
|
"items": {
|
||||||
|
|||||||
Reference in New Issue
Block a user