@verisoft/ui-primeng 18.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.
- package/.eslintrc.json +43 -0
- package/README.md +7 -0
- package/jest.config.ts +22 -0
- package/ng-package.json +7 -0
- package/package.json +21 -0
- package/project.json +36 -0
- package/src/assets/.gitkeep +0 -0
- package/src/assets/fonts/orbitron-black.ttf +0 -0
- package/src/assets/fonts/orbitron-bold.otf +0 -0
- package/src/assets/icons/complex/v-logo.svg +4 -0
- package/src/assets/images/_global/elon.jpg +0 -0
- package/src/assets/images/_global/jara.png +0 -0
- package/src/assets/images/_global/logos/v-logo.webp +0 -0
- package/src/assets/sass/base/_scrollbar.scss +18 -0
- package/src/assets/sass/base/_typography.scss +25 -0
- package/src/assets/sass/layout/_app.scss +27 -0
- package/src/assets/sass/layout/_button.scss +57 -0
- package/src/assets/sass/layout/_checkbox.scss +33 -0
- package/src/assets/sass/layout/_dialog.scss +13 -0
- package/src/assets/sass/layout/_dropdown.scss +9 -0
- package/src/assets/sass/layout/_formField.scss +5 -0
- package/src/assets/sass/layout/_header.scss +63 -0
- package/src/assets/sass/layout/_icons.scss +13 -0
- package/src/assets/sass/layout/_inputSwitch.scss +13 -0
- package/src/assets/sass/layout/_layout.scss +6 -0
- package/src/assets/sass/layout/_loader.scss +9 -0
- package/src/assets/sass/layout/_radiobutton.scss +21 -0
- package/src/assets/sass/layout/_sidemenu.scss +187 -0
- package/src/assets/sass/layout/_snackbar.scss +8 -0
- package/src/assets/sass/layout/_tables.scss +5 -0
- package/src/assets/sass/layout/_tree.scss +12 -0
- package/src/assets/sass/layout/_tristatecheckbox.scss +15 -0
- package/src/assets/sass/main.scss +28 -0
- package/src/assets/sass/themes/_verisoft_theme.scss +46 -0
- package/src/assets/sass/utils/_mixins.scss +0 -0
- package/src/assets/sass/utils/_utils.scss +39 -0
- package/src/assets/sass/utils/_variables.scss +12 -0
- package/src/assets/sass/vendors/_bootstrap.scss +2 -0
- package/src/assets/sass/vendors/_primeng.scss +2 -0
- package/src/index.ts +31 -0
- package/src/lib/components/action-button-group/action-button-group.component.html +29 -0
- package/src/lib/components/action-button-group/action-button-group.component.scss +0 -0
- package/src/lib/components/action-button-group/action-button-group.component.spec.ts +21 -0
- package/src/lib/components/action-button-group/action-button-group.component.ts +104 -0
- package/src/lib/components/action-button-group/components/action-button/action-button.component.html +12 -0
- package/src/lib/components/action-button-group/components/action-button/action-button.component.scss +0 -0
- package/src/lib/components/action-button-group/components/action-button/action-button.component.spec.ts +21 -0
- package/src/lib/components/action-button-group/components/action-button/action-button.component.ts +36 -0
- package/src/lib/components/action-button-group/index.ts +2 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.html +12 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.scss +18 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +21 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.stories.ts +36 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +24 -0
- package/src/lib/components/breadcrumb/index.ts +1 -0
- package/src/lib/components/button/button.component.html +20 -0
- package/src/lib/components/button/button.component.scss +0 -0
- package/src/lib/components/button/button.component.spec.ts +21 -0
- package/src/lib/components/button/button.component.ts +43 -0
- package/src/lib/components/button/directives/shortcut.directive.ts +37 -0
- package/src/lib/components/button/index.ts +2 -0
- package/src/lib/components/calendar/calendar.component.html +53 -0
- package/src/lib/components/calendar/calendar.component.scss +0 -0
- package/src/lib/components/calendar/calendar.component.spec.ts +21 -0
- package/src/lib/components/calendar/calendar.component.ts +67 -0
- package/src/lib/components/calendar/index.ts +1 -0
- package/src/lib/components/checkbox/checkbox.component.html +19 -0
- package/src/lib/components/checkbox/checkbox.component.scss +15 -0
- package/src/lib/components/checkbox/checkbox.component.spec.ts +21 -0
- package/src/lib/components/checkbox/checkbox.component.stories.ts +72 -0
- package/src/lib/components/checkbox/checkbox.component.ts +41 -0
- package/src/lib/components/checkbox/index.ts +1 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.html +48 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.scss +3 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.spec.ts +21 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.stories.ts +74 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.ts +74 -0
- package/src/lib/components/confirm-dialog/index.ts +2 -0
- package/src/lib/components/confirm-dialog/services/confirm-dialog.service.ts +14 -0
- package/src/lib/components/dropdown/dropdown.component.html +96 -0
- package/src/lib/components/dropdown/dropdown.component.scss +16 -0
- package/src/lib/components/dropdown/dropdown.component.spec.ts +21 -0
- package/src/lib/components/dropdown/dropdown.component.stories.ts +90 -0
- package/src/lib/components/dropdown/dropdown.component.ts +139 -0
- package/src/lib/components/dropdown/index.ts +1 -0
- package/src/lib/components/dynamic-component/dynamic-component-factory.service.ts +90 -0
- package/src/lib/components/dynamic-component/dynamic-component.component.ts +55 -0
- package/src/lib/components/filter/directives/filter-field.directive.ts +25 -0
- package/src/lib/components/filter/directives/table-filter.directive.ts +22 -0
- package/src/lib/components/filter/filter.component.html +67 -0
- package/src/lib/components/filter/filter.component.scss +0 -0
- package/src/lib/components/filter/filter.component.spec.ts +21 -0
- package/src/lib/components/filter/filter.component.stories.ts +23 -0
- package/src/lib/components/filter/filter.component.ts +257 -0
- package/src/lib/components/filter/filter.model.ts +18 -0
- package/src/lib/components/filter/index.ts +3 -0
- package/src/lib/components/form-field/form-field.component.html +41 -0
- package/src/lib/components/form-field/form-field.component.scss +0 -0
- package/src/lib/components/form-field/form-field.component.spec.ts +21 -0
- package/src/lib/components/form-field/form-field.component.stories.ts +69 -0
- package/src/lib/components/form-field/form-field.component.ts +34 -0
- package/src/lib/components/form-field/index.ts +1 -0
- package/src/lib/components/generic-field/generic-field.component.html +54 -0
- package/src/lib/components/generic-field/generic-field.component.spec.ts +21 -0
- package/src/lib/components/generic-field/generic-field.component.ts +76 -0
- package/src/lib/components/generic-field/generic-field.model.ts +9 -0
- package/src/lib/components/generic-field/index.ts +2 -0
- package/src/lib/components/generic-form/generic-form.component.html +33 -0
- package/src/lib/components/generic-form/generic-form.component.spec.ts +21 -0
- package/src/lib/components/generic-form/generic-form.component.ts +48 -0
- package/src/lib/components/generic-form/generic-form.model.spec.ts +82 -0
- package/src/lib/components/generic-form/generic-form.model.ts +76 -0
- package/src/lib/components/generic-form/index.ts +2 -0
- package/src/lib/components/header/header.component.html +85 -0
- package/src/lib/components/header/header.component.scss +0 -0
- package/src/lib/components/header/header.component.spec.ts +21 -0
- package/src/lib/components/header/header.component.stories.ts +24 -0
- package/src/lib/components/header/header.component.ts +64 -0
- package/src/lib/components/header/index.ts +2 -0
- package/src/lib/components/header/services/header-provider.service.ts +15 -0
- package/src/lib/components/input-group/index.ts +1 -0
- package/src/lib/components/input-group/input-group.component.html +32 -0
- package/src/lib/components/input-group/input-group.component.spec.ts +21 -0
- package/src/lib/components/input-group/input-group.component.ts +60 -0
- package/src/lib/components/loader/index.ts +1 -0
- package/src/lib/components/loader/loader.component.html +5 -0
- package/src/lib/components/loader/loader.component.scss +0 -0
- package/src/lib/components/loader/loader.component.spec.ts +21 -0
- package/src/lib/components/loader/loader.component.ts +17 -0
- package/src/lib/components/multiselect/index.ts +1 -0
- package/src/lib/components/multiselect/multiselect.component.html +69 -0
- package/src/lib/components/multiselect/multiselect.component.scss +0 -0
- package/src/lib/components/multiselect/multiselect.component.spec.ts +21 -0
- package/src/lib/components/multiselect/multiselect.component.ts +120 -0
- package/src/lib/components/number-input/index.ts +1 -0
- package/src/lib/components/number-input/number-input.component.html +22 -0
- package/src/lib/components/number-input/number-input.component.spec.ts +21 -0
- package/src/lib/components/number-input/number-input.component.ts +54 -0
- package/src/lib/components/page-header/index.ts +2 -0
- package/src/lib/components/page-header/page-header.component.html +31 -0
- package/src/lib/components/page-header/page-header.component.scss +0 -0
- package/src/lib/components/page-header/page-header.component.spec.ts +21 -0
- package/src/lib/components/page-header/page-header.component.ts +60 -0
- package/src/lib/components/page-header/services/page-header.service.ts +9 -0
- package/src/lib/components/password/index.ts +1 -0
- package/src/lib/components/password/password.component.html +24 -0
- package/src/lib/components/password/password.component.scss +0 -0
- package/src/lib/components/password/password.component.spec.ts +21 -0
- package/src/lib/components/password/password.component.ts +56 -0
- package/src/lib/components/radiobutton/index.ts +1 -0
- package/src/lib/components/radiobutton/radiobutton.component.html +32 -0
- package/src/lib/components/radiobutton/radiobutton.component.scss +6 -0
- package/src/lib/components/radiobutton/radiobutton.component.spec.ts +21 -0
- package/src/lib/components/radiobutton/radiobutton.component.stories.ts +71 -0
- package/src/lib/components/radiobutton/radiobutton.component.ts +60 -0
- package/src/lib/components/section/index.ts +1 -0
- package/src/lib/components/section/section.component.html +24 -0
- package/src/lib/components/section/section.component.scss +0 -0
- package/src/lib/components/section/section.component.spec.ts +21 -0
- package/src/lib/components/section/section.component.ts +30 -0
- package/src/lib/components/side-menu/index.ts +2 -0
- package/src/lib/components/side-menu/side-menu.component.html +55 -0
- package/src/lib/components/side-menu/side-menu.component.scss +0 -0
- package/src/lib/components/side-menu/side-menu.component.spec.ts +21 -0
- package/src/lib/components/side-menu/side-menu.component.ts +97 -0
- package/src/lib/components/side-menu/side-menu.module.ts +66 -0
- package/src/lib/components/slider/index.ts +1 -0
- package/src/lib/components/slider/slider.component.html +19 -0
- package/src/lib/components/slider/slider.component.spec.ts +21 -0
- package/src/lib/components/slider/slider.component.ts +56 -0
- package/src/lib/components/snackbar/index.ts +2 -0
- package/src/lib/components/snackbar/services/snackbar.service.ts +45 -0
- package/src/lib/components/snackbar/snackbar.component.html +3 -0
- package/src/lib/components/snackbar/snackbar.component.scss +0 -0
- package/src/lib/components/snackbar/snackbar.component.spec.ts +21 -0
- package/src/lib/components/snackbar/snackbar.component.stories.ts +70 -0
- package/src/lib/components/snackbar/snackbar.component.ts +26 -0
- package/src/lib/components/stepper/index.ts +1 -0
- package/src/lib/components/stepper/stepper.component.html +43 -0
- package/src/lib/components/stepper/stepper.component.spec.ts +21 -0
- package/src/lib/components/stepper/stepper.component.ts +25 -0
- package/src/lib/components/switch/index.ts +1 -0
- package/src/lib/components/switch/switch.component.html +19 -0
- package/src/lib/components/switch/switch.component.scss +0 -0
- package/src/lib/components/switch/switch.component.spec.ts +21 -0
- package/src/lib/components/switch/switch.component.stories.ts +65 -0
- package/src/lib/components/switch/switch.component.ts +52 -0
- package/src/lib/components/tab-view/index.ts +3 -0
- package/src/lib/components/tab-view/tab-view-item.component.ts +20 -0
- package/src/lib/components/tab-view/tab-view.component.html +24 -0
- package/src/lib/components/tab-view/tab-view.component.ts +50 -0
- package/src/lib/components/tab-view/tab-view.module.ts +18 -0
- package/src/lib/components/table/directives/table-store.directive.ts +61 -0
- package/src/lib/components/table/index.ts +2 -0
- package/src/lib/components/table/table.component.html +183 -0
- package/src/lib/components/table/table.component.scss +0 -0
- package/src/lib/components/table/table.component.spec.ts +21 -0
- package/src/lib/components/table/table.component.stories.ts +55 -0
- package/src/lib/components/table/table.component.ts +256 -0
- package/src/lib/components/table-filter/filter.component.html +205 -0
- package/src/lib/components/table-filter/filter.component.scss +0 -0
- package/src/lib/components/table-filter/filter.component.spec.ts +21 -0
- package/src/lib/components/table-filter/filter.component.stories.ts +23 -0
- package/src/lib/components/textarea/index.ts +1 -0
- package/src/lib/components/textarea/textarea.component.html +40 -0
- package/src/lib/components/textarea/textarea.component.scss +5 -0
- package/src/lib/components/textarea/textarea.component.spec.ts +21 -0
- package/src/lib/components/textarea/textarea.component.stories.ts +98 -0
- package/src/lib/components/textarea/textarea.component.ts +62 -0
- package/src/lib/components/textfield/index.ts +1 -0
- package/src/lib/components/textfield/textfield.component.html +83 -0
- package/src/lib/components/textfield/textfield.component.scss +23 -0
- package/src/lib/components/textfield/textfield.component.spec.ts +21 -0
- package/src/lib/components/textfield/textfield.component.stories.ts +85 -0
- package/src/lib/components/textfield/textfield.component.ts +64 -0
- package/src/lib/components/tristatecheckbox/index.ts +1 -0
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.html +23 -0
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.scss +0 -0
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.spec.ts +21 -0
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.stories.ts +22 -0
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.ts +46 -0
- package/src/lib/interceptors/http-error-message.interceptor.ts +35 -0
- package/src/lib/pages/not-found-page/not-found-page.component.html +27 -0
- package/src/lib/pages/not-found-page/not-found-page.component.scss +0 -0
- package/src/lib/pages/not-found-page/not-found-page.component.spec.ts +21 -0
- package/src/lib/pages/not-found-page/not-found-page.component.ts +17 -0
- package/src/lib/services/screen-size.service.ts +25 -0
- package/src/tab-view.ts +1 -0
- package/src/test-setup.ts +8 -0
- package/tsconfig.json +29 -0
- package/tsconfig.lib.json +18 -0
- package/tsconfig.lib.prod.json +9 -0
- package/tsconfig.spec.json +16 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.p-treenode-content {
|
|
2
|
+
justify-content: flex-start;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.p-tree .p-tree-container .p-treenode .p-treenode-content.p-highlight {
|
|
6
|
+
background-color: transparent;
|
|
7
|
+
border: 1px solid var(--primary-color);
|
|
8
|
+
|
|
9
|
+
span {
|
|
10
|
+
color: var(--primary-color);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
p-tristatecheckbox.ng-dirty.ng-invalid {
|
|
2
|
+
.p-checkbox>.p-checkbox-box {
|
|
3
|
+
border-color: var(--error-color);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.p-checkbox-label {
|
|
7
|
+
color: var(--error-color);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.tristate-error {
|
|
12
|
+
.p-checkbox-box.p-highlight {
|
|
13
|
+
background: var(--error-color);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@import "primeng/resources/primeng.min.css";
|
|
2
|
+
@import "primeicons/primeicons.css";
|
|
3
|
+
@import "primeng/resources/themes/saga-orange/theme.css";
|
|
4
|
+
|
|
5
|
+
@import './base/typography';
|
|
6
|
+
@import './utils/variables';
|
|
7
|
+
@import './vendors/bootstrap';
|
|
8
|
+
@import './utils/mixins';
|
|
9
|
+
@import './utils/utils';
|
|
10
|
+
@import './themes/verisoft_theme';
|
|
11
|
+
@import './base/scrollbar';
|
|
12
|
+
@import './layout/layout';
|
|
13
|
+
@import './layout/tables';
|
|
14
|
+
@import './layout/formField';
|
|
15
|
+
@import './layout/radiobutton';
|
|
16
|
+
@import './layout/snackbar';
|
|
17
|
+
@import './layout/icons';
|
|
18
|
+
@import './layout/inputSwitch';
|
|
19
|
+
@import './layout/tree';
|
|
20
|
+
@import './layout/button';
|
|
21
|
+
@import './layout/dialog';
|
|
22
|
+
@import './layout/checkbox';
|
|
23
|
+
@import './layout/tristatecheckbox';
|
|
24
|
+
@import './layout/header';
|
|
25
|
+
@import './layout/sidemenu';
|
|
26
|
+
@import './layout/loader';
|
|
27
|
+
@import './layout/dropdown';
|
|
28
|
+
@import './layout/app';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
$primary-color: #f7a711;
|
|
2
|
+
$secondary-color: #64748b;
|
|
3
|
+
$details-color: #ffeecd;
|
|
4
|
+
$success-color: #90cb8a;
|
|
5
|
+
$error-color: #e27575;
|
|
6
|
+
$soft-error-color: #ffeeed;
|
|
7
|
+
$bg-color: #ffffff;
|
|
8
|
+
$white-color: #ffffff;
|
|
9
|
+
$disabled-color: #646464;
|
|
10
|
+
|
|
11
|
+
$theme: (
|
|
12
|
+
'primary': $primary-color,
|
|
13
|
+
'secondary': $secondary-color,
|
|
14
|
+
'details': $details-color,
|
|
15
|
+
'success': $success-color,
|
|
16
|
+
'error': $error-color,
|
|
17
|
+
'danger': $error-color,
|
|
18
|
+
'soft-error': $soft-error-color,
|
|
19
|
+
'white': $white-color,
|
|
20
|
+
'disabled': $disabled-color,
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
:root {
|
|
24
|
+
@each $key, $value in $theme {
|
|
25
|
+
.bg-#{$key} {
|
|
26
|
+
background: $value !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.text-#{$key} {
|
|
30
|
+
color: $value !important;
|
|
31
|
+
|
|
32
|
+
@if $key == 'error' {
|
|
33
|
+
padding-left: 0rem !important;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
hr {
|
|
39
|
+
background-color: $primary-color;
|
|
40
|
+
border: none;
|
|
41
|
+
height: 0.125rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
background-color: $white-color !important;
|
|
45
|
+
}
|
|
46
|
+
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.w-025 {
|
|
2
|
+
width: 0.25rem;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.w-050 {
|
|
6
|
+
width: 0.5rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.w-1 {
|
|
10
|
+
width: 1rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.w-2 {
|
|
14
|
+
width: 2rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.w-3 {
|
|
18
|
+
width: 3rem;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.w-4 {
|
|
22
|
+
width: 4rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.w-5 {
|
|
26
|
+
width: 5rem;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.w-6 {
|
|
30
|
+
width: 6rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.w-7 {
|
|
34
|
+
width: 7rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.w-8 {
|
|
38
|
+
width: 8rem;
|
|
39
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--primary-color: #f7a711;
|
|
3
|
+
--primary-color-semitransparent:#f7a71180;
|
|
4
|
+
--secondary-color: #64748b;
|
|
5
|
+
--details-color: #ffeecd;
|
|
6
|
+
--success-color: #90cb8a;
|
|
7
|
+
--error-color: #e27575;
|
|
8
|
+
--soft-error-color: #ffeeed;
|
|
9
|
+
--bg-color: #ffffff;
|
|
10
|
+
--white-color: #ffffff;
|
|
11
|
+
--disabled-color: #646464;
|
|
12
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from './lib/components/action-button-group';
|
|
2
|
+
export * from './lib/components/input-group';
|
|
3
|
+
export * from './lib/components/textfield';
|
|
4
|
+
export * from './lib/components/breadcrumb';
|
|
5
|
+
export * from './lib/components/checkbox';
|
|
6
|
+
export * from './lib/components/tristatecheckbox';
|
|
7
|
+
export * from './lib/components/calendar';
|
|
8
|
+
export * from './lib/components/form-field';
|
|
9
|
+
export * from './lib/components/password';
|
|
10
|
+
export * from './lib/components/section';
|
|
11
|
+
export * from './lib/components/button/button.component';
|
|
12
|
+
export * from './lib/components/radiobutton';
|
|
13
|
+
export * from './lib/components/number-input';
|
|
14
|
+
export * from './lib/components/header';
|
|
15
|
+
export * from './lib/components/textarea';
|
|
16
|
+
export * from './lib/components/loader';
|
|
17
|
+
export * from './lib/components/snackbar';
|
|
18
|
+
export * from './lib/components/side-menu';
|
|
19
|
+
export * from './lib/components/table';
|
|
20
|
+
export * from './lib/components/page-header';
|
|
21
|
+
export * from './lib/components/stepper';
|
|
22
|
+
export * from './lib/components/dropdown';
|
|
23
|
+
export * from './lib/components/multiselect';
|
|
24
|
+
export * from './lib/components/slider';
|
|
25
|
+
export * from './lib/components/confirm-dialog';
|
|
26
|
+
export * from './lib/components/switch';
|
|
27
|
+
export * from './lib/interceptors/http-error-message.interceptor';
|
|
28
|
+
export * from './lib/components/action-button-group';
|
|
29
|
+
export * from './lib/components/filter';
|
|
30
|
+
export * from './lib/components/tab-view';
|
|
31
|
+
export * from './lib/components/generic-field';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class="v-action-button-group align-items-center justify-content-center justify-content-md-end"
|
|
3
|
+
>
|
|
4
|
+
<div class="v-action-button-group__actions d-flex gap-2">
|
|
5
|
+
@for (action of visibleActions; track action) {
|
|
6
|
+
<v-action-button
|
|
7
|
+
[disabled]="action.disabled"
|
|
8
|
+
[icon]="action.icon"
|
|
9
|
+
[id]="action.id"
|
|
10
|
+
[outlined]="action.outlined"
|
|
11
|
+
[raised]="action.raised"
|
|
12
|
+
[text]="action.text"
|
|
13
|
+
[toolTip]="action.toolTip || action.label"
|
|
14
|
+
[severity]="action.severity"
|
|
15
|
+
[size]="action.size"
|
|
16
|
+
(clickEvent)="action.clickEvent.emit()"
|
|
17
|
+
></v-action-button>
|
|
18
|
+
} @if (actions.length > visibleActions.length) {
|
|
19
|
+
<v-button
|
|
20
|
+
(click)="menu.toggle($event)"
|
|
21
|
+
[text]="true"
|
|
22
|
+
[label]="label"
|
|
23
|
+
[iconPos]="menuIconPos"
|
|
24
|
+
[icon]="menuIcon"
|
|
25
|
+
/>
|
|
26
|
+
}
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<p-menu #menu [model]="menuItems" [popup]="true" />
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { ActionButtonGroupComponent } from './action-button-group.component';
|
|
3
|
+
|
|
4
|
+
describe('ActionButtonGroupComponent', () => {
|
|
5
|
+
let component: ActionButtonGroupComponent;
|
|
6
|
+
let fixture: ComponentFixture<ActionButtonGroupComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
imports: [ActionButtonGroupComponent],
|
|
11
|
+
}).compileComponents();
|
|
12
|
+
|
|
13
|
+
fixture = TestBed.createComponent(ActionButtonGroupComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AfterContentInit,
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
ChangeDetectorRef,
|
|
5
|
+
Component,
|
|
6
|
+
ContentChildren,
|
|
7
|
+
Input,
|
|
8
|
+
QueryList,
|
|
9
|
+
} from '@angular/core';
|
|
10
|
+
import {
|
|
11
|
+
ACTION_BUTTON_GROUP_COMPONENT_TOKEN,
|
|
12
|
+
ActionButton,
|
|
13
|
+
ActionButtonGroupCore,
|
|
14
|
+
IconPositionType,
|
|
15
|
+
UnsubscribeComponent,
|
|
16
|
+
} from '@verisoft/ui-core';
|
|
17
|
+
import { MenuItem } from 'primeng/api';
|
|
18
|
+
import { MenuModule } from 'primeng/menu';
|
|
19
|
+
import { combineLatestWith, map, startWith, takeUntil } from 'rxjs';
|
|
20
|
+
import { ScreenSizeService } from '../../services/screen-size.service';
|
|
21
|
+
import { ButtonComponent } from '../button';
|
|
22
|
+
import { ActionButtonComponent } from './components/action-button/action-button.component';
|
|
23
|
+
|
|
24
|
+
@Component({
|
|
25
|
+
selector: 'v-action-button-group',
|
|
26
|
+
standalone: true,
|
|
27
|
+
imports: [MenuModule, ButtonComponent, ActionButtonComponent],
|
|
28
|
+
templateUrl: './action-button-group.component.html',
|
|
29
|
+
styleUrl: './action-button-group.component.scss',
|
|
30
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
31
|
+
providers: [
|
|
32
|
+
{
|
|
33
|
+
provide: ACTION_BUTTON_GROUP_COMPONENT_TOKEN,
|
|
34
|
+
useExisting: ActionButtonGroupComponent,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
})
|
|
38
|
+
export class ActionButtonGroupComponent
|
|
39
|
+
extends UnsubscribeComponent
|
|
40
|
+
implements AfterContentInit, ActionButtonGroupCore
|
|
41
|
+
{
|
|
42
|
+
@ContentChildren(ActionButtonComponent)
|
|
43
|
+
actions!: QueryList<ActionButtonComponent>;
|
|
44
|
+
|
|
45
|
+
@Input() maxItems = 3;
|
|
46
|
+
|
|
47
|
+
@Input() maxItemsMobile = 0;
|
|
48
|
+
|
|
49
|
+
@Input() items: ActionButton[] = [];
|
|
50
|
+
|
|
51
|
+
@Input() menuIconPos: IconPositionType = 'right';
|
|
52
|
+
|
|
53
|
+
@Input() menuIcon = 'pi pi-ellipsis-v';
|
|
54
|
+
|
|
55
|
+
@Input() label?: string;
|
|
56
|
+
|
|
57
|
+
allItems: ActionButton[] = [];
|
|
58
|
+
visibleActions: ActionButton[] = [];
|
|
59
|
+
menuItems: MenuItem[] = [];
|
|
60
|
+
|
|
61
|
+
constructor(
|
|
62
|
+
private readonly cd: ChangeDetectorRef,
|
|
63
|
+
readonly screenSizeService: ScreenSizeService
|
|
64
|
+
) {
|
|
65
|
+
super();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
ngAfterContentInit(): void {
|
|
69
|
+
this.subscribeItemChange();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
private subscribeItemChange(): void {
|
|
73
|
+
const screenResize$ = this.screenSizeService.isMobileBlock;
|
|
74
|
+
|
|
75
|
+
const actions$ = this.actions.changes.pipe(
|
|
76
|
+
startWith({}),
|
|
77
|
+
map(() => this.actions.toArray())
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
screenResize$
|
|
81
|
+
.pipe(takeUntil(this.destroyed$), combineLatestWith(actions$))
|
|
82
|
+
.subscribe(([isMobile, actions]) => {
|
|
83
|
+
this.computeItems(actions, isMobile);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
private computeItems(actions: ActionButton[], isMobile: boolean) {
|
|
88
|
+
const allItems = [...(this.items ?? []), ...actions];
|
|
89
|
+
const maxItems = isMobile ? this.maxItemsMobile : this.maxItems;
|
|
90
|
+
this.visibleActions = allItems.slice(0, maxItems);
|
|
91
|
+
this.menuItems = allItems.slice(maxItems).map(this.convertToMenuItem);
|
|
92
|
+
this.cd.detectChanges();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
private convertToMenuItem(item: ActionButton): MenuItem {
|
|
96
|
+
return {
|
|
97
|
+
label: item.label,
|
|
98
|
+
icon: item.icon,
|
|
99
|
+
command: () => {
|
|
100
|
+
item.clickEvent.emit();
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
}
|
package/src/lib/components/action-button-group/components/action-button/action-button.component.scss
ADDED
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { ActionButtonComponent } from './action-button.component';
|
|
3
|
+
|
|
4
|
+
describe('ActionButtonComponent', () => {
|
|
5
|
+
let component: ActionButtonComponent;
|
|
6
|
+
let fixture: ComponentFixture<ActionButtonComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
imports: [ActionButtonComponent],
|
|
11
|
+
}).compileComponents();
|
|
12
|
+
|
|
13
|
+
fixture = TestBed.createComponent(ActionButtonComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
package/src/lib/components/action-button-group/components/action-button/action-button.component.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
EventEmitter,
|
|
5
|
+
Input,
|
|
6
|
+
Output,
|
|
7
|
+
} from '@angular/core';
|
|
8
|
+
import { ActionButton, ControlSeverityType, FieldSizeType } from '@verisoft/ui-core';
|
|
9
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
10
|
+
import { ButtonComponent } from '../../../button';
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'v-action-button',
|
|
14
|
+
standalone: true,
|
|
15
|
+
imports: [ButtonComponent, TooltipModule],
|
|
16
|
+
templateUrl: './action-button.component.html',
|
|
17
|
+
styleUrl: './action-button.component.scss',
|
|
18
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
|
+
})
|
|
20
|
+
export class ActionButtonComponent implements ActionButton {
|
|
21
|
+
@Input() disabled = false;
|
|
22
|
+
@Input() toolTip?: string;
|
|
23
|
+
@Input() id?: string;
|
|
24
|
+
@Input() icon?: string;
|
|
25
|
+
@Input() outlined = false;
|
|
26
|
+
@Input() raised = false;
|
|
27
|
+
@Input() text = true;
|
|
28
|
+
@Input() severity?: ControlSeverityType;
|
|
29
|
+
@Input() label?: string;
|
|
30
|
+
@Input() size?: FieldSizeType;
|
|
31
|
+
@Output() clickEvent = new EventEmitter<void>();
|
|
32
|
+
|
|
33
|
+
handleClick() {
|
|
34
|
+
this.clickEvent.emit();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<div class="v-breadcrumb card flex justify-content-center">
|
|
2
|
+
<ng-container *ngIf="useHomeRoute; else default">
|
|
3
|
+
<p-breadcrumb
|
|
4
|
+
class="max-w-full"
|
|
5
|
+
[model]="items"
|
|
6
|
+
[home]="home"
|
|
7
|
+
></p-breadcrumb>
|
|
8
|
+
</ng-container>
|
|
9
|
+
<ng-template #default>
|
|
10
|
+
<p-breadcrumb class="max-w-full" [model]="items"></p-breadcrumb>
|
|
11
|
+
</ng-template>
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
p-breadcrumb > nav {
|
|
2
|
+
border: none;
|
|
3
|
+
> ol {
|
|
4
|
+
align-items: stretch;
|
|
5
|
+
font-weight: 600;
|
|
6
|
+
font-size: 1rem;
|
|
7
|
+
}
|
|
8
|
+
a[aria-current='page'] > span {
|
|
9
|
+
color: var(--primary-color) !important;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
.p-menuitem-link {
|
|
13
|
+
gap: 0.5rem;
|
|
14
|
+
text-align: center;
|
|
15
|
+
}
|
|
16
|
+
.p-menuitem-text {
|
|
17
|
+
align-self: baseline;
|
|
18
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { BreadcrumbComponent } from './breadcrumb.component';
|
|
3
|
+
|
|
4
|
+
describe('BreadcrumbComponent', () => {
|
|
5
|
+
let component: BreadcrumbComponent;
|
|
6
|
+
let fixture: ComponentFixture<BreadcrumbComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
imports: [BreadcrumbComponent],
|
|
11
|
+
}).compileComponents();
|
|
12
|
+
|
|
13
|
+
fixture = TestBed.createComponent(BreadcrumbComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ActivatedRoute } from '@angular/router';
|
|
2
|
+
import { moduleMetadata, type Meta, type StoryObj } from '@storybook/angular';
|
|
3
|
+
import { within, expect } from '@storybook/test';
|
|
4
|
+
import { BreadcrumbComponent } from './breadcrumb.component';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<BreadcrumbComponent> = {
|
|
7
|
+
component: BreadcrumbComponent,
|
|
8
|
+
title: 'BreadcrumbComponent',
|
|
9
|
+
decorators: [
|
|
10
|
+
moduleMetadata({
|
|
11
|
+
providers: [
|
|
12
|
+
{
|
|
13
|
+
provide: ActivatedRoute,
|
|
14
|
+
useValue: ActivatedRoute,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
}),
|
|
18
|
+
],
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<BreadcrumbComponent>;
|
|
22
|
+
export const Primary: Story = {
|
|
23
|
+
args: {
|
|
24
|
+
homeRoute: '123',
|
|
25
|
+
useHomeRoute: true,
|
|
26
|
+
items: [
|
|
27
|
+
{ label: 'Contract', routerLink: '123' },
|
|
28
|
+
{ label: 'List', routerLink: './list' },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
play: async ({ canvasElement }: any) => {
|
|
32
|
+
const canvas = within(canvasElement);
|
|
33
|
+
expect(canvas.getByText('Contract')).toBeTruthy();
|
|
34
|
+
expect(canvas.getByText('List')).toBeTruthy();
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import {
|
|
3
|
+
Component,
|
|
4
|
+
} from '@angular/core';
|
|
5
|
+
import {
|
|
6
|
+
BREADCRUMB_COMPONENT_TOKEN,
|
|
7
|
+
BreadcrumbCoreComponent,
|
|
8
|
+
} from '@verisoft/ui-core';
|
|
9
|
+
import { BreadcrumbModule } from 'primeng/breadcrumb';
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: 'v-breadcrumb',
|
|
13
|
+
standalone: true,
|
|
14
|
+
imports: [CommonModule, BreadcrumbModule],
|
|
15
|
+
templateUrl: './breadcrumb.component.html',
|
|
16
|
+
styleUrl: './breadcrumb.component.scss',
|
|
17
|
+
providers: [
|
|
18
|
+
{
|
|
19
|
+
provide: BREADCRUMB_COMPONENT_TOKEN,
|
|
20
|
+
useExisting: BreadcrumbComponent
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
})
|
|
24
|
+
export class BreadcrumbComponent extends BreadcrumbCoreComponent { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './breadcrumb.component';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<div class="v-button mt-3">
|
|
2
|
+
<a
|
|
3
|
+
[routerLink]="routerLink ? routerLink : undefined"
|
|
4
|
+
[queryParams]="queryParams ? queryParams : undefined"
|
|
5
|
+
>
|
|
6
|
+
<p-button
|
|
7
|
+
[disabled]="disabled"
|
|
8
|
+
[icon]="icon"
|
|
9
|
+
[badge]="badge"
|
|
10
|
+
[outlined]="outlined"
|
|
11
|
+
[rounded]="rounded"
|
|
12
|
+
[raised]="raised"
|
|
13
|
+
[label]="label"
|
|
14
|
+
[text]="text"
|
|
15
|
+
[size]="$any(size)"
|
|
16
|
+
[severity]="severity"
|
|
17
|
+
[iconPos]="iconPos"
|
|
18
|
+
/>
|
|
19
|
+
</a>
|
|
20
|
+
</div>
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { ButtonComponent } from './button.component';
|
|
3
|
+
|
|
4
|
+
describe('ButtonComponent', () => {
|
|
5
|
+
let component: ButtonComponent;
|
|
6
|
+
let fixture: ComponentFixture<ButtonComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
imports: [ButtonComponent],
|
|
11
|
+
}).compileComponents();
|
|
12
|
+
|
|
13
|
+
fixture = TestBed.createComponent(ButtonComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
3
|
+
import { Params, RouterModule } from '@angular/router';
|
|
4
|
+
import {
|
|
5
|
+
BUTTON_COMPONENT_TOKEN,
|
|
6
|
+
ButtonCore,
|
|
7
|
+
ControlSeverityType,
|
|
8
|
+
FieldSizeType,
|
|
9
|
+
IconPosition,
|
|
10
|
+
IconPositionType,
|
|
11
|
+
} from '@verisoft/ui-core';
|
|
12
|
+
import { ButtonModule } from 'primeng/button';
|
|
13
|
+
import { RippleModule } from 'primeng/ripple';
|
|
14
|
+
|
|
15
|
+
@Component({
|
|
16
|
+
selector: 'v-button',
|
|
17
|
+
standalone: true,
|
|
18
|
+
imports: [CommonModule, ButtonModule, RippleModule, RouterModule],
|
|
19
|
+
templateUrl: './button.component.html',
|
|
20
|
+
styleUrl: './button.component.scss',
|
|
21
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
|
+
providers: [
|
|
23
|
+
{
|
|
24
|
+
provide: BUTTON_COMPONENT_TOKEN,
|
|
25
|
+
useExisting: ButtonComponent,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
})
|
|
29
|
+
export class ButtonComponent implements ButtonCore {
|
|
30
|
+
@Input() label?: string;
|
|
31
|
+
@Input() icon?: string;
|
|
32
|
+
@Input() badge?: string;
|
|
33
|
+
@Input() iconPos: IconPositionType = IconPosition.right;
|
|
34
|
+
@Input() disabled!: boolean;
|
|
35
|
+
@Input() rounded!: boolean;
|
|
36
|
+
@Input() text!: boolean;
|
|
37
|
+
@Input() outlined!: boolean;
|
|
38
|
+
@Input() raised!: boolean;
|
|
39
|
+
@Input() severity?: ControlSeverityType;
|
|
40
|
+
@Input() routerLink!: any[];
|
|
41
|
+
@Input() size: FieldSizeType | undefined;
|
|
42
|
+
@Input() queryParams?: Params;
|
|
43
|
+
}
|