@indice/ng-components 0.2.138-beta → 0.2.139
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/CHANGELOG.md +1 -0
- package/README.md +4 -4
- package/karma.conf.js +44 -0
- package/ng-package.json +10 -0
- package/package.json +18 -9
- package/scripts/css-bundle.ts +33 -0
- package/src/_styles.css +36 -0
- package/src/_tests/utilities.service.spec.ts +16 -0
- package/src/assets/styles/avatar-initials.css +37 -0
- package/src/assets/styles/base.css +46 -0
- package/src/assets/styles/cards.css +71 -0
- package/src/assets/styles/collapsible-panel.css +25 -0
- package/src/assets/styles/components.css +34 -0
- package/src/assets/styles/date-picker.component.css +0 -0
- package/src/assets/styles/drop-down-menu.css +50 -0
- package/src/assets/styles/form-layout.css +49 -0
- package/{_styles.css → src/assets/styles/indice-ng-icons-inline.css} +2286 -3504
- package/src/assets/styles/list-view-empty-state.css +0 -0
- package/src/assets/styles/list-view.css +64 -0
- package/{modal.css → src/assets/styles/modal.css} +157 -157
- package/src/assets/styles/model-view-layout.css +45 -0
- package/src/assets/styles/nav-links.css +35 -0
- package/src/assets/styles/notifications-indicator.component.css +43 -0
- package/src/assets/styles/pager.css +29 -0
- package/src/assets/styles/shell-layout.css +232 -0
- package/src/assets/styles/side-pane.css +46 -0
- package/src/assets/styles/side-view-layout.css +58 -0
- package/src/assets/styles/toast.css +72 -0
- package/src/assets/styles/toggle.css +26 -0
- package/src/assets/styles/view-layout.css +58 -0
- package/src/lib/controls/avatar-initials/avatar-initials.component.html +3 -0
- package/src/lib/controls/avatar-initials/avatar-initials.component.ts +47 -0
- package/src/lib/controls/collapsible-panel/collapsible-panel.component.html +15 -0
- package/src/lib/controls/collapsible-panel/collapsible-panel.component.ts +16 -0
- package/src/lib/controls/date-picker/date-picker.component.html +133 -0
- package/src/lib/controls/date-picker/date-picker.component.ts +258 -0
- package/src/lib/controls/drop-down-menu/drop-down-menu.component.html +61 -0
- package/src/lib/controls/drop-down-menu/drop-down-menu.component.ts +59 -0
- package/src/lib/controls/kpi-tile/kpi-tile.component.html +18 -0
- package/src/lib/controls/kpi-tile/kpi-tile.component.ts +26 -0
- package/src/lib/controls/list-view/list-column.component.ts +10 -0
- package/src/lib/controls/list-view/list-details-section.component.ts +8 -0
- package/src/lib/controls/list-view/list-tile.component.ts +8 -0
- package/src/lib/controls/list-view/list-view-empty-state.component.html +20 -0
- package/src/lib/controls/list-view/list-view-empty-state.component.ts +19 -0
- package/src/lib/controls/list-view/list-view.component.html +151 -0
- package/src/lib/controls/list-view/list-view.component.ts +146 -0
- package/src/lib/controls/nav-links-list/nav-links-list.component.html +27 -0
- package/src/lib/controls/nav-links-list/nav-links-list.component.ts +25 -0
- package/src/lib/controls/notifications-indicator/notifications-indicator.component.html +78 -0
- package/src/lib/controls/notifications-indicator/notifications-indicator.component.ts +75 -0
- package/src/lib/controls/pager/pager.component.html +33 -0
- package/src/lib/controls/pager/pager.component.ts +106 -0
- package/src/lib/controls/side-pane/side-pane.component.html +10 -0
- package/src/lib/controls/side-pane/side-pane.component.ts +59 -0
- package/src/lib/controls/skeleton-loader/skeleton-loader.component.html +112 -0
- package/src/lib/controls/skeleton-loader/skeleton-loader.component.ts +20 -0
- package/src/lib/controls/toaster/toaster-container.component.html +1 -0
- package/src/lib/controls/toaster/toaster-container.component.ts +27 -0
- package/src/lib/controls/toaster/toaster.component.html +103 -0
- package/src/lib/controls/toaster/toaster.component.ts +26 -0
- package/src/lib/controls/toggle/toggle.component.html +15 -0
- package/src/lib/controls/toggle/toggle.component.ts +58 -0
- package/src/lib/directives/click-outside.directive.ts +196 -0
- package/src/lib/directives/dynamic-component-host.directive.ts +7 -0
- package/src/lib/directives/screen-size.directive.ts +67 -0
- package/src/lib/helpers/base-list.component.ts +204 -0
- package/src/lib/icons.ts +39 -0
- package/src/lib/layouts/shell/shell-footer/shell-footer.component.html +71 -0
- package/src/lib/layouts/shell/shell-footer/shell-footer.component.ts +14 -0
- package/src/lib/layouts/shell/shell-header/shell-header.component.html +199 -0
- package/src/lib/layouts/shell/shell-header/shell-header.component.ts +111 -0
- package/src/lib/layouts/shell/shell-layout/shell-layout.component.html +36 -0
- package/src/lib/layouts/shell/shell-layout/shell-layout.component.ts +91 -0
- package/src/lib/layouts/views/form-layout/form-layout.component.html +67 -0
- package/src/lib/layouts/views/form-layout/form-layout.component.ts +66 -0
- package/src/lib/layouts/views/model-view-layout/model-view-layout.component.html +43 -0
- package/src/lib/layouts/views/model-view-layout/model-view-layout.component.ts +37 -0
- package/src/lib/layouts/views/side-view-layout/side-view-layout.component.html +36 -0
- package/src/lib/layouts/views/side-view-layout/side-view-layout.component.ts +67 -0
- package/src/lib/layouts/views/view-layout/view-layout.component.html +68 -0
- package/src/lib/layouts/views/view-layout/view-layout.component.ts +82 -0
- package/src/lib/ng-components.module.ts +135 -0
- package/src/lib/pages/auth/auth-callback/auth-callback.component.html +1 -0
- package/src/lib/pages/auth/auth-callback/auth-callback.component.ts +22 -0
- package/src/lib/pages/auth/auth-renew/auth-renew.component.ts +20 -0
- package/src/lib/pages/auth/logged-out/logged-out.component.html +1 -0
- package/src/lib/pages/auth/logged-out/logged-out.component.ts +22 -0
- package/src/lib/pages/http-status/error/error.component.html +13 -0
- package/src/lib/pages/http-status/error/error.component.ts +13 -0
- package/src/lib/pages/http-status/page-not-found/page-not-found.component.html +14 -0
- package/src/lib/pages/http-status/page-not-found/page-not-found.component.ts +14 -0
- package/src/lib/pages/http-status/unauthorized/unauthorized.component.html +15 -0
- package/src/lib/pages/http-status/unauthorized/unauthorized.component.ts +11 -0
- package/src/lib/pipes/address.pipe.ts +17 -0
- package/src/lib/pipes/duration-format.pipe.ts +67 -0
- package/src/lib/services/component-loader/component-loader-options.class.ts +31 -0
- package/src/lib/services/component-loader/component-loader.class.ts +226 -0
- package/src/lib/services/component-loader/component-loader.factory.ts +27 -0
- package/src/lib/services/component-loader/content-ref.class.ts +10 -0
- package/src/lib/services/interceptors/bad-request.interceptor.ts +34 -0
- package/src/lib/services/modal-service/modal-backdrop-component.ts +40 -0
- package/src/lib/services/modal-service/modal-container-component.ts +125 -0
- package/src/lib/services/modal-service/modal-options.class.ts +92 -0
- package/src/lib/services/modal-service/modal-service.ts +237 -0
- package/src/lib/services/modal-service/modal-styles.class.ts +11 -0
- package/src/lib/services/modal-service/modal.class.ts +45 -0
- package/src/lib/services/shell-state-service.service.ts +10 -0
- package/src/lib/services/toaster.service.ts +23 -0
- package/src/lib/services/utilities.service.ts +40 -0
- package/src/lib/tokens.ts +6 -0
- package/src/lib/types.ts +210 -0
- package/{public-api.d.ts → src/public-api.ts} +60 -43
- package/src/test.ts +28 -0
- package/tsconfig.lib.json +26 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/tslint.json +17 -0
- package/webpack.config.js +36 -0
- package/bundles/indice-ng-components.umd.js +0 -3784
- package/bundles/indice-ng-components.umd.js.map +0 -1
- package/esm2015/indice-ng-components.js +0 -5
- package/esm2015/lib/controls/avatar-initials/avatar-initials.component.js +0 -51
- package/esm2015/lib/controls/collapsible-panel/collapsible-panel.component.js +0 -23
- package/esm2015/lib/controls/date-picker/date-picker.component.js +0 -269
- package/esm2015/lib/controls/drop-down-menu/drop-down-menu.component.js +0 -72
- package/esm2015/lib/controls/kpi-tile/kpi-tile.component.js +0 -39
- package/esm2015/lib/controls/list-view/list-column.component.js +0 -25
- package/esm2015/lib/controls/list-view/list-details-section.component.js +0 -17
- package/esm2015/lib/controls/list-view/list-tile.component.js +0 -17
- package/esm2015/lib/controls/list-view/list-view-empty-state.component.js +0 -32
- package/esm2015/lib/controls/list-view/list-view.component.js +0 -186
- package/esm2015/lib/controls/pager/pager.component.js +0 -133
- package/esm2015/lib/controls/side-pane/side-pane.component.js +0 -76
- package/esm2015/lib/controls/skeleton-loader/skeleton-loader.component.js +0 -29
- package/esm2015/lib/controls/toaster/toaster-container.component.js +0 -31
- package/esm2015/lib/controls/toaster/toaster.component.js +0 -34
- package/esm2015/lib/controls/toggle/toggle.component.js +0 -68
- package/esm2015/lib/directives/click-outside.directive.js +0 -189
- package/esm2015/lib/directives/dynamic-component-host.directive.js +0 -17
- package/esm2015/lib/helpers/base-list.component.js +0 -182
- package/esm2015/lib/icons.js +0 -32
- package/esm2015/lib/layouts/shell/shell-footer/shell-footer.component.js +0 -22
- package/esm2015/lib/layouts/shell/shell-header/shell-header.component.js +0 -142
- package/esm2015/lib/layouts/shell/shell-layout/shell-layout.component.js +0 -101
- package/esm2015/lib/layouts/views/form-layout/form-layout.component.js +0 -86
- package/esm2015/lib/layouts/views/model-view-layout/model-view-layout.component.js +0 -55
- package/esm2015/lib/layouts/views/side-view-layout/side-view-layout.component.js +0 -101
- package/esm2015/lib/layouts/views/view-layout/view-layout.component.js +0 -110
- package/esm2015/lib/ng-components.module.js +0 -220
- package/esm2015/lib/pages/auth/auth-callback/auth-callback.component.js +0 -34
- package/esm2015/lib/pages/auth/auth-renew/auth-renew.component.js +0 -31
- package/esm2015/lib/pages/auth/logged-out/logged-out.component.js +0 -32
- package/esm2015/lib/pages/http-status/error/error.component.js +0 -20
- package/esm2015/lib/pages/http-status/page-not-found/page-not-found.component.js +0 -18
- package/esm2015/lib/pages/http-status/unauthorized/unauthorized.component.js +0 -17
- package/esm2015/lib/pipes/address.pipe.js +0 -21
- package/esm2015/lib/pipes/duration-format.pipe.js +0 -64
- package/esm2015/lib/pipes/obs-with-status.pipe.js +0 -26
- package/esm2015/lib/services/component-loader/component-loader-options.class.js +0 -8
- package/esm2015/lib/services/component-loader/component-loader.class.js +0 -192
- package/esm2015/lib/services/component-loader/component-loader.factory.js +0 -32
- package/esm2015/lib/services/component-loader/content-ref.class.js +0 -13
- package/esm2015/lib/services/modal-service/modal-backdrop-component.js +0 -44
- package/esm2015/lib/services/modal-service/modal-container-component.js +0 -128
- package/esm2015/lib/services/modal-service/modal-options.class.js +0 -35
- package/esm2015/lib/services/modal-service/modal-service.js +0 -220
- package/esm2015/lib/services/modal-service/modal-styles.class.js +0 -11
- package/esm2015/lib/services/modal-service/modal.class.js +0 -27
- package/esm2015/lib/services/toaster.service.js +0 -24
- package/esm2015/lib/tokens.js +0 -4
- package/esm2015/lib/types.js +0 -114
- package/esm2015/public-api.js +0 -53
- package/fesm2015/indice-ng-components.js +0 -3247
- package/fesm2015/indice-ng-components.js.map +0 -1
- package/indice-ng-components.d.ts +0 -5
- package/lib/controls/avatar-initials/avatar-initials.component.d.ts +0 -14
- package/lib/controls/collapsible-panel/collapsible-panel.component.d.ts +0 -10
- package/lib/controls/date-picker/date-picker.component.d.ts +0 -48
- package/lib/controls/drop-down-menu/drop-down-menu.component.d.ts +0 -25
- package/lib/controls/kpi-tile/kpi-tile.component.d.ts +0 -13
- package/lib/controls/list-view/list-column.component.d.ts +0 -9
- package/lib/controls/list-view/list-details-section.component.d.ts +0 -7
- package/lib/controls/list-view/list-tile.component.d.ts +0 -7
- package/lib/controls/list-view/list-view-empty-state.component.d.ts +0 -11
- package/lib/controls/list-view/list-view.component.d.ts +0 -55
- package/lib/controls/pager/pager.component.d.ts +0 -36
- package/lib/controls/side-pane/side-pane.component.d.ts +0 -18
- package/lib/controls/skeleton-loader/skeleton-loader.component.d.ts +0 -11
- package/lib/controls/toaster/toaster-container.component.d.ts +0 -13
- package/lib/controls/toaster/toaster.component.d.ts +0 -15
- package/lib/controls/toggle/toggle.component.d.ts +0 -19
- package/lib/directives/click-outside.directive.d.ts +0 -40
- package/lib/directives/dynamic-component-host.directive.d.ts +0 -9
- package/lib/helpers/base-list.component.d.ts +0 -42
- package/lib/icons.d.ts +0 -30
- package/lib/layouts/shell/shell-footer/shell-footer.component.d.ts +0 -8
- package/lib/layouts/shell/shell-header/shell-header.component.d.ts +0 -45
- package/lib/layouts/shell/shell-layout/shell-layout.component.d.ts +0 -27
- package/lib/layouts/views/form-layout/form-layout.component.d.ts +0 -25
- package/lib/layouts/views/model-view-layout/model-view-layout.component.d.ts +0 -25
- package/lib/layouts/views/side-view-layout/side-view-layout.component.d.ts +0 -28
- package/lib/layouts/views/view-layout/view-layout.component.d.ts +0 -31
- package/lib/ng-components.module.d.ts +0 -45
- package/lib/pages/auth/auth-callback/auth-callback.component.d.ts +0 -13
- package/lib/pages/auth/auth-renew/auth-renew.component.d.ts +0 -12
- package/lib/pages/auth/logged-out/logged-out.component.d.ts +0 -12
- package/lib/pages/http-status/error/error.component.d.ts +0 -8
- package/lib/pages/http-status/page-not-found/page-not-found.component.d.ts +0 -8
- package/lib/pages/http-status/unauthorized/unauthorized.component.d.ts +0 -8
- package/lib/pipes/address.pipe.d.ts +0 -8
- package/lib/pipes/duration-format.pipe.d.ts +0 -8
- package/lib/pipes/obs-with-status.pipe.d.ts +0 -13
- package/lib/services/component-loader/component-loader-options.class.d.ts +0 -30
- package/lib/services/component-loader/component-loader.class.d.ts +0 -92
- package/lib/services/component-loader/component-loader.factory.d.ts +0 -24
- package/lib/services/component-loader/content-ref.class.d.ts +0 -12
- package/lib/services/modal-service/modal-backdrop-component.d.ts +0 -20
- package/lib/services/modal-service/modal-container-component.d.ts +0 -33
- package/lib/services/modal-service/modal-options.class.d.ts +0 -81
- package/lib/services/modal-service/modal-service.d.ts +0 -58
- package/lib/services/modal-service/modal-styles.class.d.ts +0 -10
- package/lib/services/modal-service/modal.class.d.ts +0 -43
- package/lib/services/toaster.service.d.ts +0 -11
- package/lib/tokens.d.ts +0 -4
- package/lib/types.d.ts +0 -135
|
@@ -1,43 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from './lib/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export * from './lib/controls/
|
|
7
|
-
export * from './lib/controls/
|
|
8
|
-
export * from './lib/controls/list-view/list-view
|
|
9
|
-
export * from './lib/controls/
|
|
10
|
-
export * from './lib/controls/
|
|
11
|
-
export * from './lib/controls/
|
|
12
|
-
export * from './lib/controls/
|
|
13
|
-
export * from './lib/controls/
|
|
14
|
-
export * from './lib/controls/
|
|
15
|
-
export * from './lib/controls/
|
|
16
|
-
export * from './lib/controls/
|
|
17
|
-
export * from './lib/controls/
|
|
18
|
-
export * from './lib/
|
|
19
|
-
export * from './lib/
|
|
20
|
-
export * from './lib/
|
|
21
|
-
export * from './lib/
|
|
22
|
-
export * from './lib/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export * from './lib/
|
|
26
|
-
export * from './lib/
|
|
27
|
-
export * from './lib/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export * from './lib/
|
|
31
|
-
export * from './lib/
|
|
32
|
-
export * from './lib/
|
|
33
|
-
export * from './lib/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export * from './lib/
|
|
37
|
-
export * from './lib/
|
|
38
|
-
export * from './lib/
|
|
39
|
-
export * from './lib/
|
|
40
|
-
export
|
|
41
|
-
export * from './lib/
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
// Public API Surface of @indice/ng-components
|
|
2
|
+
// directives
|
|
3
|
+
export * from './lib/directives/click-outside.directive';
|
|
4
|
+
|
|
5
|
+
// controls
|
|
6
|
+
export * from './lib/controls/drop-down-menu/drop-down-menu.component';
|
|
7
|
+
export * from './lib/controls/pager/pager.component';
|
|
8
|
+
export * from './lib/controls/list-view/list-view.component';
|
|
9
|
+
export * from './lib/controls/list-view/list-column.component';
|
|
10
|
+
export * from './lib/controls/list-view/list-tile.component';
|
|
11
|
+
export * from './lib/controls/list-view/list-details-section.component';
|
|
12
|
+
export * from './lib/controls/list-view/list-view-empty-state.component';
|
|
13
|
+
export * from './lib/controls/skeleton-loader/skeleton-loader.component';
|
|
14
|
+
export * from './lib/controls/collapsible-panel/collapsible-panel.component';
|
|
15
|
+
export * from './lib/controls/kpi-tile/kpi-tile.component';
|
|
16
|
+
export * from './lib/controls/date-picker/date-picker.component';
|
|
17
|
+
export * from './lib/controls/toaster/toaster-container.component';
|
|
18
|
+
export * from './lib/controls/toaster/toaster.component';
|
|
19
|
+
export * from './lib/controls/avatar-initials/avatar-initials.component';
|
|
20
|
+
export * from './lib/controls/toggle/toggle.component';
|
|
21
|
+
export * from './lib/controls/side-pane/side-pane.component';
|
|
22
|
+
export * from './lib/controls/nav-links-list/nav-links-list.component';
|
|
23
|
+
|
|
24
|
+
// shell layout
|
|
25
|
+
export * from './lib/layouts/shell/shell-layout/shell-layout.component';
|
|
26
|
+
export * from './lib/layouts/shell/shell-header/shell-header.component';
|
|
27
|
+
export * from './lib/layouts/shell/shell-footer/shell-footer.component';
|
|
28
|
+
|
|
29
|
+
// view layouts
|
|
30
|
+
export * from './lib/layouts/views/view-layout/view-layout.component';
|
|
31
|
+
export * from './lib/layouts/views/model-view-layout/model-view-layout.component';
|
|
32
|
+
export * from './lib/layouts/views/side-view-layout/side-view-layout.component';
|
|
33
|
+
export * from './lib/layouts/views/form-layout/form-layout.component';
|
|
34
|
+
|
|
35
|
+
// pages
|
|
36
|
+
export * from './lib/pages/auth/auth-callback/auth-callback.component';
|
|
37
|
+
export * from './lib/pages/auth/auth-renew/auth-renew.component';
|
|
38
|
+
export * from './lib/pages/auth/logged-out/logged-out.component';
|
|
39
|
+
export * from './lib/pages/http-status/error/error.component';
|
|
40
|
+
export * from './lib/pages/http-status/page-not-found/page-not-found.component';
|
|
41
|
+
export * from './lib/pages/http-status/unauthorized/unauthorized.component';
|
|
42
|
+
|
|
43
|
+
// pipes
|
|
44
|
+
export * from './lib/pipes/address.pipe';
|
|
45
|
+
export * from './lib/pipes/duration-format.pipe';
|
|
46
|
+
|
|
47
|
+
// common stuff (tokens, types, helper classes)
|
|
48
|
+
export * from './lib/tokens';
|
|
49
|
+
export * from './lib/types';
|
|
50
|
+
export * from './lib/icons';
|
|
51
|
+
export * from './lib/helpers/base-list.component';
|
|
52
|
+
|
|
53
|
+
// services
|
|
54
|
+
export * from './lib/services/component-loader/component-loader.factory';
|
|
55
|
+
export * from './lib/services/modal-service/modal-service';
|
|
56
|
+
export { ModalOptions, MODAL_CONFIG_DEFAULT_OVERRIDE, CloseInterceptorFn } from './lib/services/modal-service/modal-options.class';
|
|
57
|
+
export * from './lib/services/modal-service/modal.class';
|
|
58
|
+
export * from './lib/services/toaster.service';
|
|
59
|
+
|
|
60
|
+
export * from './lib/ng-components.module';
|
package/src/test.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
2
|
+
|
|
3
|
+
import 'zone.js';
|
|
4
|
+
import 'zone.js/testing';
|
|
5
|
+
import { getTestBed } from '@angular/core/testing';
|
|
6
|
+
import {
|
|
7
|
+
BrowserDynamicTestingModule,
|
|
8
|
+
platformBrowserDynamicTesting
|
|
9
|
+
} from '@angular/platform-browser-dynamic/testing';
|
|
10
|
+
|
|
11
|
+
declare const require: {
|
|
12
|
+
context(path: string, deep?: boolean, filter?: RegExp): {
|
|
13
|
+
keys(): string[];
|
|
14
|
+
<T>(id: string): T;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// First, initialize the Angular testing environment.
|
|
19
|
+
getTestBed().initTestEnvironment(
|
|
20
|
+
BrowserDynamicTestingModule,
|
|
21
|
+
platformBrowserDynamicTesting(), {
|
|
22
|
+
teardown: { destroyAfterEach: false }
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
// Then we find all the tests.
|
|
26
|
+
const context = require.context('./', true, /\.spec\.ts$/);
|
|
27
|
+
// And load the modules.
|
|
28
|
+
context.keys().map(context);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "../../tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "../../out-tsc/lib",
|
|
6
|
+
"target": "es2015",
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"declarationMap": true,
|
|
9
|
+
"inlineSources": true,
|
|
10
|
+
"types": [],
|
|
11
|
+
"lib": [
|
|
12
|
+
"dom",
|
|
13
|
+
"es2018"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"angularCompilerOptions": {
|
|
17
|
+
"compilationMode": "partial",
|
|
18
|
+
"skipTemplateCodegen": true,
|
|
19
|
+
"strictMetadataEmit": true,
|
|
20
|
+
"enableResourceInlining": true
|
|
21
|
+
},
|
|
22
|
+
"exclude": [
|
|
23
|
+
"src/test.ts",
|
|
24
|
+
"**/*.spec.ts"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "../../tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "../../out-tsc/spec",
|
|
6
|
+
"types": [
|
|
7
|
+
"jasmine"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"src/test.ts"
|
|
12
|
+
],
|
|
13
|
+
"include": [
|
|
14
|
+
"**/*.spec.ts",
|
|
15
|
+
"**/*.d.ts"
|
|
16
|
+
]
|
|
17
|
+
}
|
package/tslint.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function patchPostCSS(webpackConfig, tailwindConfig, components = false) {
|
|
2
|
+
if(!tailwindConfig){
|
|
3
|
+
console.error('Missing tailwind config :', tailwindConfig);
|
|
4
|
+
return;
|
|
5
|
+
}
|
|
6
|
+
const pluginName = "autoprefixer";
|
|
7
|
+
for (const rule of webpackConfig.module.rules) {
|
|
8
|
+
if (!(rule.use && rule.use.length > 0) || (!components && rule.exclude)) {
|
|
9
|
+
continue;
|
|
10
|
+
}
|
|
11
|
+
for (const useLoader of rule.use) {
|
|
12
|
+
if (!(useLoader.options && useLoader.options.postcssOptions)) {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
const originPostcssOptions = useLoader.options.postcssOptions;
|
|
16
|
+
useLoader.options.postcssOptions = (loader) => {
|
|
17
|
+
const _postcssOptions = originPostcssOptions(loader);
|
|
18
|
+
const insertIndex = _postcssOptions.plugins.findIndex(
|
|
19
|
+
({ postcssPlugin }) => postcssPlugin && postcssPlugin.toLowerCase() === pluginName
|
|
20
|
+
);
|
|
21
|
+
if (insertIndex !== -1) {
|
|
22
|
+
_postcssOptions.plugins.splice(insertIndex, 0, ["tailwindcss", tailwindConfig]);
|
|
23
|
+
} else {
|
|
24
|
+
console.error(`${pluginName} not found in postcss plugins`);
|
|
25
|
+
}
|
|
26
|
+
return _postcssOptions;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
module.exports = (config) => {
|
|
33
|
+
const tailwindConfig = require("./tailwind.config.js");
|
|
34
|
+
patchPostCSS(config, tailwindConfig, true);
|
|
35
|
+
return config;
|
|
36
|
+
};
|