Add Expiry Indicator functionality with configuration and command set

- Implemented ExpiryItemService to manage expiry date logic for list items.
- Created ExpiryModels to define types and structures for expiry configurations and rules.
- Added RestError utility for handling API response errors.
- Developed ExpiryIndicatorFieldCustomizer to display expiry information in list views.
- Introduced ExpiryIndicatorCommandSet for extending expiry dates and managing settings.
- Added settings dialog for configuring expiry settings.
- Implemented localization support for English and German languages.
- Added TypeScript configuration files for project setup.
- Included TSLint configuration for code quality enforcement.
This commit is contained in:
Torsten Brendgen
2026-07-16 21:55:30 +02:00
commit c1f1d02d9c
33 changed files with 1851 additions and 0 deletions

28
config/config.json Normal file
View File

@@ -0,0 +1,28 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json",
"version": "2.0",
"bundles": {
"expiry-indicator-field-customizer": {
"components": [
{
"entrypoint": "./lib/extensions/expiryIndicator/ExpiryIndicatorFieldCustomizer.js",
"manifest": "./src/extensions/expiryIndicator/ExpiryIndicatorFieldCustomizer.manifest.json"
}
]
},
"expiry-indicator-command-set": {
"components": [
{
"entrypoint": "./lib/extensions/expiryIndicatorCommandSet/ExpiryIndicatorCommandSet.js",
"manifest": "./src/extensions/expiryIndicatorCommandSet/ExpiryIndicatorCommandSet.manifest.json"
}
]
}
},
"externals": {},
"localizedResources": {
"ExpiryIndicatorStrings": "lib/extensions/expiryIndicator/loc/{locale}.js",
"ExpiryIndicatorCommandSetStrings": "lib/extensions/expiryIndicatorCommandSet/loc/{locale}.js"
}
}

5
config/copy-assets.json Normal file
View File

@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/copy-assets.schema.json",
"deployCdnPath": "temp/deploy"
}

View File

@@ -0,0 +1,27 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
"solution": {
"name": "expiry-indicator-client-side-solution",
"id": "68bb6d2d-9895-45b4-88e8-b98835faa981",
"version": "1.0.0.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": false,
"features": [
{
"title": "ExpiryIndicator command set registration",
"description": "Registers ExpiryIndicator commands for modern lists and document libraries. Does not provision ExpiryDate.",
"id": "913402af-ab9a-4974-9f86-5c2159ae41db",
"version": "1.0.0.0",
"assets": {
"elementManifests": [
"elements.xml"
]
}
}
]
},
"paths": {
"zippedPackage": "solution/expiry-indicator.sppkg"
}
}

26
config/serve.json Normal file
View File

@@ -0,0 +1,26 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/spfx-serve.schema.json",
"port": 4321,
"https": true,
"serveConfigurations": {
"fieldCustomizer": {
"pageUrl": "https://sharepoint/sites/demo/Lists/Test/AllItems.aspx",
"fieldCustomizers": {
"ExpiryDate": {
"id": "a555f4fc-d6a6-4421-8189-457449d9bbde",
"properties": {}
}
}
},
"commandSet": {
"pageUrl": "https://sharepoint/sites/demo/Lists/Test/AllItems.aspx",
"customActions": {
"cd58f5d9-ffc8-4df7-a910-3054842d7abf": {
"location": "ClientSideExtension.ListViewCommandSet.CommandBar",
"properties": {}
}
}
}
}
}

View File

@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json",
"cdnBasePath": "<!-- PATH TO CDN -->"
}