feat: Update dynamic poll web part to version 1.3.0 with enhanced field mapping and configurable title

- Bump version in package.json to 1.3.0
- Add new properties for field mapping in DynamicPollWebPart.manifest.json
- Enhance DynamicPollWebPart.ts to support dynamic field mapping for polls and answers
- Implement field loading and default application logic in PollDataService.ts
- Update PollTypes.ts to include new interfaces for field mapping
- Modify DynamicPollCollection.tsx to display configurable web part title
- Update styles in DynamicPoll.module.scss for improved UI
- Add localization strings for new properties in en-us.js and de-de.js
- Update tests to reflect changes in data structure and functionality
- Validate project structure and ensure all new features are accounted for
This commit is contained in:
Torsten Brendgen
2026-08-27 00:13:58 +02:00
parent f87c49a91a
commit 6bcf7c5020
15 changed files with 423 additions and 99 deletions
+4 -4
View File
@@ -34,10 +34,10 @@ assert('all active polls are returned in activation order',
activePolls.length === 2 && activePolls[0].id === 2 && activePolls[1].id === 4);
const answers: IPollAnswer[] = [
{ id: 1, userKey: 'one@contoso.local', answer: 'A' },
{ id: 2, userKey: 'two@contoso.local', answer: 'B' },
{ id: 3, userKey: 'three@contoso.local', answer: 'A' },
{ id: 4, userKey: 'legacy@contoso.local', answer: 'Removed option' }
{ id: 1, pollKey: 'poll-1', userKey: 'one@contoso.local', answer: 'A' },
{ id: 2, pollKey: 'poll-1', userKey: 'two@contoso.local', answer: 'B' },
{ id: 3, pollKey: 'poll-1', userKey: 'three@contoso.local', answer: 'A' },
{ id: 4, pollKey: 'poll-1', userKey: 'legacy@contoso.local', answer: 'Removed option' }
];
const results = calculatePollResults(['A', 'B'], answers);
assert('votes are counted per configured option', results[0].votes === 2 && results[1].votes === 1);