@ecodev/natural 57.0.7 → 58.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.
Files changed (81) hide show
  1. package/esm2022/lib/classes/abstract-controller.mjs +3 -3
  2. package/esm2022/lib/classes/abstract-detail.mjs +3 -3
  3. package/esm2022/lib/classes/abstract-editable-list.mjs +3 -3
  4. package/esm2022/lib/classes/abstract-list.mjs +3 -3
  5. package/esm2022/lib/classes/abstract-navigable-list.mjs +3 -3
  6. package/esm2022/lib/classes/query-variable-manager.mjs +3 -3
  7. package/esm2022/lib/classes/utility.mjs +4 -4
  8. package/esm2022/lib/directives/http-prefix.directive.mjs +3 -3
  9. package/esm2022/lib/modules/alert/alert.service.mjs +3 -3
  10. package/esm2022/lib/modules/alert/confirm.component.mjs +3 -3
  11. package/esm2022/lib/modules/avatar/component/avatar.component.mjs +3 -3
  12. package/esm2022/lib/modules/avatar/service/avatar.service.mjs +3 -3
  13. package/esm2022/lib/modules/columns-picker/columns-picker.component.mjs +3 -3
  14. package/esm2022/lib/modules/common/directives/linkable-tab.directive.mjs +3 -3
  15. package/esm2022/lib/modules/common/directives/src-density.directive.mjs +3 -3
  16. package/esm2022/lib/modules/common/pipes/capitalize.pipe.mjs +3 -3
  17. package/esm2022/lib/modules/common/pipes/ellipsis.pipe.mjs +3 -3
  18. package/esm2022/lib/modules/common/pipes/enum.pipe.mjs +3 -3
  19. package/esm2022/lib/modules/common/pipes/swiss-date.pipe.mjs +3 -3
  20. package/esm2022/lib/modules/common/pipes/time-ago.pipe.mjs +3 -3
  21. package/esm2022/lib/modules/common/services/memory-storage.mjs +3 -3
  22. package/esm2022/lib/modules/common/services/seo.service.mjs +3 -3
  23. package/esm2022/lib/modules/detail-header/detail-header.component.mjs +3 -3
  24. package/esm2022/lib/modules/dialog-trigger/dialog-trigger.component.mjs +3 -3
  25. package/esm2022/lib/modules/dropdown-components/abstract-association-select-component.directive.mjs +3 -3
  26. package/esm2022/lib/modules/dropdown-components/type-boolean/type-boolean.component.mjs +3 -3
  27. package/esm2022/lib/modules/dropdown-components/type-date/type-date.component.mjs +3 -3
  28. package/esm2022/lib/modules/dropdown-components/type-date-range/type-date-range.component.mjs +3 -3
  29. package/esm2022/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.mjs +3 -3
  30. package/esm2022/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.mjs +3 -3
  31. package/esm2022/lib/modules/dropdown-components/type-number/type-number.component.mjs +3 -3
  32. package/esm2022/lib/modules/dropdown-components/type-options/type-options.component.mjs +3 -3
  33. package/esm2022/lib/modules/dropdown-components/type-select/type-select.component.mjs +3 -3
  34. package/esm2022/lib/modules/dropdown-components/type-text/type-text.component.mjs +3 -3
  35. package/esm2022/lib/modules/file/abstract-file.mjs +3 -3
  36. package/esm2022/lib/modules/file/component/file.component.mjs +3 -3
  37. package/esm2022/lib/modules/file/file-drop.directive.mjs +3 -3
  38. package/esm2022/lib/modules/file/file-select.directive.mjs +3 -3
  39. package/esm2022/lib/modules/file/file.service.mjs +3 -3
  40. package/esm2022/lib/modules/fixed-button/fixed-button.component.mjs +3 -3
  41. package/esm2022/lib/modules/fixed-button-detail/fixed-button-detail.component.mjs +3 -3
  42. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.mjs +3 -3
  43. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.mjs +3 -3
  44. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.mjs +3 -3
  45. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.service.mjs +3 -3
  46. package/esm2022/lib/modules/icon/icon.directive.mjs +3 -3
  47. package/esm2022/lib/modules/logger/error-handler.mjs +3 -3
  48. package/esm2022/lib/modules/matomo/matomo.service.mjs +3 -3
  49. package/esm2022/lib/modules/panels/abstract-panel.mjs +3 -3
  50. package/esm2022/lib/modules/panels/panels.component.mjs +3 -3
  51. package/esm2022/lib/modules/panels/panels.service.mjs +26 -26
  52. package/esm2022/lib/modules/relations/relations.component.mjs +4 -4
  53. package/esm2022/lib/modules/search/dropdown-container/dropdown-container.component.mjs +3 -3
  54. package/esm2022/lib/modules/search/dropdown-container/dropdown.service.mjs +3 -3
  55. package/esm2022/lib/modules/search/facet-selector/facet-selector.component.mjs +3 -3
  56. package/esm2022/lib/modules/search/group/group.component.mjs +3 -3
  57. package/esm2022/lib/modules/search/input/input.component.mjs +3 -3
  58. package/esm2022/lib/modules/search/search/search.component.mjs +3 -3
  59. package/esm2022/lib/modules/select/abstract-select.component.mjs +3 -3
  60. package/esm2022/lib/modules/select/select/select.component.mjs +3 -3
  61. package/esm2022/lib/modules/select/select-enum/select-enum.component.mjs +3 -3
  62. package/esm2022/lib/modules/select/select-hierarchic/select-hierarchic.component.mjs +3 -3
  63. package/esm2022/lib/modules/sidenav/sidenav/sidenav.component.mjs +3 -3
  64. package/esm2022/lib/modules/sidenav/sidenav-container/sidenav-container.component.mjs +3 -3
  65. package/esm2022/lib/modules/sidenav/sidenav-content/sidenav-content.component.mjs +3 -3
  66. package/esm2022/lib/modules/sidenav/sidenav-stack.service.mjs +3 -3
  67. package/esm2022/lib/modules/sidenav/sidenav.service.mjs +21 -17
  68. package/esm2022/lib/modules/stamp/stamp.component.mjs +3 -3
  69. package/esm2022/lib/modules/table-button/table-button.component.mjs +3 -3
  70. package/esm2022/lib/services/debounce.service.mjs +3 -3
  71. package/esm2022/lib/services/enum.service.mjs +3 -3
  72. package/esm2022/lib/services/link-mutation.service.mjs +3 -3
  73. package/esm2022/lib/services/persistence.service.mjs +3 -3
  74. package/esm2022/lib/services/swiss-parsing-date-adapter.service.mjs +3 -3
  75. package/fesm2022/ecodev-natural.mjs +254 -254
  76. package/fesm2022/ecodev-natural.mjs.map +1 -1
  77. package/lib/modules/panels/panels.service.d.ts +4 -4
  78. package/lib/modules/sidenav/sidenav.service.d.ts +4 -3
  79. package/package.json +11 -11
  80. package/src/lib/_natural.theme.scss +0 -1
  81. package/src/lib/styles/_layout.scss +0 -368
@@ -1,5 +1,5 @@
1
+ import { BreakpointObserver } from '@angular/cdk/layout';
1
2
  import { Injector } from '@angular/core';
2
- import { MediaObserver } from '@ngbracket/ngx-layout';
3
3
  import { MatDialog } from '@angular/material/dialog';
4
4
  import { ActivatedRoute, Router } from '@angular/router';
5
5
  import { Subject } from 'rxjs';
@@ -15,7 +15,7 @@ export declare class NaturalPanelsService {
15
15
  private readonly dialog;
16
16
  private readonly injector;
17
17
  private hooksConfig;
18
- private mediaService;
18
+ private readonly panelWidth;
19
19
  /**
20
20
  * Because of this static property Panels are **not** compatible with SSR.
21
21
  * And we cannot make it non-static, because `UrlMatcher` cannot be injected.
@@ -61,8 +61,8 @@ export declare class NaturalPanelsService {
61
61
  * Cache of previous screen size
62
62
  * Used to change panels stack orientation on small screens
63
63
  */
64
- private media;
65
- constructor(router: Router, dialog: MatDialog, injector: Injector, hooksConfig: NaturalPanelsHooksConfig, mediaService: MediaObserver);
64
+ private isVertical;
65
+ constructor(router: Router, dialog: MatDialog, injector: Injector, hooksConfig: NaturalPanelsHooksConfig, breakpointObserver: BreakpointObserver);
66
66
  start(route: ActivatedRoute): void;
67
67
  /**
68
68
  * Uses given configuration to add in the end of current url
@@ -1,10 +1,10 @@
1
- import { MediaObserver } from '@ngbracket/ngx-layout';
2
1
  import { MatDrawerMode } from '@angular/material/sidenav';
3
2
  import { Router } from '@angular/router';
4
3
  import { NaturalAbstractController } from '../../classes/abstract-controller';
5
4
  import { NaturalSidenavContainerComponent } from './sidenav-container/sidenav-container.component';
6
5
  import { NaturalStorage } from '../common/services/memory-storage';
7
6
  import { NaturalSidenavStackService } from './sidenav-stack.service';
7
+ import { BreakpointObserver } from '@angular/cdk/layout';
8
8
  import * as i0 from "@angular/core";
9
9
  /**
10
10
  * TODO: Fix nav minimize and maximize resize
@@ -13,7 +13,8 @@ import * as i0 from "@angular/core";
13
13
  * Maybe the better is to wait next release
14
14
  */
15
15
  export declare class NaturalSidenavService extends NaturalAbstractController {
16
- readonly mediaObserver: MediaObserver;
16
+ #private;
17
+ readonly breakpointObserver: BreakpointObserver;
17
18
  private readonly router;
18
19
  private readonly sessionStorage;
19
20
  private readonly naturalSidenavStackService;
@@ -50,7 +51,7 @@ export declare class NaturalSidenavService extends NaturalAbstractController {
50
51
  private readonly openedStorageKey;
51
52
  private minimizedStorageKeyWithName;
52
53
  private openedStorageKeyWithName;
53
- constructor(mediaObserver: MediaObserver, router: Router, sessionStorage: NaturalStorage, naturalSidenavStackService: NaturalSidenavStackService);
54
+ constructor(breakpointObserver: BreakpointObserver, router: Router, sessionStorage: NaturalStorage, naturalSidenavStackService: NaturalSidenavStackService);
54
55
  get activeMode(): MatDrawerMode;
55
56
  get isOpened(): boolean;
56
57
  get isMinimized(): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecodev/natural",
3
- "version": "57.0.7",
3
+ "version": "58.0.0",
4
4
  "license": "MIT",
5
5
  "repository": "github:Ecodev/natural",
6
6
  "sideEffects": false,
@@ -22,16 +22,16 @@
22
22
  "tslib": "^2.5.3"
23
23
  },
24
24
  "peerDependencies": {
25
- "@angular/animations": "^17.2.0",
26
- "@angular/cdk": "^17.2.0",
27
- "@angular/common": "^17.2.0",
28
- "@angular/core": "^17.2.0",
29
- "@angular/forms": "^17.2.0",
30
- "@angular/localize": "^17.2.0",
31
- "@angular/material": "^17.2.0",
32
- "@angular/platform-browser": "^17.2.0",
33
- "@angular/router": "^17.2.0",
34
- "apollo-angular": "^6.0.0",
25
+ "@angular/animations": "^17.3.0",
26
+ "@angular/cdk": "^17.3.0",
27
+ "@angular/common": "^17.3.0",
28
+ "@angular/core": "^17.3.0",
29
+ "@angular/forms": "^17.3.0",
30
+ "@angular/localize": "^17.3.0",
31
+ "@angular/material": "^17.3.0",
32
+ "@angular/platform-browser": "^17.3.0",
33
+ "@angular/router": "^17.3.0",
34
+ "apollo-angular": "^7.0.0",
35
35
  "lodash-es": "^4.17.21",
36
36
  "rxjs": "^7.8.1"
37
37
  },
@@ -2,7 +2,6 @@
2
2
  @use '@angular/material' as mat;
3
3
 
4
4
  // Non themes
5
- @use 'styles/layout';
6
5
  @use 'styles/table';
7
6
  @use 'modules/panels/panels.external';
8
7
  // Themes
@@ -1,368 +0,0 @@
1
- /**
2
-
3
- Usage :
4
-
5
- <div class="padding">
6
- Padding applied only to element
7
-
8
- <div class="padding-h">
9
- Padding left and right on element
10
-
11
- <div class="padding-v">
12
- Padding top and bottom on element
13
-
14
-
15
- <div class="padding-child">
16
- Padding applied to all immediate children
17
-
18
- <div class="padding-child-h">
19
- Padding left and right applied to all immediate children
20
- Example of children list with padding between : [txt-][-txt-][-txt]
21
-
22
- <div class="padding-child-v">
23
- Padding top and bottom applied to all immediate children
24
-
25
- <div class="padding-child-*-between"> // * can be .h] or [v
26
- Padding is applied between immediate children
27
-
28
-
29
- Same approach width margin. Except between elements, padding are set twice, when margin don't.
30
-
31
- Padding between example : [txt-][-txt-][-txt]
32
- Margin between example : [txt]-[txt]-[txt] (not : [txt]--[txt]--[txt])
33
-
34
- To test copy this in template :
35
-
36
- <style> [test] * {
37
- background: rgba(255, 0, 0, 0.2) !important;
38
- border: 1px solid red !important;
39
- }</style>
40
- <div test class="margin-child-v">
41
-
42
- <!-- Padding test -->
43
- <div layout="row" class="padding">
44
- <div>padding</div>
45
- <div>lorem ipsum</div>
46
- <div>lorem ipsum</div>
47
- </div>
48
-
49
- <div layout="row" class="padding-v">
50
- <div>padding-v</div>
51
- <div>lorem ipsum</div>
52
- <div>lorem ipsum</div>
53
- </div>
54
-
55
- <div layout="row" class="padding-h">
56
- <div>padding-h</div>
57
- <div>lorem ipsum</div>
58
- <div>lorem ipsum</div>
59
- </div>
60
-
61
- <div layout="row" class="padding-child">
62
- <div>padding-child</div>
63
- <div>lorem ipsum</div>
64
- <div>lorem ipsum</div>
65
- </div>
66
-
67
-
68
- <div layout="row" class="padding-child-h">
69
- <div>padding-child-h</div>
70
- <div>lorem ipsum</div>
71
- <div>lorem ipsum</div>
72
- </div>
73
-
74
- <div layout="column" class="padding-child-v">
75
- <div>padding-child-v</div>
76
- <div>lorem ipsum</div>
77
- <div>lorem ipsum</div>
78
- </div>
79
-
80
- <div layout="row" class="padding-child-h-between">
81
- <div>padding-child-h-between</div>
82
- <div>lorem ipsum</div>
83
- <div>lorem ipsum</div>
84
- </div>
85
-
86
- <div layout="column" class="padding-child-v-between">
87
- <div>padding-child-v-between</div>
88
- <div>lorem ipsum</div>
89
- <div>lorem ipsum</div>
90
- </div>
91
-
92
-
93
-
94
-
95
- <!-- Margin test -->
96
- <div layout="row" class="margin">
97
- <div>margin</div>
98
- <div>lorem ipsum</div>
99
- <div>lorem ipsum</div>
100
- </div>
101
-
102
- <div layout="row" class="margin-v">
103
- <div>margin-v</div>
104
- <div>lorem ipsum</div>
105
- <div>lorem ipsum</div>
106
- </div>
107
-
108
- <div layout="row" class="margin-h">
109
- <div>margin-h</div>
110
- <div>lorem ipsum</div>
111
- <div>lorem ipsum</div>
112
- </div>
113
-
114
- <div layout="row" class="margin-child">
115
- <div>margin-child</div>
116
- <div>lorem ipsum</div>
117
- <div>lorem ipsum</div>
118
- </div>
119
-
120
-
121
- <div layout="row" class="margin-child-h">
122
- <div>margin-child-h</div>
123
- <div>lorem ipsum</div>
124
- <div>lorem ipsum</div>
125
- </div>
126
-
127
- <div layout="column" class="margin-child-v">
128
- <div>margin-child-v</div>
129
- <div>lorem ipsum</div>
130
- <div>lorem ipsum</div>
131
- </div>
132
-
133
- <div layout="row" class="margin-child-h-between">
134
- <div>margin-child-h-between</div>
135
- <div>lorem ipsum</div>
136
- <div>lorem ipsum</div>
137
- </div>
138
-
139
- <div layout="column" class="margin-child-v-between">
140
- <div>margin-child-v-between</div>
141
- <div>lorem ipsum</div>
142
- <div>lorem ipsum</div>
143
- </div>
144
- </div>
145
-
146
- */
147
-
148
- $margin-spacing: 20px;
149
-
150
- /**
151
- * ======================================================
152
- * PADDING
153
- * ======================================================
154
- */
155
-
156
- // Parent element
157
-
158
- .padding {
159
- padding: $margin-spacing !important;
160
- }
161
-
162
- .padding-h {
163
- padding-left: $margin-spacing !important;
164
- padding-right: $margin-spacing !important;
165
- }
166
-
167
- .padding-bottom {
168
- padding-bottom: $margin-spacing !important;
169
- }
170
-
171
- .padding-top {
172
- padding-top: $margin-spacing !important;
173
- }
174
-
175
- .padding-right {
176
- padding-right: $margin-spacing !important;
177
- }
178
-
179
- .padding-left {
180
- padding-left: $margin-spacing !important;
181
- }
182
-
183
- .padding-v {
184
- padding-top: $margin-spacing !important;
185
- padding-bottom: $margin-spacing !important;
186
- }
187
-
188
- .no-padding {
189
- padding: 0 !important;
190
- }
191
-
192
- .no-padding-v {
193
- padding-bottom: 0 !important;
194
- padding-top: 0 !important;
195
- }
196
-
197
- .no-padding-h {
198
- padding-left: 0 !important;
199
- padding-right: 0 !important;
200
- }
201
-
202
- .no-padding-right {
203
- padding-right: 0 !important;
204
- }
205
-
206
- .no-padding-top {
207
- padding-top: 0 !important;
208
- }
209
-
210
- .no-padding-left {
211
- padding-left: 0 !important;
212
- }
213
-
214
- .no-padding-bottom {
215
- padding-bottom: 0 !important;
216
- }
217
-
218
- // Children
219
- .padding-child > * {
220
- padding: $margin-spacing !important;
221
- }
222
-
223
- .padding-child-h > * {
224
- padding-left: $margin-spacing !important;
225
- padding-right: $margin-spacing !important;
226
- }
227
-
228
- .padding-child-v > * {
229
- padding-top: $margin-spacing !important;
230
- padding-bottom: $margin-spacing !important;
231
- }
232
-
233
- /**
234
- * ======================================================
235
- * margin
236
- * ======================================================
237
- */
238
-
239
- // Parent element
240
-
241
- .margin {
242
- margin: $margin-spacing !important;
243
- }
244
-
245
- .margin-top {
246
- margin-top: $margin-spacing !important;
247
- }
248
-
249
- .margin-bottom {
250
- margin-bottom: $margin-spacing !important;
251
- }
252
-
253
- .margin-right {
254
- margin-right: $margin-spacing !important;
255
- }
256
-
257
- .margin-left {
258
- margin-left: $margin-spacing !important;
259
- }
260
-
261
- .margin-h {
262
- margin-left: $margin-spacing !important;
263
- margin-right: $margin-spacing !important;
264
- }
265
-
266
- .margin-v {
267
- margin-top: $margin-spacing !important;
268
- margin-bottom: $margin-spacing !important;
269
- }
270
-
271
- .no-margin {
272
- margin: 0 !important;
273
- }
274
-
275
- .no-margin-v {
276
- margin-bottom: 0 !important;
277
- margin-top: 0 !important;
278
- }
279
-
280
- .no-margin-h {
281
- margin-left: 0 !important;
282
- margin-right: 0 !important;
283
- }
284
-
285
- .no-margin-right {
286
- margin-right: 0 !important;
287
- }
288
-
289
- .no-margin-top {
290
- margin-top: 0 !important;
291
- }
292
-
293
- .no-margin-left {
294
- margin-left: 0 !important;
295
- }
296
-
297
- .no-margin-bottom {
298
- margin-bottom: 0 !important;
299
- }
300
-
301
- // Children
302
- .margin-child > * {
303
- margin: $margin-spacing !important;
304
- }
305
-
306
- .margin-child-h > * {
307
- margin-right: $margin-spacing !important;
308
-
309
- &:first-child {
310
- margin-left: $margin-spacing !important;
311
- }
312
- }
313
-
314
- .margin-child-v > * {
315
- margin-bottom: $margin-spacing !important;
316
-
317
- &:first-child {
318
- margin-top: $margin-spacing !important;
319
- }
320
- }
321
-
322
- /**
323
- * ========================================================================
324
- * Probably no need anymore with fxLayoutGap
325
- * ========================================================================
326
- */
327
-
328
- .padding-child-h-between > * {
329
- padding-left: $margin-spacing !important;
330
- padding-right: $margin-spacing !important;
331
-
332
- &:first-child {
333
- padding-left: 0 !important;
334
- }
335
-
336
- &:last-child {
337
- padding-right: 0 !important;
338
- }
339
- }
340
-
341
- .padding-child-v-between > * {
342
- padding-top: $margin-spacing !important;
343
- padding-bottom: $margin-spacing !important;
344
-
345
- &:first-child {
346
- padding-top: 0 !important;
347
- }
348
-
349
- &:last-child {
350
- padding-bottom: 0 !important;
351
- }
352
- }
353
-
354
- .margin-child-h-between > * {
355
- margin-right: $margin-spacing !important;
356
-
357
- &:last-child {
358
- margin-right: 0 !important;
359
- }
360
- }
361
-
362
- .margin-child-v-between > * {
363
- margin-bottom: $margin-spacing !important;
364
-
365
- &:last-child {
366
- margin-bottom: 0 !important;
367
- }
368
- }