diff --git a/samples/js-propertycontrols-svg/.editorconfig b/samples/js-propertycontrols-svg/.editorconfig new file mode 100644 index 000000000..8ffcdc4ec --- /dev/null +++ b/samples/js-propertycontrols-svg/.editorconfig @@ -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 \ No newline at end of file diff --git a/samples/js-propertycontrols-svg/.gitignore b/samples/js-propertycontrols-svg/.gitignore new file mode 100644 index 000000000..b19bbe123 --- /dev/null +++ b/samples/js-propertycontrols-svg/.gitignore @@ -0,0 +1,32 @@ +# 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 diff --git a/samples/js-propertycontrols-svg/.yo-rc.json b/samples/js-propertycontrols-svg/.yo-rc.json new file mode 100644 index 000000000..f15a035a7 --- /dev/null +++ b/samples/js-propertycontrols-svg/.yo-rc.json @@ -0,0 +1,8 @@ +{ + "@microsoft/generator-sharepoint": { + "version": "1.3.4", + "libraryName": "js-propertycontrols-svg", + "libraryId": "ff23189c-1771-49b7-b6d9-257b969bf664", + "environment": "spo" + } +} \ No newline at end of file diff --git a/samples/js-propertycontrols-svg/README.md b/samples/js-propertycontrols-svg/README.md new file mode 100644 index 000000000..b7a94fd68 --- /dev/null +++ b/samples/js-propertycontrols-svg/README.md @@ -0,0 +1,57 @@ +# JS Property Controls SVG + +## Summary +An SPFx webpart that displays a Scalable Vector Graphics (SVG) image using properties to customize how it is rendered. The webpart utilizes the PnP SPFx Property Controls package (specifially the SpinButton and ColorPicker) to set these properties. + +![picture of the web part in action](./assets/js-propertycontrols-svg.gif) + +## Used SharePoint Framework Version +![drop](https://img.shields.io/badge/version-1.3.4-green.svg) + +## Which PnP SPFx controls are being used in this sample? +* [PropertyFieldSpinButton](https://github.com/SharePoint/sp-dev-fx-property-controls/wiki/PropertyFieldSpinButton) +* [PropertyFieldColorPicker](https://github.com/SharePoint/sp-dev-fx-property-controls/wiki/PropertyFieldColorPicker) + +## Applies to + +* [SharePoint Framework](https:/dev.office.com/sharepoint) +* [sp-dev-fx-property-controls](https://github.com/SharePoint/sp-dev-fx-property-controls) +* [PnP Man](https://github.com/thechriskent/PnPMan) + +## Solution + +Solution|Author(s) +--------|--------- +js-propertycontrols-svg | Chris Kent ([thechriskent.com](https://thechriskent.com), [@thechriskent](https://twitter.com/thechriskent)) + +## Version history + +Version|Date|Comments +-------|----|-------- +1.0|November 12, 2017|Initial release + +## Disclaimer +**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** + +--- + +## Minimal Path to Awesome + +- Clone this repository +- in the command line run: + - `npm install` + - `gulp serve` +- Customize your PnP Hero! + +## Features +Displays a Scalable Vector Graphics (SVG) image of the SharePoint Patterns and Practices Super Hero and allows users to customize the colors used and the size of the image through the use of PnP SPFx Property Controls (SpinButton & ColorPicker). + +This Web Part illustrates the following concepts on top of the SharePoint Framework: + +- Rendering an SVG image +- Using a PropertyFieldSpinButton control +- Using a PropertyFieldColorPicker control + +![Screenshot](./assets/js-propertycontrols-svg.png) + + \ No newline at end of file diff --git a/samples/js-propertycontrols-svg/assets/js-propertycontrols-svg.PNG b/samples/js-propertycontrols-svg/assets/js-propertycontrols-svg.PNG new file mode 100644 index 000000000..0a1013a45 Binary files /dev/null and b/samples/js-propertycontrols-svg/assets/js-propertycontrols-svg.PNG differ diff --git a/samples/js-propertycontrols-svg/assets/js-propertycontrols-svg.gif b/samples/js-propertycontrols-svg/assets/js-propertycontrols-svg.gif new file mode 100644 index 000000000..e9c852c49 Binary files /dev/null and b/samples/js-propertycontrols-svg/assets/js-propertycontrols-svg.gif differ diff --git a/samples/js-propertycontrols-svg/config/config.json b/samples/js-propertycontrols-svg/config/config.json new file mode 100644 index 000000000..2a932ba0f --- /dev/null +++ b/samples/js-propertycontrols-svg/config/config.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://dev.office.com/json-schemas/spfx-build/config.2.0.schema.json", + "version": "2.0", + "bundles": { + "svg-hero-web-part": { + "components": [ + { + "entrypoint": "./lib/webparts/svgHero/SvgHeroWebPart.js", + "manifest": "./src/webparts/svgHero/SvgHeroWebPart.manifest.json" + } + ] + } + }, + "externals": {}, + "localizedResources": { + "SvgHeroWebPartStrings": "lib/webparts/svgHero/loc/{locale}.js", + "PropertyControlStrings": "./node_modules/@pnp/spfx-property-controls/lib/loc/{locale}.js" + } +} diff --git a/samples/js-propertycontrols-svg/config/copy-assets.json b/samples/js-propertycontrols-svg/config/copy-assets.json new file mode 100644 index 000000000..e1bb26179 --- /dev/null +++ b/samples/js-propertycontrols-svg/config/copy-assets.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://dev.office.com/json-schemas/spfx-build/copy-assets.schema.json", + "deployCdnPath": "temp/deploy" +} diff --git a/samples/js-propertycontrols-svg/config/deploy-azure-storage.json b/samples/js-propertycontrols-svg/config/deploy-azure-storage.json new file mode 100644 index 000000000..638d15ad7 --- /dev/null +++ b/samples/js-propertycontrols-svg/config/deploy-azure-storage.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://dev.office.com/json-schemas/spfx-build/deploy-azure-storage.schema.json", + "workingDir": "./temp/deploy/", + "account": "", + "container": "js-propertycontrols-svg", + "accessKey": "" +} \ No newline at end of file diff --git a/samples/js-propertycontrols-svg/config/package-solution.json b/samples/js-propertycontrols-svg/config/package-solution.json new file mode 100644 index 000000000..5555075e5 --- /dev/null +++ b/samples/js-propertycontrols-svg/config/package-solution.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://dev.office.com/json-schemas/spfx-build/package-solution.schema.json", + "solution": { + "name": "js-propertycontrols-svg-client-side-solution", + "id": "ff23189c-1771-49b7-b6d9-257b969bf664", + "version": "1.0.0.0", + "skipFeatureDeployment": true + }, + "paths": { + "zippedPackage": "solution/js-propertycontrols-svg.sppkg" + } +} diff --git a/samples/js-propertycontrols-svg/config/serve.json b/samples/js-propertycontrols-svg/config/serve.json new file mode 100644 index 000000000..0eb6d456c --- /dev/null +++ b/samples/js-propertycontrols-svg/config/serve.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://dev.office.com/json-schemas/core-build/serve.schema.json", + "port": 4321, + "https": true, + "initialPage": "https://localhost:5432/workbench", + "api": { + "port": 5432, + "entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/" + } +} diff --git a/samples/js-propertycontrols-svg/config/tslint.json b/samples/js-propertycontrols-svg/config/tslint.json new file mode 100644 index 000000000..0bb934c20 --- /dev/null +++ b/samples/js-propertycontrols-svg/config/tslint.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://dev.office.com/json-schemas/core-build/tslint.schema.json", + // Display errors as warnings + "displayAsWarning": true, + // The TSLint task may have been configured with several custom lint rules + // before this config file is read (for example lint rules from the tslint-microsoft-contrib + // project). If true, this flag will deactivate any of these rules. + "removeExistingRules": true, + // When true, the TSLint task is configured with some default TSLint "rules.": + "useDefaultConfigAsBase": false, + // Since removeExistingRules=true and useDefaultConfigAsBase=false, there will be no lint rules + // which are active, other than the list of rules below. + "lintConfig": { + // Opt-in to Lint rules which help to eliminate bugs in JavaScript + "rules": { + "class-name": false, + "export-name": false, + "forin": false, + "label-position": false, + "member-access": true, + "no-arg": false, + "no-console": false, + "no-construct": false, + "no-duplicate-case": true, + "no-duplicate-variable": true, + "no-eval": false, + "no-function-expression": true, + "no-internal-module": true, + "no-shadowed-variable": true, + "no-switch-case-fall-through": true, + "no-unnecessary-semicolons": true, + "no-unused-expression": true, + "no-use-before-declare": true, + "no-with-statement": true, + "semicolon": true, + "trailing-comma": false, + "typedef": false, + "typedef-whitespace": false, + "use-named-parameter": true, + "valid-typeof": true, + "variable-name": false, + "whitespace": false + } + } +} \ No newline at end of file diff --git a/samples/js-propertycontrols-svg/config/write-manifests.json b/samples/js-propertycontrols-svg/config/write-manifests.json new file mode 100644 index 000000000..3506b9ea5 --- /dev/null +++ b/samples/js-propertycontrols-svg/config/write-manifests.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://dev.office.com/json-schemas/spfx-build/write-manifests.schema.json", + "cdnBasePath": "" +} \ No newline at end of file diff --git a/samples/js-propertycontrols-svg/gulpfile.js b/samples/js-propertycontrols-svg/gulpfile.js new file mode 100644 index 000000000..7d36ddb1c --- /dev/null +++ b/samples/js-propertycontrols-svg/gulpfile.js @@ -0,0 +1,6 @@ +'use strict'; + +const gulp = require('gulp'); +const build = require('@microsoft/sp-build-web'); + +build.initialize(gulp); diff --git a/samples/js-propertycontrols-svg/package.json b/samples/js-propertycontrols-svg/package.json new file mode 100644 index 000000000..4e2f77837 --- /dev/null +++ b/samples/js-propertycontrols-svg/package.json @@ -0,0 +1,30 @@ +{ + "name": "js-propertycontrols-svg", + "version": "0.0.1", + "private": true, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "build": "gulp bundle", + "clean": "gulp clean", + "test": "gulp test" + }, + "dependencies": { + "@microsoft/sp-core-library": "~1.3.4", + "@microsoft/sp-lodash-subset": "~1.3.4", + "@microsoft/sp-office-ui-fabric-core": "~1.3.4", + "@microsoft/sp-webpart-base": "~1.3.4", + "@pnp/spfx-property-controls": "1.0.0", + "@types/webpack-env": ">=1.12.1 <1.14.0" + }, + "devDependencies": { + "@microsoft/sp-build-web": "~1.3.4", + "@microsoft/sp-module-interfaces": "~1.3.4", + "@microsoft/sp-webpart-workbench": "~1.3.4", + "gulp": "~3.9.1", + "@types/chai": ">=3.4.34 <3.6.0", + "@types/mocha": ">=2.2.33 <2.6.0", + "ajv": "~5.2.2" + } +} diff --git a/samples/js-propertycontrols-svg/src/webparts/svgHero/SvgHeroWebPart.manifest.json b/samples/js-propertycontrols-svg/src/webparts/svgHero/SvgHeroWebPart.manifest.json new file mode 100644 index 000000000..ca5988bce --- /dev/null +++ b/samples/js-propertycontrols-svg/src/webparts/svgHero/SvgHeroWebPart.manifest.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://dev.office.com/json-schemas/spfx/client-side-web-part-manifest.schema.json", + "id": "ea2f4f01-db05-44e9-8900-22d9ef8d632f", + "alias": "SvgHeroWebPart", + "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, + + "preconfiguredEntries": [{ + "groupId": "5c03119e-3074-46fd-976b-c60198311f70", // Other + "group": { "default": "Other" }, + "title": { "default": "SVG Hero" }, + "description": { "default": "svgHero description" }, + "officeFabricIconFontName": "Running", + "properties": { + "colorPants": "#d83b01", + "colorHair": "#262626", + "colorBelt": "#ffc929", + "colorBuckle": "#ffb900", + "colorSkin": "#ffb900", + "colorCape": "#003c6c", + "colorDiaper": "#262626", + "colorShoes": "#0078d7", + "colorShirt": "#0078d7", + "colorLogo": "#ffffff", + "height": 100 + } + }] +} diff --git a/samples/js-propertycontrols-svg/src/webparts/svgHero/SvgHeroWebPart.module.scss b/samples/js-propertycontrols-svg/src/webparts/svgHero/SvgHeroWebPart.module.scss new file mode 100644 index 000000000..0673ec8e2 --- /dev/null +++ b/samples/js-propertycontrols-svg/src/webparts/svgHero/SvgHeroWebPart.module.scss @@ -0,0 +1,5 @@ +@import '~@microsoft/sp-office-ui-fabric-core/dist/sass/SPFabricCore.scss'; + +.svgHero { + text-align: center; +} \ No newline at end of file diff --git a/samples/js-propertycontrols-svg/src/webparts/svgHero/SvgHeroWebPart.ts b/samples/js-propertycontrols-svg/src/webparts/svgHero/SvgHeroWebPart.ts new file mode 100644 index 000000000..9e230e5f1 --- /dev/null +++ b/samples/js-propertycontrols-svg/src/webparts/svgHero/SvgHeroWebPart.ts @@ -0,0 +1,466 @@ +import { Version } from '@microsoft/sp-core-library'; +import { + BaseClientSideWebPart, + IPropertyPaneConfiguration, + PropertyPaneTextField, + PropertyPaneButton, + PropertyPaneButtonType +} from '@microsoft/sp-webpart-base'; +import { escape } from '@microsoft/sp-lodash-subset'; + +import styles from './SvgHeroWebPart.module.scss'; +import * as strings from 'SvgHeroWebPartStrings'; + +//Import the special property pane controls from the PnP SPFx-Property-Controls package +import { PropertyFieldColorPicker, PropertyFieldColorPickerStyle } from '@pnp/spfx-property-controls/lib/PropertyFieldColorPicker'; +import { PropertyFieldSpinButton } from '@pnp/spfx-property-controls/lib/PropertyFieldSpinButton'; + + +export interface ISvgHeroWebPartProps { + colorPants: string; + colorHair: string; + colorBelt: string; + colorBuckle: string; + colorSkin: string; + colorCape: string; + colorDiaper: string; + colorShoes: string; + colorShirt: string; + colorLogo: string; + height: number; +} + +export default class SvgHeroWebPartWebPart extends BaseClientSideWebPart { + + public render(): void { + + //This will draw the SVG version of the SharePoint PnP Super Hero with custom colors + // You can find the SVG file at https://github.com/thechriskent/PnPMan + this.domElement.innerHTML = ` +
+ + SharePoint Patterns and Practices Hero + + + + + + + + + + image/svg+xml + + SharePoint Patterns and Practices Hero + + + Chris Kent + + + + + Do Whatever + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
`; + } + + private resetToDefault(): void { + this.properties.colorSkin = '#ffb900'; + this.properties.colorHair = '#262626'; + this.properties.colorPants = '#d83b01'; + this.properties.colorBelt = '#ffc929'; + this.properties.colorBuckle = '#ffb900'; + this.properties.colorCape = '#003c6c'; + this.properties.colorDiaper = '#262626'; + this.properties.colorShoes = '#0078d7'; + this.properties.colorShirt = '#0078d7'; + this.properties.colorLogo = '#ffffff'; + } + + protected get dataVersion(): Version { + return Version.parse('1.0'); + } + + protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration { + return { + pages: [ + { + header: { + description: strings.PropertyPaneDescription + }, + groups: [ + { + groupName: strings.SizeGroupName, + groupFields: [ + PropertyFieldSpinButton('height', { + label: strings.HeightFieldLabel, + initialValue: this.properties.height, + onPropertyChange: this.onPropertyPaneFieldChanged, + properties: this.properties, + suffix: " mm", + min: 25, + max: 150, + step: 5, + decimalPlaces: 2, + key: 'height' + }) + ] + }, + { + groupName: strings.ColorGroupName, + groupFields: [ + PropertyFieldColorPicker('colorHair', { + label: strings.HairFieldLabel, + selectedColor: this.properties.colorHair, + onPropertyChange: this.onPropertyPaneFieldChanged, + properties: this.properties, + key: 'colorHair' + }), + PropertyFieldColorPicker('colorSkin', { + label: strings.SkinFieldLabel, + selectedColor: this.properties.colorSkin, + onPropertyChange: this.onPropertyPaneFieldChanged, + properties: this.properties, + key: 'colorSkin' + }), + PropertyFieldColorPicker('colorCape', { + label: strings.CapeFieldLabel, + selectedColor: this.properties.colorCape, + onPropertyChange: this.onPropertyPaneFieldChanged, + properties: this.properties, + key: 'colorCape' + }), + PropertyFieldColorPicker('colorShirt', { + label: strings.ShirtFieldLabel, + selectedColor: this.properties.colorShirt, + onPropertyChange: this.onPropertyPaneFieldChanged, + properties: this.properties, + key: 'colorShirt' + }), + PropertyFieldColorPicker('colorLogo', { + label: strings.LogoFieldLabel, + selectedColor: this.properties.colorLogo, + onPropertyChange: this.onPropertyPaneFieldChanged, + properties: this.properties, + key: 'colorLogo' + }), + PropertyFieldColorPicker('colorBuckle', { + label: strings.BuckleFieldLabel, + selectedColor: this.properties.colorBuckle, + onPropertyChange: this.onPropertyPaneFieldChanged, + properties: this.properties, + key: 'colorBuckle' + }), + PropertyFieldColorPicker('colorBelt', { + label: strings.BeltFieldLabel, + selectedColor: this.properties.colorBelt, + onPropertyChange: this.onPropertyPaneFieldChanged, + properties: this.properties, + key: 'colorBelt' + }), + PropertyFieldColorPicker('colorDiaper', { + label: strings.DiaperFieldLabel, + selectedColor: this.properties.colorDiaper, + onPropertyChange: this.onPropertyPaneFieldChanged, + properties: this.properties, + key: 'colorDiaper' + }), + PropertyFieldColorPicker('colorPants', { + label: strings.PantsFieldLabel, + selectedColor: this.properties.colorPants, + onPropertyChange: this.onPropertyPaneFieldChanged, + properties: this.properties, + key: 'colorPants' + }), + PropertyFieldColorPicker('colorShoes', { + label: strings.ShoesFieldLabel, + selectedColor: this.properties.colorShoes, + onPropertyChange: this.onPropertyPaneFieldChanged, + properties: this.properties, + key: 'colorShoes' + }), + PropertyPaneButton('reset',{ + text: strings.ResetButtonLabel, + buttonType: PropertyPaneButtonType.Command, + icon: 'Warning', + onClick: this.resetToDefault.bind(this) + }) + ] + } + ] + } + ] + }; + } +} diff --git a/samples/js-propertycontrols-svg/src/webparts/svgHero/loc/en-us.js b/samples/js-propertycontrols-svg/src/webparts/svgHero/loc/en-us.js new file mode 100644 index 000000000..c53f5cac2 --- /dev/null +++ b/samples/js-propertycontrols-svg/src/webparts/svgHero/loc/en-us.js @@ -0,0 +1,20 @@ +define([], function() { + return { + PropertyPaneDescription: "Customize your PnP Hero!", + ColorGroupName: "Colors", + SizeGroupName: "Size", + DescriptionFieldLabel: "Description Field", + PantsFieldLabel: "Pants", + HairFieldLabel: "Hair", + BeltFieldLabel: "Belt", + BuckleFieldLabel: "Buckle", + SkinFieldLabel: "Skin", + CapeFieldLabel: "Cape", + DiaperFieldLabel: "Diaper", + ShoesFieldLabel: "Shoes", + ShirtFieldLabel: "Shirt", + LogoFieldLabel: "Logo", + HeightFieldLabel: "Height", + ResetButtonLabel: "Reset to Default Colors" + } +}); \ No newline at end of file diff --git a/samples/js-propertycontrols-svg/src/webparts/svgHero/loc/mystrings.d.ts b/samples/js-propertycontrols-svg/src/webparts/svgHero/loc/mystrings.d.ts new file mode 100644 index 000000000..38cbe95f6 --- /dev/null +++ b/samples/js-propertycontrols-svg/src/webparts/svgHero/loc/mystrings.d.ts @@ -0,0 +1,23 @@ +declare interface ISvgHeroWebPartStrings { + PropertyPaneDescription: string; + ColorGroupName: string; + SizeGroupName: string; + DescriptionFieldLabel: string; + PantsFieldLabel: string; + HairFieldLabel: string; + BeltFieldLabel: string; + BuckleFieldLabel: string; + SkinFieldLabel: string; + CapeFieldLabel: string; + DiaperFieldLabel: string; + ShoesFieldLabel: string; + ShirtFieldLabel: string; + LogoFieldLabel: string; + HeightFieldLabel: string; + ResetButtonLabel: string; +} + +declare module 'SvgHeroWebPartStrings' { + const strings: ISvgHeroWebPartStrings; + export = strings; +} diff --git a/samples/js-propertycontrols-svg/src/webparts/svgHero/test/SvgHeroWebPart.test.ts b/samples/js-propertycontrols-svg/src/webparts/svgHero/test/SvgHeroWebPart.test.ts new file mode 100644 index 000000000..f4f5d12ce --- /dev/null +++ b/samples/js-propertycontrols-svg/src/webparts/svgHero/test/SvgHeroWebPart.test.ts @@ -0,0 +1,9 @@ +/// + +import { assert } from 'chai'; + +describe('SvgHeroWebPart', () => { + it('should do something', () => { + assert.ok(true); + }); +}); diff --git a/samples/js-propertycontrols-svg/tsconfig.json b/samples/js-propertycontrols-svg/tsconfig.json new file mode 100644 index 000000000..20a531bae --- /dev/null +++ b/samples/js-propertycontrols-svg/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "es5", + "forceConsistentCasingInFileNames": true, + "module": "commonjs", + "jsx": "react", + "declaration": true, + "sourceMap": true, + "experimentalDecorators": true, + "types": [ + "es6-promise", + "es6-collections", + "webpack-env" + ] + } +} diff --git a/samples/js-propertycontrols-svg/typings/@ms/odsp.d.ts b/samples/js-propertycontrols-svg/typings/@ms/odsp.d.ts new file mode 100644 index 000000000..5a2404000 --- /dev/null +++ b/samples/js-propertycontrols-svg/typings/@ms/odsp.d.ts @@ -0,0 +1,11 @@ +// Type definitions for Microsoft ODSP projects +// Project: ODSP + +/* Global definition for UNIT_TEST builds + Code that is wrapped inside an if(UNIT_TEST) {...} + block will not be included in the final bundle when the + --ship flag is specified */ +declare const UNIT_TEST: boolean; + +/* Global defintion for SPO builds */ +declare const DATACENTER: boolean; \ No newline at end of file diff --git a/samples/js-propertycontrols-svg/typings/tsd.d.ts b/samples/js-propertycontrols-svg/typings/tsd.d.ts new file mode 100644 index 000000000..e7efdd728 --- /dev/null +++ b/samples/js-propertycontrols-svg/typings/tsd.d.ts @@ -0,0 +1 @@ +///