@edm-sdui/sdui 1.0.0 → 1.0.1
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/ng-package.json +9 -0
- package/package.json +16 -18
- package/src/index.ts +1 -0
- package/src/lib/components/navigation-controls/navigation-controls.component.html +9 -0
- package/src/lib/components/navigation-controls/navigation-controls.component.scss +35 -0
- package/src/lib/components/navigation-controls/navigation-controls.component.ts +27 -0
- package/src/lib/components/uicomponent/button/button.component.html +4 -0
- package/src/lib/components/uicomponent/button/button.component.scss +11 -0
- package/src/lib/components/uicomponent/button/button.component.ts +64 -0
- package/src/lib/components/uicomponent/column/column.component.html +7 -0
- package/src/lib/components/uicomponent/column/column.component.scss +9 -0
- package/src/lib/components/uicomponent/column/column.component.ts +16 -0
- package/src/lib/components/uicomponent/image/image.component.html +1 -0
- package/src/lib/components/uicomponent/image/image.component.scss +3 -0
- package/src/lib/components/uicomponent/image/image.component.ts +69 -0
- package/src/lib/components/uicomponent/label/label.component.html +3 -0
- package/src/lib/components/uicomponent/label/label.component.scss +3 -0
- package/src/lib/components/uicomponent/label/label.component.ts +66 -0
- package/src/lib/components/uicomponent/row/row.component.html +7 -0
- package/src/lib/components/uicomponent/row/row.component.scss +8 -0
- package/src/lib/components/uicomponent/row/row.component.ts +16 -0
- package/src/lib/components/uicomponent/row-divisor/row-divisor.component.html +5 -0
- package/src/lib/components/uicomponent/row-divisor/row-divisor.component.scss +8 -0
- package/src/lib/components/uicomponent/row-divisor/row-divisor.component.ts +16 -0
- package/src/lib/components/uicomponent/search-bar/search-bar.component.html +7 -0
- package/src/lib/components/uicomponent/search-bar/search-bar.component.scss +7 -0
- package/src/lib/components/uicomponent/search-bar/search-bar.component.ts +129 -0
- package/src/lib/components/uicomponent/space/space.component.html +1 -0
- package/src/lib/components/uicomponent/space/space.component.scss +10 -0
- package/src/lib/components/uicomponent/space/space.component.ts +16 -0
- package/src/lib/components/uicomponent/tag/tag.component.html +3 -0
- package/src/lib/components/uicomponent/tag/tag.component.scss +7 -0
- package/src/lib/components/uicomponent/tag/tag.component.ts +54 -0
- package/src/lib/components/uicomponent/uicomponent.component.html +5 -0
- package/src/lib/components/uicomponent/uicomponent.component.scss +3 -0
- package/src/lib/components/uicomponent/uicomponent.component.ts +53 -0
- package/src/lib/components/uicomponent/zstack/zstack.component.html +6 -0
- package/src/lib/components/uicomponent/zstack/zstack.component.scss +12 -0
- package/src/lib/components/uicomponent/zstack/zstack.component.ts +16 -0
- package/src/lib/components/uilayout/centered-content-layout/centered-content-layout.component.html +20 -0
- package/src/lib/components/uilayout/centered-content-layout/centered-content-layout.component.scss +36 -0
- package/src/lib/components/uilayout/centered-content-layout/centered-content-layout.component.ts +21 -0
- package/src/lib/components/uilayout/single-column-layout/single-column-layout.component.html +22 -0
- package/src/lib/components/uilayout/single-column-layout/single-column-layout.component.scss +37 -0
- package/src/lib/components/uilayout/single-column-layout/single-column-layout.component.ts +27 -0
- package/src/lib/components/uilayout/uinavigation/uinavigation.component.html +8 -0
- package/src/lib/components/uilayout/uinavigation/uinavigation.component.scss +4 -0
- package/src/lib/components/uilayout/uinavigation/uinavigation.component.ts +12 -0
- package/src/lib/components/uiscreen/uiscreen.component.html +29 -0
- package/src/lib/components/uiscreen/uiscreen.component.scss +12 -0
- package/src/lib/components/uiscreen/uiscreen.component.ts +15 -0
- package/src/lib/core/interfaces/sdui-config.interface.ts +3 -0
- package/src/lib/core/services/navigation.service.ts +25 -0
- package/src/lib/core/services/sdui-config.service.ts +19 -0
- package/src/lib/core/services/ui-action.service.ts +36 -0
- package/src/lib/core/services/uiscreen.service.ts +185 -0
- package/src/lib/core/tokens/sdui-config.token.ts +3 -0
- package/src/lib/core/uicomposition/enums/uicomponent-type.ts +32 -0
- package/src/lib/core/uicomposition/enums/uiplatform-type.ts +4 -0
- package/src/lib/core/uicomposition/enums/uiscene.ts +3 -0
- package/src/lib/core/uicomposition/enums/uiscreen-identifier.ts +4 -0
- package/src/lib/core/uicomposition/mapping/component-mapping.ts +90 -0
- package/src/lib/core/uicomposition/models/uicentered-content-layout.ts +11 -0
- package/{lib/core/uicomposition/models/uicomponent.d.ts → src/lib/core/uicomposition/models/uicomponent.ts} +5 -5
- package/src/lib/core/uicomposition/models/uielement.ts +25 -0
- package/src/lib/core/uicomposition/models/uilayout.ts +4 -0
- package/src/lib/core/uicomposition/models/uinavigation.ts +6 -0
- package/{lib/core/uicomposition/models/uiscreen.d.ts → src/lib/core/uicomposition/models/uiscreen.ts} +6 -6
- package/{lib/core/uicomposition/models/uisingle-column-layout.d.ts → src/lib/core/uicomposition/models/uisingle-column-layout.ts} +5 -5
- package/{lib/core/uicomposition/models/uiview.d.ts → src/lib/core/uicomposition/models/uiview.ts} +9 -8
- package/src/lib/core/uitheme/enums/uiaction-type.ts +14 -0
- package/src/lib/core/uitheme/enums/uialignment-type.ts +5 -0
- package/src/lib/core/uitheme/enums/uiaspect-type.ts +4 -0
- package/src/lib/core/uitheme/enums/uiasset.ts +361 -0
- package/src/lib/core/uitheme/enums/uicolor.ts +129 -0
- package/src/lib/core/uitheme/enums/uicontent-type.ts +8 -0
- package/src/lib/core/uitheme/enums/uipadding-level.ts +10 -0
- package/src/lib/core/uitheme/enums/uipresentation-style.ts +5 -0
- package/src/lib/core/uitheme/enums/uiradius-level.ts +8 -0
- package/src/lib/core/uitheme/enums/uishadow-blur-radius.ts +3 -0
- package/src/lib/core/uitheme/enums/uishadow-offset.ts +3 -0
- package/src/lib/core/uitheme/enums/uisize.ts +12 -0
- package/src/lib/core/uitheme/enums/uispacing-level.ts +6 -0
- package/src/lib/core/uitheme/enums/uitext-style.ts +13 -0
- package/src/lib/core/uitheme/mapping/alignment-mapping.ts +7 -0
- package/src/lib/core/uitheme/mapping/asset-mapping.ts +363 -0
- package/src/lib/core/uitheme/mapping/color-mapping.ts +131 -0
- package/src/lib/core/uitheme/mapping/pad-mapping.ts +12 -0
- package/src/lib/core/uitheme/mapping/radius-mapping.ts +10 -0
- package/src/lib/core/uitheme/mapping/size-mapping.ts +25 -0
- package/src/lib/core/uitheme/mapping/space-mapping.ts +8 -0
- package/src/lib/core/uitheme/mapping/text-style-mapping.ts +15 -0
- package/src/lib/core/uitheme/models/uiaction.ts +10 -0
- package/{lib/core/uitheme/models/uialignment.d.ts → src/lib/core/uitheme/models/uialignment.ts} +2 -2
- package/{lib/core/uitheme/models/uibackground.d.ts → src/lib/core/uitheme/models/uibackground.ts} +2 -2
- package/src/lib/core/uitheme/models/uipadding.ts +8 -0
- package/src/lib/core/uitheme/models/uiradius.ts +8 -0
- package/{lib/core/uitheme/models/uishadow.d.ts → src/lib/core/uitheme/models/uishadow.ts} +6 -6
- package/{lib/core/uitheme/models/uispacing.d.ts → src/lib/core/uitheme/models/uispacing.ts} +2 -2
- package/src/lib/core/uitheme/models/uiview.ts +0 -0
- package/src/lib/core/utils/url-parser.util.ts +24 -0
- package/src/lib/core/view-models/uiscreen.viewmodel.ts +115 -0
- package/src/lib/directives/uiview.directive.ts +207 -0
- package/src/lib/sdui-routing.module.ts +22 -0
- package/src/lib/sdui.component.html +3 -0
- package/src/lib/sdui.component.scss +11 -0
- package/src/lib/sdui.component.ts +65 -0
- package/src/lib/sdui.module.ts +84 -0
- package/src/public-api.ts +16 -0
- package/tsconfig.lib.json +16 -0
- package/tsconfig.spec.json +12 -0
- package/edm-sdui-sdui.d.ts.map +0 -1
- package/fesm2022/edm-sdui-sdui.mjs +0 -2279
- package/fesm2022/edm-sdui-sdui.mjs.map +0 -1
- package/index.d.ts +0 -6
- package/lib/components/navigation-controls/navigation-controls.component.d.ts +0 -12
- package/lib/components/navigation-controls/navigation-controls.component.d.ts.map +0 -1
- package/lib/components/uicomponent/button/button.component.d.ts +0 -17
- package/lib/components/uicomponent/button/button.component.d.ts.map +0 -1
- package/lib/components/uicomponent/column/column.component.d.ts +0 -11
- package/lib/components/uicomponent/column/column.component.d.ts.map +0 -1
- package/lib/components/uicomponent/image/image.component.d.ts +0 -15
- package/lib/components/uicomponent/image/image.component.d.ts.map +0 -1
- package/lib/components/uicomponent/label/label.component.d.ts +0 -15
- package/lib/components/uicomponent/label/label.component.d.ts.map +0 -1
- package/lib/components/uicomponent/row/row.component.d.ts +0 -11
- package/lib/components/uicomponent/row/row.component.d.ts.map +0 -1
- package/lib/components/uicomponent/row-divisor/row-divisor.component.d.ts +0 -11
- package/lib/components/uicomponent/row-divisor/row-divisor.component.d.ts.map +0 -1
- package/lib/components/uicomponent/search-bar/search-bar.component.d.ts +0 -17
- package/lib/components/uicomponent/search-bar/search-bar.component.d.ts.map +0 -1
- package/lib/components/uicomponent/space/space.component.d.ts +0 -11
- package/lib/components/uicomponent/space/space.component.d.ts.map +0 -1
- package/lib/components/uicomponent/tag/tag.component.d.ts +0 -17
- package/lib/components/uicomponent/tag/tag.component.d.ts.map +0 -1
- package/lib/components/uicomponent/uicomponent.component.d.ts +0 -17
- package/lib/components/uicomponent/uicomponent.component.d.ts.map +0 -1
- package/lib/components/uicomponent/zstack/zstack.component.d.ts +0 -11
- package/lib/components/uicomponent/zstack/zstack.component.d.ts.map +0 -1
- package/lib/components/uilayout/centered-content-layout/centered-content-layout.component.d.ts +0 -10
- package/lib/components/uilayout/centered-content-layout/centered-content-layout.component.d.ts.map +0 -1
- package/lib/components/uilayout/single-column-layout/single-column-layout.component.d.ts +0 -10
- package/lib/components/uilayout/single-column-layout/single-column-layout.component.d.ts.map +0 -1
- package/lib/components/uilayout/uinavigation/uinavigation.component.d.ts +0 -8
- package/lib/components/uilayout/uinavigation/uinavigation.component.d.ts.map +0 -1
- package/lib/components/uiscreen/uiscreen.component.d.ts +0 -11
- package/lib/components/uiscreen/uiscreen.component.d.ts.map +0 -1
- package/lib/core/services/ui-action.service.d.ts +0 -11
- package/lib/core/services/ui-action.service.d.ts.map +0 -1
- package/lib/core/services/uiscreen.service.d.ts +0 -24
- package/lib/core/services/uiscreen.service.d.ts.map +0 -1
- package/lib/core/tokens/sdui-config.token.d.ts +0 -3
- package/lib/core/tokens/sdui-config.token.d.ts.map +0 -1
- package/lib/core/uicomposition/enums/uicomponent-type.d.ts +0 -20
- package/lib/core/uicomposition/enums/uicomponent-type.d.ts.map +0 -1
- package/lib/core/uicomposition/enums/uiplatform-type.d.ts +0 -5
- package/lib/core/uicomposition/enums/uiplatform-type.d.ts.map +0 -1
- package/lib/core/uicomposition/enums/uiscene.d.ts +0 -4
- package/lib/core/uicomposition/enums/uiscene.d.ts.map +0 -1
- package/lib/core/uicomposition/enums/uiscreen-identifier.d.ts +0 -5
- package/lib/core/uicomposition/enums/uiscreen-identifier.d.ts.map +0 -1
- package/lib/core/uicomposition/mapping/component-mapping.d.ts +0 -4
- package/lib/core/uicomposition/mapping/component-mapping.d.ts.map +0 -1
- package/lib/core/uicomposition/models/uicentered-content-layout.d.ts +0 -11
- package/lib/core/uicomposition/models/uicentered-content-layout.d.ts.map +0 -1
- package/lib/core/uicomposition/models/uicomponent.d.ts.map +0 -1
- package/lib/core/uicomposition/models/uielement.d.ts +0 -25
- package/lib/core/uicomposition/models/uielement.d.ts.map +0 -1
- package/lib/core/uicomposition/models/uilayout.d.ts +0 -4
- package/lib/core/uicomposition/models/uilayout.d.ts.map +0 -1
- package/lib/core/uicomposition/models/uinavigation.d.ts +0 -6
- package/lib/core/uicomposition/models/uinavigation.d.ts.map +0 -1
- package/lib/core/uicomposition/models/uiscreen.d.ts.map +0 -1
- package/lib/core/uicomposition/models/uisingle-column-layout.d.ts.map +0 -1
- package/lib/core/uicomposition/models/uiview.d.ts.map +0 -1
- package/lib/core/uitheme/enums/uiaction-type.d.ts +0 -10
- package/lib/core/uitheme/enums/uiaction-type.d.ts.map +0 -1
- package/lib/core/uitheme/enums/uialignment-type.d.ts +0 -6
- package/lib/core/uitheme/enums/uialignment-type.d.ts.map +0 -1
- package/lib/core/uitheme/enums/uiaspect-type.d.ts +0 -5
- package/lib/core/uitheme/enums/uiaspect-type.d.ts.map +0 -1
- package/lib/core/uitheme/enums/uiasset.d.ts +0 -354
- package/lib/core/uitheme/enums/uiasset.d.ts.map +0 -1
- package/lib/core/uitheme/enums/uicolor.d.ts +0 -130
- package/lib/core/uitheme/enums/uicolor.d.ts.map +0 -1
- package/lib/core/uitheme/enums/uicontent-type.d.ts +0 -9
- package/lib/core/uitheme/enums/uicontent-type.d.ts.map +0 -1
- package/lib/core/uitheme/enums/uipadding-level.d.ts +0 -11
- package/lib/core/uitheme/enums/uipadding-level.d.ts.map +0 -1
- package/lib/core/uitheme/enums/uipresentation-style.d.ts +0 -6
- package/lib/core/uitheme/enums/uipresentation-style.d.ts.map +0 -1
- package/lib/core/uitheme/enums/uiradius-level.d.ts +0 -9
- package/lib/core/uitheme/enums/uiradius-level.d.ts.map +0 -1
- package/lib/core/uitheme/enums/uishadow-blur-radius.d.ts +0 -4
- package/lib/core/uitheme/enums/uishadow-blur-radius.d.ts.map +0 -1
- package/lib/core/uitheme/enums/uishadow-offset.d.ts +0 -4
- package/lib/core/uitheme/enums/uishadow-offset.d.ts.map +0 -1
- package/lib/core/uitheme/enums/uisize.d.ts +0 -12
- package/lib/core/uitheme/enums/uisize.d.ts.map +0 -1
- package/lib/core/uitheme/enums/uispacing-level.d.ts +0 -7
- package/lib/core/uitheme/enums/uispacing-level.d.ts.map +0 -1
- package/lib/core/uitheme/enums/uitext-style.d.ts +0 -14
- package/lib/core/uitheme/enums/uitext-style.d.ts.map +0 -1
- package/lib/core/uitheme/mapping/alignment-mapping.d.ts +0 -3
- package/lib/core/uitheme/mapping/alignment-mapping.d.ts.map +0 -1
- package/lib/core/uitheme/mapping/asset-mapping.d.ts +0 -3
- package/lib/core/uitheme/mapping/asset-mapping.d.ts.map +0 -1
- package/lib/core/uitheme/mapping/color-mapping.d.ts +0 -3
- package/lib/core/uitheme/mapping/color-mapping.d.ts.map +0 -1
- package/lib/core/uitheme/mapping/pad-mapping.d.ts +0 -3
- package/lib/core/uitheme/mapping/pad-mapping.d.ts.map +0 -1
- package/lib/core/uitheme/mapping/radius-mapping.d.ts +0 -3
- package/lib/core/uitheme/mapping/radius-mapping.d.ts.map +0 -1
- package/lib/core/uitheme/mapping/size-mapping.d.ts +0 -4
- package/lib/core/uitheme/mapping/size-mapping.d.ts.map +0 -1
- package/lib/core/uitheme/mapping/space-mapping.d.ts +0 -3
- package/lib/core/uitheme/mapping/space-mapping.d.ts.map +0 -1
- package/lib/core/uitheme/mapping/text-style-mapping.d.ts +0 -3
- package/lib/core/uitheme/mapping/text-style-mapping.d.ts.map +0 -1
- package/lib/core/uitheme/models/uiaction.d.ts +0 -10
- package/lib/core/uitheme/models/uiaction.d.ts.map +0 -1
- package/lib/core/uitheme/models/uialignment.d.ts.map +0 -1
- package/lib/core/uitheme/models/uibackground.d.ts.map +0 -1
- package/lib/core/uitheme/models/uipadding.d.ts +0 -8
- package/lib/core/uitheme/models/uipadding.d.ts.map +0 -1
- package/lib/core/uitheme/models/uiradius.d.ts +0 -8
- package/lib/core/uitheme/models/uiradius.d.ts.map +0 -1
- package/lib/core/uitheme/models/uishadow.d.ts.map +0 -1
- package/lib/core/uitheme/models/uispacing.d.ts.map +0 -1
- package/lib/core/utils/url-parser.util.d.ts +0 -3
- package/lib/core/utils/url-parser.util.d.ts.map +0 -1
- package/lib/core/view-models/uiscreen.viewmodel.d.ts +0 -40
- package/lib/core/view-models/uiscreen.viewmodel.d.ts.map +0 -1
- package/lib/directives/uiview.directive.d.ts +0 -29
- package/lib/directives/uiview.directive.d.ts.map +0 -1
- package/lib/sdui-routing.module.d.ts +0 -10
- package/lib/sdui-routing.module.d.ts.map +0 -1
- package/lib/sdui.component.d.ts +0 -17
- package/lib/sdui.component.d.ts.map +0 -1
- package/lib/sdui.module.d.ts +0 -35
- package/lib/sdui.module.d.ts.map +0 -1
- package/public-api.d.ts +0 -5
- package/public-api.d.ts.map +0 -1
package/ng-package.json
ADDED
package/package.json
CHANGED
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edm-sdui/sdui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"typings": "index.d.ts",
|
|
14
|
-
"exports": {
|
|
15
|
-
"./package.json": {
|
|
16
|
-
"default": "./package.json"
|
|
17
|
-
},
|
|
18
|
-
".": {
|
|
19
|
-
"types": "./index.d.ts",
|
|
20
|
-
"default": "./fesm2022/edm-sdui-sdui.mjs"
|
|
8
|
+
"ngPackage": {
|
|
9
|
+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
|
10
|
+
"dest": "../../dist/libs/sdui",
|
|
11
|
+
"lib": {
|
|
12
|
+
"entryFile": "src/public-api.ts"
|
|
21
13
|
}
|
|
22
14
|
},
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "ng-packagr -p ng-package.json"
|
|
17
|
+
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"@angular/core": "^18.2.9",
|
|
20
|
+
"@angular/common": "^18.2.9"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"ng-packagr": "^18.2.9"
|
|
26
24
|
}
|
|
27
|
-
}
|
|
25
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: contents;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.navigation-controls {
|
|
6
|
+
display: flex;
|
|
7
|
+
gap: 8px;
|
|
8
|
+
//margin: 8px;
|
|
9
|
+
|
|
10
|
+
button {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
padding: 8px;
|
|
15
|
+
border-radius: 4px;
|
|
16
|
+
border: 1px solid #e0e0e0;
|
|
17
|
+
background-color: #f5f5f5;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
transition: all 0.2s ease;
|
|
20
|
+
|
|
21
|
+
&:hover:not(:disabled) {
|
|
22
|
+
background-color: #e8e8e8;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:disabled {
|
|
26
|
+
opacity: 0.5;
|
|
27
|
+
cursor: not-allowed;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.material-icons {
|
|
31
|
+
font-size: 18px;
|
|
32
|
+
color: #444;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Component, OnInit } from '@angular/core';
|
|
2
|
+
import { UIScreenViewModel } from '../../core/view-models/uiscreen.viewmodel';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'edm-sdui-navigation-controls',
|
|
6
|
+
templateUrl: './navigation-controls.component.html',
|
|
7
|
+
styleUrls: ['./navigation-controls.component.scss'],
|
|
8
|
+
standalone: false,
|
|
9
|
+
})
|
|
10
|
+
export class NavigationControlsComponent implements OnInit {
|
|
11
|
+
constructor(public viewModel: UIScreenViewModel) {}
|
|
12
|
+
|
|
13
|
+
ngOnInit(): void {
|
|
14
|
+
// Monitorar o estado do botão de voltar para debugging
|
|
15
|
+
this.viewModel.canGoBack$.subscribe((canGoBack) => {
|
|
16
|
+
console.debug(
|
|
17
|
+
'[NavigationControls] Estado do botão de voltar:',
|
|
18
|
+
canGoBack
|
|
19
|
+
);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
goBack(): void {
|
|
24
|
+
console.debug('[NavigationControls] Botão de voltar clicado');
|
|
25
|
+
this.viewModel.goBack();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: contents;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
button {
|
|
6
|
+
border: none;
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
line-height: 1.5;
|
|
9
|
+
// transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
|
10
|
+
background-color: unset;
|
|
11
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AfterViewInit,
|
|
3
|
+
Component,
|
|
4
|
+
ElementRef,
|
|
5
|
+
Inject,
|
|
6
|
+
OnInit,
|
|
7
|
+
Renderer2,
|
|
8
|
+
ViewChild,
|
|
9
|
+
} from '@angular/core';
|
|
10
|
+
import { UIComponent } from '../../../core/uicomposition/models/uicomponent';
|
|
11
|
+
import { UIElement } from '../../../core/uicomposition/models/uielement';
|
|
12
|
+
import { colorMapping } from '../../../core/uitheme/mapping/color-mapping';
|
|
13
|
+
import { textStyleMappingFontSize } from '../../../core/uitheme/mapping/text-style-mapping';
|
|
14
|
+
import { assetMapping } from '../../../core/uitheme/mapping/asset-mapping';
|
|
15
|
+
import { UIAsset } from '../../../core/uitheme/enums/uiasset';
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'edm-sdui-button',
|
|
19
|
+
templateUrl: './button.component.html',
|
|
20
|
+
styleUrl: './button.component.scss',
|
|
21
|
+
standalone: false,
|
|
22
|
+
})
|
|
23
|
+
export class ButtonComponent implements OnInit, AfterViewInit {
|
|
24
|
+
@ViewChild('buttonElement') buttonElementRef!: ElementRef<HTMLButtonElement>;
|
|
25
|
+
|
|
26
|
+
constructor(
|
|
27
|
+
@Inject('uiComponent') public uiComponent: UIComponent,
|
|
28
|
+
private renderer: Renderer2
|
|
29
|
+
) {}
|
|
30
|
+
|
|
31
|
+
ngOnInit(): void {
|
|
32
|
+
// console.debug('button.uiComponent: ', this.uiComponent);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
ngAfterViewInit(): void {
|
|
36
|
+
if (this.uiComponent.element) {
|
|
37
|
+
this.applyElement(this.uiComponent.element);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
private applyElement(element: UIElement) {
|
|
42
|
+
if (element.textColor) {
|
|
43
|
+
const color = colorMapping[element.textColor];
|
|
44
|
+
this.renderer.setStyle(
|
|
45
|
+
this.buttonElementRef.nativeElement,
|
|
46
|
+
'color',
|
|
47
|
+
color
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (element.textStyle) {
|
|
52
|
+
const fontSize = textStyleMappingFontSize[element.textStyle];
|
|
53
|
+
this.renderer.setStyle(
|
|
54
|
+
this.buttonElementRef.nativeElement,
|
|
55
|
+
'font-size',
|
|
56
|
+
fontSize
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
getAssetPath(asset: UIAsset) {
|
|
62
|
+
return './assets/' +assetMapping[asset];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component, Inject, OnInit } from '@angular/core';
|
|
2
|
+
import { UIComponent } from '../../../core/uicomposition/models/uicomponent';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'edm-sdui-column',
|
|
6
|
+
templateUrl: './column.component.html',
|
|
7
|
+
styleUrl: './column.component.scss',
|
|
8
|
+
standalone: false,
|
|
9
|
+
})
|
|
10
|
+
export class ColumnComponent implements OnInit {
|
|
11
|
+
constructor(@Inject('uiComponent') public uiComponent: UIComponent) {}
|
|
12
|
+
|
|
13
|
+
ngOnInit(): void {
|
|
14
|
+
// console.debug('column.uiComponent: ', this.uiComponent);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<img #imgElement [edmSduiView]="uiComponent.element" *ngIf="uiComponent" />
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AfterViewInit,
|
|
3
|
+
Component,
|
|
4
|
+
ElementRef,
|
|
5
|
+
Inject,
|
|
6
|
+
OnInit,
|
|
7
|
+
Renderer2,
|
|
8
|
+
ViewChild,
|
|
9
|
+
} from '@angular/core';
|
|
10
|
+
import { UIComponent } from '../../../core/uicomposition/models/uicomponent';
|
|
11
|
+
import { UIElement } from '../../../core/uicomposition/models/uielement';
|
|
12
|
+
import { assetMapping } from '../../../core/uitheme/mapping/asset-mapping';
|
|
13
|
+
import {
|
|
14
|
+
sizeMappingHeight,
|
|
15
|
+
sizeMappingWidth,
|
|
16
|
+
} from '../../../core/uitheme/mapping/size-mapping';
|
|
17
|
+
|
|
18
|
+
@Component({
|
|
19
|
+
selector: 'edm-sdui-image',
|
|
20
|
+
templateUrl: './image.component.html',
|
|
21
|
+
styleUrl: './image.component.scss',
|
|
22
|
+
standalone: false,
|
|
23
|
+
})
|
|
24
|
+
export class ImageComponent implements OnInit, AfterViewInit {
|
|
25
|
+
@ViewChild('imgElement') imgElementRef!: ElementRef<HTMLImageElement>;
|
|
26
|
+
|
|
27
|
+
constructor(
|
|
28
|
+
@Inject('uiComponent') public uiComponent: UIComponent,
|
|
29
|
+
private renderer: Renderer2
|
|
30
|
+
) {}
|
|
31
|
+
|
|
32
|
+
ngOnInit(): void {
|
|
33
|
+
// console.debug('image.uiComponent: ', this.uiComponent);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
ngAfterViewInit(): void {
|
|
37
|
+
if (this.uiComponent?.element) {
|
|
38
|
+
this.applyElement(this.uiComponent.element);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
private applyElement(element: UIElement) {
|
|
43
|
+
if (element.asset) {
|
|
44
|
+
const asset = assetMapping[element.asset];
|
|
45
|
+
this.renderer.setAttribute(
|
|
46
|
+
this.imgElementRef.nativeElement,
|
|
47
|
+
'src',
|
|
48
|
+
'./assets/' + asset
|
|
49
|
+
);
|
|
50
|
+
} else if (element.url) {
|
|
51
|
+
this.renderer.setAttribute(
|
|
52
|
+
this.imgElementRef.nativeElement,
|
|
53
|
+
'src',
|
|
54
|
+
element.url
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (element.size) {
|
|
59
|
+
const height = sizeMappingHeight[element.size];
|
|
60
|
+
const width = sizeMappingWidth[element.size];
|
|
61
|
+
this.renderer.setStyle(
|
|
62
|
+
this.imgElementRef.nativeElement,
|
|
63
|
+
'height',
|
|
64
|
+
height
|
|
65
|
+
);
|
|
66
|
+
this.renderer.setStyle(this.imgElementRef.nativeElement, 'width', width);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AfterViewInit,
|
|
3
|
+
Component,
|
|
4
|
+
ElementRef,
|
|
5
|
+
Inject,
|
|
6
|
+
OnInit,
|
|
7
|
+
Renderer2,
|
|
8
|
+
ViewChild,
|
|
9
|
+
} from '@angular/core';
|
|
10
|
+
import { UIComponent } from '../../../core/uicomposition/models/uicomponent';
|
|
11
|
+
import { UIElement } from '../../../core/uicomposition/models/uielement';
|
|
12
|
+
import { colorMapping } from '../../../core/uitheme/mapping/color-mapping';
|
|
13
|
+
import { textStyleMappingFontSize } from '../../../core/uitheme/mapping/text-style-mapping';
|
|
14
|
+
|
|
15
|
+
@Component({
|
|
16
|
+
selector: 'edm-sdui-label',
|
|
17
|
+
templateUrl: './label.component.html',
|
|
18
|
+
styleUrl: './label.component.scss',
|
|
19
|
+
standalone: false,
|
|
20
|
+
})
|
|
21
|
+
export class LabelComponent implements OnInit, AfterViewInit {
|
|
22
|
+
@ViewChild('spanElement') spanElementRef!: ElementRef<HTMLImageElement>;
|
|
23
|
+
|
|
24
|
+
constructor(
|
|
25
|
+
@Inject('uiComponent') public uiComponent: UIComponent,
|
|
26
|
+
private renderer: Renderer2
|
|
27
|
+
) {}
|
|
28
|
+
|
|
29
|
+
ngOnInit(): void {
|
|
30
|
+
// console.debug('label.uiComponent: ', this.uiComponent);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
ngAfterViewInit(): void {
|
|
34
|
+
if (this.uiComponent.element) {
|
|
35
|
+
this.applyElement(this.uiComponent.element);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
private applyElement(element: UIElement) {
|
|
40
|
+
if (element.textColor) {
|
|
41
|
+
const color = colorMapping[element.textColor];
|
|
42
|
+
this.renderer.setStyle(this.spanElementRef.nativeElement, 'color', color);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (element.textStyle) {
|
|
46
|
+
const fontSize = textStyleMappingFontSize[element.textStyle];
|
|
47
|
+
this.renderer.setStyle(
|
|
48
|
+
this.spanElementRef.nativeElement,
|
|
49
|
+
'font-size',
|
|
50
|
+
fontSize
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const maxLines = element.maxLines ?? 1;
|
|
55
|
+
// TODO: - definir o maxLines do Span
|
|
56
|
+
|
|
57
|
+
if (element.opacity) {
|
|
58
|
+
const opacity = element.opacity;
|
|
59
|
+
this.renderer.setStyle(
|
|
60
|
+
this.spanElementRef.nativeElement,
|
|
61
|
+
'opacity',
|
|
62
|
+
opacity
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component, Inject, OnInit } from '@angular/core';
|
|
2
|
+
import { UIComponent } from '../../../core/uicomposition/models/uicomponent';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'edm-sdui-row',
|
|
6
|
+
styleUrl: './row.component.scss',
|
|
7
|
+
templateUrl: './row.component.html',
|
|
8
|
+
standalone: false,
|
|
9
|
+
})
|
|
10
|
+
export class RowComponent implements OnInit {
|
|
11
|
+
constructor(@Inject('uiComponent') public uiComponent: UIComponent) {}
|
|
12
|
+
|
|
13
|
+
ngOnInit(): void {
|
|
14
|
+
// console.debug('row.uiComponent: ', this.uiComponent);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component, Inject, OnInit } from '@angular/core';
|
|
2
|
+
import { UIComponent } from '../../../core/uicomposition/models/uicomponent';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'edm-sdui-row-divisor',
|
|
6
|
+
styleUrl: './row-divisor.component.scss',
|
|
7
|
+
templateUrl: './row-divisor.component.html',
|
|
8
|
+
standalone: false,
|
|
9
|
+
})
|
|
10
|
+
export class RowDivisorComponent implements OnInit {
|
|
11
|
+
constructor(@Inject('uiComponent') public uiComponent: UIComponent) {}
|
|
12
|
+
|
|
13
|
+
ngOnInit(): void {
|
|
14
|
+
// console.debug('rowDivisor.uiComponent: ', this.uiComponent);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AfterViewInit,
|
|
3
|
+
Component,
|
|
4
|
+
ElementRef,
|
|
5
|
+
Inject,
|
|
6
|
+
OnInit,
|
|
7
|
+
Renderer2,
|
|
8
|
+
ViewChild,
|
|
9
|
+
} from '@angular/core';
|
|
10
|
+
import { UIComponent } from '../../../core/uicomposition/models/uicomponent';
|
|
11
|
+
import { UIElement } from '../../../core/uicomposition/models/uielement';
|
|
12
|
+
import { colorMapping } from '../../../core/uitheme/mapping/color-mapping';
|
|
13
|
+
import { textStyleMappingFontSize } from '../../../core/uitheme/mapping/text-style-mapping';
|
|
14
|
+
import { UIActionService } from '../../../core/services/ui-action.service';
|
|
15
|
+
|
|
16
|
+
@Component({
|
|
17
|
+
styleUrl: './search-bar.component.scss',
|
|
18
|
+
templateUrl: './search-bar.component.html',
|
|
19
|
+
standalone: false,
|
|
20
|
+
selector: 'edm-sdui-search-bar',
|
|
21
|
+
})
|
|
22
|
+
export class SearchBarComponent implements OnInit, AfterViewInit {
|
|
23
|
+
@ViewChild('inputElement') inputElementRef!: ElementRef<HTMLInputElement>;
|
|
24
|
+
|
|
25
|
+
constructor(
|
|
26
|
+
private actionService: UIActionService,
|
|
27
|
+
@Inject('uiComponent') public uiComponent: UIComponent,
|
|
28
|
+
private renderer: Renderer2
|
|
29
|
+
) {}
|
|
30
|
+
|
|
31
|
+
ngOnInit(): void {
|
|
32
|
+
// console.debug('label.uiComponent: ', this.uiComponent);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
ngAfterViewInit(): void {
|
|
36
|
+
if (this.uiComponent.element) {
|
|
37
|
+
this.applyElement(this.uiComponent.element);
|
|
38
|
+
this.renderer.listen(
|
|
39
|
+
this.inputElementRef.nativeElement,
|
|
40
|
+
'keydown',
|
|
41
|
+
(event: KeyboardEvent) => {
|
|
42
|
+
if (event.key === 'Enter') {
|
|
43
|
+
const action = this.uiComponent.element?.action;
|
|
44
|
+
const inputValue = this.inputElementRef.nativeElement.value.trim();
|
|
45
|
+
|
|
46
|
+
if (action && inputValue && action.url) {
|
|
47
|
+
const param = action.param || 'SEARCH';
|
|
48
|
+
const encodedValue = encodeURIComponent(inputValue);
|
|
49
|
+
|
|
50
|
+
try {
|
|
51
|
+
const parsed = new URL(action.url);
|
|
52
|
+
const innerUrlRaw = parsed.searchParams.get('url');
|
|
53
|
+
|
|
54
|
+
if (innerUrlRaw) {
|
|
55
|
+
const decodedInnerUrl = decodeURIComponent(innerUrlRaw);
|
|
56
|
+
const updatedInnerUrl = decodedInnerUrl.replace(
|
|
57
|
+
`{${param}}`,
|
|
58
|
+
encodedValue
|
|
59
|
+
);
|
|
60
|
+
parsed.searchParams.set(
|
|
61
|
+
'url',
|
|
62
|
+
encodeURIComponent(updatedInnerUrl)
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
const adjustedUrl = parsed.toString();
|
|
66
|
+
|
|
67
|
+
console.debug('[key.enter]', {
|
|
68
|
+
param,
|
|
69
|
+
encodedValue,
|
|
70
|
+
adjustedUrl,
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
this.actionService.execute({
|
|
74
|
+
...action,
|
|
75
|
+
url: adjustedUrl,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
} catch (err) {
|
|
79
|
+
console.warn(
|
|
80
|
+
'[key.enter] Invalid action.url format:',
|
|
81
|
+
action.url,
|
|
82
|
+
err
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
private applyElement(element: UIElement) {
|
|
93
|
+
console.debug('search.element:', element);
|
|
94
|
+
|
|
95
|
+
const inputEl = this.inputElementRef.nativeElement;
|
|
96
|
+
|
|
97
|
+
if (element.placeholder) {
|
|
98
|
+
this.renderer.setAttribute(inputEl, 'placeholder', element.placeholder);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (element.textColor) {
|
|
102
|
+
const color = colorMapping[element.textColor];
|
|
103
|
+
this.renderer.setStyle(inputEl, 'color', color);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (element.textStyle) {
|
|
107
|
+
const fontSize = textStyleMappingFontSize[element.textStyle];
|
|
108
|
+
this.renderer.setStyle(inputEl, 'font-size', fontSize);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (element.placeholderTextColor || element.placeholderTextStyle) {
|
|
112
|
+
const styleEl = this.renderer.createElement('style');
|
|
113
|
+
const color = element.placeholderTextColor
|
|
114
|
+
? colorMapping[element.placeholderTextColor]
|
|
115
|
+
: 'inherit';
|
|
116
|
+
const fontSize = element.placeholderTextStyle
|
|
117
|
+
? textStyleMappingFontSize[element.placeholderTextStyle]
|
|
118
|
+
: 'inherit';
|
|
119
|
+
|
|
120
|
+
styleEl.textContent = `
|
|
121
|
+
edm-sdui-search-bar input::placeholder {
|
|
122
|
+
color: ${color};
|
|
123
|
+
font-size: ${fontSize};
|
|
124
|
+
}
|
|
125
|
+
`;
|
|
126
|
+
this.renderer.appendChild(document.head, styleEl);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div class="space"></div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component, Inject, Input, OnInit } from '@angular/core';
|
|
2
|
+
import { UIComponent } from '../../../core/uicomposition/models/uicomponent';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'edm-sdui-space',
|
|
6
|
+
templateUrl: './space.component.html',
|
|
7
|
+
styleUrl: './space.component.scss',
|
|
8
|
+
standalone: false,
|
|
9
|
+
})
|
|
10
|
+
export class SpaceComponent implements OnInit {
|
|
11
|
+
constructor(@Inject('uiComponent') public uiComponent: UIComponent) {}
|
|
12
|
+
|
|
13
|
+
ngOnInit(): void {
|
|
14
|
+
// console.debug('space.uiComponent: ', this.uiComponent);
|
|
15
|
+
}
|
|
16
|
+
}
|