otimus-library 0.2.45 → 0.2.47
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/README.md +26 -26
- package/ng-package.json +12 -0
- package/package.json +4 -13
- package/src/assets/images/loading.svg +0 -0
- package/src/assets/images/not-found-bg.jpg +0 -0
- package/src/lib/components/oc-accordion/oc-accordion.component.html +3 -0
- package/src/lib/components/oc-accordion/oc-accordion.component.scss +4 -0
- package/src/lib/components/oc-accordion/oc-accordion.component.ts +44 -0
- package/src/lib/components/oc-accordion-item/oc-accordion-item.component.html +19 -0
- package/src/lib/components/oc-accordion-item/oc-accordion-item.component.scss +86 -0
- package/src/lib/components/oc-accordion-item/oc-accordion-item.component.ts +27 -0
- package/src/lib/components/oc-accordion-item/styles/oc-accordion-item.shui-component.scss +41 -0
- package/src/lib/components/oc-autocomplete/oc-autocomplete.component.html +66 -0
- package/src/lib/components/oc-autocomplete/oc-autocomplete.component.scss +157 -0
- package/src/lib/components/oc-autocomplete/oc-autocomplete.component.ts +277 -0
- package/src/lib/components/oc-badge/oc-badge.component.html +7 -0
- package/src/lib/components/oc-badge/oc-badge.component.scss +125 -0
- package/src/lib/components/oc-badge/oc-badge.component.ts +22 -0
- package/src/lib/components/oc-checkbox/oc-checkbox.component.html +30 -0
- package/src/lib/components/oc-checkbox/oc-checkbox.component.scss +103 -0
- package/src/lib/components/oc-checkbox/oc-checkbox.component.ts +132 -0
- package/src/lib/components/oc-checkbox/styles/oc-checkbox.shui-component.scss +21 -0
- package/src/lib/components/oc-chip/oc-chip.component.html +20 -0
- package/src/lib/components/oc-chip/oc-chip.component.scss +102 -0
- package/src/lib/components/oc-chip/oc-chip.component.ts +32 -0
- package/src/lib/components/oc-filter/oc-filter.component.html +22 -0
- package/src/lib/components/oc-filter/oc-filter.component.scss +78 -0
- package/src/lib/components/oc-filter/oc-filter.component.spec.ts +23 -0
- package/src/lib/components/oc-filter/oc-filter.component.ts +30 -0
- package/src/lib/components/oc-input/oc-input.component.html +21 -0
- package/src/lib/components/oc-input/oc-input.component.scss +3 -0
- package/src/lib/components/oc-input/oc-input.component.ts +100 -0
- package/src/lib/components/oc-key-value/oc-key-value.component.html +12 -0
- package/src/lib/components/oc-key-value/oc-key-value.component.scss +26 -0
- package/src/lib/components/oc-key-value/oc-key-value.component.ts +23 -0
- package/src/lib/components/oc-key-value/styles/oc-key-value.shui-component.scss +26 -0
- package/src/lib/components/oc-log/oc-log.component.html +18 -0
- package/src/lib/components/oc-log/oc-log.component.scss +61 -0
- package/src/lib/components/oc-log/oc-log.component.ts +15 -0
- package/src/lib/components/oc-menu/oc-menu.component.html +31 -0
- package/src/lib/components/oc-menu/oc-menu.component.scss +101 -0
- package/src/lib/components/oc-menu/oc-menu.component.ts +84 -0
- package/src/lib/components/oc-modal/oc-modal.component.html +54 -0
- package/src/lib/components/oc-modal/oc-modal.component.scss +204 -0
- package/src/lib/components/oc-modal/oc-modal.component.ts +82 -0
- package/src/lib/components/oc-modal/styles/oc-modal.shui-component.scss +3 -0
- package/src/lib/components/oc-modal-footer/oc-modal-footer.component.html +11 -0
- package/src/lib/components/oc-modal-footer/oc-modal-footer.component.scss +27 -0
- package/src/lib/components/oc-modal-footer/oc-modal-footer.component.ts +15 -0
- package/src/lib/components/oc-not-found/oc-not-found.component.html +14 -0
- package/src/lib/components/oc-not-found/oc-not-found.component.scss +153 -0
- package/src/lib/components/oc-not-found/oc-not-found.component.spec.ts +23 -0
- package/src/lib/components/oc-not-found/oc-not-found.component.ts +12 -0
- package/src/lib/components/oc-pagination/oc-pagination.component.html +32 -0
- package/src/lib/components/oc-pagination/oc-pagination.component.scss +80 -0
- package/src/lib/components/oc-pagination/oc-pagination.component.ts +46 -0
- package/src/lib/components/oc-profile/oc-profile.component.html +17 -0
- package/src/lib/components/oc-profile/oc-profile.component.scss +80 -0
- package/src/lib/components/oc-profile/oc-profile.component.ts +38 -0
- package/src/lib/components/oc-step/oc-step.component.html +32 -0
- package/src/lib/components/oc-step/oc-step.component.scss +106 -0
- package/src/lib/components/oc-step/oc-step.component.ts +39 -0
- package/src/lib/components/oc-step/styles/oc-step.shui-component.scss +52 -0
- package/src/lib/components/oc-stepper/oc-stepper.component.html +3 -0
- package/src/lib/components/oc-stepper/oc-stepper.component.scss +9 -0
- package/src/lib/components/oc-stepper/oc-stepper.component.ts +86 -0
- package/src/lib/components/oc-tab/oc-tab.component.html +3 -0
- package/src/lib/components/oc-tab/oc-tab.component.scss +0 -0
- package/src/lib/components/oc-tab/oc-tab.component.ts +15 -0
- package/src/lib/components/oc-table/oc-table.component.html +62 -0
- package/src/lib/components/oc-table/oc-table.component.scss +2 -0
- package/src/lib/components/oc-table/oc-table.component.ts +51 -0
- package/src/lib/components/oc-tabs/oc-tabs.component.html +13 -0
- package/src/lib/components/oc-tabs/oc-tabs.component.scss +47 -0
- package/src/lib/components/oc-tabs/oc-tabs.component.ts +46 -0
- package/src/lib/components/oc-tabs/styles/oc-tabs.shui-component.scss +25 -0
- package/src/lib/components/oc-toast/oc-toast.component.html +46 -0
- package/src/lib/components/oc-toast/oc-toast.component.scss +133 -0
- package/src/lib/components/oc-toast/oc-toast.component.ts +15 -0
- package/src/lib/components/oc-toggle/oc-toggle.component.html +4 -0
- package/src/lib/components/oc-toggle/oc-toggle.component.scss +73 -0
- package/src/lib/components/oc-toggle/oc-toggle.component.spec.ts +23 -0
- package/src/lib/components/oc-toggle/oc-toggle.component.ts +32 -0
- package/src/lib/directives/oc-tooltip/oc-tooltip.directive.ts +108 -0
- package/src/lib/interfaces/internal/languages.ts +16 -0
- package/src/lib/interfaces/oc-autocomplete.ts +6 -0
- package/src/lib/interfaces/oc-menu.ts +10 -0
- package/src/lib/interfaces/oc-style-theme.ts +3 -0
- package/src/lib/interfaces/oc-table.ts +12 -0
- package/src/lib/interfaces/oc-toast.ts +8 -0
- package/src/lib/otimus-library.component.ts +16 -0
- package/src/lib/otimus-library.service.ts +9 -0
- package/src/lib/services/internationalization.service.ts +73 -0
- package/src/lib/services/oc-toast.service.ts +107 -0
- package/src/lib/services/style-theme.service.ts +19 -0
- package/src/public-api.ts +30 -0
- package/{styles → src/styles}/colors.scss +70 -70
- package/{styles → src/styles}/components/buttons/buttons.scss +225 -225
- package/{styles → src/styles}/components/buttons/buttons.shui.scss +61 -61
- package/{styles → src/styles}/components/index.scss +2 -2
- package/{styles → src/styles}/components/inputs/inputs.scss +249 -247
- package/{styles → src/styles}/components/inputs/inputs.shui.scss +212 -212
- package/{styles → src/styles}/components/table/table.scss +69 -69
- package/{styles → src/styles}/components/table/table.shui.scss +50 -50
- package/{styles → src/styles}/components/tooltip.scss +26 -26
- package/{styles → src/styles}/grid.scss +1122 -1122
- package/{styles → src/styles}/patterns/shui/colors.shui.scss +154 -154
- package/{styles → src/styles}/patterns/shui/fonts.shui.scss +65 -65
- package/{styles → src/styles}/patterns/shui/index.shui.scss +24 -24
- package/{styles → src/styles}/patterns/shui/variables.shui.scss +22 -22
- package/{styles → src/styles}/states.scss +5 -5
- package/{styles → src/styles}/styles.scss +46 -46
- package/{styles → src/styles}/variables.scss +47 -47
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/esm2022/lib/components/oc-accordion/oc-accordion.component.mjs +0 -48
- package/esm2022/lib/components/oc-accordion-item/oc-accordion-item.component.mjs +0 -35
- package/esm2022/lib/components/oc-autocomplete/oc-autocomplete.component.mjs +0 -275
- package/esm2022/lib/components/oc-badge/oc-badge.component.mjs +0 -30
- package/esm2022/lib/components/oc-checkbox/oc-checkbox.component.mjs +0 -133
- package/esm2022/lib/components/oc-chip/oc-chip.component.mjs +0 -45
- package/esm2022/lib/components/oc-filter/oc-filter.component.mjs +0 -39
- package/esm2022/lib/components/oc-input/oc-input.component.mjs +0 -97
- package/esm2022/lib/components/oc-key-value/oc-key-value.component.mjs +0 -29
- package/esm2022/lib/components/oc-log/oc-log.component.mjs +0 -22
- package/esm2022/lib/components/oc-menu/oc-menu.component.mjs +0 -81
- package/esm2022/lib/components/oc-modal/oc-modal.component.mjs +0 -85
- package/esm2022/lib/components/oc-modal-footer/oc-modal-footer.component.mjs +0 -23
- package/esm2022/lib/components/oc-not-found/oc-not-found.component.mjs +0 -11
- package/esm2022/lib/components/oc-pagination/oc-pagination.component.mjs +0 -49
- package/esm2022/lib/components/oc-profile/oc-profile.component.mjs +0 -38
- package/esm2022/lib/components/oc-step/oc-step.component.mjs +0 -49
- package/esm2022/lib/components/oc-stepper/oc-stepper.component.mjs +0 -90
- package/esm2022/lib/components/oc-tab/oc-tab.component.mjs +0 -20
- package/esm2022/lib/components/oc-tabs/oc-tabs.component.mjs +0 -42
- package/esm2022/lib/components/oc-toast/oc-toast.component.mjs +0 -17
- package/esm2022/lib/components/oc-toggle/oc-toggle.component.mjs +0 -34
- package/esm2022/lib/directives/oc-tooltip/oc-tooltip.directive.mjs +0 -117
- package/esm2022/lib/interfaces/oc-autocomplete.mjs +0 -2
- package/esm2022/lib/interfaces/oc-menu.mjs +0 -2
- package/esm2022/lib/interfaces/oc-style-theme.mjs +0 -2
- package/esm2022/lib/interfaces/oc-toast.mjs +0 -2
- package/esm2022/lib/otimus-library.component.mjs +0 -19
- package/esm2022/lib/otimus-library.service.mjs +0 -14
- package/esm2022/lib/services/internationalization.service.mjs +0 -68
- package/esm2022/lib/services/oc-toast.service.mjs +0 -81
- package/esm2022/lib/services/style-theme.service.mjs +0 -21
- package/esm2022/otimus-library.mjs +0 -5
- package/esm2022/public-api.mjs +0 -30
- package/fesm2022/otimus-library.mjs +0 -1513
- package/fesm2022/otimus-library.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/oc-accordion/oc-accordion.component.d.ts +0 -18
- package/lib/components/oc-accordion-item/oc-accordion-item.component.d.ts +0 -12
- package/lib/components/oc-autocomplete/oc-autocomplete.component.d.ts +0 -68
- package/lib/components/oc-badge/oc-badge.component.d.ts +0 -11
- package/lib/components/oc-checkbox/oc-checkbox.component.d.ts +0 -35
- package/lib/components/oc-chip/oc-chip.component.d.ts +0 -14
- package/lib/components/oc-filter/oc-filter.component.d.ts +0 -17
- package/lib/components/oc-input/oc-input.component.d.ts +0 -31
- package/lib/components/oc-key-value/oc-key-value.component.d.ts +0 -14
- package/lib/components/oc-log/oc-log.component.d.ts +0 -7
- package/lib/components/oc-menu/oc-menu.component.d.ts +0 -20
- package/lib/components/oc-modal/oc-modal.component.d.ts +0 -30
- package/lib/components/oc-modal-footer/oc-modal-footer.component.d.ts +0 -8
- package/lib/components/oc-not-found/oc-not-found.component.d.ts +0 -5
- package/lib/components/oc-pagination/oc-pagination.component.d.ts +0 -14
- package/lib/components/oc-profile/oc-profile.component.d.ts +0 -12
- package/lib/components/oc-step/oc-step.component.d.ts +0 -22
- package/lib/components/oc-stepper/oc-stepper.component.d.ts +0 -24
- package/lib/components/oc-tab/oc-tab.component.d.ts +0 -8
- package/lib/components/oc-tabs/oc-tabs.component.d.ts +0 -18
- package/lib/components/oc-toast/oc-toast.component.d.ts +0 -8
- package/lib/components/oc-toggle/oc-toggle.component.d.ts +0 -12
- package/lib/directives/oc-tooltip/oc-tooltip.directive.d.ts +0 -20
- package/lib/interfaces/oc-autocomplete.d.ts +0 -5
- package/lib/interfaces/oc-menu.d.ts +0 -9
- package/lib/interfaces/oc-style-theme.d.ts +0 -2
- package/lib/interfaces/oc-toast.d.ts +0 -8
- package/lib/otimus-library.component.d.ts +0 -5
- package/lib/otimus-library.service.d.ts +0 -6
- package/lib/services/internationalization.service.d.ts +0 -17
- package/lib/services/oc-toast.service.d.ts +0 -14
- package/lib/services/style-theme.service.d.ts +0 -8
- package/public-api.d.ts +0 -26
- /package/{assets → src/assets}/fonts/siemens/SH-Bree-Headline-Oblique.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SH-Bree-Headline-Oblique.woff2 +0 -0
- /package/{assets → src/assets}/fonts/siemens/SH-Bree-Headline-Regular.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SH-Bree-Headline-Regular.woff2 +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Black.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Black.woff2 +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-BlackItalic.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-BlackItalic.woff2 +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Bold.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Bold.woff2 +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-BoldItalic.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-BoldItalic.woff2 +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Italic.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Italic.woff2 +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Roman.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Roman.woff2 +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<button
|
|
2
|
+
[ngClass]="{
|
|
3
|
+
'oc-chip': true,
|
|
4
|
+
selected: ocSelected,
|
|
5
|
+
'not-selectable': ocType !== 'select' && ocType !== 'select_remove',
|
|
6
|
+
'tag': ocType === 'tag',
|
|
7
|
+
'remove': ocType === 'remove' || ocType==='select_remove',
|
|
8
|
+
'green-bg': ocBg === 'green',
|
|
9
|
+
'red-bg': ocBg === 'red',
|
|
10
|
+
'yellow-bg': ocBg === 'yellow'
|
|
11
|
+
}"
|
|
12
|
+
type="button"
|
|
13
|
+
[title]="ocText"
|
|
14
|
+
(click)="ocType.includes('select') ? ocEvent($event) : null"
|
|
15
|
+
>
|
|
16
|
+
<ng-content></ng-content>
|
|
17
|
+
@if (ocType.includes('remove')) {
|
|
18
|
+
<span class="material-symbols-outlined" (click)="ocRemoveEvent($event)">close</span>
|
|
19
|
+
}
|
|
20
|
+
</button>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
@use '../../../styles/variables.scss';
|
|
2
|
+
|
|
3
|
+
.oc-chip {
|
|
4
|
+
background-color: variables.$color-gray-5;
|
|
5
|
+
color: variables.$color-gray-3;
|
|
6
|
+
|
|
7
|
+
border: 2px solid variables.$color-gray-4;
|
|
8
|
+
border-radius: 16px;
|
|
9
|
+
|
|
10
|
+
font-size: 1rem;
|
|
11
|
+
font-weight: 500;
|
|
12
|
+
|
|
13
|
+
padding: 3px 18px;
|
|
14
|
+
transition: 0.3s ease !important;
|
|
15
|
+
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
|
|
18
|
+
&:hover {
|
|
19
|
+
filter: brightness(0.95);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:active {
|
|
23
|
+
filter: brightness(0.85);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.selected {
|
|
28
|
+
background-color: #ccfbe6dc;
|
|
29
|
+
border: 2px solid variables.$color-brand-g-1;
|
|
30
|
+
color: variables.$color-brand-g-1;
|
|
31
|
+
|
|
32
|
+
&.red-bg{
|
|
33
|
+
color: variables.$color-error;
|
|
34
|
+
border-color: variables.$color-error;
|
|
35
|
+
|
|
36
|
+
background-color: #FFCACA;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.green-bg{
|
|
40
|
+
color: variables.$color-brand-g-1;
|
|
41
|
+
border-color: variables.$color-brand-g-1;
|
|
42
|
+
|
|
43
|
+
background-color: #ccfbe6dc;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.yellow-bg{
|
|
47
|
+
color: variables.$color-warning;
|
|
48
|
+
border-color: variables.$color-warning;
|
|
49
|
+
|
|
50
|
+
background-color: #FFFAEA;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.not-selectable {
|
|
55
|
+
border: none;
|
|
56
|
+
background-color: variables.$color-gray-5;
|
|
57
|
+
color: variables.$color-gray-3;
|
|
58
|
+
|
|
59
|
+
&:active {
|
|
60
|
+
cursor: not-allowed;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
cursor: default;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
.material-symbols-outlined{
|
|
68
|
+
font-size: 0.9rem;
|
|
69
|
+
width: 10px;
|
|
70
|
+
height: 10px;
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.remove{
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
gap: .5rem;
|
|
79
|
+
|
|
80
|
+
padding-right: .5rem;
|
|
81
|
+
|
|
82
|
+
&:hover{
|
|
83
|
+
filter: brightness(1);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
span{
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: center;
|
|
90
|
+
padding: 5px;
|
|
91
|
+
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
border-radius: 50%;
|
|
94
|
+
|
|
95
|
+
transition: 0.1s ease;
|
|
96
|
+
|
|
97
|
+
&:hover{
|
|
98
|
+
background-color: variables.$color-gray-4;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, EventEmitter, HostListener, Input, Output } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'oc-chip',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [CommonModule],
|
|
8
|
+
templateUrl: './oc-chip.component.html',
|
|
9
|
+
styleUrl: './oc-chip.component.scss'
|
|
10
|
+
})
|
|
11
|
+
export class OcChipComponent {
|
|
12
|
+
@Input() ocSelected: boolean = false
|
|
13
|
+
@Input() ocType: 'select' | 'remove' | 'tag' | 'select_remove' = 'select'
|
|
14
|
+
@Input() ocBg: 'green' | 'red' | 'yellow' | 'default' = 'green'
|
|
15
|
+
@Input() ocText: string = ''
|
|
16
|
+
@Output() ocClick: EventEmitter<any> = new EventEmitter<any>
|
|
17
|
+
@Output() ocRemove: EventEmitter<any> = new EventEmitter<any>
|
|
18
|
+
|
|
19
|
+
ocEvent(event:any) {
|
|
20
|
+
event.stopPropagation()
|
|
21
|
+
this.ocClick.emit()
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
ocRemoveEvent (event: any) {
|
|
25
|
+
event.stopPropagation()
|
|
26
|
+
if(!this.ocRemove.observed) {
|
|
27
|
+
this.ocClick.emit()
|
|
28
|
+
return
|
|
29
|
+
}
|
|
30
|
+
this.ocRemove.emit()
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<div class="oc-filter-row" [ngClass]="{
|
|
2
|
+
reverse: ocSide === 'right'
|
|
3
|
+
}">
|
|
4
|
+
<button class="oc-filter-btn" [ngClass]="{
|
|
5
|
+
shui: ocStyle === 'shui'
|
|
6
|
+
}" (click)="toggleOpen()">
|
|
7
|
+
<span class="material-symbols-outlined">filter_list</span>
|
|
8
|
+
{{ocText}}
|
|
9
|
+
<div class="badge">
|
|
10
|
+
<oc-badge *ngIf="ocActive > 0" ocSize="small" ocColor="success" [ocWaved]="true">{{ocActive}}</oc-badge>
|
|
11
|
+
</div>
|
|
12
|
+
</button>
|
|
13
|
+
|
|
14
|
+
<div class="filter-row-content">
|
|
15
|
+
<ng-content select="[row]"></ng-content>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
<div *ngIf="isOpen" class="oc-filter-content">
|
|
20
|
+
<ng-content select="[body]">
|
|
21
|
+
</ng-content>
|
|
22
|
+
</div>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@use '../../../styles/variables.scss';
|
|
2
|
+
|
|
3
|
+
.oc-filter-row{
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 1rem;
|
|
7
|
+
|
|
8
|
+
.filter-row-content{
|
|
9
|
+
width: 100%;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.reverse{
|
|
14
|
+
flex-direction: row-reverse;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.oc-filter-btn{
|
|
18
|
+
background-color: variables.$color-brand-p-1;
|
|
19
|
+
color: variables.$color-gray-6;
|
|
20
|
+
|
|
21
|
+
border: none;
|
|
22
|
+
border-radius: 0.5rem;
|
|
23
|
+
|
|
24
|
+
padding: 0.4rem 0.8rem;
|
|
25
|
+
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 0.2rem;
|
|
31
|
+
|
|
32
|
+
transition: 0.2s ease;
|
|
33
|
+
|
|
34
|
+
position: relative;
|
|
35
|
+
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
&:hover{
|
|
38
|
+
filter: brightness(0.9);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.material-symbols-outlined{
|
|
42
|
+
font-size: 1rem;
|
|
43
|
+
color: variables.$color-gray-5;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
img{
|
|
47
|
+
width: 15px;
|
|
48
|
+
filter: brightness(0) invert(1);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.badge{
|
|
52
|
+
position: absolute;
|
|
53
|
+
top: -8px;
|
|
54
|
+
right: -12px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.shui {
|
|
58
|
+
background-color: variables.$color-shui-ui-0 !important;
|
|
59
|
+
border-radius: 50px !important;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
.oc-filter-content{
|
|
65
|
+
width: 100%;
|
|
66
|
+
animation: showing-up 0.15s ease;
|
|
67
|
+
margin-top: 1rem;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@keyframes showing-up {
|
|
71
|
+
from{
|
|
72
|
+
height: 0px;
|
|
73
|
+
opacity: 0;
|
|
74
|
+
}to{
|
|
75
|
+
height: 100%;
|
|
76
|
+
opacity: 1;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { OcFilterComponent } from './oc-filter.component';
|
|
4
|
+
|
|
5
|
+
describe('OcFilterComponent', () => {
|
|
6
|
+
let component: OcFilterComponent;
|
|
7
|
+
let fixture: ComponentFixture<OcFilterComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [OcFilterComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(OcFilterComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
2
|
+
import { AfterViewInit, Component, Input } from '@angular/core'
|
|
3
|
+
import { OcBadgeComponent } from '../oc-badge/oc-badge.component'
|
|
4
|
+
import { OcStyleThemeType } from '../../interfaces/oc-style-theme'
|
|
5
|
+
import { StyleThemeService } from '../../services/style-theme.service'
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'oc-filter',
|
|
9
|
+
standalone: true,
|
|
10
|
+
imports: [CommonModule, OcBadgeComponent],
|
|
11
|
+
templateUrl: './oc-filter.component.html',
|
|
12
|
+
styleUrl: './oc-filter.component.scss',
|
|
13
|
+
})
|
|
14
|
+
export class OcFilterComponent implements AfterViewInit {
|
|
15
|
+
@Input() isOpen: boolean = false
|
|
16
|
+
@Input() ocText: string = 'Filtros'
|
|
17
|
+
@Input() ocActive: number = 0
|
|
18
|
+
@Input() ocSide: 'left' | 'right' = 'left'
|
|
19
|
+
@Input() ocStyle: OcStyleThemeType = 'otimus'
|
|
20
|
+
|
|
21
|
+
constructor(private styleThemeService: StyleThemeService) {}
|
|
22
|
+
|
|
23
|
+
ngAfterViewInit(): void {
|
|
24
|
+
this.ocStyle = this.styleThemeService.getStyleTheme() || this.ocStyle
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
toggleOpen() {
|
|
28
|
+
this.isOpen = !this.isOpen
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<div [ngClass]="{
|
|
2
|
+
'oc-input-box': !ocStyle || ocStyle === 'otimus',
|
|
3
|
+
small: ocSize === 'small',
|
|
4
|
+
large: ocSize === 'large',
|
|
5
|
+
error: !!ocError,
|
|
6
|
+
prefix: hasPrefix,
|
|
7
|
+
suffix: hasSuffix,
|
|
8
|
+
'shui': ocStyle === 'shui',
|
|
9
|
+
'shui-input-box': ocStyle === 'shui'
|
|
10
|
+
}" [id]="inputId">
|
|
11
|
+
<ng-content></ng-content>
|
|
12
|
+
<ng-content select="ocPrefix"></ng-content>
|
|
13
|
+
<ng-content select="ocSuffix"></ng-content>
|
|
14
|
+
<label>
|
|
15
|
+
<span [innerHTML]="ocPlaceholder"></span>
|
|
16
|
+
@if(ocRequired) {
|
|
17
|
+
<span class="oc color error">*</span>
|
|
18
|
+
}
|
|
19
|
+
</label>
|
|
20
|
+
<small *ngIf="ocError" class="error-msg">{{ocError}}</small>
|
|
21
|
+
</div>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
2
|
+
import {
|
|
3
|
+
AfterContentChecked,
|
|
4
|
+
AfterViewInit,
|
|
5
|
+
Component,
|
|
6
|
+
ContentChild,
|
|
7
|
+
ElementRef,
|
|
8
|
+
HostBinding,
|
|
9
|
+
Input,
|
|
10
|
+
OnChanges,
|
|
11
|
+
Renderer2,
|
|
12
|
+
SimpleChanges,
|
|
13
|
+
ViewEncapsulation,
|
|
14
|
+
} from '@angular/core'
|
|
15
|
+
import { OcStyleThemeType } from '../../interfaces/oc-style-theme'
|
|
16
|
+
import { StyleThemeService } from '../../services/style-theme.service'
|
|
17
|
+
|
|
18
|
+
@Component({
|
|
19
|
+
selector: 'oc-input',
|
|
20
|
+
host: {
|
|
21
|
+
'[style.width]': 'computedWidth',
|
|
22
|
+
'[style.min-width]': 'computedMinWidth',
|
|
23
|
+
'[style.max-width]': 'computedMaxWidth',
|
|
24
|
+
},
|
|
25
|
+
standalone: true,
|
|
26
|
+
imports: [CommonModule],
|
|
27
|
+
templateUrl: './oc-input.component.html',
|
|
28
|
+
styleUrls: ['./oc-input.component.scss'],
|
|
29
|
+
encapsulation: ViewEncapsulation.None,
|
|
30
|
+
})
|
|
31
|
+
export class OcInputComponent implements AfterViewInit, OnChanges, AfterContentChecked {
|
|
32
|
+
@ContentChild('ocPrefix') ocPrefix: any
|
|
33
|
+
@ContentChild('ocSuffix') ocSuffix: any
|
|
34
|
+
|
|
35
|
+
@Input() ocError?: string
|
|
36
|
+
@Input() ocSize?: 'small' | 'medium' | 'large' = 'medium'
|
|
37
|
+
@Input() ocPlaceholder: string = ''
|
|
38
|
+
@Input() ocWidth?: string
|
|
39
|
+
@Input() ocMinWidth?: string
|
|
40
|
+
@Input() ocMaxWidth?: string
|
|
41
|
+
@Input() ocRequired: boolean = false
|
|
42
|
+
@Input() ocStyle: OcStyleThemeType = 'otimus'
|
|
43
|
+
|
|
44
|
+
inputId: string = `oc-${Math.random()}`
|
|
45
|
+
hasSuffix: boolean = false
|
|
46
|
+
hasPrefix: boolean = false
|
|
47
|
+
|
|
48
|
+
@HostBinding('style.width')
|
|
49
|
+
get computedWidth() {
|
|
50
|
+
return this.ocWidth ? this.ocWidth : null
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@HostBinding('style.min-width')
|
|
54
|
+
get computedMinWidth() {
|
|
55
|
+
return this.ocMinWidth || '0'
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@HostBinding('style.max-width')
|
|
59
|
+
get computedMaxWidth() {
|
|
60
|
+
return this.ocMaxWidth || '100%'
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
constructor(
|
|
64
|
+
private el: ElementRef,
|
|
65
|
+
private renderer: Renderer2,
|
|
66
|
+
private styleThemeService: StyleThemeService
|
|
67
|
+
) {}
|
|
68
|
+
|
|
69
|
+
ngOnChanges(changes: SimpleChanges): void {
|
|
70
|
+
if (this.ocPrefix) {
|
|
71
|
+
this.hasPrefix = true
|
|
72
|
+
}
|
|
73
|
+
if (this.ocSuffix) {
|
|
74
|
+
this.hasSuffix = true
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
ngAfterViewInit(): void {
|
|
79
|
+
this.ocStyle = this.styleThemeService.getStyleTheme() || this.ocStyle
|
|
80
|
+
const inputBox = this.el.nativeElement
|
|
81
|
+
|
|
82
|
+
if (inputBox) {
|
|
83
|
+
const inputElement = inputBox.querySelector('input')
|
|
84
|
+
|
|
85
|
+
if (inputElement) {
|
|
86
|
+
this.renderer.setAttribute(inputElement, 'placeholder', '')
|
|
87
|
+
this.renderer.setAttribute(inputElement, 'required', this.ocRequired.toString())
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
ngAfterContentChecked(): void {
|
|
93
|
+
if (this.ocPrefix) {
|
|
94
|
+
this.hasPrefix = true
|
|
95
|
+
}
|
|
96
|
+
if (this.ocSuffix) {
|
|
97
|
+
this.hasSuffix = true
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@use '../../../styles/variables.scss';
|
|
2
|
+
|
|
3
|
+
.oc-key-value{
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 0.1rem;
|
|
7
|
+
|
|
8
|
+
font-size: 1rem;
|
|
9
|
+
|
|
10
|
+
p{
|
|
11
|
+
color: variables.$color-gray-2;
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
span{
|
|
16
|
+
color: variables.$color-brand-p-1;
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.material-symbols-outlined{
|
|
21
|
+
color: variables.$color-brand-p-1;
|
|
22
|
+
font-size: 0.95rem;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@import './styles/oc-key-value.shui-component.scss';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
2
|
+
import { AfterViewInit, Component, Input, ViewEncapsulation } from '@angular/core'
|
|
3
|
+
import { OcStyleThemeType } from '../../interfaces/oc-style-theme'
|
|
4
|
+
import { StyleThemeService } from '../../services/style-theme.service'
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'oc-key-value',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [CommonModule],
|
|
10
|
+
templateUrl: './oc-key-value.component.html',
|
|
11
|
+
styleUrl: './oc-key-value.component.scss',
|
|
12
|
+
encapsulation: ViewEncapsulation.None,
|
|
13
|
+
})
|
|
14
|
+
export class OcKeyValueComponent implements AfterViewInit {
|
|
15
|
+
constructor(private styleThemeService: StyleThemeService) {}
|
|
16
|
+
@Input() ocKey: string = ''
|
|
17
|
+
@Input() ocValue: string = ''
|
|
18
|
+
@Input() ocStyle: OcStyleThemeType = 'otimus'
|
|
19
|
+
|
|
20
|
+
ngAfterViewInit(): void {
|
|
21
|
+
this.ocStyle = this.styleThemeService.getStyleTheme() || this.ocStyle
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@use '../../../../styles/variables.scss';
|
|
2
|
+
|
|
3
|
+
.shui {
|
|
4
|
+
&.oc-key-value{
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: 0.1rem;
|
|
8
|
+
|
|
9
|
+
font-size: 1rem;
|
|
10
|
+
|
|
11
|
+
p{
|
|
12
|
+
color: variables.$color-shui-ui-5;
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
span{
|
|
17
|
+
color: variables.$color-shui-ui-8;
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.material-symbols-outlined{
|
|
22
|
+
color: variables.$color-shui-ui-8;
|
|
23
|
+
font-size: 0.95rem;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<div class="oc-log">
|
|
2
|
+
<div class="left-side" [ngClass]="{
|
|
3
|
+
'has-profile': ocProfilePic || ocUserName
|
|
4
|
+
}">
|
|
5
|
+
@if(ocProfilePic || ocUserName) {
|
|
6
|
+
<oc-profile [ocProfilePic]="ocProfilePic" [ocUserName]="ocUserName">
|
|
7
|
+
</oc-profile>
|
|
8
|
+
} @else {
|
|
9
|
+
<div class="dot"></div>
|
|
10
|
+
}
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div class="content" [ngClass]="{
|
|
14
|
+
'has-profile-content': ocProfilePic || ocUserName
|
|
15
|
+
}" selector="[content]">
|
|
16
|
+
<ng-content></ng-content>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@use '../../../styles/variables.scss';
|
|
2
|
+
|
|
3
|
+
.oc-log{
|
|
4
|
+
width: 100%;
|
|
5
|
+
|
|
6
|
+
margin: 0;
|
|
7
|
+
|
|
8
|
+
border-left: 3px solid variables.$color-gray-4;
|
|
9
|
+
position: relative;
|
|
10
|
+
|
|
11
|
+
padding: 4rem 0;
|
|
12
|
+
padding-top: 0;
|
|
13
|
+
|
|
14
|
+
border-radius: 1rem;
|
|
15
|
+
border-bottom-left-radius: 0;
|
|
16
|
+
border-top-left-radius: 0;
|
|
17
|
+
|
|
18
|
+
transition: .2s ease;
|
|
19
|
+
|
|
20
|
+
&:hover{
|
|
21
|
+
background-color: variables.$color-gray-5;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.has-profile{
|
|
25
|
+
left: -2.1rem !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.left-side{
|
|
29
|
+
position: absolute;
|
|
30
|
+
z-index: 8;
|
|
31
|
+
left: -.6rem;
|
|
32
|
+
top: 0;
|
|
33
|
+
height: 100%;
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: flex-start;
|
|
36
|
+
|
|
37
|
+
.dot{
|
|
38
|
+
width: 1rem;
|
|
39
|
+
height: 1rem;
|
|
40
|
+
|
|
41
|
+
border-radius: .2rem;
|
|
42
|
+
transform: rotate(45deg);
|
|
43
|
+
|
|
44
|
+
background-color: variables.$color-brand-p-1;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.content{
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: row;
|
|
52
|
+
align-items: flex-start;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
|
|
55
|
+
padding-left: 2rem;
|
|
56
|
+
padding-top: 1.5rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.has-profile-content{
|
|
60
|
+
padding-left: 3rem;
|
|
61
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { OcProfileComponent } from '../oc-profile/oc-profile.component';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'oc-log',
|
|
7
|
+
standalone: true,
|
|
8
|
+
imports: [CommonModule, OcProfileComponent],
|
|
9
|
+
templateUrl: './oc-log.component.html',
|
|
10
|
+
styleUrl: './oc-log.component.scss'
|
|
11
|
+
})
|
|
12
|
+
export class OcLogComponent {
|
|
13
|
+
@Input() ocProfilePic?: string = ''
|
|
14
|
+
@Input() ocUserName?: string = ''
|
|
15
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<div class="oc-menu" *ngIf="isMenuShown" cdkMenu #ocMenuEl>
|
|
2
|
+
<ul>
|
|
3
|
+
@for(option of ocMenu; track $index) {
|
|
4
|
+
<li
|
|
5
|
+
[ngClass]="{
|
|
6
|
+
'checkbox-option cbx': typeof(option.checked) === 'boolean'
|
|
7
|
+
}"
|
|
8
|
+
>
|
|
9
|
+
@if(typeof(option.checked) === 'boolean'){
|
|
10
|
+
<div class="checkbox-opt cbx">
|
|
11
|
+
<oc-checkbox (ocChange)="changeCheckbox(option.name, $event)" [ocChecked]="option.checked!" class="cbx" ocSize="tiny" [ocLabel]="option.name" ocBorderColor="gray"/>
|
|
12
|
+
</div>
|
|
13
|
+
}
|
|
14
|
+
@if(option.icon) {
|
|
15
|
+
<span class="material-symbols-outlined">
|
|
16
|
+
{{option.icon}}
|
|
17
|
+
</span>
|
|
18
|
+
}
|
|
19
|
+
@if(option.callback){
|
|
20
|
+
<button (click)="option.callback()">{{option.name}}</button>
|
|
21
|
+
}
|
|
22
|
+
@if(option.url){
|
|
23
|
+
<a [href]="option.url" [target]="option.targetBlank ? '_blank' : ''">{{option.name}}</a>
|
|
24
|
+
}
|
|
25
|
+
@if (!option.callback && !option.url && typeof(option.checked) !== 'boolean') {
|
|
26
|
+
<span>{{option.name}}</span>
|
|
27
|
+
}
|
|
28
|
+
</li>
|
|
29
|
+
}
|
|
30
|
+
</ul>
|
|
31
|
+
</div>
|