Skip to content

Commit bdc2940

Browse files
hsuanxyzzjffdu
authored andcommitted
[ZEPPELIN-4501] Use secondary entry imports
### What is this PR for? Use secondary entry to speed up the build ### What type of PR is it? [Refactoring] ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-4501 ### How should this be tested? Not applicable ### Screenshots (if appropriate) Not applicable ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: Hsuan Lee <[email protected]> Closes #3561 from hsuanxyz/refactor/use-secondary-entry and squashes the following commits: 3c3e6e0 [Hsuan Lee] refactor: use secondary entry imports
1 parent 5ff4050 commit bdc2940

Some content is hidden

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

45 files changed

+348
-159
lines changed

zeppelin-web-angular/package-lock.json

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

zeppelin-web-angular/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"monaco-editor-webpack-plugin": "^1.7.0",
7575
"ng-packagr": "^5.4.0",
7676
"ngx-build-plus": "^8.1.5",
77+
"nz-tslint-rules": "^0.800.2",
7778
"prettier": "^1.17.0",
7879
"protractor": "~5.4.0",
7980
"ts-node": "~7.0.0",

zeppelin-web-angular/src/app/app-message.interceptor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
import { Injectable } from '@angular/core';
1414
import { Router } from '@angular/router';
1515

16-
import { NzModalService, NzNotificationService } from 'ng-zorro-antd';
16+
import { NzModalService } from 'ng-zorro-antd/modal';
17+
import { NzNotificationService } from 'ng-zorro-antd/notification';
1718

1819
import { MessageInterceptor } from '@zeppelin/interfaces';
1920
import { MessageReceiveDataTypeMap, OP, WebSocketMessage } from '@zeppelin/sdk';

zeppelin-web-angular/src/app/app.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
2020
import { Router, RouterModule } from '@angular/router';
2121

2222
import { ZeppelinHeliumModule } from '@zeppelin/helium';
23-
import { en_US, NzModalService, NzNotificationService, NZ_I18N } from 'ng-zorro-antd';
23+
import { en_US, NZ_I18N } from 'ng-zorro-antd/i18n';
24+
import { NzModalService } from 'ng-zorro-antd/modal';
25+
import { NzNotificationService } from 'ng-zorro-antd/notification';
2426

2527
import { MESSAGE_INTERCEPTOR, TRASH_FOLDER_ID_TOKEN } from '@zeppelin/interfaces';
2628
import { loadMonacoLanguage } from '@zeppelin/languages';

zeppelin-web-angular/src/app/core/public-api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ export * from './message-listener';
1414
export * from './destroy-hook';
1515
export * from './copy-text';
1616
export * from './paragraph-base';
17+
export * from './runtime-dynamic-module';
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS,
8+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
* See the License for the specific language governing permissions and
10+
* limitations under the License.
11+
*/
12+
13+
export * from './public-api';
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS,
8+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
* See the License for the specific language governing permissions and
10+
* limitations under the License.
11+
*/
12+
13+
import { NgModule } from '@angular/core';
14+
15+
import { NzAffixModule } from 'ng-zorro-antd/affix';
16+
import { NzAlertModule } from 'ng-zorro-antd/alert';
17+
import { NzAnchorModule } from 'ng-zorro-antd/anchor';
18+
import { NzAutocompleteModule } from 'ng-zorro-antd/auto-complete';
19+
import { NzAvatarModule } from 'ng-zorro-antd/avatar';
20+
import { NzBackTopModule } from 'ng-zorro-antd/back-top';
21+
import { NzBadgeModule } from 'ng-zorro-antd/badge';
22+
import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
23+
import { NzButtonModule } from 'ng-zorro-antd/button';
24+
import { NzCalendarModule } from 'ng-zorro-antd/calendar';
25+
import { NzCardModule } from 'ng-zorro-antd/card';
26+
import { NzCarouselModule } from 'ng-zorro-antd/carousel';
27+
import { NzCascaderModule } from 'ng-zorro-antd/cascader';
28+
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
29+
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
30+
import { NzCommentModule } from 'ng-zorro-antd/comment';
31+
import { NzNoAnimationModule, NzTransButtonModule, NzWaveModule } from 'ng-zorro-antd/core';
32+
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
33+
import { NzDescriptionsModule } from 'ng-zorro-antd/descriptions';
34+
import { NzDividerModule } from 'ng-zorro-antd/divider';
35+
import { NzDrawerModule } from 'ng-zorro-antd/drawer';
36+
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
37+
import { NzEmptyModule } from 'ng-zorro-antd/empty';
38+
import { NzFormModule } from 'ng-zorro-antd/form';
39+
import { NzGridModule } from 'ng-zorro-antd/grid';
40+
import { NzI18nModule } from 'ng-zorro-antd/i18n';
41+
import { NzIconModule } from 'ng-zorro-antd/icon';
42+
import { NzInputModule } from 'ng-zorro-antd/input';
43+
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
44+
import { NzLayoutModule } from 'ng-zorro-antd/layout';
45+
import { NzListModule } from 'ng-zorro-antd/list';
46+
import { NzMentionModule } from 'ng-zorro-antd/mention';
47+
import { NzMenuModule } from 'ng-zorro-antd/menu';
48+
import { NzMessageModule } from 'ng-zorro-antd/message';
49+
import { NzModalModule } from 'ng-zorro-antd/modal';
50+
import { NzNotificationModule } from 'ng-zorro-antd/notification';
51+
import { NzPageHeaderModule } from 'ng-zorro-antd/page-header';
52+
import { NzPaginationModule } from 'ng-zorro-antd/pagination';
53+
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
54+
import { NzPopoverModule } from 'ng-zorro-antd/popover';
55+
import { NzProgressModule } from 'ng-zorro-antd/progress';
56+
import { NzRadioModule } from 'ng-zorro-antd/radio';
57+
import { NzRateModule } from 'ng-zorro-antd/rate';
58+
import { NzResultModule } from 'ng-zorro-antd/result';
59+
import { NzSelectModule } from 'ng-zorro-antd/select';
60+
import { NzSkeletonModule } from 'ng-zorro-antd/skeleton';
61+
import { NzSliderModule } from 'ng-zorro-antd/slider';
62+
import { NzSpinModule } from 'ng-zorro-antd/spin';
63+
import { NzStatisticModule } from 'ng-zorro-antd/statistic';
64+
import { NzStepsModule } from 'ng-zorro-antd/steps';
65+
import { NzSwitchModule } from 'ng-zorro-antd/switch';
66+
import { NzTableModule } from 'ng-zorro-antd/table';
67+
import { NzTabsModule } from 'ng-zorro-antd/tabs';
68+
import { NzTagModule } from 'ng-zorro-antd/tag';
69+
import { NzTimePickerModule } from 'ng-zorro-antd/time-picker';
70+
import { NzTimelineModule } from 'ng-zorro-antd/timeline';
71+
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
72+
import { NzTransferModule } from 'ng-zorro-antd/transfer';
73+
import { NzTreeModule } from 'ng-zorro-antd/tree';
74+
import { NzTreeSelectModule } from 'ng-zorro-antd/tree-select';
75+
import { NzTypographyModule } from 'ng-zorro-antd/typography';
76+
import { NzUploadModule } from 'ng-zorro-antd/upload';
77+
78+
@NgModule({
79+
exports: [
80+
NzAffixModule,
81+
NzAlertModule,
82+
NzAnchorModule,
83+
NzAutocompleteModule,
84+
NzAvatarModule,
85+
NzBackTopModule,
86+
NzBadgeModule,
87+
NzButtonModule,
88+
NzBreadCrumbModule,
89+
NzCalendarModule,
90+
NzCardModule,
91+
NzCarouselModule,
92+
NzCascaderModule,
93+
NzCheckboxModule,
94+
NzCollapseModule,
95+
NzCommentModule,
96+
NzDatePickerModule,
97+
NzDescriptionsModule,
98+
NzDividerModule,
99+
NzDrawerModule,
100+
NzDropDownModule,
101+
NzEmptyModule,
102+
NzFormModule,
103+
NzGridModule,
104+
NzI18nModule,
105+
NzIconModule,
106+
NzInputModule,
107+
NzInputNumberModule,
108+
NzLayoutModule,
109+
NzListModule,
110+
NzMentionModule,
111+
NzMenuModule,
112+
NzMessageModule,
113+
NzModalModule,
114+
NzNoAnimationModule,
115+
NzNotificationModule,
116+
NzPageHeaderModule,
117+
NzPaginationModule,
118+
NzPopconfirmModule,
119+
NzPopoverModule,
120+
NzProgressModule,
121+
NzRadioModule,
122+
NzRateModule,
123+
NzResultModule,
124+
NzSelectModule,
125+
NzSkeletonModule,
126+
NzSliderModule,
127+
NzSpinModule,
128+
NzStatisticModule,
129+
NzStepsModule,
130+
NzSwitchModule,
131+
NzTableModule,
132+
NzTabsModule,
133+
NzTagModule,
134+
NzTimePickerModule,
135+
NzTimelineModule,
136+
NzToolTipModule,
137+
NzTransButtonModule,
138+
NzTransferModule,
139+
NzTreeModule,
140+
NzTreeSelectModule,
141+
NzTypographyModule,
142+
NzUploadModule,
143+
NzWaveModule
144+
]
145+
})
146+
export class NzModule {
147+
constructor() {}
148+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS,
8+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
* See the License for the specific language governing permissions and
10+
* limitations under the License.
11+
*/
12+
13+
export * from './runtime-dynamic-module.module';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { CommonModule } from '@angular/common';
2+
import { NgModule } from '@angular/core';
3+
import { FormsModule } from '@angular/forms';
4+
import { NzModule } from './ng-zorro-antd-module';
5+
6+
@NgModule({
7+
declarations: [],
8+
exports: [CommonModule, FormsModule, NzModule]
9+
})
10+
export class RuntimeDynamicModuleModule {}

zeppelin-web-angular/src/app/pages/login/login.module.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ import { CommonModule } from '@angular/common';
1414
import { NgModule } from '@angular/core';
1515
import { FormsModule } from '@angular/forms';
1616

17-
import { NzButtonModule, NzFormModule, NzIconModule, NzInputModule } from 'ng-zorro-antd';
17+
import { NzButtonModule } from 'ng-zorro-antd/button';
18+
import { NzFormModule } from 'ng-zorro-antd/form';
19+
import { NzIconModule } from 'ng-zorro-antd/icon';
20+
import { NzInputModule } from 'ng-zorro-antd/input';
1821

1922
import { LoginRoutingModule } from './login-routing.module';
2023
import { LoginComponent } from './login.component';

zeppelin-web-angular/src/app/pages/workspace/configuration/configuration.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { CommonModule } from '@angular/common';
1313
import { NgModule } from '@angular/core';
1414

1515
import { ShareModule } from '@zeppelin/share';
16-
import { NzTableModule } from 'ng-zorro-antd';
16+
import { NzTableModule } from 'ng-zorro-antd/table';
1717
import { ConfigurationRoutingModule } from './configuration-routing.module';
1818
import { ConfigurationComponent } from './configuration.component';
1919

zeppelin-web-angular/src/app/pages/workspace/credential/credential.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
1414
import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms';
15-
import { collapseMotion, NzMessageService } from 'ng-zorro-antd';
15+
import { collapseMotion } from 'ng-zorro-antd/core';
16+
import { NzMessageService } from 'ng-zorro-antd/message';
1617

1718
import { finalize } from 'rxjs/operators';
1819

zeppelin-web-angular/src/app/pages/workspace/credential/credential.module.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,18 @@ import { NgModule } from '@angular/core';
1414

1515
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
1616
import { ShareModule } from '@zeppelin/share';
17-
import {
18-
NzAutocompleteModule,
19-
NzButtonModule,
20-
NzCardModule,
21-
NzDividerModule,
22-
NzFormModule,
23-
NzGridModule,
24-
NzIconModule,
25-
NzInputModule,
26-
NzMessageModule,
27-
NzPopconfirmModule,
28-
NzTableModule,
29-
NzToolTipModule
30-
} from 'ng-zorro-antd';
17+
import { NzAutocompleteModule } from 'ng-zorro-antd/auto-complete';
18+
import { NzButtonModule } from 'ng-zorro-antd/button';
19+
import { NzCardModule } from 'ng-zorro-antd/card';
20+
import { NzDividerModule } from 'ng-zorro-antd/divider';
21+
import { NzFormModule } from 'ng-zorro-antd/form';
22+
import { NzGridModule } from 'ng-zorro-antd/grid';
23+
import { NzIconModule } from 'ng-zorro-antd/icon';
24+
import { NzInputModule } from 'ng-zorro-antd/input';
25+
import { NzMessageModule } from 'ng-zorro-antd/message';
26+
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
27+
import { NzTableModule } from 'ng-zorro-antd/table';
28+
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
3129
import { CredentialRoutingModule } from './credential-routing.module';
3230
import { CredentialComponent } from './credential.component';
3331

zeppelin-web-angular/src/app/pages/workspace/home/home.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
import { CommonModule } from '@angular/common';
1414
import { NgModule } from '@angular/core';
1515

16-
import { NzGridModule, NzIconModule, NzToolTipModule } from 'ng-zorro-antd';
16+
import { NzGridModule } from 'ng-zorro-antd/grid';
17+
import { NzIconModule } from 'ng-zorro-antd/icon';
18+
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
1719

1820
import { ShareModule } from '@zeppelin/share';
1921

zeppelin-web-angular/src/app/pages/workspace/interpreter/create-repository-modal/create-repository-modal.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
1414
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
1515
import { takeUntil } from 'rxjs/operators';
1616

17-
import { NzModalRef } from 'ng-zorro-antd';
17+
import { NzModalRef } from 'ng-zorro-antd/modal';
1818

1919
import { DestroyHookComponent } from '@zeppelin/core';
2020
import { CreateInterpreterRepositoryForm } from '@zeppelin/interfaces';

zeppelin-web-angular/src/app/pages/workspace/interpreter/interpreter.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnIni
1414
import { Subject } from 'rxjs';
1515
import { debounceTime } from 'rxjs/operators';
1616

17-
import { collapseMotion, NzMessageService, NzModalService } from 'ng-zorro-antd';
17+
import { collapseMotion } from 'ng-zorro-antd/core';
18+
import { NzMessageService } from 'ng-zorro-antd/message';
19+
import { NzModalService } from 'ng-zorro-antd/modal';
1820

1921
import { Interpreter, InterpreterPropertyTypes, InterpreterRepository } from '@zeppelin/interfaces';
2022
import { InterpreterService } from '@zeppelin/services';

zeppelin-web-angular/src/app/pages/workspace/interpreter/interpreter.module.ts

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,24 @@
1313
import { CommonModule } from '@angular/common';
1414
import { NgModule } from '@angular/core';
1515
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
16-
import {
17-
NzAlertModule,
18-
NzBadgeModule,
19-
NzButtonModule,
20-
NzCardModule,
21-
NzCheckboxModule,
22-
NzDividerModule,
23-
NzDropDownModule,
24-
NzFormModule,
25-
NzIconModule,
26-
NzInputModule,
27-
NzMessageModule,
28-
NzModalModule,
29-
NzRadioModule,
30-
NzSelectModule,
31-
NzSwitchModule,
32-
NzTableModule,
33-
NzTagModule,
34-
NzToolTipModule
35-
} from 'ng-zorro-antd';
16+
import { NzAlertModule } from 'ng-zorro-antd/alert';
17+
import { NzBadgeModule } from 'ng-zorro-antd/badge';
18+
import { NzButtonModule } from 'ng-zorro-antd/button';
19+
import { NzCardModule } from 'ng-zorro-antd/card';
20+
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
21+
import { NzDividerModule } from 'ng-zorro-antd/divider';
22+
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
23+
import { NzFormModule } from 'ng-zorro-antd/form';
24+
import { NzIconModule } from 'ng-zorro-antd/icon';
25+
import { NzInputModule } from 'ng-zorro-antd/input';
26+
import { NzMessageModule } from 'ng-zorro-antd/message';
27+
import { NzModalModule } from 'ng-zorro-antd/modal';
28+
import { NzRadioModule } from 'ng-zorro-antd/radio';
29+
import { NzSelectModule } from 'ng-zorro-antd/select';
30+
import { NzSwitchModule } from 'ng-zorro-antd/switch';
31+
import { NzTableModule } from 'ng-zorro-antd/table';
32+
import { NzTagModule } from 'ng-zorro-antd/tag';
33+
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
3634

3735
import { ShareModule } from '@zeppelin/share';
3836

zeppelin-web-angular/src/app/pages/workspace/job-manager/job-manager.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
1414
import { FormBuilder, FormGroup } from '@angular/forms';
1515

16-
import { NzModalService } from 'ng-zorro-antd';
16+
import { NzModalService } from 'ng-zorro-antd/modal';
1717

1818
import { MessageListener, MessageListenersManager } from '@zeppelin/core';
1919
import { JobsItem, JobStatus, ListNoteJobs, ListUpdateNoteJobs, OP } from '@zeppelin/sdk';

0 commit comments

Comments
 (0)