otimus-library 0.2.48 → 0.2.50
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/esm2022/lib/components/oc-accordion/oc-accordion.component.mjs +48 -0
- package/esm2022/lib/components/oc-accordion-item/oc-accordion-item.component.mjs +35 -0
- package/esm2022/lib/components/oc-autocomplete/oc-autocomplete.component.mjs +275 -0
- package/esm2022/lib/components/oc-badge/oc-badge.component.mjs +30 -0
- package/esm2022/lib/components/oc-checkbox/oc-checkbox.component.mjs +133 -0
- package/esm2022/lib/components/oc-chip/oc-chip.component.mjs +45 -0
- package/esm2022/lib/components/oc-filter/oc-filter.component.mjs +39 -0
- package/esm2022/lib/components/oc-input/oc-input.component.mjs +97 -0
- package/esm2022/lib/components/oc-key-value/oc-key-value.component.mjs +29 -0
- package/esm2022/lib/components/oc-log/oc-log.component.mjs +22 -0
- package/esm2022/lib/components/oc-menu/oc-menu.component.mjs +81 -0
- package/esm2022/lib/components/oc-modal/oc-modal.component.mjs +85 -0
- package/esm2022/lib/components/oc-modal-footer/oc-modal-footer.component.mjs +23 -0
- package/esm2022/lib/components/oc-not-found/oc-not-found.component.mjs +11 -0
- package/esm2022/lib/components/oc-pagination/oc-pagination.component.mjs +49 -0
- package/esm2022/lib/components/oc-profile/oc-profile.component.mjs +38 -0
- package/esm2022/lib/components/oc-step/oc-step.component.mjs +49 -0
- package/esm2022/lib/components/oc-stepper/oc-stepper.component.mjs +90 -0
- package/esm2022/lib/components/oc-tab/oc-tab.component.mjs +20 -0
- package/esm2022/lib/components/oc-tabs/oc-tabs.component.mjs +42 -0
- package/esm2022/lib/components/oc-toast/oc-toast.component.mjs +17 -0
- package/esm2022/lib/components/oc-toggle/oc-toggle.component.mjs +34 -0
- package/esm2022/lib/directives/oc-tooltip/oc-tooltip.directive.mjs +117 -0
- package/esm2022/lib/interfaces/oc-autocomplete.mjs +2 -0
- package/esm2022/lib/interfaces/oc-menu.mjs +2 -0
- package/esm2022/lib/interfaces/oc-style-theme.mjs +2 -0
- package/esm2022/lib/interfaces/oc-toast.mjs +2 -0
- package/esm2022/lib/otimus-library.component.mjs +19 -0
- package/esm2022/lib/otimus-library.service.mjs +14 -0
- package/esm2022/lib/services/internationalization.service.mjs +68 -0
- package/esm2022/lib/services/oc-toast.service.mjs +81 -0
- package/esm2022/lib/services/style-theme.service.mjs +21 -0
- package/esm2022/otimus-library.mjs +5 -0
- package/esm2022/public-api.mjs +30 -0
- package/fesm2022/otimus-library.mjs +1513 -0
- package/fesm2022/otimus-library.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/oc-accordion/oc-accordion.component.d.ts +18 -0
- package/lib/components/oc-accordion-item/oc-accordion-item.component.d.ts +12 -0
- package/lib/components/oc-autocomplete/oc-autocomplete.component.d.ts +68 -0
- package/lib/components/oc-badge/oc-badge.component.d.ts +11 -0
- package/lib/components/oc-checkbox/oc-checkbox.component.d.ts +35 -0
- package/lib/components/oc-chip/oc-chip.component.d.ts +14 -0
- package/lib/components/oc-filter/oc-filter.component.d.ts +17 -0
- package/lib/components/oc-input/oc-input.component.d.ts +31 -0
- package/lib/components/oc-key-value/oc-key-value.component.d.ts +14 -0
- package/lib/components/oc-log/oc-log.component.d.ts +7 -0
- package/lib/components/oc-menu/oc-menu.component.d.ts +20 -0
- package/lib/components/oc-modal/oc-modal.component.d.ts +30 -0
- package/lib/components/oc-modal-footer/oc-modal-footer.component.d.ts +8 -0
- package/lib/components/oc-not-found/oc-not-found.component.d.ts +5 -0
- package/lib/components/oc-pagination/oc-pagination.component.d.ts +14 -0
- package/lib/components/oc-profile/oc-profile.component.d.ts +12 -0
- package/lib/components/oc-step/oc-step.component.d.ts +22 -0
- package/lib/components/oc-stepper/oc-stepper.component.d.ts +24 -0
- package/lib/components/oc-tab/oc-tab.component.d.ts +8 -0
- package/lib/components/oc-tabs/oc-tabs.component.d.ts +18 -0
- package/lib/components/oc-toast/oc-toast.component.d.ts +8 -0
- package/lib/components/oc-toggle/oc-toggle.component.d.ts +12 -0
- package/lib/directives/oc-tooltip/oc-tooltip.directive.d.ts +20 -0
- package/lib/interfaces/oc-autocomplete.d.ts +5 -0
- package/lib/interfaces/oc-menu.d.ts +9 -0
- package/lib/interfaces/oc-style-theme.d.ts +2 -0
- package/lib/interfaces/oc-toast.d.ts +8 -0
- package/lib/otimus-library.component.d.ts +5 -0
- package/lib/otimus-library.service.d.ts +6 -0
- package/lib/services/internationalization.service.d.ts +17 -0
- package/lib/services/oc-toast.service.d.ts +14 -0
- package/lib/services/style-theme.service.d.ts +8 -0
- package/package.json +13 -4
- package/public-api.d.ts +26 -0
- package/ng-package.json +0 -12
- 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 +0 -3
- package/src/lib/components/oc-accordion/oc-accordion.component.scss +0 -4
- package/src/lib/components/oc-accordion/oc-accordion.component.ts +0 -44
- package/src/lib/components/oc-accordion-item/oc-accordion-item.component.html +0 -19
- package/src/lib/components/oc-accordion-item/oc-accordion-item.component.scss +0 -86
- package/src/lib/components/oc-accordion-item/oc-accordion-item.component.ts +0 -27
- package/src/lib/components/oc-accordion-item/styles/oc-accordion-item.shui-component.scss +0 -41
- package/src/lib/components/oc-autocomplete/oc-autocomplete.component.html +0 -66
- package/src/lib/components/oc-autocomplete/oc-autocomplete.component.scss +0 -157
- package/src/lib/components/oc-autocomplete/oc-autocomplete.component.ts +0 -277
- package/src/lib/components/oc-badge/oc-badge.component.html +0 -7
- package/src/lib/components/oc-badge/oc-badge.component.scss +0 -125
- package/src/lib/components/oc-badge/oc-badge.component.ts +0 -22
- package/src/lib/components/oc-checkbox/oc-checkbox.component.html +0 -30
- package/src/lib/components/oc-checkbox/oc-checkbox.component.scss +0 -103
- package/src/lib/components/oc-checkbox/oc-checkbox.component.ts +0 -132
- package/src/lib/components/oc-checkbox/styles/oc-checkbox.shui-component.scss +0 -21
- package/src/lib/components/oc-chip/oc-chip.component.html +0 -20
- package/src/lib/components/oc-chip/oc-chip.component.scss +0 -102
- package/src/lib/components/oc-chip/oc-chip.component.ts +0 -32
- package/src/lib/components/oc-filter/oc-filter.component.html +0 -22
- package/src/lib/components/oc-filter/oc-filter.component.scss +0 -78
- package/src/lib/components/oc-filter/oc-filter.component.spec.ts +0 -23
- package/src/lib/components/oc-filter/oc-filter.component.ts +0 -30
- package/src/lib/components/oc-input/oc-input.component.html +0 -21
- package/src/lib/components/oc-input/oc-input.component.scss +0 -3
- package/src/lib/components/oc-input/oc-input.component.ts +0 -100
- package/src/lib/components/oc-key-value/oc-key-value.component.html +0 -12
- package/src/lib/components/oc-key-value/oc-key-value.component.scss +0 -26
- package/src/lib/components/oc-key-value/oc-key-value.component.ts +0 -23
- package/src/lib/components/oc-key-value/styles/oc-key-value.shui-component.scss +0 -26
- package/src/lib/components/oc-log/oc-log.component.html +0 -18
- package/src/lib/components/oc-log/oc-log.component.scss +0 -61
- package/src/lib/components/oc-log/oc-log.component.ts +0 -15
- package/src/lib/components/oc-menu/oc-menu.component.html +0 -31
- package/src/lib/components/oc-menu/oc-menu.component.scss +0 -101
- package/src/lib/components/oc-menu/oc-menu.component.ts +0 -84
- package/src/lib/components/oc-modal/oc-modal.component.html +0 -54
- package/src/lib/components/oc-modal/oc-modal.component.scss +0 -204
- package/src/lib/components/oc-modal/oc-modal.component.ts +0 -82
- package/src/lib/components/oc-modal/styles/oc-modal.shui-component.scss +0 -3
- package/src/lib/components/oc-modal-footer/oc-modal-footer.component.html +0 -11
- package/src/lib/components/oc-modal-footer/oc-modal-footer.component.scss +0 -27
- package/src/lib/components/oc-modal-footer/oc-modal-footer.component.ts +0 -15
- package/src/lib/components/oc-not-found/oc-not-found.component.html +0 -14
- package/src/lib/components/oc-not-found/oc-not-found.component.scss +0 -153
- package/src/lib/components/oc-not-found/oc-not-found.component.spec.ts +0 -23
- package/src/lib/components/oc-not-found/oc-not-found.component.ts +0 -12
- package/src/lib/components/oc-pagination/oc-pagination.component.html +0 -32
- package/src/lib/components/oc-pagination/oc-pagination.component.scss +0 -80
- package/src/lib/components/oc-pagination/oc-pagination.component.ts +0 -46
- package/src/lib/components/oc-profile/oc-profile.component.html +0 -17
- package/src/lib/components/oc-profile/oc-profile.component.scss +0 -80
- package/src/lib/components/oc-profile/oc-profile.component.ts +0 -38
- package/src/lib/components/oc-step/oc-step.component.html +0 -32
- package/src/lib/components/oc-step/oc-step.component.scss +0 -106
- package/src/lib/components/oc-step/oc-step.component.ts +0 -39
- package/src/lib/components/oc-step/styles/oc-step.shui-component.scss +0 -52
- package/src/lib/components/oc-stepper/oc-stepper.component.html +0 -3
- package/src/lib/components/oc-stepper/oc-stepper.component.scss +0 -9
- package/src/lib/components/oc-stepper/oc-stepper.component.ts +0 -86
- package/src/lib/components/oc-tab/oc-tab.component.html +0 -3
- package/src/lib/components/oc-tab/oc-tab.component.scss +0 -0
- package/src/lib/components/oc-tab/oc-tab.component.ts +0 -15
- package/src/lib/components/oc-table/oc-table.component.html +0 -62
- package/src/lib/components/oc-table/oc-table.component.scss +0 -2
- package/src/lib/components/oc-table/oc-table.component.ts +0 -51
- package/src/lib/components/oc-tabs/oc-tabs.component.html +0 -13
- package/src/lib/components/oc-tabs/oc-tabs.component.scss +0 -47
- package/src/lib/components/oc-tabs/oc-tabs.component.ts +0 -46
- package/src/lib/components/oc-tabs/styles/oc-tabs.shui-component.scss +0 -25
- package/src/lib/components/oc-toast/oc-toast.component.html +0 -46
- package/src/lib/components/oc-toast/oc-toast.component.scss +0 -133
- package/src/lib/components/oc-toast/oc-toast.component.ts +0 -15
- package/src/lib/components/oc-toggle/oc-toggle.component.html +0 -4
- package/src/lib/components/oc-toggle/oc-toggle.component.scss +0 -73
- package/src/lib/components/oc-toggle/oc-toggle.component.spec.ts +0 -23
- package/src/lib/components/oc-toggle/oc-toggle.component.ts +0 -32
- package/src/lib/directives/oc-tooltip/oc-tooltip.directive.ts +0 -108
- package/src/lib/interfaces/internal/languages.ts +0 -16
- package/src/lib/interfaces/oc-autocomplete.ts +0 -6
- package/src/lib/interfaces/oc-menu.ts +0 -10
- package/src/lib/interfaces/oc-style-theme.ts +0 -3
- package/src/lib/interfaces/oc-table.ts +0 -12
- package/src/lib/interfaces/oc-toast.ts +0 -8
- package/src/lib/otimus-library.component.ts +0 -16
- package/src/lib/otimus-library.service.ts +0 -9
- package/src/lib/services/internationalization.service.ts +0 -73
- package/src/lib/services/oc-toast.service.ts +0 -107
- package/src/lib/services/style-theme.service.ts +0 -19
- package/src/public-api.ts +0 -30
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
- /package/{src/assets → assets}/fonts/siemens/SH-Bree-Headline-Oblique.woff +0 -0
- /package/{src/assets → assets}/fonts/siemens/SH-Bree-Headline-Oblique.woff2 +0 -0
- /package/{src/assets → assets}/fonts/siemens/SH-Bree-Headline-Regular.woff +0 -0
- /package/{src/assets → assets}/fonts/siemens/SH-Bree-Headline-Regular.woff2 +0 -0
- /package/{src/assets → assets}/fonts/siemens/SiemensSans-Black.woff +0 -0
- /package/{src/assets → assets}/fonts/siemens/SiemensSans-Black.woff2 +0 -0
- /package/{src/assets → assets}/fonts/siemens/SiemensSans-BlackItalic.woff +0 -0
- /package/{src/assets → assets}/fonts/siemens/SiemensSans-BlackItalic.woff2 +0 -0
- /package/{src/assets → assets}/fonts/siemens/SiemensSans-Bold.woff +0 -0
- /package/{src/assets → assets}/fonts/siemens/SiemensSans-Bold.woff2 +0 -0
- /package/{src/assets → assets}/fonts/siemens/SiemensSans-BoldItalic.woff +0 -0
- /package/{src/assets → assets}/fonts/siemens/SiemensSans-BoldItalic.woff2 +0 -0
- /package/{src/assets → assets}/fonts/siemens/SiemensSans-Italic.woff +0 -0
- /package/{src/assets → assets}/fonts/siemens/SiemensSans-Italic.woff2 +0 -0
- /package/{src/assets → assets}/fonts/siemens/SiemensSans-Roman.woff +0 -0
- /package/{src/assets → assets}/fonts/siemens/SiemensSans-Roman.woff2 +0 -0
- /package/{src/styles → styles}/colors.scss +0 -0
- /package/{src/styles → styles}/components/buttons/buttons.scss +0 -0
- /package/{src/styles → styles}/components/buttons/buttons.shui.scss +0 -0
- /package/{src/styles → styles}/components/index.scss +0 -0
- /package/{src/styles → styles}/components/inputs/inputs.scss +0 -0
- /package/{src/styles → styles}/components/inputs/inputs.shui.scss +0 -0
- /package/{src/styles → styles}/components/table/table.scss +0 -0
- /package/{src/styles → styles}/components/table/table.shui.scss +0 -0
- /package/{src/styles → styles}/components/tooltip.scss +0 -0
- /package/{src/styles → styles}/grid.scss +0 -0
- /package/{src/styles → styles}/patterns/shui/colors.shui.scss +0 -0
- /package/{src/styles → styles}/patterns/shui/fonts.shui.scss +0 -0
- /package/{src/styles → styles}/patterns/shui/index.shui.scss +0 -0
- /package/{src/styles → styles}/patterns/shui/variables.shui.scss +0 -0
- /package/{src/styles → styles}/states.scss +0 -0
- /package/{src/styles → styles}/styles.scss +0 -0
- /package/{src/styles → styles}/variables.scss +0 -0
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
@use '../../../styles/variables.scss';
|
|
2
|
-
|
|
3
|
-
.oc-checkbox-content{
|
|
4
|
-
display: flex;
|
|
5
|
-
align-items: center;
|
|
6
|
-
|
|
7
|
-
padding: 0;
|
|
8
|
-
margin: 0;
|
|
9
|
-
border: none;
|
|
10
|
-
background-color: transparent;
|
|
11
|
-
|
|
12
|
-
gap: .3rem;
|
|
13
|
-
|
|
14
|
-
.oc-checkbox-label{
|
|
15
|
-
background-color: transparent;
|
|
16
|
-
border: none;
|
|
17
|
-
|
|
18
|
-
color: variables.$color-gray-3;
|
|
19
|
-
font-weight: 500;
|
|
20
|
-
text-align: left;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.oc-checkbox{
|
|
25
|
-
min-width: 1rem;
|
|
26
|
-
min-width: 1rem;
|
|
27
|
-
|
|
28
|
-
width: 1.2rem;
|
|
29
|
-
height: 1.2rem;
|
|
30
|
-
|
|
31
|
-
border-radius: .3rem;
|
|
32
|
-
background-color: variables.$color-gray-5;
|
|
33
|
-
border: 2px solid variables.$color-white;
|
|
34
|
-
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
justify-content: center;
|
|
38
|
-
|
|
39
|
-
transition: .15s ease;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
&:hover{
|
|
42
|
-
filter: brightness(0.95);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
overflow: hidden;
|
|
46
|
-
|
|
47
|
-
.check-icon{
|
|
48
|
-
|
|
49
|
-
font-weight: 700;
|
|
50
|
-
|
|
51
|
-
color: variables.$color-gray-6;
|
|
52
|
-
opacity: 0;
|
|
53
|
-
|
|
54
|
-
pointer-events: none;
|
|
55
|
-
|
|
56
|
-
margin: 0;
|
|
57
|
-
font-size: 1.15rem;
|
|
58
|
-
|
|
59
|
-
transition: .2s ease;
|
|
60
|
-
|
|
61
|
-
transform: translateY(15px) scale(0.5);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.oc-checkbox.gray-border{
|
|
66
|
-
border: 2px solid variables.$color-gray-4;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.oc-checkbox.tiny{
|
|
70
|
-
width: 1rem;
|
|
71
|
-
height: 1rem;
|
|
72
|
-
|
|
73
|
-
border: 1px solid variables.$color-white;
|
|
74
|
-
&.gray{
|
|
75
|
-
border: 1px solid variables.$color-gray-4;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.checked {
|
|
80
|
-
background-color: variables.$color-brand-g-1;
|
|
81
|
-
box-shadow: 0px 2px 10px 0px rgba(0, 221, 163, 0.17);
|
|
82
|
-
|
|
83
|
-
.check-icon{
|
|
84
|
-
transform: translateY(0) scale(1);
|
|
85
|
-
|
|
86
|
-
opacity: 1;
|
|
87
|
-
|
|
88
|
-
color: variables.$color-gray-6;
|
|
89
|
-
}
|
|
90
|
-
border: none !important;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.checked.purple{
|
|
94
|
-
background-color: variables.$color-brand-p-1;
|
|
95
|
-
box-shadow: 0px 2px 10px 0px rgba(85, 5, 162, 0.2);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.label{
|
|
99
|
-
width: 18.4px !important;
|
|
100
|
-
height: 18.4px !important;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
@import './styles/oc-checkbox.shui-component.scss';
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common'
|
|
2
|
-
import {
|
|
3
|
-
AfterViewInit,
|
|
4
|
-
ChangeDetectionStrategy,
|
|
5
|
-
ChangeDetectorRef,
|
|
6
|
-
Component,
|
|
7
|
-
EventEmitter,
|
|
8
|
-
forwardRef,
|
|
9
|
-
Input,
|
|
10
|
-
Output,
|
|
11
|
-
} from '@angular/core'
|
|
12
|
-
import {
|
|
13
|
-
ControlValueAccessor,
|
|
14
|
-
FormControl,
|
|
15
|
-
FormsModule,
|
|
16
|
-
NG_VALUE_ACCESSOR,
|
|
17
|
-
ReactiveFormsModule,
|
|
18
|
-
} from '@angular/forms'
|
|
19
|
-
import { StyleThemeService } from '../../services/style-theme.service'
|
|
20
|
-
import { OcStyleThemeType } from '../../interfaces/oc-style-theme'
|
|
21
|
-
|
|
22
|
-
@Component({
|
|
23
|
-
selector: 'oc-checkbox',
|
|
24
|
-
standalone: true,
|
|
25
|
-
imports: [CommonModule, FormsModule, ReactiveFormsModule],
|
|
26
|
-
templateUrl: './oc-checkbox.component.html',
|
|
27
|
-
styleUrl: './oc-checkbox.component.scss',
|
|
28
|
-
providers: [
|
|
29
|
-
{
|
|
30
|
-
provide: NG_VALUE_ACCESSOR,
|
|
31
|
-
useExisting: forwardRef(() => OcCheckboxComponent),
|
|
32
|
-
multi: true,
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
changeDetection: ChangeDetectionStrategy.Default,
|
|
36
|
-
})
|
|
37
|
-
export class OcCheckboxComponent implements ControlValueAccessor, AfterViewInit {
|
|
38
|
-
checkBoxId: string = `oc-${Math.random()}`
|
|
39
|
-
|
|
40
|
-
constructor(
|
|
41
|
-
private styleThemeService: StyleThemeService,
|
|
42
|
-
private cdr: ChangeDetectorRef
|
|
43
|
-
) {}
|
|
44
|
-
|
|
45
|
-
@Output() ocChange = new EventEmitter<boolean>()
|
|
46
|
-
|
|
47
|
-
@Input() ocChecked: boolean = false
|
|
48
|
-
@Input() ocSize: 'tiny' | 'small' = 'small'
|
|
49
|
-
@Input() ocLabel?: string = ''
|
|
50
|
-
@Input() ocName?: string = ''
|
|
51
|
-
@Input() ocColor: 'purple' | 'green' = 'green'
|
|
52
|
-
@Input() ocBorderColor: 'white' | 'gray' = 'white'
|
|
53
|
-
@Input() ocStyle: OcStyleThemeType = 'otimus'
|
|
54
|
-
@Output() ocDoubleClick = new EventEmitter<boolean>()
|
|
55
|
-
@Input() formControl?: FormControl
|
|
56
|
-
@Input() ocTabIndex?: number
|
|
57
|
-
@Input() disableDoubleClickCheck = true
|
|
58
|
-
|
|
59
|
-
private onChange?: (value: boolean) => void
|
|
60
|
-
private onTouched = (): void => {}
|
|
61
|
-
|
|
62
|
-
ngAfterViewInit(): void {
|
|
63
|
-
this.ocStyle = this.styleThemeService.getStyleTheme() || this.ocStyle
|
|
64
|
-
this.cdr.markForCheck()
|
|
65
|
-
this.cdr.detectChanges()
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
writeValue(value: boolean): void {
|
|
69
|
-
this.ocChecked = value
|
|
70
|
-
this.cdr.markForCheck()
|
|
71
|
-
this.cdr.detectChanges()
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
registerOnChange(fn: (value: boolean) => void): void {
|
|
75
|
-
this.onChange = fn
|
|
76
|
-
this.cdr.markForCheck()
|
|
77
|
-
this.cdr.detectChanges()
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
registerOnTouched(fn: () => void): void {
|
|
81
|
-
this.onTouched = fn
|
|
82
|
-
this.cdr.markForCheck()
|
|
83
|
-
this.cdr.detectChanges()
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
private doubleClickCounter = 0
|
|
87
|
-
private timeoutId: ReturnType<typeof setTimeout> | null = null
|
|
88
|
-
protected onDoubleClick(): void {
|
|
89
|
-
if (this.disableDoubleClickCheck) {
|
|
90
|
-
return
|
|
91
|
-
}
|
|
92
|
-
if (this.timeoutId) {
|
|
93
|
-
clearTimeout(this.timeoutId)
|
|
94
|
-
this.timeoutId = null
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (this.doubleClickCounter === 0) {
|
|
98
|
-
this.doubleClickCounter = 1
|
|
99
|
-
this.timeoutId = setTimeout(() => {
|
|
100
|
-
this.doubleClickCounter = 0
|
|
101
|
-
this.cdr.markForCheck()
|
|
102
|
-
setInterval(() => this.cdr.detectChanges(), 100)
|
|
103
|
-
}, 500)
|
|
104
|
-
} else {
|
|
105
|
-
this.doubleClickCounter = 0
|
|
106
|
-
if (this.ocDoubleClick && this.ocChecked) {
|
|
107
|
-
this.ocDoubleClick.emit(this.ocChecked)
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
this.cdr.markForCheck()
|
|
111
|
-
this.cdr.detectChanges()
|
|
112
|
-
}
|
|
113
|
-
toggleChecked(): void {
|
|
114
|
-
if (this.doubleClickCounter === 1) {
|
|
115
|
-
this.cdr.markForCheck()
|
|
116
|
-
this.cdr.detectChanges()
|
|
117
|
-
return
|
|
118
|
-
}
|
|
119
|
-
this.ocChecked = !this.ocChecked
|
|
120
|
-
if (this.onChange) {
|
|
121
|
-
this.onChange(this.ocChecked)
|
|
122
|
-
}
|
|
123
|
-
this.onTouched()
|
|
124
|
-
this.ocChange.emit(this.ocChecked)
|
|
125
|
-
|
|
126
|
-
if (this.formControl) {
|
|
127
|
-
this.formControl.setValue(this.ocChecked)
|
|
128
|
-
}
|
|
129
|
-
this.cdr.markForCheck()
|
|
130
|
-
this.cdr.detectChanges()
|
|
131
|
-
}
|
|
132
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
@use '../../../../styles/variables.scss';
|
|
2
|
-
|
|
3
|
-
.oc-checkbox-content.shui {
|
|
4
|
-
.oc-checkbox, .purple {
|
|
5
|
-
border-radius: 0.15rem;
|
|
6
|
-
background-color: variables.$color-shui-base-2;
|
|
7
|
-
|
|
8
|
-
&.gray-border {
|
|
9
|
-
border: 2px solid variables.$color-shui-ui-0;
|
|
10
|
-
background-color: transparent;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
&.checked {
|
|
14
|
-
background-color: variables.$color-shui-ui-0;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
span.cbx {
|
|
19
|
-
color: rgba(variables.$color-shui-ui-1, 0.75);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
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>
|
|
@@ -1,102 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
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>
|
|
@@ -1,78 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
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>
|
|
@@ -1,100 +0,0 @@
|
|
|
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
|
-
}
|