feat: update organization chart web part to support SharePoint list as data source
- Bump version to 1.2.0 for organization-chart-webpart - Add new interfaces and types for SharePoint list configuration - Implement OrganizationChartListDataService to handle SharePoint list data retrieval - Update web part properties to include data source selection and list configuration - Modify rendering logic to accommodate both user profiles and SharePoint list data sources - Enhance property pane with new fields for list configuration - Update localization files for new property labels and messages - Add validation checks for list configuration in the web part
This commit is contained in:
@@ -12,6 +12,7 @@ var packageSolution = json('config/package-solution.json');
|
||||
var config = json('config/config.json');
|
||||
var manifest = json('src/webparts/organizationChart/OrganizationChartWebPart.manifest.json');
|
||||
var service = read('src/webparts/organizationChart/OrganizationChartDataService.ts');
|
||||
var listService = read('src/webparts/organizationChart/OrganizationChartListDataService.ts');
|
||||
var webPart = read('src/webparts/organizationChart/OrganizationChartWebPart.ts');
|
||||
var component = read('src/webparts/organizationChart/components/OrganizationChart.tsx');
|
||||
var picker = read('src/webparts/organizationChart/components/OrganizationChartPeoplePicker.tsx');
|
||||
@@ -25,6 +26,10 @@ assert(packageSolution.solution.includeClientSideAssets === true && packageSolut
|
||||
'Central deployment is not configured.');
|
||||
assert(!!config.bundles['organization-chart-webpart'], 'Bundle name is inconsistent.');
|
||||
assert(manifest.componentType === 'WebPart' && manifest.alias === 'OrganizationChartWebPart', 'Manifest is invalid.');
|
||||
assert(packageJson.version === '1.2.0' && packageSolution.solution.version === '1.2.0.0',
|
||||
'Organization Chart version is inconsistent.');
|
||||
assert(webPart.indexOf("PropertyPaneTextField('title'") >= 0 && component.indexOf('styles.heading') >= 0,
|
||||
'Configurable web part title 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,
|
||||
'Reliable current-user profile access is missing.');
|
||||
@@ -32,9 +37,18 @@ assert(service.indexOf('ClientPeoplePickerWebServiceInterface.clientPeoplePicker
|
||||
'Configured-account resolution through the SharePoint People Picker is missing.');
|
||||
assert(service.indexOf('profile.directReports') >= 0 && service.indexOf('this.buildNode(childAccount, depth + 1') >= 0,
|
||||
'Recursive downward organization loading is missing.');
|
||||
assert(webPart.indexOf("PropertyPaneDropdown('dataSource'") >= 0 &&
|
||||
webPart.indexOf("PropertyPaneDropdown('listId'") >= 0 &&
|
||||
webPart.indexOf("PropertyPaneDropdown('listManagerField'") >= 0,
|
||||
'SharePoint list data-source configuration is missing.');
|
||||
assert(listService.indexOf('/_api/web/lists') >= 0 && listService.indexOf('getOrganization') >= 0 &&
|
||||
listService.indexOf('manager.directReports.push') >= 0,
|
||||
'SharePoint list organization tree loading is missing.');
|
||||
assert(webPart.indexOf('OrganizationChartPeoplePicker') >= 0 &&
|
||||
webPart.indexOf("PropertyPaneTextField('startUser'") < 0,
|
||||
'The verified starting-person picker must be rendered on the canvas instead of the property pane.');
|
||||
assert(webPart.indexOf('DisplayMode.Edit && !this.isListSource()') >= 0,
|
||||
'The User Profile people picker must be hidden for SharePoint-list data sources.');
|
||||
assert(picker.indexOf('NormalPeoplePicker') >= 0 && picker.indexOf('ValidationState.invalid') >= 0,
|
||||
'The on-canvas people picker must reject unverified free-text values.');
|
||||
assert(webPart.indexOf("PropertyPaneSlider('maxDepth'") >= 0 && webPart.indexOf("PropertyPaneSlider('maxPeople'") >= 0,
|
||||
|
||||
Reference in New Issue
Block a user