amir-input 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +13 -0
- package/angular.json +128 -0
- package/browserslist +12 -0
- package/index.ts +5 -0
- package/karma.conf.js +44 -0
- package/package.json +48 -0
- package/protractor.conf.js +30 -0
- package/src/app/app.component.css +46 -0
- package/src/app/app.component.html +96 -0
- package/src/app/app.component.spec.ts +56 -0
- package/src/app/app.component.ts +10 -0
- package/src/app/app.module.ts +24 -0
- package/src/app/lib/au-fa-input/_au-fa-input-red-theme.scss +17 -0
- package/src/app/lib/au-fa-input/au-fa-input.component.css +6 -0
- package/src/app/lib/au-fa-input/au-fa-input.component.html +6 -0
- package/src/app/lib/au-fa-input/au-fa-input.component.ts +40 -0
- package/src/app/lib/au-input.module.ts +17 -0
- package/src/app/lib/au-md-input/au-md-input.component.css +10 -0
- package/src/app/lib/au-md-input/au-md-input.component.html +8 -0
- package/src/app/lib/au-md-input/au-md-input.component.ts +30 -0
- package/src/app/lib/common/_default-theme.scss +11 -0
- package/src/app/lib/common/common.css +30 -0
- package/src/app/lib/common/input-ref.directive.ts +20 -0
- package/src/assets/.gitkeep +0 -0
- package/src/environments/environment.prod.ts +3 -0
- package/src/environments/environment.ts +8 -0
- package/src/favicon.ico +0 -0
- package/src/index.html +31 -0
- package/src/main.ts +11 -0
- package/src/polyfills.ts +68 -0
- package/src/styles.css +1 -0
- package/src/test.ts +32 -0
- package/src/tsconfig.app.json +12 -0
- package/src/tsconfig.spec.json +19 -0
- package/src/typings.d.ts +5 -0
- package/tsconfig.json +21 -0
- package/tslint.json +116 -0
- package/yarn.lock +5812 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
.icon {
|
|
5
|
+
width:20px;
|
|
6
|
+
text-align: center;
|
|
7
|
+
padding-left: 5px;
|
|
8
|
+
padding-right: 2px;
|
|
9
|
+
border:none;
|
|
10
|
+
vertical-align: middle;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host {
|
|
14
|
+
border-width:1px;
|
|
15
|
+
border-style: solid;
|
|
16
|
+
padding: 1px 0;
|
|
17
|
+
display: inline-block;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host(.input-focus) {
|
|
21
|
+
outline:none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host /deep/ input {
|
|
25
|
+
border:none;
|
|
26
|
+
outline: none;
|
|
27
|
+
height: 100%;
|
|
28
|
+
margin: 1px 0;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {Directive, HostListener} from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Directive({
|
|
4
|
+
selector: 'input'
|
|
5
|
+
})
|
|
6
|
+
export class InputRefDirective {
|
|
7
|
+
|
|
8
|
+
focus = false;
|
|
9
|
+
|
|
10
|
+
@HostListener('focus')
|
|
11
|
+
onFocus() {
|
|
12
|
+
this.focus = true;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@HostListener('blur')
|
|
16
|
+
onBlur() {
|
|
17
|
+
this.focus = false;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// The file contents for the current environment will overwrite these during build.
|
|
2
|
+
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
|
|
3
|
+
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
|
|
4
|
+
// The list of which env maps to which file can be found in `.angular-cli.json`.
|
|
5
|
+
|
|
6
|
+
export const environment = {
|
|
7
|
+
production: false
|
|
8
|
+
};
|
package/src/favicon.ico
ADDED
|
Binary file
|
package/src/index.html
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>Angular Advanced: The Angular Library Laboratory - Build Your Own Library </title>
|
|
6
|
+
<base href="/">
|
|
7
|
+
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
10
|
+
|
|
11
|
+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
12
|
+
|
|
13
|
+
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="https://angular-academy.s3.amazonaws.com/bundles/bundle.20170214122720.min.css" >
|
|
16
|
+
|
|
17
|
+
<style>
|
|
18
|
+
|
|
19
|
+
au-fa-input {
|
|
20
|
+
height: 30px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
</style>
|
|
24
|
+
|
|
25
|
+
</head>
|
|
26
|
+
<body>
|
|
27
|
+
|
|
28
|
+
<app-root>Loading...</app-root>
|
|
29
|
+
|
|
30
|
+
</body>
|
|
31
|
+
</html>
|
package/src/main.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { enableProdMode } from '@angular/core';
|
|
2
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
3
|
+
|
|
4
|
+
import { AppModule } from './app/app.module';
|
|
5
|
+
import { environment } from './environments/environment';
|
|
6
|
+
|
|
7
|
+
if (environment.production) {
|
|
8
|
+
enableProdMode();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
platformBrowserDynamic().bootstrapModule(AppModule);
|
package/src/polyfills.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file includes polyfills needed by Angular and is loaded before the app.
|
|
3
|
+
* You can add your own extra polyfills to this file.
|
|
4
|
+
*
|
|
5
|
+
* This file is divided into 2 sections:
|
|
6
|
+
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
7
|
+
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
|
8
|
+
* file.
|
|
9
|
+
*
|
|
10
|
+
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
11
|
+
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
|
12
|
+
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
|
13
|
+
*
|
|
14
|
+
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/***************************************************************************************************
|
|
18
|
+
* BROWSER POLYFILLS
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
|
|
22
|
+
// import 'core-js/es6/symbol';
|
|
23
|
+
// import 'core-js/es6/object';
|
|
24
|
+
// import 'core-js/es6/function';
|
|
25
|
+
// import 'core-js/es6/parse-int';
|
|
26
|
+
// import 'core-js/es6/parse-float';
|
|
27
|
+
// import 'core-js/es6/number';
|
|
28
|
+
// import 'core-js/es6/math';
|
|
29
|
+
// import 'core-js/es6/string';
|
|
30
|
+
// import 'core-js/es6/date';
|
|
31
|
+
// import 'core-js/es6/array';
|
|
32
|
+
// import 'core-js/es6/regexp';
|
|
33
|
+
// import 'core-js/es6/map';
|
|
34
|
+
// import 'core-js/es6/set';
|
|
35
|
+
|
|
36
|
+
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
|
37
|
+
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
|
38
|
+
|
|
39
|
+
/** IE10 and IE11 requires the following to support `@angular/animation`. */
|
|
40
|
+
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/** Evergreen browsers require these. **/
|
|
44
|
+
import 'core-js/es6/reflect';
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
/** ALL Firefox browsers require the following to support `@angular/animation`. **/
|
|
49
|
+
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/***************************************************************************************************
|
|
54
|
+
* Zone JS is required by Angular itself.
|
|
55
|
+
*/
|
|
56
|
+
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
/***************************************************************************************************
|
|
61
|
+
* APPLICATION IMPORTS
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Date, currency, decimal and percent pipes.
|
|
66
|
+
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
|
|
67
|
+
*/
|
|
68
|
+
// import 'intl'; // Run `npm install --save intl`.
|
package/src/styles.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* You can add global styles to this file, and also import other style files */
|
package/src/test.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
2
|
+
|
|
3
|
+
import 'zone.js/dist/long-stack-trace-zone';
|
|
4
|
+
import 'zone.js/dist/proxy.js';
|
|
5
|
+
import 'zone.js/dist/sync-test';
|
|
6
|
+
import 'zone.js/dist/jasmine-patch';
|
|
7
|
+
import 'zone.js/dist/async-test';
|
|
8
|
+
import 'zone.js/dist/fake-async-test';
|
|
9
|
+
import { getTestBed } from '@angular/core/testing';
|
|
10
|
+
import {
|
|
11
|
+
BrowserDynamicTestingModule,
|
|
12
|
+
platformBrowserDynamicTesting
|
|
13
|
+
} from '@angular/platform-browser-dynamic/testing';
|
|
14
|
+
|
|
15
|
+
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
|
|
16
|
+
declare var __karma__: any;
|
|
17
|
+
declare var require: any;
|
|
18
|
+
|
|
19
|
+
// Prevent Karma from running prematurely.
|
|
20
|
+
__karma__.loaded = function () {};
|
|
21
|
+
|
|
22
|
+
// First, initialize the Angular testing environment.
|
|
23
|
+
getTestBed().initTestEnvironment(
|
|
24
|
+
BrowserDynamicTestingModule,
|
|
25
|
+
platformBrowserDynamicTesting()
|
|
26
|
+
);
|
|
27
|
+
// Then we find all the tests.
|
|
28
|
+
const context = require.context('./', true, /\.spec\.ts$/);
|
|
29
|
+
// And load the modules.
|
|
30
|
+
context.keys().map(context);
|
|
31
|
+
// Finally, start Karma to run the tests.
|
|
32
|
+
__karma__.start();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "../out-tsc/spec",
|
|
5
|
+
"baseUrl": "",
|
|
6
|
+
"types": [
|
|
7
|
+
"jasmine",
|
|
8
|
+
"node"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"test.ts",
|
|
13
|
+
"polyfills.ts"
|
|
14
|
+
],
|
|
15
|
+
"include": [
|
|
16
|
+
"**/*.spec.ts",
|
|
17
|
+
"**/*.d.ts"
|
|
18
|
+
]
|
|
19
|
+
}
|
package/src/typings.d.ts
ADDED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compileOnSave": false,
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"outDir": "./dist/out-tsc",
|
|
6
|
+
"baseUrl": "src",
|
|
7
|
+
"sourceMap": true,
|
|
8
|
+
"declaration": false,
|
|
9
|
+
"moduleResolution": "node",
|
|
10
|
+
"emitDecoratorMetadata": true,
|
|
11
|
+
"experimentalDecorators": true,
|
|
12
|
+
"target": "es2015",
|
|
13
|
+
"typeRoots": [
|
|
14
|
+
"node_modules/@types"
|
|
15
|
+
],
|
|
16
|
+
"lib": [
|
|
17
|
+
"es2016",
|
|
18
|
+
"dom"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
package/tslint.json
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rulesDirectory": [
|
|
3
|
+
"node_modules/codelyzer"
|
|
4
|
+
],
|
|
5
|
+
"rules": {
|
|
6
|
+
"callable-types": true,
|
|
7
|
+
"class-name": true,
|
|
8
|
+
"comment-format": [
|
|
9
|
+
true,
|
|
10
|
+
"check-space"
|
|
11
|
+
],
|
|
12
|
+
"curly": true,
|
|
13
|
+
"eofline": true,
|
|
14
|
+
"forin": true,
|
|
15
|
+
"import-blacklist": [true],
|
|
16
|
+
"import-spacing": true,
|
|
17
|
+
"indent": [
|
|
18
|
+
true,
|
|
19
|
+
"spaces"
|
|
20
|
+
],
|
|
21
|
+
"interface-over-type-literal": true,
|
|
22
|
+
"label-position": true,
|
|
23
|
+
"max-line-length": [
|
|
24
|
+
true,
|
|
25
|
+
140
|
|
26
|
+
],
|
|
27
|
+
"member-access": false,
|
|
28
|
+
"member-ordering": [
|
|
29
|
+
true,
|
|
30
|
+
"static-before-instance",
|
|
31
|
+
"variables-before-functions"
|
|
32
|
+
],
|
|
33
|
+
"no-arg": true,
|
|
34
|
+
"no-bitwise": true,
|
|
35
|
+
"no-console": [
|
|
36
|
+
true,
|
|
37
|
+
"debug",
|
|
38
|
+
"info",
|
|
39
|
+
"time",
|
|
40
|
+
"timeEnd",
|
|
41
|
+
"trace"
|
|
42
|
+
],
|
|
43
|
+
"no-construct": true,
|
|
44
|
+
"no-debugger": true,
|
|
45
|
+
"no-duplicate-variable": true,
|
|
46
|
+
"no-empty": false,
|
|
47
|
+
"no-empty-interface": true,
|
|
48
|
+
"no-eval": true,
|
|
49
|
+
"no-inferrable-types": [true, "ignore-params"],
|
|
50
|
+
"no-shadowed-variable": true,
|
|
51
|
+
"no-string-literal": false,
|
|
52
|
+
"no-string-throw": true,
|
|
53
|
+
"no-switch-case-fall-through": true,
|
|
54
|
+
"no-trailing-whitespace": true,
|
|
55
|
+
"no-unused-expression": true,
|
|
56
|
+
"no-use-before-declare": true,
|
|
57
|
+
"no-var-keyword": true,
|
|
58
|
+
"object-literal-sort-keys": false,
|
|
59
|
+
"one-line": [
|
|
60
|
+
true,
|
|
61
|
+
"check-open-brace",
|
|
62
|
+
"check-catch",
|
|
63
|
+
"check-else",
|
|
64
|
+
"check-whitespace"
|
|
65
|
+
],
|
|
66
|
+
"prefer-const": true,
|
|
67
|
+
"quotemark": [
|
|
68
|
+
true,
|
|
69
|
+
"single"
|
|
70
|
+
],
|
|
71
|
+
"radix": true,
|
|
72
|
+
"semicolon": [
|
|
73
|
+
"always"
|
|
74
|
+
],
|
|
75
|
+
"triple-equals": [
|
|
76
|
+
true,
|
|
77
|
+
"allow-null-check"
|
|
78
|
+
],
|
|
79
|
+
"typedef-whitespace": [
|
|
80
|
+
true,
|
|
81
|
+
{
|
|
82
|
+
"call-signature": "nospace",
|
|
83
|
+
"index-signature": "nospace",
|
|
84
|
+
"parameter": "nospace",
|
|
85
|
+
"property-declaration": "nospace",
|
|
86
|
+
"variable-declaration": "nospace"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"typeof-compare": true,
|
|
90
|
+
"unified-signatures": true,
|
|
91
|
+
"variable-name": false,
|
|
92
|
+
"whitespace": [
|
|
93
|
+
true,
|
|
94
|
+
"check-branch",
|
|
95
|
+
"check-decl",
|
|
96
|
+
"check-operator",
|
|
97
|
+
"check-separator",
|
|
98
|
+
"check-type"
|
|
99
|
+
],
|
|
100
|
+
|
|
101
|
+
"directive-selector": [true, "attribute", "app", "camelCase"],
|
|
102
|
+
"component-selector": [true, "element", "app", "kebab-case"],
|
|
103
|
+
"no-inputs-metadata-property": true,
|
|
104
|
+
"no-outputs-metadata-property": true,
|
|
105
|
+
"no-host-metadata-property": true,
|
|
106
|
+
"no-input-rename": true,
|
|
107
|
+
"no-output-rename": true,
|
|
108
|
+
"use-lifecycle-interface": true,
|
|
109
|
+
"use-pipe-transform-interface": true,
|
|
110
|
+
"component-class-suffix": true,
|
|
111
|
+
"directive-class-suffix": true,
|
|
112
|
+
"no-access-missing-member": true,
|
|
113
|
+
"templates-use-public": true,
|
|
114
|
+
"invoke-injectable": true
|
|
115
|
+
}
|
|
116
|
+
}
|