diff --git a/samples/angular-msgraph/.yo-rc.json b/samples/angular-msgraph/.yo-rc.json index b6daa0a76..7849e0b70 100644 --- a/samples/angular-msgraph/.yo-rc.json +++ b/samples/angular-msgraph/.yo-rc.json @@ -1,7 +1,8 @@ { "@microsoft/generator-sharepoint": { - "libraryName": "angular-graph-rc", - "libraryId": "0e824f74-7ed5-4612-9e01-64b25af579fe", - "framework": "none" + "libraryName": "angular-msgraph", + "framework": "none", + "version": "1.0.0", + "libraryId": "bb9709f1-ce33-47e1-9ad0-edcba4c6932c" } } \ No newline at end of file diff --git a/samples/angular-msgraph/README.md b/samples/angular-msgraph/README.md index 2426124a1..9175e7b59 100644 --- a/samples/angular-msgraph/README.md +++ b/samples/angular-msgraph/README.md @@ -19,7 +19,7 @@ display all the Lists associated with the site. Then all the items inside the Li > Note: I currently only have models developed for the Announcements List. All other lists will currently generate errors. ## Used SharePoint Framework Version -![drop](https://img.shields.io/badge/drop-rc0-green.svg) +![drop](https://img.shields.io/badge/drop-ga-green.svg) ## Applies to @@ -30,12 +30,13 @@ display all the Lists associated with the site. Then all the items inside the Li Solution|Author(s) --------|--------- -angular-msgraph-rc|David Hartman ([Slalom](https://slalom.com)) +angular-msgraph|David Hartman ([Slalom](https://slalom.com)) ## Version history Version|Date|Comments -------|----|-------- +2.0|April 19th, 2017|GA Release 1.0|February 6th, 2017|Initial release ## Disclaimer diff --git a/samples/angular-msgraph/assets/Connect.png b/samples/angular-msgraph/assets/Connect.png index dd8f03c9b..286fa21ba 100644 Binary files a/samples/angular-msgraph/assets/Connect.png and b/samples/angular-msgraph/assets/Connect.png differ diff --git a/samples/angular-msgraph/assets/Connected.png b/samples/angular-msgraph/assets/Connected.png index 52572d5bb..0f1b4c220 100644 Binary files a/samples/angular-msgraph/assets/Connected.png and b/samples/angular-msgraph/assets/Connected.png differ diff --git a/samples/angular-msgraph/assets/Items.png b/samples/angular-msgraph/assets/Items.png index 1d0296f33..739b4e739 100644 Binary files a/samples/angular-msgraph/assets/Items.png and b/samples/angular-msgraph/assets/Items.png differ diff --git a/samples/angular-msgraph/assets/Lists.png b/samples/angular-msgraph/assets/Lists.png index 72ad83fd1..671846307 100644 Binary files a/samples/angular-msgraph/assets/Lists.png and b/samples/angular-msgraph/assets/Lists.png differ diff --git a/samples/angular-msgraph/assets/Root.png b/samples/angular-msgraph/assets/Root.png index e3ea31767..cebd80c84 100644 Binary files a/samples/angular-msgraph/assets/Root.png and b/samples/angular-msgraph/assets/Root.png differ diff --git a/samples/angular-msgraph/config/config.json b/samples/angular-msgraph/config/config.json index 688253375..92b2e0a8e 100644 --- a/samples/angular-msgraph/config/config.json +++ b/samples/angular-msgraph/config/config.json @@ -1,13 +1,29 @@ { "entries": [ { - "entry": "./lib/webparts/angularMsGraph/AngularMsGraphWebPart.js", - "manifest": "./src/webparts/angularMsGraph/AngularMsGraphWebPart.manifest.json", - "outputPath": "./dist/angular-ms-graph.bundle.js" + "entry": "./lib/webparts/msGraph/MsGraphWebPart.js", + "manifest": "./src/webparts/msGraph/MsGraphWebPart.manifest.json", + "outputPath": "./dist/ms-graph.bundle.js" } ], - "externals": {}, + "externals": { + "angular": { + "path": "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.11/angular.js", + "globalName": "angular" + }, + "ng-office-fabric-ui": { + "path": "https://cdnjs.cloudflare.com/ajax/libs/ngOfficeUiFabric/0.15.0/ngOfficeUiFabric.js", + "globalName": "ng-office-fabric-ui", + "globalDependencies": [ + "angular" + ] + }, + "hellojs": { + "path": "https://cdnjs.cloudflare.com/ajax/libs/hellojs/1.14.1/hello.js", + "globalName": "hellojs" + } + }, "localizedResources": { - "angularMsGraphStrings": "webparts/angularMsGraph/loc/{locale}.js" + "msGraphStrings": "webparts/msGraph/loc/{locale}.js" } } diff --git a/samples/angular-msgraph/config/prepare-deploy.json b/samples/angular-msgraph/config/copy-assets.json similarity index 100% rename from samples/angular-msgraph/config/prepare-deploy.json rename to samples/angular-msgraph/config/copy-assets.json diff --git a/samples/angular-msgraph/config/deploy-azure-storage.json b/samples/angular-msgraph/config/deploy-azure-storage.json index a5c5d2819..7d7108561 100644 --- a/samples/angular-msgraph/config/deploy-azure-storage.json +++ b/samples/angular-msgraph/config/deploy-azure-storage.json @@ -1,6 +1,6 @@ { "workingDir": "./temp/deploy/", "account": "", - "container": "angular-graph-rc", + "container": "angular-msgraph", "accessKey": "" } \ No newline at end of file diff --git a/samples/angular-msgraph/config/package-solution.json b/samples/angular-msgraph/config/package-solution.json index 621c46897..9c11ba9ac 100644 --- a/samples/angular-msgraph/config/package-solution.json +++ b/samples/angular-msgraph/config/package-solution.json @@ -1,10 +1,10 @@ { "solution": { - "name": "angular-graph-rc-client-side-solution", - "id": "0e824f74-7ed5-4612-9e01-64b25af579fe", + "name": "angular-msgraph-client-side-solution", + "id": "bb9709f1-ce33-47e1-9ad0-edcba4c6932c", "version": "1.0.0.0" }, "paths": { - "zippedPackage": "solution/angular-graph-rc.sppkg" + "zippedPackage": "solution/angular-msgraph.sppkg" } } diff --git a/samples/angular-msgraph/config/tslint.json b/samples/angular-msgraph/config/tslint.json index 0010b6105..3c085daaf 100644 --- a/samples/angular-msgraph/config/tslint.json +++ b/samples/angular-msgraph/config/tslint.json @@ -16,13 +16,11 @@ "export-name": false, "forin": false, "label-position": false, - "label-undefined": false, "member-access": true, "no-arg": false, "no-console": false, "no-construct": false, "no-duplicate-case": true, - "no-duplicate-key": false, "no-duplicate-variable": true, "no-eval": false, "no-function-expression": true, @@ -32,8 +30,6 @@ "no-unnecessary-semicolons": true, "no-unused-expression": true, "no-unused-imports": true, - "no-unused-variable": true, - "no-unreachable": true, "no-use-before-declare": true, "no-with-statement": true, "semicolon": true, diff --git a/samples/angular-msgraph/package.json b/samples/angular-msgraph/package.json index 4dc76a0e1..8546814e0 100644 --- a/samples/angular-msgraph/package.json +++ b/samples/angular-msgraph/package.json @@ -1,30 +1,24 @@ { - "name": "angular-graph-rc", + "name": "angular-msgraph", "version": "0.0.1", "private": true, "engines": { "node": ">=0.10.0" }, "dependencies": { - "@microsoft/sp-client-base": "~0.7.0", - "@microsoft/sp-client-preview": "~0.9.0", - "@microsoft/sp-core-library": "~0.1.2", - "@microsoft/sp-webpart-base": "~0.4.0", - "@types/angular": "^1.6.4", - "@types/hellojs": "^0.2.31", - "@types/webpack-env": ">=1.12.1 <1.14.0", - "angular": "^1.5.10", - "hellojs": "^1.14.0", - "ng-office-ui-fabric": "^0.13.2", - "typescript": "^2.1.5" + "@microsoft/sp-client-base": "~1.0.0", + "@microsoft/sp-core-library": "~1.0.0", + "@microsoft/sp-webpart-base": "~1.0.0", + "@types/webpack-env": ">=1.12.1 <1.14.0" }, "devDependencies": { - "@microsoft/sp-build-web": "~0.9.0", - "@microsoft/sp-module-interfaces": "~0.7.0", - "@microsoft/sp-webpart-workbench": "~0.8.0", - "gulp": "~3.9.1", + "@microsoft/sp-build-web": "~1.0.0", + "@microsoft/sp-module-interfaces": "~1.0.0", + "@microsoft/sp-webpart-workbench": "~1.0.0", + "@types/angular": "1.5.23", "@types/chai": ">=3.4.34 <3.6.0", - "@types/mocha": ">=2.2.33 <2.6.0" + "@types/mocha": ">=2.2.33 <2.6.0", + "gulp": "~3.9.1" }, "scripts": { "build": "gulp bundle", diff --git a/samples/angular-msgraph/src/tests.js b/samples/angular-msgraph/src/tests.js deleted file mode 100644 index cb4bb5cf2..000000000 --- a/samples/angular-msgraph/src/tests.js +++ /dev/null @@ -1,5 +0,0 @@ -var context = require.context('.', true, /.+\.test\.js?$/); - -context.keys().forEach(context); - -module.exports = context; diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/AngularMsGraph.module.scss b/samples/angular-msgraph/src/webparts/angularMsGraph/AngularMsGraph.module.scss deleted file mode 100644 index 1ed27277a..000000000 --- a/samples/angular-msgraph/src/webparts/angularMsGraph/AngularMsGraph.module.scss +++ /dev/null @@ -1,39 +0,0 @@ -@import "~/office-ui-fabric-react/dist/sass/Fabric.Common"; - -.row { - @include ms-Grid-row; - @include ms-bgColor-themeDark; - @include ms-fontColor-white; - - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 25px 50px 0 rgba(0, 0, 0, 0.1); - max-width: 700px; - margin: 0 auto; - padding: 20px; -} - -.column { - @include ms-Grid-col; - @include ms-u-lg10; - @include ms-u-xl8; - @include ms-u-lgPush1; - @include ms-u-xlPush2; -} - -.title { - @include ms-font-xl; - @include ms-fontColor-white; -} - -.subtitle { - @include ms-font-l; - @include ms-fontColor-white; -} - -.description { - @include ms-font-l; - @include ms-fontColor-white; -} - -.button { - text-decoration: none; -} diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/IAngularMsGraphWebPartProps.ts b/samples/angular-msgraph/src/webparts/angularMsGraph/IAngularMsGraphWebPartProps.ts deleted file mode 100644 index 7a2dc7b73..000000000 --- a/samples/angular-msgraph/src/webparts/angularMsGraph/IAngularMsGraphWebPartProps.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAngularMsGraphWebPartProps { - description: string; -} diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/loc/mystrings.d.ts b/samples/angular-msgraph/src/webparts/angularMsGraph/loc/mystrings.d.ts deleted file mode 100644 index 76c34b7cb..000000000 --- a/samples/angular-msgraph/src/webparts/angularMsGraph/loc/mystrings.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare interface IAngularMsGraphStrings { - PropertyPaneDescription: string; - BasicGroupName: string; - DescriptionFieldLabel: string; -} - -declare module 'angularMsGraphStrings' { - const strings: IAngularMsGraphStrings; - export = strings; -} diff --git a/samples/angular-msgraph/src/webparts/msGraph/IMsGraphWebPartProps.ts b/samples/angular-msgraph/src/webparts/msGraph/IMsGraphWebPartProps.ts new file mode 100644 index 000000000..9e1196c20 --- /dev/null +++ b/samples/angular-msgraph/src/webparts/msGraph/IMsGraphWebPartProps.ts @@ -0,0 +1,3 @@ +export interface IMsGraphWebPartProps { + description: string; +} diff --git a/samples/angular-msgraph/src/webparts/msGraph/MsGraph.module.scss b/samples/angular-msgraph/src/webparts/msGraph/MsGraph.module.scss new file mode 100644 index 000000000..8f3144d1b --- /dev/null +++ b/samples/angular-msgraph/src/webparts/msGraph/MsGraph.module.scss @@ -0,0 +1,52 @@ +.helloWorld { + .container { + max-width: 700px; + margin: 0px auto; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 25px 50px 0 rgba(0, 0, 0, 0.1); + } + + .row { + padding: 20px; + } + + .listItem { + max-width: 715px; + margin: 5px auto 5px auto; + box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.2), 0 25px 50px 0 rgba(0, 0, 0, 0.1); + } + + .button { + // Our button + text-decoration: none; + height: 32px; + + // Primary Button + min-width: 80px; + background-color: #0078d7; + border-color: #0078d7; + color: #ffffff; + + // Basic Button + outline: transparent; + position: relative; + font-family: "Segoe UI WestEuropean","Segoe UI",-apple-system,BlinkMacSystemFont,Roboto,"Helvetica Neue",sans-serif; + -webkit-font-smoothing: antialiased; + font-size: 14px; + font-weight: 400; + border-width: 0; + text-align: center; + cursor: pointer; + display: inline-block; + padding: 0 16px; + + .label { + font-weight: 600; + font-size: 14px; + height: 32px; + line-height: 32px; + margin: 0 4px; + vertical-align: top; + display: inline-block; + } + } +} \ No newline at end of file diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/AngularMsGraphWebPart.manifest.json b/samples/angular-msgraph/src/webparts/msGraph/MsGraphWebPart.manifest.json similarity index 56% rename from samples/angular-msgraph/src/webparts/angularMsGraph/AngularMsGraphWebPart.manifest.json rename to samples/angular-msgraph/src/webparts/msGraph/MsGraphWebPart.manifest.json index 733f4c7f1..82da0af91 100644 --- a/samples/angular-msgraph/src/webparts/angularMsGraph/AngularMsGraphWebPart.manifest.json +++ b/samples/angular-msgraph/src/webparts/msGraph/MsGraphWebPart.manifest.json @@ -1,20 +1,20 @@ { "$schema": "../../../node_modules/@microsoft/sp-module-interfaces/lib/manifestSchemas/jsonSchemas/clientSideComponentManifestSchema.json", - "id": "28f73bab-e0d2-48b4-8611-c1187765331c", - "alias": "AngularMsGraphWebPart", + "id": "e6e4354f-45d2-411e-8110-8d4f5d4398c6", + "alias": "MsGraphWebPart", "componentType": "WebPart", "version": "0.0.1", "manifestVersion": 2, "preconfiguredEntries": [{ - "groupId": "28f73bab-e0d2-48b4-8611-c1187765331c", + "groupId": "e6e4354f-45d2-411e-8110-8d4f5d4398c6", "group": { "default": "Under Development" }, - "title": { "default": "AngularMSGraph" }, - "description": { "default": "AngularMSGraph description" }, + "title": { "default": "MSGraph" }, + "description": { "default": "MSGraph description" }, "officeFabricIconFontName": "Page", "properties": { - "description": "AngularMSGraph" + "description": "MSGraph" } }] } diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/AngularMsGraphWebPart.ts b/samples/angular-msgraph/src/webparts/msGraph/MsGraphWebPart.ts similarity index 76% rename from samples/angular-msgraph/src/webparts/angularMsGraph/AngularMsGraphWebPart.ts rename to samples/angular-msgraph/src/webparts/msGraph/MsGraphWebPart.ts index fa6036739..d16320203 100644 --- a/samples/angular-msgraph/src/webparts/angularMsGraph/AngularMsGraphWebPart.ts +++ b/samples/angular-msgraph/src/webparts/msGraph/MsGraphWebPart.ts @@ -3,22 +3,22 @@ import { BaseClientSideWebPart, IPropertyPaneConfiguration, PropertyPaneTextField, - IWebPartContext, + IWebPartContext } from '@microsoft/sp-webpart-base'; -import { SPComponentLoader } from '@microsoft/sp-loader'; import { escape } from '@microsoft/sp-lodash-subset'; +import { SPComponentLoader } from '@microsoft/sp-loader'; -import styles from './AngularMsGraph.module.scss'; -import * as strings from 'angularMsGraphStrings'; -import { IAngularMsGraphWebPartProps } from './IAngularMsGraphWebPartProps'; +import styles from './MsGraph.module.scss'; +import * as strings from 'msGraphStrings'; +import { IMsGraphWebPartProps } from './IMsGraphWebPartProps'; import * as angular from 'angular'; -import 'ng-office-ui-fabric'; +import 'ng-office-fabric-ui'; import 'hellojs'; import './app/aad'; import './app/app.module'; -export default class AngularMsGraphWebPart extends BaseClientSideWebPart { +export default class MsGraphWebPart extends BaseClientSideWebPart { private $injector: angular.auto.IInjectorService; public constructor(context: IWebPartContext) { @@ -29,8 +29,8 @@ export default class AngularMsGraphWebPart extends BaseClientSideWebPart`; + if (this.renderedOnce === false){ + this.domElement.innerHTML = ''; this.$injector = angular.bootstrap(this.domElement, ['angularconnectsp']); } } diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/app/GraphHelper.ts b/samples/angular-msgraph/src/webparts/msGraph/app/GraphHelper.ts similarity index 100% rename from samples/angular-msgraph/src/webparts/angularMsGraph/app/GraphHelper.ts rename to samples/angular-msgraph/src/webparts/msGraph/app/GraphHelper.ts diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/app/HomeController.ts b/samples/angular-msgraph/src/webparts/msGraph/app/HomeController.ts similarity index 100% rename from samples/angular-msgraph/src/webparts/angularMsGraph/app/HomeController.ts rename to samples/angular-msgraph/src/webparts/msGraph/app/HomeController.ts diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/app/aad.js b/samples/angular-msgraph/src/webparts/msGraph/app/aad.js similarity index 100% rename from samples/angular-msgraph/src/webparts/angularMsGraph/app/aad.js rename to samples/angular-msgraph/src/webparts/msGraph/app/aad.js diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/app/app.module.ts b/samples/angular-msgraph/src/webparts/msGraph/app/app.module.ts similarity index 100% rename from samples/angular-msgraph/src/webparts/angularMsGraph/app/app.module.ts rename to samples/angular-msgraph/src/webparts/msGraph/app/app.module.ts diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/app/home-template.html b/samples/angular-msgraph/src/webparts/msGraph/app/home-template.html similarity index 100% rename from samples/angular-msgraph/src/webparts/angularMsGraph/app/home-template.html rename to samples/angular-msgraph/src/webparts/msGraph/app/home-template.html diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/loc/en-us.js b/samples/angular-msgraph/src/webparts/msGraph/loc/en-us.js similarity index 100% rename from samples/angular-msgraph/src/webparts/angularMsGraph/loc/en-us.js rename to samples/angular-msgraph/src/webparts/msGraph/loc/en-us.js diff --git a/samples/angular-msgraph/src/webparts/msGraph/loc/mystrings.d.ts b/samples/angular-msgraph/src/webparts/msGraph/loc/mystrings.d.ts new file mode 100644 index 000000000..23d11c900 --- /dev/null +++ b/samples/angular-msgraph/src/webparts/msGraph/loc/mystrings.d.ts @@ -0,0 +1,10 @@ +declare interface IMsGraphStrings { + PropertyPaneDescription: string; + BasicGroupName: string; + DescriptionFieldLabel: string; +} + +declare module 'msGraphStrings' { + const strings: IMsGraphStrings; + export = strings; +} diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/models/IAnnouncements.ts b/samples/angular-msgraph/src/webparts/msGraph/models/IAnnouncements.ts similarity index 100% rename from samples/angular-msgraph/src/webparts/angularMsGraph/models/IAnnouncements.ts rename to samples/angular-msgraph/src/webparts/msGraph/models/IAnnouncements.ts diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/models/IGenericAnnouncementItem.ts b/samples/angular-msgraph/src/webparts/msGraph/models/IGenericAnnouncementItem.ts similarity index 100% rename from samples/angular-msgraph/src/webparts/angularMsGraph/models/IGenericAnnouncementItem.ts rename to samples/angular-msgraph/src/webparts/msGraph/models/IGenericAnnouncementItem.ts diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/models/IGenericCreateItem.ts b/samples/angular-msgraph/src/webparts/msGraph/models/IGenericCreateItem.ts similarity index 100% rename from samples/angular-msgraph/src/webparts/angularMsGraph/models/IGenericCreateItem.ts rename to samples/angular-msgraph/src/webparts/msGraph/models/IGenericCreateItem.ts diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/models/IListCollection.ts b/samples/angular-msgraph/src/webparts/msGraph/models/IListCollection.ts similarity index 100% rename from samples/angular-msgraph/src/webparts/angularMsGraph/models/IListCollection.ts rename to samples/angular-msgraph/src/webparts/msGraph/models/IListCollection.ts diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/models/ISiteCollections.ts b/samples/angular-msgraph/src/webparts/msGraph/models/ISiteCollections.ts similarity index 100% rename from samples/angular-msgraph/src/webparts/angularMsGraph/models/ISiteCollections.ts rename to samples/angular-msgraph/src/webparts/msGraph/models/ISiteCollections.ts diff --git a/samples/angular-msgraph/src/webparts/angularMsGraph/tests/AngularMsGraph.test.ts b/samples/angular-msgraph/src/webparts/msGraph/tests/MsGraph.test.ts similarity index 75% rename from samples/angular-msgraph/src/webparts/angularMsGraph/tests/AngularMsGraph.test.ts rename to samples/angular-msgraph/src/webparts/msGraph/tests/MsGraph.test.ts index 577dd4f7a..a0241dd83 100644 --- a/samples/angular-msgraph/src/webparts/angularMsGraph/tests/AngularMsGraph.test.ts +++ b/samples/angular-msgraph/src/webparts/msGraph/tests/MsGraph.test.ts @@ -2,7 +2,7 @@ import { assert } from 'chai'; -describe('AngularMsGraphWebPart', () => { +describe('MsGraphWebPart', () => { it('should do something', () => { assert.ok(true); }); diff --git a/samples/angular-msgraph/tsconfig.json b/samples/angular-msgraph/tsconfig.json index dadbf6f8f..5fa39c930 100644 --- a/samples/angular-msgraph/tsconfig.json +++ b/samples/angular-msgraph/tsconfig.json @@ -7,6 +7,8 @@ "declaration": true, "sourceMap": true, "types": [ + "es6-promise", + "es6-collections", "webpack-env" ] } diff --git a/samples/angular-msgraph/typings/@ms/odsp.d.ts b/samples/angular-msgraph/typings/@ms/odsp.d.ts index 077127131..2d2913e53 100644 --- a/samples/angular-msgraph/typings/@ms/odsp.d.ts +++ b/samples/angular-msgraph/typings/@ms/odsp.d.ts @@ -1,5 +1,8 @@ // Type definitions for Microsoft ODSP projects // Project: ODSP -/* Global definition for UNIT_TEST builds */ +/* 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; \ No newline at end of file diff --git a/samples/angular-msgraph/typings/assertion-error/assertion-error.d.ts b/samples/angular-msgraph/typings/assertion-error/assertion-error.d.ts deleted file mode 100644 index 08217c9e5..000000000 --- a/samples/angular-msgraph/typings/assertion-error/assertion-error.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Type definitions for assertion-error 1.0.0 -// Project: https://github.com/chaijs/assertion-error -// Definitions by: Bart van der Schoor -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare module 'assertion-error' { - class AssertionError implements Error { - constructor(message: string, props?: any, ssf?: Function); - name: string; - message: string; - showDiff: boolean; - stack: string; - } - export = AssertionError; -} diff --git a/samples/angular-msgraph/typings/knockout/knockout.d.ts b/samples/angular-msgraph/typings/knockout/knockout.d.ts deleted file mode 100644 index 267f3174c..000000000 --- a/samples/angular-msgraph/typings/knockout/knockout.d.ts +++ /dev/null @@ -1,631 +0,0 @@ -// Type definitions for Knockout v3.2.0 -// Project: http://knockoutjs.com -// Definitions by: Boris Yankov , Igor Oleinikov , Clément Bourgeois -// Definitions: https://github.com/borisyankov/DefinitelyTyped - - -interface KnockoutSubscribableFunctions { - [key: string]: KnockoutBindingHandler; - - notifySubscribers(valueToWrite?: T, event?: string): void; -} - -interface KnockoutComputedFunctions { - [key: string]: KnockoutBindingHandler; -} - -interface KnockoutObservableFunctions { - [key: string]: KnockoutBindingHandler; - - equalityComparer(a: any, b: any): boolean; -} - -interface KnockoutObservableArrayFunctions { - // General Array functions - indexOf(searchElement: T, fromIndex?: number): number; - slice(start: number, end?: number): T[]; - splice(start: number): T[]; - splice(start: number, deleteCount: number, ...items: T[]): T[]; - pop(): T; - push(...items: T[]): void; - shift(): T; - unshift(...items: T[]): number; - reverse(): KnockoutObservableArray; - sort(): KnockoutObservableArray; - sort(compareFunction: (left: T, right: T) => number): KnockoutObservableArray; - - // Ko specific - [key: string]: KnockoutBindingHandler; - - replace(oldItem: T, newItem: T): void; - - remove(item: T): T[]; - remove(removeFunction: (item: T) => boolean): T[]; - removeAll(items: T[]): T[]; - removeAll(): T[]; - - destroy(item: T): void; - destroy(destroyFunction: (item: T) => boolean): void; - destroyAll(items: T[]): void; - destroyAll(): void; -} - -interface KnockoutSubscribableStatic { - fn: KnockoutSubscribableFunctions; - - new (): KnockoutSubscribable; -} - -interface KnockoutSubscription { - dispose(): void; -} - -interface KnockoutSubscribable extends KnockoutSubscribableFunctions { - subscribe(callback: (newValue: T) => void, target?: any, event?: string): KnockoutSubscription; - subscribe(callback: (newValue: TEvent) => void, target: any, event: string): KnockoutSubscription; - extend(requestedExtenders: { [key: string]: any; }): KnockoutSubscribable; - getSubscriptionsCount(): number; -} - -interface KnockoutComputedStatic { - fn: KnockoutComputedFunctions; - - (): KnockoutComputed; - (func: () => T, context?: any, options?: any): KnockoutComputed; - (def: KnockoutComputedDefine, context?: any): KnockoutComputed; -} - -interface KnockoutComputed extends KnockoutObservable, KnockoutComputedFunctions { - fn: KnockoutComputedFunctions; - - dispose(): void; - isActive(): boolean; - getDependenciesCount(): number; - extend(requestedExtenders: { [key: string]: any; }): KnockoutComputed; -} - -interface KnockoutObservableArrayStatic { - fn: KnockoutObservableArrayFunctions; - - (value?: T[]): KnockoutObservableArray; -} - -interface KnockoutObservableArray extends KnockoutObservable, KnockoutObservableArrayFunctions { - extend(requestedExtenders: { [key: string]: any; }): KnockoutObservableArray; -} - -interface KnockoutObservableStatic { - fn: KnockoutObservableFunctions; - - (value?: T): KnockoutObservable; -} - -interface KnockoutObservable extends KnockoutSubscribable, KnockoutObservableFunctions { - (): T; - (value: T): void; - - peek(): T; - valueHasMutated?:{(): void;}; - valueWillMutate?:{(): void;}; - extend(requestedExtenders: { [key: string]: any; }): KnockoutObservable; -} - -interface KnockoutComputedDefine { - read(): T; - write? (value: T): void; - disposeWhenNodeIsRemoved?: Node; - disposeWhen? (): boolean; - owner?: any; - deferEvaluation?: boolean; - pure?: boolean; -} - -interface KnockoutBindingContext { - $parent: any; - $parents: any[]; - $root: any; - $data: any; - $rawData: any | KnockoutObservable; - $index?: KnockoutObservable; - $parentContext?: KnockoutBindingContext; - $component: any; - $componentTemplateNodes: Node[]; - - extend(properties: any): any; - createChildContext(dataItemOrAccessor: any, dataItemAlias?: any, extendCallback?: Function): any; -} - -interface KnockoutAllBindingsAccessor { - (): any; - get(name: string): any; - has(name: string): boolean; -} - -interface KnockoutBindingHandler { - after?: Array; - init?: (element: any, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor, viewModel?: any, bindingContext?: KnockoutBindingContext) => void | { controlsDescendantBindings: boolean; }; - update?: (element: any, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor, viewModel?: any, bindingContext?: KnockoutBindingContext) => void; - options?: any; - preprocess?: (value: string, name: string, addBindingCallback?: (name: string, value: string) => void) => string; -} - -interface KnockoutBindingHandlers { - [bindingHandler: string]: KnockoutBindingHandler; - - // Controlling text and appearance - visible: KnockoutBindingHandler; - text: KnockoutBindingHandler; - html: KnockoutBindingHandler; - css: KnockoutBindingHandler; - style: KnockoutBindingHandler; - attr: KnockoutBindingHandler; - - // Control Flow - foreach: KnockoutBindingHandler; - if: KnockoutBindingHandler; - ifnot: KnockoutBindingHandler; - with: KnockoutBindingHandler; - - // Working with form fields - click: KnockoutBindingHandler; - event: KnockoutBindingHandler; - submit: KnockoutBindingHandler; - enable: KnockoutBindingHandler; - disable: KnockoutBindingHandler; - value: KnockoutBindingHandler; - textInput: KnockoutBindingHandler; - hasfocus: KnockoutBindingHandler; - checked: KnockoutBindingHandler; - options: KnockoutBindingHandler; - selectedOptions: KnockoutBindingHandler; - uniqueName: KnockoutBindingHandler; - - // Rendering templates - template: KnockoutBindingHandler; - - // Components (new for v3.2) - component: KnockoutBindingHandler; -} - -interface KnockoutMemoization { - memoize(callback: () => string): string; - unmemoize(memoId: string, callbackParams: any[]): boolean; - unmemoizeDomNodeAndDescendants(domNode: any, extraCallbackParamsArray: any[]): boolean; - parseMemoText(memoText: string): string; -} - -interface KnockoutVirtualElement {} - -interface KnockoutVirtualElements { - allowedBindings: { [bindingName: string]: boolean; }; - emptyNode(node: KnockoutVirtualElement ): void; - firstChild(node: KnockoutVirtualElement ): KnockoutVirtualElement; - insertAfter( container: KnockoutVirtualElement, nodeToInsert: Node, insertAfter: Node ): void; - nextSibling(node: KnockoutVirtualElement): Node; - prepend(node: KnockoutVirtualElement, toInsert: Node ): void; - setDomNodeChildren(node: KnockoutVirtualElement, newChildren: { length: number;[index: number]: Node; } ): void; - childNodes(node: KnockoutVirtualElement ): Node[]; -} - -interface KnockoutExtenders { - throttle(target: any, timeout: number): KnockoutComputed; - notify(target: any, notifyWhen: string): any; - - rateLimit(target: any, timeout: number): any; - rateLimit(target: any, options: { timeout: number; method?: string; }): any; - - trackArrayChanges(target: any): any; -} - -// -// NOTE TO MAINTAINERS AND CONTRIBUTORS : pay attention to only include symbols that are -// publicly exported in the minified version of ko, without that you can give the false -// impression that some functions will be available in production builds. -// -interface KnockoutUtils { - ////////////////////////////////// - // utils.domData.js - ////////////////////////////////// - - domData: { - get (node: Element, key: string): any; - - set (node: Element, key: string, value: any): void; - - getAll(node: Element, createIfNotFound: boolean): any; - - clear(node: Element): boolean; - }; - - ////////////////////////////////// - // utils.domNodeDisposal.js - ////////////////////////////////// - - domNodeDisposal: { - addDisposeCallback(node: Element, callback: Function): void; - - removeDisposeCallback(node: Element, callback: Function): void; - - cleanNode(node: Node): Element; - - removeNode(node: Node): void; - }; - - addOrRemoveItem(array: T[] | KnockoutObservable, value: T, included: T): void; - - arrayFilter(array: T[], predicate: (item: T) => boolean): T[]; - - arrayFirst(array: T[], predicate: (item: T) => boolean, predicateOwner?: any): T; - - arrayForEach(array: T[], action: (item: T, index: number) => void): void; - - arrayGetDistinctValues(array: T[]): T[]; - - arrayIndexOf(array: T[], item: T): number; - - arrayMap(array: T[], mapping: (item: T) => U): U[]; - - arrayPushAll(array: T[] | KnockoutObservableArray, valuesToPush: T[]): T[]; - - arrayRemoveItem(array: any[], itemToRemove: any): void; - - compareArrays(a: T[], b: T[]): Array>; - - extend(target: Object, source: Object): Object; - - fieldsIncludedWithJsonPost: any[]; - - getFormFields(form: any, fieldName: string): any[]; - - objectForEach(obj: any, action: (key: any, value: any) => void): void; - - parseHtmlFragment(html: string): any[]; - - parseJson(jsonString: string): any; - - postJson(urlOrForm: any, data: any, options: any): void; - - peekObservable(value: KnockoutObservable): T; - - range(min: any, max: any): any; - - registerEventHandler(element: any, eventType: any, handler: Function): void; - - setHtml(node: Element, html: () => string): void; - - setHtml(node: Element, html: string): void; - - setTextContent(element: any, textContent: string | KnockoutObservable): void; - - stringifyJson(data: any, replacer?: Function, space?: string): string; - - toggleDomNodeCssClass(node: any, className: string, shouldHaveClass: boolean): void; - - triggerEvent(element: any, eventType: any): void; - - unwrapObservable(value: KnockoutObservable | T): T; - - // NOT PART OF THE MINIFIED API SURFACE (ONLY IN knockout-{version}.debug.js) https://github.com/SteveSanderson/knockout/issues/670 - // forceRefresh(node: any): void; - // ieVersion: number; - // isIe6: boolean; - // isIe7: boolean; - // jQueryHtmlParse(html: string): any[]; - // makeArray(arrayLikeObject: any): any[]; - // moveCleanedNodesToContainerElement(nodes: any[]): HTMLElement; - // replaceDomNodes(nodeToReplaceOrNodeArray: any, newNodesArray: any[]): void; - // setDomNodeChildren(domNode: any, childNodes: any[]): void; - // setElementName(element: any, name: string): void; - // setOptionNodeSelectionState(optionNode: any, isSelected: boolean): void; - // simpleHtmlParse(html: string): any[]; - // stringStartsWith(str: string, startsWith: string): boolean; - // stringTokenize(str: string, delimiter: string): string[]; - // stringTrim(str: string): string; - // tagNameLower(element: any): string; -} - -interface KnockoutArrayChange { - status: string; - value: T; - index: number; - moved?: number; -} - -////////////////////////////////// -// templateSources.js -////////////////////////////////// - -interface KnockoutTemplateSourcesDomElement { - text(): any; - text(value: any): void; - - data(key: string): any; - data(key: string, value: any): any; -} - -interface KnockoutTemplateAnonymous extends KnockoutTemplateSourcesDomElement { - nodes(): any; - nodes(value: any): void; -} - -interface KnockoutTemplateSources { - - domElement: { - prototype: KnockoutTemplateSourcesDomElement - new (element: Element): KnockoutTemplateSourcesDomElement - }; - - anonymousTemplate: { - prototype: KnockoutTemplateAnonymous; - new (element: Element): KnockoutTemplateAnonymous; - }; -} - -////////////////////////////////// -// nativeTemplateEngine.js -////////////////////////////////// - -interface KnockoutNativeTemplateEngine { - - renderTemplateSource(templateSource: Object, bindingContext?: KnockoutBindingContext, options?: Object): any[]; -} - -////////////////////////////////// -// templateEngine.js -////////////////////////////////// - -interface KnockoutTemplateEngine extends KnockoutNativeTemplateEngine { - - createJavaScriptEvaluatorBlock(script: string): string; - - makeTemplateSource(template: any, templateDocument?: Document): any; - - renderTemplate(template: any, bindingContext: KnockoutBindingContext, options: Object, templateDocument: Document): any; - - isTemplateRewritten(template: any, templateDocument: Document): boolean; - - rewriteTemplate(template: any, rewriterCallback: Function, templateDocument: Document): void; -} - -///////////////////////////////// - -interface KnockoutStatic { - utils: KnockoutUtils; - memoization: KnockoutMemoization; - - bindingHandlers: KnockoutBindingHandlers; - getBindingHandler(handler: string): KnockoutBindingHandler; - - virtualElements: KnockoutVirtualElements; - extenders: KnockoutExtenders; - - applyBindings(viewModelOrBindingContext?: any, rootNode?: any): void; - applyBindingsToDescendants(viewModelOrBindingContext: any, rootNode: any): void; - applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, bindingContext: KnockoutBindingContext): void; - applyBindingAccessorsToNode(node: Node, bindings: {}, bindingContext: KnockoutBindingContext): void; - applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, viewModel: any): void; - applyBindingAccessorsToNode(node: Node, bindings: {}, viewModel: any): void; - applyBindingsToNode(node: Node, bindings: any, viewModelOrBindingContext?: any): any; - - subscribable: KnockoutSubscribableStatic; - observable: KnockoutObservableStatic; - - computed: KnockoutComputedStatic; - pureComputed(evaluatorFunction: () => T, context?: any): KnockoutComputed; - pureComputed(options: KnockoutComputedDefine, context?: any): KnockoutComputed; - - observableArray: KnockoutObservableArrayStatic; - - contextFor(node: any): any; - isSubscribable(instance: any): boolean; - toJSON(viewModel: any, replacer?: Function, space?: any): string; - toJS(viewModel: any): any; - isObservable(instance: any): boolean; - isWriteableObservable(instance: any): boolean; - isComputed(instance: any): boolean; - dataFor(node: any): any; - removeNode(node: Element): void; - cleanNode(node: Element): Element; - renderTemplate(template: Function, viewModel: any, options?: any, target?: any, renderMode?: any): any; - renderTemplate(template: string, viewModel: any, options?: any, target?: any, renderMode?: any): any; - unwrap(value: KnockoutObservable | T): T; - - computedContext: KnockoutComputedContext; - - ////////////////////////////////// - // templateSources.js - ////////////////////////////////// - - templateSources: KnockoutTemplateSources; - - ////////////////////////////////// - // templateEngine.js - ////////////////////////////////// - - templateEngine: { - - prototype: KnockoutTemplateEngine; - - new (): KnockoutTemplateEngine; - }; - - ////////////////////////////////// - // templateRewriting.js - ////////////////////////////////// - - templateRewriting: { - - ensureTemplateIsRewritten(template: Node, templateEngine: KnockoutTemplateEngine, templateDocument: Document): any; - ensureTemplateIsRewritten(template: string, templateEngine: KnockoutTemplateEngine, templateDocument: Document): any; - - memoizeBindingAttributeSyntax(htmlString: string, templateEngine: KnockoutTemplateEngine): any; - - applyMemoizedBindingsToNextSibling(bindings: any, nodeName: string): string; - }; - - ////////////////////////////////// - // nativeTemplateEngine.js - ////////////////////////////////// - - nativeTemplateEngine: { - - prototype: KnockoutNativeTemplateEngine; - - new (): KnockoutNativeTemplateEngine; - - instance: KnockoutNativeTemplateEngine; - }; - - ////////////////////////////////// - // jqueryTmplTemplateEngine.js - ////////////////////////////////// - - jqueryTmplTemplateEngine: { - - prototype: KnockoutTemplateEngine; - - renderTemplateSource(templateSource: Object, bindingContext: KnockoutBindingContext, options: Object): Node[]; - - createJavaScriptEvaluatorBlock(script: string): string; - - addTemplate(templateName: string, templateMarkup: string): void; - }; - - ////////////////////////////////// - // templating.js - ////////////////////////////////// - - setTemplateEngine(templateEngine: KnockoutNativeTemplateEngine): void; - - renderTemplate(template: Function, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any; - renderTemplate(template: any, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any; - renderTemplate(template: Function, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any; - renderTemplate(template: any, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any; - renderTemplate(template: Function, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any; - renderTemplate(template: any, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any; - renderTemplate(template: Function, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any; - renderTemplate(template: any, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any; - - renderTemplateForEach(template: Function, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; - renderTemplateForEach(template: any, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; - renderTemplateForEach(template: Function, arrayOrObservableArray: KnockoutObservable, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; - renderTemplateForEach(template: any, arrayOrObservableArray: KnockoutObservable, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; - - expressionRewriting: { - bindingRewriteValidators: any; - parseObjectLiteral: { (objectLiteralString: string): any[] } - }; - - ///////////////////////////////// - - bindingProvider: { - instance: KnockoutBindingProvider; - new (): KnockoutBindingProvider; - } - - ///////////////////////////////// - // selectExtensions.js - ///////////////////////////////// - - selectExtensions: { - - readValue(element: HTMLElement): any; - - writeValue(element: HTMLElement, value: any): void; - }; - - components: KnockoutComponents; -} - -interface KnockoutBindingProvider { - nodeHasBindings(node: Node): boolean; - getBindings(node: Node, bindingContext: KnockoutBindingContext): {}; - getBindingAccessors?(node: Node, bindingContext: KnockoutBindingContext): { [key: string]: string; }; -} - -interface KnockoutComputedContext { - getDependenciesCount(): number; - isInitial: () => boolean; - isSleeping: boolean; -} - -// -// refactored types into a namespace to reduce global pollution -// and used Union Types to simplify overloads (requires TypeScript 1.4) -// -declare module KnockoutComponentTypes { - - interface Config { - viewModel?: ViewModelFunction | ViewModelSharedInstance | ViewModelFactoryFunction | AMDModule; - template: string | Node[]| DocumentFragment | TemplateElement | AMDModule; - synchronous?: boolean; - } - - interface ComponentConfig { - viewModel?: ViewModelFunction | ViewModelSharedInstance | ViewModelFactoryFunction | AMDModule; - template: any; - createViewModel?: any; - } - - interface EmptyConfig { - } - - // common AMD type - interface AMDModule { - require: string; - } - - // viewmodel types - interface ViewModelFunction { - (params?: any): any; - } - - interface ViewModelSharedInstance { - instance: any; - } - - interface ViewModelFactoryFunction { - createViewModel: (params?: any, componentInfo?: ComponentInfo) => any; - } - - interface ComponentInfo { - element: Node; - templateNodes: Node[]; - } - - interface TemplateElement { - element: string | Node; - } - - interface Loader { - getConfig? (componentName: string, callback: (result: ComponentConfig) => void): void; - loadComponent? (componentName: string, config: ComponentConfig, callback: (result: Definition) => void): void; - loadTemplate? (componentName: string, templateConfig: any, callback: (result: Node[]) => void): void; - loadViewModel? (componentName: string, viewModelConfig: any, callback: (result: any) => void): void; - suppressLoaderExceptions?: boolean; - } - - interface Definition { - template: Node[]; - createViewModel? (params: any, options: { element: Node; }): any; - } -} - -interface KnockoutComponents { - // overloads for register method: - register(componentName: string, config: KnockoutComponentTypes.Config | KnockoutComponentTypes.EmptyConfig): void; - - isRegistered(componentName: string): boolean; - unregister(componentName: string): void; - get(componentName: string, callback: (definition: KnockoutComponentTypes.Definition) => void): void; - clearCachedDefinition(componentName: string): void - defaultLoader: KnockoutComponentTypes.Loader; - loaders: KnockoutComponentTypes.Loader[]; - getComponentNameForNode(node: Node): string; -} - -declare var ko: KnockoutStatic; - -declare module "knockout" { - export = ko; -} diff --git a/samples/angular-msgraph/typings/tsd.d.ts b/samples/angular-msgraph/typings/tsd.d.ts index 151048618..e7efdd728 100644 --- a/samples/angular-msgraph/typings/tsd.d.ts +++ b/samples/angular-msgraph/typings/tsd.d.ts @@ -1,3 +1 @@ /// -/// -///