Skip to content

Commit 1de7326

Browse files
author
lo kesh
committed
feat(ControlInfoDirective): Added
0 parents  commit 1de7326

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+14806
-0
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.md]
14+
trim_trailing_whitespace = false

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Node
2+
node_modules
3+
npm-debug.log
4+
5+
# Yarn
6+
yarn-error.log
7+
8+
# JetBrains
9+
.idea/
10+
11+
# VS Code
12+
.vscode/
13+
14+
# Windows
15+
Thumbs.db
16+
Desktop.ini
17+
18+
# Mac
19+
.DS_Store
20+
21+
# Temporary files
22+
coverage/
23+
docs
24+
tmp

.npmignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Node
2+
node_modules
3+
npm-debug.log
4+
5+
# Yarn
6+
yarn-error.log
7+
8+
# JetBrains
9+
.idea/
10+
11+
# VS Code
12+
.vscode/
13+
14+
# Windows
15+
Thumbs.db
16+
Desktop.ini
17+
18+
# Mac
19+
.DS_Store
20+
21+
# Temporary files
22+
coverage/
23+
demo/
24+
docs
25+
tmp
26+
27+
# Library files
28+
src/

.release.json

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"non-interactive": true,
3+
"dry-run": false,
4+
"verbose": false,
5+
"force": false,
6+
"pkgFiles": [
7+
"package.json"
8+
],
9+
"increment": "patch",
10+
"prereleaseId": null,
11+
"buildCommand": false,
12+
"changelogCommand": "git log --pretty=format:\"* %s (%h)\" [REV_RANGE]",
13+
"requireCleanWorkingDir": false,
14+
"src": {
15+
"commitMessage": "Release %s",
16+
"tagName": "v%s",
17+
"tagAnnotation": "Release %s",
18+
"pushRepo": null,
19+
"beforeStartCommand": false,
20+
"beforeStageCommand": false,
21+
"afterReleaseCommand": false,
22+
"githubAssets": false
23+
},
24+
"dist": {
25+
"repo": false,
26+
"stageDir": ".stage",
27+
"baseDir": "dist",
28+
"files": [
29+
"**/*"
30+
],
31+
"pkgFiles": null,
32+
"commitMessage": "Release %s",
33+
"tagName": "v%s",
34+
"tagAnnotation": "Release %s",
35+
"beforeStageCommand": false,
36+
"afterReleaseCommand": false,
37+
"githubAssets": false
38+
},
39+
"npm": {
40+
"publish": true,
41+
"publishPath": ".",
42+
"tag": "latest",
43+
"private": false,
44+
"forcePublishSourceRepo": false
45+
},
46+
"github": {
47+
"release": true,
48+
"releaseName": "Release %s",
49+
"preRelease": false,
50+
"draft": false,
51+
"tokenRef": "GITHUB_TOKEN"
52+
},
53+
"prompt": {
54+
"src": {
55+
"status": false,
56+
"commit": true,
57+
"tag": true,
58+
"push": true,
59+
"release": true,
60+
"publish": false
61+
},
62+
"dist": {
63+
"status": false,
64+
"commit": true,
65+
"tag": true,
66+
"push": true,
67+
"release": true,
68+
"publish": false
69+
}
70+
}
71+
}

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
sudo: required
2+
dist: trusty
3+
addons:
4+
apt:
5+
sources:
6+
- google-chrome
7+
packages:
8+
- google-chrome-stable
9+
language: node_js
10+
node_js:
11+
- node
12+
script:
13+
- npm run ci
14+
before_script:
15+
- export DISPLAY=:99.0
16+
- sh -e /etc/init.d/xvfb start
17+
- sleep 3
18+
cache:
19+
yarn: true
20+
notifications:
21+
email: false
22+
after_success:
23+
- npm run codecov

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Oleksii Trekhleb
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# `Angular utils library`
2+
3+
Set of utilities for Angular 4+
4+
5+
# Quick Start
6+
7+
```bash
8+
9+
yarn add @nglibrary/utils
10+
11+
```

debug.log

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[0716/024328.322:ERROR:file_io.cc(134)] WriteFile: The pipe is being closed. (0xE8)
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { ElementRef, OnDestroy, OnInit, Renderer } from '@angular/core';
2+
import { NgControl } from '@angular/forms';
3+
import { Subscription } from 'rxjs/Subscription';
4+
import { UtilsGlobalConfig } from '../../utils.config';
5+
export declare class ControlInfoDirective implements OnInit, OnDestroy {
6+
private currElRef;
7+
private renderer;
8+
private formControl;
9+
private utilsConfig;
10+
controlInfo: any;
11+
value: any;
12+
targetEl: any;
13+
subscription: Subscription;
14+
targetElClasses: any;
15+
globalConfig: any;
16+
allClasses: any[];
17+
onfocus: boolean;
18+
errors: string[];
19+
config: {
20+
selector: any;
21+
prefix: string;
22+
class: {
23+
valid: string;
24+
invalid: string;
25+
pristine: string;
26+
dirty: string;
27+
touched: string;
28+
unTouched: string;
29+
hasErrors: string;
30+
noErrors: string;
31+
disabled: string;
32+
enabled: string;
33+
hasValue: string;
34+
noValue: string;
35+
onFocus: string;
36+
};
37+
};
38+
constructor(currElRef: ElementRef, renderer: Renderer, formControl: NgControl, utilsConfig: UtilsGlobalConfig);
39+
ngOnInit(): void;
40+
ngOnDestroy(): void;
41+
getClasses(classes: string[]): string[];
42+
focus(): void;
43+
blur(): void;
44+
private closest(matchesSelector, el, selector);
45+
private match(el, selector);
46+
private check();
47+
}

dist/directives/control-info/control-info.directive.js

Lines changed: 147 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)