@edm-sdui/sdui 1.0.1 → 1.0.2

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 (172) hide show
  1. package/fesm2022/edm-sdui-sdui.mjs +2324 -0
  2. package/fesm2022/edm-sdui-sdui.mjs.map +1 -0
  3. package/index.d.ts +5 -0
  4. package/lib/components/navigation-controls/navigation-controls.component.d.ts +11 -0
  5. package/lib/components/uicomponent/button/button.component.d.ts +16 -0
  6. package/lib/components/uicomponent/column/column.component.d.ts +10 -0
  7. package/lib/components/uicomponent/image/image.component.d.ts +14 -0
  8. package/lib/components/uicomponent/label/label.component.d.ts +14 -0
  9. package/lib/components/uicomponent/row/row.component.d.ts +10 -0
  10. package/lib/components/uicomponent/row-divisor/row-divisor.component.d.ts +10 -0
  11. package/lib/components/uicomponent/search-bar/search-bar.component.d.ts +16 -0
  12. package/lib/components/uicomponent/space/space.component.d.ts +10 -0
  13. package/lib/components/uicomponent/tag/tag.component.d.ts +16 -0
  14. package/lib/components/uicomponent/uicomponent.component.d.ts +16 -0
  15. package/lib/components/uicomponent/zstack/zstack.component.d.ts +10 -0
  16. package/lib/components/uilayout/centered-content-layout/centered-content-layout.component.d.ts +9 -0
  17. package/lib/components/uilayout/single-column-layout/single-column-layout.component.d.ts +9 -0
  18. package/lib/components/uilayout/uinavigation/uinavigation.component.d.ts +7 -0
  19. package/lib/components/uiscreen/uiscreen.component.d.ts +10 -0
  20. package/lib/core/services/ui-action.service.d.ts +10 -0
  21. package/lib/core/services/uiscreen.service.d.ts +23 -0
  22. package/lib/core/tokens/sdui-config.token.d.ts +2 -0
  23. package/lib/core/uicomposition/enums/uicomponent-type.d.ts +19 -0
  24. package/lib/core/uicomposition/enums/uiplatform-type.d.ts +4 -0
  25. package/lib/core/uicomposition/enums/uiscene.d.ts +3 -0
  26. package/lib/core/uicomposition/enums/uiscreen-identifier.d.ts +4 -0
  27. package/lib/core/uicomposition/mapping/component-mapping.d.ts +3 -0
  28. package/{src/lib/core/uicomposition/models/uicentered-content-layout.ts → lib/core/uicomposition/models/uicentered-content-layout.d.ts} +5 -6
  29. package/{src/lib/core/uicomposition/models/uicomponent.ts → lib/core/uicomposition/models/uicomponent.d.ts} +4 -5
  30. package/lib/core/uicomposition/models/uielement.d.ts +24 -0
  31. package/lib/core/uicomposition/models/uilayout.d.ts +3 -0
  32. package/{src/lib/core/uicomposition/models/uinavigation.ts → lib/core/uicomposition/models/uinavigation.d.ts} +2 -3
  33. package/{src/lib/core/uicomposition/models/uiscreen.ts → lib/core/uicomposition/models/uiscreen.d.ts} +5 -6
  34. package/{src/lib/core/uicomposition/models/uisingle-column-layout.ts → lib/core/uicomposition/models/uisingle-column-layout.d.ts} +4 -5
  35. package/{src/lib/core/uicomposition/models/uiview.ts → lib/core/uicomposition/models/uiview.d.ts} +7 -9
  36. package/lib/core/uitheme/enums/uiaction-type.d.ts +9 -0
  37. package/lib/core/uitheme/enums/uialignment-type.d.ts +5 -0
  38. package/lib/core/uitheme/enums/uiaspect-type.d.ts +4 -0
  39. package/lib/core/uitheme/enums/uiasset.d.ts +353 -0
  40. package/lib/core/uitheme/enums/uicolor.d.ts +129 -0
  41. package/lib/core/uitheme/enums/uicontent-type.d.ts +8 -0
  42. package/lib/core/uitheme/enums/uipadding-level.d.ts +10 -0
  43. package/lib/core/uitheme/enums/uipresentation-style.d.ts +5 -0
  44. package/lib/core/uitheme/enums/uiradius-level.d.ts +8 -0
  45. package/lib/core/uitheme/enums/uishadow-blur-radius.d.ts +3 -0
  46. package/lib/core/uitheme/enums/uishadow-offset.d.ts +3 -0
  47. package/lib/core/uitheme/enums/uisize.d.ts +11 -0
  48. package/lib/core/uitheme/enums/uispacing-level.d.ts +6 -0
  49. package/lib/core/uitheme/enums/uitext-style.d.ts +13 -0
  50. package/lib/core/uitheme/mapping/alignment-mapping.d.ts +2 -0
  51. package/lib/core/uitheme/mapping/asset-mapping.d.ts +2 -0
  52. package/lib/core/uitheme/mapping/color-mapping.d.ts +2 -0
  53. package/lib/core/uitheme/mapping/pad-mapping.d.ts +2 -0
  54. package/lib/core/uitheme/mapping/radius-mapping.d.ts +2 -0
  55. package/lib/core/uitheme/mapping/size-mapping.d.ts +3 -0
  56. package/lib/core/uitheme/mapping/space-mapping.d.ts +2 -0
  57. package/lib/core/uitheme/mapping/text-style-mapping.d.ts +2 -0
  58. package/lib/core/uitheme/models/uiaction.d.ts +9 -0
  59. package/{src/lib/core/uitheme/models/uialignment.ts → lib/core/uitheme/models/uialignment.d.ts} +1 -2
  60. package/{src/lib/core/uitheme/models/uibackground.ts → lib/core/uitheme/models/uibackground.d.ts} +1 -2
  61. package/lib/core/uitheme/models/uipadding.d.ts +7 -0
  62. package/lib/core/uitheme/models/uiradius.d.ts +7 -0
  63. package/{src/lib/core/uitheme/models/uishadow.ts → lib/core/uitheme/models/uishadow.d.ts} +5 -6
  64. package/{src/lib/core/uitheme/models/uispacing.ts → lib/core/uitheme/models/uispacing.d.ts} +1 -2
  65. package/lib/core/utils/url-parser.util.d.ts +2 -0
  66. package/lib/core/view-models/uiscreen.viewmodel.d.ts +39 -0
  67. package/lib/directives/uiview.directive.d.ts +28 -0
  68. package/lib/sdui-routing.module.d.ts +9 -0
  69. package/lib/sdui.component.d.ts +16 -0
  70. package/lib/sdui.module.d.ts +34 -0
  71. package/package.json +16 -14
  72. package/public-api.d.ts +4 -0
  73. package/ng-package.json +0 -9
  74. package/src/index.ts +0 -1
  75. package/src/lib/components/navigation-controls/navigation-controls.component.html +0 -9
  76. package/src/lib/components/navigation-controls/navigation-controls.component.scss +0 -35
  77. package/src/lib/components/navigation-controls/navigation-controls.component.ts +0 -27
  78. package/src/lib/components/uicomponent/button/button.component.html +0 -4
  79. package/src/lib/components/uicomponent/button/button.component.scss +0 -11
  80. package/src/lib/components/uicomponent/button/button.component.ts +0 -64
  81. package/src/lib/components/uicomponent/column/column.component.html +0 -7
  82. package/src/lib/components/uicomponent/column/column.component.scss +0 -9
  83. package/src/lib/components/uicomponent/column/column.component.ts +0 -16
  84. package/src/lib/components/uicomponent/image/image.component.html +0 -1
  85. package/src/lib/components/uicomponent/image/image.component.scss +0 -3
  86. package/src/lib/components/uicomponent/image/image.component.ts +0 -69
  87. package/src/lib/components/uicomponent/label/label.component.html +0 -3
  88. package/src/lib/components/uicomponent/label/label.component.scss +0 -3
  89. package/src/lib/components/uicomponent/label/label.component.ts +0 -66
  90. package/src/lib/components/uicomponent/row/row.component.html +0 -7
  91. package/src/lib/components/uicomponent/row/row.component.scss +0 -8
  92. package/src/lib/components/uicomponent/row/row.component.ts +0 -16
  93. package/src/lib/components/uicomponent/row-divisor/row-divisor.component.html +0 -5
  94. package/src/lib/components/uicomponent/row-divisor/row-divisor.component.scss +0 -8
  95. package/src/lib/components/uicomponent/row-divisor/row-divisor.component.ts +0 -16
  96. package/src/lib/components/uicomponent/search-bar/search-bar.component.html +0 -7
  97. package/src/lib/components/uicomponent/search-bar/search-bar.component.scss +0 -7
  98. package/src/lib/components/uicomponent/search-bar/search-bar.component.ts +0 -129
  99. package/src/lib/components/uicomponent/space/space.component.html +0 -1
  100. package/src/lib/components/uicomponent/space/space.component.scss +0 -10
  101. package/src/lib/components/uicomponent/space/space.component.ts +0 -16
  102. package/src/lib/components/uicomponent/tag/tag.component.html +0 -3
  103. package/src/lib/components/uicomponent/tag/tag.component.scss +0 -7
  104. package/src/lib/components/uicomponent/tag/tag.component.ts +0 -54
  105. package/src/lib/components/uicomponent/uicomponent.component.html +0 -5
  106. package/src/lib/components/uicomponent/uicomponent.component.scss +0 -3
  107. package/src/lib/components/uicomponent/uicomponent.component.ts +0 -53
  108. package/src/lib/components/uicomponent/zstack/zstack.component.html +0 -6
  109. package/src/lib/components/uicomponent/zstack/zstack.component.scss +0 -12
  110. package/src/lib/components/uicomponent/zstack/zstack.component.ts +0 -16
  111. package/src/lib/components/uilayout/centered-content-layout/centered-content-layout.component.html +0 -20
  112. package/src/lib/components/uilayout/centered-content-layout/centered-content-layout.component.scss +0 -36
  113. package/src/lib/components/uilayout/centered-content-layout/centered-content-layout.component.ts +0 -21
  114. package/src/lib/components/uilayout/single-column-layout/single-column-layout.component.html +0 -22
  115. package/src/lib/components/uilayout/single-column-layout/single-column-layout.component.scss +0 -37
  116. package/src/lib/components/uilayout/single-column-layout/single-column-layout.component.ts +0 -27
  117. package/src/lib/components/uilayout/uinavigation/uinavigation.component.html +0 -8
  118. package/src/lib/components/uilayout/uinavigation/uinavigation.component.scss +0 -4
  119. package/src/lib/components/uilayout/uinavigation/uinavigation.component.ts +0 -12
  120. package/src/lib/components/uiscreen/uiscreen.component.html +0 -29
  121. package/src/lib/components/uiscreen/uiscreen.component.scss +0 -12
  122. package/src/lib/components/uiscreen/uiscreen.component.ts +0 -15
  123. package/src/lib/core/interfaces/sdui-config.interface.ts +0 -3
  124. package/src/lib/core/services/navigation.service.ts +0 -25
  125. package/src/lib/core/services/sdui-config.service.ts +0 -19
  126. package/src/lib/core/services/ui-action.service.ts +0 -36
  127. package/src/lib/core/services/uiscreen.service.ts +0 -185
  128. package/src/lib/core/tokens/sdui-config.token.ts +0 -3
  129. package/src/lib/core/uicomposition/enums/uicomponent-type.ts +0 -32
  130. package/src/lib/core/uicomposition/enums/uiplatform-type.ts +0 -4
  131. package/src/lib/core/uicomposition/enums/uiscene.ts +0 -3
  132. package/src/lib/core/uicomposition/enums/uiscreen-identifier.ts +0 -4
  133. package/src/lib/core/uicomposition/mapping/component-mapping.ts +0 -90
  134. package/src/lib/core/uicomposition/models/uielement.ts +0 -25
  135. package/src/lib/core/uicomposition/models/uilayout.ts +0 -4
  136. package/src/lib/core/uitheme/enums/uiaction-type.ts +0 -14
  137. package/src/lib/core/uitheme/enums/uialignment-type.ts +0 -5
  138. package/src/lib/core/uitheme/enums/uiaspect-type.ts +0 -4
  139. package/src/lib/core/uitheme/enums/uiasset.ts +0 -361
  140. package/src/lib/core/uitheme/enums/uicolor.ts +0 -129
  141. package/src/lib/core/uitheme/enums/uicontent-type.ts +0 -8
  142. package/src/lib/core/uitheme/enums/uipadding-level.ts +0 -10
  143. package/src/lib/core/uitheme/enums/uipresentation-style.ts +0 -5
  144. package/src/lib/core/uitheme/enums/uiradius-level.ts +0 -8
  145. package/src/lib/core/uitheme/enums/uishadow-blur-radius.ts +0 -3
  146. package/src/lib/core/uitheme/enums/uishadow-offset.ts +0 -3
  147. package/src/lib/core/uitheme/enums/uisize.ts +0 -12
  148. package/src/lib/core/uitheme/enums/uispacing-level.ts +0 -6
  149. package/src/lib/core/uitheme/enums/uitext-style.ts +0 -13
  150. package/src/lib/core/uitheme/mapping/alignment-mapping.ts +0 -7
  151. package/src/lib/core/uitheme/mapping/asset-mapping.ts +0 -363
  152. package/src/lib/core/uitheme/mapping/color-mapping.ts +0 -131
  153. package/src/lib/core/uitheme/mapping/pad-mapping.ts +0 -12
  154. package/src/lib/core/uitheme/mapping/radius-mapping.ts +0 -10
  155. package/src/lib/core/uitheme/mapping/size-mapping.ts +0 -25
  156. package/src/lib/core/uitheme/mapping/space-mapping.ts +0 -8
  157. package/src/lib/core/uitheme/mapping/text-style-mapping.ts +0 -15
  158. package/src/lib/core/uitheme/models/uiaction.ts +0 -10
  159. package/src/lib/core/uitheme/models/uipadding.ts +0 -8
  160. package/src/lib/core/uitheme/models/uiradius.ts +0 -8
  161. package/src/lib/core/uitheme/models/uiview.ts +0 -0
  162. package/src/lib/core/utils/url-parser.util.ts +0 -24
  163. package/src/lib/core/view-models/uiscreen.viewmodel.ts +0 -115
  164. package/src/lib/directives/uiview.directive.ts +0 -207
  165. package/src/lib/sdui-routing.module.ts +0 -22
  166. package/src/lib/sdui.component.html +0 -3
  167. package/src/lib/sdui.component.scss +0 -11
  168. package/src/lib/sdui.component.ts +0 -65
  169. package/src/lib/sdui.module.ts +0 -84
  170. package/src/public-api.ts +0 -16
  171. package/tsconfig.lib.json +0 -16
  172. package/tsconfig.spec.json +0 -12
@@ -1,36 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { Router } from '@angular/router';
3
- import { UIActionType } from '../uitheme/enums/uiaction-type';
4
- import { UIAction } from '../uitheme/models/uiaction';
5
- import { resolveSduiUrl, isSduiUrl } from '../utils/url-parser.util';
6
- import { SDUI_URL_PARAM } from '../view-models/uiscreen.viewmodel';
7
-
8
- @Injectable({ providedIn: 'root' })
9
- export class UIActionService {
10
- constructor(private router: Router) {}
11
-
12
- execute(action: UIAction): void {
13
- if (!action || !action.type) return;
14
-
15
- switch (action.type) {
16
- case UIActionType.INTERNAL_URL:
17
- case UIActionType.RELOAD_INTERNAL_URL:
18
- if (action.url) {
19
- console.debug('[UIActionService] Navigating to:', action.url);
20
-
21
- if (isSduiUrl(action.url)) {
22
- const resolved = resolveSduiUrl(action.url);
23
- this.router.navigate([], {
24
- queryParams: { [SDUI_URL_PARAM]: resolved },
25
- queryParamsHandling: 'merge',
26
- });
27
- } else {
28
- this.router.navigateByUrl(action.url, { replaceUrl: false });
29
- }
30
- }
31
- break;
32
-
33
- // Outros tipos de ação podem ser adicionados aqui
34
- }
35
- }
36
- }
@@ -1,185 +0,0 @@
1
- import { Injectable, Inject, Optional } from '@angular/core';
2
- import { Observable, map } from 'rxjs';
3
- import { HttpClient } from '@angular/common/http';
4
- import { UIScreen } from '../uicomposition/models/uiscreen';
5
- import { UILayout } from '../uicomposition/models/uilayout';
6
- import { UIScreenIdentifier } from '../uicomposition/enums/uiscreen-identifier';
7
- import { UISingleColumnLayout } from '../uicomposition/models/uisingle-column-layout';
8
- import { UINavigation } from '../uicomposition/models/uinavigation';
9
- import { UIComponent } from '../uicomposition/models/uicomponent';
10
- import { UIComponentType } from '../uicomposition/enums/uicomponent-type';
11
- import { UIElement } from '../uicomposition/models/uielement';
12
- import { UIView } from '../uicomposition/models/uiview';
13
- import { UIPadding } from '../uitheme/models/uipadding';
14
- import { UIBackground } from '../uitheme/models/uibackground';
15
- import { UIAction } from '../uitheme/models/uiaction';
16
- import { UIShadow } from '../uitheme/models/uishadow';
17
- import { UIRadius } from '../uitheme/models/uiradius';
18
- import { UIActionType } from '../uitheme/enums/uiaction-type';
19
- import { UIColor } from '../uitheme/enums/uicolor';
20
- import { UITextStyle } from '../uitheme/enums/uitext-style';
21
- import { UIAsset } from '../uitheme/enums/uiasset';
22
- import { UIAlignmentType } from '../uitheme/enums/uialignment-type';
23
- import { UISpacingLevel } from '../uitheme/enums/uispacing-level';
24
- import { SDUI_BASE_URL } from '../tokens/sdui-config.token';
25
- import { resolveSduiUrl } from '../utils/url-parser.util';
26
- import { UICenteredContentLayout } from '../uicomposition/models/uicentered-content-layout';
27
- import { UIRadiusLevel } from '../uitheme/enums/uiradius-level';
28
- import { UIContentType } from '../uitheme/enums/uicontent-type';
29
- import { UIAspectType } from '../uitheme/enums/uiaspect-type';
30
-
31
- @Injectable({
32
- providedIn: 'root',
33
- })
34
- export class UIScreenService {
35
- constructor(
36
- private http: HttpClient,
37
- @Optional() @Inject(SDUI_BASE_URL) private baseUrl: string = ''
38
- ) {}
39
-
40
- getUIScreen(url: string): Observable<UIScreen> {
41
- let finalUrl = resolveSduiUrl(url, this.baseUrl);
42
-
43
- return this.http
44
- .get<any>(finalUrl)
45
- .pipe(map((json) => this.mapToUIScreen(json)));
46
- }
47
-
48
- private mapToUIScreen(json: Partial<UIScreen>): UIScreen {
49
- const { identifier, content } = json;
50
-
51
- if (!identifier) {
52
- throw new Error(`Identificador da tela ausente no JSON recebido.`);
53
- }
54
-
55
- const layout = this.getLayout(identifier as UIScreenIdentifier, content);
56
-
57
- return {
58
- identifier: identifier as UIScreenIdentifier,
59
- content: layout,
60
- ...this.mapToUIView(json),
61
- };
62
- }
63
-
64
- private getLayout(
65
- identifier: UIScreenIdentifier,
66
- content: UILayout | undefined
67
- ): UILayout {
68
- switch (identifier) {
69
- case UIScreenIdentifier.SINGLE_COLUMN:
70
- return this.mapToSingleColumnLayout(content ?? {});
71
-
72
- case UIScreenIdentifier.CENTERED_CONTENT:
73
- return this.mapToCenteredContentLayout(content ?? {});
74
-
75
- default:
76
- throw new Error(`Tipo de tela desconhecido: ${identifier}`);
77
- }
78
- }
79
-
80
- private mapToSingleColumnLayout(
81
- json: Partial<UISingleColumnLayout>
82
- ): UISingleColumnLayout {
83
- return {
84
- nav: json.nav ? this.mapToUINavigation(json.nav) : null,
85
- header: json.header ? this.mapToUIComponent(json.header) : null,
86
- main: json.main ? this.mapToUIComponent(json.main) : null,
87
- footer: json.footer ? this.mapToUIComponent(json.footer) : null,
88
- };
89
- }
90
-
91
- private mapToCenteredContentLayout(
92
- json: Partial<UICenteredContentLayout>
93
- ): UICenteredContentLayout {
94
- return {
95
- nav: json.nav ? this.mapToUINavigation(json.nav) : null,
96
- backgroundComponent: json.backgroundComponent
97
- ? this.mapToUIComponent(json.backgroundComponent)
98
- : null,
99
- header: json.header ? this.mapToUIComponent(json.header) : null,
100
- centered: json.centered ? this.mapToUIComponent(json.centered) : null,
101
- footer: json.footer ? this.mapToUIComponent(json.footer) : null,
102
- };
103
- }
104
-
105
- private mapToUINavigation(json: any): UINavigation {
106
- return {
107
- title: json.title ?? null,
108
- titleComponent: json.title_component
109
- ? this.mapToUIComponent(json.title_component)
110
- : null,
111
- };
112
- }
113
-
114
- private mapToUIComponent(json: Partial<UIComponent>): UIComponent {
115
- return {
116
- type: json.type || UIComponentType.COLUMN, // Define um tipo padrão
117
- components: json.components
118
- ? json.components.map((c) => this.mapToUIComponent(c))
119
- : [],
120
- element: json.element ? this.mapToUIElement(json.element) : null,
121
- };
122
- }
123
-
124
- private mapToUIElement(json: any): UIElement {
125
- return {
126
- label: json.label ?? null,
127
- textColor: json.text_color ? (json.text_color as UIColor) : null,
128
- textStyle: json.text_style ? (json.text_style as UITextStyle) : null,
129
- maxLines: json.max_lines ?? null,
130
- asset: json.asset ? (json.asset as UIAsset) : null,
131
- url: json.url ?? null,
132
- enabled: json.enabled ?? true,
133
- size: json.size ?? null,
134
- opacity: json.opacity ?? null,
135
- contentType: (json.content_type as UIContentType) ?? null,
136
- aspect: (json.aspect as UIAspectType) ?? null,
137
- grow: json.grow ?? null,
138
- placeholder: json.placeholder ?? null,
139
- placeholderTextColor: json.placeholder_text_color ?? null,
140
- placeholderTextStyle: json.placeholder_text_style ?? null,
141
- ...this.mapToUIView(json),
142
- };
143
- }
144
-
145
- private mapToUIView(json: any): UIView {
146
- return {
147
- padding: json.padding as UIPadding,
148
- background: json.background ? this.mapBackground(json.background) : null,
149
- action: json.action ? this.mapAction(json.action) : null,
150
- alignment: json.alignment
151
- ? { alignment: json.alignment as UIAlignmentType }
152
- : null,
153
- shadow: json.shadow as UIShadow,
154
- radius: json.radius ? this.mapRadius(json.radius) : null,
155
- spacing: json.spacing
156
- ? { spacing: json.spacing as UISpacingLevel }
157
- : null,
158
- };
159
- }
160
-
161
- private mapBackground(json: any): UIBackground {
162
- return {
163
- backgroundColor: json.background_color,
164
- };
165
- }
166
-
167
- private mapAction(json: any): UIAction {
168
- return {
169
- canAccess: json.can_acces ?? null,
170
- type: json.type ? (json.type as UIActionType) : null,
171
- url: json.url ?? null,
172
- };
173
- }
174
-
175
- private mapRadius(json: any): UIRadius {
176
- return {
177
- topLeft: json.top_left ? (json.top_left as UIRadiusLevel) : null,
178
- topRight: json.top_right ? (json.top_right as UIRadiusLevel) : null,
179
- bottomLeft: json.bottom_left ? (json.bottom_left as UIRadiusLevel) : null,
180
- bottomRight: json.bottom_right
181
- ? (json.bottom_right as UIRadiusLevel)
182
- : null,
183
- };
184
- }
185
- }
@@ -1,3 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
-
3
- export const SDUI_BASE_URL = new InjectionToken<string>('SDUI_BASE_URL');
@@ -1,32 +0,0 @@
1
- export enum UIComponentType {
2
- // stacks
3
- ROW = 'ROW',
4
- ROW_DIVISOR = 'ROW_DIVISOR',
5
- COLUMN = 'COLUMN',
6
- Z_STACK = 'Z_STACK',
7
-
8
- // elements
9
- BUTTON = 'BUTTON',
10
- LABEL = 'LABEL',
11
- IMAGE = 'IMAGE',
12
- SPACE = 'SPACE',
13
-
14
- // players
15
- VIDEO_PLAYER_HLS = 'VIDEO_PLAYER_HLS',
16
- VIDEO_PLAYER_WEB = 'VIDEO_PLAYER_WEB',
17
-
18
- // componentes visuais media
19
- MEDIA_TYPE = 'MEDIA_TYPE',
20
- MEDIA_CONTENT = 'MEDIA_CONTENT',
21
-
22
- // search
23
- SEARCH_BAR = 'SEARCH_BAR',
24
- SEARCH_BAR_DISMISS = 'SEARCH_BAR_DISMISS',
25
-
26
- // picker
27
- PICKER = 'PICKER',
28
- PICKER_ITEM = 'PICKER_ITEM',
29
-
30
- // tag
31
- TAG = 'TAG',
32
- }
@@ -1,4 +0,0 @@
1
- export enum UIPlatformType {
2
- iOS = 'iOS',
3
- Android = 'Android',
4
- }
@@ -1,3 +0,0 @@
1
- export enum UIScene {
2
- ACTIVITY_LIST = 'ACTIVITY_LIST',
3
- }
@@ -1,4 +0,0 @@
1
- export enum UIScreenIdentifier {
2
- SINGLE_COLUMN = 'SINGLE_COLUMN',
3
- CENTERED_CONTENT = 'CENTERED_CONTENT',
4
- }
@@ -1,90 +0,0 @@
1
- import { Type } from '@angular/core';
2
- import { UIComponentType } from '../enums/uicomponent-type';
3
-
4
- export const componentMapping: Record<
5
- UIComponentType,
6
- () => Promise<Type<any>>
7
- > = {
8
- // com filhos
9
- [UIComponentType.ROW]: () =>
10
- import('../../../components/uicomponent/row/row.component').then(
11
- (m) => m.RowComponent
12
- ),
13
- [UIComponentType.ROW_DIVISOR]: () =>
14
- import(
15
- '../../../components/uicomponent/row-divisor/row-divisor.component'
16
- ).then((m) => m.RowDivisorComponent),
17
-
18
- [UIComponentType.COLUMN]: () =>
19
- import('../../../components/uicomponent/column/column.component').then(
20
- (m) => m.ColumnComponent
21
- ),
22
- [UIComponentType.Z_STACK]: () =>
23
- import('../../../components/uicomponent/zstack/zstack.component').then(
24
- (m) => m.ZStackComponent
25
- ),
26
-
27
- // elementos
28
- [UIComponentType.BUTTON]: () =>
29
- import('../../../components/uicomponent/button/button.component').then(
30
- (m) => m.ButtonComponent
31
- ),
32
- [UIComponentType.IMAGE]: () =>
33
- import('../../../components/uicomponent/image/image.component').then(
34
- (m) => m.ImageComponent
35
- ),
36
- [UIComponentType.SPACE]: () =>
37
- import('../../../components/uicomponent/space/space.component').then(
38
- (m) => m.SpaceComponent
39
- ),
40
- [UIComponentType.LABEL]: () =>
41
- import('../../../components/uicomponent/label/label.component').then(
42
- (m) => m.LabelComponent
43
- ),
44
-
45
- // players
46
- [UIComponentType.VIDEO_PLAYER_HLS]: () =>
47
- import('../../../components/uicomponent/zstack/zstack.component').then(
48
- (m) => m.ZStackComponent
49
- ),
50
- [UIComponentType.VIDEO_PLAYER_WEB]: () =>
51
- import('../../../components/uicomponent/zstack/zstack.component').then(
52
- (m) => m.ZStackComponent
53
- ),
54
-
55
- // componentes visuais media
56
- [UIComponentType.MEDIA_TYPE]: () =>
57
- import('../../../components/uicomponent/zstack/zstack.component').then(
58
- (m) => m.ZStackComponent
59
- ),
60
- [UIComponentType.MEDIA_CONTENT]: () =>
61
- import('../../../components/uicomponent/zstack/zstack.component').then(
62
- (m) => m.ZStackComponent
63
- ),
64
-
65
- // search
66
- [UIComponentType.SEARCH_BAR]: () =>
67
- import(
68
- '../../../components/uicomponent/search-bar/search-bar.component'
69
- ).then((m) => m.SearchBarComponent),
70
- [UIComponentType.SEARCH_BAR_DISMISS]: () =>
71
- import('../../../components/uicomponent/zstack/zstack.component').then(
72
- (m) => m.ZStackComponent
73
- ),
74
-
75
- // picker
76
- [UIComponentType.PICKER]: () =>
77
- import('../../../components/uicomponent/zstack/zstack.component').then(
78
- (m) => m.ZStackComponent
79
- ),
80
- [UIComponentType.PICKER_ITEM]: () =>
81
- import('../../../components/uicomponent/zstack/zstack.component').then(
82
- (m) => m.ZStackComponent
83
- ),
84
-
85
- // tag
86
- [UIComponentType.TAG]: () =>
87
- import('../../../components/uicomponent/tag/tag.component').then(
88
- (m) => m.TagComponent
89
- ),
90
- };
@@ -1,25 +0,0 @@
1
- import { UIAspectType } from '../../uitheme/enums/uiaspect-type';
2
- import { UIAsset } from '../../uitheme/enums/uiasset';
3
- import { UIColor } from '../../uitheme/enums/uicolor';
4
- import { UIContentType } from '../../uitheme/enums/uicontent-type';
5
- import { UISize } from '../../uitheme/enums/uisize';
6
- import { UITextStyle } from '../../uitheme/enums/uitext-style';
7
- import { UIView } from './uiview';
8
-
9
- export interface UIElement extends UIView {
10
- label?: string | null;
11
- textColor?: UIColor | null;
12
- textStyle?: UITextStyle | null;
13
- maxLines?: number | null;
14
- asset?: UIAsset | null;
15
- url?: string | null;
16
- enabled?: boolean | null;
17
- size?: UISize | null;
18
- opacity?: number | null;
19
- contentType?: UIContentType | null;
20
- aspect?: UIAspectType | null;
21
- grow?: number | null;
22
- placeholder?: string | null;
23
- placeholderTextColor?: UIColor | null;
24
- placeholderTextStyle?: UITextStyle | null;
25
- }
@@ -1,4 +0,0 @@
1
- import { UIView } from './uiview';
2
-
3
- // interface ABSTRATA - não deve existir objetos dela!
4
- export interface UILayout extends UIView {}
@@ -1,14 +0,0 @@
1
- export enum UIActionType {
2
- // navegação
3
- INTERNAL_URL = 'INTERNAL_URL',
4
- RELOAD_INTERNAL_URL = 'RELOAD_INTERNAL_URL',
5
- DISMISS_TO_SCENE = 'DISMISS_TO_SCENE',
6
-
7
- // paywall
8
- PAYWALL = 'PAYWALL',
9
- REGISTER = 'REGISTER',
10
-
11
- // conteúdo
12
- HTML = 'HTML',
13
- FILE = 'FILE',
14
- }
@@ -1,5 +0,0 @@
1
- export enum UIAlignmentType {
2
- START = 'start',
3
- CENTER = 'center',
4
- END = 'end',
5
- }
@@ -1,4 +0,0 @@
1
- export enum UIAspectType {
2
- FILL = 'fill',
3
- FIT = 'fit',
4
- }