@verisoft/ui-primeng 18.0.0 → 18.3.1
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/{src/assets → assets}/sass/base/_typography.scss +2 -2
- package/assets/sass/layout/_button.scss +57 -0
- package/{src/assets → assets}/sass/layout/_sidemenu.scss +1 -15
- package/package.json +5 -4
- package/src/index.ts +2 -4
- package/src/lib/components/breadcrumb/breadcrumb.component.html +2 -2
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +6 -1
- package/src/lib/components/breadcrumb/breadcrumb.pipe.ts +13 -0
- package/src/lib/components/button/button.component.html +2 -2
- package/src/lib/components/button/button.component.ts +7 -1
- package/src/lib/components/button/index.ts +0 -1
- package/src/lib/components/calendar/calendar.component.html +2 -2
- package/src/lib/components/calendar/calendar.component.ts +7 -2
- package/src/lib/components/checkbox/checkbox.component.html +1 -1
- package/src/lib/components/checkbox/checkbox.component.ts +5 -1
- package/src/lib/components/confirm-dialog/confirm-dialog.component.ts +3 -3
- package/src/lib/components/confirm-dialog/index.ts +0 -1
- package/src/lib/components/dropdown/dropdown.component.html +1 -1
- package/src/lib/components/dropdown/dropdown.component.ts +8 -3
- package/src/lib/components/errors/error.component.html +6 -0
- package/src/lib/components/errors/error.component.scss +3 -0
- package/src/lib/components/errors/error.component.ts +35 -0
- package/src/lib/components/errors/index.ts +1 -0
- package/src/lib/components/form-field/form-field.component.html +3 -8
- package/src/lib/components/form-field/form-field.component.ts +17 -13
- package/src/lib/components/header/header.component.html +2 -3
- package/src/lib/components/header/header.component.ts +3 -1
- package/src/lib/components/header/services/header-provider.service.ts +1 -1
- package/src/lib/components/input-group/input-group.component.html +1 -3
- package/src/lib/components/multiselect/multiselect.component.html +2 -1
- package/src/lib/components/multiselect/multiselect.component.ts +5 -3
- package/src/lib/components/number-input/number-input.component.html +1 -1
- package/src/lib/components/number-input/number-input.component.ts +3 -0
- package/src/lib/components/page-header/index.ts +0 -1
- package/src/lib/components/page-header/page-header.component.html +1 -1
- package/src/lib/components/page-header/page-header.component.ts +6 -34
- package/src/lib/components/password/password.component.html +1 -1
- package/src/lib/components/password/password.component.ts +3 -1
- package/src/lib/components/radiobutton/radiobutton.component.html +1 -1
- package/src/lib/components/radiobutton/radiobutton.component.ts +2 -0
- package/src/lib/components/section/section.component.html +1 -2
- package/src/lib/components/section/section.component.ts +4 -2
- package/src/lib/components/{action-button-group → shared-components/action-button-group}/action-button-group.component.html +2 -4
- package/src/lib/components/{action-button-group → shared-components/action-button-group}/action-button-group.component.ts +21 -11
- package/src/lib/components/{action-button-group → shared-components/action-button-group}/components/action-button/action-button.component.html +1 -2
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.ts +71 -0
- package/src/lib/components/shared-components/dynamic-component/dynamic-component-factory.service.ts +142 -0
- package/src/lib/components/{dynamic-component → shared-components/dynamic-component}/dynamic-component.component.ts +5 -4
- package/src/lib/components/shared-components/dynamic-component/index.ts +2 -0
- package/src/lib/components/shared-components/feature-list/directives/feature-list-column.directive.ts +32 -0
- package/src/lib/components/shared-components/feature-list/directives/feature-list-filter-field.directive.ts +8 -0
- package/src/lib/components/shared-components/feature-list/feature-list-filter.pipe.ts +21 -0
- package/src/lib/components/shared-components/feature-list/feature-list-page.component.ts +31 -0
- package/src/lib/components/shared-components/feature-list/feature-list-page.model.ts +42 -0
- package/src/lib/components/shared-components/feature-list/feature-list.component.html +59 -0
- package/src/lib/components/shared-components/feature-list/feature-list.component.scss +10 -0
- package/src/lib/components/shared-components/feature-list/feature-list.component.ts +342 -0
- package/src/lib/components/shared-components/feature-list/index.ts +5 -0
- package/src/lib/components/shared-components/filter/directives/filter-field.directive.ts +35 -0
- package/src/lib/components/{filter → shared-components/filter}/filter.component.html +8 -7
- package/src/lib/components/{filter → shared-components/filter}/filter.component.ts +53 -26
- package/src/lib/components/shared-components/filter/filter.model.ts +18 -0
- package/src/lib/components/{filter → shared-components/filter}/index.ts +0 -1
- package/src/lib/components/shared-components/generic-field/generic-field.component.html +97 -0
- package/src/lib/components/{generic-field → shared-components/generic-field}/generic-field.component.ts +28 -10
- package/src/lib/components/{generic-field → shared-components/generic-field}/index.ts +0 -1
- package/src/lib/components/shared-components/generic-form/generic-form.component.html +46 -0
- package/src/lib/components/{generic-form → shared-components/generic-form}/generic-form.component.ts +11 -2
- package/src/lib/components/{generic-form → shared-components/generic-form}/generic-form.model.ts +11 -19
- package/src/lib/components/shared-components/index.ts +6 -0
- package/src/lib/components/side-menu/side-menu.component.html +7 -10
- package/src/lib/components/side-menu/side-menu.component.ts +7 -6
- package/src/lib/components/slider/slider.component.html +2 -2
- package/src/lib/components/slider/slider.component.ts +2 -0
- package/src/lib/components/stepper/stepper.component.html +2 -2
- package/src/lib/components/stepper/stepper.component.ts +16 -1
- package/src/lib/components/switch/switch.component.html +1 -2
- package/src/lib/components/switch/switch.component.ts +2 -0
- package/src/lib/components/tab-view/tab-menu.pipe.ts +22 -0
- package/src/lib/components/tab-view/tab-view-item.component.ts +2 -0
- package/src/lib/components/tab-view/tab-view.component.html +2 -3
- package/src/lib/components/tab-view/tab-view.component.ts +4 -4
- package/src/lib/components/tab-view/tab-view.module.ts +2 -1
- package/src/lib/components/table/index.ts +0 -1
- package/src/lib/components/table/table-filter.pipe.ts +59 -0
- package/src/lib/components/table/table.component.html +120 -180
- package/src/lib/components/table/table.component.scss +11 -0
- package/src/lib/components/table/table.component.ts +131 -98
- package/src/lib/components/table/table.models.ts +26 -0
- package/src/lib/components/textarea/textarea.component.html +1 -1
- package/src/lib/components/textarea/textarea.component.ts +2 -0
- package/src/lib/components/textfield/textfield.component.html +1 -1
- package/src/lib/components/textfield/textfield.component.ts +6 -1
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.html +2 -2
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.ts +4 -0
- package/src/lib/icons.ts +36 -0
- package/src/lib/pages/not-found-page/not-found-page.component.html +1 -2
- package/src/assets/sass/layout/_button.scss +0 -57
- package/src/lib/components/action-button-group/components/action-button/action-button.component.ts +0 -36
- package/src/lib/components/button/directives/shortcut.directive.ts +0 -37
- package/src/lib/components/confirm-dialog/services/confirm-dialog.service.ts +0 -14
- package/src/lib/components/dynamic-component/dynamic-component-factory.service.ts +0 -90
- package/src/lib/components/filter/directives/filter-field.directive.ts +0 -25
- package/src/lib/components/filter/directives/table-filter.directive.ts +0 -22
- package/src/lib/components/filter/filter.model.ts +0 -18
- package/src/lib/components/generic-field/generic-field.component.html +0 -54
- package/src/lib/components/generic-field/generic-field.model.ts +0 -9
- package/src/lib/components/generic-form/generic-form.component.html +0 -33
- package/src/lib/components/page-header/services/page-header.service.ts +0 -9
- package/src/lib/components/table/directives/table-store.directive.ts +0 -61
- package/src/lib/components/table-filter/filter.component.html +0 -205
- package/src/lib/components/table-filter/filter.component.scss +0 -0
- package/src/lib/components/table-filter/filter.component.spec.ts +0 -21
- package/src/lib/components/table-filter/filter.component.stories.ts +0 -23
- package/src/lib/services/screen-size.service.ts +0 -25
- /package/{src/assets → assets}/.gitkeep +0 -0
- /package/{src/assets → assets}/fonts/orbitron-black.ttf +0 -0
- /package/{src/assets → assets}/fonts/orbitron-bold.otf +0 -0
- /package/{src/assets → assets}/icons/complex/v-logo.svg +0 -0
- /package/{src/assets → assets}/images/_global/elon.jpg +0 -0
- /package/{src/assets → assets}/images/_global/jara.png +0 -0
- /package/{src/assets → assets}/images/_global/logos/v-logo.webp +0 -0
- /package/{src/assets → assets}/sass/base/_scrollbar.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_app.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_checkbox.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_dialog.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_dropdown.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_formField.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_header.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_icons.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_inputSwitch.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_layout.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_loader.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_radiobutton.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_snackbar.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_tables.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_tree.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_tristatecheckbox.scss +0 -0
- /package/{src/assets → assets}/sass/main.scss +0 -0
- /package/{src/assets → assets}/sass/themes/_verisoft_theme.scss +0 -0
- /package/{src/assets → assets}/sass/utils/_mixins.scss +0 -0
- /package/{src/assets → assets}/sass/utils/_utils.scss +0 -0
- /package/{src/assets → assets}/sass/utils/_variables.scss +0 -0
- /package/{src/assets → assets}/sass/vendors/_bootstrap.scss +0 -0
- /package/{src/assets → assets}/sass/vendors/_primeng.scss +0 -0
- /package/src/lib/components/{action-button-group → shared-components/action-button-group}/action-button-group.component.scss +0 -0
- /package/src/lib/components/{action-button-group → shared-components/action-button-group}/action-button-group.component.spec.ts +0 -0
- /package/src/lib/components/{action-button-group → shared-components/action-button-group}/components/action-button/action-button.component.scss +0 -0
- /package/src/lib/components/{action-button-group → shared-components/action-button-group}/components/action-button/action-button.component.spec.ts +0 -0
- /package/src/lib/components/{action-button-group → shared-components/action-button-group}/index.ts +0 -0
- /package/src/lib/components/{filter → shared-components/filter}/filter.component.scss +0 -0
- /package/src/lib/components/{filter → shared-components/filter}/filter.component.spec.ts +0 -0
- /package/src/lib/components/{filter → shared-components/filter}/filter.component.stories.ts +0 -0
- /package/src/lib/components/{generic-field → shared-components/generic-field}/generic-field.component.spec.ts +0 -0
- /package/src/lib/components/{generic-form → shared-components/generic-form}/generic-form.component.spec.ts +0 -0
- /package/src/lib/components/{generic-form → shared-components/generic-form}/generic-form.model.spec.ts +0 -0
- /package/src/lib/components/{generic-form → shared-components/generic-form}/index.ts +0 -0
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
@font-face {
|
|
6
6
|
font-family: 'Orbitron';
|
|
7
|
-
src: url('
|
|
7
|
+
src: url('../../fonts/orbitron-bold.otf') format('opentype');
|
|
8
8
|
font-weight: normal;
|
|
9
9
|
font-style: normal;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
@font-face {
|
|
13
13
|
font-family: 'Orbitron';
|
|
14
|
-
src: url('
|
|
14
|
+
src: url('../../fonts/orbitron-black.ttf') format('truetype');
|
|
15
15
|
font-weight: bold;
|
|
16
16
|
font-style: normal;
|
|
17
17
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.p-button:not(.p-button-outlined) {
|
|
2
|
+
color: var(--white-color);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.p-button.p-button-danger:not(.p-button-outlined),
|
|
6
|
+
.p-button-group.p-button-danger > .p-button,
|
|
7
|
+
.p-splitbutton.p-button-danger > .p-button {
|
|
8
|
+
border-color: var(--error-color);
|
|
9
|
+
background-color: var(--error-color);
|
|
10
|
+
|
|
11
|
+
&:hover {
|
|
12
|
+
border-color: #e60017;
|
|
13
|
+
background-color: #e60017;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.p-button.p-button-success:not(.p-button-outlined),
|
|
18
|
+
.p-button-group.p-button-success > .p-button,
|
|
19
|
+
.p-splitbutton.p-button-success > .p-button {
|
|
20
|
+
border-color: var(--success-color);
|
|
21
|
+
background-color: var(--success-color);
|
|
22
|
+
color: var(--white-color);
|
|
23
|
+
|
|
24
|
+
&:hover {
|
|
25
|
+
border-color: #439446;
|
|
26
|
+
background-color: #439446;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.p-button-icon-only.p-button-danger:not(.p-button-outlined) {
|
|
31
|
+
border-color: var(--error-color);
|
|
32
|
+
background-color: var(--error-color);
|
|
33
|
+
|
|
34
|
+
.pi {
|
|
35
|
+
color: var(--white-color) !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:hover {
|
|
39
|
+
border-color: #e60017;
|
|
40
|
+
background-color: #e60017;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.p-button-icon-only.p-button-success:not(.p-button-outlined) {
|
|
45
|
+
border-color: var(--success-color);
|
|
46
|
+
background-color: var(--success-color);
|
|
47
|
+
|
|
48
|
+
&:hover {
|
|
49
|
+
border-color: #57b44c;
|
|
50
|
+
background-color: #57b44c !important;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.p-button-icon-only.p-button-secondary:not(.p-button-outlined) {
|
|
55
|
+
border-color: var(--secondary-color);
|
|
56
|
+
background-color: var(--secondary-color);
|
|
57
|
+
}
|
|
@@ -163,25 +163,11 @@
|
|
|
163
163
|
padding: 2rem 0 0 0;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
.p-treenode .p-treenode-label
|
|
167
|
-
.support-button .p-button-label {
|
|
166
|
+
.p-treenode .p-treenode-label {
|
|
168
167
|
display: none;
|
|
169
168
|
}
|
|
170
169
|
.close-button {
|
|
171
170
|
transform:rotate(180deg);
|
|
172
171
|
}
|
|
173
172
|
}
|
|
174
|
-
|
|
175
|
-
.support-button {
|
|
176
|
-
& :hover {
|
|
177
|
-
border-color: var(--primary-color-semitransparent);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
button {
|
|
181
|
-
border-radius: 0.2rem;
|
|
182
|
-
border-color: transparent;
|
|
183
|
-
background-color: transparent;
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
173
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verisoft/ui-primeng",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.3.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^18.2.8",
|
|
6
6
|
"@angular/core": "^18.2.8",
|
|
@@ -8,13 +8,14 @@
|
|
|
8
8
|
"rxjs": "~7.8.0",
|
|
9
9
|
"@angular/forms": "18.2.8",
|
|
10
10
|
"@angular/router": "18.2.8",
|
|
11
|
-
"@verisoft/store": "18.0.0",
|
|
12
11
|
"@storybook/angular": "^8.3.5",
|
|
13
12
|
"@storybook/test": "^8.3.5",
|
|
14
13
|
"@angular/platform-browser": "18.2.8",
|
|
15
|
-
"@verisoft/core": "18.
|
|
14
|
+
"@verisoft/core": "18.3.1",
|
|
16
15
|
"@faker-js/faker": "^8.4.1",
|
|
17
|
-
"@verisoft/ui-core": "
|
|
16
|
+
"@verisoft/ui-core": "18.3.1",
|
|
17
|
+
"uuid": "^10.0.0",
|
|
18
|
+
"@ngx-translate/core": "^15.0.0"
|
|
18
19
|
},
|
|
19
20
|
"dependencies": {},
|
|
20
21
|
"sideEffects": false
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './lib/components/action-button-group';
|
|
2
1
|
export * from './lib/components/input-group';
|
|
3
2
|
export * from './lib/components/textfield';
|
|
4
3
|
export * from './lib/components/breadcrumb';
|
|
@@ -25,7 +24,6 @@ export * from './lib/components/slider';
|
|
|
25
24
|
export * from './lib/components/confirm-dialog';
|
|
26
25
|
export * from './lib/components/switch';
|
|
27
26
|
export * from './lib/interceptors/http-error-message.interceptor';
|
|
28
|
-
export * from './lib/components/action-button-group';
|
|
29
|
-
export * from './lib/components/filter';
|
|
30
27
|
export * from './lib/components/tab-view';
|
|
31
|
-
export * from './lib/components/
|
|
28
|
+
export * from './lib/components/shared-components';
|
|
29
|
+
export * from './lib/icons';
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<ng-container *ngIf="useHomeRoute; else default">
|
|
3
3
|
<p-breadcrumb
|
|
4
4
|
class="max-w-full"
|
|
5
|
-
[model]="items"
|
|
5
|
+
[model]="items | menuItem"
|
|
6
6
|
[home]="home"
|
|
7
7
|
></p-breadcrumb>
|
|
8
8
|
</ng-container>
|
|
9
9
|
<ng-template #default>
|
|
10
|
-
<p-breadcrumb class="max-w-full" [model]="items"></p-breadcrumb>
|
|
10
|
+
<p-breadcrumb class="max-w-full" [model]="items | menuItem"></p-breadcrumb>
|
|
11
11
|
</ng-template>
|
|
12
12
|
</div>
|
|
@@ -7,11 +7,16 @@ import {
|
|
|
7
7
|
BreadcrumbCoreComponent,
|
|
8
8
|
} from '@verisoft/ui-core';
|
|
9
9
|
import { BreadcrumbModule } from 'primeng/breadcrumb';
|
|
10
|
+
import { ConvertMenuItemPipe } from './breadcrumb.pipe';
|
|
10
11
|
|
|
11
12
|
@Component({
|
|
12
13
|
selector: 'v-breadcrumb',
|
|
13
14
|
standalone: true,
|
|
14
|
-
imports: [
|
|
15
|
+
imports: [
|
|
16
|
+
CommonModule,
|
|
17
|
+
BreadcrumbModule,
|
|
18
|
+
ConvertMenuItemPipe,
|
|
19
|
+
],
|
|
15
20
|
templateUrl: './breadcrumb.component.html',
|
|
16
21
|
styleUrl: './breadcrumb.component.scss',
|
|
17
22
|
providers: [
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from "@angular/core";
|
|
2
|
+
import { MenuItem as VerisoftMenuItem } from "@verisoft/ui-core";
|
|
3
|
+
import { MenuItem as PrimeMenuItem } from "primeng/api";
|
|
4
|
+
|
|
5
|
+
@Pipe({
|
|
6
|
+
name: 'menuItem',
|
|
7
|
+
standalone: true,
|
|
8
|
+
})
|
|
9
|
+
export class ConvertMenuItemPipe implements PipeTransform {
|
|
10
|
+
transform(items: VerisoftMenuItem[]): PrimeMenuItem[] {
|
|
11
|
+
return items.map(i => i as PrimeMenuItem);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<div class="v-button
|
|
1
|
+
<div class="v-button d-inline-block"
|
|
2
|
+
(click)="fireClick($event)">
|
|
2
3
|
<a
|
|
3
4
|
[routerLink]="routerLink ? routerLink : undefined"
|
|
4
5
|
[queryParams]="queryParams ? queryParams : undefined"
|
|
@@ -11,7 +12,6 @@
|
|
|
11
12
|
[rounded]="rounded"
|
|
12
13
|
[raised]="raised"
|
|
13
14
|
[label]="label"
|
|
14
|
-
[text]="text"
|
|
15
15
|
[size]="$any(size)"
|
|
16
16
|
[severity]="severity"
|
|
17
17
|
[iconPos]="iconPos"
|
|
@@ -33,11 +33,17 @@ export class ButtonComponent implements ButtonCore {
|
|
|
33
33
|
@Input() iconPos: IconPositionType = IconPosition.right;
|
|
34
34
|
@Input() disabled!: boolean;
|
|
35
35
|
@Input() rounded!: boolean;
|
|
36
|
-
@Input() text!: boolean;
|
|
37
36
|
@Input() outlined!: boolean;
|
|
38
37
|
@Input() raised!: boolean;
|
|
39
38
|
@Input() severity?: ControlSeverityType;
|
|
40
39
|
@Input() routerLink!: any[];
|
|
41
40
|
@Input() size: FieldSizeType | undefined;
|
|
42
41
|
@Input() queryParams?: Params;
|
|
42
|
+
|
|
43
|
+
fireClick(event: Event): void {
|
|
44
|
+
if (this.disabled) {
|
|
45
|
+
event.stopPropagation();
|
|
46
|
+
event.stopImmediatePropagation();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
43
49
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
<v-form-field
|
|
4
4
|
class="w-100"
|
|
5
5
|
[label]="label"
|
|
6
|
-
[ngControl]="ngControl"
|
|
7
6
|
[tooltip]="tooltip"
|
|
8
7
|
[required]="isRequired()"
|
|
9
8
|
[display]="formDisplay"
|
|
@@ -27,6 +26,7 @@
|
|
|
27
26
|
iconDisplay="input"
|
|
28
27
|
/>
|
|
29
28
|
</v-form-field>
|
|
29
|
+
<v-validation-message [ngControl]="ngControl"></v-validation-message>
|
|
30
30
|
</ng-container>
|
|
31
31
|
<ng-container *ngIf="floatLabel">
|
|
32
32
|
<p-floatLabel>
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
[placeholder]="placeholder"
|
|
45
45
|
[required]="isRequired()"
|
|
46
46
|
[minDate]="minDate"
|
|
47
|
-
[showIcon]="formControl && !formControl.value"
|
|
48
47
|
iconDisplay="input"
|
|
49
48
|
/>
|
|
50
49
|
<label [for]="inputId" [innerHTML]="floatLabel"></label>
|
|
51
50
|
</p-floatLabel>
|
|
52
51
|
</ng-container>
|
|
53
52
|
</div>
|
|
53
|
+
|
|
@@ -20,6 +20,8 @@ import {
|
|
|
20
20
|
} from '@verisoft/ui-core';
|
|
21
21
|
import { CalendarModule } from 'primeng/calendar';
|
|
22
22
|
import { FloatLabelModule } from 'primeng/floatlabel';
|
|
23
|
+
import { Icons } from '../../icons';
|
|
24
|
+
import { ErrorComponent } from '../errors';
|
|
23
25
|
import { FormFieldComponent } from '../form-field';
|
|
24
26
|
|
|
25
27
|
@Component({
|
|
@@ -31,6 +33,7 @@ import { FormFieldComponent } from '../form-field';
|
|
|
31
33
|
CalendarModule,
|
|
32
34
|
FormFieldComponent,
|
|
33
35
|
FloatLabelModule,
|
|
36
|
+
ErrorComponent,
|
|
34
37
|
],
|
|
35
38
|
templateUrl: './calendar.component.html',
|
|
36
39
|
styleUrl: './calendar.component.scss',
|
|
@@ -55,13 +58,15 @@ export class CalendarComponent
|
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
@Input() maxDate!: Date;
|
|
58
|
-
@Input() icon =
|
|
61
|
+
@Input() icon = Icons.calendar;
|
|
59
62
|
@Input() minDate!: Date;
|
|
60
63
|
@Input() header!: string;
|
|
61
64
|
@Input() footer!: string;
|
|
62
|
-
@Input() floatLabel
|
|
65
|
+
@Input() floatLabel: string | undefined;
|
|
63
66
|
@Input() selectionMode: 'single' | 'multiple' | 'range' | undefined =
|
|
64
67
|
'single';
|
|
65
68
|
|
|
69
|
+
icons = Icons;
|
|
70
|
+
|
|
66
71
|
override formDisplay: "flex" | "block" = "block";
|
|
67
72
|
}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
[label]="label"
|
|
5
5
|
[tooltip]="tooltip"
|
|
6
6
|
[required]="isRequired()"
|
|
7
|
-
[ngControl]="ngControl"
|
|
8
7
|
[testId]="testId"
|
|
9
8
|
[display]="formDisplay"
|
|
10
9
|
>
|
|
@@ -15,5 +14,6 @@
|
|
|
15
14
|
[binary]="true"
|
|
16
15
|
[readonly]="readonly"
|
|
17
16
|
/>
|
|
17
|
+
<v-validation-message [ngControl]="ngControl"></v-validation-message>
|
|
18
18
|
</v-form-field>
|
|
19
19
|
</div>
|
|
@@ -12,11 +12,13 @@ import {
|
|
|
12
12
|
} from '@angular/forms';
|
|
13
13
|
import { BaseFormInputComponent, BaseInputControls, CHECKBOX_COMPONENT_TOKEN, CheckboxCore } from '@verisoft/ui-core';
|
|
14
14
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
15
|
+
import { Icons } from '../../icons';
|
|
16
|
+
import { ErrorComponent } from '../errors';
|
|
15
17
|
import { FormFieldComponent } from '../form-field';
|
|
16
18
|
@Component({
|
|
17
19
|
selector: 'v-checkbox',
|
|
18
20
|
standalone: true,
|
|
19
|
-
imports: [CommonModule, CheckboxModule, ReactiveFormsModule, FormFieldComponent],
|
|
21
|
+
imports: [CommonModule, CheckboxModule, ReactiveFormsModule, FormFieldComponent, ErrorComponent],
|
|
20
22
|
templateUrl: './checkbox.component.html',
|
|
21
23
|
styleUrl: './checkbox.component.scss',
|
|
22
24
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -35,6 +37,8 @@ export class CheckboxComponent
|
|
|
35
37
|
extends BaseFormInputComponent
|
|
36
38
|
implements ControlValueAccessor, CheckboxCore
|
|
37
39
|
{
|
|
40
|
+
|
|
41
|
+
icon = Icons
|
|
38
42
|
constructor(@Optional() @Self() ngControl: NgControl) {
|
|
39
43
|
super(ngControl);
|
|
40
44
|
}
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
CONFIRM_DIALOG_COMPONENT_TOKEN,
|
|
5
5
|
ConfirmDialogCore,
|
|
6
6
|
DialogData,
|
|
7
|
+
DialogService,
|
|
7
8
|
UnsubscribeComponent,
|
|
8
9
|
} from '@verisoft/ui-core';
|
|
9
10
|
import { AvatarModule } from 'primeng/avatar';
|
|
10
11
|
import { DialogModule } from 'primeng/dialog';
|
|
11
12
|
import { takeUntil } from 'rxjs';
|
|
12
13
|
import { ButtonComponent } from '../button';
|
|
13
|
-
import { DynamicComponent } from '../
|
|
14
|
-
import { DialogService } from './services/confirm-dialog.service';
|
|
14
|
+
import { DynamicComponent } from '../shared-components';
|
|
15
15
|
|
|
16
16
|
@Component({
|
|
17
17
|
selector: 'v-confirm-dialog',
|
|
@@ -50,7 +50,7 @@ export class ConfirmDialogComponent
|
|
|
50
50
|
ngOnInit(): void {
|
|
51
51
|
this.dialogService.showEvent
|
|
52
52
|
.pipe(takeUntil(this.destroyed$))
|
|
53
|
-
.subscribe((x) => {
|
|
53
|
+
.subscribe((x: DialogData) => {
|
|
54
54
|
this.data = x;
|
|
55
55
|
this.visible = true;
|
|
56
56
|
this.cdr.detectChanges();
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
[label]="label"
|
|
5
5
|
[tooltip]="tooltip"
|
|
6
6
|
[required]="isRequired()"
|
|
7
|
-
[ngControl]="ngControl"
|
|
8
7
|
[testId]="testId"
|
|
9
8
|
[display]="formDisplay"
|
|
10
9
|
>
|
|
@@ -34,6 +33,7 @@
|
|
|
34
33
|
>
|
|
35
34
|
</p-dropdown>
|
|
36
35
|
</v-form-field>
|
|
36
|
+
<v-validation-message [ngControl]="ngControl"></v-validation-message>
|
|
37
37
|
</ng-container>
|
|
38
38
|
<ng-container *ngIf="!label && !floatLabel">
|
|
39
39
|
<p-dropdown
|
|
@@ -36,6 +36,7 @@ import { MessageModule } from 'primeng/message';
|
|
|
36
36
|
import { ScrollerLazyLoadEvent } from 'primeng/scroller';
|
|
37
37
|
import { TooltipModule } from 'primeng/tooltip';
|
|
38
38
|
import { Subject } from 'rxjs';
|
|
39
|
+
import { ErrorComponent } from '../errors';
|
|
39
40
|
import { FormFieldComponent } from '../form-field';
|
|
40
41
|
|
|
41
42
|
@Component({
|
|
@@ -49,6 +50,7 @@ import { FormFieldComponent } from '../form-field';
|
|
|
49
50
|
FormFieldComponent,
|
|
50
51
|
MessageModule,
|
|
51
52
|
FloatLabelModule,
|
|
53
|
+
ErrorComponent
|
|
52
54
|
],
|
|
53
55
|
templateUrl: './dropdown.component.html',
|
|
54
56
|
styleUrls: ['./dropdown.component.scss'],
|
|
@@ -79,15 +81,18 @@ export class DropdownComponent<T>
|
|
|
79
81
|
super(ngControl);
|
|
80
82
|
}
|
|
81
83
|
|
|
82
|
-
@Input() options
|
|
83
|
-
@Input() optionLabel
|
|
84
|
-
@Input() optionValue
|
|
84
|
+
@Input() options: T[] | undefined = [];
|
|
85
|
+
@Input() optionLabel: string | undefined;
|
|
86
|
+
@Input() optionValue: string | undefined;
|
|
85
87
|
@Input() dropdownIcon?: string;
|
|
86
88
|
@Input() floatLabel?: string;
|
|
87
89
|
@Input() editable = false;
|
|
88
90
|
@Input() loading = false;
|
|
89
91
|
@Input() lazy = false;
|
|
90
92
|
@Input() filter = true;
|
|
93
|
+
@Input() forceMinWidth = false;
|
|
94
|
+
@Input() showFilter = false;
|
|
95
|
+
@Input() localSearch = false;
|
|
91
96
|
|
|
92
97
|
@Output() showed = new EventEmitter<any>();
|
|
93
98
|
@Output() cleared = new EventEmitter<any>();
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CommonModule } from "@angular/common";
|
|
2
|
+
import { Component, inject, Input, } from "@angular/core";
|
|
3
|
+
import { NgControl, ValidationErrors } from "@angular/forms";
|
|
4
|
+
import { ERROR_PROVIDER_TOKEN } from "@verisoft/core";
|
|
5
|
+
import { SlotPosition, SlotPositionType } from "@verisoft/ui-core";
|
|
6
|
+
import { MessageModule } from "primeng/message";
|
|
7
|
+
import { Observable } from "rxjs";
|
|
8
|
+
import { Icons } from "../../icons";
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: "v-validation-message",
|
|
12
|
+
templateUrl: "./error.component.html",
|
|
13
|
+
styleUrl: "./error.component.scss",
|
|
14
|
+
standalone: true,
|
|
15
|
+
imports: [CommonModule, MessageModule],
|
|
16
|
+
})
|
|
17
|
+
export class ErrorComponent {
|
|
18
|
+
@Input({ required: true }) ngControl?: NgControl;
|
|
19
|
+
|
|
20
|
+
@Input() errorSlot: SlotPositionType = SlotPosition.bottom
|
|
21
|
+
|
|
22
|
+
@Input() messageSlot: SlotPositionType = SlotPosition.bottom
|
|
23
|
+
|
|
24
|
+
@Input() variant = 'simple';
|
|
25
|
+
|
|
26
|
+
@Input() severity = 'error';
|
|
27
|
+
|
|
28
|
+
readonly errorService = inject(ERROR_PROVIDER_TOKEN);
|
|
29
|
+
|
|
30
|
+
icons = Icons
|
|
31
|
+
|
|
32
|
+
getErrorMessage(errors: ValidationErrors): Observable<string> {
|
|
33
|
+
return this.errorService.mapError(errors);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './error.component';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
class="v-formfield-label d-flex align-items-center"
|
|
6
6
|
[ngClass]="{
|
|
7
7
|
'pb-2': display === 'block',
|
|
8
|
-
'text-error': (ngControl?.errors
|
|
8
|
+
'text-error': (errorProvider.mapError(ngControl?.errors ?? [])) && ngControl?.dirty,
|
|
9
9
|
'text-warning': (ngControl?.errors | warning) && ngControl?.dirty,
|
|
10
10
|
'text-default': !ngControl?.invalid && !ngControl?.dirty,
|
|
11
11
|
'text-secondary': !ngControl?.invalid && ngControl?.dirty
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</label>
|
|
16
16
|
<i *ngIf="tooltip"
|
|
17
17
|
[pTooltip]="tooltip"
|
|
18
|
-
class="ps-2 text-default v-tooltip
|
|
18
|
+
class="ps-2 text-default v-tooltip {{ icons.infoCircle }}"
|
|
19
19
|
></i>
|
|
20
20
|
</div>
|
|
21
21
|
<div
|
|
@@ -29,12 +29,7 @@
|
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
31
31
|
<div class="align-content-center">
|
|
32
|
-
<ng-container
|
|
33
|
-
<i
|
|
34
|
-
[pTooltip]="(ngControl?.errors | error) || (ngControl?.errors | warning)"
|
|
35
|
-
[ngClass]="{ 'text-error': ngControl?.errors | error, 'text-warning': ngControl?.errors | warning }"
|
|
36
|
-
class="pi pi-times-circle"
|
|
37
|
-
></i>
|
|
32
|
+
<ng-container>
|
|
38
33
|
</ng-container>
|
|
39
34
|
</div>
|
|
40
35
|
</div>
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { Component, inject, Input, Optional, Self } from '@angular/core';
|
|
3
3
|
import { NgControl, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
-
import {
|
|
4
|
+
import { ERROR_PROVIDER_TOKEN } from '@verisoft/core';
|
|
5
|
+
import { BaseFormInputComponent, FormFieldCore, WarningPipe } from '@verisoft/ui-core';
|
|
5
6
|
import { MessageModule } from 'primeng/message';
|
|
6
7
|
import { TooltipModule } from 'primeng/tooltip';
|
|
8
|
+
import { Icons } from '../../icons';
|
|
7
9
|
|
|
8
10
|
@Component({
|
|
9
11
|
selector: 'v-form-field',
|
|
10
12
|
standalone: true,
|
|
11
13
|
imports: [
|
|
12
14
|
CommonModule,
|
|
13
|
-
ErrorPipe,
|
|
14
15
|
WarningPipe,
|
|
15
16
|
ReactiveFormsModule,
|
|
16
17
|
MessageModule,
|
|
@@ -19,16 +20,19 @@ import { TooltipModule } from 'primeng/tooltip';
|
|
|
19
20
|
templateUrl: './form-field.component.html',
|
|
20
21
|
styleUrl: './form-field.component.scss',
|
|
21
22
|
})
|
|
22
|
-
export class FormFieldComponent
|
|
23
|
-
|
|
23
|
+
export class FormFieldComponent
|
|
24
|
+
extends BaseFormInputComponent
|
|
25
|
+
implements FormFieldCore
|
|
26
|
+
{
|
|
27
|
+
@Input() display: 'flex' | 'block' = 'block';
|
|
28
|
+
|
|
29
|
+
@Input() variant!: 'simple';
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
protected readonly errorProvider = inject(ERROR_PROVIDER_TOKEN)
|
|
32
|
+
|
|
33
|
+
icons = Icons;
|
|
26
34
|
|
|
27
|
-
@
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@Input() testId?: string;
|
|
32
|
-
|
|
33
|
-
@Input() display: 'flex' | 'block' = 'flex';
|
|
35
|
+
constructor(@Optional() @Self() ngControl: NgControl) {
|
|
36
|
+
super(ngControl);
|
|
37
|
+
}
|
|
34
38
|
}
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
<ng-container *ngIf="screenSizeService.isMobileBlock | async">
|
|
6
6
|
<div class="burger-menu">
|
|
7
7
|
<v-button
|
|
8
|
-
|
|
9
|
-
[icon]="menuVisible ? 'pi pi-times' : 'pi pi-bars'"
|
|
8
|
+
[icon]="menuVisible ? icons.cross : icons.action"
|
|
10
9
|
(click)="toggleMenu()"
|
|
11
10
|
/>
|
|
12
11
|
<div class="logo mt-3" [routerLink]="[logoRouterLink]">
|
|
@@ -29,7 +28,7 @@
|
|
|
29
28
|
<div class="col-auto d-flex align-items-center justify-content-end p-4">
|
|
30
29
|
<div class="d-flex aling-items-center">
|
|
31
30
|
<p-avatar
|
|
32
|
-
image="assets/images/_global/jara.png"
|
|
31
|
+
image="assets/primeng/images/_global/jara.png"
|
|
33
32
|
styleClass="me-2"
|
|
34
33
|
size="large"
|
|
35
34
|
shape="circle"
|
|
@@ -10,10 +10,11 @@ import { RouterModule } from '@angular/router';
|
|
|
10
10
|
import {
|
|
11
11
|
HEADER_COMPONENT_TOKEN,
|
|
12
12
|
HeaderCore,
|
|
13
|
+
ScreenSizeService,
|
|
13
14
|
UnsubscribeComponent,
|
|
14
15
|
} from '@verisoft/ui-core';
|
|
15
16
|
import { AvatarModule } from 'primeng/avatar';
|
|
16
|
-
import {
|
|
17
|
+
import { Icons } from '../../icons';
|
|
17
18
|
import { ButtonComponent } from '../button';
|
|
18
19
|
import { HeaderProviderService } from './services/header-provider.service';
|
|
19
20
|
|
|
@@ -47,6 +48,7 @@ export class HeaderComponent
|
|
|
47
48
|
@Input() menuRef!: HTMLDivElement;
|
|
48
49
|
@Input() exampleHeader = false;
|
|
49
50
|
|
|
51
|
+
icons = Icons;
|
|
50
52
|
protected menuVisible = false;
|
|
51
53
|
protected logoRouterLink!: string;
|
|
52
54
|
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
[label]="label"
|
|
6
6
|
[tooltip]="tooltip"
|
|
7
7
|
[required]="isRequired()"
|
|
8
|
-
[ngControl]="ngControl"
|
|
9
8
|
[testId]="testId"
|
|
10
9
|
[display]="formDisplay"
|
|
11
10
|
>
|
|
@@ -35,6 +34,7 @@
|
|
|
35
34
|
(lazyLoadEvent)="onLazyLoad($any($event))"
|
|
36
35
|
></p-multiSelect>
|
|
37
36
|
</v-form-field>
|
|
37
|
+
<v-validation-message [ngControl]="ngControl"></v-validation-message>
|
|
38
38
|
</ng-container>
|
|
39
39
|
<ng-container *ngIf="floatLabel">
|
|
40
40
|
<p-floatLabel>
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
(changeEvent)="selectionChange($event)"
|
|
64
64
|
(lazyLoadEvent)="onLazyLoad($any($event))"
|
|
65
65
|
></p-multiSelect>
|
|
66
|
+
|
|
66
67
|
<label [for]="inputId">{{ floatLabel }}</label>
|
|
67
68
|
</p-floatLabel>
|
|
68
69
|
</ng-container>
|