@indice/ng-components 0.2.146-beta → 0.2.146
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/README.md +4 -4
- package/_styles.css +3571 -3501
- package/bundles/indice-ng-components.umd.js +716 -328
- package/bundles/indice-ng-components.umd.js.map +1 -1
- package/esm2015/lib/controls/avatar-initials/avatar-initials.component.js +4 -4
- package/esm2015/lib/controls/collapsible-panel/collapsible-panel.component.js +4 -4
- package/esm2015/lib/controls/date-picker/date-picker.component.js +5 -5
- package/esm2015/lib/controls/drop-down-menu/drop-down-menu.component.js +4 -4
- package/esm2015/lib/controls/kpi-tile/kpi-tile.component.js +4 -4
- package/esm2015/lib/controls/language-selection/language-selection.component.js +35 -0
- package/esm2015/lib/controls/list-view/list-column.component.js +4 -4
- package/esm2015/lib/controls/list-view/list-details-section.component.js +4 -4
- package/esm2015/lib/controls/list-view/list-tile.component.js +4 -4
- package/esm2015/lib/controls/list-view/list-view-empty-state.component.js +4 -4
- package/esm2015/lib/controls/list-view/list-view.component.js +4 -4
- package/esm2015/lib/controls/nav-links-list/nav-links-list.component.js +45 -0
- package/esm2015/lib/controls/notifications-indicator/notifications-indicator.component.js +76 -0
- package/esm2015/lib/controls/pager/pager.component.js +4 -4
- package/esm2015/lib/controls/side-pane/side-pane.component.js +4 -4
- package/esm2015/lib/controls/skeleton-loader/skeleton-loader.component.js +4 -4
- package/esm2015/lib/controls/tabs/lib-tab-group.component.js +60 -0
- package/esm2015/lib/controls/tabs/lib-tab.component.js +57 -0
- package/esm2015/lib/controls/toaster/toaster-container.component.js +4 -4
- package/esm2015/lib/controls/toaster/toaster.component.js +4 -4
- package/esm2015/lib/controls/toggle/toggle.component.js +5 -5
- package/esm2015/lib/controls/user-profile-menu/user-profile-menu.component.js +75 -0
- package/esm2015/lib/directives/click-outside.directive.js +4 -4
- package/esm2015/lib/directives/dynamic-component-host.directive.js +4 -4
- package/esm2015/lib/helpers/base-list.component.js +24 -24
- package/esm2015/lib/icons.js +1 -1
- package/esm2015/lib/layouts/shell/shell-footer/shell-footer.component.js +4 -4
- package/esm2015/lib/layouts/shell/shell-header/shell-header.component.js +69 -79
- package/esm2015/lib/layouts/shell/shell-layout/shell-layout.component.js +15 -8
- package/esm2015/lib/layouts/shell/shell-sidebar/shell-sidebar.component.js +50 -0
- package/esm2015/lib/layouts/views/form-layout/form-layout.component.js +8 -9
- package/esm2015/lib/layouts/views/model-view-layout/model-view-layout.component.js +4 -6
- package/esm2015/lib/layouts/views/side-view-layout/side-view-layout.component.js +4 -4
- package/esm2015/lib/layouts/views/view-layout/view-layout.component.js +4 -4
- package/esm2015/lib/ng-components.module.js +91 -69
- package/esm2015/lib/pages/auth/auth-callback/auth-callback.component.js +4 -4
- package/esm2015/lib/pages/auth/auth-renew/auth-renew.component.js +4 -4
- package/esm2015/lib/pages/auth/logged-out/logged-out.component.js +4 -4
- package/esm2015/lib/pages/http-status/error/error.component.js +4 -4
- package/esm2015/lib/pages/http-status/page-not-found/page-not-found.component.js +4 -4
- package/esm2015/lib/pages/http-status/unauthorized/unauthorized.component.js +4 -4
- package/esm2015/lib/pipes/address.pipe.js +4 -4
- package/esm2015/lib/pipes/duration-format.pipe.js +4 -4
- package/esm2015/lib/services/component-loader/component-loader-options.class.js +1 -1
- package/esm2015/lib/services/component-loader/component-loader.class.js +1 -1
- package/esm2015/lib/services/component-loader/component-loader.factory.js +4 -4
- package/esm2015/lib/services/component-loader/content-ref.class.js +1 -1
- package/esm2015/lib/services/modal-service/modal-backdrop-component.js +4 -4
- package/esm2015/lib/services/modal-service/modal-container-component.js +15 -15
- package/esm2015/lib/services/modal-service/modal-options.class.js +4 -4
- package/esm2015/lib/services/modal-service/modal-service.js +4 -4
- package/esm2015/lib/services/modal-service/modal-styles.class.js +1 -1
- package/esm2015/lib/services/modal-service/modal.class.js +4 -4
- package/esm2015/lib/services/toaster.service.js +4 -4
- package/esm2015/lib/tokens.js +3 -1
- package/esm2015/lib/types.js +16 -7
- package/esm2015/public-api.js +4 -2
- package/fesm2015/indice-ng-components.js +680 -331
- package/fesm2015/indice-ng-components.js.map +1 -1
- package/lib/controls/language-selection/language-selection.component.d.ts +14 -0
- package/lib/controls/nav-links-list/nav-links-list.component.d.ts +16 -0
- package/lib/controls/notifications-indicator/notifications-indicator.component.d.ts +22 -0
- package/lib/controls/tabs/lib-tab-group.component.d.ts +21 -0
- package/lib/controls/tabs/lib-tab.component.d.ts +23 -0
- package/lib/controls/user-profile-menu/user-profile-menu.component.d.ts +24 -0
- package/lib/layouts/shell/shell-header/shell-header.component.d.ts +20 -26
- package/lib/layouts/shell/shell-layout/shell-layout.component.d.ts +4 -2
- package/lib/layouts/shell/shell-sidebar/shell-sidebar.component.d.ts +18 -0
- package/lib/layouts/views/form-layout/form-layout.component.d.ts +2 -3
- package/lib/ng-components.module.d.ts +13 -7
- package/lib/tokens.d.ts +3 -1
- package/lib/types.d.ts +40 -10
- package/modal.css +157 -157
- package/package.json +10 -9
- package/public-api.d.ts +3 -1
- package/esm2015/lib/pipes/obs-with-status.pipe.js +0 -26
- package/lib/pipes/obs-with-status.pipe.d.ts +0 -13
package/modal.css
CHANGED
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
.modal-open {
|
|
2
|
-
overflow: hidden;
|
|
3
|
-
}
|
|
4
|
-
.modal-open .modal {
|
|
5
|
-
overflow-x: hidden;
|
|
6
|
-
overflow-y: auto;
|
|
7
|
-
}
|
|
8
|
-
.modal {
|
|
9
|
-
position: fixed;
|
|
10
|
-
top: 0;
|
|
11
|
-
left: 0;
|
|
12
|
-
z-index: 1050;
|
|
13
|
-
display: none;
|
|
14
|
-
width: 100%;
|
|
15
|
-
height: 100%;
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
outline: 0;
|
|
18
|
-
}
|
|
19
|
-
.modal-dialog {
|
|
20
|
-
position: relative;
|
|
21
|
-
width: auto;
|
|
22
|
-
margin: 0.5rem;
|
|
23
|
-
pointer-events: none;
|
|
24
|
-
}
|
|
25
|
-
.modal.fade .modal-dialog {
|
|
26
|
-
transition: transform 0.3s ease-out;
|
|
27
|
-
transform: translate(0, -50px);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.fade {
|
|
31
|
-
transition: opacity 0.15s linear;
|
|
32
|
-
}
|
|
33
|
-
.fade:not(.show) {
|
|
34
|
-
opacity: 0;
|
|
35
|
-
}
|
|
36
|
-
@media (prefers-reduced-motion: reduce) {
|
|
37
|
-
.modal.fade .modal-dialog {
|
|
38
|
-
transition: none;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
.modal.show .modal-dialog {
|
|
42
|
-
transform: none;
|
|
43
|
-
}
|
|
44
|
-
.modal.modal-static .modal-dialog {
|
|
45
|
-
transform: scale(1.02);
|
|
46
|
-
}
|
|
47
|
-
.modal-dialog-scrollable {
|
|
48
|
-
display: flex;
|
|
49
|
-
max-height: subtract(100%, 1rem);
|
|
50
|
-
}
|
|
51
|
-
.modal-dialog-scrollable .modal-content {
|
|
52
|
-
max-height: subtract(100vh, 1rem);
|
|
53
|
-
overflow: hidden;
|
|
54
|
-
}
|
|
55
|
-
.modal-dialog-scrollable .modal-header,
|
|
56
|
-
.modal-dialog-scrollable .modal-footer {
|
|
57
|
-
flex-shrink: 0;
|
|
58
|
-
}
|
|
59
|
-
.modal-dialog-scrollable .modal-body {
|
|
60
|
-
overflow-y: auto;
|
|
61
|
-
}
|
|
62
|
-
.modal-dialog-centered {
|
|
63
|
-
display: flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
min-height: subtract(100%, 1rem);
|
|
66
|
-
}
|
|
67
|
-
.modal-dialog-centered::before {
|
|
68
|
-
display: block;
|
|
69
|
-
height: subtract(100vh, 1rem);
|
|
70
|
-
height: -webkit-min-content;
|
|
71
|
-
height: min-content;
|
|
72
|
-
content: "";
|
|
73
|
-
}
|
|
74
|
-
.modal-dialog-centered.modal-dialog-scrollable {
|
|
75
|
-
flex-direction: column;
|
|
76
|
-
justify-content: center;
|
|
77
|
-
height: 100%;
|
|
78
|
-
}
|
|
79
|
-
.modal-dialog-centered.modal-dialog-scrollable .modal-content {
|
|
80
|
-
max-height: none;
|
|
81
|
-
}
|
|
82
|
-
.modal-dialog-centered.modal-dialog-scrollable::before {
|
|
83
|
-
content: none;
|
|
84
|
-
}
|
|
85
|
-
.modal-content {
|
|
86
|
-
position: relative;
|
|
87
|
-
display: flex;
|
|
88
|
-
flex-direction: column;
|
|
89
|
-
width: 100%;
|
|
90
|
-
pointer-events: auto;
|
|
91
|
-
background-color: #fff;
|
|
92
|
-
background-clip: padding-box;
|
|
93
|
-
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
94
|
-
border-radius: 0.3rem;
|
|
95
|
-
outline: 0;
|
|
96
|
-
}
|
|
97
|
-
.modal-backdrop {
|
|
98
|
-
position: fixed;
|
|
99
|
-
top: 0;
|
|
100
|
-
left: 0;
|
|
101
|
-
z-index: 1040;
|
|
102
|
-
width: 100vw;
|
|
103
|
-
height: 100vh;
|
|
104
|
-
background-color: #000;
|
|
105
|
-
}
|
|
106
|
-
.modal-backdrop.fade {
|
|
107
|
-
opacity: 0;
|
|
108
|
-
}
|
|
109
|
-
.modal-backdrop.show {
|
|
110
|
-
opacity: 0.5;
|
|
111
|
-
}
|
|
112
|
-
.modal-scrollbar-measure {
|
|
113
|
-
position: absolute;
|
|
114
|
-
top: -9999px;
|
|
115
|
-
width: 50px;
|
|
116
|
-
height: 50px;
|
|
117
|
-
overflow: scroll;
|
|
118
|
-
}
|
|
119
|
-
@media (min-width: 576px) {
|
|
120
|
-
.modal-dialog {
|
|
121
|
-
max-width: 500px;
|
|
122
|
-
margin: 1.75rem auto;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.modal-dialog-scrollable {
|
|
126
|
-
max-height: subtract(100%, 3.5rem);
|
|
127
|
-
}
|
|
128
|
-
.modal-dialog-scrollable .modal-content {
|
|
129
|
-
max-height: subtract(100vh, 3.5rem);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.modal-dialog-centered {
|
|
133
|
-
min-height: subtract(100%, 3.5rem);
|
|
134
|
-
}
|
|
135
|
-
.modal-dialog-centered::before {
|
|
136
|
-
height: subtract(100vh, 3.5rem);
|
|
137
|
-
height: -webkit-min-content;
|
|
138
|
-
height: min-content;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.modal-sm {
|
|
142
|
-
max-width: 300px;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
@media (min-width: 992px) {
|
|
146
|
-
.modal-lg,
|
|
147
|
-
.modal-xl {
|
|
148
|
-
max-width: 800px;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
@media (min-width: 1200px) {
|
|
152
|
-
.modal-xl {
|
|
153
|
-
max-width: 1140px;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/*# sourceMappingURL=styles.css.map*/
|
|
1
|
+
.modal-open {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
}
|
|
4
|
+
.modal-open .modal {
|
|
5
|
+
overflow-x: hidden;
|
|
6
|
+
overflow-y: auto;
|
|
7
|
+
}
|
|
8
|
+
.modal {
|
|
9
|
+
position: fixed;
|
|
10
|
+
top: 0;
|
|
11
|
+
left: 0;
|
|
12
|
+
z-index: 1050;
|
|
13
|
+
display: none;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
outline: 0;
|
|
18
|
+
}
|
|
19
|
+
.modal-dialog {
|
|
20
|
+
position: relative;
|
|
21
|
+
width: auto;
|
|
22
|
+
margin: 0.5rem;
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
}
|
|
25
|
+
.modal.fade .modal-dialog {
|
|
26
|
+
transition: transform 0.3s ease-out;
|
|
27
|
+
transform: translate(0, -50px);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.fade {
|
|
31
|
+
transition: opacity 0.15s linear;
|
|
32
|
+
}
|
|
33
|
+
.fade:not(.show) {
|
|
34
|
+
opacity: 0;
|
|
35
|
+
}
|
|
36
|
+
@media (prefers-reduced-motion: reduce) {
|
|
37
|
+
.modal.fade .modal-dialog {
|
|
38
|
+
transition: none;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
.modal.show .modal-dialog {
|
|
42
|
+
transform: none;
|
|
43
|
+
}
|
|
44
|
+
.modal.modal-static .modal-dialog {
|
|
45
|
+
transform: scale(1.02);
|
|
46
|
+
}
|
|
47
|
+
.modal-dialog-scrollable {
|
|
48
|
+
display: flex;
|
|
49
|
+
max-height: subtract(100%, 1rem);
|
|
50
|
+
}
|
|
51
|
+
.modal-dialog-scrollable .modal-content {
|
|
52
|
+
max-height: subtract(100vh, 1rem);
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
}
|
|
55
|
+
.modal-dialog-scrollable .modal-header,
|
|
56
|
+
.modal-dialog-scrollable .modal-footer {
|
|
57
|
+
flex-shrink: 0;
|
|
58
|
+
}
|
|
59
|
+
.modal-dialog-scrollable .modal-body {
|
|
60
|
+
overflow-y: auto;
|
|
61
|
+
}
|
|
62
|
+
.modal-dialog-centered {
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
min-height: subtract(100%, 1rem);
|
|
66
|
+
}
|
|
67
|
+
.modal-dialog-centered::before {
|
|
68
|
+
display: block;
|
|
69
|
+
height: subtract(100vh, 1rem);
|
|
70
|
+
height: -webkit-min-content;
|
|
71
|
+
height: min-content;
|
|
72
|
+
content: "";
|
|
73
|
+
}
|
|
74
|
+
.modal-dialog-centered.modal-dialog-scrollable {
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
height: 100%;
|
|
78
|
+
}
|
|
79
|
+
.modal-dialog-centered.modal-dialog-scrollable .modal-content {
|
|
80
|
+
max-height: none;
|
|
81
|
+
}
|
|
82
|
+
.modal-dialog-centered.modal-dialog-scrollable::before {
|
|
83
|
+
content: none;
|
|
84
|
+
}
|
|
85
|
+
.modal-content {
|
|
86
|
+
position: relative;
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-direction: column;
|
|
89
|
+
width: 100%;
|
|
90
|
+
pointer-events: auto;
|
|
91
|
+
background-color: #fff;
|
|
92
|
+
background-clip: padding-box;
|
|
93
|
+
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
94
|
+
border-radius: 0.3rem;
|
|
95
|
+
outline: 0;
|
|
96
|
+
}
|
|
97
|
+
.modal-backdrop {
|
|
98
|
+
position: fixed;
|
|
99
|
+
top: 0;
|
|
100
|
+
left: 0;
|
|
101
|
+
z-index: 1040;
|
|
102
|
+
width: 100vw;
|
|
103
|
+
height: 100vh;
|
|
104
|
+
background-color: #000;
|
|
105
|
+
}
|
|
106
|
+
.modal-backdrop.fade {
|
|
107
|
+
opacity: 0;
|
|
108
|
+
}
|
|
109
|
+
.modal-backdrop.show {
|
|
110
|
+
opacity: 0.5;
|
|
111
|
+
}
|
|
112
|
+
.modal-scrollbar-measure {
|
|
113
|
+
position: absolute;
|
|
114
|
+
top: -9999px;
|
|
115
|
+
width: 50px;
|
|
116
|
+
height: 50px;
|
|
117
|
+
overflow: scroll;
|
|
118
|
+
}
|
|
119
|
+
@media (min-width: 576px) {
|
|
120
|
+
.modal-dialog {
|
|
121
|
+
max-width: 500px;
|
|
122
|
+
margin: 1.75rem auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.modal-dialog-scrollable {
|
|
126
|
+
max-height: subtract(100%, 3.5rem);
|
|
127
|
+
}
|
|
128
|
+
.modal-dialog-scrollable .modal-content {
|
|
129
|
+
max-height: subtract(100vh, 3.5rem);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.modal-dialog-centered {
|
|
133
|
+
min-height: subtract(100%, 3.5rem);
|
|
134
|
+
}
|
|
135
|
+
.modal-dialog-centered::before {
|
|
136
|
+
height: subtract(100vh, 3.5rem);
|
|
137
|
+
height: -webkit-min-content;
|
|
138
|
+
height: min-content;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.modal-sm {
|
|
142
|
+
max-width: 300px;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
@media (min-width: 992px) {
|
|
146
|
+
.modal-lg,
|
|
147
|
+
.modal-xl {
|
|
148
|
+
max-width: 800px;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
@media (min-width: 1200px) {
|
|
152
|
+
.modal-xl {
|
|
153
|
+
max-width: 1140px;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/*# sourceMappingURL=styles.css.map*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indice/ng-components",
|
|
3
|
-
"version": "0.2.146
|
|
3
|
+
"version": "0.2.146",
|
|
4
4
|
"description": "Indice common components for Angular v12",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,17 +24,15 @@
|
|
|
24
24
|
"@angular/common": "^12.0.1",
|
|
25
25
|
"@angular/core": "^12.0.1",
|
|
26
26
|
"@angular/router": "^12.0.1",
|
|
27
|
-
"@indice/ng-auth": "^0.1.
|
|
28
|
-
"oidc-client": "^1.11.5",
|
|
29
|
-
"tailwindcss": "^2.1.2",
|
|
27
|
+
"@indice/ng-auth": "^0.1.26",
|
|
30
28
|
"@tailwindcss/aspect-ratio": "^0.2.0",
|
|
31
29
|
"@tailwindcss/forms": "^0.3.2",
|
|
32
30
|
"@tailwindcss/line-clamp": "^0.2.0",
|
|
33
31
|
"@tailwindcss/typography": "^0.4.0",
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
32
|
+
"oidc-client": "^1.11.5",
|
|
33
|
+
"rxjs": "^6.6.7",
|
|
34
|
+
"tailwindcss": "^2.1.2",
|
|
35
|
+
"uuid": "8.3.2"
|
|
38
36
|
},
|
|
39
37
|
"main": "bundles/indice-ng-components.umd.js",
|
|
40
38
|
"module": "fesm2015/indice-ng-components.js",
|
|
@@ -42,5 +40,8 @@
|
|
|
42
40
|
"esm2015": "esm2015/indice-ng-components.js",
|
|
43
41
|
"fesm2015": "fesm2015/indice-ng-components.js",
|
|
44
42
|
"typings": "indice-ng-components.d.ts",
|
|
45
|
-
"sideEffects": false
|
|
43
|
+
"sideEffects": false,
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"tslib": "^2.2.0"
|
|
46
|
+
}
|
|
46
47
|
}
|
package/public-api.d.ts
CHANGED
|
@@ -15,6 +15,9 @@ export * from './lib/controls/toaster/toaster.component';
|
|
|
15
15
|
export * from './lib/controls/avatar-initials/avatar-initials.component';
|
|
16
16
|
export * from './lib/controls/toggle/toggle.component';
|
|
17
17
|
export * from './lib/controls/side-pane/side-pane.component';
|
|
18
|
+
export * from './lib/controls/nav-links-list/nav-links-list.component';
|
|
19
|
+
export * from './lib/controls/tabs/lib-tab-group.component';
|
|
20
|
+
export * from './lib/controls/tabs/lib-tab.component';
|
|
18
21
|
export * from './lib/layouts/shell/shell-layout/shell-layout.component';
|
|
19
22
|
export * from './lib/layouts/shell/shell-header/shell-header.component';
|
|
20
23
|
export * from './lib/layouts/shell/shell-footer/shell-footer.component';
|
|
@@ -30,7 +33,6 @@ export * from './lib/pages/http-status/page-not-found/page-not-found.component';
|
|
|
30
33
|
export * from './lib/pages/http-status/unauthorized/unauthorized.component';
|
|
31
34
|
export * from './lib/pipes/address.pipe';
|
|
32
35
|
export * from './lib/pipes/duration-format.pipe';
|
|
33
|
-
export * from './lib/pipes/obs-with-status.pipe';
|
|
34
36
|
export * from './lib/tokens';
|
|
35
37
|
export * from './lib/types';
|
|
36
38
|
export * from './lib/icons';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Pipe } from '@angular/core';
|
|
2
|
-
import { of } from 'rxjs';
|
|
3
|
-
import { catchError, map, startWith } from 'rxjs/operators';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
const defaultError = 'Something went wrong';
|
|
6
|
-
export class ObsWithStatusPipe {
|
|
7
|
-
transform(val) {
|
|
8
|
-
return val.pipe(map((value) => {
|
|
9
|
-
return {
|
|
10
|
-
loading: value.type === 'start',
|
|
11
|
-
error: value.type === 'error' ? defaultError : '',
|
|
12
|
-
value: value.type ? value.value : value,
|
|
13
|
-
};
|
|
14
|
-
}), startWith({ loading: true }), catchError(error => of({ loading: false, error: typeof error === 'string' ? error : defaultError })));
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
ObsWithStatusPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ObsWithStatusPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
18
|
-
ObsWithStatusPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ObsWithStatusPipe, name: "obsWithStatus", pure: false });
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ObsWithStatusPipe, decorators: [{
|
|
20
|
-
type: Pipe,
|
|
21
|
-
args: [{
|
|
22
|
-
name: 'obsWithStatus',
|
|
23
|
-
pure: false
|
|
24
|
-
}]
|
|
25
|
-
}] });
|
|
26
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2JzLXdpdGgtc3RhdHVzLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZy1jb21wb25lbnRzL3NyYy9saWIvcGlwZXMvb2JzLXdpdGgtc3RhdHVzLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDcEQsT0FBTyxFQUFjLEVBQUUsRUFBRSxNQUFNLE1BQU0sQ0FBQ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UgPyB2YWx1ZS52YWx1ZSA6IHZhbHVlLFxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfSksXHJcbiAgICAgICAgICAgIHN0YXJ0V2l0aCh7IGxvYWRpbmc6IHRydWUgfSksXHJcbiAgICAgICAgICAgIGNhdGNoRXJyb3IoZXJyb3IgPT4gb2YoeyBsb2FkaW5nOiBmYWxzZSwgZXJyb3I6IHR5cGVvZiBlcnJvciA9PT0gJ3N0cmluZycgPyBlcnJvciA6IGRlZmF1bHRFcnJvciB9KSlcclxuICAgICAgICApO1xyXG4gICAgfVxyXG59Il19
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export interface ObsWithStatusResult<T> {
|
|
5
|
-
loading?: boolean;
|
|
6
|
-
value?: T;
|
|
7
|
-
error?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare class ObsWithStatusPipe implements PipeTransform {
|
|
10
|
-
transform<T = any>(val: Observable<T>): Observable<ObsWithStatusResult<T>>;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ObsWithStatusPipe, never>;
|
|
12
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<ObsWithStatusPipe, "obsWithStatus">;
|
|
13
|
-
}
|