mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Upgrade Search to angular 2.0.0-rc.1
This commit is contained in:
@@ -11,48 +11,18 @@
|
||||
<link rel="stylesheet" href="node_modules/material-design-icons/iconfont/material-icons.css">
|
||||
|
||||
<!-- 1. Load libraries -->
|
||||
<!-- IE required polyfills, in this exact order -->
|
||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
||||
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
|
||||
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
||||
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
||||
<!-- Polyfill(s) for older browsers -->
|
||||
<script src="node_modules/core-js/client/shim.min.js"></script>
|
||||
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||
<script src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||
<script src="node_modules/rxjs/bundles/Rx.js"></script>
|
||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
||||
<script src="node_modules/angular2/bundles/router.dev.js"></script>
|
||||
<script src="node_modules/angular2/bundles/http.dev.js"></script>
|
||||
|
||||
<!-- Additional Alfresco libraries -->
|
||||
<script src="node_modules/alfresco-js-api/bundle.js"></script>
|
||||
|
||||
<script src="systemjs.config.js"></script>
|
||||
<script>
|
||||
System.config({
|
||||
defaultJSExtensions: true,
|
||||
map: {
|
||||
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core',
|
||||
'ng2-alfresco-search': 'node_modules/ng2-alfresco-search',
|
||||
'rxjs': 'node_modules/rxjs',
|
||||
'angular2': 'node_modules/angular2',
|
||||
'ng2-translate': 'node_modules/ng2-translate',
|
||||
'src': 'src'
|
||||
},
|
||||
packages: {
|
||||
'src': {
|
||||
defaultExtension: 'js'
|
||||
},
|
||||
'ng2-alfresco-core': {
|
||||
defaultExtension: 'js'
|
||||
},
|
||||
'ng2-alfresco-search': {
|
||||
defaultExtension: 'js'
|
||||
},
|
||||
'rxjs': {
|
||||
defaultExtension: 'js'
|
||||
},
|
||||
'angular2': {
|
||||
defaultExtension: 'js'
|
||||
}
|
||||
}
|
||||
});
|
||||
System.import('dist/main').catch(console.log.bind(console));
|
||||
System.import('app').catch(function(err){ console.error(err); });
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
@@ -5,10 +5,11 @@
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"postinstall": "typings install",
|
||||
"typings": "typings install",
|
||||
"start": "npm install && npm run typings && concurrently \"npm run build:w\" \"npm run server\" ",
|
||||
"server": "node browser-sync-config.js",
|
||||
"build": "npm run tslint && rm -rf dist && tsc",
|
||||
"build": "npm run tslint && rm -rf dist && tsc",
|
||||
"build:w": "npm run tslint && rm -rf dist && tsc -w",
|
||||
"tslint": "npm run tslint-src && npm run tslint-root",
|
||||
"tslint-src": "tslint -c tslint.json src/**/*.ts",
|
||||
@@ -44,15 +45,28 @@
|
||||
"alfresco"
|
||||
],
|
||||
"dependencies": {
|
||||
"angular2": "2.0.0-beta.15",
|
||||
"es6-shim": "^0.35.0",
|
||||
"@angular/common": "2.0.0-rc.1",
|
||||
"@angular/compiler": "2.0.0-rc.1",
|
||||
"@angular/core": "2.0.0-rc.1",
|
||||
"@angular/http": "2.0.0-rc.1",
|
||||
"@angular/platform-browser": "2.0.0-rc.1",
|
||||
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
|
||||
"@angular/router": "2.0.0-rc.1",
|
||||
"@angular/router-deprecated": "2.0.0-rc.1",
|
||||
"@angular/upgrade": "2.0.0-rc.1",
|
||||
"systemjs": "0.19.27",
|
||||
"core-js": "^2.4.0",
|
||||
"reflect-metadata": "^0.1.3",
|
||||
"rxjs": "5.0.0-beta.6",
|
||||
"zone.js": "^0.6.12",
|
||||
"angular2-in-memory-web-api": "0.0.11",
|
||||
|
||||
"material-design-icons": "^2.2.3",
|
||||
"material-design-lite": "^1.1.3",
|
||||
"ng2-alfresco-search": "^0.1.12",
|
||||
"reflect-metadata": "0.1.2",
|
||||
"rxjs": "5.0.0-beta.2",
|
||||
"systemjs": "0.19.26",
|
||||
"zone.js": "0.6.10"
|
||||
"ng2-translate": "2.1.0",
|
||||
"alfresco-js-api": "^0.1.0",
|
||||
"ng2-alfresco-core": "^0.1.0",
|
||||
"ng2-alfresco-search": "^0.1.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browser-sync": "^2.10.0",
|
||||
@@ -60,7 +74,7 @@
|
||||
"concurrently": "^2.0.0",
|
||||
"tslint": "^3.8.1",
|
||||
"typescript": "^1.8.10",
|
||||
"typings": "^0.7.12"
|
||||
"typings": "^1.0.4"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "http://devproducts.alfresco.me:4873/"
|
||||
|
@@ -15,9 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, OnInit } from 'angular2/core';
|
||||
import { bootstrap } from 'angular2/platform/browser';
|
||||
import { HTTP_PROVIDERS } from 'angular2/http';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { bootstrap } from '@angular/platform-browser-dynamic';
|
||||
import { HTTP_PROVIDERS } from '@angular/http';
|
||||
|
||||
import {
|
||||
ALFRESCO_CORE_PROVIDERS,
|
||||
|
55
ng2-components/ng2-alfresco-search/demo/systemjs.config.js
Normal file
55
ng2-components/ng2-alfresco-search/demo/systemjs.config.js
Normal file
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* System configuration for Angular 2 samples
|
||||
* Adjust as necessary for your application needs.
|
||||
*/
|
||||
(function(global) {
|
||||
// map tells the System loader where to look for things
|
||||
var map = {
|
||||
'app': 'dist', // 'dist',
|
||||
'@angular': 'node_modules/@angular',
|
||||
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
|
||||
'rxjs': 'node_modules/rxjs',
|
||||
|
||||
'ng2-translate': 'node_modules/ng2-translate',
|
||||
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core',
|
||||
'ng2-alfresco-search': 'node_modules/ng2-alfresco-search'
|
||||
};
|
||||
// packages tells the System loader how to load when no filename and/or no extension
|
||||
var packages = {
|
||||
'app': { main: 'main.js', defaultExtension: 'js' },
|
||||
'rxjs': { defaultExtension: 'js' },
|
||||
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
|
||||
|
||||
'ng2-translate': { defaultExtension: 'js' },
|
||||
'ng2-alfresco-core': { defaultExtension: 'js' },
|
||||
'ng2-alfresco-search': { defaultExtension: 'js' }
|
||||
};
|
||||
var ngPackageNames = [
|
||||
'common',
|
||||
'compiler',
|
||||
'core',
|
||||
'http',
|
||||
'platform-browser',
|
||||
'platform-browser-dynamic',
|
||||
'router',
|
||||
'router-deprecated',
|
||||
'upgrade'
|
||||
];
|
||||
// Individual files (~300 requests):
|
||||
function packIndex(pkgName) {
|
||||
packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' };
|
||||
}
|
||||
// Bundled (~40 requests):
|
||||
function packUmd(pkgName) {
|
||||
packages['@angular/'+pkgName] = { main: pkgName + '.umd.js', defaultExtension: 'js' };
|
||||
}
|
||||
// Most environments should use UMD; some (Karma) need the individual index files
|
||||
var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;
|
||||
// Add package entries for angular packages
|
||||
ngPackageNames.forEach(setPackageConfig);
|
||||
var config = {
|
||||
map: map,
|
||||
packages: packages
|
||||
};
|
||||
System.config(config);
|
||||
})(this);
|
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "system",
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"sourceMap": true,
|
||||
"removeComments": true,
|
||||
"declaration": true,
|
||||
"outDir": "dist"
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
"node_modules",
|
||||
"typings/main",
|
||||
"typings/main.d.ts"
|
||||
]
|
||||
"compilerOptions": {
|
||||
"target": "ES5",
|
||||
"module": "system",
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"sourceMap": true,
|
||||
"removeComments": true,
|
||||
"declaration": true,
|
||||
"outDir": "dist"
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
"node_modules",
|
||||
"typings/main",
|
||||
"typings/main.d.ts"
|
||||
]
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ambientDependencies": {
|
||||
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#4de74cb527395c13ba20b438c3a7a419ad931f1c",
|
||||
"jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#d594ef506d1efe2fea15f8f39099d19b39436b71"
|
||||
}
|
||||
"ambientDependencies": {
|
||||
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd",
|
||||
"jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#5c182b9af717f73146399c2485f70f1e2ac0ff2b"
|
||||
}
|
||||
}
|
||||
|
@@ -48,19 +48,25 @@
|
||||
"alfresco"
|
||||
],
|
||||
"dependencies": {
|
||||
"angular2": "2.0.0-beta.15",
|
||||
"systemjs": "0.19.26",
|
||||
"es6-shim": "^0.35.0",
|
||||
"ng2-alfresco-core": "^0.1.25",
|
||||
"reflect-metadata": "0.1.2",
|
||||
"rxjs": "5.0.0-beta.2",
|
||||
"@angular/common": "2.0.0-rc.1",
|
||||
"@angular/compiler": "2.0.0-rc.1",
|
||||
"@angular/core": "2.0.0-rc.1",
|
||||
"@angular/http": "2.0.0-rc.1",
|
||||
"@angular/platform-browser": "2.0.0-rc.1",
|
||||
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
|
||||
"@angular/router": "2.0.0-rc.1",
|
||||
"@angular/router-deprecated": "2.0.0-rc.1",
|
||||
"@angular/upgrade": "2.0.0-rc.1",
|
||||
"systemjs": "0.19.27",
|
||||
"core-js": "^2.4.0",
|
||||
"reflect-metadata": "^0.1.3",
|
||||
"rxjs": "5.0.0-beta.6",
|
||||
"zone.js": "^0.6.12",
|
||||
"es6-module-loader": "^0.17.8",
|
||||
"angular2-in-memory-web-api": "0.0.11",
|
||||
|
||||
"alfresco-js-api": "^0.1.0",
|
||||
"ng2-translate": "1.11.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"angular2": "2.0.0-beta.15"
|
||||
"ng2-alfresco-core": "^0.1.25",
|
||||
"ng2-translate": "2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^2.1.0",
|
||||
@@ -79,7 +85,7 @@
|
||||
"traceur": "^0.0.91",
|
||||
"tslint": "^3.8.1",
|
||||
"typescript": "^1.8.10",
|
||||
"typings": "^0.7.12"
|
||||
"typings": "^1.0.4"
|
||||
},
|
||||
"license-check-config": {
|
||||
"src": [
|
||||
|
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Http} from 'angular2/http';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {Observable} from 'rxjs/Rx';
|
||||
|
||||
import {
|
||||
AlfrescoSettingsService,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<table *ngIf="results && results.length && searchTerm" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp full-width">
|
||||
<tbody>
|
||||
<tr *ngFor="#result of results; #idx = index">
|
||||
<tr *ngFor="let result of results; let idx = index">
|
||||
<td><a href="#" (click)="onItemClick(result, $event)">{{result.entry.name}}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@@ -15,7 +15,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, EventEmitter, Input, OnChanges, Output, Renderer } from 'angular2/core';
|
||||
import {
|
||||
Component,
|
||||
ElementRef,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnChanges,
|
||||
Output,
|
||||
Renderer
|
||||
} from '@angular/core';
|
||||
import { AlfrescoService } from './../services/alfresco.service';
|
||||
|
||||
import { AlfrescoPipeTranslate, AlfrescoTranslationService } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||
|
@@ -15,8 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Control, Validators } from 'angular2/common';
|
||||
import { Component, Input, Output, EventEmitter, AfterViewInit } from 'angular2/core';
|
||||
import { Control, Validators } from '@angular/common';
|
||||
import { Component, Input, Output, EventEmitter, AfterViewInit } from '@angular/core';
|
||||
|
||||
import { AlfrescoPipeTranslate, AlfrescoTranslationService } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||
|
||||
|
@@ -19,7 +19,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr *ngFor="#result of results; #idx = index">
|
||||
<tr *ngFor="let result of results; let idx = index">
|
||||
<td><img src="{{getDocumentThumbnailUrl(result)}}" /></td>
|
||||
<td>{{result.entry.name}}</td>
|
||||
<td>{{result.entry.modifiedByUser.displayName}}</td>
|
||||
|
@@ -15,8 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, Input, Optional, OnChanges, OnInit } from 'angular2/core';
|
||||
import { RouteParams } from 'angular2/router';
|
||||
import { Component, Input, Optional, OnChanges, OnInit } from '@angular/core';
|
||||
import { RouteParams } from '@angular/router-deprecated';
|
||||
import { AlfrescoService } from './../services/alfresco.service';
|
||||
|
||||
import { AlfrescoPipeTranslate, AlfrescoTranslationService } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||
|
@@ -15,8 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Injectable } from 'angular2/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
|
||||
import {
|
||||
AlfrescoSettingsService,
|
||||
|
Reference in New Issue
Block a user