qms-angular 1.1.23 → 1.1.24

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.
@@ -1,4 +1,5 @@
1
1
  import { SelectionModel } from '@angular/cdk/collections';
2
+ import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
2
3
  import { FlatTreeControl } from '@angular/cdk/tree';
3
4
  import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnInit } from '@angular/core';
4
5
  import { FormControl } from '@angular/forms';
@@ -40,7 +41,6 @@ export declare class SelectDepartmentTreeComponent implements OnInit, AfterViewI
40
41
  onPagingSearchEvent: EventEmitter<PageEvent>;
41
42
  MODE_VIEW_ENUM: typeof ModeDepartmentTreeeViewEnum;
42
43
  ngUnsubscribe: Subject<void>;
43
- isLoaded: boolean;
44
44
  resultSearchSelected: QMSTreeNode[];
45
45
  resultSelected: QMSTreeNode[];
46
46
  get currentTreeData(): QMSTreeNode[];
@@ -75,12 +75,15 @@ export declare class SelectDepartmentTreeComponent implements OnInit, AfterViewI
75
75
  private _getChild;
76
76
  private isExpandable;
77
77
  hasChild: (_: number, node: QMSFlatNodeTree) => boolean;
78
+ originalDataSource: QMSTreeNode[];
79
+ cdkVirtualScrollViewport: CdkVirtualScrollViewport;
78
80
  constructor(cdRef: ChangeDetectorRef, domSanitizer: DomSanitizer, appIconService: QMSIconRegistryService, iconRegistry: MatIconRegistry, eleRef: ElementRef, trans: TranslateLibraryService, treeDepartmentGlobalService: QMSSelectDepartmentTreeGlobalService);
79
81
  ngAfterContentInit(): void;
80
82
  ngAfterViewInit(): void;
81
83
  ngOnInit(): void;
82
84
  ngOnDestroy(): void;
83
85
  private _initTreeData;
86
+ private _convertToTreeData;
84
87
  private _initCheckListSelected;
85
88
  private _handleItemSelectionChanged;
86
89
  private _onSelectionNodeChangeEvent;
@@ -125,4 +128,5 @@ export declare class SelectDepartmentTreeComponent implements OnInit, AfterViewI
125
128
  getHeightStyleRefNode(nodeId: string): string;
126
129
  private getSelectedNodeStorage;
127
130
  private setSelectedNodeStorage;
131
+ trackBy(index: number, item: QMSFlatNodeTree): QMSFlatNodeTree;
128
132
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qms-angular",
3
- "version": "1.1.23",
3
+ "version": "1.1.24",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
@@ -137,17 +137,24 @@
137
137
 
138
138
 
139
139
  span.related__item__content_name {
140
- display: inline-block;
141
140
  min-width: calc(100% - 13px);
142
- white-space: nowrap;
143
- overflow: hidden;
144
- text-overflow: ellipsis;
145
- max-width: 220px;
141
+ max-width: 250px;
142
+ display: flex;
143
+ align-items: center;
144
+ & > span:nth-child(1){
145
+ display: inline-block;
146
+ margin-right: 4px;
147
+ white-space: nowrap;
148
+ overflow: hidden;
149
+ text-overflow: ellipsis;
150
+ max-width: 200px;
151
+ }
146
152
 
147
153
  .select__include-children__count {
148
154
  font-size: 0.75rem;
149
155
  color: black(0.5);
150
156
  font-weight: 600;
157
+ line-height: 16px;
151
158
  }
152
159
  }
153
160
  }
@@ -106,12 +106,10 @@
106
106
  }
107
107
 
108
108
  .tree-department-wrapper {
109
- height: 375px;
110
109
  padding-right: 4px;
111
- overflow-y: auto;
112
- overflow-x: hidden;
110
+ overflow: hidden;
113
111
  position: relative;
114
- transition: height .1s ease-in-out;
112
+ transition: height .3s ease-in-out;
115
113
  .tree-view{
116
114
  &.active-mode-external-view{
117
115
  width: 100%;
@@ -142,7 +140,7 @@
142
140
  .external-list-item-container{
143
141
  .node-external{
144
142
  overflow: hidden;
145
- transition: .1s ease-in-out;
143
+ transition: all .1s ease-in-out;
146
144
  .node-external-content {
147
145
  padding: 5px 15px 5px 15px;
148
146
  height: calc(100% - 2px);
@@ -162,105 +160,75 @@
162
160
  }
163
161
  }
164
162
  }
165
-
166
- // Tree
167
- .mat-tree.select-department-tree {
168
- height: 100%;
169
- &.has-checkbox-all{
170
- max-height: calc(100% - 47px);
171
- overflow-y: auto;
163
+ //Custom tree
164
+ .select-department-tree{
165
+ & > .cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{
166
+ padding: 0 4px !important;
172
167
  }
173
- .mat-tree-node {
168
+ .qms-tree-node{
169
+ display: flex;
170
+ align-items: center;
174
171
  border-radius: 4px;
175
- &:hover {
176
- background: black(0.08);
172
+ &:hover{
173
+ background-color: rgba(0,0,0,.08);
177
174
  }
178
-
179
- &:active {
180
- background: black(0.12);
175
+ &> .node-expand-area{
176
+ width: 48px;
177
+ height: 48px;
181
178
  }
182
-
183
- &.active {
184
- color: theme-apply($primary);
185
- background: theme-apply($primary-light-6-opacity);
186
-
187
- &:active {
188
- background: theme-apply($primary-light-12-opacity);
189
- }
190
-
191
- button,
192
- .mat-icon-rtl-mirror,
193
- .type-icon,
194
- .text-name {
195
- color: theme-apply($primary);
179
+ &.active-external-view{
180
+ .mat-checkbox.qms-group-options{
181
+ width: calc(100% - 250px) !important;
196
182
  }
197
183
  }
198
- }
199
-
200
- .mat-tree-node.collapse-node:not(.selected-theme) {
201
- &.active {
202
- button,
203
- .mat-icon-rtl-mirror,
204
- .type-icon,
205
- .text-name {
206
- color: theme-apply($primary);
184
+ &> .external-view-node{
185
+ flex-basis: 200px;
186
+ overflow: hidden;
187
+ .node-external{
188
+ overflow: hidden;
189
+ transition: all .1s ease-in-out;
190
+ display: block;
191
+ .node-external-content {
192
+ padding: 5px 15px 5px 15px;
193
+ height: calc(100% - 2px);
194
+ color: theme-apply($default-color);
195
+ font-size: 14px;
196
+ display: flex;
197
+ align-items: center;
198
+ span{
199
+ overflow: hidden;
200
+ text-overflow: ellipsis;
201
+ white-space: nowrap;
202
+ }
203
+ }
207
204
  }
205
+ }
206
+ &.expand-node {
207
+ color: theme-apply($primary);
208
+ &:hover {
209
+ background: theme-apply($primary-light-6-opacity);
210
+ }
208
211
 
209
- &:hover {
210
- background: theme-apply($primary-light-6-opacity);
212
+ &:active {
213
+ background: theme-apply($primary-light-12-opacity);
214
+ }
211
215
  }
212
-
213
- &:active {
214
- background: theme-apply($primary-light-12-opacity);
216
+ .node-without-checkbox{
217
+ cursor: pointer;
218
+ width: 100%;
219
+ display: flex;
220
+ justify-content: space-between;
221
+ align-items: center;
222
+ .mat-icon{
223
+ color: theme-apply($primary);
224
+ margin-right: 4px;
215
225
  }
216
226
  }
217
- }
218
-
219
- .mat-tree-node.selected-theme{
220
- background: theme-apply($primary-light-12-opacity);
221
- }
222
-
223
- .mat-tree-node.expand-node {
224
- color: theme-apply($primary);
225
-
226
- button,
227
- .mat-icon-rtl-mirror,
228
- .type-icon,
229
- .text-name {
230
- color: theme-apply($primary);
231
- }
232
-
233
- &:hover {
234
- background: theme-apply($primary-light-6-opacity);
235
- }
236
-
237
- &:active {
227
+ &.selected-theme{
238
228
  background: theme-apply($primary-light-12-opacity);
239
229
  }
240
- }
241
-
242
- .type-icon {
243
- margin-right: 5px;
244
- color: theme-apply($ws-action-active);
245
- }
246
-
247
- .text-name {
248
- color: theme-apply($default-color);
249
- }
250
-
251
- .mat-icon-rtl-mirror {
252
- color: black(0.6);
253
- }
254
-
255
- .mat-icon-button.btn-toggle {
256
- width: 35px;
257
- height: 35px;
258
- line-height: 35px;
259
- }
260
-
261
230
 
262
- .mat-tree-node {
263
- &.mat-tree-node-disabled-all {
231
+ &.mat-tree-node-disabled-all {
264
232
  cursor: default !important;
265
233
  pointer-events: none;
266
234
  user-select: none;
@@ -284,66 +252,8 @@
284
252
  background-color: transparent;
285
253
  }
286
254
  }
287
-
288
- &.mat-tree-node-disabled {
289
-
290
- button.mat-button-disabled,
291
- .type-icon {
292
- color: black(0.38);
293
- }
294
-
295
- .text-name {
296
- &.disabled {
297
- color: black(0.38);
298
- cursor: default !important;
299
- pointer-events: none;
300
- user-select: none;
301
- }
302
- }
303
-
304
- &.active,
305
- &:hover,
306
- &:active,
307
- &.expand-node:hover,
308
- &.expand-node:active {
309
- background-color: transparent;
310
- }
311
- }
312
-
313
- .node-without-checkbox{
314
- cursor: pointer;
315
- width: 100%;
316
- display: flex;
317
- justify-content: space-between;
318
- align-items: center;
319
- .mat-icon{
320
- color: theme-apply($primary);
321
- margin-right: 4px;
322
- }
323
- }
324
-
325
- &>.node-content-wraper {
326
- width: fit-content;
327
- position: relative;
328
- display: flex;
329
- justify-content: center;
330
- align-items: center;
331
-
332
- &>.mat-progress-bar {
333
- height: 3px;
334
- width: 100%;
335
- position: absolute;
336
- bottom: 0;
337
- left: 10px;
338
-
339
- .mat-progress-bar-fill::after {
340
- background: theme-apply($primary);
341
- }
342
- }
343
- }
344
255
  }
345
256
  }
346
-
347
257
  .text-name {
348
258
  position: relative;
349
259
  overflow: hidden;
@@ -377,7 +287,6 @@
377
287
  }
378
288
 
379
289
  .qms-view-search-result{
380
- height: 100%;
381
290
  width: 100%;
382
291
  overflow: hidden;
383
292
  .result {