Merge pull request #1377 from pnp/react-events-dynamicdata-110
Upgraded React-Events-DynamicData to SPFx 1.10
|
@ -0,0 +1,25 @@
|
|||
# EditorConfig helps developers define and maintain consistent
|
||||
# coding styles between different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
|
||||
[*]
|
||||
|
||||
# change these settings to your own preference
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# we recommend you to keep these unchanged
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[{package,bower}.json]
|
||||
indent_style = space
|
||||
indent_size = 2
|
|
@ -1 +1,32 @@
|
|||
.npmrc
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
|
||||
# Dependency directories
|
||||
node_modules
|
||||
|
||||
# Build generated files
|
||||
dist
|
||||
lib
|
||||
solution
|
||||
temp
|
||||
*.sppkg
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# OSX
|
||||
.DS_Store
|
||||
|
||||
# Visual Studio files
|
||||
.ntvs_analysis.dat
|
||||
.vs
|
||||
bin
|
||||
obj
|
||||
|
||||
# Resx Generated Code
|
||||
*.resx.ts
|
||||
|
||||
# Styles Generated Code
|
||||
*.scss.ts
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
"@microsoft/generator-sharepoint": {
|
||||
"isCreatingSolution": true,
|
||||
"isCreatingSolution": false,
|
||||
"environment": "spo",
|
||||
"version": "1.7.0",
|
||||
"version": "1.10.0",
|
||||
"libraryName": "react-events-dynamicdata",
|
||||
"libraryId": "dcd4558f-8ea7-4f77-b494-c2b8a4d51b1d",
|
||||
"libraryId": "eb6be822-bf5f-4d3f-876c-2eaf311f01a4",
|
||||
"packageManager": "npm",
|
||||
"isDomainIsolated": false,
|
||||
"componentType": "webpart"
|
||||
}
|
||||
}
|
|
@ -17,11 +17,13 @@ Sample web parts illustrating using the SharePoint Framework Dynamic data capabi
|
|||
Solution|Author(s)
|
||||
--------|---------
|
||||
react-events-dynamicdata|Waldek Mastykarz (MVP, Rencore, @waldekm)
|
||||
react-events-dynamicdata|Hugo Bernier (MVP, [@bernierh](https://twitter.com/bernierh))
|
||||
|
||||
## Version history
|
||||
|
||||
Version|Date|Comments
|
||||
-------|----|--------
|
||||
1.2|July 8, 2020|Updated sample to SPFx v1.10.0 (Hugo Bernier)
|
||||
1.1|November 9, 2018|Updated sample to SPFx v1.7.0
|
||||
1.0|June 5, 2018|Initial release
|
||||
|
||||
|
@ -66,4 +68,4 @@ Web parts in this solution illustrate the following concepts on top of the Share
|
|||
* using [PnPjs](https://github.com/pnp/pnpjs) to retrieve data from a SharePoint list
|
||||
* using [SharePoint Framework React Controls](https://github.com/SharePoint/sp-dev-fx-controls-react) in web parts
|
||||
|
||||
<img src="https://telemetry.sharepointpnp.com/sp-dev-fx-webparts/samples/react-events-dynamicdata" />
|
||||
<img src="https://telemetry.sharepointpnp.com/sp-dev-fx-webparts/samples/react-events-dynamicdata" />
|
||||
|
|
Before Width: | Height: | Size: 197 KiB |
|
@ -2,16 +2,24 @@
|
|||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json",
|
||||
"version": "2.0",
|
||||
"bundles": {
|
||||
"events": {
|
||||
"event-details-web-part": {
|
||||
"components": [
|
||||
{
|
||||
"entrypoint": "./lib/webparts/eventDetails/EventDetailsWebPart.js",
|
||||
"manifest": "./src/webparts/eventDetails/EventDetailsWebPart.manifest.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"events-web-part": {
|
||||
"components": [
|
||||
{
|
||||
"entrypoint": "./lib/webparts/events/EventsWebPart.js",
|
||||
"manifest": "./src/webparts/events/EventsWebPart.manifest.json"
|
||||
},
|
||||
{
|
||||
"entrypoint": "./lib/webparts/eventDetails/EventDetailsWebPart.js",
|
||||
"manifest": "./src/webparts/eventDetails/EventDetailsWebPart.manifest.json"
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
"map-web-part": {
|
||||
"components": [
|
||||
{
|
||||
"entrypoint": "./lib/webparts/map/MapWebPart.js",
|
||||
"manifest": "./src/webparts/map/MapWebPart.manifest.json"
|
||||
|
@ -21,8 +29,8 @@
|
|||
},
|
||||
"externals": {},
|
||||
"localizedResources": {
|
||||
"EventsWebPartStrings": "lib/webparts/events/loc/{locale}.js",
|
||||
"EventDetailsWebPartStrings": "lib/webparts/eventDetails/loc/{locale}.js",
|
||||
"EventsWebPartStrings": "lib/webparts/events/loc/{locale}.js",
|
||||
"MapWebPartStrings": "lib/webparts/map/loc/{locale}.js",
|
||||
"ControlStrings": "node_modules/@pnp/spfx-controls-react/lib/loc/{locale}.js"
|
||||
}
|
||||
|
|
|
@ -2,25 +2,10 @@
|
|||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
|
||||
"solution": {
|
||||
"name": "react-events-dynamicdata-client-side-solution",
|
||||
"id": "57e5d6e5-04df-4810-b2bd-5b2751200ad9",
|
||||
"version": "1.0.0.0",
|
||||
"id": "eb6be822-bf5f-4d3f-876c-2eaf311f01a4",
|
||||
"version": "1.2.0.0",
|
||||
"includeClientSideAssets": true,
|
||||
"features": [
|
||||
{
|
||||
"title": "Events - Deployment of data",
|
||||
"description": "Deploys data required by the solution",
|
||||
"id": "1b23d9fa-50ab-48e2-9b57-1b7cf18658a5",
|
||||
"version": "1.0.0.0",
|
||||
"assets": {
|
||||
"elementManifests": [
|
||||
"events_elements.xml"
|
||||
],
|
||||
"elementFiles": [
|
||||
"events_schema.xml"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
"isDomainIsolated": false
|
||||
},
|
||||
"paths": {
|
||||
"zippedPackage": "solution/react-events-dynamicdata.sppkg"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const gulp = require('gulp');
|
||||
const build = require('@microsoft/sp-build-web');
|
||||
|
||||
build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);
|
||||
|
||||
build.initialize(gulp);
|
||||
build.initialize(require('gulp'));
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"name": "react-events-dynamicdata",
|
||||
"version": "0.0.1",
|
||||
"version": "1.2.0",
|
||||
"private": true,
|
||||
"main": "lib/index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
|
@ -11,30 +12,32 @@
|
|||
"test": "gulp test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@microsoft/sp-core-library": "1.7.0",
|
||||
"@microsoft/sp-lodash-subset": "1.7.0",
|
||||
"@microsoft/sp-office-ui-fabric-core": "1.7.0",
|
||||
"@microsoft/sp-webpart-base": "1.7.0",
|
||||
"@pnp/common": "^1.1.0",
|
||||
"@pnp/logging": "^1.1.0",
|
||||
"@pnp/odata": "^1.1.0",
|
||||
"@pnp/sp": "^1.1.0",
|
||||
"@pnp/spfx-controls-react": "^1.4.0",
|
||||
"@microsoft/sp-core-library": "1.10.0",
|
||||
"@microsoft/sp-lodash-subset": "1.10.0",
|
||||
"@microsoft/sp-office-ui-fabric-core": "1.10.0",
|
||||
"@microsoft/sp-property-pane": "1.10.0",
|
||||
"@microsoft/sp-webpart-base": "1.10.0",
|
||||
"@pnp/spfx-controls-react": "^1.19.0",
|
||||
"@types/es6-promise": "0.0.33",
|
||||
"@types/react": "16.4.2",
|
||||
"@types/react-dom": "16.0.5",
|
||||
"@types/react": "16.8.8",
|
||||
"@types/react-dom": "16.8.3",
|
||||
"@types/webpack-env": "1.13.1",
|
||||
"react": "16.3.2",
|
||||
"react-dom": "16.3.2"
|
||||
"office-ui-fabric-react": "6.189.2",
|
||||
"react": "16.8.5",
|
||||
"react-dom": "16.8.5"
|
||||
},
|
||||
"resolutions": {
|
||||
"@types/react": "16.8.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@microsoft/sp-build-web": "1.7.0",
|
||||
"@microsoft/sp-module-interfaces": "1.7.0",
|
||||
"@microsoft/sp-webpart-workbench": "1.7.0",
|
||||
"@microsoft/sp-tslint-rules": "1.7.0",
|
||||
"@microsoft/sp-build-web": "1.10.0",
|
||||
"@microsoft/sp-tslint-rules": "1.10.0",
|
||||
"@microsoft/sp-module-interfaces": "1.10.0",
|
||||
"@microsoft/sp-webpart-workbench": "1.10.0",
|
||||
"@microsoft/rush-stack-compiler-3.3": "0.3.5",
|
||||
"gulp": "~3.9.1",
|
||||
"@types/chai": "3.4.34",
|
||||
"@types/mocha": "2.2.38",
|
||||
"ajv": "~5.2.2",
|
||||
"gulp": "~3.9.1"
|
||||
"ajv": "~5.2.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
|
||||
<Field ID="8f34b2cd-0a01-4a45-9a81-3d564d24fdf8"
|
||||
Name="PnPCity"
|
||||
DisplayName="City"
|
||||
Type="Text"
|
||||
Required="TRUE"
|
||||
Group="PnP Columns" />
|
||||
<Field ID="8b6ebc5d-2b1c-4170-9475-75105394034d"
|
||||
Name="PnPAddress"
|
||||
DisplayName="Address"
|
||||
Type="Note"
|
||||
RichText="FALSE"
|
||||
NumLines="2"
|
||||
Required="TRUE"
|
||||
Group="PnP Columns" />
|
||||
<Field ID="00292097-d535-43d5-a4de-91fbb8c9481b"
|
||||
Name="PnPOrganizerName"
|
||||
DisplayName="Organizer name"
|
||||
Type="Text"
|
||||
Group="PnP Columns" />
|
||||
<Field ID="d7e33d91-8743-4429-a96a-b70ffdbd0f35"
|
||||
Name="PnPOrganizerEmail"
|
||||
DisplayName="Organizer e-mail"
|
||||
Type="Text"
|
||||
Group="PnP Columns" />
|
||||
<Field ID="6d34055b-cafd-4f32-a1ab-c6db8a3c5c84"
|
||||
Name="PnPEventDate"
|
||||
DisplayName="Event date"
|
||||
Type="DateTime"
|
||||
Format="DateOnly"
|
||||
Group="PnP Columns" />
|
||||
|
||||
<ContentType ID="0x0100A73DD10A87FA4075B98FC1CBCAA2C775"
|
||||
Name="PnP Event"
|
||||
Group="PnP Content Types"
|
||||
Description="Event">
|
||||
<FieldRefs>
|
||||
<FieldRef ID="8f34b2cd-0a01-4a45-9a81-3d564d24fdf8" />
|
||||
<FieldRef ID="8b6ebc5d-2b1c-4170-9475-75105394034d" />
|
||||
<FieldRef ID="00292097-d535-43d5-a4de-91fbb8c9481b" />
|
||||
<FieldRef ID="d7e33d91-8743-4429-a96a-b70ffdbd0f35" />
|
||||
<FieldRef ID="6d34055b-cafd-4f32-a1ab-c6db8a3c5c84" />
|
||||
</FieldRefs>
|
||||
</ContentType>
|
||||
|
||||
<ListInstance
|
||||
CustomSchema="events_schema.xml"
|
||||
FeatureId="00bfea71-de22-43b2-a848-c05709900100"
|
||||
Title="Company events"
|
||||
Description="Company events"
|
||||
TemplateType="100"
|
||||
Url="Lists/CompanyEvents">
|
||||
<Data>
|
||||
<Rows>
|
||||
<Row>
|
||||
<Field Name="Title">Tampa Home Show</Field>
|
||||
<Field Name="PnPCity">Tampa, FL</Field>
|
||||
<Field Name="PnPAddress">333 S Franklin St</Field>
|
||||
<Field Name="PnPOrganizerName">Grady Archie</Field>
|
||||
<Field Name="PnPOrganizerEmail">GradyA@contoso.OnMicrosoft.com</Field>
|
||||
<Field Name="PnPEventDate">2018-05-29T00:00:00Z</Field>
|
||||
</Row>
|
||||
<Row>
|
||||
<Field Name="Title">Custom Electronic Design and Installation Association (CEDIA)</Field>
|
||||
<Field Name="PnPCity">San Diego, CA</Field>
|
||||
<Field Name="PnPAddress">111 W Harbor Dr</Field>
|
||||
<Field Name="PnPOrganizerName">Megan Bowen</Field>
|
||||
<Field Name="PnPOrganizerEmail">MeganB@contoso.OnMicrosoft.com</Field>
|
||||
<Field Name="PnPEventDate">2018-06-15T00:00:00Z</Field>
|
||||
</Row>
|
||||
<Row>
|
||||
<Field Name="Title">Design Automation Conference (DAC)</Field>
|
||||
<Field Name="PnPCity">San Francisco, CA</Field>
|
||||
<Field Name="PnPAddress">747 Howard St Fl 5</Field>
|
||||
<Field Name="PnPOrganizerName">Irvin Sayers</Field>
|
||||
<Field Name="PnPOrganizerEmail">IrvinSB@contoso.OnMicrosoft.com</Field>
|
||||
<Field Name="PnPEventDate">2018-07-05T00:00:00Z</Field>
|
||||
</Row>
|
||||
</Rows>
|
||||
</Data>
|
||||
</ListInstance>
|
||||
</Elements>
|
|
@ -1,34 +0,0 @@
|
|||
<List xmlns:ows="Microsoft SharePoint" Title="Redirections" EnableContentTypes="TRUE" FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/PnPRedirections" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/">
|
||||
<MetaData>
|
||||
<ContentTypes>
|
||||
<ContentTypeRef ID="0x0100A73DD10A87FA4075B98FC1CBCAA2C775" />
|
||||
</ContentTypes>
|
||||
<Fields></Fields>
|
||||
<Views>
|
||||
<View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/generic.png" Url="AllItems.aspx">
|
||||
<XslLink Default="TRUE">main.xsl</XslLink>
|
||||
<JSLink>clienttemplates.js</JSLink>
|
||||
<RowLimit Paged="TRUE">30</RowLimit>
|
||||
<Toolbar Type="Standard" />
|
||||
<ViewFields>
|
||||
<FieldRef Name="LinkTitle"></FieldRef>
|
||||
<FieldRef Name="PnPCity"></FieldRef>
|
||||
<FieldRef Name="PnPAddress"></FieldRef>
|
||||
<FieldRef Name="PnPOrganizerName"></FieldRef>
|
||||
<FieldRef Name="PnPOrganizerEmail"></FieldRef>
|
||||
<FieldRef Name="PnPEventDate"></FieldRef>
|
||||
</ViewFields>
|
||||
<Query>
|
||||
<OrderBy>
|
||||
<FieldRef Name="ID" />
|
||||
</OrderBy>
|
||||
</Query>
|
||||
</View>
|
||||
</Views>
|
||||
<Forms>
|
||||
<Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
|
||||
<Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
|
||||
<Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
|
||||
</Forms>
|
||||
</MetaData>
|
||||
</List>
|
|
@ -1,22 +1,19 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json",
|
||||
"id": "d164f880-41df-4698-846d-6bae153d8258",
|
||||
"id": "4042c7c8-3623-4c0c-9223-649557464016",
|
||||
"alias": "EventDetailsWebPart",
|
||||
"componentType": "WebPart",
|
||||
|
||||
// The "*" signifies that the version should be taken from the package.json
|
||||
"version": "*",
|
||||
"manifestVersion": 2,
|
||||
|
||||
// If true, the component can only be installed on sites where Custom Script is allowed.
|
||||
// Components that allow authors to embed arbitrary script code should set this to true.
|
||||
// https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f
|
||||
"requiresCustomScript": false,
|
||||
"supportedHosts": ["SharePointWebPart"],
|
||||
|
||||
"preconfiguredEntries": [{
|
||||
"groupId": "5c03119e-3074-46fd-976b-c60198311f70", // Other
|
||||
"groupId": "5c03119e-3074-46fd-976b-c60198311f70",
|
||||
"group": { "default": "Other" },
|
||||
"title": { "default": "Event details" },
|
||||
"title": { "default": "EventDetails" },
|
||||
"description": { "default": "Shows details of the selected event" },
|
||||
"officeFabricIconFontName": "CustomList",
|
||||
"properties": {
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
import * as React from 'react';
|
||||
import * as ReactDom from 'react-dom';
|
||||
import { Version } from '@microsoft/sp-core-library';
|
||||
import {
|
||||
BaseClientSideWebPart,
|
||||
IPropertyPaneConfiguration,
|
||||
IWebPartPropertiesMetadata,
|
||||
PropertyPaneDynamicFieldSet,
|
||||
PropertyPaneDynamicField
|
||||
} from '@microsoft/sp-webpart-base';
|
||||
import { BaseClientSideWebPart, IWebPartPropertiesMetadata } from "@microsoft/sp-webpart-base";
|
||||
import { IPropertyPaneConfiguration, PropertyPaneDynamicFieldSet, PropertyPaneDynamicField } from "@microsoft/sp-property-pane";
|
||||
|
||||
import * as strings from 'EventDetailsWebPartStrings';
|
||||
import { EventDetails, IEventDetailsProps } from './components';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@import '~@microsoft/sp-office-ui-fabric-core/dist/sass/SPFabricCore.scss';
|
||||
@import '~office-ui-fabric-react/dist/sass/References.scss';
|
||||
|
||||
.eventDetails {
|
||||
.info {
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json",
|
||||
"id": "a453b126-4b2d-4314-bf38-76d1e4416175",
|
||||
"id": "fe9049bb-eb8b-474b-b777-ff492089f5c8",
|
||||
"alias": "EventsWebPart",
|
||||
"componentType": "WebPart",
|
||||
|
||||
// The "*" signifies that the version should be taken from the package.json
|
||||
"version": "*",
|
||||
"manifestVersion": 2,
|
||||
|
||||
// If true, the component can only be installed on sites where Custom Script is allowed.
|
||||
// Components that allow authors to embed arbitrary script code should set this to true.
|
||||
// https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f
|
||||
"requiresCustomScript": false,
|
||||
"supportedHosts": ["SharePointWebPart"],
|
||||
|
||||
"preconfiguredEntries": [{
|
||||
"groupId": "5c03119e-3074-46fd-976b-c60198311f70", // Other
|
||||
"groupId": "5c03119e-3074-46fd-976b-c60198311f70",
|
||||
"group": { "default": "Other" },
|
||||
"title": { "default": "Events" },
|
||||
"description": { "default": "Shows upcoming events" },
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
import * as React from 'react';
|
||||
import * as ReactDom from 'react-dom';
|
||||
import { Version } from '@microsoft/sp-core-library';
|
||||
import {
|
||||
BaseClientSideWebPart,
|
||||
IPropertyPaneConfiguration
|
||||
} from '@microsoft/sp-webpart-base';
|
||||
|
||||
import { BaseClientSideWebPart } from "@microsoft/sp-webpart-base";
|
||||
import { IPropertyPaneConfiguration } from "@microsoft/sp-property-pane";
|
||||
import * as strings from 'EventsWebPartStrings';
|
||||
import { Events } from './components';
|
||||
import { IEventsProps } from './components/IEventsProps';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@import '~@microsoft/sp-office-ui-fabric-core/dist/sass/SPFabricCore.scss';
|
||||
@import '~office-ui-fabric-react/dist/sass/References.scss';
|
||||
|
||||
.events {
|
||||
.error {
|
||||
|
@ -12,4 +13,4 @@
|
|||
.info {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export * from './Events';
|
||||
export * from './IEventsProps';
|
||||
export * from './IEventsState';
|
||||
export * from './IEventsState';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define([], function() {
|
||||
return {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json",
|
||||
"id": "44181a37-27e5-4802-8f0b-4f8766792eda",
|
||||
"id": "53ac9dad-7fd5-49f6-83be-1a6439076493",
|
||||
"alias": "MapWebPart",
|
||||
"componentType": "WebPart",
|
||||
|
||||
// The "*" signifies that the version should be taken from the package.json
|
||||
"version": "*",
|
||||
"manifestVersion": 2,
|
||||
|
||||
// If true, the component can only be installed on sites where Custom Script is allowed.
|
||||
// Components that allow authors to embed arbitrary script code should set this to true.
|
||||
// https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f
|
||||
"requiresCustomScript": false,
|
||||
"supportedHosts": ["SharePointWebPart"],
|
||||
|
||||
"preconfiguredEntries": [{
|
||||
"groupId": "5c03119e-3074-46fd-976b-c60198311f70", // Other
|
||||
"groupId": "5c03119e-3074-46fd-976b-c60198311f70",
|
||||
"group": { "default": "Other" },
|
||||
"title": { "default": "Map" },
|
||||
"description": { "default": "Shows the specified location on a map" },
|
||||
|
|
|
@ -1,17 +1,9 @@
|
|||
import * as React from 'react';
|
||||
import * as ReactDom from 'react-dom';
|
||||
import { Version } from '@microsoft/sp-core-library';
|
||||
import {
|
||||
BaseClientSideWebPart,
|
||||
IPropertyPaneConfiguration,
|
||||
PropertyPaneTextField,
|
||||
PropertyPaneLink,
|
||||
IPropertyPaneConditionalGroup,
|
||||
PropertyPaneDynamicFieldSet,
|
||||
PropertyPaneDynamicField,
|
||||
IWebPartPropertiesMetadata,
|
||||
DynamicDataSharedDepth
|
||||
} from '@microsoft/sp-webpart-base';
|
||||
import { BaseClientSideWebPart, IWebPartPropertiesMetadata } from "@microsoft/sp-webpart-base";
|
||||
import { IPropertyPaneConfiguration, PropertyPaneTextField, PropertyPaneLink, IPropertyPaneConditionalGroup, PropertyPaneDynamicFieldSet, PropertyPaneDynamicField,DynamicDataSharedDepth } from "@microsoft/sp-property-pane";
|
||||
|
||||
|
||||
import * as strings from 'MapWebPartStrings';
|
||||
import { Map, IMapProps } from './components';
|
||||
|
@ -58,7 +50,7 @@ export default class MapWebPart extends BaseClientSideWebPart<IMapWebPartProps>
|
|||
// address entered in web part properties
|
||||
const address: string | undefined = this.properties.address.tryGetValue();
|
||||
const city: string | undefined = this.properties.city.tryGetValue();
|
||||
const needsConfiguration: boolean = !this.properties.bingMapsApiKey || (!address && !this.properties.address.tryGetSource()) ||
|
||||
const needsConfiguration: boolean = !this.properties.bingMapsApiKey || (!address && !this.properties.address.tryGetSource()) ||
|
||||
(!city && !this.properties.city.tryGetSource());
|
||||
|
||||
const element: React.ReactElement<IMapProps> = React.createElement(
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@import '~@microsoft/sp-office-ui-fabric-core/dist/sass/SPFabricCore.scss';
|
||||
@import '~office-ui-fabric-react/dist/sass/References.scss';
|
||||
|
||||
.map {
|
||||
color: inherit;
|
||||
|
|
|
@ -12,4 +12,4 @@ define([], function() {
|
|||
"PropertyIdFieldLabel": "Data property",
|
||||
"PropertyPaneDescription": "Web part configuration"
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 1.4 KiB |
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.3/includes/tsconfig-web.json",
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
|
@ -10,6 +11,9 @@
|
|||
"experimentalDecorators": true,
|
||||
"skipLibCheck": true,
|
||||
"outDir": "lib",
|
||||
"inlineSources": false,
|
||||
"strictNullChecks": false,
|
||||
"noUnusedLocals": false,
|
||||
"typeRoots": [
|
||||
"./node_modules/@types",
|
||||
"./node_modules/@microsoft"
|
||||
|
|