@lucca-front/ng 19.3.0-rc.3 → 19.3.0-rc.4
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/core-select/input/select-input.component.d.ts +3 -1
- package/date2/abstract-date-component.d.ts +1 -1
- package/date2/date-input/date-input.component.d.ts +1 -0
- package/date2/date-range-input/date-range-input.component.d.ts +1 -0
- package/fesm2022/lucca-front-ng-core-select-user.mjs +1 -1
- package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select.mjs +17 -2
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date2.mjs +23 -14
- package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-divider.mjs +2 -2
- package/fesm2022/lucca-front-ng-divider.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-fancy-box.mjs +2 -2
- package/fesm2022/lucca-front-ng-fancy-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-file-upload.mjs +343 -0
- package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-filter-pills.mjs +5 -4
- package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-field.mjs +13 -5
- package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +2 -2
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms.mjs +9 -4
- package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-icon.mjs +2 -2
- package/fesm2022/lucca-front-ng-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-inline-message.mjs +14 -6
- package/fesm2022/lucca-front-ng-inline-message.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-link.mjs +2 -2
- package/fesm2022/lucca-front-ng-multi-select.mjs +3 -3
- package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-numeric-badge.mjs +2 -2
- package/fesm2022/lucca-front-ng-numeric-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popup-employee.mjs +2 -2
- package/fesm2022/lucca-front-ng-popup-employee.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-simple-select.mjs +2 -2
- package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-skeleton.mjs +2 -2
- package/fesm2022/lucca-front-ng-skeleton.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-statusBadge.mjs +2 -2
- package/fesm2022/lucca-front-ng-statusBadge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-title.mjs +26 -17
- package/fesm2022/lucca-front-ng-title.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tooltip.mjs +2 -2
- package/fesm2022/lucca-front-ng-tooltip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user.mjs +2 -2
- package/fesm2022/lucca-front-ng-user.mjs.map +1 -1
- package/file-upload/base-file-upload/base-file-upload.component.d.ts +24 -0
- package/file-upload/file-dropzone/file-dropzone.component.d.ts +6 -0
- package/file-upload/file-entry/file-entry.component.d.ts +35 -0
- package/file-upload/file-upload-entry.d.ts +6 -0
- package/file-upload/file-upload.translate.d.ts +34 -0
- package/file-upload/formatter.d.ts +3 -0
- package/file-upload/index.d.ts +5 -0
- package/file-upload/multi/multi-file-upload.component.d.ts +6 -0
- package/file-upload/public-api.d.ts +5 -0
- package/file-upload/single/single-file-upload.component.d.ts +13 -0
- package/file-upload/translations.d.ts +242 -0
- package/filter-pills/core/filter-pill-input-component.d.ts +1 -0
- package/filter-pills/filter-pill/filter-pill.component.d.ts +1 -0
- package/form-field/form-field.component.d.ts +5 -1
- package/formly/style/_components.scss +1 -0
- package/forms/checkbox-input/checkbox-input.component.d.ts +1 -0
- package/forms/multilanguage-input/multilanguage-input.component.d.ts +1 -0
- package/inline-message/inline-message.component.d.ts +3 -1
- package/package.json +34 -30
- package/schematics/lib/angular-component-ast.js +18 -7
- package/schematics/lu-select/migration.js +3 -3
- package/schematics/lu-select/util.js +1 -1
- package/src/components/_dropdown.scss +0 -0
- package/src/components/_input.scss +9 -11
- package/src/components/_picker.scss +1 -1
- package/src/components/_popup.scss +37 -35
- package/src/components/cdk/_dragDrop.scss +6 -0
- package/src/components/cdk/_overlay.scss +6 -12
- package/src/definitions/option/_option-item.scss +2 -3
- package/src/definitions/select/_select-input.scss +1 -0
- package/src/definitions/user/user-picture.scss +1 -0
- package/title/README.md +40 -46
- package/title/title-translate.service.d.ts +2 -1
- package/title/title.strategy.d.ts +15 -7
|
@@ -38,6 +38,41 @@
|
|
|
38
38
|
&.mod-XL {
|
|
39
39
|
inline-size: var(--components-popup-XL);
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
&.mod-commInApp {
|
|
43
|
+
inline-size: 30rem;
|
|
44
|
+
|
|
45
|
+
.lu-modal-content {
|
|
46
|
+
text-align: center;
|
|
47
|
+
|
|
48
|
+
&::after {
|
|
49
|
+
content: none;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.lu-modal-content-title {
|
|
54
|
+
color: var(--palettes-neutral-800);
|
|
55
|
+
font-size: var(--sizes-XL-fontSize);
|
|
56
|
+
margin-block-start: 2.5rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.button {
|
|
60
|
+
margin-block-end: 2.5rem;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.modal-visual {
|
|
64
|
+
margin-block: 4.5rem 0;
|
|
65
|
+
margin-inline: calc(var(--pr-t-spacings-400) * -1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.modal-visual-illustration {
|
|
69
|
+
vertical-align: bottom;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.lu-modal-footer {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
41
76
|
}
|
|
42
77
|
|
|
43
78
|
.lu-modal-panel-inner {
|
|
@@ -64,6 +99,7 @@
|
|
|
64
99
|
|
|
65
100
|
.lu-modal-header-title {
|
|
66
101
|
@include title.h2;
|
|
102
|
+
|
|
67
103
|
margin: 0;
|
|
68
104
|
padding: 0;
|
|
69
105
|
}
|
|
@@ -83,7 +119,7 @@
|
|
|
83
119
|
&.mod-noPadding {
|
|
84
120
|
padding: 0;
|
|
85
121
|
|
|
86
|
-
|
|
122
|
+
&::after {
|
|
87
123
|
padding-block-end: 0;
|
|
88
124
|
}
|
|
89
125
|
}
|
|
@@ -122,40 +158,6 @@
|
|
|
122
158
|
}
|
|
123
159
|
}
|
|
124
160
|
|
|
125
|
-
.lu-popup-panel {
|
|
126
|
-
&.mod-commInApp {
|
|
127
|
-
inline-size: 30rem;
|
|
128
|
-
|
|
129
|
-
.lu-modal-content {
|
|
130
|
-
text-align: center;
|
|
131
|
-
|
|
132
|
-
&::after {
|
|
133
|
-
content: none;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
.lu-modal-content-title {
|
|
137
|
-
color: var(--palettes-neutral-800);
|
|
138
|
-
font-size: var(--sizes-XL-fontSize);
|
|
139
|
-
margin-block-start: 2.5rem;
|
|
140
|
-
}
|
|
141
|
-
.button {
|
|
142
|
-
margin-block-end: 2.5rem;
|
|
143
|
-
}
|
|
144
|
-
.modal-visual {
|
|
145
|
-
margin-block: 4.5rem 0;
|
|
146
|
-
margin-inline: calc(var(--pr-t-spacings-400) * -1);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.modal-visual-illustration {
|
|
150
|
-
vertical-align: bottom;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.lu-modal-footer {
|
|
154
|
-
display: none;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
161
|
@keyframes popup {
|
|
160
162
|
0% {
|
|
161
163
|
transform: scale(0.7);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
.cdk-drag-placeholder {
|
|
4
4
|
box-shadow: form.fakeBorderOverlay(var(--palettes-neutral-200));
|
|
5
5
|
background-color: var(--palettes-neutral-100);
|
|
6
|
+
|
|
6
7
|
* {
|
|
7
8
|
opacity: 0;
|
|
8
9
|
}
|
|
@@ -23,20 +24,24 @@
|
|
|
23
24
|
|
|
24
25
|
.dragDrop-item {
|
|
25
26
|
cursor: grab;
|
|
27
|
+
|
|
26
28
|
&:not(.cdk-drag-placeholder) {
|
|
27
29
|
&:first-of-type {
|
|
28
30
|
border-start-start-radius: var(--commons-borderRadius-M);
|
|
29
31
|
border-start-end-radius: var(--commons-borderRadius-M);
|
|
30
32
|
}
|
|
33
|
+
|
|
31
34
|
&:last-of-type {
|
|
32
35
|
border-end-start-radius: var(--commons-borderRadius-M);
|
|
33
36
|
border-end-end-radius: var(--commons-borderRadius-M);
|
|
34
37
|
}
|
|
35
38
|
}
|
|
39
|
+
|
|
36
40
|
&:active {
|
|
37
41
|
cursor: grabbing;
|
|
38
42
|
}
|
|
39
43
|
}
|
|
44
|
+
|
|
40
45
|
.dragDrop-item-content {
|
|
41
46
|
padding: var(--pr-t-spacings-100);
|
|
42
47
|
}
|
|
@@ -54,6 +59,7 @@
|
|
|
54
59
|
.dragDrop-item {
|
|
55
60
|
cursor: grabbing;
|
|
56
61
|
}
|
|
62
|
+
|
|
57
63
|
.cdk-drag:not(.cdk-drag-placeholder) {
|
|
58
64
|
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
59
65
|
}
|
|
@@ -34,6 +34,11 @@
|
|
|
34
34
|
> * {
|
|
35
35
|
flex-grow: 1;
|
|
36
36
|
}
|
|
37
|
+
|
|
38
|
+
&.mod-optionPicker {
|
|
39
|
+
min-inline-size: 13rem;
|
|
40
|
+
max-inline-size: 30rem;
|
|
41
|
+
}
|
|
37
42
|
}
|
|
38
43
|
|
|
39
44
|
.cdk-overlay-backdrop {
|
|
@@ -51,6 +56,7 @@
|
|
|
51
56
|
&.cdk-overlay-dark-backdrop {
|
|
52
57
|
background-color: color.transparentize(var(--palettes-neutral-900), 0.6);
|
|
53
58
|
}
|
|
59
|
+
|
|
54
60
|
&.cdk-overlay-transparent-backdrop {
|
|
55
61
|
background: 0 0;
|
|
56
62
|
}
|
|
@@ -61,15 +67,3 @@
|
|
|
61
67
|
|
|
62
68
|
@include keyframe.fadeIn;
|
|
63
69
|
}
|
|
64
|
-
|
|
65
|
-
// MODS
|
|
66
|
-
// ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
|
|
67
|
-
|
|
68
|
-
.cdk-overlay-pane {
|
|
69
|
-
// Option picker
|
|
70
|
-
|
|
71
|
-
&.mod-optionPicker {
|
|
72
|
-
min-inline-size: 13rem;
|
|
73
|
-
max-inline-size: 30rem;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
&.is-selected {
|
|
37
37
|
background-color: var(--palettes-product-50);
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
&::before {
|
|
40
40
|
content: '';
|
|
41
41
|
position: absolute;
|
|
42
42
|
inset-block: 0;
|
|
@@ -161,6 +161,7 @@
|
|
|
161
161
|
|
|
162
162
|
&.is-selected {
|
|
163
163
|
--components-options-checkbox-color: var(--commons-disabled-background);
|
|
164
|
+
|
|
164
165
|
background-color: transparent;
|
|
165
166
|
|
|
166
167
|
&::after {
|
|
@@ -180,9 +181,7 @@
|
|
|
180
181
|
.optionItem-value {
|
|
181
182
|
position: relative;
|
|
182
183
|
padding-inline-start: calc(var(--components-options-checkbox-size) + var(--pr-t-spacings-100) * 2);
|
|
183
|
-
}
|
|
184
184
|
|
|
185
|
-
.optionItem-value {
|
|
186
185
|
&::before,
|
|
187
186
|
&::after {
|
|
188
187
|
inset-inline-start: var(--pr-t-spacings-100);
|
package/title/README.md
CHANGED
|
@@ -6,20 +6,20 @@ Add `title` properties in your routes config:
|
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
const routes: Routes = [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
{
|
|
10
|
+
path: '',
|
|
11
|
+
data: {
|
|
12
|
+
title: 'Parent title',
|
|
13
|
+
},
|
|
14
|
+
children: [
|
|
15
|
+
{
|
|
16
|
+
path: ':requestId',
|
|
17
|
+
data: {
|
|
18
|
+
title: 'Sub route title',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
23
|
];
|
|
24
24
|
```
|
|
25
25
|
|
|
@@ -27,26 +27,26 @@ The service should now be able to collect all `title` properties defined for the
|
|
|
27
27
|
|
|
28
28
|
ex: `Sub route title - Parent title - YourAppName - Lucca`
|
|
29
29
|
|
|
30
|
-
For dynamic titles, the `prependTitle` method from `
|
|
30
|
+
For dynamic titles, the `prependTitle` method from `LuTitleStrategy` enables you to add a custom title.
|
|
31
31
|
In a component, you could do the following:
|
|
32
32
|
|
|
33
33
|
```typescript
|
|
34
34
|
const userName: string = this.userService.getCurrentUser();
|
|
35
|
-
this.
|
|
35
|
+
this.luTitleStrategy.prependTitle(userName);
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
You can also replace the first fragment using:
|
|
39
39
|
|
|
40
40
|
```typescript
|
|
41
41
|
const userName: string = this.userService.getOtherUser();
|
|
42
|
-
this.
|
|
42
|
+
this.luTitleStrategy.overrideFirstTitlePart(userName);
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
Both `prependTitle` and `overrideFirstTitlePart` can also be called using `Observable<string>` :
|
|
46
46
|
|
|
47
47
|
```typescript
|
|
48
48
|
const selectedUser$ = this.userStore.selected$;
|
|
49
|
-
this.
|
|
49
|
+
this.luTitleStrategy.prependTitle(selectedUser$);
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
## Quickstart
|
|
@@ -55,8 +55,14 @@ You will need to:
|
|
|
55
55
|
|
|
56
56
|
- Install `@lucca-front/ng`
|
|
57
57
|
- Create a service (`YourAppNameTranslateService`) that implements the `ILuTitleTranslateService`
|
|
58
|
-
-
|
|
59
|
-
|
|
58
|
+
- Call `provideLuTitleStrategy` in your `app.module.ts` / `app.config.ts`
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
provideLuTitleStrategy({
|
|
62
|
+
appName: () => 'YourAppName',
|
|
63
|
+
translateService: () => inject(YourAppNameTranslateService),
|
|
64
|
+
}),
|
|
65
|
+
```
|
|
60
66
|
|
|
61
67
|
### Let's start by creating the service
|
|
62
68
|
|
|
@@ -69,10 +75,10 @@ You should end up with the following if you are using `ngx-translate`:
|
|
|
69
75
|
```typescript
|
|
70
76
|
@Injectable({ providedIn: 'root' })
|
|
71
77
|
export class CoreRhTranslateService implements ILuTitleTranslateService {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
constructor(private translateService: TranslateService) {}
|
|
79
|
+
translate(key: string, args: unknown): string {
|
|
80
|
+
return this.translateService.instant(key, args);
|
|
81
|
+
}
|
|
76
82
|
}
|
|
77
83
|
```
|
|
78
84
|
|
|
@@ -81,34 +87,22 @@ or if you are using `transloco`:
|
|
|
81
87
|
```typescript
|
|
82
88
|
@Injectable({ providedIn: 'root' })
|
|
83
89
|
export class CoreRhTranslateService implements ILuTitleTranslateService {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
constructor(private translateService: TranslocoService) {}
|
|
91
|
+
translate(key: string, args: HashMap): string {
|
|
92
|
+
return this.translateService.translate(key, args);
|
|
93
|
+
}
|
|
88
94
|
}
|
|
89
95
|
```
|
|
90
96
|
|
|
91
97
|
### Adapt `app.module.ts` config
|
|
92
98
|
|
|
93
|
-
|
|
99
|
+
In the `app.module.ts`, you need to call `provideLuTitleStrategy` in the `providers` array:
|
|
94
100
|
|
|
95
101
|
```typescript
|
|
96
102
|
@NgModule({
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
provide: LU_TITLE_TRANSLATE_SERVICE,
|
|
103
|
-
useExisting: YourAppNameTranslateService
|
|
104
|
-
}
|
|
105
|
-
]
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Init the `LuTitleService`
|
|
109
|
-
|
|
110
|
-
In the the `app.component.ts`, init the LuTitleService by passing the name of you app:
|
|
111
|
-
|
|
112
|
-
```typescript
|
|
113
|
-
this.luTitleService.init('**YourAppName**');
|
|
103
|
+
providers: [
|
|
104
|
+
provideLuTitleStrategy({ translateService: () => inject(YourAppNameTranslateService) }),
|
|
105
|
+
]
|
|
106
|
+
})
|
|
107
|
+
export class AppModule {}
|
|
114
108
|
```
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
export declare const LU_TITLE_TRANSLATE_SERVICE: InjectionToken<ILuTitleTranslateService>;
|
|
3
4
|
export interface ILuTitleTranslateService {
|
|
4
|
-
translate(key: string, args?: Record<string, unknown>): string
|
|
5
|
+
translate(key: string, args?: Record<string, unknown>): string | Observable<string>;
|
|
5
6
|
}
|
|
@@ -1,22 +1,30 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { Title } from '@angular/platform-browser';
|
|
1
|
+
import { InjectionToken, Provider } from '@angular/core';
|
|
3
2
|
import { RouterStateSnapshot, TitleStrategy } from '@angular/router';
|
|
4
|
-
import { ObservableInput } from 'rxjs';
|
|
3
|
+
import { Observable, ObservableInput } from 'rxjs';
|
|
5
4
|
import { ILuTitleTranslateService } from './title-translate.service';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare const APP_TITLE: InjectionToken<
|
|
6
|
+
export declare const ɵAPP_TITLE: InjectionToken<string | Observable<string>>;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use `provideLuTitleStrategy` instead.
|
|
9
|
+
*/
|
|
10
|
+
export declare const APP_TITLE: InjectionToken<string | Observable<string>>;
|
|
8
11
|
export declare class LuTitleStrategy extends TitleStrategy {
|
|
9
12
|
#private;
|
|
10
13
|
private title;
|
|
11
14
|
private translateService;
|
|
12
15
|
private appTitle;
|
|
13
16
|
private titlePartsSubject;
|
|
14
|
-
titleParts$:
|
|
15
|
-
title$:
|
|
16
|
-
constructor(
|
|
17
|
+
titleParts$: Observable<(string | ObservableInput<string>)[]>;
|
|
18
|
+
title$: Observable<string>;
|
|
19
|
+
constructor();
|
|
17
20
|
updateTitle(routerState: RouterStateSnapshot): void;
|
|
18
21
|
prependTitle(title: string | ObservableInput<string>): void;
|
|
19
22
|
overrideFirstTitlePart(title: string | ObservableInput<string>): void;
|
|
20
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<LuTitleStrategy, never>;
|
|
21
24
|
static ɵprov: i0.ɵɵInjectableDeclaration<LuTitleStrategy>;
|
|
22
25
|
}
|
|
26
|
+
export interface LuTitleStrategyOptions {
|
|
27
|
+
appTitle?: () => string | Observable<string>;
|
|
28
|
+
translateService?: () => ILuTitleTranslateService;
|
|
29
|
+
}
|
|
30
|
+
export declare function provideLuTitleStrategy(options: LuTitleStrategyOptions): Provider[];
|