feat: update version to 1.2.1 and improve title handling in organization chart

This commit is contained in:
Torsten Brendgen
2026-08-27 00:36:34 +02:00
parent c19d38f851
commit 16f6cf56e4
5 changed files with 10 additions and 7 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
"name": "organization-chart-webpart", "name": "organization-chart-webpart",
"title": "organization-chart-webpart", "title": "organization-chart-webpart",
"id": "b2f88ea8-f7da-4d0e-a945-6973bf1acd1e", "id": "b2f88ea8-f7da-4d0e-a945-6973bf1acd1e",
"version": "1.2.0.0", "version": "1.2.1.0",
"includeClientSideAssets": true, "includeClientSideAssets": true,
"skipFeatureDeployment": true "skipFeatureDeployment": true
}, },
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "organization-chart-webpart", "name": "organization-chart-webpart",
"version": "1.2.0", "version": "1.2.1",
"private": true, "private": true,
"main": "lib/index.js", "main": "lib/index.js",
"engines": { "node": ">=6.9.0 <9.0.0" }, "engines": { "node": ">=6.9.0 <9.0.0" },
@@ -101,7 +101,7 @@ export default class OrganizationChartWebPart extends BaseClientSideWebPart<IOrg
if (!data.root) { this.renderStatus(strings.EmptyMessage, false); return; } if (!data.root) { this.renderStatus(strings.EmptyMessage, false); return; }
const element: React.ReactElement<IOrganizationChartProps> = React.createElement(OrganizationChart, { const element: React.ReactElement<IOrganizationChartProps> = React.createElement(OrganizationChart, {
data: data, data: data,
title: this.properties.title || strings.DefaultTitle, title: String(this.properties.title || '').trim(),
showPictures: this.properties.showPictures !== false, showPictures: this.properties.showPictures !== false,
showContactDetails: this.properties.showContactDetails === true, showContactDetails: this.properties.showContactDetails === true,
cardBackgroundColor: this.properties.cardBackgroundColor || '', cardBackgroundColor: this.properties.cardBackgroundColor || '',
@@ -39,9 +39,10 @@ export default class OrganizationChart extends React.Component<IOrganizationChar
const treeClassName: string = styles.tree + (densityClass ? ' ' + densityClass : ''); const treeClassName: string = styles.tree + (densityClass ? ' ' + densityClass : '');
return ( return (
<section className={styles.organizationChart} aria-label={this.props.title}> <section className={styles.organizationChart} aria-label={this.props.title}>
{this.props.title &&
<div className={styles.header}> <div className={styles.header}>
{this.props.title && <h2 className={styles.heading}>{this.props.title}</h2>} <h2 className={styles.heading}>{this.props.title}</h2>
</div> </div>}
{this.props.data.truncated && <div className={styles.notice} role='status'>{this.props.truncatedLabel}</div>} {this.props.data.truncated && <div className={styles.notice} role='status'>{this.props.truncatedLabel}</div>}
<div className={styles.viewport} ref={(element: HTMLDivElement): void => { this.viewportElement = element; }}> <div className={styles.viewport} ref={(element: HTMLDivElement): void => { this.viewportElement = element; }}>
<div className={treeClassName}> <div className={treeClassName}>
+3 -1
View File
@@ -26,10 +26,12 @@ assert(packageSolution.solution.includeClientSideAssets === true && packageSolut
'Central deployment is not configured.'); 'Central deployment is not configured.');
assert(!!config.bundles['organization-chart-webpart'], 'Bundle name is inconsistent.'); assert(!!config.bundles['organization-chart-webpart'], 'Bundle name is inconsistent.');
assert(manifest.componentType === 'WebPart' && manifest.alias === 'OrganizationChartWebPart', 'Manifest is invalid.'); assert(manifest.componentType === 'WebPart' && manifest.alias === 'OrganizationChartWebPart', 'Manifest is invalid.');
assert(packageJson.version === '1.2.0' && packageSolution.solution.version === '1.2.0.0', assert(packageJson.version === '1.2.1' && packageSolution.solution.version === '1.2.1.0',
'Organization Chart version is inconsistent.'); 'Organization Chart version is inconsistent.');
assert(webPart.indexOf("PropertyPaneTextField('title'") >= 0 && component.indexOf('styles.heading') >= 0, assert(webPart.indexOf("PropertyPaneTextField('title'") >= 0 && component.indexOf('styles.heading') >= 0,
'Configurable web part title is missing.'); 'Configurable web part title is missing.');
assert(webPart.indexOf("String(this.properties.title || '').trim()") >= 0,
'An empty web part title must remain hidden.');
assert(service.indexOf('/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor') >= 0, 'User Profile REST access is missing.'); assert(service.indexOf('/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor') >= 0, 'User Profile REST access is missing.');
assert(service.indexOf('/_api/SP.UserProfiles.PeopleManager/GetMyProperties') >= 0, assert(service.indexOf('/_api/SP.UserProfiles.PeopleManager/GetMyProperties') >= 0,
'Reliable current-user profile access is missing.'); 'Reliable current-user profile access is missing.');