@imihai/angular-datetime-picker 21.0.2 → 22.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/.browserslistrc +9 -0
- package/.editorconfig +13 -0
- package/.eslintrc.js +208 -0
- package/.github/workflows/ci_test.yml +35 -0
- package/.prettierrc +2 -0
- package/.travis.yml +16 -0
- package/angular.json +221 -0
- package/e2e/protractor.conf.js +28 -0
- package/e2e/src/app.e2e-spec.ts +14 -0
- package/e2e/src/app.po.ts +11 -0
- package/e2e/tsconfig.e2e.json +13 -0
- package/package.json +77 -33
- package/projects/picker/karma.conf.js +62 -0
- package/projects/picker/ng-package.json +7 -0
- package/projects/picker/package.json +23 -0
- package/projects/picker/src/lib/date-time/adapter/date-time-adapter.class.ts +313 -0
- package/projects/picker/src/lib/date-time/adapter/date-time-format.class.ts +18 -0
- package/projects/picker/src/lib/date-time/adapter/luxon-date-time-adapter.class.ts +307 -0
- package/projects/picker/src/lib/date-time/adapter/luxon-date-time-format.class.ts +11 -0
- package/projects/picker/src/lib/date-time/adapter/luxon-date-time.module.ts +31 -0
- package/projects/picker/src/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.ts +356 -0
- package/projects/picker/src/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class.ts +14 -0
- package/projects/picker/src/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time.module.ts +26 -0
- package/projects/picker/src/lib/date-time/calendar-body.component.html +38 -0
- package/projects/picker/src/lib/date-time/calendar-body.component.scss +0 -0
- package/projects/picker/src/lib/date-time/calendar-body.component.spec.ts +120 -0
- package/projects/picker/src/lib/date-time/calendar-body.component.ts +190 -0
- package/projects/picker/src/lib/date-time/calendar-month-view.component.html +47 -0
- package/projects/picker/src/lib/date-time/calendar-month-view.component.scss +16 -0
- package/projects/picker/src/lib/date-time/calendar-month-view.component.spec.ts +394 -0
- package/projects/picker/src/lib/date-time/calendar-month-view.component.ts +705 -0
- package/projects/picker/src/lib/date-time/calendar-multi-year-view.component.html +44 -0
- package/projects/picker/src/lib/date-time/calendar-multi-year-view.component.scss +0 -0
- package/projects/picker/src/lib/date-time/calendar-multi-year-view.component.spec.ts +343 -0
- package/projects/picker/src/lib/date-time/calendar-multi-year-view.component.ts +465 -0
- package/projects/picker/src/lib/date-time/calendar-year-view.component.html +16 -0
- package/projects/picker/src/lib/date-time/calendar-year-view.component.scss +0 -0
- package/projects/picker/src/lib/date-time/calendar-year-view.component.spec.ts +381 -0
- package/projects/picker/src/lib/date-time/calendar-year-view.component.ts +549 -0
- package/projects/picker/src/lib/date-time/calendar.component.html +169 -0
- package/projects/picker/src/lib/date-time/calendar.component.scss +0 -0
- package/projects/picker/src/lib/date-time/calendar.component.spec.ts +592 -0
- package/projects/picker/src/lib/date-time/calendar.component.ts +496 -0
- package/projects/picker/src/lib/date-time/date-time-inline.component.html +1 -0
- package/projects/picker/src/lib/date-time/date-time-inline.component.scss +4 -0
- package/projects/picker/src/lib/date-time/date-time-inline.component.ts +365 -0
- package/projects/picker/src/lib/date-time/date-time-picker-animation-event.ts +4 -0
- package/projects/picker/src/lib/date-time/date-time-picker-container.component.html +126 -0
- package/projects/picker/src/lib/date-time/date-time-picker-container.component.scss +0 -0
- package/projects/picker/src/lib/date-time/date-time-picker-container.component.ts +631 -0
- package/projects/picker/src/lib/date-time/date-time-picker-input.directive.ts +851 -0
- package/projects/picker/src/lib/date-time/date-time-picker-intl.service.ts +76 -0
- package/projects/picker/src/lib/date-time/date-time-picker-trigger.directive.ts +88 -0
- package/projects/picker/src/lib/date-time/date-time-picker.component.html +0 -0
- package/projects/picker/src/lib/date-time/date-time-picker.component.scss +0 -0
- package/projects/picker/src/lib/date-time/date-time-picker.component.spec.ts +2648 -0
- package/projects/picker/src/lib/date-time/date-time-picker.component.ts +731 -0
- package/projects/picker/src/lib/date-time/date-time.class.ts +256 -0
- package/projects/picker/src/lib/date-time/date-time.module.ts +61 -0
- package/projects/picker/src/lib/date-time/numberedFixLen.pipe.ts +28 -0
- package/projects/picker/src/lib/date-time/options-provider.ts +44 -0
- package/projects/picker/src/lib/date-time/timer-box.component.html +79 -0
- package/projects/picker/src/lib/date-time/timer-box.component.scss +0 -0
- package/projects/picker/src/lib/date-time/timer-box.component.ts +175 -0
- package/projects/picker/src/lib/date-time/timer.component.html +58 -0
- package/projects/picker/src/lib/date-time/timer.component.scss +0 -0
- package/projects/picker/src/lib/date-time/timer.component.spec.ts +399 -0
- package/projects/picker/src/lib/date-time/timer.component.ts +371 -0
- package/projects/picker/src/lib/dialog/dialog-config.class.ts +220 -0
- package/projects/picker/src/lib/dialog/dialog-container.component.html +1 -0
- package/projects/picker/src/lib/dialog/dialog-container.component.scss +0 -0
- package/projects/picker/src/lib/dialog/dialog-container.component.ts +231 -0
- package/projects/picker/src/lib/dialog/dialog-ref.class.ts +178 -0
- package/projects/picker/src/lib/dialog/dialog.module.ts +25 -0
- package/projects/picker/src/lib/dialog/dialog.service.ts +353 -0
- package/projects/picker/src/lib/utils/array.utils.ts +12 -0
- package/projects/picker/src/lib/utils/constants.ts +59 -0
- package/projects/picker/src/lib/utils/date.utils.ts +97 -0
- package/projects/picker/src/lib/utils/index.ts +5 -0
- package/projects/picker/src/lib/utils/object.utils.ts +29 -0
- package/projects/picker/src/public_api.ts +56 -0
- package/projects/picker/src/sass/picker.scss +743 -0
- package/projects/picker/src/test-helpers.ts +125 -0
- package/projects/picker/src/test.ts +52 -0
- package/projects/picker/tsconfig.lib.json +19 -0
- package/projects/picker/tsconfig.lib.prod.json +7 -0
- package/projects/picker/tsconfig.spec.json +17 -0
- package/projects/picker/tslint.json +8 -0
- package/src/app/app.component.html +77 -0
- package/src/app/app.component.scss +32 -0
- package/src/app/app.component.spec.ts +16 -0
- package/src/app/app.component.ts +35 -0
- package/src/assets/.gitkeep +0 -0
- package/src/environments/environment.prod.ts +3 -0
- package/src/environments/environment.ts +16 -0
- package/src/favicon.ico +0 -0
- package/src/index.html +14 -0
- package/src/karma.conf.js +31 -0
- package/src/main.ts +16 -0
- package/src/polyfills.ts +53 -0
- package/src/styles.scss +7 -0
- package/src/test.ts +50 -0
- package/src/tsconfig.app.json +16 -0
- package/src/tsconfig.spec.json +18 -0
- package/src/tslint.json +17 -0
- package/tsconfig.base.json +31 -0
- package/tsconfig.json +30 -0
- package/tslint.json +130 -0
- package/assets/style/picker.min.css +0 -1
- package/fesm2022/imihai-angular-datetime-picker.mjs +0 -5845
- package/fesm2022/imihai-angular-datetime-picker.mjs.map +0 -1
- package/imihai-angular-datetime-picker-21.0.2.tgz +0 -0
- package/types/imihai-angular-datetime-picker.d.ts +0 -2193
package/.browserslistrc
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Default Angular browser support
|
|
2
|
+
# See: https://angular.dev/tools/cli/build#configuring-browser-compatibility
|
|
3
|
+
# And: https://angular.dev/reference/versions#browser-support
|
|
4
|
+
last 2 Chrome versions
|
|
5
|
+
last 1 Firefox version
|
|
6
|
+
last 2 Edge major versions
|
|
7
|
+
last 2 Safari major versions
|
|
8
|
+
last 2 iOS major versions
|
|
9
|
+
Firefox ESR
|
package/.editorconfig
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Editor configuration, see http://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 4
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.md]
|
|
12
|
+
max_line_length = off
|
|
13
|
+
trim_trailing_whitespace = false
|
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/*
|
|
2
|
+
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
|
|
3
|
+
https://github.com/typescript-eslint/tslint-to-eslint-config
|
|
4
|
+
|
|
5
|
+
It represents the closest reasonable ESLint configuration to this
|
|
6
|
+
project's original TSLint configuration.
|
|
7
|
+
|
|
8
|
+
We recommend eventually switching this configuration to extend from
|
|
9
|
+
the recommended rulesets in typescript-eslint.
|
|
10
|
+
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
|
|
11
|
+
|
|
12
|
+
Happy linting! 💖
|
|
13
|
+
*/
|
|
14
|
+
module.exports = {
|
|
15
|
+
"env": {
|
|
16
|
+
"browser": true,
|
|
17
|
+
"node": true
|
|
18
|
+
},
|
|
19
|
+
"parser": "@typescript-eslint/parser",
|
|
20
|
+
"parserOptions": {
|
|
21
|
+
"project": "tsconfig.json",
|
|
22
|
+
"sourceType": "module"
|
|
23
|
+
},
|
|
24
|
+
"plugins": [
|
|
25
|
+
"eslint-plugin-import",
|
|
26
|
+
"eslint-plugin-jsdoc",
|
|
27
|
+
"@angular-eslint/eslint-plugin",
|
|
28
|
+
"@typescript-eslint",
|
|
29
|
+
"@typescript-eslint/tslint"
|
|
30
|
+
],
|
|
31
|
+
"root": true,
|
|
32
|
+
"rules": {
|
|
33
|
+
"@angular-eslint/component-class-suffix": "error",
|
|
34
|
+
"@angular-eslint/directive-class-suffix": "error",
|
|
35
|
+
"@angular-eslint/no-host-metadata-property": "error",
|
|
36
|
+
"@angular-eslint/no-input-rename": "error",
|
|
37
|
+
"@angular-eslint/no-inputs-metadata-property": "error",
|
|
38
|
+
"@angular-eslint/no-output-on-prefix": "error",
|
|
39
|
+
"@angular-eslint/no-output-rename": "error",
|
|
40
|
+
"@angular-eslint/no-outputs-metadata-property": "error",
|
|
41
|
+
"@angular-eslint/use-lifecycle-interface": "error",
|
|
42
|
+
"@angular-eslint/use-pipe-transform-interface": "error",
|
|
43
|
+
"@typescript-eslint/consistent-type-definitions": "error",
|
|
44
|
+
"@typescript-eslint/dot-notation": "off",
|
|
45
|
+
"@typescript-eslint/explicit-member-accessibility": [
|
|
46
|
+
"off",
|
|
47
|
+
{
|
|
48
|
+
"accessibility": "explicit"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"@typescript-eslint/indent": "error",
|
|
52
|
+
"@typescript-eslint/member-delimiter-style": [
|
|
53
|
+
"error",
|
|
54
|
+
{
|
|
55
|
+
"multiline": {
|
|
56
|
+
"delimiter": "semi",
|
|
57
|
+
"requireLast": true
|
|
58
|
+
},
|
|
59
|
+
"singleline": {
|
|
60
|
+
"delimiter": "semi",
|
|
61
|
+
"requireLast": false
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"@typescript-eslint/member-ordering": "error",
|
|
66
|
+
"@typescript-eslint/naming-convention": [
|
|
67
|
+
"error",
|
|
68
|
+
{
|
|
69
|
+
"selector": "variable",
|
|
70
|
+
"format": [
|
|
71
|
+
"camelCase",
|
|
72
|
+
"UPPER_CASE"
|
|
73
|
+
],
|
|
74
|
+
"leadingUnderscore": "forbid",
|
|
75
|
+
"trailingUnderscore": "forbid"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
79
|
+
"@typescript-eslint/no-empty-interface": "error",
|
|
80
|
+
"@typescript-eslint/no-inferrable-types": [
|
|
81
|
+
"error",
|
|
82
|
+
{
|
|
83
|
+
"ignoreParameters": true
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"@typescript-eslint/no-misused-new": "error",
|
|
87
|
+
"@typescript-eslint/no-non-null-assertion": "error",
|
|
88
|
+
"@typescript-eslint/no-shadow": [
|
|
89
|
+
"error",
|
|
90
|
+
{
|
|
91
|
+
"hoist": "all"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"@typescript-eslint/no-unused-expressions": "error",
|
|
95
|
+
"@typescript-eslint/prefer-function-type": "error",
|
|
96
|
+
"@typescript-eslint/quotes": [
|
|
97
|
+
"error",
|
|
98
|
+
"single"
|
|
99
|
+
],
|
|
100
|
+
"@typescript-eslint/semi": [
|
|
101
|
+
"error",
|
|
102
|
+
"always"
|
|
103
|
+
],
|
|
104
|
+
"@typescript-eslint/type-annotation-spacing": "error",
|
|
105
|
+
"@typescript-eslint/unified-signatures": "error",
|
|
106
|
+
"arrow-body-style": "error",
|
|
107
|
+
"brace-style": [
|
|
108
|
+
"error",
|
|
109
|
+
"1tbs"
|
|
110
|
+
],
|
|
111
|
+
"constructor-super": "error",
|
|
112
|
+
"curly": "error",
|
|
113
|
+
"dot-notation": "off",
|
|
114
|
+
"eol-last": "error",
|
|
115
|
+
"eqeqeq": [
|
|
116
|
+
"error",
|
|
117
|
+
"smart"
|
|
118
|
+
],
|
|
119
|
+
"guard-for-in": "error",
|
|
120
|
+
"id-denylist": "off",
|
|
121
|
+
"id-match": "off",
|
|
122
|
+
"import/no-deprecated": "warn",
|
|
123
|
+
"indent": "off",
|
|
124
|
+
"jsdoc/no-types": "error",
|
|
125
|
+
"max-len": [
|
|
126
|
+
"error",
|
|
127
|
+
{
|
|
128
|
+
"code": 140
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"no-bitwise": "error",
|
|
132
|
+
"no-caller": "error",
|
|
133
|
+
"no-console": [
|
|
134
|
+
"error",
|
|
135
|
+
{
|
|
136
|
+
"allow": [
|
|
137
|
+
"log",
|
|
138
|
+
"warn",
|
|
139
|
+
"error",
|
|
140
|
+
"dir",
|
|
141
|
+
"timeLog",
|
|
142
|
+
"assert",
|
|
143
|
+
"clear",
|
|
144
|
+
"count",
|
|
145
|
+
"countReset",
|
|
146
|
+
"group",
|
|
147
|
+
"groupEnd",
|
|
148
|
+
"table",
|
|
149
|
+
"dirxml",
|
|
150
|
+
"groupCollapsed",
|
|
151
|
+
"Console",
|
|
152
|
+
"profile",
|
|
153
|
+
"profileEnd",
|
|
154
|
+
"timeStamp",
|
|
155
|
+
"context",
|
|
156
|
+
"createTask"
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"no-debugger": "error",
|
|
161
|
+
"no-empty": "off",
|
|
162
|
+
"no-empty-function": "off",
|
|
163
|
+
"no-eval": "error",
|
|
164
|
+
"no-fallthrough": "error",
|
|
165
|
+
"no-new-wrappers": "error",
|
|
166
|
+
"no-restricted-imports": [
|
|
167
|
+
"error",
|
|
168
|
+
"rxjs/Rx"
|
|
169
|
+
],
|
|
170
|
+
"no-shadow": "off",
|
|
171
|
+
"no-throw-literal": "error",
|
|
172
|
+
"no-trailing-spaces": "error",
|
|
173
|
+
"no-undef-init": "error",
|
|
174
|
+
"no-underscore-dangle": "off",
|
|
175
|
+
"no-unused-expressions": "off",
|
|
176
|
+
"no-unused-labels": "error",
|
|
177
|
+
"no-var": "error",
|
|
178
|
+
"prefer-const": "error",
|
|
179
|
+
"quotes": "off",
|
|
180
|
+
"radix": "error",
|
|
181
|
+
"semi": "off",
|
|
182
|
+
"spaced-comment": [
|
|
183
|
+
"error",
|
|
184
|
+
"always",
|
|
185
|
+
{
|
|
186
|
+
"markers": [
|
|
187
|
+
"/"
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"@typescript-eslint/tslint/config": [
|
|
192
|
+
"error",
|
|
193
|
+
{
|
|
194
|
+
"rules": {
|
|
195
|
+
"import-spacing": true,
|
|
196
|
+
"whitespace": [
|
|
197
|
+
true,
|
|
198
|
+
"check-branch",
|
|
199
|
+
"check-decl",
|
|
200
|
+
"check-operator",
|
|
201
|
+
"check-separator",
|
|
202
|
+
"check-type"
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: CI Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ master ]
|
|
6
|
+
paths-ignore:
|
|
7
|
+
- '*.md'
|
|
8
|
+
- '.github/**'
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ master ]
|
|
11
|
+
paths-ignore:
|
|
12
|
+
- '*.md'
|
|
13
|
+
- '.github/**'
|
|
14
|
+
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- name: Upgrade Chrome browser
|
|
23
|
+
run: |
|
|
24
|
+
sudo apt-get update
|
|
25
|
+
sudo apt-get --only-upgrade install google-chrome-stable
|
|
26
|
+
- name: Use Node.js
|
|
27
|
+
uses: actions/setup-node@v4
|
|
28
|
+
with:
|
|
29
|
+
node-version: lts/*
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: npm ci --include=optional
|
|
32
|
+
- name: Run tests
|
|
33
|
+
run: npm run test:ci
|
|
34
|
+
env:
|
|
35
|
+
CI: true
|
package/.prettierrc
ADDED
package/.travis.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
language: node_js
|
|
2
|
+
node_js:
|
|
3
|
+
- "10"
|
|
4
|
+
cache:
|
|
5
|
+
directories:
|
|
6
|
+
- ./node_modules
|
|
7
|
+
addons:
|
|
8
|
+
chrome: stable
|
|
9
|
+
before_script:
|
|
10
|
+
- npm install -g @angular/cli@19
|
|
11
|
+
- npm install
|
|
12
|
+
script:
|
|
13
|
+
- npm run test-with-coverage
|
|
14
|
+
after_success:
|
|
15
|
+
- ./node_modules/.bin/codecov -f coverage-final.json
|
|
16
|
+
sudo: required
|
package/angular.json
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"cli": {
|
|
5
|
+
"cache": {
|
|
6
|
+
"enabled": true,
|
|
7
|
+
"path": ".cache",
|
|
8
|
+
"environment": "all"
|
|
9
|
+
},
|
|
10
|
+
"analytics": false
|
|
11
|
+
},
|
|
12
|
+
"newProjectRoot": "projects",
|
|
13
|
+
"projects": {
|
|
14
|
+
"date-time-picker-app": {
|
|
15
|
+
"root": "",
|
|
16
|
+
"sourceRoot": "src",
|
|
17
|
+
"projectType": "application",
|
|
18
|
+
"prefix": "owl",
|
|
19
|
+
"schematics": {
|
|
20
|
+
"@schematics/angular:component": {
|
|
21
|
+
"style": "scss"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"architect": {
|
|
25
|
+
"build": {
|
|
26
|
+
"builder": "@angular/build:application",
|
|
27
|
+
"options": {
|
|
28
|
+
"allowedCommonJsDependencies": [
|
|
29
|
+
"moment-timezone"
|
|
30
|
+
],
|
|
31
|
+
"aot": true,
|
|
32
|
+
"outputPath": {
|
|
33
|
+
"base": "dist/date-time-picker-app"
|
|
34
|
+
},
|
|
35
|
+
"index": "src/index.html",
|
|
36
|
+
"polyfills": [
|
|
37
|
+
"src/polyfills.ts"
|
|
38
|
+
],
|
|
39
|
+
"tsConfig": "src/tsconfig.app.json",
|
|
40
|
+
"assets": [
|
|
41
|
+
"src/favicon.ico",
|
|
42
|
+
"src/assets"
|
|
43
|
+
],
|
|
44
|
+
"styles": [
|
|
45
|
+
"src/styles.scss"
|
|
46
|
+
],
|
|
47
|
+
"scripts": [],
|
|
48
|
+
"browser": "src/main.ts"
|
|
49
|
+
},
|
|
50
|
+
"configurations": {
|
|
51
|
+
"production": {
|
|
52
|
+
"fileReplacements": [
|
|
53
|
+
{
|
|
54
|
+
"replace": "src/environments/environment.ts",
|
|
55
|
+
"with": "src/environments/environment.prod.ts"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"optimization": true,
|
|
59
|
+
"outputHashing": "all",
|
|
60
|
+
"sourceMap": false,
|
|
61
|
+
"namedChunks": false,
|
|
62
|
+
"aot": true,
|
|
63
|
+
"extractLicenses": true,
|
|
64
|
+
"budgets": [
|
|
65
|
+
{
|
|
66
|
+
"type": "initial",
|
|
67
|
+
"maximumWarning": "2mb",
|
|
68
|
+
"maximumError": "5mb"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "anyComponentStyle",
|
|
72
|
+
"maximumWarning": "6kb"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"serve": {
|
|
79
|
+
"builder": "@angular/build:dev-server",
|
|
80
|
+
"options": {
|
|
81
|
+
"buildTarget": "date-time-picker-app:build"
|
|
82
|
+
},
|
|
83
|
+
"configurations": {
|
|
84
|
+
"production": {
|
|
85
|
+
"buildTarget": "date-time-picker-app:build:production"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"extract-i18n": {
|
|
90
|
+
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
91
|
+
"options": {
|
|
92
|
+
"buildTarget": "date-time-picker-app:build"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"test": {
|
|
96
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
97
|
+
"options": {
|
|
98
|
+
"main": "src/test.ts",
|
|
99
|
+
"polyfills": "src/polyfills.ts",
|
|
100
|
+
"tsConfig": "src/tsconfig.spec.json",
|
|
101
|
+
"karmaConfig": "src/karma.conf.js",
|
|
102
|
+
"styles": [
|
|
103
|
+
"src/styles.scss"
|
|
104
|
+
],
|
|
105
|
+
"scripts": [],
|
|
106
|
+
"assets": [
|
|
107
|
+
"src/favicon.ico",
|
|
108
|
+
"src/assets"
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"lint": {
|
|
113
|
+
"builder": "@angular-devkit/build-angular:tslint",
|
|
114
|
+
"options": {
|
|
115
|
+
"tsConfig": [
|
|
116
|
+
"src/tsconfig.app.json",
|
|
117
|
+
"src/tsconfig.spec.json"
|
|
118
|
+
],
|
|
119
|
+
"exclude": [
|
|
120
|
+
"**/node_modules/**"
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"date-time-picker-app-e2e": {
|
|
127
|
+
"root": "e2e/",
|
|
128
|
+
"projectType": "application",
|
|
129
|
+
"prefix": "",
|
|
130
|
+
"architect": {
|
|
131
|
+
"e2e": {
|
|
132
|
+
"builder": "@angular-devkit/build-angular:protractor",
|
|
133
|
+
"options": {
|
|
134
|
+
"protractorConfig": "e2e/protractor.conf.js",
|
|
135
|
+
"devServerTarget": "date-time-picker-app:serve"
|
|
136
|
+
},
|
|
137
|
+
"configurations": {
|
|
138
|
+
"production": {
|
|
139
|
+
"devServerTarget": "date-time-picker-app:serve:production"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"lint": {
|
|
144
|
+
"builder": "@angular-devkit/build-angular:tslint",
|
|
145
|
+
"options": {
|
|
146
|
+
"tsConfig": "e2e/tsconfig.e2e.json",
|
|
147
|
+
"exclude": [
|
|
148
|
+
"**/node_modules/**"
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"picker": {
|
|
155
|
+
"root": "projects/picker",
|
|
156
|
+
"sourceRoot": "projects/picker/src",
|
|
157
|
+
"projectType": "library",
|
|
158
|
+
"prefix": "owl",
|
|
159
|
+
"architect": {
|
|
160
|
+
"build": {
|
|
161
|
+
"builder": "@angular/build:ng-packagr",
|
|
162
|
+
"options": {
|
|
163
|
+
"tsConfig": "projects/picker/tsconfig.lib.json",
|
|
164
|
+
"project": "projects/picker/ng-package.json"
|
|
165
|
+
},
|
|
166
|
+
"configurations": {
|
|
167
|
+
"production": {
|
|
168
|
+
"tsConfig": "projects/picker/tsconfig.lib.prod.json"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"test": {
|
|
173
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
174
|
+
"options": {
|
|
175
|
+
"main": "projects/picker/src/test.ts",
|
|
176
|
+
"tsConfig": "projects/picker/tsconfig.spec.json",
|
|
177
|
+
"karmaConfig": "projects/picker/karma.conf.js"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"lint": {
|
|
181
|
+
"builder": "@angular-devkit/build-angular:tslint",
|
|
182
|
+
"options": {
|
|
183
|
+
"tsConfig": [
|
|
184
|
+
"projects/picker/tsconfig.lib.json",
|
|
185
|
+
"projects/picker/tsconfig.spec.json"
|
|
186
|
+
],
|
|
187
|
+
"exclude": [
|
|
188
|
+
"**/node_modules/**"
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"schematics": {
|
|
196
|
+
"@schematics/angular:component": {
|
|
197
|
+
"type": "component"
|
|
198
|
+
},
|
|
199
|
+
"@schematics/angular:directive": {
|
|
200
|
+
"type": "directive"
|
|
201
|
+
},
|
|
202
|
+
"@schematics/angular:service": {
|
|
203
|
+
"type": "service"
|
|
204
|
+
},
|
|
205
|
+
"@schematics/angular:guard": {
|
|
206
|
+
"typeSeparator": "."
|
|
207
|
+
},
|
|
208
|
+
"@schematics/angular:interceptor": {
|
|
209
|
+
"typeSeparator": "."
|
|
210
|
+
},
|
|
211
|
+
"@schematics/angular:module": {
|
|
212
|
+
"typeSeparator": "."
|
|
213
|
+
},
|
|
214
|
+
"@schematics/angular:pipe": {
|
|
215
|
+
"typeSeparator": "."
|
|
216
|
+
},
|
|
217
|
+
"@schematics/angular:resolver": {
|
|
218
|
+
"typeSeparator": "."
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Protractor configuration file, see link for more information
|
|
2
|
+
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
|
3
|
+
|
|
4
|
+
const { SpecReporter } = require('jasmine-spec-reporter');
|
|
5
|
+
|
|
6
|
+
exports.config = {
|
|
7
|
+
allScriptsTimeout: 11000,
|
|
8
|
+
specs: [
|
|
9
|
+
'./src/**/*.e2e-spec.ts'
|
|
10
|
+
],
|
|
11
|
+
capabilities: {
|
|
12
|
+
'browserName': 'chrome'
|
|
13
|
+
},
|
|
14
|
+
directConnect: true,
|
|
15
|
+
baseUrl: 'http://localhost:4200/',
|
|
16
|
+
framework: 'jasmine',
|
|
17
|
+
jasmineNodeOpts: {
|
|
18
|
+
showColors: true,
|
|
19
|
+
defaultTimeoutInterval: 30000,
|
|
20
|
+
print: function() {}
|
|
21
|
+
},
|
|
22
|
+
onPrepare() {
|
|
23
|
+
require('ts-node').register({
|
|
24
|
+
project: require('path').join(__dirname, './tsconfig.e2e.json')
|
|
25
|
+
});
|
|
26
|
+
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AppPage } from './app.po';
|
|
2
|
+
|
|
3
|
+
describe('workspace-project App', () => {
|
|
4
|
+
let page: AppPage;
|
|
5
|
+
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
page = new AppPage();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('should display welcome message', () => {
|
|
11
|
+
page.navigateTo();
|
|
12
|
+
expect(page.getParagraphText()).toEqual('Welcome to date-time-picker-app!');
|
|
13
|
+
});
|
|
14
|
+
});
|