Skip to content

Commit 1598166

Browse files
committed
style: fix accordion ts errors
1 parent b9f1694 commit 1598166

22 files changed

+168
-269
lines changed

.browserslistrc

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
22
# For additional information regarding the format and rule options, please see:
33
# https://github.com/browserslist/browserslist#queries
4-
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5-
> 0.5%
6-
last 2 versions
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
716
Firefox ESR
8-
not dead
9-
IE 9-11
17+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

.editorconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Editor configuration, see http://editorconfig.org
1+
# Editor configuration, see https://editorconfig.org
22
root = true
33

44
[*]
@@ -8,6 +8,9 @@ indent_size = 2
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

11+
[*.ts]
12+
quote_type = single
13+
1114
[*.md]
1215
max_line_length = off
1316
trim_trailing_whitespace = false

.gitignore

Lines changed: 7 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,64 +4,18 @@
44
/dist
55
/tmp
66
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
79

810
# dependencies
911
/node_modules
1012

11-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
12-
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
13-
14-
# User-specific stuff
15-
.idea/**/workspace.xml
16-
.idea/**/tasks.xml
17-
.idea/**/dictionaries
18-
.idea/**/shelf
19-
20-
# Sensitive or high-churn files
21-
.idea/**/dataSources/
22-
.idea/**/dataSources.ids
23-
.idea/**/dataSources.local.xml
24-
.idea/**/sqlDataSources.xml
25-
.idea/**/dynamic.xml
26-
.idea/**/uiDesigner.xml
27-
.idea/**/dbnavigator.xml
28-
29-
# Gradle
30-
.idea/**/gradle.xml
31-
.idea/**/libraries
32-
33-
# CMake
34-
cmake-build-debug/
35-
cmake-build-release/
36-
37-
# Mongo Explorer plugin
38-
.idea/**/mongoSettings.xml
39-
40-
# File-based project format
41-
*.iws
42-
43-
# IntelliJ
44-
out/
45-
46-
# mpeltonen/sbt-idea plugin
47-
.idea_modules/
48-
49-
# JIRA plugin
50-
atlassian-ide-plugin.xml
51-
52-
# Cursive Clojure plugin
53-
.idea/replstate.xml
54-
55-
# Crashlytics plugin (for Android Studio and IntelliJ)
56-
com_crashlytics_export_strings.xml
57-
crashlytics.properties
58-
crashlytics-build.properties
59-
fabric.properties
60-
61-
# Editor-based Rest Client
62-
.idea/httpRequests
13+
# profiling files
14+
chrome-profiler-events*.json
15+
speed-measure-plugin*.json
6316

6417
# IDEs and editors
18+
/.idea
6519
.project
6620
.classpath
6721
.c9/
@@ -75,6 +29,7 @@ fabric.properties
7529
!.vscode/tasks.json
7630
!.vscode/launch.json
7731
!.vscode/extensions.json
32+
.history/*
7833

7934
# misc
8035
/.sass-cache

angular.json

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"index": "src/index.html",
1919
"main": "src/main.ts",
2020
"polyfills": "src/polyfills.ts",
21-
"tsConfig": "src/tsconfig.app.json",
21+
"tsConfig": "tsconfig.app.json",
2222
"assets": [
2323
"src/favicon.ico",
2424
"src/assets"
@@ -40,9 +40,15 @@
4040
"configurations": {
4141
"production": {
4242
"budgets": [
43+
{
44+
"type": "initial",
45+
"maximumWarning": "500kb",
46+
"maximumError": "1mb"
47+
},
4348
{
4449
"type": "anyComponentStyle",
45-
"maximumWarning": "6kb"
50+
"maximumWarning": "2kb",
51+
"maximumError": "4kb"
4652
}
4753
],
4854
"fileReplacements": [
@@ -89,8 +95,8 @@
8995
"options": {
9096
"main": "src/test.ts",
9197
"polyfills": "src/polyfills.ts",
92-
"tsConfig": "src/tsconfig.spec.json",
93-
"karmaConfig": "src/karma.conf.js",
98+
"tsConfig": "tsconfig.spec.json",
99+
"karmaConfig": "karma.conf.js",
94100
"styles": [
95101
"src/styles.css"
96102
],
@@ -105,34 +111,25 @@
105111
"builder": "@angular-devkit/build-angular:tslint",
106112
"options": {
107113
"tsConfig": [
108-
"src/tsconfig.app.json",
109-
"src/tsconfig.spec.json"
114+
"tsconfig.app.json",
115+
"tsconfig.spec.json",
116+
"e2e/tsconfig.json"
110117
],
111118
"exclude": [
112119
"**/node_modules/**"
113120
]
114121
}
115-
}
116-
}
117-
},
118-
"angular-admin-lte-demo-e2e": {
119-
"root": "e2e/",
120-
"projectType": "application",
121-
"architect": {
122+
},
122123
"e2e": {
123124
"builder": "@angular-devkit/build-angular:protractor",
124125
"options": {
125126
"protractorConfig": "e2e/protractor.conf.js",
126127
"devServerTarget": "angular-admin-lte-demo:serve"
127-
}
128-
},
129-
"lint": {
130-
"builder": "@angular-devkit/build-angular:tslint",
131-
"options": {
132-
"tsConfig": "e2e/tsconfig.e2e.json",
133-
"exclude": [
134-
"**/node_modules/**"
135-
]
128+
},
129+
"configurations": {
130+
"production": {
131+
"devServerTarget": "angular-admin-lte-demo:serve:production"
132+
}
136133
}
137134
}
138135
}
@@ -151,7 +148,6 @@
151148
},
152149
"configurations": {
153150
"production": {
154-
"project": "library/angular-admin-lte/ng-package.prod.json",
155151
"tsConfig": "library/angular-admin-lte/tsconfig.lib.prod.json"
156152
}
157153
}
@@ -183,4 +179,4 @@
183179
"cli": {
184180
"packageManager": "yarn"
185181
}
186-
}
182+
}

karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = function (config) {
2525
suppressAll: true // removes the duplicated traces
2626
},
2727
coverageReporter: {
28-
dir: require('path').join(__dirname, './coverage/angular-loading-page'),
28+
dir: require('path').join(__dirname, './coverage/angular-admin-lte'),
2929
subdir: '.',
3030
reporters: [
3131
{ type: 'html' },

library/angular-admin-lte/karma.conf.js

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,36 @@ module.exports = function (config) {
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
12-
require('karma-coverage-istanbul-reporter'),
12+
require('karma-coverage'),
1313
require('@angular-devkit/build-angular/plugins/karma')
1414
],
1515
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
1622
clearContext: false // leave Jasmine Spec Runner output visible in browser
1723
},
18-
coverageIstanbulReporter: {
19-
dir: require('path').join(__dirname, '../../coverage'),
20-
reports: ['html', 'lcovonly'],
21-
fixWebpackSourcePaths: true
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, '../../coverage/angular-admin-lte'),
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
2234
},
2335
reporters: ['progress', 'kjhtml'],
2436
port: 9876,
2537
colors: true,
2638
logLevel: config.LOG_INFO,
2739
autoWatch: true,
2840
browsers: ['Chrome'],
29-
singleRun: false
41+
singleRun: false,
42+
restartOnFileChange: true
3043
});
3144
};

library/angular-admin-lte/ng-package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
33
"dest": "../../dist/angular-admin-lte",
4-
"deleteDestPath": false,
5-
"whitelistedNonPeerDependencies": ["."],
64
"lib": {
75
"entryFile": "src/index.ts"
86
}

library/angular-admin-lte/src/lib/accordion/accordion.component.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
<h4 class="box-title">
55
<a [mkAccordionToggle]="accordion" href="#" [mkFontColor]="accordion.headerStyleColor" [class.collapsed]="accordion.isCollapsed">
66
{{accordion.header}}
7-
<ng-template *ngIf="!accordion.header" [ngTemplateOutlet]="accordion.accordionHeaderComponent.templateRef"></ng-template>
7+
<ng-template *ngIf="!accordion.header && accordion.accordionHeaderComponent" [ngTemplateOutlet]="accordion.accordionHeaderComponent.templateRef"></ng-template>
88
</a>
99
</h4>
1010
</div>
1111
<div class="panel-collapse" [mkCollapseAnimation]="accordion.isCollapsed" (mkCollapseAnimation.start)="onCollapseStart($event, accordion)" (mkCollapseAnimation.done)="onCollapseDone($event, accordion)">
1212
<div [ngClass]="accordion.contentStyleClass" [mkFontColor]="accordion.contentColor">
13-
<ng-template [ngTemplateOutlet]="accordion.contentTemplateRef"></ng-template>
13+
<ng-template *ngIf="!accordion.accordionContentComponent" [ngTemplateOutlet]="accordion.templateRef"></ng-template>
14+
<ng-template *ngIf="accordion.accordionContentComponent" [ngTemplateOutlet]="accordion.accordionContentComponent.templateRef"></ng-template>
1415
</div>
1516
</div>
1617
</div>

0 commit comments

Comments
 (0)