Skip to content

Commit

Permalink
1.1.1
Browse files Browse the repository at this point in the history
Included libs
  • Loading branch information
Alberplz committed Aug 24, 2016
1 parent 68ade2b commit f3c8ed9
Show file tree
Hide file tree
Showing 21 changed files with 979 additions and 34 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
lib/
lib/*

examples/app/*.js
examples/app/*.d.ts

Expand All @@ -11,8 +8,6 @@ examples/npm-debug.log
node_modules/*
typings/*
npm-debug.log
index.*
!index.ts

.sass-cache
nbproject/*
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "angular2-color-picker",
"version": "1.1.0",
"version": "1.1.1",
"authors": [
"Alberto Pujante <[email protected]>"
],
"description": "Color Picker Directive for Angular 2 with no dependencies required",
"main": [
"app/color-picker/color-picker.directive.ts"
"src/color-picker.directive.ts"
],
"ignore": [
"node_modules"
Expand Down
48 changes: 48 additions & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html>
<head>
<title>Angular 2 Color Picker (Demo Page)</title>

<base href="/">

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>

<style>
.col-md-5 > input{
margin-bottom: 10px;
width: 182px;
}
#changeme{
font-size:30px;
font-weight: bolder;
cursor: pointer;
}
</style>

<!--uncomment to load files locally
<script src="https://npmcdn.com/core-js/client/shim.min.js"></script>
<script src="https://npmcdn.com/[email protected]?main=browser"></script>
<script src="https://npmcdn.com/[email protected]"></script>
<script src="https://npmcdn.com/[email protected]/dist/system.src.js"></script>
-->

<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="systemjs.config.js"></script>

<script>
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>

<body>
<my-app>Loading...</my-app>
</body>

</html>
3 changes: 2 additions & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "angular2-color-picker-example",
"version": "1.1.0",
"description": "Example for Angular2 Color Picker",
"version": "1.1.1",
"scripts": {
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
"lite": "lite-server",
Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lib/index';
7 changes: 7 additions & 0 deletions index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions lib/classes.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
export declare class Hsva {
h: number;
s: number;
v: number;
a: number;
constructor(h: number, s: number, v: number, a: number);
}
export declare class Hsla {
h: number;
s: number;
l: number;
a: number;
constructor(h: number, s: number, l: number, a: number);
}
export declare class Rgba {
r: number;
g: number;
b: number;
a: number;
constructor(r: number, g: number, b: number, a: number);
}
export declare class SliderPosition {
h: number;
s: number;
v: number;
a: number;
constructor(h: number, s: number, v: number, a: number);
}
export declare class SliderDimension {
h: number;
s: number;
v: number;
a: number;
constructor(h: number, s: number, v: number, a: number);
}
53 changes: 53 additions & 0 deletions lib/classes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/classes.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

131 changes: 131 additions & 0 deletions lib/color-picker.directive.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
import { DynamicComponentLoader, ViewContainerRef, ElementRef, EventEmitter, OnInit } from '@angular/core';
import { ColorPickerService } from './color-picker.service';
export declare class ColorPickerDirective implements OnInit {
private dcl;
private vcRef;
private el;
private service;
colorPicker: string;
colorPickerChange: EventEmitter<string>;
cpPosition: string;
cpPositionOffset: string;
cpPositionRelativeToArrow: boolean;
cpOutputFormat: string;
cpCancelButton: boolean;
cpCancelButtonClass: string;
cpCancelButtonText: string;
cpFallbackColor: string;
cpHeight: string;
private dialog;
private created;
constructor(dcl: DynamicComponentLoader, vcRef: ViewContainerRef, el: ElementRef, service: ColorPickerService);
ngOnInit(): void;
onClick(): void;
colorChanged(value: string): void;
changeInput(value: string): void;
}
export declare class TextDirective {
newValue: EventEmitter<any>;
text: any;
rg: number;
changeInput(value: string): void;
}
export declare class SliderDirective {
private el;
newValue: EventEmitter<any>;
slider: string;
rgX: number;
rgY: number;
private listenerMove;
private listenerStop;
constructor(el: ElementRef);
setCursor(event: any): void;
move(event: any): void;
start(event: any): void;
stop(): void;
getX(event: any): number;
getY(event: any): number;
}
export declare class DialogComponent implements OnInit {
private el;
private service;
private hsva;
private rgbaText;
private hslaText;
private hexText;
private outputColor;
private alphaSliderColor;
private hueSliderColor;
private slider;
private sliderDimMax;
private format;
private show;
private top;
private left;
private position;
private directiveInstance;
private initialColor;
private directiveElementRef;
private listenerMouseDown;
private listenerResize;
private cpPosition;
private cpPositionOffset;
private cpOutputFormat;
private cpCancelButton;
private cpCancelButtonClass;
private cpCancelButtonText;
private cpHeight;
private dialogWidth;
private dialogArrowSize;
private dialogArrowOffset;
private arrowTop;
constructor(el: ElementRef, service: ColorPickerService);
setDialog(instance: any, elementRef: ElementRef, color: any, cpPosition: string, cpPositionOffset: string, cpPositionRelativeToArrow: boolean, cpOutputFormat: string, cpCancelButton: boolean, cpCancelButtonClass: string, cpCancelButtonText: string, cpHeight: string): void;
setInitialColor(color: any): void;
ngOnInit(): void;
openColorPicker(): void;
onMouseDown(event: any): void;
closeColorPicker(): void;
onResize(): void;
setDialogPosition(): void;
setSaturation(val: {
v: number;
rg: number;
}): void;
setLightness(val: {
v: number;
rg: number;
}): void;
setHue(val: {
v: number;
rg: number;
}): void;
setAlpha(val: {
v: number;
rg: number;
}): void;
setR(val: {
v: number;
rg: number;
}): void;
setG(val: {
v: number;
rg: number;
}): void;
setB(val: {
v: number;
rg: number;
}): void;
setSaturationAndBrightness(val: {
s: number;
v: number;
rgX: number;
rgY: number;
}): void;
setColorFromString(value: string): void;
formatPolicy(): number;
update(): void;
cancelColor(): void;
isDescendant(parent: any, child: any): boolean;
createBox(element: any, offset: any): any;
}
Loading

0 comments on commit f3c8ed9

Please sign in to comment.