@testgorilla/tgo-ui 1.5.0 → 1.7.0
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/components/badge/badge.component.d.ts +1 -1
- package/components/button/button.component.d.ts +20 -3
- package/components/button/button.model.d.ts +1 -0
- package/components/deprecated-paginator/deprecated-paginator.component.d.ts +38 -0
- package/components/deprecated-paginator/deprecated-paginator.component.module.d.ts +9 -0
- package/components/deprecated-table/deprecated-table.component.d.ts +91 -0
- package/components/deprecated-table/deprecated-table.component.module.d.ts +14 -0
- package/components/deprecated-table/deprecated-table.model.d.ts +45 -0
- package/components/{table → deprecated-table}/directives/dynamic-component.directive.d.ts +1 -1
- package/components/paginator/paginator.component.d.ts +13 -14
- package/components/rating/half-star.pipe.d.ts +14 -0
- package/components/rating/rating.component.d.ts +26 -5
- package/components/rating/rating.component.module.d.ts +3 -2
- package/components/segmented-bar/segmented-bar.component.d.ts +29 -0
- package/components/segmented-bar/segmented-bar.component.module.d.ts +9 -0
- package/components/segmented-bar/segmented-bar.model.d.ts +7 -0
- package/components/side-sheet/side-sheet.component.d.ts +29 -0
- package/components/side-sheet/side-sheet.component.module.d.ts +13 -0
- package/components/side-sheet/side-sheet.model.d.ts +7 -0
- package/components/side-sheet/side-sheet.service.d.ts +14 -0
- package/components/skeleton/skeleton.component.d.ts +9 -0
- package/components/snackbar/snackbar.component.d.ts +1 -2
- package/components/table/ellipse-text.directive.d.ts +16 -0
- package/components/table/table.component.d.ts +29 -78
- package/components/table/table.component.module.d.ts +7 -8
- package/components/table/table.model.d.ts +26 -40
- package/esm2022/components/alert-banner/alert-banner.component.mjs +3 -3
- package/esm2022/components/avatar/avatar.component.mjs +3 -3
- package/esm2022/components/badge/badge.component.mjs +3 -3
- package/esm2022/components/banner-action/banner-action.component.mjs +1 -1
- package/esm2022/components/button/button.component.mjs +35 -12
- package/esm2022/components/button/button.model.mjs +1 -1
- package/esm2022/components/create-account/create-account.component.mjs +1 -1
- package/esm2022/components/create-password/create-password.component.mjs +1 -1
- package/esm2022/components/deprecated-paginator/deprecated-paginator.component.mjs +55 -0
- package/esm2022/components/deprecated-paginator/deprecated-paginator.component.module.mjs +20 -0
- package/esm2022/components/deprecated-table/deprecated-table.component.mjs +158 -0
- package/esm2022/components/deprecated-table/deprecated-table.component.module.mjs +25 -0
- package/esm2022/components/deprecated-table/deprecated-table.model.mjs +13 -0
- package/esm2022/components/deprecated-table/directives/dynamic-component.directive.mjs +39 -0
- package/esm2022/components/deprecated-table/pipes/data-property-getter.mjs +32 -0
- package/esm2022/components/dialog/dialog.component.mjs +3 -3
- package/esm2022/components/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/components/empty-state/empty-state.component.mjs +3 -3
- package/esm2022/components/field/field.component.mjs +3 -3
- package/esm2022/components/file-upload/file-upload.component.mjs +3 -3
- package/esm2022/components/forgot-password/forgot-password.component.mjs +1 -1
- package/esm2022/components/login/login.component.mjs +1 -1
- package/esm2022/components/paginator/paginator.component.mjs +21 -20
- package/esm2022/components/paginator/paginator.component.module.mjs +3 -4
- package/esm2022/components/rating/half-star.pipe.mjs +23 -0
- package/esm2022/components/rating/rating.component.mjs +22 -4
- package/esm2022/components/rating/rating.component.module.mjs +4 -3
- package/esm2022/components/segmented-bar/segmented-bar.component.mjs +45 -0
- package/esm2022/components/segmented-bar/segmented-bar.component.module.mjs +18 -0
- package/esm2022/components/segmented-bar/segmented-bar.model.mjs +2 -0
- package/esm2022/components/side-sheet/side-sheet.component.mjs +66 -0
- package/esm2022/components/side-sheet/side-sheet.component.module.mjs +60 -0
- package/esm2022/components/side-sheet/side-sheet.model.mjs +2 -0
- package/esm2022/components/side-sheet/side-sheet.service.mjs +30 -0
- package/esm2022/components/skeleton/skeleton.component.mjs +25 -0
- package/esm2022/components/snackbar/snackbar.component.mjs +5 -5
- package/esm2022/components/table/ellipse-text.directive.mjs +36 -0
- package/esm2022/components/table/table.component.mjs +58 -140
- package/esm2022/components/table/table.component.module.mjs +10 -12
- package/esm2022/components/table/table.model.mjs +2 -13
- package/esm2022/public-api.mjs +27 -9
- package/fesm2022/testgorilla-tgo-ui.mjs +546 -90
- package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
- package/package.json +3 -2
- package/public-api.d.ts +19 -6
- package/src/assets/icons/rating-icons/Star-filled-disabled.svg +3 -0
- package/src/assets/icons/rating-icons/Star-filled.svg +3 -0
- package/src/assets/icons/rating-icons/Star-half.svg +3 -0
- package/src/assets/icons/rating-icons/Star-outline.svg +3 -0
- package/src/assets/images/premium.svg +4 -0
- package/src/theme/_mat-paginator.scss +59 -0
- package/src/theme/theme.scss +2 -0
- package/esm2022/components/table/directives/dynamic-component.directive.mjs +0 -39
- package/esm2022/components/table/pipes/data-property-getter.mjs +0 -32
- /package/components/{table → deprecated-table}/pipes/data-property-getter.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testgorilla/tgo-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"lint-staged": {
|
|
5
5
|
"src/**/*.ts": [
|
|
6
6
|
"eslint --fix",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"@ngneat/transloco-messageformat": "^4.0.0",
|
|
32
32
|
"@ngneat/until-destroy": "^10.0.0",
|
|
33
33
|
"rxjs": "~7.8.0",
|
|
34
|
-
"zone.js": "^0.13.1"
|
|
34
|
+
"zone.js": "^0.13.1",
|
|
35
|
+
"ngx-skeleton-loader": "^8.1.0"
|
|
35
36
|
},
|
|
36
37
|
"overrides": {
|
|
37
38
|
"crypto-js": "4.2.0"
|
package/public-api.d.ts
CHANGED
|
@@ -48,8 +48,8 @@ export * from './components/navbar/navbar.component.module';
|
|
|
48
48
|
export * from './components/navbar/navbar.model';
|
|
49
49
|
export * from './components/navigation/navigation.component';
|
|
50
50
|
export * from './components/navigation/navigation.component.module';
|
|
51
|
-
export * from './components/paginator/paginator.component';
|
|
52
|
-
export * from './components/paginator/paginator.component.module';
|
|
51
|
+
export * from './components/deprecated-paginator/deprecated-paginator.component';
|
|
52
|
+
export * from './components/deprecated-paginator/deprecated-paginator.component.module';
|
|
53
53
|
export * from './components/progress-bar/progress-bar.component';
|
|
54
54
|
export * from './components/progress-bar/progress-bar.component.module';
|
|
55
55
|
export * from './components/radio-button/radio-button.component';
|
|
@@ -58,10 +58,10 @@ export * from './components/snackbar/snackbar.component';
|
|
|
58
58
|
export * from './components/snackbar/snackbar.component.module';
|
|
59
59
|
export * from './components/snackbar/snackbar.model';
|
|
60
60
|
export * from './components/snackbar/snackbar.service';
|
|
61
|
-
export * from './components/table/pipes/data-property-getter';
|
|
62
|
-
export * from './components/table/table.component';
|
|
63
|
-
export * from './components/table/table.component.module';
|
|
64
|
-
export * from './components/table/table.model';
|
|
61
|
+
export * from './components/deprecated-table/pipes/data-property-getter';
|
|
62
|
+
export * from './components/deprecated-table/deprecated-table.component';
|
|
63
|
+
export * from './components/deprecated-table/deprecated-table.component.module';
|
|
64
|
+
export * from './components/deprecated-table/deprecated-table.model';
|
|
65
65
|
export * from './components/tag/tag.component';
|
|
66
66
|
export * from './components/tag/tag.component.module';
|
|
67
67
|
export * from './components/tag/tag.model';
|
|
@@ -98,3 +98,16 @@ export * from './components/radial-progress/radial-progress.component.module';
|
|
|
98
98
|
export * from './components/radial-progress/radial-progress.model';
|
|
99
99
|
export * from './components/empty-state/empty-state.component';
|
|
100
100
|
export * from './components/empty-state/empty-state.component.module';
|
|
101
|
+
export * from './components/table/table.component';
|
|
102
|
+
export * from './components/table/table.component.module';
|
|
103
|
+
export * from './components/table/table.model';
|
|
104
|
+
export * from './components/paginator/paginator.component';
|
|
105
|
+
export * from './components/paginator/paginator.component.module';
|
|
106
|
+
export * from './components/skeleton/skeleton.component';
|
|
107
|
+
export * from './components/side-sheet/side-sheet.component';
|
|
108
|
+
export * from './components/side-sheet/side-sheet.component.module';
|
|
109
|
+
export * from './components/side-sheet/side-sheet.service';
|
|
110
|
+
export * from './components/side-sheet/side-sheet.model';
|
|
111
|
+
export * from './components/segmented-bar/segmented-bar.component';
|
|
112
|
+
export * from './components/segmented-bar/segmented-bar.component.module';
|
|
113
|
+
export * from './components/segmented-bar/segmented-bar.model';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="#E0E0E0" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M7.99989 1.43066C8.19074 1.43068 8.36495 1.53934 8.44889 1.71075L10.2898 5.46969L14.406 6.076C14.5939 6.10367 14.7498 6.2353 14.8086 6.4158C14.8674 6.5963 14.8189 6.79453 14.6834 6.92751L11.7033 9.85243L12.4068 13.9854C12.4387 14.1732 12.3612 14.3629 12.2068 14.4745C12.0525 14.5861 11.8481 14.6003 11.6797 14.5111L7.99985 12.5612L4.31996 14.5111C4.15163 14.6003 3.94725 14.5861 3.79287 14.4745C3.6385 14.3629 3.56098 14.1732 3.59294 13.9854L4.29642 9.85243L1.31629 6.92751C1.1808 6.79454 1.13231 6.59631 1.1911 6.41581C1.2499 6.23531 1.40584 6.10367 1.59365 6.076L5.70929 5.46969L7.55084 1.71069C7.63481 1.53929 7.80903 1.43065 7.99989 1.43066Z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="#CCA45F" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M7.99989 1.43066C8.19074 1.43068 8.36495 1.53934 8.44889 1.71075L10.2898 5.46969L14.406 6.076C14.5939 6.10367 14.7498 6.2353 14.8086 6.4158C14.8674 6.5963 14.8189 6.79453 14.6834 6.92751L11.7033 9.85243L12.4068 13.9854C12.4387 14.1732 12.3612 14.3629 12.2068 14.4745C12.0525 14.5861 11.8481 14.6003 11.6797 14.5111L7.99985 12.5612L4.31996 14.5111C4.15163 14.6003 3.94725 14.5861 3.79287 14.4745C3.6385 14.3629 3.56098 14.1732 3.59294 13.9854L4.29642 9.85243L1.31629 6.92751C1.1808 6.79454 1.13231 6.59631 1.1911 6.41581C1.2499 6.23531 1.40584 6.10367 1.59365 6.076L5.70929 5.46969L7.55084 1.71069C7.63481 1.53929 7.80903 1.43065 7.99989 1.43066Z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="#CCA45F" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.44889 1.71075C8.36495 1.53934 8.19074 1.43068 7.99989 1.43066C7.80903 1.43065 7.63481 1.53929 7.55084 1.71069L5.70929 5.46969L1.59365 6.076C1.40584 6.10367 1.2499 6.23531 1.1911 6.41581C1.13231 6.59631 1.1808 6.79454 1.31629 6.92751L4.29642 9.85243L3.59294 13.9854C3.56098 14.1732 3.6385 14.3629 3.79287 14.4745C3.94725 14.5861 4.15163 14.6003 4.31996 14.5111L7.99985 12.5612L11.6797 14.5111C11.8481 14.6003 12.0525 14.5861 12.2068 14.4745C12.3612 14.3629 12.4387 14.1732 12.4068 13.9854L11.7033 9.85243L14.6834 6.92751C14.8189 6.79453 14.8674 6.5963 14.8086 6.4158C14.7498 6.2353 14.5939 6.10367 14.406 6.076L10.2898 5.46969L8.44889 1.71075ZM11.2507 13.152L8.23419 11.5535C8.16097 11.5147 8.08052 11.4953 8.00008 11.4953L8 3.06732L9.5077 6.14591C9.58017 6.29388 9.72088 6.39665 9.88388 6.42066L13.265 6.91869L10.8165 9.32182C10.6997 9.43651 10.6464 9.60115 10.6738 9.76256L11.2507 13.152Z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="#888888" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.99989 1.43066C8.19074 1.43068 8.36495 1.53934 8.44889 1.71075L10.2898 5.46969L14.406 6.076C14.5939 6.10367 14.7498 6.2353 14.8086 6.4158C14.8674 6.5963 14.8189 6.79453 14.6834 6.92751L11.7033 9.85243L12.4068 13.9854C12.4387 14.1732 12.3612 14.3629 12.2068 14.4745C12.0525 14.5861 11.8481 14.6003 11.6797 14.5111L7.99985 12.5612L4.31996 14.5111C4.15163 14.6003 3.94725 14.5861 3.79287 14.4745C3.6385 14.3629 3.56098 14.1732 3.59294 13.9854L4.29642 9.85243L1.31629 6.92751C1.1808 6.79454 1.13231 6.59631 1.1911 6.41581C1.2499 6.23531 1.40584 6.10367 1.59365 6.076L5.70929 5.46969L7.55084 1.71069C7.63481 1.53929 7.80903 1.43065 7.99989 1.43066ZM7.99978 3.06732L6.49153 6.14597C6.41906 6.29391 6.27837 6.39665 6.11539 6.42066L2.7349 6.91867L5.18342 9.32182C5.30027 9.43651 5.35357 9.60115 5.3261 9.76256L4.74919 13.152L7.76574 11.5535C7.91217 11.4759 8.08753 11.4759 8.23396 11.5535L11.2505 13.152L10.6736 9.76256C10.6461 9.60115 10.6994 9.43651 10.8163 9.32182L13.2648 6.91869L9.88366 6.42066C9.72065 6.39665 9.57994 6.29388 9.50748 6.14591L7.99978 3.06732Z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M24.5 12C24.5 18.6274 19.1274 24 12.5 24C5.87258 24 0.5 18.6274 0.5 12C0.5 5.37258 5.87258 0 12.5 0C19.1274 0 24.5 5.37258 24.5 12Z" fill="white"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M23 12C23 17.799 18.299 22.5 12.5 22.5C6.70101 22.5 2 17.799 2 12C2 6.20101 6.70101 1.5 12.5 1.5C18.299 1.5 23 6.20101 23 12ZM24.5 12C24.5 18.6274 19.1274 24 12.5 24C5.87258 24 0.5 18.6274 0.5 12C0.5 5.37258 5.87258 0 12.5 0C19.1274 0 24.5 5.37258 24.5 12ZM17.4015 5.25H7.59872L4.06543 10.5499L12.5001 20.6715L20.9348 10.5499L17.4015 5.25ZM6.40149 9.75L7.77352 7.69196L8.45953 9.75H6.40149ZM6.60138 11.25H8.95953L10.5316 15.9663L6.60138 11.25ZM18.3988 11.25L14.4686 15.9663L16.0407 11.25H18.3988ZM10.5407 11.25H14.4595L12.5001 17.1283L10.5407 11.25ZM10.0407 9.75H14.9595L15.9595 6.75H9.04067L10.0407 9.75ZM18.5987 9.75H16.5407L17.2267 7.69196L18.5987 9.75Z" fill="#CCA45F"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@use "./variables" as *;
|
|
2
|
+
|
|
3
|
+
.mat-mdc-paginator {
|
|
4
|
+
|
|
5
|
+
.mdc-text-field--focused {
|
|
6
|
+
.mdc-notched-outline__leading, .mdc-notched-outline__trailing, .mdc-notched-outline__notch {
|
|
7
|
+
border-color: $tgo-petrol-default !important;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.mat-mdc-select {
|
|
12
|
+
&[aria-expanded="false"] {
|
|
13
|
+
.mat-mdc-select-arrow {
|
|
14
|
+
@extend .select-arrow;
|
|
15
|
+
background-image: url('/assets/icons/Arrow_down.svg');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&[aria-disabled="true"] {
|
|
19
|
+
.mat-mdc-select-arrow {
|
|
20
|
+
opacity: 0.2 !important;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&[aria-expanded="true"] {
|
|
26
|
+
.mat-mdc-select-arrow {
|
|
27
|
+
@extend .select-arrow;
|
|
28
|
+
background-image: url('/assets/icons/Arrow_up.svg');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
svg {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.mdc-menu-surface {
|
|
39
|
+
&[aria-labelledby*="mat-paginator"] {
|
|
40
|
+
mat-option {
|
|
41
|
+
&[aria-selected="true"] {
|
|
42
|
+
background: $tgo-petrol-90w!important;
|
|
43
|
+
|
|
44
|
+
.mdc-list-item__primary-text {
|
|
45
|
+
color: black!important;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.select-arrow {
|
|
53
|
+
left: -4px;
|
|
54
|
+
top: 0;
|
|
55
|
+
width: 22px;
|
|
56
|
+
height: 23px;
|
|
57
|
+
background-repeat: no-repeat;
|
|
58
|
+
background-size: cover;
|
|
59
|
+
}
|
package/src/theme/theme.scss
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
@use "variables.scss" as *;
|
|
4
4
|
@use "typography.scss" as *;
|
|
5
5
|
@use "tooltip.scss" as *;
|
|
6
|
+
@use "mat-paginator.scss" as *;
|
|
7
|
+
|
|
6
8
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap");
|
|
7
9
|
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");
|
|
8
10
|
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Directive, Input } from '@angular/core';
|
|
2
|
-
import { Subscription } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export class DynamicComponentDirective {
|
|
5
|
-
set dynamicComponent(componentRenderer) {
|
|
6
|
-
if (componentRenderer.component) {
|
|
7
|
-
this.compRef = this.vcr.createComponent(componentRenderer.component);
|
|
8
|
-
if (componentRenderer.inputs) {
|
|
9
|
-
Object.keys(componentRenderer.inputs).map(inputName => (this.compRef.instance[inputName] = componentRenderer.inputs[inputName]));
|
|
10
|
-
}
|
|
11
|
-
if (componentRenderer.outputs) {
|
|
12
|
-
Object.keys(componentRenderer.outputs).map(output => {
|
|
13
|
-
this.subscription.add(this.compRef.instance[output].subscribe(componentRenderer.outputs?.[output]));
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
constructor(vcr) {
|
|
19
|
-
this.vcr = vcr;
|
|
20
|
-
this.subscription = new Subscription();
|
|
21
|
-
}
|
|
22
|
-
ngOnDestroy() {
|
|
23
|
-
if (this.compRef) {
|
|
24
|
-
this.compRef.destroy();
|
|
25
|
-
}
|
|
26
|
-
this.subscription.unsubscribe();
|
|
27
|
-
}
|
|
28
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicComponentDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
29
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DynamicComponentDirective, selector: "[dynamicComponent]", inputs: { dynamicComponent: "dynamicComponent" }, ngImport: i0 }); }
|
|
30
|
-
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicComponentDirective, decorators: [{
|
|
32
|
-
type: Directive,
|
|
33
|
-
args: [{
|
|
34
|
-
selector: '[dynamicComponent]',
|
|
35
|
-
}]
|
|
36
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { dynamicComponent: [{
|
|
37
|
-
type: Input
|
|
38
|
-
}] } });
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHluYW1pYy1jb21wb25lbnQuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvdGFibGUvZ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dGUgY29tcFJlZjogQ29tcG9uZW50UmVmPGFueT47XG5cbiAgQElucHV0KCkgc2V0IGR5bmFtaWNDb21wb25lbnQoY29tcG9uZW50UmVuZGVyZXI6IElDb21wb25lbnRSZW5kZXJlcikge1xuICAgIGlmIChjb21wb25lbnRSZW5kZXJlci5jb21wb25lbnQpIHtcbiAgICAgIHRoaXMuY29tcFJlZiA9IHRoaXMudmNyLmNyZWF0ZUNvbXBvbmVudChjb21wb25lbnRSZW5kZXJlci5jb21wb25lbnQpO1xuXG4gICAgICBpZiAoY29tcG9uZW50UmVuZGVyZXIuaW5wdXRzKSB7XG4gICAgICAgIE9iamVjdC5rZXlzKGNvbXBvbmVudFJlbmRlcmVyLmlucHV0cykubWFwKFxuICAgICAgICAgIGlucHV0TmFtZSA9PiAodGhpcy5jb21wUmVmLmluc3RhbmNlW2lucHV0TmFtZV0gPSBjb21wb25lbnRSZW5kZXJlci5pbnB1dHNbaW5wdXROYW1lXSlcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgaWYgKGNvbXBvbmVudFJlbmRlcmVyLm91dHB1dHMpIHtcbiAgICAgICAgT2JqZWN0LmtleXMoY29tcG9uZW50UmVuZGVyZXIub3V0cHV0cykubWFwKG91dHB1dCA9PiB7XG4gICAgICAgICAgdGhpcy5zdWJzY3JpcHRpb24uYWRkKFxuICAgICAgICAgICAgKHRoaXMuY29tcFJlZi5pbnN0YW5jZVtvdXRwdXRdIGFzIEV2ZW50RW1pdHRlcjxhbnk+KS5zdWJzY3JpYmUoY29tcG9uZW50UmVuZGVyZXIub3V0cHV0cz8uW291dHB1dF0pXG4gICAgICAgICAgKTtcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgY29uc3RydWN0b3IocHJpdmF0ZSB2Y3I6IFZpZXdDb250YWluZXJSZWYpIHt9XG5cbiAgbmdPbkRlc3Ryb3koKSB7XG4gICAgaWYgKHRoaXMuY29tcFJlZikge1xuICAgICAgdGhpcy5jb21wUmVmLmRlc3Ryb3koKTtcbiAgICB9XG4gICAgdGhpcy5zdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTtcbiAgfVxufVxuIl19
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Pipe } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class DataPropertyGetterPipe {
|
|
4
|
-
transform(obj, keyName = '') {
|
|
5
|
-
return this.getDeepVal(obj, keyName);
|
|
6
|
-
}
|
|
7
|
-
getDeepVal(obj, path) {
|
|
8
|
-
if (typeof obj === 'undefined' || obj === null) {
|
|
9
|
-
return '';
|
|
10
|
-
}
|
|
11
|
-
const splittedPath = path.split(/[\.\[\]\"\']{1,2}/);
|
|
12
|
-
for (let i = 0, l = splittedPath.length; i < l; i++) {
|
|
13
|
-
if (splittedPath[i] === '') {
|
|
14
|
-
continue;
|
|
15
|
-
}
|
|
16
|
-
obj = obj[splittedPath[i]];
|
|
17
|
-
if (typeof obj === 'undefined' || obj === null) {
|
|
18
|
-
return '';
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return obj;
|
|
22
|
-
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataPropertyGetterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
24
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DataPropertyGetterPipe, name: "dataPropertyGetter" }); }
|
|
25
|
-
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataPropertyGetterPipe, decorators: [{
|
|
27
|
-
type: Pipe,
|
|
28
|
-
args: [{
|
|
29
|
-
name: 'dataPropertyGetter',
|
|
30
|
-
}]
|
|
31
|
-
}] });
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW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