otimus-library 0.2.47 → 0.2.49

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.
Files changed (201) hide show
  1. package/esm2022/lib/components/oc-accordion/oc-accordion.component.mjs +48 -0
  2. package/esm2022/lib/components/oc-accordion-item/oc-accordion-item.component.mjs +35 -0
  3. package/esm2022/lib/components/oc-autocomplete/oc-autocomplete.component.mjs +275 -0
  4. package/esm2022/lib/components/oc-badge/oc-badge.component.mjs +30 -0
  5. package/esm2022/lib/components/oc-checkbox/oc-checkbox.component.mjs +133 -0
  6. package/esm2022/lib/components/oc-chip/oc-chip.component.mjs +45 -0
  7. package/esm2022/lib/components/oc-filter/oc-filter.component.mjs +39 -0
  8. package/esm2022/lib/components/oc-input/oc-input.component.mjs +97 -0
  9. package/esm2022/lib/components/oc-key-value/oc-key-value.component.mjs +29 -0
  10. package/esm2022/lib/components/oc-log/oc-log.component.mjs +22 -0
  11. package/esm2022/lib/components/oc-menu/oc-menu.component.mjs +81 -0
  12. package/esm2022/lib/components/oc-modal/oc-modal.component.mjs +85 -0
  13. package/esm2022/lib/components/oc-modal-footer/oc-modal-footer.component.mjs +23 -0
  14. package/esm2022/lib/components/oc-not-found/oc-not-found.component.mjs +11 -0
  15. package/esm2022/lib/components/oc-pagination/oc-pagination.component.mjs +49 -0
  16. package/esm2022/lib/components/oc-profile/oc-profile.component.mjs +38 -0
  17. package/esm2022/lib/components/oc-step/oc-step.component.mjs +49 -0
  18. package/esm2022/lib/components/oc-stepper/oc-stepper.component.mjs +90 -0
  19. package/esm2022/lib/components/oc-tab/oc-tab.component.mjs +20 -0
  20. package/esm2022/lib/components/oc-tabs/oc-tabs.component.mjs +42 -0
  21. package/esm2022/lib/components/oc-toast/oc-toast.component.mjs +17 -0
  22. package/esm2022/lib/components/oc-toggle/oc-toggle.component.mjs +34 -0
  23. package/esm2022/lib/directives/oc-tooltip/oc-tooltip.directive.mjs +117 -0
  24. package/esm2022/lib/interfaces/oc-autocomplete.mjs +2 -0
  25. package/esm2022/lib/interfaces/oc-menu.mjs +2 -0
  26. package/esm2022/lib/interfaces/oc-style-theme.mjs +2 -0
  27. package/esm2022/lib/interfaces/oc-toast.mjs +2 -0
  28. package/esm2022/lib/otimus-library.component.mjs +19 -0
  29. package/esm2022/lib/otimus-library.service.mjs +14 -0
  30. package/esm2022/lib/services/internationalization.service.mjs +68 -0
  31. package/esm2022/lib/services/oc-toast.service.mjs +81 -0
  32. package/esm2022/lib/services/style-theme.service.mjs +21 -0
  33. package/esm2022/otimus-library.mjs +5 -0
  34. package/esm2022/public-api.mjs +30 -0
  35. package/fesm2022/otimus-library.mjs +1513 -0
  36. package/fesm2022/otimus-library.mjs.map +1 -0
  37. package/index.d.ts +5 -0
  38. package/lib/components/oc-accordion/oc-accordion.component.d.ts +18 -0
  39. package/lib/components/oc-accordion-item/oc-accordion-item.component.d.ts +12 -0
  40. package/lib/components/oc-autocomplete/oc-autocomplete.component.d.ts +68 -0
  41. package/lib/components/oc-badge/oc-badge.component.d.ts +11 -0
  42. package/lib/components/oc-checkbox/oc-checkbox.component.d.ts +35 -0
  43. package/lib/components/oc-chip/oc-chip.component.d.ts +14 -0
  44. package/lib/components/oc-filter/oc-filter.component.d.ts +17 -0
  45. package/lib/components/oc-input/oc-input.component.d.ts +31 -0
  46. package/lib/components/oc-key-value/oc-key-value.component.d.ts +14 -0
  47. package/lib/components/oc-log/oc-log.component.d.ts +7 -0
  48. package/lib/components/oc-menu/oc-menu.component.d.ts +20 -0
  49. package/lib/components/oc-modal/oc-modal.component.d.ts +30 -0
  50. package/lib/components/oc-modal-footer/oc-modal-footer.component.d.ts +8 -0
  51. package/lib/components/oc-not-found/oc-not-found.component.d.ts +5 -0
  52. package/lib/components/oc-pagination/oc-pagination.component.d.ts +14 -0
  53. package/lib/components/oc-profile/oc-profile.component.d.ts +12 -0
  54. package/lib/components/oc-step/oc-step.component.d.ts +22 -0
  55. package/lib/components/oc-stepper/oc-stepper.component.d.ts +24 -0
  56. package/lib/components/oc-tab/oc-tab.component.d.ts +8 -0
  57. package/lib/components/oc-tabs/oc-tabs.component.d.ts +18 -0
  58. package/lib/components/oc-toast/oc-toast.component.d.ts +8 -0
  59. package/lib/components/oc-toggle/oc-toggle.component.d.ts +12 -0
  60. package/lib/directives/oc-tooltip/oc-tooltip.directive.d.ts +20 -0
  61. package/lib/interfaces/oc-autocomplete.d.ts +5 -0
  62. package/lib/interfaces/oc-menu.d.ts +9 -0
  63. package/lib/interfaces/oc-style-theme.d.ts +2 -0
  64. package/lib/interfaces/oc-toast.d.ts +8 -0
  65. package/lib/otimus-library.component.d.ts +5 -0
  66. package/lib/otimus-library.service.d.ts +6 -0
  67. package/lib/services/internationalization.service.d.ts +17 -0
  68. package/lib/services/oc-toast.service.d.ts +14 -0
  69. package/lib/services/style-theme.service.d.ts +8 -0
  70. package/package.json +13 -4
  71. package/public-api.d.ts +26 -0
  72. package/ng-package.json +0 -12
  73. package/src/assets/images/loading.svg +0 -0
  74. package/src/assets/images/not-found-bg.jpg +0 -0
  75. package/src/lib/components/oc-accordion/oc-accordion.component.html +0 -3
  76. package/src/lib/components/oc-accordion/oc-accordion.component.scss +0 -4
  77. package/src/lib/components/oc-accordion/oc-accordion.component.ts +0 -44
  78. package/src/lib/components/oc-accordion-item/oc-accordion-item.component.html +0 -19
  79. package/src/lib/components/oc-accordion-item/oc-accordion-item.component.scss +0 -86
  80. package/src/lib/components/oc-accordion-item/oc-accordion-item.component.ts +0 -27
  81. package/src/lib/components/oc-accordion-item/styles/oc-accordion-item.shui-component.scss +0 -41
  82. package/src/lib/components/oc-autocomplete/oc-autocomplete.component.html +0 -66
  83. package/src/lib/components/oc-autocomplete/oc-autocomplete.component.scss +0 -157
  84. package/src/lib/components/oc-autocomplete/oc-autocomplete.component.ts +0 -277
  85. package/src/lib/components/oc-badge/oc-badge.component.html +0 -7
  86. package/src/lib/components/oc-badge/oc-badge.component.scss +0 -125
  87. package/src/lib/components/oc-badge/oc-badge.component.ts +0 -22
  88. package/src/lib/components/oc-checkbox/oc-checkbox.component.html +0 -30
  89. package/src/lib/components/oc-checkbox/oc-checkbox.component.scss +0 -103
  90. package/src/lib/components/oc-checkbox/oc-checkbox.component.ts +0 -132
  91. package/src/lib/components/oc-checkbox/styles/oc-checkbox.shui-component.scss +0 -21
  92. package/src/lib/components/oc-chip/oc-chip.component.html +0 -20
  93. package/src/lib/components/oc-chip/oc-chip.component.scss +0 -102
  94. package/src/lib/components/oc-chip/oc-chip.component.ts +0 -32
  95. package/src/lib/components/oc-filter/oc-filter.component.html +0 -22
  96. package/src/lib/components/oc-filter/oc-filter.component.scss +0 -78
  97. package/src/lib/components/oc-filter/oc-filter.component.spec.ts +0 -23
  98. package/src/lib/components/oc-filter/oc-filter.component.ts +0 -30
  99. package/src/lib/components/oc-input/oc-input.component.html +0 -21
  100. package/src/lib/components/oc-input/oc-input.component.scss +0 -3
  101. package/src/lib/components/oc-input/oc-input.component.ts +0 -100
  102. package/src/lib/components/oc-key-value/oc-key-value.component.html +0 -12
  103. package/src/lib/components/oc-key-value/oc-key-value.component.scss +0 -26
  104. package/src/lib/components/oc-key-value/oc-key-value.component.ts +0 -23
  105. package/src/lib/components/oc-key-value/styles/oc-key-value.shui-component.scss +0 -26
  106. package/src/lib/components/oc-log/oc-log.component.html +0 -18
  107. package/src/lib/components/oc-log/oc-log.component.scss +0 -61
  108. package/src/lib/components/oc-log/oc-log.component.ts +0 -15
  109. package/src/lib/components/oc-menu/oc-menu.component.html +0 -31
  110. package/src/lib/components/oc-menu/oc-menu.component.scss +0 -101
  111. package/src/lib/components/oc-menu/oc-menu.component.ts +0 -84
  112. package/src/lib/components/oc-modal/oc-modal.component.html +0 -54
  113. package/src/lib/components/oc-modal/oc-modal.component.scss +0 -204
  114. package/src/lib/components/oc-modal/oc-modal.component.ts +0 -82
  115. package/src/lib/components/oc-modal/styles/oc-modal.shui-component.scss +0 -3
  116. package/src/lib/components/oc-modal-footer/oc-modal-footer.component.html +0 -11
  117. package/src/lib/components/oc-modal-footer/oc-modal-footer.component.scss +0 -27
  118. package/src/lib/components/oc-modal-footer/oc-modal-footer.component.ts +0 -15
  119. package/src/lib/components/oc-not-found/oc-not-found.component.html +0 -14
  120. package/src/lib/components/oc-not-found/oc-not-found.component.scss +0 -153
  121. package/src/lib/components/oc-not-found/oc-not-found.component.spec.ts +0 -23
  122. package/src/lib/components/oc-not-found/oc-not-found.component.ts +0 -12
  123. package/src/lib/components/oc-pagination/oc-pagination.component.html +0 -32
  124. package/src/lib/components/oc-pagination/oc-pagination.component.scss +0 -80
  125. package/src/lib/components/oc-pagination/oc-pagination.component.ts +0 -46
  126. package/src/lib/components/oc-profile/oc-profile.component.html +0 -17
  127. package/src/lib/components/oc-profile/oc-profile.component.scss +0 -80
  128. package/src/lib/components/oc-profile/oc-profile.component.ts +0 -38
  129. package/src/lib/components/oc-step/oc-step.component.html +0 -32
  130. package/src/lib/components/oc-step/oc-step.component.scss +0 -106
  131. package/src/lib/components/oc-step/oc-step.component.ts +0 -39
  132. package/src/lib/components/oc-step/styles/oc-step.shui-component.scss +0 -52
  133. package/src/lib/components/oc-stepper/oc-stepper.component.html +0 -3
  134. package/src/lib/components/oc-stepper/oc-stepper.component.scss +0 -9
  135. package/src/lib/components/oc-stepper/oc-stepper.component.ts +0 -86
  136. package/src/lib/components/oc-tab/oc-tab.component.html +0 -3
  137. package/src/lib/components/oc-tab/oc-tab.component.scss +0 -0
  138. package/src/lib/components/oc-tab/oc-tab.component.ts +0 -15
  139. package/src/lib/components/oc-table/oc-table.component.html +0 -62
  140. package/src/lib/components/oc-table/oc-table.component.scss +0 -2
  141. package/src/lib/components/oc-table/oc-table.component.ts +0 -51
  142. package/src/lib/components/oc-tabs/oc-tabs.component.html +0 -13
  143. package/src/lib/components/oc-tabs/oc-tabs.component.scss +0 -47
  144. package/src/lib/components/oc-tabs/oc-tabs.component.ts +0 -46
  145. package/src/lib/components/oc-tabs/styles/oc-tabs.shui-component.scss +0 -25
  146. package/src/lib/components/oc-toast/oc-toast.component.html +0 -46
  147. package/src/lib/components/oc-toast/oc-toast.component.scss +0 -133
  148. package/src/lib/components/oc-toast/oc-toast.component.ts +0 -15
  149. package/src/lib/components/oc-toggle/oc-toggle.component.html +0 -4
  150. package/src/lib/components/oc-toggle/oc-toggle.component.scss +0 -73
  151. package/src/lib/components/oc-toggle/oc-toggle.component.spec.ts +0 -23
  152. package/src/lib/components/oc-toggle/oc-toggle.component.ts +0 -32
  153. package/src/lib/directives/oc-tooltip/oc-tooltip.directive.ts +0 -108
  154. package/src/lib/interfaces/internal/languages.ts +0 -16
  155. package/src/lib/interfaces/oc-autocomplete.ts +0 -6
  156. package/src/lib/interfaces/oc-menu.ts +0 -10
  157. package/src/lib/interfaces/oc-style-theme.ts +0 -3
  158. package/src/lib/interfaces/oc-table.ts +0 -12
  159. package/src/lib/interfaces/oc-toast.ts +0 -8
  160. package/src/lib/otimus-library.component.ts +0 -16
  161. package/src/lib/otimus-library.service.ts +0 -9
  162. package/src/lib/services/internationalization.service.ts +0 -73
  163. package/src/lib/services/oc-toast.service.ts +0 -107
  164. package/src/lib/services/style-theme.service.ts +0 -19
  165. package/src/public-api.ts +0 -30
  166. package/tsconfig.lib.json +0 -14
  167. package/tsconfig.lib.prod.json +0 -10
  168. package/tsconfig.spec.json +0 -14
  169. /package/{src/assets → assets}/fonts/siemens/SH-Bree-Headline-Oblique.woff +0 -0
  170. /package/{src/assets → assets}/fonts/siemens/SH-Bree-Headline-Oblique.woff2 +0 -0
  171. /package/{src/assets → assets}/fonts/siemens/SH-Bree-Headline-Regular.woff +0 -0
  172. /package/{src/assets → assets}/fonts/siemens/SH-Bree-Headline-Regular.woff2 +0 -0
  173. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Black.woff +0 -0
  174. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Black.woff2 +0 -0
  175. /package/{src/assets → assets}/fonts/siemens/SiemensSans-BlackItalic.woff +0 -0
  176. /package/{src/assets → assets}/fonts/siemens/SiemensSans-BlackItalic.woff2 +0 -0
  177. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Bold.woff +0 -0
  178. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Bold.woff2 +0 -0
  179. /package/{src/assets → assets}/fonts/siemens/SiemensSans-BoldItalic.woff +0 -0
  180. /package/{src/assets → assets}/fonts/siemens/SiemensSans-BoldItalic.woff2 +0 -0
  181. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Italic.woff +0 -0
  182. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Italic.woff2 +0 -0
  183. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Roman.woff +0 -0
  184. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Roman.woff2 +0 -0
  185. /package/{src/styles → styles}/colors.scss +0 -0
  186. /package/{src/styles → styles}/components/buttons/buttons.scss +0 -0
  187. /package/{src/styles → styles}/components/buttons/buttons.shui.scss +0 -0
  188. /package/{src/styles → styles}/components/index.scss +0 -0
  189. /package/{src/styles → styles}/components/inputs/inputs.scss +0 -0
  190. /package/{src/styles → styles}/components/inputs/inputs.shui.scss +0 -0
  191. /package/{src/styles → styles}/components/table/table.scss +0 -0
  192. /package/{src/styles → styles}/components/table/table.shui.scss +0 -0
  193. /package/{src/styles → styles}/components/tooltip.scss +0 -0
  194. /package/{src/styles → styles}/grid.scss +0 -0
  195. /package/{src/styles → styles}/patterns/shui/colors.shui.scss +0 -0
  196. /package/{src/styles → styles}/patterns/shui/fonts.shui.scss +0 -0
  197. /package/{src/styles → styles}/patterns/shui/index.shui.scss +0 -0
  198. /package/{src/styles → styles}/patterns/shui/variables.shui.scss +0 -0
  199. /package/{src/styles → styles}/states.scss +0 -0
  200. /package/{src/styles → styles}/styles.scss +0 -0
  201. /package/{src/styles → styles}/variables.scss +0 -0
@@ -1,106 +0,0 @@
1
- @use '../../../styles/variables.scss';
2
- .oc-step {
3
- border-left: 2px;
4
- width: 100%;
5
-
6
- &.oc-not-selected {
7
- cursor: pointer;
8
- transition: 0.15s ease;
9
- border-radius: 1rem;
10
- &:hover {
11
- background-color: variables.$color-gray-6;
12
- }
13
- }
14
- }
15
-
16
- .left-side {
17
- display: flex;
18
- align-items: center;
19
- gap: 1rem;
20
-
21
- h2 {
22
- margin: 0;
23
- font-size: 1.5rem;
24
- }
25
-
26
- .step-number {
27
- padding: 2rem;
28
-
29
- background-color: variables.$color-gray-4;
30
-
31
- &.oc-purple {
32
- background-color: variables.$color-brand-p-1;
33
- }
34
-
35
- &.oc-green {
36
- background-color: variables.$color-brand-g-1;
37
- }
38
-
39
- &.oc-selected-p {
40
- box-shadow: 0 0 16px variables.$color-brand-p-6;
41
- }
42
-
43
- &.oc-selected-g {
44
- box-shadow: 0 0 16px variables.$color-brand-g-6;
45
- }
46
-
47
- width: 50px;
48
- height: 50px;
49
- display: flex;
50
- justify-content: center;
51
- align-items: center;
52
- border-radius: 16px;
53
-
54
- transform: rotate(45deg);
55
-
56
- span {
57
- transform: rotate(-45deg);
58
- color: variables.$color-gray-6;
59
-
60
- font-size: 1.5rem;
61
- font-weight: 700;
62
- }
63
- }
64
- }
65
-
66
- .oc-content {
67
- overflow: hidden;
68
- transition: padding 0.3s ease, opacity 0.3s ease;
69
- padding: 1.5rem;
70
- margin-left: 27px;
71
- width: 100%;
72
-
73
- &.expanded {
74
- padding: 1rem 2.9rem 2rem;
75
- opacity: 1;
76
- }
77
-
78
- &.oc-left-border {
79
- border-left: 3px solid variables.$color-gray-4;
80
- }
81
-
82
- &.oc-prev-selected-p {
83
- border-left: 3px solid variables.$color-brand-p-2;
84
- }
85
-
86
- &.oc-prev-selected-g {
87
- border-left: 3px solid variables.$color-brand-g-2;
88
- }
89
- }
90
-
91
-
92
- .oc-selected-p-title {
93
- color: variables.$color-brand-p-1;
94
- }
95
-
96
- .oc-selected-g-title {
97
- color: variables.$color-brand-g-1;
98
- }
99
-
100
- @media (max-width: 820px) {
101
- .expanded {
102
- padding: 0rem 1rem 2rem !important;
103
- }
104
- }
105
-
106
- @import './styles/oc-step.shui-component.scss';
@@ -1,39 +0,0 @@
1
- import { CommonModule } from '@angular/common'
2
- import { AfterViewInit, Component, EventEmitter, Input, Output } from '@angular/core'
3
- import { StyleThemeService } from '../../services/style-theme.service'
4
- import { OcStyleThemeType } from '../../interfaces/oc-style-theme'
5
-
6
- @Component({
7
- selector: 'oc-step',
8
- standalone: true,
9
- imports: [CommonModule],
10
- templateUrl: './oc-step.component.html',
11
- styleUrl: './oc-step.component.scss',
12
- })
13
- export class OcStepComponent implements AfterViewInit {
14
- constructor(private styleThemeService: StyleThemeService) {}
15
-
16
- @Input() ocIsActive: boolean = false
17
- @Input() ocTitle: string = ''
18
- @Input() ocColor: 'purple' | 'green' = 'purple'
19
- @Input() ocCompleted: boolean = false
20
- @Input() ocStyle: OcStyleThemeType = 'otimus'
21
-
22
- @Output() ocClick = new EventEmitter()
23
- stepIndex: number = 0
24
- selectedIndex: number = 0
25
- lastIndex: number = 0
26
-
27
- ngAfterViewInit(): void {
28
- this.ocStyle = this.styleThemeService.getStyleTheme() || this.ocStyle
29
- }
30
-
31
- protected handleStepClick(stepIndex: number): void {
32
- if (stepIndex !== this.selectedIndex && (stepIndex <= this.selectedIndex || this.ocCompleted)) {
33
- this.selectStep(stepIndex)
34
- this.ocClick.emit()
35
- }
36
- }
37
-
38
- @Input() selectStep!: (index: number) => void
39
- }
@@ -1,52 +0,0 @@
1
- @use '../../../../styles/variables.scss';
2
-
3
- .shui-step {
4
- .step-number {
5
- border-radius: 100% !important;
6
-
7
- background-color: rgba(variables.$color-shui-ui-8, 0.1) !important;
8
-
9
- span {
10
- color: variables.$color-shui-ui-8 !important;
11
- }
12
-
13
- border: 5px solid white;
14
-
15
- box-shadow: none !important;
16
- span {
17
- font-size: 2rem;
18
- }
19
- }
20
-
21
- &:hover {
22
- background-color: rgba(variables.$color-shui-base-2, 0.4);
23
-
24
- .step-number {
25
- border: 5px solid variables.$color-shui-base-2;
26
- }
27
- }
28
-
29
- .oc-content {
30
- &.oc-left-border {
31
- border-left: 5px solid variables.$color-shui-base-1 !important;
32
- }
33
- &.expanded, &.oc-prev-selected-p, &.oc-prev-selected-g {
34
- border-left: 5px solid rgba(variables.$color-shui-ui-8, 0.7) !important;
35
- }
36
- }
37
-
38
- .oc-purple,.oc-green, .oc-selected-g, .oc-selected-p {
39
- background-color: variables.$color-shui-ui-8 !important;
40
- span {
41
- color: variables.$color-shui-base-1 !important;
42
- }
43
- }
44
-
45
- h2 {
46
- color: variables.$color-shui-ui-8;
47
- font-weight: 500;
48
- }
49
- .oc-selected-p-title {
50
- color: variables.$color-shui-ui-8 !important;
51
- }
52
- }
@@ -1,3 +0,0 @@
1
- <div class="oc-stepper">
2
- <ng-content></ng-content>
3
- </div>
@@ -1,9 +0,0 @@
1
- .oc-stepper{
2
- display: flex;
3
- flex-direction: column;
4
- width: 100%;
5
-
6
- > * {
7
- width: 100% !important;
8
- }
9
- }
@@ -1,86 +0,0 @@
1
- import { AfterViewInit, Component, ContentChildren, QueryList, Input } from '@angular/core'
2
- import { OcStepComponent } from '../oc-step/oc-step.component'
3
- import { OcStyleThemeType } from '../../interfaces/oc-style-theme'
4
- import { StyleThemeService } from '../../services/style-theme.service'
5
-
6
- @Component({
7
- selector: 'oc-stepper',
8
- standalone: true,
9
- imports: [],
10
- templateUrl: './oc-stepper.component.html',
11
- styleUrl: './oc-stepper.component.scss',
12
- })
13
- export class OcStepperComponent implements AfterViewInit {
14
- constructor(private styleThemeService: StyleThemeService) {}
15
- @ContentChildren(OcStepComponent) ocSteps!: QueryList<OcStepComponent>
16
- @Input() ocAllowNavigation: boolean = false
17
- @Input() ocColor: 'purple' | 'green' = 'purple'
18
- @Input() ocCurrentIndex: number = 0
19
- @Input() ocSaveCompletedSteps: boolean = true
20
- @Input() ocStyle: OcStyleThemeType = 'otimus'
21
-
22
- private completedSteps: number[] = []
23
-
24
- ngAfterViewInit(): void {
25
- this.ocStyle = this.styleThemeService.getStyleTheme() || this.ocStyle
26
- this.setStepsValues()
27
- this.selectStep(this.ocCurrentIndex)
28
- this.setCompletedSteps()
29
- }
30
-
31
- private setCompletedSteps(): void {
32
- if (!this.ocSaveCompletedSteps) {
33
- return
34
- }
35
- for (let i = 0; i <= this.ocCurrentIndex; i++) {
36
- this.completedSteps.push(i)
37
- }
38
- }
39
-
40
- setStepsValues(): void {
41
- this.ocSteps.forEach((step, i) => {
42
- step.stepIndex = i
43
- step.ocColor = this.ocColor
44
- step.lastIndex = this.ocSteps.length - 1
45
- step.ocStyle = this.ocStyle
46
-
47
- step.selectStep = (index: number) => this.selectStep(index)
48
- })
49
- }
50
-
51
- selectStep(index: number): void {
52
- this.ocSteps.forEach((step, i) => {
53
- step.ocStyle = this.ocStyle
54
-
55
- if (this.completedSteps.includes(i)) {
56
- step.ocCompleted = true
57
- }
58
- if (i !== index) {
59
- step.ocIsActive = false
60
- step.selectedIndex = index
61
- return
62
- }
63
- step.ocIsActive = true
64
- this.ocCurrentIndex = index
65
- step.selectedIndex = this.ocCurrentIndex
66
- this.setCompletedSteps()
67
- })
68
- return
69
- }
70
-
71
- nextStep(event: Event): void {
72
- event.stopPropagation()
73
- if (this.ocCurrentIndex === this.ocSteps.length - 1) {
74
- return
75
- }
76
- this.selectStep(this.ocCurrentIndex + 1)
77
- }
78
-
79
- previousStep(event: Event): void {
80
- event.stopPropagation()
81
- if (!this.ocCurrentIndex) {
82
- return
83
- }
84
- this.selectStep(this.ocCurrentIndex - 1)
85
- }
86
- }
@@ -1,3 +0,0 @@
1
- @if (ocIsActive) {
2
- <ng-content></ng-content>
3
- }
File without changes
@@ -1,15 +0,0 @@
1
- import { Component, Input } from '@angular/core'
2
-
3
- @Component({
4
- selector: 'oc-tab',
5
- standalone: true,
6
- imports: [],
7
- templateUrl: './oc-tab.component.html',
8
- styleUrl: './oc-tab.component.scss',
9
- })
10
- export class OcTabComponent {
11
- @Input() ocTitle: string = ''
12
- @Input() ocIsActive: boolean = false
13
-
14
- tabIndex: number = 0
15
- }
@@ -1,62 +0,0 @@
1
- <table class="oc table" cdk-table [dataSource]="ocData">
2
-
3
- <ng-container *ngFor="let column of columns; let i = index" [cdkColumnDef]="column">
4
- <!-- Table Columns -->
5
- <th cdk-header-cell *cdkHeaderCellDef>
6
- @if(!column.includes('oc ')) {
7
- {{column}}
8
- } @else {
9
- @if (ocSelect && i === 0) {
10
- <oc-checkbox ocBorderColor="gray" />
11
- }
12
- }
13
- </th>
14
-
15
- <td cdk-cell *cdkCellDef="let row" [ngStyle]="{
16
- 'width': (
17
- column === 'oc select' ? '20px' :
18
- row[keys[i]]?.width || 'inherit'
19
- )
20
- }">
21
-
22
- @if (!column.includes('oc ')) {
23
- @if (isObject(row[keys[i]])) {
24
- @if (!row[keys[i]].component) {
25
- {{row[keys[i]].value}}
26
- } @else {
27
-
28
- @if(row[keys[i]].component.name === 'oc-chip') {
29
- <oc-chip [ocType]="row[keys[i]].component.ocType" [ocBg]="row[keys[i]].component.ocBg">
30
- {{row[keys[i]].value}}
31
- </oc-chip>
32
- }
33
- }
34
- } @else {
35
- {{row[keys[i]] || ''}}
36
- }
37
- } @else {
38
-
39
- @if(column === 'oc select') {
40
- <oc-checkbox ocBorderColor="gray"></oc-checkbox>
41
- }@else if (column === 'oc actions') {
42
- <div class="button-row">
43
- @for (action of row.oc_actions; track $index) {
44
- <button class="oc button icon tiny gray-1" (click)="action.callback()">
45
- <span class="material-symbols-outlined oc color" [ngClass]="{
46
- error: action.icon === 'delete'
47
- }">{{action.icon}}</span>
48
- </button>
49
- }
50
- </div>
51
- }
52
- }
53
- </td>
54
- </ng-container>
55
-
56
- <tr cdk-header-row *cdkHeaderRowDef="columns"></tr>
57
- <tr cdk-row *cdkRowDef="let row; columns: columns"></tr>
58
- </table>
59
-
60
- @if (ocPage) {
61
- <oc-pagination [ocPage]="ocPage" [ocMaxPage]="ocMaxPage" (ocGetPage)="ocGetPage.emit()" />
62
- }
@@ -1,2 +0,0 @@
1
- @use '../../../styles/variables.scss';
2
- @import '../../../styles/components/table/table.scss';
@@ -1,51 +0,0 @@
1
- import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import {CdkTableModule} from '@angular/cdk/table'
4
- import { OcCheckboxComponent, OcChipComponent, OcPaginationComponent } from 'otimus-library';
5
-
6
-
7
- @Component({
8
- selector: 'oc-table',
9
- standalone: true,
10
- imports: [CommonModule, CdkTableModule, OcCheckboxComponent, OcPaginationComponent, OcChipComponent],
11
- templateUrl: './oc-table.component.html',
12
- styleUrls: ['./oc-table.component.scss'],
13
- encapsulation: ViewEncapsulation.None
14
- })
15
- export class OcTableComponent implements OnInit {
16
- @Input() ocData: any[] = []
17
-
18
- // Pagination attributes
19
- @Input() ocPage: number = 0
20
- @Input() ocMaxPage: number = 0
21
- @Input() ocPerPage: number = 0
22
- @Output() ocGetPage = new EventEmitter()
23
-
24
- @Output() ocSelect = new EventEmitter()
25
-
26
- columns: string[] = []
27
- selectable: boolean = false
28
- keys: string[] = []
29
-
30
- innerComponents = ['oc-chip']
31
-
32
- ngOnInit(): void {
33
- if(!this.ocData.length) return
34
- this.keys = Object.keys(this.ocData[0])
35
-
36
- this.columns = Object.keys(this.ocData[0]).map(col => {
37
- return col.split('_').join(' ').split('-').join(' ')
38
- })
39
-
40
- this.isAllSelected()
41
- }
42
-
43
- isAllSelected () {
44
- this.selectable = this.ocData.every(row => row.selectable)
45
- }
46
-
47
- protected isObject (column: any) {
48
- if(!column) return false
49
- return !!Object.keys(column).length
50
- }
51
- }
@@ -1,13 +0,0 @@
1
- <div class="oc-tabs" [ngClass]="{
2
- shui: ocStyle === 'shui'
3
- }">
4
- <div class="row">
5
- @for(tab of ocTabs; track $index) {
6
- <button [ngClass]="{
7
- 'oc-selected': tab.tabIndex === activeTabIndex
8
- }" class="oc-tab" (click)="selectTab(tab.tabIndex);
9
- handleTabClick()" type="button">{{tab.ocTitle}}</button>
10
- }
11
- </div>
12
- <ng-content></ng-content>
13
- </div>
@@ -1,47 +0,0 @@
1
- @use '../../../styles/variables.scss';
2
-
3
- .oc-tabs .row {
4
- display: flex;
5
- gap: 1px;
6
- }
7
-
8
- .oc-tab {
9
- border: none;
10
- padding: 0.75rem 1.3rem;
11
- cursor: pointer;
12
-
13
- border-radius: 8px 8px 0 0;
14
-
15
- background-color: transparent;
16
- border-bottom: 2px solid variables.$color-gray-5;
17
-
18
- transition: 0.15s ease;
19
-
20
- color: variables.$color-gray-2;
21
-
22
- &:hover {
23
- background-color: variables.$color-gray-6;
24
- }
25
-
26
- &.oc-selected {
27
- border-bottom: 2px solid variables.$color-brand-p-1;
28
- background-color: variables.$color-gray-6;
29
- color: variables.$color-brand-p-1;
30
- }
31
- }
32
-
33
- .row {
34
- max-width: 100%;
35
- transform: rotateX(180deg);
36
- overflow-x: auto;
37
- .oc-tab {
38
- transform: rotateX(180deg);
39
- }
40
-
41
- }
42
- ::-webkit-scrollbar {
43
- height: 3px;
44
- }
45
-
46
-
47
- @import './styles/oc-tabs.shui-component.scss';
@@ -1,46 +0,0 @@
1
- import {
2
- Component,
3
- ContentChildren,
4
- QueryList,
5
- AfterContentInit,
6
- EventEmitter,
7
- Output,
8
- Input,
9
- } from '@angular/core'
10
- import { OcTabComponent } from '../oc-tab/oc-tab.component'
11
- import { CommonModule } from '@angular/common'
12
- import { StyleThemeService } from '../../services/style-theme.service'
13
- import { OcStyleThemeType } from '../../interfaces/oc-style-theme'
14
-
15
- @Component({
16
- selector: 'oc-tabs',
17
- standalone: true,
18
- imports: [CommonModule],
19
- templateUrl: './oc-tabs.component.html',
20
- styleUrl: './oc-tabs.component.scss',
21
- })
22
- export class OcTabsComponent implements AfterContentInit {
23
- constructor(private styleThemeService: StyleThemeService) {}
24
- @ContentChildren(OcTabComponent) ocTabs!: QueryList<OcTabComponent>
25
- @Input() ocStyle: OcStyleThemeType = 'otimus'
26
- @Output() ocClick = new EventEmitter<void>()
27
-
28
- activeTabIndex: number = 0
29
-
30
- ngAfterContentInit(): void {
31
- this.ocStyle = this.styleThemeService.getStyleTheme() || this.ocStyle
32
- this.selectTab(0)
33
- }
34
-
35
- selectTab(index: number): void {
36
- this.ocTabs.toArray().forEach((tab, i) => {
37
- tab.tabIndex = i
38
- tab.ocIsActive = i === index
39
- })
40
- this.activeTabIndex = index
41
- }
42
-
43
- handleTabClick(): void {
44
- this.ocClick.emit()
45
- }
46
- }
@@ -1,25 +0,0 @@
1
- @use '../../../../styles/variables.scss';
2
-
3
- .oc-tabs.shui {
4
- .row {
5
- display: flex;
6
- gap: 1rem;
7
- }
8
-
9
- .oc-tab {
10
- border-bottom: 3px solid transparent;
11
- font-weight: 600;
12
-
13
- color: rgba(variables.$color-shui-ui-1, 0.5);
14
-
15
- &:hover {
16
- background-color: transparent;
17
- border-bottom: 3px solid variables.$color-shui-ui-8;
18
- }
19
- &.oc-selected {
20
- border-bottom: 3px solid variables.$color-shui-ui-8;
21
- background-color: transparent;
22
- color: rgba(variables.$color-shui-ui-1, 0.5);
23
- }
24
- }
25
- }
@@ -1,46 +0,0 @@
1
- <div
2
- class="toast"
3
- [ngClass]="{
4
- 'close-toast': toast.currentToast.counter === 1,
5
- error: ['erro', 'error'].includes(toast.currentToast.status.toLowerCase()),
6
- success: ['sucesso', 'success', 'éxito'].includes(toast.currentToast.status.toLowerCase()),
7
- loading: ['carregando', 'cargando', 'loading'].includes(toast.currentToast.status.toLowerCase()),
8
- animation: toast.currentToast.hasAnimation
9
- }"
10
- *ngIf="toast.currentToast && toast.currentToast.counter > 0"
11
- >
12
- <header>
13
- <ng-container [ngTemplateOutlet]="iconTemplate"></ng-container>
14
- <h4 class="status">
15
- {{ toast.currentToast.status[0].toUpperCase() + toast.currentToast.status.slice(1) }}
16
- </h4>
17
- <button (click)="toast.closeToast(toast.currentToast.id)">
18
- <span class="material-symbols-outlined">close</span>
19
- </button>
20
- </header>
21
- <p>{{ toast.currentToast.message }}</p>
22
- </div>
23
-
24
- <ng-template #iconTemplate>
25
- <span
26
- class="material-symbols-outlined"
27
- *ngIf="['erro', 'error'].includes(toast.currentToast.status.toLowerCase())"
28
- >error</span
29
- >
30
-
31
- <span
32
- class="material-symbols-outlined"
33
- *ngIf="['sucesso', 'success', 'éxito'].includes(toast.currentToast.status.toLowerCase())"
34
- >check_circle</span
35
- >
36
-
37
- <span
38
- class="material-symbols-outlined"
39
- *ngIf="['information', 'informação', 'información'].includes(toast.currentToast.status.toLowerCase())"
40
- >info</span
41
- >
42
-
43
- <svg *ngIf="['carregando', 'cargando', 'loading'].includes(toast.currentToast.status.toLowerCase())" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><style>rect{fill:#00DDA3}.spinner_zWVm{animation:spinner_5QiW 1.2s linear infinite,spinner_PnZo 1.2s linear infinite}.spinner_gfyD{animation:spinner_5QiW 1.2s linear infinite,spinner_4j7o 1.2s linear infinite;animation-delay:.1s}.spinner_T5JJ{animation:spinner_5QiW 1.2s linear infinite,spinner_fLK4 1.2s linear infinite;animation-delay:.1s}.spinner_E3Wz{animation:spinner_5QiW 1.2s linear infinite,spinner_tDji 1.2s linear infinite;animation-delay:.2s}.spinner_g2vs{animation:spinner_5QiW 1.2s linear infinite,spinner_CMiT 1.2s linear infinite;animation-delay:.2s}.spinner_ctYB{animation:spinner_5QiW 1.2s linear infinite,spinner_cHKR 1.2s linear infinite;animation-delay:.2s}.spinner_BDNj{animation:spinner_5QiW 1.2s linear infinite,spinner_Re6e 1.2s linear infinite;animation-delay:.3s}.spinner_rCw3{animation:spinner_5QiW 1.2s linear infinite,spinner_EJmJ 1.2s linear infinite;animation-delay:.3s}.spinner_Rszm{animation:spinner_5QiW 1.2s linear infinite,spinner_YJOP 1.2s linear infinite;animation-delay:.4s}@keyframes spinner_5QiW{0%,50%{width:7.33px;height:7.33px}25%{width:1.33px;height:1.33px}}@keyframes spinner_PnZo{0%,50%{x:1px;y:1px}25%{x:4px;y:4px}}@keyframes spinner_4j7o{0%,50%{x:8.33px;y:1px}25%{x:11.33px;y:4px}}@keyframes spinner_fLK4{0%,50%{x:1px;y:8.33px}25%{x:4px;y:11.33px}}@keyframes spinner_tDji{0%,50%{x:15.66px;y:1px}25%{x:18.66px;y:4px}}@keyframes spinner_CMiT{0%,50%{x:8.33px;y:8.33px}25%{x:11.33px;y:11.33px}}@keyframes spinner_cHKR{0%,50%{x:1px;y:15.66px}25%{x:4px;y:18.66px}}@keyframes spinner_Re6e{0%,50%{x:15.66px;y:8.33px}25%{x:18.66px;y:11.33px}}@keyframes spinner_EJmJ{0%,50%{x:8.33px;y:15.66px}25%{x:11.33px;y:18.66px}}@keyframes spinner_YJOP{0%,50%{x:15.66px;y:15.66px}25%{x:18.66px;y:18.66px}}</style><rect class="spinner_zWVm" x="1" y="1" width="7.33" height="7.33"/><rect class="spinner_gfyD" x="8.33" y="1" width="7.33" height="7.33"/><rect class="spinner_T5JJ" x="1" y="8.33" width="7.33" height="7.33"/><rect class="spinner_E3Wz" x="15.66" y="1" width="7.33" height="7.33"/><rect class="spinner_g2vs" x="8.33" y="8.33" width="7.33" height="7.33"/><rect class="spinner_ctYB" x="1" y="15.66" width="7.33" height="7.33"/><rect class="spinner_BDNj" x="15.66" y="8.33" width="7.33" height="7.33"/><rect class="spinner_rCw3" x="8.33" y="15.66" width="7.33" height="7.33"/><rect class="spinner_Rszm" x="15.66" y="15.66" width="7.33" height="7.33"/></svg>
44
-
45
-
46
- </ng-template>